Backing out bug 375304 because of reftest failure
authorroc+@cs.cmu.edu
Sun, 11 Nov 2007 19:40:27 -0800
changeset 7834 50317822612e760dc07a735afe99b151a5ee82ae
parent 7833 5d83ab8a3b7e5e9bb429e133c86e38c8563db291
child 7835 d09ea8dd870a00bcea9106172670c3382e7bad98
push idunknown
push userunknown
push dateunknown
bugs375304
milestone1.9b2pre
Backing out bug 375304 because of reftest failure
layout/generic/nsBlockFrame.cpp
layout/generic/nsGfxScrollFrame.cpp
layout/generic/nsHTMLReflowState.cpp
layout/reftests/percent-overflow-sizing/greenbox.html
layout/reftests/percent-overflow-sizing/greenboxhbar.html
layout/reftests/percent-overflow-sizing/hScrollAbsHeight.html
layout/reftests/percent-overflow-sizing/hScrollAbsHeightD.html
layout/reftests/percent-overflow-sizing/hScrollAbsHeightQuirks.html
layout/reftests/percent-overflow-sizing/hScrollAbsHeightQuirksD.html
layout/reftests/percent-overflow-sizing/hScrollAbsMinHeightD.html
layout/reftests/percent-overflow-sizing/hScrollAbsMinHeightQuirksD.html
layout/reftests/percent-overflow-sizing/hScrollSimpleHeight.html
layout/reftests/percent-overflow-sizing/hScrollSimpleHeightD.html
layout/reftests/percent-overflow-sizing/hScrollSimpleHeightQuirks-1.html
layout/reftests/percent-overflow-sizing/hScrollSimpleHeightQuirks-1D.html
layout/reftests/percent-overflow-sizing/hScrollSimpleHeightQuirks-2.html
layout/reftests/percent-overflow-sizing/hScrollSimpleHeightQuirks-2D.html
layout/reftests/percent-overflow-sizing/hScrollSimpleHeightQuirks-3.html
layout/reftests/percent-overflow-sizing/hScrollSimpleHeightQuirks-3D.html
layout/reftests/percent-overflow-sizing/hScrollSimpleMinHeightD.html
layout/reftests/percent-overflow-sizing/hScrollSimpleMinHeightQuirks-1D.html
layout/reftests/percent-overflow-sizing/hScrollSimpleMinHeightQuirks-3D.html
layout/reftests/percent-overflow-sizing/reftest.list
layout/reftests/percent-overflow-sizing/simpleAbsHeight.html
layout/reftests/percent-overflow-sizing/simpleAbsHeightD.html
layout/reftests/percent-overflow-sizing/simpleAbsMinHeightD.html
layout/reftests/percent-overflow-sizing/simpleHeight100.html
layout/reftests/percent-overflow-sizing/simpleHeight100D.html
layout/reftests/percent-overflow-sizing/simpleMinHeight100D.html
layout/reftests/reftest.list
--- a/layout/generic/nsBlockFrame.cpp
+++ b/layout/generic/nsBlockFrame.cpp
@@ -777,18 +777,22 @@ nsBlockFrame::ComputeTightBounds(gfxCont
 
 static nsSize
 CalculateContainingBlockSizeForAbsolutes(const nsHTMLReflowState& aReflowState,
                                          nsSize aFrameSize)
 {
   // The issue here is that for a 'height' of 'auto' the reflow state
   // code won't know how to calculate the containing block height
   // because it's calculated bottom up. So we use our own computed
-  // size as the dimensions.
+  // size as the dimensions. We don't really want to do this for the
+  // initial containing block
   nsIFrame* frame = aReflowState.frame;
+  if (nsLayoutUtils::IsInitialContainingBlock(frame)) {
+    return nsSize(-1, -1);
+  }
 
   nsSize cbSize(aFrameSize);
     // Containing block is relative to the padding edge
   const nsMargin& border = aReflowState.mStyleBorder->GetBorder();
   cbSize.width -= border.left + border.right;
   cbSize.height -= border.top + border.bottom;
 
   if (frame->GetParent()->GetContent() == frame->GetContent()) {
@@ -814,19 +818,23 @@ CalculateContainingBlockSizeForAbsolutes
       // padding-edge. We need better APIs for getting the various boxes from a frame.
       nsIScrollableFrame* scrollFrame;
       CallQueryInterface(aLastRS->frame, &scrollFrame);
       nsMargin scrollbars(0,0,0,0);
       if (scrollFrame) {
         nsBoxLayoutState dummyState(aLastRS->frame->PresContext(),
                                     aLastRS->rendContext);
         scrollbars = scrollFrame->GetDesiredScrollbarSizes(&dummyState);
-        if (!lastButOneRS->mFlags.mAssumingHScrollbar) {
+        // XXX We should account for the horizontal scrollbar too --- but currently
+        // nsGfxScrollFrame assumes nothing depends on the presence (or absence) of
+        // a horizontal scrollbar, so accounting for it would create incremental
+        // reflow bugs.
+        //if (!lastButOneRS->mFlags.mAssumingHScrollbar) {
           scrollbars.top = scrollbars.bottom = 0;
-        }
+        //}
         if (!lastButOneRS->mFlags.mAssumingVScrollbar) {
           scrollbars.left = scrollbars.right = 0;
         }
       }
       // We found a reflow state for the outermost wrapping frame, so use
       // its computed metrics if available
       if (aLastRS->ComputedWidth() != NS_UNCONSTRAINEDSIZE) {
         cbSize.width = PR_MAX(0,
--- a/layout/generic/nsGfxScrollFrame.cpp
+++ b/layout/generic/nsGfxScrollFrame.cpp
@@ -415,29 +415,16 @@ nsHTMLScrollFrame::ReflowScrolledFrame(c
                                        PRBool aFirstPass)
 {
   // these could be NS_UNCONSTRAINEDSIZE ... PR_MIN arithmetic should
   // be OK
   nscoord paddingLR = aState.mReflowState.mComputedPadding.LeftRight();
 
   nscoord availWidth = aState.mReflowState.ComputedWidth() + paddingLR;
 
-  nscoord computedHeight = aState.mReflowState.ComputedHeight();
-  nscoord computedMinHeight = aState.mReflowState.mComputedMinHeight;
-  nscoord computedMaxHeight = aState.mReflowState.mComputedMaxHeight;
-  if (aAssumeHScroll) {
-    nsSize hScrollbarPrefSize = 
-      mInner.mHScrollbarBox->GetPrefSize(const_cast<nsBoxLayoutState&>(aState.mBoxState));
-    if (computedHeight != NS_UNCONSTRAINEDSIZE)
-      computedHeight = PR_MAX(0, computedHeight - hScrollbarPrefSize.height);
-    computedMinHeight = PR_MAX(0, computedMinHeight - hScrollbarPrefSize.height);
-    if (computedMaxHeight != NS_UNCONSTRAINEDSIZE)
-      computedMaxHeight = PR_MAX(0, computedMaxHeight - hScrollbarPrefSize.height);
-  }
-  
   if (aAssumeVScroll) {
     nsSize vScrollbarPrefSize = 
       mInner.mVScrollbarBox->GetPrefSize(const_cast<nsBoxLayoutState&>(aState.mBoxState));
     availWidth = PR_MAX(0, availWidth - vScrollbarPrefSize.width);
   }
 
   // We're forcing the padding on our scrolled frame, so let it know what that
   // padding is.
@@ -451,19 +438,16 @@ nsHTMLScrollFrame::ReflowScrolledFrame(c
   nsHTMLReflowState kidReflowState(presContext, aState.mReflowState,
                                    mInner.mScrolledFrame,
                                    nsSize(availWidth, NS_UNCONSTRAINEDSIZE),
                                    -1, -1, PR_FALSE);
   kidReflowState.Init(presContext, -1, -1, nsnull,
                       &aState.mReflowState.mComputedPadding);
   kidReflowState.mFlags.mAssumingHScrollbar = aAssumeHScroll;
   kidReflowState.mFlags.mAssumingVScrollbar = aAssumeVScroll;
-  kidReflowState.SetComputedHeight(computedHeight);
-  kidReflowState.mComputedMinHeight = computedMinHeight;
-  kidReflowState.mComputedMaxHeight = computedMaxHeight;
 
   nsReflowStatus status;
   nsresult rv = ReflowChild(mInner.mScrolledFrame, presContext, *aMetrics,
                             kidReflowState, 0, 0,
                             NS_FRAME_NO_MOVE_FRAME | NS_FRAME_NO_MOVE_VIEW, status);
   // Don't resize or position the view because we're going to resize
   // it to the correct size anyway in PlaceScrollArea. Allowing it to
   // resize here would size it to the natural height of the frame,
@@ -537,24 +521,23 @@ nsHTMLScrollFrame::InInitialReflow() con
   // assumption, because our initial reflow is no longer synchronous).
   return !mInner.mIsRoot && (GetStateBits() & NS_FRAME_FIRST_REFLOW);
 }
 
 nsresult
 nsHTMLScrollFrame::ReflowContents(ScrollReflowState* aState,
                                   const nsHTMLReflowMetrics& aDesiredSize)
 {
-  PRBool lastUsedVScrollbar = GuessVScrollbarNeeded(*aState);
-  PRBool lastUsedHScrollbar = mInner.mHasHorizontalScrollbar; // XXX is this good enough?
+  PRBool currentlyUsingVScrollbar = GuessVScrollbarNeeded(*aState);
   nsHTMLReflowMetrics kidDesiredSize(aDesiredSize.mFlags);
-  nsresult rv = ReflowScrolledFrame(*aState, lastUsedHScrollbar, lastUsedVScrollbar,
+  nsresult rv = ReflowScrolledFrame(*aState, PR_FALSE, currentlyUsingVScrollbar,
                                     &kidDesiredSize, PR_TRUE);
-  NS_ENSURE_SUCCESS(rv, rv);
-
-  PRBool relativeHeight = (mInner.mScrolledFrame->GetStateBits() & NS_FRAME_CONTAINS_RELATIVE_HEIGHT) != 0;
+  if (NS_FAILED(rv))
+    return rv;
+  PRBool didUseScrollbar = currentlyUsingVScrollbar;
 
   // There's an important special case ... if the child appears to fit
   // in the inside-border rect (but overflows the scrollport), we
   // should try laying it out without a vertical scrollbar. It will
   // usually fit because making the available-width wider will not
   // normally make the child taller. (The only situation I can think
   // of is when you have a line containing %-width inline replaced
   // elements whose percentages sum to more than 100%, so increasing
@@ -562,88 +545,75 @@ nsHTMLScrollFrame::ReflowContents(Scroll
   // before.) If we don't treat this case specially, then we will
   // decide that showing scrollbars is OK because the content
   // overflows when we're showing scrollbars and we won't try to
   // remove the vertical scrollbar.
 
   // Detecting when we enter this special case is important for when
   // people design layouts that exactly fit the container "most of the
   // time".
-
-  // XXX Is this check really sufficient to catch all the incremental cases
-  // where the ideal case doesn't have a scrollbar?
-  if ((lastUsedVScrollbar || (lastUsedHScrollbar && relativeHeight)) &&
+  if (currentlyUsingVScrollbar &&
       aState->mStyles.mVertical != NS_STYLE_OVERFLOW_SCROLL &&
       aState->mStyles.mHorizontal != NS_STYLE_OVERFLOW_SCROLL) {
     nsSize insideBorderSize =
       ComputeInsideBorderSize(aState,
                               nsSize(kidDesiredSize.width, kidDesiredSize.height));
     nsRect scrolledRect = mInner.GetScrolledRect(insideBorderSize);
     if (nsRect(nsPoint(0, 0), insideBorderSize).Contains(scrolledRect)) {
       // Let's pretend we had no vertical scrollbar coming in here
-      rv = ReflowScrolledFrame(*aState, PR_FALSE, PR_FALSE,
+      currentlyUsingVScrollbar = PR_FALSE;
+      rv = ReflowScrolledFrame(*aState, PR_FALSE, currentlyUsingVScrollbar,
                                &kidDesiredSize, PR_FALSE);
-      NS_ENSURE_SUCCESS(rv, rv);
-      lastUsedVScrollbar = PR_FALSE;
-      lastUsedHScrollbar = PR_FALSE;
+      if (NS_FAILED(rv))
+        return rv;
+      didUseScrollbar = PR_FALSE;
     }
   }
 
   // First try a layout without a horizontal scrollbar, then with.
-  if (!relativeHeight) {
-    if (TryLayout(aState, kidDesiredSize, lastUsedVScrollbar, PR_FALSE, PR_FALSE))
-      return NS_OK;
-
-    if (TryLayout(aState, kidDesiredSize, lastUsedVScrollbar, PR_TRUE, PR_FALSE))
-      return NS_OK;
-  } else {
-    if (TryLayout(aState, kidDesiredSize, lastUsedVScrollbar, lastUsedHScrollbar, PR_FALSE))
-      return NS_OK;
-  }
+  if (TryLayout(aState, kidDesiredSize, didUseScrollbar, PR_FALSE, PR_FALSE))
+    return NS_OK;
+  // XXX Adding a horizontal scrollbar could cause absolute children positioned
+  // relative to the bottom padding-edge to need to be reflowed. But we don't,
+  // because that would be slow.
+  if (TryLayout(aState, kidDesiredSize, didUseScrollbar, PR_TRUE, PR_FALSE))
+    return NS_OK;
 
   PRBool canHaveVerticalScrollbar =
     aState->mStyles.mVertical != NS_STYLE_OVERFLOW_HIDDEN;
-  PRBool canHaveHorizontalScrollbar =
-    aState->mStyles.mHorizontal != NS_STYLE_OVERFLOW_HIDDEN;
-
   // That didn't work. Try the other setting for the vertical scrollbar.
   // But don't try to show a scrollbar if we know there can't be one.
-  if (lastUsedVScrollbar || canHaveVerticalScrollbar) {
-    rv = ReflowScrolledFrame(*aState, PR_FALSE, !lastUsedVScrollbar,
-                             &kidDesiredSize, PR_FALSE);
-    NS_ENSURE_SUCCESS(rv, rv);
-    lastUsedHScrollbar = PR_FALSE;
-    lastUsedVScrollbar = !lastUsedVScrollbar;
-    if (!relativeHeight) {
-      if (TryLayout(aState, kidDesiredSize, lastUsedVScrollbar, PR_FALSE, PR_FALSE))
-        return NS_OK;
-      if (TryLayout(aState, kidDesiredSize, lastUsedVScrollbar, PR_TRUE, PR_FALSE))
-        return NS_OK;
-    } else {
-      if (TryLayout(aState, kidDesiredSize, lastUsedVScrollbar, lastUsedHScrollbar, PR_FALSE))
-        return NS_OK;
-    }
+  if (currentlyUsingVScrollbar || canHaveVerticalScrollbar) {
+    nsHTMLReflowMetrics kidRetrySize(aDesiredSize.mFlags);
+    rv = ReflowScrolledFrame(*aState, PR_FALSE, !currentlyUsingVScrollbar,
+                             &kidRetrySize, PR_FALSE);
+    if (NS_FAILED(rv))
+      return rv;
+    didUseScrollbar = !currentlyUsingVScrollbar;
+    // XXX Adding a horizontal scrollbar could cause absolute children positioned
+    // relative to the bottom padding-edge to need to be reflowed. But we don't,
+    // because that would be slow.
+    if (TryLayout(aState, kidRetrySize, didUseScrollbar, PR_FALSE, PR_FALSE))
+      return NS_OK;
+    if (TryLayout(aState, kidRetrySize, didUseScrollbar, PR_TRUE, PR_FALSE))
+      return NS_OK;
+
+    NS_WARNING("Strange content ... we can't find logically consistent scrollbar settings");
+  } else {
+    NS_WARNING("Strange content ... we can't find logically consistent scrollbar settings");
   }
 
-  if ((lastUsedHScrollbar || canHaveHorizontalScrollbar) && relativeHeight) {
-    rv = ReflowScrolledFrame(*aState, PR_TRUE, PR_FALSE,
-                             &kidDesiredSize, PR_FALSE);
-    lastUsedHScrollbar = PR_TRUE;
-    lastUsedVScrollbar = PR_FALSE;
-    NS_ENSURE_SUCCESS(rv, rv);
-    if (TryLayout(aState, kidDesiredSize, lastUsedVScrollbar, lastUsedHScrollbar, PR_FALSE))
-      return NS_OK;
+  // Fall back to no scrollbars --- even if NS_STYLE_OVERFLOW_SCROLL is
+  // in effect. They might not fit anyway.
+  if (didUseScrollbar) {
+    rv = ReflowScrolledFrame(*aState, PR_FALSE, PR_FALSE, &kidDesiredSize, PR_FALSE);
+    if (NS_FAILED(rv))
+      return rv;
   }
-
-  rv = ReflowScrolledFrame(*aState, PR_TRUE, PR_TRUE,
-                           &kidDesiredSize, PR_FALSE);
-  lastUsedHScrollbar = PR_TRUE;
-  lastUsedVScrollbar = PR_TRUE;
-  NS_ENSURE_SUCCESS(rv, rv);
-  TryLayout(aState, kidDesiredSize, lastUsedVScrollbar, lastUsedHScrollbar, PR_TRUE);
+  TryLayout(aState, kidDesiredSize, PR_FALSE, PR_FALSE, PR_TRUE);
   return NS_OK;
 }
 
 void
 nsHTMLScrollFrame::PlaceScrollArea(const ScrollReflowState& aState)
 {
   nsIView* scrollView = mInner.mScrollableView->View();
   nsIViewManager* vm = scrollView->GetViewManager();
--- a/layout/generic/nsHTMLReflowState.cpp
+++ b/layout/generic/nsHTMLReflowState.cpp
@@ -357,17 +357,26 @@ void nsHTMLReflowState::InitCBReflowStat
  * this function as well
  */
 static PRBool
 IsQuirkContainingBlockHeight(const nsHTMLReflowState* rs) 
 {
   nsIAtom* frameType = rs->frame->GetType();
   if (nsGkAtoms::blockFrame == frameType ||
       nsGkAtoms::areaFrame == frameType ||
-      nsGkAtoms::scrollFrame == frameType) {
+      nsGkAtoms::scrollFrame == frameType) {  
+
+    if (nsGkAtoms::areaFrame == frameType) {
+      // Skip over scrolled-content area frames
+      if (rs->frame->GetStyleContext()->GetPseudoType() ==
+          nsCSSAnonBoxes::scrolledContent) {
+        return PR_FALSE;
+      }
+    }
+    
     // Note: This next condition could change due to a style change,
     // but that would cause a style reflow anyway, which means we're ok.
     if (NS_AUTOHEIGHT == rs->ComputedHeight()) {
       if (!rs->frame->GetStyleDisplay()->IsAbsolutelyPositioned()) {
         return PR_FALSE;
       }
     }
   }
@@ -410,17 +419,17 @@ nsHTMLReflowState::InitResizeFlags(nsPre
                         mComputedHeight + mComputedBorderPadding.TopBottom();
   }
 
   const PRBool dependsOnCBHeight =
     mStylePosition->mHeight.GetUnit() == eStyleUnit_Percent ||
     mStylePosition->mMinHeight.GetUnit() == eStyleUnit_Percent ||
     mStylePosition->mMaxHeight.GetUnit() == eStyleUnit_Percent ||
     mStylePosition->mOffset.GetTopUnit() == eStyleUnit_Percent ||
-    mStylePosition->mOffset.GetBottomUnit() != eStyleUnit_Auto ||
+    mStylePosition->mOffset.GetBottomUnit() == eStyleUnit_Percent ||
     frame->IsBoxFrame();
 
   // If we're the child of a table cell that performs special height
   // reflows and we could be the child that requires them, always set
   // the vertical resize in case this is the first pass before the
   // special height reflow.
   if (!mFlags.mVResize && mCBReflowState &&
       IS_TABLE_CELL(mCBReflowState->frame->GetType()) &&
@@ -1402,16 +1411,24 @@ CalcQuirkContainingBlockHeight(const nsH
   const nsHTMLReflowState* rs = aCBReflowState;
   for (; rs; rs = (nsHTMLReflowState *)(rs->parentReflowState)) { 
     nsIAtom* frameType = rs->frame->GetType();
     // if the ancestor is auto height then skip it and continue up if it 
     // is the first block/area frame and possibly the body/html
     if (nsGkAtoms::blockFrame == frameType ||
         nsGkAtoms::areaFrame == frameType ||
         nsGkAtoms::scrollFrame == frameType) {
+      
+      if (nsGkAtoms::areaFrame == frameType) {
+        // Skip over scrolled-content area frames
+        if (rs->frame->GetStyleContext()->GetPseudoType() ==
+            nsCSSAnonBoxes::scrolledContent) {
+          continue;
+        }
+      }
 
       secondAncestorRS = firstAncestorRS;
       firstAncestorRS = (nsHTMLReflowState*)rs;
 
       // If the current frame we're looking at is positioned, we don't want to
       // go any further (see bug 221784).  The behavior we want here is: 1) If
       // not auto-height, use this as the percentage base.  2) If auto-height,
       // keep looking, unless the frame is positioned.
@@ -1419,17 +1436,22 @@ CalcQuirkContainingBlockHeight(const nsH
         if (rs->frame->GetStyleDisplay()->IsAbsolutelyPositioned()) {
           break;
         } else {
           continue;
         }
       }
     }
     else if (nsGkAtoms::canvasFrame == frameType) {
-      // Always continue on to the height calculation
+      // Use scroll frames' computed height if we have one, this will
+      // allow us to get viewport height for native scrollbars.
+      nsHTMLReflowState* scrollState = (nsHTMLReflowState *)rs->parentReflowState;
+      if (nsGkAtoms::scrollFrame == scrollState->frame->GetType()) {
+        rs = scrollState;
+      }
     }
     else if (nsGkAtoms::pageContentFrame == frameType) {
       nsIFrame* prevInFlow = rs->frame->GetPrevInFlow();
       // only use the page content frame for a height basis if it is the first in flow
       if (prevInFlow) 
         break;
     }
     else {
@@ -1640,24 +1662,34 @@ nsHTMLReflowState::InitConstraints(nsPre
     nsFrame::ListTag(stdout, frame); printf(": cb=");
     nsFrame::ListTag(stdout, cbrs->frame); printf(" size=%d,%d\n", aContainingBlockWidth, aContainingBlockHeight);
 #endif
 
     // See if the containing block height is based on the size of its
     // content
     nsIAtom* fType;
     if (NS_AUTOHEIGHT == aContainingBlockHeight) {
-      // See if the containing block is a cell frame which needs
+      // See if the containing block is (1) a scrolled frame, i.e. its
+      // parent is a scroll frame. The presence of the intervening
+      // frame (that the scroll frame scrolls) needs to be hidden from
+      // the containingBlockHeight calcuation, or (2) a cell frame which needs
       // to use the mComputedHeight of the cell instead of what the cell block passed in.
-      // XXX It seems like this could lead to bugs with min-height and friends
       if (cbrs->parentReflowState) {
-        fType = cbrs->frame->GetType();
-        if (IS_TABLE_CELL(fType)) {
-          // use the cell's computed height 
-          aContainingBlockHeight = cbrs->mComputedHeight;
+        nsIFrame* f = cbrs->parentReflowState->frame;
+        fType = f->GetType();
+        if (nsGkAtoms::scrollFrame == fType) {
+          // Use the scroll frame's computed height instead
+          aContainingBlockHeight = cbrs->parentReflowState->mComputedHeight;
+        }
+        else {
+          fType = cbrs->frame->GetType();
+          if (IS_TABLE_CELL(fType)) {
+            // use the cell's computed height 
+            aContainingBlockHeight = cbrs->mComputedHeight;
+          }
         }
       }
     }
 
     InitOffsets(aContainingBlockWidth, aBorder, aPadding);
 
     nsStyleUnit heightUnit = mStylePosition->mHeight.GetUnit();
 
deleted file mode 100644
--- a/layout/reftests/percent-overflow-sizing/greenbox.html
+++ /dev/null
@@ -1,1 +0,0 @@
-<div style="height:200px;width:200px; background:green">
deleted file mode 100644
--- a/layout/reftests/percent-overflow-sizing/greenboxhbar.html
+++ /dev/null
@@ -1,2 +0,0 @@
-<div style="overflow:auto; background:green; height:200px; width:200px">
-<div style="width:300px; height:1px">
deleted file mode 100644
--- a/layout/reftests/percent-overflow-sizing/hScrollAbsHeight.html
+++ /dev/null
@@ -1,5 +0,0 @@
-<!DOCTYPE html>
-<div style="overflow:auto; width:200px; position:absolute; height:200px;">
-<div style="position:absolute; width:300px; height:100%; background:green">
-</div>
-</div>
deleted file mode 100644
--- a/layout/reftests/percent-overflow-sizing/hScrollAbsHeightD.html
+++ /dev/null
@@ -1,6 +0,0 @@
-<!DOCTYPE html>
-<body onload="document.getElementById('a').style.height='100%';">
-<div style="overflow:auto; width:200px; position:absolute; height:200px;">
-<div id=a style="position:absolute; width:300px; background:green">
-</div>
-</div>
deleted file mode 100644
--- a/layout/reftests/percent-overflow-sizing/hScrollAbsHeightQuirks.html
+++ /dev/null
@@ -1,5 +0,0 @@
-<!DOCTYPE html>
-<div style="overflow:auto; width:200px; position:absolute; height:200px;">
-<div style="position:absolute; width:300px; height:100%; background:green">
-</div>
-</div>
deleted file mode 100644
--- a/layout/reftests/percent-overflow-sizing/hScrollAbsHeightQuirksD.html
+++ /dev/null
@@ -1,5 +0,0 @@
-<body onload="document.getElementById('a').style.height='100%';">
-<div style="overflow:auto; width:200px; position:absolute; height:200px;">
-<div id=a style="position:absolute; width:300px; background:green">
-</div>
-</div>
deleted file mode 100644
--- a/layout/reftests/percent-overflow-sizing/hScrollAbsMinHeightD.html
+++ /dev/null
@@ -1,6 +0,0 @@
-<!DOCTYPE html>
-<body onload="document.getElementById('a').style.minHeight='100%';">
-<div style="overflow:auto; width:200px; position:absolute; height:200px;">
-<div id=a style="position:absolute; width:300px; background:green">
-</div>
-</div>
deleted file mode 100644
--- a/layout/reftests/percent-overflow-sizing/hScrollAbsMinHeightQuirksD.html
+++ /dev/null
@@ -1,5 +0,0 @@
-<body onload="document.getElementById('a').style.minHeight='100%';">
-<div style="overflow:auto; width:200px; position:absolute; height:200px;">
-<div id=a style="position:absolute; width:300px; background:green">
-</div>
-</div>
deleted file mode 100644
--- a/layout/reftests/percent-overflow-sizing/hScrollSimpleHeight.html
+++ /dev/null
@@ -1,5 +0,0 @@
-<!DOCTYPE html>
-<div style="overflow:auto; width:200px; height:200px;">
-<div style="width:300px; height:100%; background:green">
-</div>
-</div>
deleted file mode 100644
--- a/layout/reftests/percent-overflow-sizing/hScrollSimpleHeightD.html
+++ /dev/null
@@ -1,6 +0,0 @@
-<!DOCTYPE html>
-<body onload="document.getElementById('a').style.height='100%';">
-<div style="overflow:auto; width:200px; height:200px;">
-<div id=a style="width:300px; background:green">
-</div>
-</div>
deleted file mode 100644
--- a/layout/reftests/percent-overflow-sizing/hScrollSimpleHeightQuirks-1.html
+++ /dev/null
@@ -1,4 +0,0 @@
-<div style="overflow:auto; width:200px; height:200px;">
-<div style="width:300px; height:100%; background:green">
-</div>
-</div>
deleted file mode 100644
--- a/layout/reftests/percent-overflow-sizing/hScrollSimpleHeightQuirks-1D.html
+++ /dev/null
@@ -1,5 +0,0 @@
-<body onload="document.getElementById('a').style.height='100%';">
-<div style="overflow:auto; width:200px; height:200px;">
-<div id=a style="width:300px; background:green">
-</div>
-</div>
deleted file mode 100644
--- a/layout/reftests/percent-overflow-sizing/hScrollSimpleHeightQuirks-2.html
+++ /dev/null
@@ -1,6 +0,0 @@
-<div style="overflow:auto; width:200px; height:200px;">
-<div>
-<div style="width:300px; height:100%; background:green">
-</div>
-</div>
-</div>
deleted file mode 100644
--- a/layout/reftests/percent-overflow-sizing/hScrollSimpleHeightQuirks-2D.html
+++ /dev/null
@@ -1,7 +0,0 @@
-<body onload="document.getElementById('a').style.height='100%';">
-<div style="overflow:auto; width:200px; height:200px;">
-<div>
-<div id=a style="width:300px; background:green">
-</div>
-</div>
-</div>
deleted file mode 100644
--- a/layout/reftests/percent-overflow-sizing/hScrollSimpleHeightQuirks-3.html
+++ /dev/null
@@ -1,8 +0,0 @@
-<div style="width:200px; height:200px; overflow:auto">
-<div>
-<table cellspacing=0 cellpadding=0 border=0 height="100%"><tr><td>
-<div style="width:300px; height:100%; background:green"><div style="height:1px"><!--Workaround for unrelated table bug--></div>
-</div>
-</table>
-</div>
-</div>
deleted file mode 100644
--- a/layout/reftests/percent-overflow-sizing/hScrollSimpleHeightQuirks-3D.html
+++ /dev/null
@@ -1,9 +0,0 @@
-<body onload="document.getElementById('a').style.height='100%';">
-<div style="width:200px; height:200px; overflow:auto">
-<div>
-<table id=a cellspacing=0 cellpadding=0 border=0 height="100%"><tr><td>
-<div style="width:300px; background:green; height:100%"><div style="height:1px"><!--Workaround for unrelated table bug--></div>
-</div>
-</table>
-</div>
-</div>
deleted file mode 100644
--- a/layout/reftests/percent-overflow-sizing/hScrollSimpleMinHeightD.html
+++ /dev/null
@@ -1,6 +0,0 @@
-<!DOCTYPE html>
-<body onload="document.getElementById('a').style.minHeight='100%';">
-<div style="overflow:auto; width:200px; height:200px;">
-<div id=a style="width:300px; background:green">
-</div>
-</div>
deleted file mode 100644
--- a/layout/reftests/percent-overflow-sizing/hScrollSimpleMinHeightQuirks-1D.html
+++ /dev/null
@@ -1,5 +0,0 @@
-<body onload="document.getElementById('a').style.minHeight='100%';">
-<div style="overflow:auto; width:200px; height:200px;">
-<div id=a style="width:300px; background:green">
-</div>
-</div>
deleted file mode 100644
--- a/layout/reftests/percent-overflow-sizing/hScrollSimpleMinHeightQuirks-3D.html
+++ /dev/null
@@ -1,9 +0,0 @@
-<body onload="document.getElementById('a').style.minHeight='100%';">
-<div style="width:200px; height:200px; overflow:auto">
-<div>
-<table id=a cellspacing=0 cellpadding=0 border=0 height="100%"><tr><td>
-<div style="width:300px; background:green; height:100%"><div style="height:1px"><!--Workaround for unrelated table bug--></div>
-</div>
-</table>
-</div>
-</div>
deleted file mode 100644
--- a/layout/reftests/percent-overflow-sizing/reftest.list
+++ /dev/null
@@ -1,23 +0,0 @@
-== simpleHeight100.html greenbox.html
-== simpleAbsHeight.html greenbox.html
-== hScrollSimpleHeight.html greenboxhbar.html
-== hScrollSimpleHeightQuirks-1.html greenboxhbar.html
-== hScrollSimpleHeightQuirks-2.html greenboxhbar.html
-== hScrollSimpleHeightQuirks-3.html greenboxhbar.html
-== hScrollAbsHeight.html greenboxhbar.html
-== hScrollAbsHeightQuirks.html greenboxhbar.html
-== simpleHeight100D.html greenbox.html
-== simpleAbsHeightD.html greenbox.html
-== hScrollSimpleHeightD.html greenboxhbar.html
-== hScrollSimpleHeightQuirks-1D.html greenboxhbar.html
-== hScrollSimpleHeightQuirks-2D.html greenboxhbar.html
-== hScrollSimpleHeightQuirks-3D.html greenboxhbar.html
-== hScrollAbsHeightD.html greenboxhbar.html
-== hScrollAbsHeightQuirksD.html greenboxhbar.html
-== simpleMinHeight100D.html greenbox.html
-== simpleAbsMinHeightD.html greenbox.html
-== hScrollSimpleMinHeightD.html greenboxhbar.html
-== hScrollSimpleMinHeightQuirks-1D.html greenboxhbar.html
-== hScrollSimpleMinHeightQuirks-3D.html greenboxhbar.html
-== hScrollAbsMinHeightD.html greenboxhbar.html
-== hScrollAbsMinHeightQuirksD.html greenboxhbar.html
deleted file mode 100644
--- a/layout/reftests/percent-overflow-sizing/simpleAbsHeight.html
+++ /dev/null
@@ -1,5 +0,0 @@
-<!DOCTYPE html>
-<div style="overflow:auto; height:200px; width:200px; position:relative">
-<div style="background: green; height:100%; width:100%; position:absolute">
-</div>
-</div>
deleted file mode 100644
--- a/layout/reftests/percent-overflow-sizing/simpleAbsHeightD.html
+++ /dev/null
@@ -1,6 +0,0 @@
-<!DOCTYPE html>
-<body onload="document.getElementById('a').style.height='100%';">
-<div style="overflow:auto; height:200px; width:200px; position:relative">
-<div id=a style="background: green; width:100%; position:absolute">
-</div>
-</div>
deleted file mode 100644
--- a/layout/reftests/percent-overflow-sizing/simpleAbsMinHeightD.html
+++ /dev/null
@@ -1,6 +0,0 @@
-<!DOCTYPE html>
-<body onload="document.getElementById('a').style.minHeight='100%'">
-<div style="overflow:auto; height:200px; width:200px; position:relative">
-<div id=a style="background: green; min-width:100%; position:absolute">
-</div>
-</div>
deleted file mode 100644
--- a/layout/reftests/percent-overflow-sizing/simpleHeight100.html
+++ /dev/null
@@ -1,5 +0,0 @@
-<!DOCTYPE html>
-<div style="overflow:auto; height:200px; width:200px">
-<div style="background: green; height:100%">
-</div>
-</div>
deleted file mode 100644
--- a/layout/reftests/percent-overflow-sizing/simpleHeight100D.html
+++ /dev/null
@@ -1,6 +0,0 @@
-<!DOCTYPE html>
-<body onload="document.getElementById('a').style.height='100%';">
-<div style="overflow:auto; height:200px; width:200px">
-<div id=a style="background: green;">
-</div>
-</div>
deleted file mode 100644
--- a/layout/reftests/percent-overflow-sizing/simpleMinHeight100D.html
+++ /dev/null
@@ -1,6 +0,0 @@
-<!DOCTYPE html>
-<body onload="document.getElementById('a').style.minHeight='100%';">
-<div style="overflow:auto; height:200px; width:200px">
-<div id=a style="background: green;">
-</div>
-</div>
--- a/layout/reftests/reftest.list
+++ b/layout/reftests/reftest.list
@@ -66,11 +66,8 @@ include columns/reftest.list
 # image-region/
 include image-region/reftest.list
 
 # block-inside-inline splits
 include ib-split/reftest.list
 
 # line-breaking
 include line-breaking/reftest.list
-
-include percent-overflow-sizing/reftest.list
-