Bug 928607. Ensure that nsGfxScrollFrameInner::UpdatePosition clips the overflow area of its children. r=tn
☠☠ backed out by 69d9f136cf26 ☠ ☠
authorRobert O'Callahan <robert@ocallahan.org>
Tue, 22 Oct 2013 14:10:31 +0200
changeset 166623 bcf1282f3f4b6698f35eb6d1a48463d49f330278
parent 166622 a61d898ea4facb179c6ba93820acbbbb0b1885a8
child 166624 ffd9c7bbd2fedf850c94d1eecdeb9e75d4bba553
push id428
push userbbajaj@mozilla.com
push dateTue, 28 Jan 2014 00:16:25 +0000
treeherdermozilla-release@cd72a7ff3a75 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstn
bugs928607
milestone27.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 928607. Ensure that nsGfxScrollFrameInner::UpdatePosition clips the overflow area of its children. r=tn
layout/generic/nsFrame.cpp
layout/reftests/bugs/928607-1-ref.html
layout/reftests/bugs/928607-1.html
layout/reftests/bugs/reftest.list
--- a/layout/generic/nsFrame.cpp
+++ b/layout/generic/nsFrame.cpp
@@ -5237,18 +5237,17 @@ nsFrame::UpdateOverflow()
 {
   MOZ_ASSERT(!(mState & NS_FRAME_SVG_LAYOUT) ||
              !(mState & NS_FRAME_IS_NONDISPLAY),
              "Non-display SVG do not maintain visual overflow rects");
 
   nsRect rect(nsPoint(0, 0), GetSize());
   nsOverflowAreas overflowAreas(rect, rect);
 
-  bool isBox = IsBoxFrame() || IsBoxWrapped();
-  if (!isBox || (!IsCollapsed() && !DoesClipChildren())) {
+  if (!DoesClipChildren() && !IsCollapsed()) {
     nsLayoutUtils::UnionChildOverflow(this, overflowAreas);
   }
 
   if (FinishAndStoreOverflow(overflowAreas, GetSize())) {
     nsView* view = GetView();
     if (view) {
       uint32_t flags = 0;
       GetLayoutFlags(flags);
new file mode 100644
--- /dev/null
+++ b/layout/reftests/bugs/928607-1-ref.html
@@ -0,0 +1,8 @@
+<DOCTYPE HTML>
+<html>
+<body>
+<div style="overflow:hidden; border:1px solid black;">
+  <div style="position:relative; left:50px; height:10px; background:blue;"></div>
+</div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/bugs/928607-1.html
@@ -0,0 +1,15 @@
+<DOCTYPE HTML>
+<html class="reftest-wait">
+<body>
+<div style="overflow:hidden; border:1px solid black;">
+  <div id="d" style="position:relative; left:10px; height:10px; background:blue;"></div>
+</div>
+<script>
+function doTest() {
+  d.style.left = "50px";
+  document.documentElement.removeAttribute("class");
+}
+window.addEventListener("MozReftestInvalidate", doTest);
+</script>
+</body>
+</html>
--- a/layout/reftests/bugs/reftest.list
+++ b/layout/reftests/bugs/reftest.list
@@ -1770,8 +1770,9 @@ test-pref(layout.css.flexbox.enabled,tru
 == 883987-1f.html 883987-1-ref.html
 == 890495-1.html 890495-1-ref.html
 == 894931-1.html 894931-1-ref.html
 == 897491-1.html 897491-1-ref.html
 == 897491-2.html 897491-2-ref.html
 fuzzy(1,10000) fuzzy-if(Android&&AndroidVersion>=15,5,10000) == 902330-1.html 902330-1-ref.html
 fuzzy-if(Android,8,400) == 906199-1.html 906199-1-ref.html
 == 921716-1.html 921716-1-ref.html
+== 928607-1.html 928607-1-ref.html