Diff
Modified: trunk/LayoutTests/ChangeLog (271974 => 271975)
--- trunk/LayoutTests/ChangeLog 2021-01-27 20:47:45 UTC (rev 271974)
+++ trunk/LayoutTests/ChangeLog 2021-01-27 20:49:40 UTC (rev 271975)
@@ -1,3 +1,26 @@
+2021-01-27 Nikolas Zimmermann <[email protected]>
+
+ REGRESSION (r243266): SVGStopElement does not react upon 'offset' attribute changes
+ https://bugs.webkit.org/show_bug.cgi?id=220971
+
+ Reviewed by Said Abou-Hallawa.
+
+ Fix regression from r243266. SVGAnimatedNumber::create() needs a
+ reference to the owner SVGElement, otherwise it cannot react to dynamic
+ changes of the attribute and invalidate the element.
+
+ This is covered by two pixel tests: svg/custom/deep-dynamic-updates.svg
+ and svg/custom/js-update-stop.svg, however since we no longer run pixel
+ tests by default nobody noticed this. Convert these tests to reftests
+ to avoid this in the future.
+
+ * svg/custom/deep-dynamic-updates-expected.svg: Copied from LayoutTests/svg/custom/deep-dynamic-updates.svg.
+ * svg/custom/deep-dynamic-updates-expected.txt: Removed.
+ * svg/custom/deep-dynamic-updates.svg:
+ * svg/custom/js-update-stop-expected.svg: Copied from LayoutTests/svg/custom/js-update-stop.svg.
+ * svg/custom/js-update-stop-expected.txt: Removed.
+ * svg/custom/js-update-stop.svg:
+
2021-01-27 Sam Weinig <[email protected]>
[iOS] imported/w3c/web-platform-tests/css/css-color/system-color-compute.html is failing
Deleted: trunk/LayoutTests/platform/gtk/svg/custom/deep-dynamic-updates-expected.png
(Binary files differ)
Deleted: trunk/LayoutTests/platform/gtk/svg/custom/js-update-stop-expected.png
(Binary files differ)
Deleted: trunk/LayoutTests/platform/mac/svg/custom/deep-dynamic-updates-expected.png
(Binary files differ)
Deleted: trunk/LayoutTests/platform/mac/svg/custom/js-update-stop-expected.png
(Binary files differ)
Copied: trunk/LayoutTests/svg/custom/deep-dynamic-updates-expected.svg (from rev 271970, trunk/LayoutTests/svg/custom/deep-dynamic-updates.svg) (0 => 271975)
--- trunk/LayoutTests/svg/custom/deep-dynamic-updates-expected.svg (rev 0)
+++ trunk/LayoutTests/svg/custom/deep-dynamic-updates-expected.svg 2021-01-27 20:49:40 UTC (rev 271975)
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
+<svg width="450" height="450" xmlns="http://www.w3.org/2000/svg">
+<defs>
+ <symbol id="symbol">
+ <rect stroke-width="1px" fill="url(#Pattern)" stroke="navy" width="400" height="400"/>
+ </symbol>
+
+ <linearGradient id="Gradient" gradientUnits="userSpaceOnUse" x1="0" y1="0" x2="60" y2="10">
+ <stop stop-color="blue" offset="0.3"/>
+ <stop stop-color="red" offset="1"/>
+ </linearGradient>
+
+ <pattern id="Pattern" patternUnits="userSpaceOnUse" viewBox="0 0 60 10" x="0" y="0" width="60" height="10">
+ <rect stroke-width="1px" fill="url(#Gradient)" stroke="red" width="60" height="10" transform="scale(2)"/>
+ </pattern>
+</defs>
+
+<use x="25" y="25" width="400" height="400" xlink:href=""
+</svg>
Deleted: trunk/LayoutTests/svg/custom/deep-dynamic-updates-expected.txt (271974 => 271975)
--- trunk/LayoutTests/svg/custom/deep-dynamic-updates-expected.txt 2021-01-27 20:47:45 UTC (rev 271974)
+++ trunk/LayoutTests/svg/custom/deep-dynamic-updates-expected.txt 2021-01-27 20:49:40 UTC (rev 271975)
@@ -1,15 +0,0 @@
-layer at (0,0) size 800x600
- RenderView at (0,0) size 800x600
-layer at (0,0) size 450x450
- RenderSVGRoot {svg} at (24,24) size 402x402
- RenderSVGHiddenContainer {defs} at (0,0) size 0x0
- RenderSVGHiddenContainer {symbol} at (0,0) size 0x0
- RenderSVGRect {rect} at (0,0) size 401x401 [stroke={[type=SOLID] [color=#000080]}] [fill={[type=PATTERN] [id="Pattern"]}] [x=0.00] [y=0.00] [width=400.00] [height=400.00]
- RenderSVGResourceLinearGradient {linearGradient} [id="Gradient"] [gradientUnits=userSpaceOnUse] [start=(0,0)] [end=(60,10)]
- RenderSVGGradientStop {stop} [offset=0.30] [color=#0000FF]
- RenderSVGGradientStop {stop} [offset=1.00] [color=#FF0000]
- RenderSVGResourcePattern {pattern} [id="Pattern"] [patternUnits=userSpaceOnUse] [patternContentUnits=userSpaceOnUse]
- RenderSVGRect {rect} at (0,0) size 121x21 [transform={m=((2.00,0.00)(0.00,2.00)) t=(0.00,0.00)}] [stroke={[type=SOLID] [color=#FF0000]}] [fill={[type=LINEAR-GRADIENT] [id="Gradient"]}] [x=0.00] [y=0.00] [width=60.00] [height=10.00]
- RenderSVGContainer {use} at (24,24) size 402x402 [transform={m=((1.00,0.00)(0.00,1.00)) t=(25.00,25.00)}]
- RenderSVGViewportContainer {svg} at (24,24) size 402x402
- RenderSVGRect {rect} at (24,24) size 402x402 [stroke={[type=SOLID] [color=#000080]}] [fill={[type=PATTERN] [id="Pattern"]}] [x=0.00] [y=0.00] [width=400.00] [height=400.00]
Modified: trunk/LayoutTests/svg/custom/deep-dynamic-updates.svg (271974 => 271975)
--- trunk/LayoutTests/svg/custom/deep-dynamic-updates.svg 2021-01-27 20:47:45 UTC (rev 271974)
+++ trunk/LayoutTests/svg/custom/deep-dynamic-updates.svg 2021-01-27 20:49:40 UTC (rev 271975)
@@ -1,7 +1,5 @@
<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
-<svg width="450" height="450" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" _onload_="runRepaintTest()">
-<script xlink:href=""
+<svg width="450" height="450" xmlns="http://www.w3.org/2000/svg">
<defs>
<symbol id="symbol">
<rect stroke-width="1px" fill="url(#Pattern)" stroke="navy" width="400" height="400"/>
@@ -17,12 +15,18 @@
</pattern>
</defs>
+<use x="25" y="25" width="400" height="400" xlink:href=""
+
<script>
-function repaintTest() {
- document.getElementById("stop1").offset.baseVal = 0.3;
+if (window.testRunnner)
+ window.testRunner.waitUntilDone();
+
+window._onload_ = () => {
+ requestAnimationFrame(() => {
+ document.getElementById("stop1").offset.baseVal = 0.3;
+ if (window.testRunner)
+ testRunner.notifyDone();
+ });
}
</script>
-
-<use x="25" y="25" width="400" height="400" xlink:href=""
-
</svg>
Copied: trunk/LayoutTests/svg/custom/js-update-stop-expected.svg (from rev 271970, trunk/LayoutTests/svg/custom/js-update-stop.svg) (0 => 271975)
--- trunk/LayoutTests/svg/custom/js-update-stop-expected.svg (rev 0)
+++ trunk/LayoutTests/svg/custom/js-update-stop-expected.svg 2021-01-27 20:49:40 UTC (rev 271975)
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
+<svg width="450" height="450" xmlns="http://www.w3.org/2000/svg">
+<defs>
+ <linearGradient id="Gradient" gradientUnits="userSpaceOnUse" x1="10" y1="10" x2="440" y2="10">
+ <stop stop-color="blue" offset="0.3"/>
+ <stop stop-color="red" offset="1"/>
+ </linearGradient>
+</defs>
+
+<rect x="10" y="10" width="430" height="80" fill="url(#Gradient)" />
+<rect x="10" y="100" width="430" height="80" fill="url(#Gradient)" />
+</svg>
Deleted: trunk/LayoutTests/svg/custom/js-update-stop-expected.txt (271974 => 271975)
--- trunk/LayoutTests/svg/custom/js-update-stop-expected.txt 2021-01-27 20:47:45 UTC (rev 271974)
+++ trunk/LayoutTests/svg/custom/js-update-stop-expected.txt 2021-01-27 20:49:40 UTC (rev 271975)
@@ -1,10 +0,0 @@
-layer at (0,0) size 800x600
- RenderView at (0,0) size 800x600
-layer at (0,0) size 450x450
- RenderSVGRoot {svg} at (10,10) size 430x170
- RenderSVGHiddenContainer {defs} at (0,0) size 0x0
- RenderSVGResourceLinearGradient {linearGradient} [id="Gradient"] [gradientUnits=userSpaceOnUse] [start=(10,10)] [end=(440,10)]
- RenderSVGGradientStop {stop} [offset=0.30] [color=#0000FF]
- RenderSVGGradientStop {stop} [offset=1.00] [color=#FF0000]
- RenderSVGRect {rect} at (10,10) size 430x80 [fill={[type=LINEAR-GRADIENT] [id="Gradient"]}] [x=10.00] [y=10.00] [width=430.00] [height=80.00]
- RenderSVGRect {rect} at (10,100) size 430x80 [fill={[type=LINEAR-GRADIENT] [id="Gradient"]}] [x=10.00] [y=100.00] [width=430.00] [height=80.00]
Modified: trunk/LayoutTests/svg/custom/js-update-stop.svg (271974 => 271975)
--- trunk/LayoutTests/svg/custom/js-update-stop.svg 2021-01-27 20:47:45 UTC (rev 271974)
+++ trunk/LayoutTests/svg/custom/js-update-stop.svg 2021-01-27 20:49:40 UTC (rev 271975)
@@ -1,7 +1,5 @@
<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
-<svg width="450" height="450" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" _onload_="runRepaintTest()">
-<script xlink:href=""
+<svg width="450" height="450" xmlns="http://www.w3.org/2000/svg">
<defs>
<linearGradient id="Gradient" gradientUnits="userSpaceOnUse" x1="10" y1="10" x2="440" y2="10">
<stop id="stop1" stop-color="blue" offset="0"/>
@@ -9,13 +7,19 @@
</linearGradient>
</defs>
+<rect x="10" y="10" width="430" height="80" fill="url(#Gradient)" />
+<rect x="10" y="100" width="430" height="80" fill="url(#Gradient)" />
+
<script>
-function repaintTest() {
- document.getElementById("stop1").offset.baseVal = 0.3;
+if (window.testRunnner)
+ window.testRunner.waitUntilDone();
+
+window._onload_ = () => {
+ requestAnimationFrame(() => {
+ document.getElementById("stop1").offset.baseVal = 0.3;
+ if (window.testRunner)
+ testRunner.notifyDone();
+ });
}
</script>
-
-<rect x="10" y="10" width="430" height="80" fill="url(#Gradient)" />
-<rect x="10" y="100" width="430" height="80" fill="url(#Gradient)" />
-
</svg>
Modified: trunk/Source/WebCore/ChangeLog (271974 => 271975)
--- trunk/Source/WebCore/ChangeLog 2021-01-27 20:47:45 UTC (rev 271974)
+++ trunk/Source/WebCore/ChangeLog 2021-01-27 20:49:40 UTC (rev 271975)
@@ -1,3 +1,24 @@
+2021-01-27 Nikolas Zimmermann <[email protected]>
+
+ REGRESSION (r243266): SVGStopElement does not react upon 'offset' attribute changes
+ https://bugs.webkit.org/show_bug.cgi?id=220971
+
+ Reviewed by Said Abou-Hallawa.
+
+ Fix regression from r243266. SVGAnimatedNumber::create() needs a
+ reference to the owner SVGElement, otherwise it cannot react to dynamic
+ changes of the attribute and invalidate the element.
+
+ This is covered by two pixel tests: svg/custom/deep-dynamic-updates.svg
+ and svg/custom/js-update-stop.svg, however since we no longer run pixel
+ tests by default nobody noticed this. Convert these tests to reftests
+ to avoid this in the future.
+
+ Tests: svg/custom/deep-dynamic-updates-expected.svg
+ svg/custom/js-update-stop-expected.svg
+
+ * svg/SVGStopElement.h:
+
2021-01-27 Per Arne <[email protected]>
[macOS] Re-enable ENABLE_SET_WEBCONTENT_PROCESS_INFORMATION_IN_NETWORK_PROCESS
Modified: trunk/Source/WebCore/svg/SVGStopElement.h (271974 => 271975)
--- trunk/Source/WebCore/svg/SVGStopElement.h 2021-01-27 20:47:45 UTC (rev 271974)
+++ trunk/Source/WebCore/svg/SVGStopElement.h 2021-01-27 20:49:40 UTC (rev 271975)
@@ -50,7 +50,7 @@
bool rendererIsNeeded(const RenderStyle&) final;
PropertyRegistry m_propertyRegistry { *this };
- Ref<SVGAnimatedNumber> m_offset { SVGAnimatedNumber::create(0) };
+ Ref<SVGAnimatedNumber> m_offset { SVGAnimatedNumber::create(this, 0) };
};
} // namespace WebCore