Title: [249216] trunk
Revision
249216
Author
[email protected]
Date
2019-08-28 12:57:00 -0700 (Wed, 28 Aug 2019)

Log Message

XLinkNames namespace is required before the 'href' attribute of SVG animate elements
https://bugs.webkit.org/show_bug.cgi?id=201227

Patch by Said Abou-Hallawa <[email protected]> on 2019-08-28
Reviewed by Ryosuke Niwa.

Source/WebCore:

To get the animation target element, get the value of the "href" attribute
or the "xlink:href" attribute.

Tests: svg/custom/href-svg-namespace-animate-target.svg

* svg/animation/SVGSMILElement.cpp:
(WebCore::SVGSMILElement::buildPendingResource):

LayoutTests:

* svg/custom/href-svg-namespace-animate-target-expected.svg: Added.
* svg/custom/href-svg-namespace-animate-target.svg: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (249215 => 249216)


--- trunk/LayoutTests/ChangeLog	2019-08-28 19:51:06 UTC (rev 249215)
+++ trunk/LayoutTests/ChangeLog	2019-08-28 19:57:00 UTC (rev 249216)
@@ -1,3 +1,13 @@
+2019-08-28  Said Abou-Hallawa  <[email protected]>
+
+        XLinkNames namespace is required before the 'href' attribute of SVG animate elements
+        https://bugs.webkit.org/show_bug.cgi?id=201227
+
+        Reviewed by Ryosuke Niwa.
+
+        * svg/custom/href-svg-namespace-animate-target-expected.svg: Added.
+        * svg/custom/href-svg-namespace-animate-target.svg: Added.
+
 2019-08-28  Myles C. Maxfield  <[email protected]>
 
         [WHLSL] Matrices need to have correct alignment

Added: trunk/LayoutTests/svg/custom/href-svg-namespace-animate-target-expected.svg (0 => 249216)


--- trunk/LayoutTests/svg/custom/href-svg-namespace-animate-target-expected.svg	                        (rev 0)
+++ trunk/LayoutTests/svg/custom/href-svg-namespace-animate-target-expected.svg	2019-08-28 19:57:00 UTC (rev 249216)
@@ -0,0 +1,4 @@
+<svg xmlns="http://www.w3.org/2000/svg">
+    <rect width="100" height="100" fill="green"/>
+    <rect x="110" width="100" height="100" fill="green"/>
+</svg>

Added: trunk/LayoutTests/svg/custom/href-svg-namespace-animate-target.svg (0 => 249216)


--- trunk/LayoutTests/svg/custom/href-svg-namespace-animate-target.svg	                        (rev 0)
+++ trunk/LayoutTests/svg/custom/href-svg-namespace-animate-target.svg	2019-08-28 19:57:00 UTC (rev 249216)
@@ -0,0 +1,7 @@
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+    <desc>Verify the XLinkNames namespace is not requried before the 'href' attribute of the SVG animate elements.</desc>
+    <rect id="rect1" width="100" height="100" fill="red"/>
+    <set id="set" attributeName="fill" attributeType="CSS" href=""  to="green" begin="0s" fill="freeze"/> 
+    <rect id="rect2" x="110" width="100" height="100" fill="red"/>
+    <set id="set" attributeName="fill" attributeType="CSS" xlink:href=""  to="green" begin="0s" fill="freeze"/> 
+</svg>

Modified: trunk/Source/WebCore/ChangeLog (249215 => 249216)


--- trunk/Source/WebCore/ChangeLog	2019-08-28 19:51:06 UTC (rev 249215)
+++ trunk/Source/WebCore/ChangeLog	2019-08-28 19:57:00 UTC (rev 249216)
@@ -1,3 +1,18 @@
+2019-08-28  Said Abou-Hallawa  <[email protected]>
+
+        XLinkNames namespace is required before the 'href' attribute of SVG animate elements
+        https://bugs.webkit.org/show_bug.cgi?id=201227
+
+        Reviewed by Ryosuke Niwa.
+
+        To get the animation target element, get the value of the "href" attribute
+        or the "xlink:href" attribute.
+
+        Tests: svg/custom/href-svg-namespace-animate-target.svg
+
+        * svg/animation/SVGSMILElement.cpp:
+        (WebCore::SVGSMILElement::buildPendingResource):
+
 2019-08-28  Truitt Savell  <[email protected]>
 
         Unreviewed, rolling out r249209.

Modified: trunk/Source/WebCore/svg/animation/SVGSMILElement.cpp (249215 => 249216)


--- trunk/Source/WebCore/svg/animation/SVGSMILElement.cpp	2019-08-28 19:51:06 UTC (rev 249215)
+++ trunk/Source/WebCore/svg/animation/SVGSMILElement.cpp	2019-08-28 19:57:00 UTC (rev 249216)
@@ -181,7 +181,7 @@
 
     String id;
     RefPtr<Element> target;
-    auto& href = ""
+    auto& href = "" XLinkNames::hrefAttr);
     if (href.isEmpty())
         target = parentElement();
     else {
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to