WebKit Bugzilla
Attachment 349835 Details for
Bug 189640
: Support two color hints per color stop for all gradients
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-189640-20180914172626.patch (text/plain), 6.09 KB, created by
Megan Gardner
on 2018-09-14 17:26:27 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Megan Gardner
Created:
2018-09-14 17:26:27 PDT
Size:
6.09 KB
patch
obsolete
>Subversion Revision: 236018 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 44a7cfcf98d4072db1ae378e0217196ecb48c13d..31c5726dfa6475b089bb99b0d251eae4b0496528 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,19 @@ >+2018-09-14 Megan Gardner <megan_gardner@apple.com> >+ >+ Support two color hints per color stop for angle based gradients >+ https://bugs.webkit.org/show_bug.cgi?id=189640 >+ <rdar://problem/44158152> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ The CSS spec for conic gradients allows for each color stop to have two angles to be used for hints. >+ This makes pie chart and checkerboard gradients much simpler to write. >+ >+ Test: fast/gradients/conic-two-hints.html >+ >+ * css/parser/CSSPropertyParserHelpers.cpp: >+ (WebCore::CSSPropertyParserHelpers::consumeAngularGradientColorStops): >+ > 2018-09-14 Ryan Haddad <ryanhaddad@apple.com> > > Unreviewed, attempt to fix the iOSMac build after r236015. >diff --git a/Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp b/Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp >index 98ffc21b5d5657e727ebfb1d586a8102cf47f2f6..7a4e058e1997b3cb6b068aa59a0737118afb2438 100644 >--- a/Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp >+++ b/Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp >@@ -1018,6 +1018,15 @@ static bool consumeAngularGradientColorStops(CSSParserTokenRange& range, CSSPars > if (!stop.m_color && !stop.m_position) > return false; > gradient.addStop(stop); >+ >+ // See if there is a second color hint, which is optional. >+ CSSGradientColorStop secondStop; >+ secondStop.m_position = consumeAngleOrPercent(range, cssParserMode, ValueRangeAll, UnitlessQuirk::Forbid); >+ if (secondStop.m_position) { >+ secondStop.m_color = stop.m_color; >+ gradient.addStop(secondStop); >+ } >+ > } while (consumeCommaIncludingWhitespace(range)); > > gradient.doneAddingStops(); >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index b9fffb6545411f2668dba0a87bb75e425fb6622d..e97b2e822dac7bc3ba34c3680e6c44f699059e9a 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,16 @@ >+2018-09-14 Megan Gardner <megan_gardner@apple.com> >+ >+ Support two color hints per color stop for angle based gradients >+ https://bugs.webkit.org/show_bug.cgi?id=189640 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * TestExpectations: >+ * fast/gradients/conic-two-hints-expected.html: Added. >+ * fast/gradients/conic-two-hints.html: Added. >+ * platform/ios-12/TestExpectations: >+ * platform/mac/TestExpectations: >+ > 2018-09-14 Eric Carlson <eric.carlson@apple.com> > > Support arbitrary video resolution in getUserMedia API >diff --git a/LayoutTests/TestExpectations b/LayoutTests/TestExpectations >index d6a36f98c9b7df84795f789ac184d3e53df423cc..6bae6797421507bb35d1e92bb1734b5166006f64 100644 >--- a/LayoutTests/TestExpectations >+++ b/LayoutTests/TestExpectations >@@ -2242,6 +2242,7 @@ fast/gradients/conic-center-outside-box.html [ Skip ] > fast/gradients/conic-extended-stops.html [ Skip ] > fast/gradients/conic-from-angle.html [ Skip ] > fast/gradients/conic-repeating-last-stop.html [ Skip ] >+fast/gradients/conic-two-hints.html [ Skip ] > > webkit.org/b/187773 http/tests/webAPIStatistics [ Skip ] > >diff --git a/LayoutTests/fast/gradients/conic-two-hints-expected.html b/LayoutTests/fast/gradients/conic-two-hints-expected.html >new file mode 100644 >index 0000000000000000000000000000000000000000..7b71df1ae38616a31cbdfb04b732cc94400a8175 >--- /dev/null >+++ b/LayoutTests/fast/gradients/conic-two-hints-expected.html >@@ -0,0 +1,33 @@ >+<html> >+<head> >+ <style> >+ div { >+ float: left; >+ } >+ >+ #box1 { >+ height: 50px; >+ width: 25px; >+ background-color: orange; >+ } >+ #box2 { >+ height: 25px; >+ width: 25px; >+ background-color: blue; >+ } >+ #box3 { >+ height: 25px; >+ width: 25px; >+ clear: left; >+ background-color: green; >+ } >+ </style> >+</head> >+<body> >+ <div id="box1"></div> >+ <div id="container"> >+ <div id="box2"></div> >+ <div id="box3"></div> >+ </div> >+</body> >+</html> >diff --git a/LayoutTests/fast/gradients/conic-two-hints.html b/LayoutTests/fast/gradients/conic-two-hints.html >new file mode 100644 >index 0000000000000000000000000000000000000000..43928120a6f859e5a3410554fe0a3370bf035f98 >--- /dev/null >+++ b/LayoutTests/fast/gradients/conic-two-hints.html >@@ -0,0 +1,14 @@ >+<html> >+<head> >+ <style> >+ #grad { >+ height: 50px; >+ width: 50px; >+ background: conic-gradient(blue 0deg 90deg, green 90deg 180deg, orange 180deg 360deg); >+ } >+ </style> >+</head> >+<body> >+ <div id="grad"></div> >+</body> >+</html> >diff --git a/LayoutTests/platform/ios-12/TestExpectations b/LayoutTests/platform/ios-12/TestExpectations >index 53ffd775d0e3b7c4c3b4f58348ab2aa02d6a1f7e..e10b957f5661b1a75c28d46be4fe115152696999 100644 >--- a/LayoutTests/platform/ios-12/TestExpectations >+++ b/LayoutTests/platform/ios-12/TestExpectations >@@ -34,3 +34,4 @@ fast/gradients/conic-center-outside-box.html [ Pass ] > fast/gradients/conic-extended-stops.html [ Pass ] > fast/gradients/conic-from-angle.html [ Pass ] > fast/gradients/conic-repeating-last-stop.html [ Pass ] >+fast/gradients/conic-two-hints.html [ Pass ] >diff --git a/LayoutTests/platform/mac/TestExpectations b/LayoutTests/platform/mac/TestExpectations >index fe9fa2d4550a3cf8a8bc13ab7e0d781951b2e2eb..d58a0e13679c38e262a623bc31bb37e2dba7dec7 100644 >--- a/LayoutTests/platform/mac/TestExpectations >+++ b/LayoutTests/platform/mac/TestExpectations >@@ -1765,5 +1765,6 @@ webkit.org/b/187393 imported/w3c/web-platform-tests/2dcontext/imagebitmap/create > [ Mojave+ ] fast/gradients/conic-extended-stops.html [ Pass ] > [ Mojave+ ] fast/gradients/conic-from-angle.html [ Pass ] > [ Mojave+ ] fast/gradients/conic-repeating-last-stop.html [ Pass ] >+[ Mojave+ ] fast/gradients/conic-two-hints.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 189640
:
349835
|
349841
|
349964