Bug 1277123 - Only clear the containing block clip when entering an out of flow with an unknown clip. r=mattwoodrow, a=gchang
authorTimothy Nikkel <tnikkel@gmail.com>
Wed, 06 Jul 2016 16:55:17 -0500
changeset 339911 dbd97076d10694525fd68868ea18d643775014f0
parent 339910 481052283b4fc250ccac55fa0e96315eef80783d
child 339912 b27163b500de7b81f75bcb1116e25b55ba577524
push id6249
push userjlund@mozilla.com
push dateMon, 01 Aug 2016 13:59:36 +0000
treeherdermozilla-beta@bad9d4f5bf7e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmattwoodrow, gchang
bugs1277123
milestone49.0a2
Bug 1277123 - Only clear the containing block clip when entering an out of flow with an unknown clip. r=mattwoodrow, a=gchang The content clip is still valid, as we are only descending into content descendants. The clip for content descendants that the root scroll frame creates so content doesn't overflow (visually or for event handling) the main scrollbar can get cleared otherwise.
layout/generic/nsFrame.cpp
--- a/layout/generic/nsFrame.cpp
+++ b/layout/generic/nsFrame.cpp
@@ -2760,17 +2760,17 @@ nsIFrame::BuildDisplayListForChild(nsDis
     clipState.SetScrollClipForContainingBlockDescendants(
       savedOutOfFlowData->mContainingBlockScrollClip);
   } else if (GetStateBits() & NS_FRAME_FORCE_DISPLAY_LIST_DESCEND_INTO &&
              isPlaceholder) {
     // 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();
+    clipState.SetClipForContainingBlockDescendants(nullptr);
     clipState.SetScrollClipForContainingBlockDescendants(nullptr);
   }
 
   // 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.