Bug 1041510. Now that we merge and flatten display items bottom to top (instead of the reverse) move the scroll info layer to be on top of the other scrolled content so that it is still processed last. r=roc
authorTimothy Nikkel <tnikkel@gmail.com>
Tue, 22 Jul 2014 15:37:28 -0500
changeset 195592 b102fe6b3565676fbf59c9664f14e5149ec4db1e
parent 195591 83e9ee5700bb5a8f21808ee9293211b7ea463846
child 195593 c1ea5a8280d7bda0cd827ff926da650ff2038e03
push id27188
push usercbook@mozilla.com
push dateWed, 23 Jul 2014 13:53:43 +0000
treeherdermozilla-central@785acfd2ae48 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc
bugs1041510
milestone34.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 1041510. Now that we merge and flatten display items bottom to top (instead of the reverse) move the scroll info layer to be on top of the other scrolled content so that it is still processed last. r=roc
layout/generic/nsGfxScrollFrame.cpp
--- a/layout/generic/nsGfxScrollFrame.cpp
+++ b/layout/generic/nsGfxScrollFrame.cpp
@@ -2636,17 +2636,23 @@ ScrollFrameHelper::BuildDisplayList(nsDi
       wrapper.WrapListsInPlace(aBuilder, mOuter, scrolledContent);
     }
 
     // In case we are not using displayport or the nsDisplayScrollLayers are
     // flattened during visibility computation, we still need to export the
     // metadata about this scroll box to the compositor process.
     nsDisplayScrollInfoLayer* layerItem = new (aBuilder) nsDisplayScrollInfoLayer(
       aBuilder, mScrolledFrame, mOuter);
-    scrolledContent.BorderBackground()->AppendNewToBottom(layerItem);
+    nsDisplayList* positionedDescendants = scrolledContent.PositionedDescendants();
+    if (!positionedDescendants->IsEmpty()) {
+      layerItem->SetOverrideZIndex(MaxZIndexInList(positionedDescendants, aBuilder));
+      positionedDescendants->AppendNewToTop(layerItem);
+    } else {
+      aLists.Outlines()->AppendNewToTop(layerItem);
+    }
   }
   // Now display overlay scrollbars and the resizer, if we have one.
   AppendScrollPartsTo(aBuilder, aDirtyRect, scrolledContent,
                       createLayersForScrollbars, true);
   scrolledContent.MoveTo(aLists);
 }
 
 bool