Bug 1409243 - Enable dotted and dashed border support for webrender; r?ethlin draft
authorKevin Chen <kechen@mozilla.com>
Wed, 25 Oct 2017 10:17:41 +0800
changeset 691866 3e544f192e88f14dc21734af59acbbea68d9a456
parent 691808 a0334f789772302ba5cfb6fd61290408842c7432
child 738607 3726b733f7ecd85550da72477f29ea4e20bf3eba
push id87336
push userbmo:kechen@mozilla.com
push dateThu, 02 Nov 2017 05:24:53 +0000
reviewersethlin
bugs1409243
milestone58.0a1
Bug 1409243 - Enable dotted and dashed border support for webrender; r?ethlin MozReview-Commit-ID: 4TGeavMJY2Q
layout/generic/crashtests/crashtests.list
layout/painting/nsCSSRenderingBorders.cpp
layout/reftests/border-dotted/reftest.list
layout/reftests/css-break/reftest.list
--- a/layout/generic/crashtests/crashtests.list
+++ b/layout/generic/crashtests/crashtests.list
@@ -642,20 +642,20 @@ load 1234701-1.html
 load 1234701-2.html
 load 1271765.html
 asserts(2) asserts-if(stylo&&Android,1) load 1272983-1.html # bug 586628
 asserts(2) asserts-if(stylo&&Android,1) load 1272983-2.html # bug 586628
 load 1275059.html
 load 1278007.html
 load 1278080.html
 load 1279814.html
-load large-border-radius-dashed.html
-load large-border-radius-dashed2.html
-load large-border-radius-dotted.html
-load large-border-radius-dotted2.html
+skip-if(webrender) load large-border-radius-dashed.html # see bug 1409243, not handled by webrender
+skip-if(webrender) load large-border-radius-dashed2.html # see bug 1409243, not handled by webrender
+skip-if(webrender) load large-border-radius-dotted.html # see bug 1409243, not handled by webrender
+skip-if(webrender) load large-border-radius-dotted2.html # see bug 1409243, not handled by webrender
 load 1278461-1.html
 load 1278461-2.html
 load 1281102.html
 load 1297427-non-equal-centers.html
 load 1304441.html
 load 1308876-1.html
 load 1316649.html
 load 1349650.html
--- a/layout/painting/nsCSSRenderingBorders.cpp
+++ b/layout/painting/nsCSSRenderingBorders.cpp
@@ -3586,21 +3586,16 @@ nsCSSBorderRenderer::DrawBorders()
 
 bool
 nsCSSBorderRenderer::CanCreateWebRenderCommands()
 {
   NS_FOR_CSS_SIDES(i) {
     if (mCompositeColors[i] != nullptr) {
       return false;
     }
-
-    if (mBorderStyles[i] == NS_STYLE_BORDER_STYLE_DOTTED ||
-        mBorderStyles[i] == NS_STYLE_BORDER_STYLE_DASHED) {
-      return false;
-    }
   }
 
   return true;
 }
 
 void
 nsCSSBorderRenderer::CreateWebRenderCommands(nsDisplayItem* aItem,
                                              wr::DisplayListBuilder& aBuilder,
--- a/layout/reftests/border-dotted/reftest.list
+++ b/layout/reftests/border-dotted/reftest.list
@@ -1,16 +1,16 @@
 # Composing dotted/dashed border rendering and not-filled or not-unfilled mask
 # matches to full-filled box, using fuzzyy because of anti-aliasing.
 # These check filled and unfilled regions with solid opaque color,
 # so difference less than 80 is ignorable.
 
 # XXX: We mark fails-if to these tests for now to enable styled border in WR.
 # We should remove them after Bug 1399485 is fixed.
-fuzzy(80,1500) == border-dotted-interaction.html masked.html
-fuzzy(80,1500) == border-dotted-no-radius.html masked.html
+fuzzy(80,1500) fails-if(webrender) == border-dotted-interaction.html masked.html
+fuzzy(80,1500) fails-if(webrender) == border-dotted-no-radius.html masked.html
 fuzzy(80,1500) fails-if(webrender) == border-dotted-radius.html masked.html
-fuzzy(80,1500) == border-dashed-no-radius.html masked.html
+fuzzy(80,1500) fails-if(webrender) == border-dashed-no-radius.html masked.html
 fuzzy(80,1500) fails-if(webrender) == border-dashed-radius.html masked.html
 fuzzy(80,1500) fails-if(webrender) == border-mixed.html masked.html
 fuzzy(80,1500) fails-if(webrender) == border-dashed-non-integer.html masked.html
 fuzzy(80,1500) fails-if(webrender) == border-dashed-radius-zoom.html masked-zoom.html
-fuzzy(80,1500) == border-dotted-radius-zero.html masked-small.html
+fuzzy(80,1500) fails-if(webrender) == border-dotted-radius-zero.html masked-small.html
--- a/layout/reftests/css-break/reftest.list
+++ b/layout/reftests/css-break/reftest.list
@@ -1,12 +1,12 @@
 default-preferences pref(layout.css.box-decoration-break.enabled,true)
 
 == box-decoration-break-1.html box-decoration-break-1-ref.html
-fuzzy(1,20) fuzzy-if(skiaContent,1,700) fuzzy-if(webrender,4-4,292-292) == box-decoration-break-with-inset-box-shadow-1.html box-decoration-break-with-inset-box-shadow-1-ref.html
+fuzzy(1,20) fuzzy-if(skiaContent,1,700) fuzzy-if(webrender,6-6,250-250) == box-decoration-break-with-inset-box-shadow-1.html box-decoration-break-with-inset-box-shadow-1-ref.html
 fuzzy(45,460) fuzzy-if(skiaContent,57,439) fuzzy-if(Android,57,1330) fuzzy-if(styloVsGecko,45,1410) == box-decoration-break-with-outset-box-shadow-1.html box-decoration-break-with-outset-box-shadow-1-ref.html # Bug 1386543
 random-if(!gtkWidget) == 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,62) fuzzy-if(Android,8,6627) == box-decoration-break-first-letter.html box-decoration-break-first-letter-ref.html #Bug 1313773
 == 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