https://bugs.webkit.org/show_bug.cgi?id=189532
<rdar://problem/
44158221>
Reviewed by Simon Fraser.
Source/WebCore:
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):
LayoutTests:
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:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235999
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2018-09-13 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-13 Ryan Haddad <ryanhaddad@apple.com>
Unreviewed, rolling out r235954.
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 ]
--- /dev/null
+<html>
+<head>
+ <style>
+ div {
+ width: 200px;
+ height: 200px;
+ }
+
+ #box1 {
+ background-color: yellow;
+ }
+
+ </style>
+</head>
+<body>
+ <div id="box1"></div>
+</body>
+</html>
--- /dev/null
+<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>
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 ]
[ 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 ]
+
+
+2018-09-13 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-13 Chris Dumez <cdumez@apple.com>
Regression(PSON): setting window.opener to null allows process swapping in cases that are not web-compatible
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);