Bug 1526486 - Don't muck with the RCD-RSF composition bounds clip rect during event delivery. r=mstange
authorBotond Ballo <botond@mozilla.com>
Sat, 16 Feb 2019 00:51:54 +0000
changeset 459632 11133b5a9855c400b396312b6b11c3f00779560d
parent 459631 4009b930fbf1cf77be3cc0ada886dca0db4c8a99
child 459633 5bbfd524941c77d38ca1b1b626865a273dc216ab
push id35563
push userccoroiu@mozilla.com
push dateSat, 16 Feb 2019 09:36:04 +0000
treeherdermozilla-central@1cfd69d05aa1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmstange
bugs1526486, 1521644
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1526486 - Don't muck with the RCD-RSF composition bounds clip rect during event delivery. r=mstange In bug 1521644, we changed the clip rect computation so we don't divide by the resolution when using containerless scrolling. The rationale for that change was that this clip becomes a clip rect on the async zoom container layer, which is applied after the resolution in the compositor. However, when building a display list for event delivery, this rationale does not apply as there are no layers and no compositor involved. Differential Revision: https://phabricator.services.mozilla.com/D19221
layout/generic/nsGfxScrollFrame.cpp
--- a/layout/generic/nsGfxScrollFrame.cpp
+++ b/layout/generic/nsGfxScrollFrame.cpp
@@ -3482,17 +3482,18 @@ void ScrollFrameHelper::BuildDisplayList
   nsRect scrollPortClip = mScrollPort + aBuilder->ToReferenceFrame(mOuter);
   nsRect clipRect = scrollPortClip;
   // Our override of GetBorderRadii ensures we never have a radius at
   // the corners where we have a scrollbar.
   nscoord radii[8];
   bool haveRadii = mOuter->GetPaddingBoxBorderRadii(radii);
   if (mIsRoot) {
     clipRect.SizeTo(nsLayoutUtils::CalculateCompositionSizeForFrame(mOuter));
-    if (gfxPrefs::LayoutUseContainersForRootFrames() &&
+    if ((gfxPrefs::LayoutUseContainersForRootFrames() ||
+         !aBuilder->IsPaintingToWindow()) &&
         mOuter->PresContext()->IsRootContentDocument()) {
       double res = mOuter->PresShell()->GetResolution();
       clipRect.width = NSToCoordRound(clipRect.width / res);
       clipRect.height = NSToCoordRound(clipRect.height / res);
     }
   }
 
   {