Title: [238464] trunk
- Revision
- 238464
- Author
- rn...@webkit.org
- Date
- 2018-11-23 14:06:35 -0800 (Fri, 23 Nov 2018)
Log Message
Updating href on textPath doesn't update its rendering
https://bugs.webkit.org/show_bug.cgi?id=191920
Reviewed by Dean Jackson.
Source/WebCore:
Fixed the bug by invalidating the RenderSVGResource in SVGTextPathElement::svgAttributeChanged
in addition to updating the pending resources.
Test: svg/text/textpath-reference-update.html
* svg/SVGTextPathElement.cpp:
(WebCore::SVGTextPathElement::svgAttributeChanged):
LayoutTests:
Added a ref test.
* svg/text/textpath-reference-update-expected.html: Added.
* svg/text/textpath-reference-update.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (238463 => 238464)
--- trunk/LayoutTests/ChangeLog 2018-11-23 20:47:11 UTC (rev 238463)
+++ trunk/LayoutTests/ChangeLog 2018-11-23 22:06:35 UTC (rev 238464)
@@ -1,3 +1,15 @@
+2018-11-22 Ryosuke Niwa <rn...@webkit.org>
+
+ Updating href on textPath doesn't update its rendering
+ https://bugs.webkit.org/show_bug.cgi?id=191920
+
+ Reviewed by Dean Jackson.
+
+ Added a ref test.
+
+ * svg/text/textpath-reference-update-expected.html: Added.
+ * svg/text/textpath-reference-update.html: Added.
+
2018-11-23 Zalan Bujtas <za...@apple.com>
[LFC][IFC] Add support for variable height runs.
Added: trunk/LayoutTests/svg/text/textpath-reference-update-expected.html (0 => 238464)
--- trunk/LayoutTests/svg/text/textpath-reference-update-expected.html (rev 0)
+++ trunk/LayoutTests/svg/text/textpath-reference-update-expected.html 2018-11-23 22:06:35 UTC (rev 238464)
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<html>
+<body>
+ <p>Test passes if you see a single 100px by 100px green box below.</p>
+ <div style="width: 100px; height: 100px; background: green;"></div>
+</body>
+</html>
Added: trunk/LayoutTests/svg/text/textpath-reference-update.html (0 => 238464)
--- trunk/LayoutTests/svg/text/textpath-reference-update.html (rev 0)
+++ trunk/LayoutTests/svg/text/textpath-reference-update.html 2018-11-23 22:06:35 UTC (rev 238464)
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<html>
+<body>
+<p>Test passes if you see a single 100px by 100px green box below.</p>
+<svg style="width: 100px; height: 100px;" viewbox="0 0 100 100">
+ <defs>
+ <path id="path1" d="M0,50 L100,50 Z" />
+ <path id="path2" d="M0,-5 L100,-5 Z" />
+ </defs>
+ <rect x="0" y="0" width="100" height="100" fill="green"></rect>
+ <text>
+ <textPath href=""
+ </text>
+</svg>
+<script>
+
+if (window.testRunner)
+ testRunner.waitUntilDone();
+
+window._onload_ = () => {
+ requestAnimationFrame(() => {
+ document.querySelector('textPath').setAttribute('href', '#path2');
+ if (window.testRunner)
+ requestAnimationFrame(() => testRunner.notifyDone());
+ });
+}
+
+</script>
+</body>
+</html>
Modified: trunk/Source/WebCore/ChangeLog (238463 => 238464)
--- trunk/Source/WebCore/ChangeLog 2018-11-23 20:47:11 UTC (rev 238463)
+++ trunk/Source/WebCore/ChangeLog 2018-11-23 22:06:35 UTC (rev 238464)
@@ -1,3 +1,18 @@
+2018-11-22 Ryosuke Niwa <rn...@webkit.org>
+
+ Updating href on textPath doesn't update its rendering
+ https://bugs.webkit.org/show_bug.cgi?id=191920
+
+ Reviewed by Dean Jackson.
+
+ Fixed the bug by invalidating the RenderSVGResource in SVGTextPathElement::svgAttributeChanged
+ in addition to updating the pending resources.
+
+ Test: svg/text/textpath-reference-update.html
+
+ * svg/SVGTextPathElement.cpp:
+ (WebCore::SVGTextPathElement::svgAttributeChanged):
+
2018-11-23 Ross Kirsling <ross.kirsl...@sony.com>
Introduce user-defined literal for LayoutUnit
Modified: trunk/Source/WebCore/svg/SVGTextPathElement.cpp (238463 => 238464)
--- trunk/Source/WebCore/svg/SVGTextPathElement.cpp 2018-11-23 20:47:11 UTC (rev 238463)
+++ trunk/Source/WebCore/svg/SVGTextPathElement.cpp 2018-11-23 22:06:35 UTC (rev 238464)
@@ -103,6 +103,8 @@
if (SVGURIReference::isKnownAttribute(attrName)) {
buildPendingResource();
+ if (auto renderer = this->renderer())
+ RenderSVGResource::markForLayoutAndParentResourceInvalidation(*renderer);
return;
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes