WebKit Bugzilla
Attachment 349224 Details for
Bug 189445
: Correctly interpret from angle for conic gradients
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-189445-20180907181216.patch (text/plain), 6.89 KB, created by
Megan Gardner
on 2018-09-07 18:12:16 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Megan Gardner
Created:
2018-09-07 18:12:16 PDT
Size:
6.89 KB
patch
obsolete
>Subversion Revision: 235820 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index fa54b48d52cddd8bb5e83167fa67d65fc7ef4cf4..7c8af052abb20fd0e8b4ef2f300335e41295630b 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,18 @@ >+2018-09-07 Megan Gardner <megan_gardner@apple.com> >+ >+ 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-07 Fujii Hironori <Hironori.Fujii@sony.com> > > [Win][Clang] duplicated variable name `advance` in UniscribeController::shapeAndPlaceItem >diff --git a/Source/WebCore/css/CSSGradientValue.cpp b/Source/WebCore/css/CSSGradientValue.cpp >index 8eb338bb660a1e2fdb083dae5d33a25e34d0e396..385ae32367d68e55d368f40a0a39a817b1241219 100644 >--- a/Source/WebCore/css/CSSGradientValue.cpp >+++ b/Source/WebCore/css/CSSGradientValue.cpp >@@ -1436,7 +1436,7 @@ Ref<Gradient> CSSConicGradientValue::createGradient(RenderElement& renderer, con > > 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; >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index 7819ddd72747569b0a48e919b5dc70373f579979..14bca8d274cf237ce1861ff400539e0d23a6ecf2 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,21 @@ >+2018-09-07 Megan Gardner <megan_gardner@apple.com> >+ >+ 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-07 Youenn Fablet <youenn@apple.com> > > Tests checking document GC in case of ActiveDOMObjects are flaky >diff --git a/LayoutTests/TestExpectations b/LayoutTests/TestExpectations >index cb40aa5c31dbc51b4c83369fa00cd24f5e418cc5..a081bb2e9ce49849389c2751d0c28caa27f93a02 100644 >--- a/LayoutTests/TestExpectations >+++ b/LayoutTests/TestExpectations >@@ -2242,3 +2242,4 @@ fast/gradients/conic.html [ Skip ] > 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 ] >diff --git a/LayoutTests/fast/gradients/conic-from-angle-expected.html b/LayoutTests/fast/gradients/conic-from-angle-expected.html >new file mode 100644 >index 0000000000000000000000000000000000000000..072265d11e5a10dfaee0bd8947f5e8cab89c1e21 >--- /dev/null >+++ b/LayoutTests/fast/gradients/conic-from-angle-expected.html >@@ -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> >diff --git a/LayoutTests/fast/gradients/conic-from-angle.html b/LayoutTests/fast/gradients/conic-from-angle.html >new file mode 100644 >index 0000000000000000000000000000000000000000..aa0af1affea9c5345418e6f7648c408405ec9841 >--- /dev/null >+++ b/LayoutTests/fast/gradients/conic-from-angle.html >@@ -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 >diff --git a/LayoutTests/platform/ios-12/TestExpectations b/LayoutTests/platform/ios-12/TestExpectations >index fd6c15dc85caa6689e2519a6107b4762bb6a3ce7..362cd87a06c09f5464d60c84da8b22dd68f374c9 100644 >--- a/LayoutTests/platform/ios-12/TestExpectations >+++ b/LayoutTests/platform/ios-12/TestExpectations >@@ -31,4 +31,5 @@ fast/gradients/conic-repeating.html [ Pass ] > 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 >diff --git a/LayoutTests/platform/mac/TestExpectations b/LayoutTests/platform/mac/TestExpectations >index 414e2d38913abd58c3e0d4146baa7ebe54083a84..b4d9fc4aa1ad39f8efd1fb1a6cc449ae38ef1c44 100644 >--- a/LayoutTests/platform/mac/TestExpectations >+++ b/LayoutTests/platform/mac/TestExpectations >@@ -1763,4 +1763,5 @@ webkit.org/b/187393 imported/w3c/web-platform-tests/2dcontext/imagebitmap/create > [ 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 ] >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 189445
:
349221
| 349224