Bug 1236828 part 1 - Apply proper clip state to top layer frames. r=mstange
authorXidorn Quan <quanxunzhen@gmail.com>
Wed, 06 Apr 2016 18:48:31 +1000
changeset 316454 b7f833f9fe09f5b0ac3de7c1331b841b24edfaee
parent 316453 a578a48aae83831ae942758b4a71a55ec7577e6a
child 316455 5e846f999e8beccc099d0a75824b3289696b739e
push id9480
push userjlund@mozilla.com
push dateMon, 25 Apr 2016 17:12:58 +0000
treeherdermozilla-aurora@0d6a91c76a9e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmstange
bugs1236828
milestone48.0a1
Bug 1236828 part 1 - Apply proper clip state to top layer frames. r=mstange MozReview-Commit-ID: JW2tAFu4wIP
layout/generic/nsViewportFrame.cpp
--- a/layout/generic/nsViewportFrame.cpp
+++ b/layout/generic/nsViewportFrame.cpp
@@ -94,20 +94,25 @@ ShouldInTopLayerForFullscreen(Element* a
 #endif // DEBUG
 
 static void
 BuildDisplayListForTopLayerFrame(nsDisplayListBuilder* aBuilder,
                                  nsIFrame* aFrame,
                                  nsDisplayList* aList)
 {
   nsRect dirty;
+  DisplayListClipState::AutoClipMultiple clipState(aBuilder);
   nsDisplayListBuilder::OutOfFlowDisplayData*
     savedOutOfFlowData = nsDisplayListBuilder::GetOutOfFlowData(aFrame);
   if (savedOutOfFlowData) {
     dirty = savedOutOfFlowData->mDirtyRect;
+    clipState.SetClipForContainingBlockDescendants(
+      &savedOutOfFlowData->mContainingBlockClip);
+    clipState.SetScrollClipForContainingBlockDescendants(
+      savedOutOfFlowData->mContainingBlockScrollClip);
   }
   nsDisplayList list;
   aFrame->BuildDisplayListForStackingContext(aBuilder, dirty, &list);
   aList->AppendToTop(&list);
 }
 
 void
 ViewportFrame::BuildDisplayListForTopLayer(nsDisplayListBuilder* aBuilder,