Bug 1275411. When descending into an out-of-flow without saved out of flow data we need to clear the scroll clip too. r=mattwoodrow
authorTimothy Nikkel <tnikkel@gmail.com>
Thu, 26 May 2016 01:54:48 -0500
changeset 299158 29637a385bc2975ae8d34fd0322b0a2293b5f113
parent 299157 6cf4da71b921c34300d32f7fb5e5f3b01e1daf96
child 299159 df9fd4cff088217776253331d10e31de653cdbb4
push id30291
push userryanvm@gmail.com
push dateFri, 27 May 2016 01:45:30 +0000
treeherdermozilla-central@4d63dde701b4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmattwoodrow
bugs1275411
milestone49.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 1275411. When descending into an out-of-flow without saved out of flow data we need to clear the scroll clip too. r=mattwoodrow
layout/generic/nsFrame.cpp
layout/reftests/bugs/1275411-1-ref.html
layout/reftests/bugs/1275411-1.html
--- a/layout/generic/nsFrame.cpp
+++ b/layout/generic/nsFrame.cpp
@@ -2789,16 +2789,17 @@ nsIFrame::BuildDisplayListForChild(nsDis
       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.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.
   // Don't use overflowClip to restrict the dirty rect, since some of the
new file mode 100644
--- /dev/null
+++ b/layout/reftests/bugs/1275411-1-ref.html
@@ -0,0 +1,13 @@
+<html>
+<head>
+</head>
+<body>
+	<div style="overflow: hidden; width:50px;height:50px;">
+		<div style="position: fixed;">
+			<div style="position: fixed;">
+				<div style="width: 100px; height: 50px; background: red;"></div>
+			</div>
+		</div>
+	</div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/bugs/1275411-1.html
@@ -0,0 +1,13 @@
+<html>
+<head>
+</head>
+<body>
+	<div style="overflow: hidden;">
+		<div style="position: fixed;">
+			<div style="position: fixed;">
+				<div style="width: 100px; height: 50px; background: red;"></div>
+			</div>
+		</div>
+	</div>
+</body>
+</html>