Bug 1389010, part 8 - Stop abusing mAllBordersSameStyle in nsCSSBorderRenderer::DrawBorders to force drawing as separate parts. r=dholbert draft
authorJonathan Watt <jwatt@jwatt.org>
Thu, 10 Aug 2017 10:00:02 +0100
changeset 643947 009f3e8f3f62571582b6ce8bad33c504ecbdde37
parent 643946 df154ce75294ac89304e3a373ebcc0491ec92a8d
child 725451 ec96fb73c9592e6c5041560004bdc7c5727502ed
push id73266
push userjwatt@jwatt.org
push dateThu, 10 Aug 2017 09:00:54 +0000
reviewersdholbert
bugs1389010
milestone57.0a1
Bug 1389010, part 8 - Stop abusing mAllBordersSameStyle in nsCSSBorderRenderer::DrawBorders to force drawing as separate parts. r=dholbert MozReview-Commit-ID: 1xYiVTVTlbu
layout/painting/nsCSSRenderingBorders.cpp
--- a/layout/painting/nsCSSRenderingBorders.cpp
+++ b/layout/painting/nsCSSRenderingBorders.cpp
@@ -3362,19 +3362,18 @@ nsCSSBorderRenderer::DrawBorders()
 
   int dashedSides = 0;
 
   NS_FOR_CSS_SIDES(i) {
     uint8_t style = mBorderStyles[i];
     if (style == NS_STYLE_BORDER_STYLE_DASHED ||
         style == NS_STYLE_BORDER_STYLE_DOTTED)
     {
-      // pretend that all borders aren't the same; we need to draw
-      // things separately for dashed/dotting
-      mAllBordersSameStyle = false;
+      // we need to draw things separately for dashed/dotting
+      forceSeparateCorners = true;
       dashedSides |= (1 << i);
     }
   }
 
   PrintAsFormatString(" mAllBordersSameStyle: %d dashedSides: 0x%02x\n", mAllBordersSameStyle, dashedSides);
 
   if (mAllBordersSameStyle && !forceSeparateCorners) {
     /* Draw everything in one go */