Bug 1285658 - Part 2: Use less-erroneous value while calculating border corner dimensions. r=jrmuizel
authorTooru Fujisawa <arai_a@mac.com>
Sat, 16 Jul 2016 10:39:44 +0900
changeset 330244 e5e5a4c74d4c16883b2e478ea5196dc58837411c
parent 330243 46e298b95ec13cf4a9f20462089a6f552b3d2db9
child 330245 fcb08d92807912a6757b8af58ce05d7d5f1f75e0
push id9858
push userjlund@mozilla.com
push dateMon, 01 Aug 2016 14:37:10 +0000
treeherdermozilla-aurora@203106ef6cb6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjrmuizel
bugs1285658
milestone50.0a1
Bug 1285658 - Part 2: Use less-erroneous value while calculating border corner dimensions. r=jrmuizel
layout/base/nsCSSRenderingBorders.cpp
layout/reftests/border-dotted/border-dashed-radius-zoom-filled-mask.png
layout/reftests/border-dotted/border-dashed-radius-zoom-unfilled-mask.png
layout/reftests/border-dotted/border-dashed-radius-zoom.html
layout/reftests/border-dotted/masked-zoom.html
layout/reftests/border-dotted/reftest.list
--- a/layout/base/nsCSSRenderingBorders.cpp
+++ b/layout/base/nsCSSRenderingBorders.cpp
@@ -54,18 +54,17 @@ using namespace mozilla::gfx;
  *         |- for each side adjacent to corner
  *            |- clip to GetSideClipSubPath
  *            |- DrawBorderSides with one side
  *      |- for each side
  *         |- GetSideClipWithoutCornersRect
  *         |- DrawDashedOrDottedSide || DrawBorderSides with one side
  */
 
-static void ComputeBorderCornerDimensions(const Rect& aOuterRect,
-                                          const Rect& aInnerRect,
+static void ComputeBorderCornerDimensions(const Float* aBorderWidths,
                                           const RectCornerRadii& aRadii,
                                           RectCornerRadii *aDimsResult);
 
 // given a side index, get the previous and next side index
 #define NEXT_SIDE(_s) mozilla::css::Side(((_s) + 1) & 3)
 #define PREV_SIDE(_s) mozilla::css::Side(((_s) + 3) & 3)
 
 // given a corner index, get the previous and next corner index
@@ -197,17 +196,17 @@ nsCSSBorderRenderer::nsCSSBorderRenderer
 
   mInnerRect = mOuterRect;
   mInnerRect.Deflate(
       Margin(mBorderStyles[0] != NS_STYLE_BORDER_STYLE_NONE ? mBorderWidths[0] : 0,
              mBorderStyles[1] != NS_STYLE_BORDER_STYLE_NONE ? mBorderWidths[1] : 0,
              mBorderStyles[2] != NS_STYLE_BORDER_STYLE_NONE ? mBorderWidths[2] : 0,
              mBorderStyles[3] != NS_STYLE_BORDER_STYLE_NONE ? mBorderWidths[3] : 0));
 
-  ComputeBorderCornerDimensions(mOuterRect, mInnerRect,
+  ComputeBorderCornerDimensions(mBorderWidths,
                                 mBorderRadii, &mBorderCornerDimensions);
 
   mOneUnitBorder = CheckFourFloatsEqual(mBorderWidths, 1.0);
   mNoBorderRadius = AllCornersZeroSize(mBorderRadii);
   mAvoidStroke = false;
 }
 
 /* static */ void
@@ -258,25 +257,24 @@ nsCSSBorderRenderer::ComputeOuterRadii(c
 
   if (aRadii[C_BL].width > 0.f && aRadii[C_BL].height > 0.f) {
     oRadii[C_BL].width = std::max(0.f, aRadii[C_BL].width + aBorderSizes[NS_SIDE_LEFT]);
     oRadii[C_BL].height = std::max(0.f, aRadii[C_BL].height + aBorderSizes[NS_SIDE_BOTTOM]);
   }
 }
 
 /*static*/ void
-ComputeBorderCornerDimensions(const Rect& aOuterRect,
-                              const Rect& aInnerRect,
+ComputeBorderCornerDimensions(const Float* aBorderWidths,
                               const RectCornerRadii& aRadii,
                               RectCornerRadii* aDimsRet)
 {
-  Float leftWidth = aInnerRect.X() - aOuterRect.X();
-  Float topWidth = aInnerRect.Y() - aOuterRect.Y();
-  Float rightWidth = aOuterRect.Width() - aInnerRect.Width() - leftWidth;
-  Float bottomWidth = aOuterRect.Height() - aInnerRect.Height() - topWidth;
+  Float leftWidth = aBorderWidths[NS_SIDE_LEFT];
+  Float topWidth = aBorderWidths[NS_SIDE_TOP];
+  Float rightWidth = aBorderWidths[NS_SIDE_RIGHT];
+  Float bottomWidth = aBorderWidths[NS_SIDE_BOTTOM];
 
   if (AllCornersZeroSize(aRadii)) {
     // These will always be in pixel units from CSS
     (*aDimsRet)[C_TL] = Size(leftWidth, topWidth);
     (*aDimsRet)[C_TR] = Size(rightWidth, topWidth);
     (*aDimsRet)[C_BR] = Size(rightWidth, bottomWidth);
     (*aDimsRet)[C_BL] = Size(leftWidth, bottomWidth);
   } else {
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..7773c0d651ca524ad86c2b695ce08d73bc713466
GIT binary patch
literal 9717
zc%1E8dsGwWwjZ>L)mE%8)MKGtp85a<Tk0c15>KtDiHabJBG1-iqM)Lp1`-lLTe*sr
zS_z0iA_qs_paw)9Ay}naz>E$ef|?)-VMGXzftZAl^G&3!*lVqAZ*NzZe*o*-@8ACR
zuzwRcxMuaTw?|GH2|>`?E0%xi20=sS5?>>R1Ih7D*FXq*4_fi*zubcp+iu;-X<c}3
zo2$|2BJN%@X4kr=n_r$wzc?a)bY9%$a}LXoR_j73Vxu{<W@RV@g}Zi|L6CE~IRs6b
zU=2Zj?yn#W_gtdxTVOQA8%2VCVPDNvS&uqQudY@lA1cmv@{F8!3Muz*9J+WNPpb*&
z*DuiRnZRy8a{wnDN>bv`ni?i|v=idkn&{f2b<BF7Uus3J#LP~f$i}AzmvU<7+Xe(9
zQ<!6{Asg-NxkE)g1+6C-&ssvk@~R9(`Pti8cTbDQY73}L!eWH<jt*EZ&b)%`<U){W
zUS@@avwn%ri!3-&J+#c9GODVq9(?PFnzwuXl{-=`={xgqVd%u;5mSH^3Y=&SF*`l{
zhWis4OBkWh`ity{$!VCR?5z&xmp5fB2(s8kJd72-;D0P27d;3f<xf0rRuuK)=}_p5
zz9tYZu6ZSp>3~e#q3z@tlxRRos&Nh(!AdZ*h7}-2!@Cq}e~yfnd(^6zhU{6y0f3IY
zD-?ZIe}snYUBm;&-Xx(Yx?WC0I15cjLTg267jj<l7+e8x2FD@Mr5kf`UCaG6d~0M-
zs(JW~t+1-W`+TXP&j;(damfSI?p1+KyWFNB7mK&@^;#*~ni45NyW8Y^&ROhYN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w;Z|sBdhx<Zj*@@n7d(=6V1C
new file mode 100644
--- /dev/null
+++ b/layout/reftests/border-dotted/border-dashed-radius-zoom.html
@@ -0,0 +1,82 @@
+<!DOCTYPE HTML>
+<html reftest-zoom="1.3300000429153442">
+  <head>
+    <meta charset="utf-8">
+    <title>dashed border with radius</title>
+    <style>
+.box {
+  position: relative;
+  width: 420px;
+  height: 420px;
+}
+.mask {
+  position: absolute;
+  top: 0px;
+  left: 0px;
+  width: 420px;
+  height: 420px;
+}
+
+table {
+  border-collapse: separate;
+  border-spacing: 10px;
+  empty-cells: show;
+}
+td {
+  border-style: dashed;
+  border-radius: 24px;
+  border-color: black;
+  height: 120px;
+  width: 120px;
+  box-sizing: border-box;
+}
+
+.A {
+  border-width: 1px;
+}
+.B {
+  border-width: 2px;
+}
+.C {
+  border-width: 6px;
+}
+.D {
+  border-width: 8px;
+}
+.E {
+  border-width: 16px;
+}
+.F {
+  border-width: 24px;
+}
+.G {
+  border-width: 32px;
+}
+.H {
+  border-width: 48px;
+}
+.I {
+  border-width: 60px;
+}
+    </style>
+  </head>
+  <body>
+    <div class="box">
+      <table>
+        <tr><td class="A"></td><td class="B"></td><td class="C"></td></tr>
+        <tr><td class="D"></td><td class="E"></td><td class="F"></td></tr>
+        <tr><td class="G"></td><td class="H"></td><td class="I"></td></tr>
+      </table>
+      <img class="mask" src="border-dashed-radius-zoom-filled-mask.png">
+    </div>
+    <div class="box">
+      <table>
+        <tr><td class="A"></td><td class="B"></td><td class="C"></td></tr>
+        <tr><td class="D"></td><td class="E"></td><td class="F"></td></tr>
+        <tr><td class="G"></td><td class="H"></td><td class="I"></td></tr>
+      </table>
+      <img class="mask" src="border-dashed-radius-zoom-unfilled-mask.png">
+    </div>
+  </body>
+</html>
+
new file mode 100644
--- /dev/null
+++ b/layout/reftests/border-dotted/masked-zoom.html
@@ -0,0 +1,21 @@
+<!DOCTYPE HTML>
+<html reftest-zoom="1.3300000429153442">
+  <head>
+    <meta charset="utf-8">
+    <title>Correctly masked page</title>
+    <style>
+.box {
+  position: relative;
+  width: 420px;
+  height: 420px;
+}
+    </style>
+  </head>
+  <body>
+    <div class="box" style="background-color: black;">
+    </div>
+    <div class="box" style="background-color: white;">
+    </div>
+  </body>
+</html>
+
--- a/layout/reftests/border-dotted/reftest.list
+++ b/layout/reftests/border-dotted/reftest.list
@@ -4,8 +4,9 @@
 # so difference less than 80 is ignorable.
 fuzzy(80,1500) == border-dotted-interaction.html masked.html
 fuzzy(80,1500) == border-dotted-no-radius.html masked.html
 fuzzy(80,1500) == border-dotted-radius.html masked.html
 fuzzy(80,1500) == border-dashed-no-radius.html masked.html
 fuzzy(80,1500) == border-dashed-radius.html masked.html
 fuzzy(80,1500) == border-mixed.html masked.html
 fuzzy(80,1500) == border-dashed-non-integer.html masked.html
+fuzzy(80,1500) == border-dashed-radius-zoom.html masked-zoom.html