Title: [167659] trunk
Revision
167659
Author
za...@apple.com
Date
2014-04-22 07:17:43 -0700 (Tue, 22 Apr 2014)

Log Message

border-style: double rendered as solid when combined with border-radius
https://bugs.webkit.org/show_bug.cgi?id=131927

Reviewed by Simon Fraser.

BorderEdge::getDoubleBorderStripeWidths() should return the calculated inner, outer border widths.

Source/WebCore:
Test: fast/borders/hidpi-double-border-with-border-radius-always-produce-solid-line.html

* rendering/BorderEdge.cpp:
(WebCore::BorderEdge::getDoubleBorderStripeWidths):
* rendering/BorderEdge.h:

LayoutTests:
* fast/borders/hidpi-double-border-with-border-radius-always-produce-solid-line-expected.html: Added.
* fast/borders/hidpi-double-border-with-border-radius-always-produce-solid-line.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (167658 => 167659)


--- trunk/LayoutTests/ChangeLog	2014-04-22 14:06:36 UTC (rev 167658)
+++ trunk/LayoutTests/ChangeLog	2014-04-22 14:17:43 UTC (rev 167659)
@@ -1,3 +1,15 @@
+2014-04-22  Zalan Bujtas  <za...@apple.com>
+
+        border-style: double rendered as solid when combined with border-radius
+        https://bugs.webkit.org/show_bug.cgi?id=131927
+
+        Reviewed by Simon Fraser.
+
+        BorderEdge::getDoubleBorderStripeWidths() should return the calculated inner, outer border widths. 
+
+        * fast/borders/hidpi-double-border-with-border-radius-always-produce-solid-line-expected.html: Added.
+        * fast/borders/hidpi-double-border-with-border-radius-always-produce-solid-line.html: Added.
+
 2014-04-22  Manuel Rego Casasnovas  <r...@igalia.com>
 
         Unreviewed gardening.

Added: trunk/LayoutTests/fast/borders/hidpi-double-border-with-border-radius-always-produce-solid-line-expected.html (0 => 167659)


--- trunk/LayoutTests/fast/borders/hidpi-double-border-with-border-radius-always-produce-solid-line-expected.html	                        (rev 0)
+++ trunk/LayoutTests/fast/borders/hidpi-double-border-with-border-radius-always-produce-solid-line-expected.html	2014-04-22 14:17:43 UTC (rev 167659)
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>This tests if double borders with radius paint doubles instead of solid single borders.</title>
+<style>
+  div {
+    border-style: solid;
+    border-color: red;
+  }
+</style>
+</head>
+<body>
+  <div style="width: 20px; height: 20px; border-width: 0.5px; border-radius: 1px"></div></br>
+  <div style="width: 20px; height: 20px; border-width: 1px; border-radius: 5px"></div></br>
+  <div style="width: 20px; height: 20px; border-width: 1px; position: fixed; top: 89px; left: 10px"></div></br>
+  <div style="width: 20px; height: 20px; border-width: 1px; position: fixed; top: 133.5px; left: 10.5px"></div></br>
+  <div style="width: 20px; height: 20px; border-width: 1px; position: fixed; top: 179px; left: 11px"></div></br>
+</body>
+</html>
\ No newline at end of file

Added: trunk/LayoutTests/fast/borders/hidpi-double-border-with-border-radius-always-produce-solid-line.html (0 => 167659)


--- trunk/LayoutTests/fast/borders/hidpi-double-border-with-border-radius-always-produce-solid-line.html	                        (rev 0)
+++ trunk/LayoutTests/fast/borders/hidpi-double-border-with-border-radius-always-produce-solid-line.html	2014-04-22 14:17:43 UTC (rev 167659)
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>This tests if double borders with radius paint doubles instead of solid single borders.</title>
+<style>
+  .outer {
+    width: 20px;
+    height: 20px;
+    border-style: double;
+    border-color: red;
+  }
+  
+  .cover {
+    border: solid white 1px; 
+    position: relative;
+  }
+</style>
+</head>
+<body>
+  <div class=outer style="border-width: 0.5px; border-radius: 1px"></div></br>
+  <div class=outer style="border-width: 1px; border-radius: 5px"></div></br>
+  <div class=outer style="border-width: 3px; border-radius: 1px"><div class=cover style=" top: -3px; left: -3px; width: 24px; height: 24px;"></div></div></br>
+  <div class=outer style="border-width: 3.5px; border-radius: 1px"><div class=cover style="top: -3.5px; left: -3.5px; width: 25px; height: 25px;"></div></div></br>
+  <div class=outer style="border-width: 4px; border-radius: 2px"><div class=cover style="border-width: 3px; top: -4px; left: -4px; width: 22px; height: 22px;"></div></div></br>
+</body>
+</html>
\ No newline at end of file

Modified: trunk/Source/WebCore/ChangeLog (167658 => 167659)


--- trunk/Source/WebCore/ChangeLog	2014-04-22 14:06:36 UTC (rev 167658)
+++ trunk/Source/WebCore/ChangeLog	2014-04-22 14:17:43 UTC (rev 167659)
@@ -1,3 +1,18 @@
+2014-04-22  Zalan Bujtas  <za...@apple.com>
+
+        border-style: double rendered as solid when combined with border-radius
+        https://bugs.webkit.org/show_bug.cgi?id=131927
+
+        Reviewed by Simon Fraser.
+
+        BorderEdge::getDoubleBorderStripeWidths() should return the calculated inner, outer border widths. 
+
+        Test: fast/borders/hidpi-double-border-with-border-radius-always-produce-solid-line.html
+
+        * rendering/BorderEdge.cpp:
+        (WebCore::BorderEdge::getDoubleBorderStripeWidths):
+        * rendering/BorderEdge.h:
+
 2014-04-22  Eric Carlson  <eric.carl...@apple.com>
 
         [Mac] don't ask for AVAssetTrack properties before they are available

Modified: trunk/Source/WebCore/rendering/BorderEdge.cpp (167658 => 167659)


--- trunk/Source/WebCore/rendering/BorderEdge.cpp	2014-04-22 14:06:36 UTC (rev 167658)
+++ trunk/Source/WebCore/rendering/BorderEdge.cpp	2014-04-22 14:17:43 UTC (rev 167659)
@@ -95,7 +95,7 @@
     return true;
 }
 
-void BorderEdge::getDoubleBorderStripeWidths(LayoutUnit outerWidth, LayoutUnit innerWidth) const
+void BorderEdge::getDoubleBorderStripeWidths(LayoutUnit& outerWidth, LayoutUnit& innerWidth) const
 {
     LayoutUnit fullWidth = widthForPainting();
     innerWidth = ceilToDevicePixel(fullWidth * 2 / 3, m_devicePixelRatio);

Modified: trunk/Source/WebCore/rendering/BorderEdge.h (167658 => 167659)


--- trunk/Source/WebCore/rendering/BorderEdge.h	2014-04-22 14:06:36 UTC (rev 167658)
+++ trunk/Source/WebCore/rendering/BorderEdge.h	2014-04-22 14:17:43 UTC (rev 167659)
@@ -59,7 +59,7 @@
     inline bool shouldRender() const { return m_isPresent && widthForPainting() && hasVisibleColorAndStyle(); }
     inline bool presentButInvisible() const { return widthForPainting() && !hasVisibleColorAndStyle(); }
     inline float widthForPainting() const { return m_isPresent ?  m_flooredToDevicePixelWidth : 0; }
-    void getDoubleBorderStripeWidths(LayoutUnit outerWidth, LayoutUnit innerWidth) const;
+    void getDoubleBorderStripeWidths(LayoutUnit& outerWidth, LayoutUnit& innerWidth) const;
     bool obscuresBackgroundEdge(float scale) const;
     bool obscuresBackground() const;
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to