Bug 1249913 - True overflow containers shouldn't have borders or background. r=dholbert
authorMats Palmgren <mats@mozilla.com>
Wed, 02 Mar 2016 23:39:34 +0100
changeset 322872 395e9c857e9042f862d89c622179c298031d8543
parent 322871 1607ef86164f06fc34fff378cdc4c1cd972305d8
child 322873 a46c9fc47597b83718b340d6430b4c927cd05d37
push id5913
push userjlund@mozilla.com
push dateMon, 25 Apr 2016 16:57:49 +0000
treeherdermozilla-beta@dcaf0a6fa115 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdholbert
bugs1249913
milestone47.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 1249913 - True overflow containers shouldn't have borders or background. r=dholbert
layout/base/nsCSSRendering.cpp
layout/generic/nsFrame.cpp
layout/reftests/css-break/reftest.list
--- a/layout/base/nsCSSRendering.cpp
+++ b/layout/base/nsCSSRendering.cpp
@@ -750,20 +750,23 @@ nsCSSRendering::PaintBorderWithStyleBord
         NSRectToSnappedRect(aBorderArea,
                             aForFrame->PresContext()->AppUnitsPerDevPixel(),
                             aDrawTarget));
       needToPopClip = true;
     }
   } else {
     MOZ_ASSERT(joinedBorderArea.IsEqualEdges(aBorderArea),
                "Should use aBorderArea for box-decoration-break:clone");
-    MOZ_ASSERT(aForFrame->GetSkipSides().IsEmpty(),
+    MOZ_ASSERT(aForFrame->GetSkipSides().IsEmpty() ||
+               IS_TRUE_OVERFLOW_CONTAINER(aForFrame),
                "Should not skip sides for box-decoration-break:clone except "
                "::first-letter/line continuations or other frame types that "
-               "don't have borders but those shouldn't reach this point.");
+               "don't have borders but those shouldn't reach this point. "
+               "Overflow containers do reach this point though.");
+    border.ApplySkipSides(aSkipSides);
   }
 
   // Convert to dev pixels.
   nscoord twipsPerPixel = aPresContext->DevPixelsToAppUnits(1);
   Rect joinedBorderAreaPx = NSRectToRect(joinedBorderArea, twipsPerPixel);
   Float borderWidths[4] = { Float(border.top / twipsPerPixel),
                             Float(border.right / twipsPerPixel),
                             Float(border.bottom / twipsPerPixel),
--- a/layout/generic/nsFrame.cpp
+++ b/layout/generic/nsFrame.cpp
@@ -1019,17 +1019,18 @@ nsIFrame::GetUsedPadding() const
   }
   return padding;
 }
 
 nsIFrame::Sides
 nsIFrame::GetSkipSides(const nsHTMLReflowState* aReflowState) const
 {
   if (MOZ_UNLIKELY(StyleBorder()->mBoxDecorationBreak ==
-                     NS_STYLE_BOX_DECORATION_BREAK_CLONE)) {
+                     NS_STYLE_BOX_DECORATION_BREAK_CLONE) &&
+      !(GetStateBits() & NS_FRAME_IS_OVERFLOW_CONTAINER)) {
     return Sides();
   }
 
   // Convert the logical skip sides to physical sides using the frame's
   // writing mode
   WritingMode writingMode = GetWritingMode();
   LogicalSides logicalSkip = GetLogicalSkipSides(aReflowState);
   Sides skip;
--- a/layout/reftests/css-break/reftest.list
+++ b/layout/reftests/css-break/reftest.list
@@ -4,9 +4,9 @@ default-preferences pref(layout.css.box-
 fuzzy(1,20) == box-decoration-break-with-inset-box-shadow-1.html box-decoration-break-with-inset-box-shadow-1-ref.html
 fuzzy(16,460) fuzzy-if(Android,10,3673) fuzzy-if(skiaContent,32,100) == box-decoration-break-with-outset-box-shadow-1.html box-decoration-break-with-outset-box-shadow-1-ref.html
 random-if(!gtkWidget) HTTP(..) == box-decoration-break-border-image.html box-decoration-break-border-image-ref.html
 == box-decoration-break-block-border-padding.html box-decoration-break-block-border-padding-ref.html
 == box-decoration-break-block-margin.html box-decoration-break-block-margin-ref.html
 fuzzy-if(!Android,1,5) fuzzy-if(Android,8,6627) fuzzy-if(skiaContent,1,24) == box-decoration-break-first-letter.html box-decoration-break-first-letter-ref.html
 == box-decoration-break-with-bidi.html box-decoration-break-with-bidi-ref.html
 == box-decoration-break-bug-1235152.html box-decoration-break-bug-1235152-ref.html
-!= box-decoration-break-bug-1249913.html box-decoration-break-bug-1249913-ref.html
+== box-decoration-break-bug-1249913.html box-decoration-break-bug-1249913-ref.html