Bug 1728699. Use IsRootContentDocumentCrossProcess in one place in ScrollFrameHelper::BuildDisplayList. r=mattwoodrow
authorTimothy Nikkel <tnikkel@gmail.com>
Fri, 03 Sep 2021 02:23:03 +0000
changeset 590977 48effa52360487eeaa012cb4b534613c26ed8ff8
parent 590976 63c10baf1578248d6b51e5a701534bbb35072a26
child 590978 aeb4406911bbc311f3901629466ec6784444ed1c
push id38761
push usermlaza@mozilla.com
push dateSat, 04 Sep 2021 09:40:24 +0000
treeherdermozilla-central@8d40319470d4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmattwoodrow
bugs1728699
milestone93.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 1728699. Use IsRootContentDocumentCrossProcess in one place in ScrollFrameHelper::BuildDisplayList. r=mattwoodrow Differential Revision: https://phabricator.services.mozilla.com/D124282
layout/generic/nsGfxScrollFrame.cpp
--- a/layout/generic/nsGfxScrollFrame.cpp
+++ b/layout/generic/nsGfxScrollFrame.cpp
@@ -3703,18 +3703,17 @@ void ScrollFrameHelper::BuildDisplayList
   // We put non-overlay scrollbars in their own layers when this is the root
   // scroll frame and we are a toplevel content document. In this situation,
   // the scrollbar(s) would normally be assigned their own layer anyway, since
   // they're not scrolled with the rest of the document. But when both
   // scrollbars are visible, the layer's visible rectangle would be the size
   // of the viewport, so most layer implementations would create a layer buffer
   // that's much larger than necessary. Creating independent layers for each
   // scrollbar works around the problem.
-  bool createLayersForScrollbars =
-      mIsRoot && mOuter->PresContext()->IsRootContentDocument();
+  bool createLayersForScrollbars = isRootContent;
 
   nsIScrollableFrame* sf = do_QueryFrame(mOuter);
   MOZ_ASSERT(sf);
 
   if (ignoringThisScrollFrame) {
     // Root scrollframes have FrameMetrics and clipping on their container
     // layers, so don't apply clipping again.
     mAddClipRectToLayer = false;