Bug 1265237 - Clear clipping for out-of-flow frames that we are descending into but haven't stored explicit clip data for. r=mstange
☠☠ backed out by 54e84fa84d6d ☠ ☠
authorMatt Woodrow <mwoodrow@mozilla.com>
Wed, 04 May 2016 12:58:01 +1200
changeset 363216 23bf1e82cc3425e7e1d1224dd1723916a084507e
parent 363215 51a3298d499ed6f77247919715784b991f6054ce
child 363217 5a8498e9069201f3d4f79da44f86484f2c62c19d
push id17139
push userbmo:jbeich@FreeBSD.org
push dateWed, 04 May 2016 07:51:34 +0000
reviewersmstange
bugs1265237
milestone49.0a1
Bug 1265237 - Clear clipping for out-of-flow frames that we are descending into but haven't stored explicit clip data for. r=mstange
layout/generic/nsFrame.cpp
--- a/layout/generic/nsFrame.cpp
+++ b/layout/generic/nsFrame.cpp
@@ -2766,16 +2766,22 @@ nsIFrame::BuildDisplayListForChild(nsDis
   DisplayListClipState::AutoClipMultiple clipState(aBuilder);
   CheckForApzAwareEventHandlers(aBuilder, child);
 
   if (savedOutOfFlowData) {
     clipState.SetClipForContainingBlockDescendants(
       &savedOutOfFlowData->mContainingBlockClip);
     clipState.SetScrollClipForContainingBlockDescendants(
       savedOutOfFlowData->mContainingBlockScrollClip);
+  } else if (GetStateBits() & NS_FRAME_FORCE_DISPLAY_LIST_DESCEND_INTO) {
+    // If we have nested out-of-flow frames and the outer one isn't visible
+    // then we won't have stored clip data for it. We can just clear the clip
+    // instead since we know we won't render anything, and the inner out-of-flow
+    // frame will setup the correct clip for itself.
+    clipState.Clear();
   }
 
   // Setup clipping for the parent's overflow:-moz-hidden-unscrollable,
   // or overflow:hidden on elements that don't support scrolling (and therefore
   // don't create nsHTML/XULScrollFrame). This clipping needs to not clip
   // anything directly rendered by the parent, only the rendering of its
   // children.
   // Don't use overflowClip to restrict the dirty rect, since some of the