Bug 1415203 - Don't refuse to create WebRender commands due to -moz-border-*-colors on border sides that don't have a border. r=jrmuizel
authorMarkus Stange <mstange@themasta.com>
Tue, 14 Nov 2017 15:47:53 -0500
changeset 443533 69206021220625e9d7470fd16b0f1585ee7781c2
parent 443532 0855fc7ce11e2ae83c6eaab45c5dc8b69192d1f8
child 443534 d7af7d6aba30621a9c07b103a9ec25e5e6b576a3
push id8527
push userCallek@gmail.com
push dateThu, 11 Jan 2018 21:05:50 +0000
treeherdermozilla-beta@95342d212a7a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjrmuizel
bugs1415203
milestone59.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 1415203 - Don't refuse to create WebRender commands due to -moz-border-*-colors on border sides that don't have a border. r=jrmuizel MozReview-Commit-ID: DPQQgds3GOk
layout/painting/nsCSSRenderingBorders.cpp
--- a/layout/painting/nsCSSRenderingBorders.cpp
+++ b/layout/painting/nsCSSRenderingBorders.cpp
@@ -3583,17 +3583,20 @@ nsCSSBorderRenderer::DrawBorders()
     }
   }
 }
 
 bool
 nsCSSBorderRenderer::CanCreateWebRenderCommands()
 {
   NS_FOR_CSS_SIDES(i) {
-    if (mCompositeColors[i] != nullptr) {
+    if (mCompositeColors[i] != nullptr &&
+        mBorderWidths[i] > 0.0f &&
+        mBorderStyles[i] != NS_STYLE_BORDER_STYLE_HIDDEN &&
+        mBorderStyles[i] != NS_STYLE_BORDER_STYLE_NONE) {
       return false;
     }
   }
 
   return true;
 }
 
 void