WebKit Bugzilla
Attachment 349577 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
bug-189532-20180912131739.patch (text/plain), 6.51 KB, created by
Megan Gardner
on 2018-09-12 13:17:40 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Megan Gardner
Created:
2018-09-12 13:17:40 PDT
Size:
6.51 KB
patch
obsolete
>Subversion Revision: 235945 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 84bbd77d4d02bd0e8176888fa9a2c498cd8ff779..e2c1c052a72eedd5af68122caa920ee0fcc5c15d 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 NOBODY (OOPS!). >+ >+ Test: fast/gradients/conic-repeating-last-stop.html >+ >+ Calculation was wrong, fixed it, and wrote a test that failed >+ without the change, and passes with it. >+ >+ * css/CSSGradientValue.cpp: >+ (WebCore::ConicGradientAdapter::normalizeStopsAndEndpointsOutsideRange): >+ > 2018-09-12 Youenn Fablet <youenn@apple.com> > > Split RTCRtpParameters idl and header file >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 43a8c59f0b8ca1f1c0e2db8073f50545b6f25e5f..de12c1c445b8c680c472cf3d2ef8bf3ee3aad086 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 NOBODY (OOPS!). >+ >+ 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 Joseph Pecoraro <pecoraro@apple.com> > > Web Inspector: fix test case failures in js-isLikelyStackTrace.html >diff --git a/LayoutTests/TestExpectations b/LayoutTests/TestExpectations >index 4196cfe2b4d0d547803762e3722dc4869d5dc17c..8c1439f6e0981470a313d88624ed717b6347dd20 100644 >--- a/LayoutTests/TestExpectations >+++ b/LayoutTests/TestExpectations >@@ -2245,5 +2245,8 @@ 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 c4bb160d375a2917664ade9cbe37897b02727f8a..b85c9e20b56b05e4695b176f7400975549853e37 100644 >--- a/LayoutTests/platform/mac/TestExpectations >+++ b/LayoutTests/platform/mac/TestExpectations >@@ -1764,6 +1764,7 @@ 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 ] > > # Mark these as failing while Internal Debug Features default to off in WKTR > imported/w3c/web-platform-tests/media-source/mediasource-changetype.html [ Pass Failure ]
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