Back out b9085d8ca22e (bug 987680) for b2g reftest failures and passes
authorPhil Ringnalda <philringnalda@gmail.com>
Sun, 06 Apr 2014 23:11:35 -0700
changeset 177230 fe57c073f01974bf7ef58e2306d4bbe75a3a2f0b
parent 177229 2579095d0f7eedb18f807dce976d450f7d4b7fd6
child 177231 e2db1c06a933b3a194119cadf1aef53b74c2f8e2
push id41953
push userphilringnalda@gmail.com
push dateMon, 07 Apr 2014 06:11:47 +0000
treeherdermozilla-inbound@fe57c073f019 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs987680
milestone31.0a1
backs outb9085d8ca22e4d14923c978f1e355cc3709ce459
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
Back out b9085d8ca22e (bug 987680) for b2g reftest failures and passes CLOSED TREE
layout/generic/nsGfxScrollFrame.cpp
layout/reftests/bugs/987680-1-ref.html
layout/reftests/bugs/987680-1.html
layout/reftests/bugs/reftest.list
--- a/layout/generic/nsGfxScrollFrame.cpp
+++ b/layout/generic/nsGfxScrollFrame.cpp
@@ -2123,27 +2123,23 @@ AppendToTop(nsDisplayListBuilder* aBuild
   if (aSource->IsEmpty())
     return;
 
   nsDisplayWrapList* newItem = aOwnLayer?
     new (aBuilder) nsDisplayOwnLayer(aBuilder, aSourceFrame, aSource,
                                      aFlags, aScrollTargetId) :
     new (aBuilder) nsDisplayWrapList(aBuilder, aSourceFrame, aSource);
 
-  if (aPositioned) {
+  nsDisplayList* positionedDescendants = aLists.PositionedDescendants();
+  if (aPositioned && !positionedDescendants->IsEmpty()) {
     // We want overlay scrollbars to always be on top of the scrolled content,
     // but we don't want them to unnecessarily cover overlapping elements from
     // outside our scroll frame.
-    nsDisplayList* positionedDescendants = aLists.PositionedDescendants();
-    if (!positionedDescendants->IsEmpty()) {
-      newItem->SetOverrideZIndex(MaxZIndexInList(positionedDescendants, aBuilder));
-      positionedDescendants->AppendNewToTop(newItem);
-    } else {
-      aLists.Outlines()->AppendNewToTop(newItem);
-    }
+    newItem->SetOverrideZIndex(MaxZIndexInList(positionedDescendants, aBuilder));
+    positionedDescendants->AppendNewToTop(newItem);
   } else {
     aLists.BorderBackground()->AppendNewToTop(newItem);
   }
 }
 
 struct HoveredStateComparator
 {
   bool Equals(nsIFrame* A, nsIFrame* B) const {
deleted file mode 100644
--- a/layout/reftests/bugs/987680-1-ref.html
+++ /dev/null
@@ -1,20 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<style>
-.container {
-  width: 200px;
-  height: 200px;
-  overflow: scroll;
-  position: relative;
-}
-</style>
-</head>
-<body>
-<div class="container">
-  <div style="width: 10px; height: 10px; left: 0px; top: 60px; background: white; position: absolute; z-index: 1;"></div>
-  <div style="background: green; height: 40px;"></div>
-  <div style="height: 300px;"></div>
-</div>
-</body>
-</html>
\ No newline at end of file
deleted file mode 100644
--- a/layout/reftests/bugs/987680-1.html
+++ /dev/null
@@ -1,19 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<style>
-.container {
-  width: 200px;
-  height: 200px;
-  overflow: scroll;
-  position: relative;
-}
-</style>
-</head>
-<body>
-<div class="container">
-  <div style="background: green; height: 40px;"></div>
-  <div style="height: 300px;"></div>
-</div>
-</body>
-</html>
\ No newline at end of file
--- a/layout/reftests/bugs/reftest.list
+++ b/layout/reftests/bugs/reftest.list
@@ -1799,9 +1799,8 @@ fails == 942017.html 942017-ref.html # b
 pref(layout.css.overflow-clip-box.enabled,true) fuzzy(50,10) == 966992-1.html 966992-1-ref.html
 skip-if(Android) == 966510-1.html 966510-1-ref.html # scrollable elements other than the root probably won't work well on android until bug 776030 is fixed
 skip-if(Android) == 966510-2.html 966510-2-ref.html # same as above
 == 978911-1.svg 978911-1-ref.svg
 == 983084-1.html 983084-1-ref.html
 == 983084-2.html 983084-2-ref.html
 == 983084-3.html 983084-1-ref.html
 == 983691-1.html 983691-ref.html
-== 987680-1.html 987680-1-ref.html