Diff
Modified: trunk/LayoutTests/ChangeLog (235867 => 235868)
--- trunk/LayoutTests/ChangeLog 2018-09-10 22:17:58 UTC (rev 235867)
+++ trunk/LayoutTests/ChangeLog 2018-09-10 22:23:05 UTC (rev 235868)
@@ -1,3 +1,21 @@
+2018-09-10 Megan Gardner <[email protected]>
+
+ Correctly interpret from angle for conic gradients
+ https://bugs.webkit.org/show_bug.cgi?id=189445
+ <rdar://problem/44158271>
+
+ Reviewed by Tim Horton.
+
+ Adding a test for a conic gradient that starts at an angle.
+ Cover the edges because triangles and conic gradients aren't rendered
+ exactly the same.
+
+ * TestExpectations:
+ * fast/gradients/conic-from-angle-expected.html: Added.
+ * fast/gradients/conic-from-angle.html: Added.
+ * platform/ios-12/TestExpectations:
+ * platform/mac/TestExpectations:
+
2018-09-10 James Savage <[email protected]>
Expose -apple-system-container-border color to internal web views.
Modified: trunk/LayoutTests/TestExpectations (235867 => 235868)
--- trunk/LayoutTests/TestExpectations 2018-09-10 22:17:58 UTC (rev 235867)
+++ trunk/LayoutTests/TestExpectations 2018-09-10 22:23:05 UTC (rev 235868)
@@ -2242,3 +2242,4 @@
fast/gradients/conic-off-center.html [ Skip ]
fast/gradients/conic-center-outside-box.html [ Skip ]
fast/gradients/conic-extended-stops.html [ Skip ]
+fast/gradients/conic-from-angle.html [ Skip ]
Added: trunk/LayoutTests/fast/gradients/conic-from-angle-expected.html (0 => 235868)
--- trunk/LayoutTests/fast/gradients/conic-from-angle-expected.html (rev 0)
+++ trunk/LayoutTests/fast/gradients/conic-from-angle-expected.html 2018-09-10 22:23:05 UTC (rev 235868)
@@ -0,0 +1,44 @@
+<html>
+<head>
+ <style>
+ div {
+ width: 200px;
+ height: 200px;
+ }
+ #top {
+ width: 0;
+ height: 0;
+ border-left: 100px solid green;
+ border-right: 100px solid blue;
+ border-top: 100px solid yellow;
+ }
+ #bottom {
+ width: 0;
+ height: 0;
+ border-left: 100px solid green;
+ border-right: 100px solid blue;
+ border-bottom: 100px solid orange;
+ }
+ .box {
+ position: absolute;
+ }
+ .x {
+ position: absolute;
+ -webkit-clip-path: polygon(0% 0%, 0% 5%, 45% 50%, 0% 95%, 0% 100%, 5% 100%, 50% 55%, 95% 100%, 100% 100%, 100% 95%, 55% 50%, 100% 5%, 100% 0%, 95% 0%, 50% 45%, 5% 0%);
+ }
+ #x {
+ background-color:black;
+ }
+
+ </style>
+</head>
+<body>
+ <div>
+ <div class="box">
+ <div id="top"></div>
+ <div id="bottom"></div>
+ </div>
+ <div id="x" class="x"></div>
+ </div>
+</body>
+</html>
Added: trunk/LayoutTests/fast/gradients/conic-from-angle.html (0 => 235868)
--- trunk/LayoutTests/fast/gradients/conic-from-angle.html (rev 0)
+++ trunk/LayoutTests/fast/gradients/conic-from-angle.html 2018-09-10 22:23:05 UTC (rev 235868)
@@ -0,0 +1,32 @@
+<html>
+<head>
+ <style>
+ div {
+ width: 200px;
+ height: 200px;
+ }
+ #grad {
+ position: absolute;
+ background: conic-gradient(from 45deg,
+ blue 0deg, blue 90deg,
+ orange 0deg, orange 180deg,
+ green 0deg, green 270deg,
+ yellow 0deg, yellow 360deg);
+ }
+ .x {
+ position: absolute;
+ -webkit-clip-path: polygon(0% 0%, 0% 5%, 45% 50%, 0% 95%, 0% 100%, 5% 100%, 50% 55%, 95% 100%, 100% 100%, 100% 95%, 55% 50%, 100% 5%, 100% 0%, 95% 0%, 50% 45%, 5% 0%);
+ }
+ #x {
+ background-color:black;
+ }
+
+ </style>
+</head>
+<body>
+ <div>
+ <div id="grad"></div>
+ <div id="x" class="x"></div>
+ </div>
+</body>
+</html>
\ No newline at end of file
Modified: trunk/LayoutTests/platform/ios-12/TestExpectations (235867 => 235868)
--- trunk/LayoutTests/platform/ios-12/TestExpectations 2018-09-10 22:17:58 UTC (rev 235867)
+++ trunk/LayoutTests/platform/ios-12/TestExpectations 2018-09-10 22:23:05 UTC (rev 235868)
@@ -31,4 +31,5 @@
fast/gradients/conic.html [ Pass ]
fast/gradients/conic-off-center.html [ Pass ]
fast/gradients/conic-center-outside-box.html [ Pass ]
-fast/gradients/conic-extended-stops.html [ Pass ]
\ No newline at end of file
+fast/gradients/conic-extended-stops.html [ Pass ]
+fast/gradients/conic-from-angle.html [ Pass ]
\ No newline at end of file
Modified: trunk/LayoutTests/platform/mac/TestExpectations (235867 => 235868)
--- trunk/LayoutTests/platform/mac/TestExpectations 2018-09-10 22:17:58 UTC (rev 235867)
+++ trunk/LayoutTests/platform/mac/TestExpectations 2018-09-10 22:23:05 UTC (rev 235868)
@@ -1763,4 +1763,5 @@
[ Mojave+ ] fast/gradients/conic-off-center.html [ Pass ]
[ Mojave+ ] fast/gradients/conic-center-outside-box.html [ Pass ]
[ Mojave+ ] fast/gradients/conic-extended-stops.html [ Pass ]
+[ Mojave+ ] fast/gradients/conic-from-angle.html [ Pass ]
Modified: trunk/Source/WebCore/ChangeLog (235867 => 235868)
--- trunk/Source/WebCore/ChangeLog 2018-09-10 22:17:58 UTC (rev 235867)
+++ trunk/Source/WebCore/ChangeLog 2018-09-10 22:23:05 UTC (rev 235868)
@@ -1,3 +1,18 @@
+2018-09-10 Megan Gardner <[email protected]>
+
+ Correctly interpret from angle for conic gradients
+ https://bugs.webkit.org/show_bug.cgi?id=189445
+ <rdar://problem/44158271>
+
+ Reviewed by Tim Horton.
+
+ Test: fast/gradients/conic-from-angle.html
+
+ We were pulling the angle as degrees when we really need radians.
+
+ * css/CSSGradientValue.cpp:
+ (WebCore::CSSConicGradientValue::createGradient):
+
2018-09-10 James Savage <[email protected]>
Expose -apple-system-container-border color to internal web views.
Modified: trunk/Source/WebCore/css/CSSGradientValue.cpp (235867 => 235868)
--- trunk/Source/WebCore/css/CSSGradientValue.cpp 2018-09-10 22:17:58 UTC (rev 235867)
+++ trunk/Source/WebCore/css/CSSGradientValue.cpp 2018-09-10 22:23:05 UTC (rev 235868)
@@ -1436,7 +1436,7 @@
float angle = 0;
if (m_angle)
- angle = m_angle->floatValue(CSSPrimitiveValue::CSS_DEG);
+ angle = m_angle->floatValue(CSSPrimitiveValue::CSS_RAD);
Gradient::ConicData data { centerPoint, angle };
ConicGradientAdapter adapter;