WebKit Bugzilla
Attachment 349605 Details for
Bug 189532
: Fix color stop blending in conic gradients for stops past 1
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for landing
bug-189532-20180912172820.patch (text/plain), 6.38 KB, created by
Megan Gardner
on 2018-09-12 17:28:20 PDT
(
hide
)
Description:
Patch for landing
Filename:
MIME Type:
Creator:
Megan Gardner
Created:
2018-09-12 17:28:20 PDT
Size:
6.38 KB
patch
obsolete
>Subversion Revision: 235961 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index f024f6b73f371ab33db786c71111c6a47a774f40..80641681c8b08073a01407aa34d6675b83e4e03d 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,19 @@ >+2018-09-11 Megan Gardner <megan_gardner@apple.com> >+ >+ Fix color stop blending in conic gradients for stops past 1 >+ https://bugs.webkit.org/show_bug.cgi?id=189532 >+ <rdar://problem/44158221> >+ >+ Reviewed by Simon Fraser. >+ >+ Calculation was wrong, fixed it, and wrote a test that failed >+ without the change, and passes with it. >+ >+ Test: fast/gradients/conic-repeating-last-stop.html >+ >+ * css/CSSGradientValue.cpp: >+ (WebCore::ConicGradientAdapter::normalizeStopsAndEndpointsOutsideRange): >+ > 2018-09-11 Ryosuke Niwa <rniwa@webkit.org> > > imported/w3c/web-platform-tests/shadow-dom/form-control-form-attribute.html hits assertion >diff --git a/Source/WebCore/css/CSSGradientValue.cpp b/Source/WebCore/css/CSSGradientValue.cpp >index 700c63daadcac6a0193411f2ba2b65975e4515bf..898b1e2e74ad7ec217775edc6affdbdd62db52db 100644 >--- a/Source/WebCore/css/CSSGradientValue.cpp >+++ b/Source/WebCore/css/CSSGradientValue.cpp >@@ -280,7 +280,7 @@ public: > float prevOffset = stops[lastOneOrLessIndex].offset; > float nextOffset = stops[lastOneOrLessIndex + 1].offset; > >- float interStopProportion = 1 / (nextOffset - prevOffset); >+ float interStopProportion = (1 - prevOffset) / (nextOffset - prevOffset); > // FIXME: when we interpolate gradients using premultiplied colors, this should do premultiplication. > Color blendedColor = blend(stops[lastOneOrLessIndex].color, stops[lastOneOrLessIndex + 1].color, interStopProportion); > >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index a07ba0f863d63f1c48411461369f83afd618f46c..79dad96b5f98c9a5a1e455a8f3811e0b7c779fd0 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,18 @@ >+2018-09-11 Megan Gardner <megan_gardner@apple.com> >+ >+ Fix color stop blending in conic gradients for stops past 1 >+ https://bugs.webkit.org/show_bug.cgi?id=189532 >+ <rdar://problem/44158221> >+ >+ Reviewed by Simon Fraser. >+ >+ Tests that last stop in the gradient is correct. >+ >+ * fast/gradients/conic-repeating-last-stop-expected.html: Added. >+ * fast/gradients/conic-repeating-last-stop.html: Added. >+ * platform/ios-12/TestExpectations: >+ * platform/mac/TestExpectations: >+ > 2018-09-12 Dean Jackson <dino@apple.com> > > Header parsing for experimental and internal debug features >diff --git a/LayoutTests/TestExpectations b/LayoutTests/TestExpectations >index 810a898cac80c7a90756d9b2ffc72d8cf90aff1f..23d2877736fbd11f8497537958f4e612bfbeae5b 100644 >--- a/LayoutTests/TestExpectations >+++ b/LayoutTests/TestExpectations >@@ -2243,6 +2243,7 @@ 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 ] >+fast/gradients/conic-repeating-last-stop.html [ Skip ] > > webkit.org/b/187773 http/tests/webAPIStatistics [ Skip ] > >diff --git a/LayoutTests/fast/gradients/conic-repeating-last-stop-expected.html b/LayoutTests/fast/gradients/conic-repeating-last-stop-expected.html >new file mode 100644 >index 0000000000000000000000000000000000000000..2e8a53cacce4d1f0615975a9ad19efa64b38df90 >--- /dev/null >+++ b/LayoutTests/fast/gradients/conic-repeating-last-stop-expected.html >@@ -0,0 +1,18 @@ >+<html> >+<head> >+ <style> >+ div { >+ width: 200px; >+ height: 200px; >+ } >+ >+ #box1 { >+ background-color: yellow; >+ } >+ >+ </style> >+</head> >+<body> >+ <div id="box1"></div> >+</body> >+</html> >diff --git a/LayoutTests/fast/gradients/conic-repeating-last-stop.html b/LayoutTests/fast/gradients/conic-repeating-last-stop.html >new file mode 100644 >index 0000000000000000000000000000000000000000..d766d24fcbd3e9e87252c83ee8495d9a790f716f >--- /dev/null >+++ b/LayoutTests/fast/gradients/conic-repeating-last-stop.html >@@ -0,0 +1,42 @@ >+<html> >+<head> >+<style> >+svg { >+ width: 800px; >+ display: none; >+} >+ >+.container { >+ width: 200px; >+ height: 200px; >+ overflow: hidden; >+} >+ >+#test { >+ width: 200px; >+ height: 200px; >+ background-image: repeating-conic-gradient(gold, orange 20deg); >+ filter: url(#posterize); >+ transform: scale(20); >+ transform-origin: 45% top; >+} >+</style> >+</head> >+ >+<body> >+<svg viewBox="0 0 700 100"> >+<defs> >+ <filter id="posterize" filterUnits="objectBoundingBox" primitiveUnits="objectBoundingBox"> >+ <feComponentTransfer> >+ <feFuncR type="discrete" tableValues="0 1"/> >+ <feFuncG type="discrete" tableValues="0 1"/> >+ <feFuncB type="discrete" tableValues="0 1"/> >+ </feComponentTransfer> >+ </filter> >+</defs> >+</svg> >+ >+<div class="container"> >+ <div id="test"></div> >+</div> >+</html> >diff --git a/LayoutTests/platform/ios-12/TestExpectations b/LayoutTests/platform/ios-12/TestExpectations >index 362cd87a06c09f5464d60c84da8b22dd68f374c9..53ffd775d0e3b7c4c3b4f58348ab2aa02d6a1f7e 100644 >--- a/LayoutTests/platform/ios-12/TestExpectations >+++ b/LayoutTests/platform/ios-12/TestExpectations >@@ -32,4 +32,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 ] >-fast/gradients/conic-from-angle.html [ Pass ] >\ No newline at end of file >+fast/gradients/conic-from-angle.html [ Pass ] >+fast/gradients/conic-repeating-last-stop.html [ Pass ] >diff --git a/LayoutTests/platform/mac/TestExpectations b/LayoutTests/platform/mac/TestExpectations >index 52af06c224e68ea8d7e841c91227b323c2c57d86..fe9fa2d4550a3cf8a8bc13ab7e0d781951b2e2eb 100644 >--- a/LayoutTests/platform/mac/TestExpectations >+++ b/LayoutTests/platform/mac/TestExpectations >@@ -1764,3 +1764,6 @@ webkit.org/b/187393 imported/w3c/web-platform-tests/2dcontext/imagebitmap/create > [ 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 ] >+[ Mojave+ ] fast/gradients/conic-repeating-last-stop.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 189532
:
349495
|
349503
|
349510
|
349512
|
349516
|
349521
|
349569
|
349577
|
349580
|
349582
| 349605