Diff
Modified: trunk/LayoutTests/ChangeLog (234682 => 234683)
--- trunk/LayoutTests/ChangeLog 2018-08-08 00:34:46 UTC (rev 234682)
+++ trunk/LayoutTests/ChangeLog 2018-08-08 00:55:51 UTC (rev 234683)
@@ -1,3 +1,23 @@
+2018-08-07 Said Abou-Hallawa <[email protected]>
+
+ Allow href attribute without xlink on SVG elements
+ https://bugs.webkit.org/show_bug.cgi?id=153854
+
+ Reviewed by Dean Jackson.
+
+ * fast/selectors/any-link-basics-2-expected.txt:
+ * fast/selectors/any-link-basics-2.html:
+ Re-baseline this test because it was assuming the bare href should not
+ work for the SVG <a> element.
+ * svg/custom/href-svg-namespace-animate-expected.svg: Added.
+ * svg/custom/href-svg-namespace-animate.svg: Added.
+ * svg/custom/href-svg-namespace-dynamic-expected.svg: Added.
+ * svg/custom/href-svg-namespace-dynamic.svg: Added.
+ * svg/custom/href-svg-namespace-elements-expected.txt: Added.
+ * svg/custom/href-svg-namespace-elements.html: Added.
+ * svg/custom/href-svg-namespace-static-expected.svg: Added.
+ * svg/custom/href-svg-namespace.static-svg: Added.
+
2018-08-07 Ryosuke Niwa <[email protected]>
document.open and document.write must throw while the HTML parser is synchronously constructing a custom element
Modified: trunk/LayoutTests/fast/selectors/any-link-basics-2-expected.txt (234682 => 234683)
--- trunk/LayoutTests/fast/selectors/any-link-basics-2-expected.txt 2018-08-08 00:34:46 UTC (rev 234682)
+++ trunk/LayoutTests/fast/selectors/any-link-basics-2-expected.txt 2018-08-08 00:55:51 UTC (rev 234683)
@@ -3,7 +3,7 @@
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-PASS document.querySelectorAll(":any-link").length is 21
+PASS document.querySelectorAll(":any-link").length is 25
PASS document.querySelectorAll(":any-link")[0] is document.getElementById("target-tag-2")
PASS document.querySelectorAll(":any-link")[1] is document.getElementById("target-tag-3")
PASS document.querySelectorAll(":any-link")[2] is document.getElementById("target-tag-4")
@@ -21,10 +21,14 @@
PASS document.querySelectorAll(":any-link")[14] is document.getElementById("target-tag-23")
PASS document.querySelectorAll(":any-link")[15] is document.getElementById("target-tag-24")
PASS document.querySelectorAll(":any-link")[16] is document.getElementById("target-tag-25")
-PASS document.querySelectorAll(":any-link")[17] is document.getElementById("target-tag-31")
-PASS document.querySelectorAll(":any-link")[18] is document.getElementById("target-tag-32")
-PASS document.querySelectorAll(":any-link")[19] is document.getElementById("target-tag-33")
-PASS document.querySelectorAll(":any-link")[20] is document.getElementById("target-tag-34")
+PASS document.querySelectorAll(":any-link")[17] is document.getElementById("target-tag-27")
+PASS document.querySelectorAll(":any-link")[18] is document.getElementById("target-tag-28")
+PASS document.querySelectorAll(":any-link")[19] is document.getElementById("target-tag-29")
+PASS document.querySelectorAll(":any-link")[20] is document.getElementById("target-tag-30")
+PASS document.querySelectorAll(":any-link")[21] is document.getElementById("target-tag-31")
+PASS document.querySelectorAll(":any-link")[22] is document.getElementById("target-tag-32")
+PASS document.querySelectorAll(":any-link")[23] is document.getElementById("target-tag-33")
+PASS document.querySelectorAll(":any-link")[24] is document.getElementById("target-tag-34")
PASS getComputedStyle(document.getElementById("target-tag-1")).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.getElementById("target-tag-2")).backgroundColor is "rgb(1, 2, 3)"
PASS getComputedStyle(document.getElementById("target-tag-3")).backgroundColor is "rgb(1, 2, 3)"
@@ -51,10 +55,10 @@
PASS getComputedStyle(document.getElementById("target-tag-24")).backgroundColor is "rgb(1, 2, 3)"
PASS getComputedStyle(document.getElementById("target-tag-25")).backgroundColor is "rgb(1, 2, 3)"
PASS getComputedStyle(document.getElementById("target-tag-26")).backgroundColor is "rgb(255, 255, 255)"
-PASS getComputedStyle(document.getElementById("target-tag-27")).backgroundColor is "rgb(255, 255, 255)"
-PASS getComputedStyle(document.getElementById("target-tag-28")).backgroundColor is "rgb(255, 255, 255)"
-PASS getComputedStyle(document.getElementById("target-tag-29")).backgroundColor is "rgb(255, 255, 255)"
-PASS getComputedStyle(document.getElementById("target-tag-30")).backgroundColor is "rgb(255, 255, 255)"
+PASS getComputedStyle(document.getElementById("target-tag-27")).backgroundColor is "rgb(1, 2, 3)"
+PASS getComputedStyle(document.getElementById("target-tag-28")).backgroundColor is "rgb(1, 2, 3)"
+PASS getComputedStyle(document.getElementById("target-tag-29")).backgroundColor is "rgb(1, 2, 3)"
+PASS getComputedStyle(document.getElementById("target-tag-30")).backgroundColor is "rgb(1, 2, 3)"
PASS getComputedStyle(document.getElementById("target-tag-31")).backgroundColor is "rgb(1, 2, 3)"
PASS getComputedStyle(document.getElementById("target-tag-32")).backgroundColor is "rgb(1, 2, 3)"
PASS getComputedStyle(document.getElementById("target-tag-33")).backgroundColor is "rgb(1, 2, 3)"
Modified: trunk/LayoutTests/fast/selectors/any-link-basics-2.html (234682 => 234683)
--- trunk/LayoutTests/fast/selectors/any-link-basics-2.html 2018-08-08 00:34:46 UTC (rev 234682)
+++ trunk/LayoutTests/fast/selectors/any-link-basics-2.html 2018-08-08 00:55:51 UTC (rev 234683)
@@ -76,8 +76,6 @@
<script>
description('Test the basic matching of the :any-link selector.');
-shouldBe('document.querySelectorAll(":any-link").length', '21');
-
// Query Selector.
var expectedIds = ['target-tag-2',
'target-tag-3',
@@ -96,11 +94,17 @@
'target-tag-23',
'target-tag-24',
'target-tag-25',
+ 'target-tag-27',
+ 'target-tag-28',
+ 'target-tag-29',
+ 'target-tag-30',
'target-tag-31',
'target-tag-32',
'target-tag-33',
'target-tag-34'];
+shouldBe('document.querySelectorAll(":any-link").length', expectedIds.length.toString());
+
for (var i = 0; i < expectedIds.length; ++i)
shouldBe('document.querySelectorAll(":any-link")[' + i + ']', 'document.getElementById("' + expectedIds[i] + '")');
@@ -131,10 +135,10 @@
['target-tag-24', 'rgb(1, 2, 3)'],
['target-tag-25', 'rgb(1, 2, 3)'],
['target-tag-26', 'rgb(255, 255, 255)'],
- ['target-tag-27', 'rgb(255, 255, 255)'],
- ['target-tag-28', 'rgb(255, 255, 255)'],
- ['target-tag-29', 'rgb(255, 255, 255)'],
- ['target-tag-30', 'rgb(255, 255, 255)'],
+ ['target-tag-27', 'rgb(1, 2, 3)'],
+ ['target-tag-28', 'rgb(1, 2, 3)'],
+ ['target-tag-29', 'rgb(1, 2, 3)'],
+ ['target-tag-30', 'rgb(1, 2, 3)'],
['target-tag-31', 'rgb(1, 2, 3)'],
['target-tag-32', 'rgb(1, 2, 3)'],
['target-tag-33', 'rgb(1, 2, 3)'],
Added: trunk/LayoutTests/svg/custom/href-svg-namespace-animate-expected.svg (0 => 234683)
--- trunk/LayoutTests/svg/custom/href-svg-namespace-animate-expected.svg (rev 0)
+++ trunk/LayoutTests/svg/custom/href-svg-namespace-animate-expected.svg 2018-08-08 00:55:51 UTC (rev 234683)
@@ -0,0 +1,6 @@
+<svg xmlns="http://www.w3.org/2000/svg">
+ <rect x="10" y="10" width="100" height="100" fill="green" />
+ <rect x="120" y="10" width="100" height="100" fill="green" />
+ <rect x="230" y="10" width="100" height="100" fill="green" />
+ <rect x="340" y="10" width="100" height="100" fill="green" />
+</svg>
Added: trunk/LayoutTests/svg/custom/href-svg-namespace-animate.svg (0 => 234683)
--- trunk/LayoutTests/svg/custom/href-svg-namespace-animate.svg (rev 0)
+++ trunk/LayoutTests/svg/custom/href-svg-namespace-animate.svg 2018-08-08 00:55:51 UTC (rev 234683)
@@ -0,0 +1,35 @@
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+ <defs>
+ <rect id="red" width="100" height="100" fill="red"/>
+ <rect id="green" width="100" height="100" fill="green"/>
+ </defs>
+ <use x="10" y="10" width="100" height="100">
+ <animate attributeName="xlink:href" from="#red" dur="50ms" to="#green" fill="freeze"/>
+ </use>
+ <use x="120" y="10" width="100" height="100" xlink:href=""
+ <animate attributeName="xlink:href" from="#red" dur="60ms" to="#green" fill="freeze"/>
+ </use>
+ <use x="230" y="10" width="100" height="100">
+ <animate attributeName="href" from="#red" dur="70ms" to="#green" fill="freeze"/>
+ </use>
+ <use x="340" y="10" width="100" height="100" href=""
+ <animate attributeName="href" from="#red" dur="80ms" to="#green" fill="freeze"/>
+ </use>
+ <script>
+ if (window.testRunner)
+ testRunner.waitUntilDone();
+
+ var elements = document.querySelectorAll("animate");
+ var count = elements.length;
+
+ for (var i = count; i--; )
+ elements[i].addEventListener("endEvent", endAnimate, false);
+
+ function endAnimate() {
+ if (--count === 0) {
+ if (window.testRunner)
+ testRunner.notifyDone();
+ }
+ }
+ </script>
+</svg>
Added: trunk/LayoutTests/svg/custom/href-svg-namespace-dynamic-expected.svg (0 => 234683)
--- trunk/LayoutTests/svg/custom/href-svg-namespace-dynamic-expected.svg (rev 0)
+++ trunk/LayoutTests/svg/custom/href-svg-namespace-dynamic-expected.svg 2018-08-08 00:55:51 UTC (rev 234683)
@@ -0,0 +1,6 @@
+<svg xmlns="http://www.w3.org/2000/svg">
+ <rect x="10" y="10" width="100" height="100" fill="green" />
+ <rect x="120" y="10" width="100" height="100" fill="green" />
+ <rect x="230" y="10" width="100" height="100" fill="green" />
+ <rect x="340" y="10" width="100" height="100" fill="green" />
+</svg>
Added: trunk/LayoutTests/svg/custom/href-svg-namespace-dynamic.svg (0 => 234683)
--- trunk/LayoutTests/svg/custom/href-svg-namespace-dynamic.svg (rev 0)
+++ trunk/LayoutTests/svg/custom/href-svg-namespace-dynamic.svg 2018-08-08 00:55:51 UTC (rev 234683)
@@ -0,0 +1,17 @@
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+ <defs>
+ <rect id="red" width="100" height="100" fill="red"/>
+ <rect id="green" width="100" height="100" fill="green"/>
+ </defs>
+ <use x="10" y="10" width="100" height="100" href="" />
+ <use x="120" y="10" width="100" height="100" href="" />
+ <use x="230" y="10" width="100" height="100" xmlns:href="" />
+ <use x="340" y="10" width="100" height="100" xmlns:href="" />
+ <script>
+ var elements = document.querySelectorAll("use");
+ elements[0].setAttribute("href", "#green");
+ elements[1].href.baseVal = "#green";
+ elements[2].setAttribute("href", "#green");
+ elements[3].href.baseVal = "#green";
+ </script>
+</svg>
Added: trunk/LayoutTests/svg/custom/href-svg-namespace-elements-expected.txt (0 => 234683)
--- trunk/LayoutTests/svg/custom/href-svg-namespace-elements-expected.txt (rev 0)
+++ trunk/LayoutTests/svg/custom/href-svg-namespace-elements-expected.txt 2018-08-08 00:55:51 UTC (rev 234683)
@@ -0,0 +1,90 @@
+Ensures the svg href attribute can work without having to be prefixed by the xlink namespace.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS window.element.tagName is "a"
+PASS window.element.getAttributeNS('http://www.w3.org/1999/xlink', 'href') is "www.webkit.org"
+PASS window.element.getAttribute('href') is "www.webkit.org"
+PASS window.element.getAttributeNS('http://www.w3.org/1999/xlink', 'href') is null
+PASS window.element.getAttribute('href') is "www.build.webkit.org"
+PASS window.element.getAttributeNS('http://www.w3.org/1999/xlink', 'href') is null
+PASS window.element.getAttributeNS('http://www.w3.org/2000/svg', 'href') is null
+PASS window.element.getAttribute('href') is "www.build.webkit.org"
+PASS window.element.href.baseVal is "www.build.webkit.org"
+PASS window.element.tagName is "feImage"
+PASS window.element.getAttributeNS('http://www.w3.org/1999/xlink', 'href') is "resources/red-checker.png"
+PASS window.element.getAttribute('href') is "resources/red-checker.png"
+PASS window.element.getAttributeNS('http://www.w3.org/1999/xlink', 'href') is null
+PASS window.element.getAttribute('href') is "resources/green-checker.png"
+PASS window.element.getAttributeNS('http://www.w3.org/1999/xlink', 'href') is null
+PASS window.element.getAttributeNS('http://www.w3.org/2000/svg', 'href') is null
+PASS window.element.getAttribute('href') is "resources/green-checker.png"
+PASS window.element.href.baseVal is "resources/green-checker.png"
+PASS window.element.tagName is "filter"
+PASS window.element.getAttributeNS('http://www.w3.org/1999/xlink', 'href') is "base-filter-1"
+PASS window.element.getAttribute('href') is "base-filter-1"
+PASS window.element.getAttributeNS('http://www.w3.org/1999/xlink', 'href') is null
+PASS window.element.getAttribute('href') is "base-filter-2"
+PASS window.element.getAttributeNS('http://www.w3.org/1999/xlink', 'href') is null
+PASS window.element.getAttributeNS('http://www.w3.org/2000/svg', 'href') is null
+PASS window.element.getAttribute('href') is "base-filter-2"
+PASS window.element.href.baseVal is "base-filter-2"
+PASS window.element.tagName is "image"
+PASS window.element.getAttributeNS('http://www.w3.org/1999/xlink', 'href') is "resources/red-checker.png"
+PASS window.element.getAttribute('href') is "resources/red-checker.png"
+PASS window.element.getAttributeNS('http://www.w3.org/1999/xlink', 'href') is null
+PASS window.element.getAttribute('href') is "resources/green-checker.png"
+PASS window.element.getAttributeNS('http://www.w3.org/1999/xlink', 'href') is null
+PASS window.element.getAttributeNS('http://www.w3.org/2000/svg', 'href') is null
+PASS window.element.getAttribute('href') is "resources/green-checker.png"
+PASS window.element.href.baseVal is "resources/green-checker.png"
+PASS window.element.tagName is "linearGradient"
+PASS window.element.getAttributeNS('http://www.w3.org/1999/xlink', 'href') is "#base-linear-gradient-1"
+PASS window.element.getAttribute('href') is "#base-linear-gradient-1"
+PASS window.element.getAttributeNS('http://www.w3.org/1999/xlink', 'href') is null
+PASS window.element.getAttribute('href') is "#base-linear-gradient-2"
+PASS window.element.getAttributeNS('http://www.w3.org/1999/xlink', 'href') is null
+PASS window.element.getAttributeNS('http://www.w3.org/2000/svg', 'href') is null
+PASS window.element.getAttribute('href') is "#base-linear-gradient-2"
+PASS window.element.href.baseVal is "#base-linear-gradient-2"
+PASS window.element.tagName is "pattern"
+PASS window.element.getAttributeNS('http://www.w3.org/1999/xlink', 'href') is "#base-pattern-1"
+PASS window.element.getAttribute('href') is "#base-pattern-1"
+PASS window.element.getAttributeNS('http://www.w3.org/1999/xlink', 'href') is null
+PASS window.element.getAttribute('href') is "#base-pattern-2"
+PASS window.element.getAttributeNS('http://www.w3.org/1999/xlink', 'href') is null
+PASS window.element.getAttributeNS('http://www.w3.org/2000/svg', 'href') is null
+PASS window.element.getAttribute('href') is "#base-pattern-2"
+PASS window.element.href.baseVal is "#base-pattern-2"
+PASS window.element.tagName is "radialGradient"
+PASS window.element.getAttributeNS('http://www.w3.org/1999/xlink', 'href') is "#base-radial-gradient-1"
+PASS window.element.getAttribute('href') is "#base-radial-gradient-1"
+PASS window.element.getAttributeNS('http://www.w3.org/1999/xlink', 'href') is null
+PASS window.element.getAttribute('href') is "#base-radial-gradient-2"
+PASS window.element.getAttributeNS('http://www.w3.org/1999/xlink', 'href') is null
+PASS window.element.getAttributeNS('http://www.w3.org/2000/svg', 'href') is null
+PASS window.element.getAttribute('href') is "#base-radial-gradient-2"
+PASS window.element.href.baseVal is "#base-radial-gradient-2"
+PASS window.element.tagName is "textPath"
+PASS window.element.getAttributeNS('http://www.w3.org/1999/xlink', 'href') is "#text-path-1"
+PASS window.element.getAttribute('href') is "#text-path-1"
+PASS window.element.getAttributeNS('http://www.w3.org/1999/xlink', 'href') is null
+PASS window.element.getAttribute('href') is "#text-path-2"
+PASS window.element.getAttributeNS('http://www.w3.org/1999/xlink', 'href') is null
+PASS window.element.getAttributeNS('http://www.w3.org/2000/svg', 'href') is null
+PASS window.element.getAttribute('href') is "#text-path-2"
+PASS window.element.href.baseVal is "#text-path-2"
+PASS window.element.tagName is "use"
+PASS window.element.getAttributeNS('http://www.w3.org/1999/xlink', 'href') is "#red-rect"
+PASS window.element.getAttribute('href') is "#red-rect"
+PASS window.element.getAttributeNS('http://www.w3.org/1999/xlink', 'href') is null
+PASS window.element.getAttribute('href') is "#green-rect"
+PASS window.element.getAttributeNS('http://www.w3.org/1999/xlink', 'href') is null
+PASS window.element.getAttributeNS('http://www.w3.org/2000/svg', 'href') is null
+PASS window.element.getAttribute('href') is "#green-rect"
+PASS window.element.href.baseVal is "#green-rect"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Added: trunk/LayoutTests/svg/custom/href-svg-namespace-elements.html (0 => 234683)
--- trunk/LayoutTests/svg/custom/href-svg-namespace-elements.html (rev 0)
+++ trunk/LayoutTests/svg/custom/href-svg-namespace-elements.html 2018-08-08 00:55:51 UTC (rev 234683)
@@ -0,0 +1,42 @@
+<head>
+ <script src=""
+</head>
+<body>
+ <script>
+ description("Ensures the svg href attribute can work without having to be prefixed by the xlink namespace.");
+
+ var tagHrefTable = [
+ { tagName: "a", xlinkValue: "www.webkit.org", svgValue: "www.build.webkit.org" },
+ { tagName: "feImage", xlinkValue: "resources/red-checker.png", svgValue: "resources/green-checker.png" },
+ { tagName: "filter", xlinkValue: "base-filter-1", svgValue: "base-filter-2" },
+ { tagName: "image", xlinkValue: "resources/red-checker.png", svgValue: "resources/green-checker.png" },
+ { tagName: "linearGradient", xlinkValue: "#base-linear-gradient-1", svgValue: "#base-linear-gradient-2" },
+ { tagName: "pattern", xlinkValue: "#base-pattern-1", svgValue: "#base-pattern-2" },
+ { tagName: "radialGradient", xlinkValue: "#base-radial-gradient-1", svgValue: "#base-radial-gradient-2" },
+ { tagName: "textPath", xlinkValue: "#text-path-1", svgValue: "#text-path-2" },
+ { tagName: "use", xlinkValue: "#red-rect", svgValue: "#green-rect" },
+ ];
+
+ tagHrefTable.forEach(function(tagHref) {
+ window.element = document.createElementNS("http://www.w3.org/2000/svg", tagHref.tagName);
+ shouldBeEqualToString("window.element.tagName", tagHref.tagName);
+
+ window.element.setAttributeNS("http://www.w3.org/1999/xlink", "href", tagHref.xlinkValue);
+ shouldBeEqualToString("window.element.getAttributeNS('http://www.w3.org/1999/xlink', 'href')", tagHref.xlinkValue);
+ shouldBeEqualToString("window.element.getAttribute('href')", tagHref.xlinkValue);
+ window.element.removeAttributeNS('http://www.w3.org/1999/xlink', "href");
+
+ window.element.setAttributeNS("http://www.w3.org/2000/svg", "href", tagHref.svgValue);
+ shouldBeNull("window.element.getAttributeNS('http://www.w3.org/1999/xlink', 'href')");
+ shouldBeEqualToString("window.element.getAttribute('href')", tagHref.svgValue);
+ window.element.removeAttributeNS("http://www.w3.org/2000/svg", "href");
+
+ window.element.setAttribute("href", tagHref.svgValue);
+ shouldBeNull("window.element.getAttributeNS('http://www.w3.org/1999/xlink', 'href')");
+ shouldBeNull("window.element.getAttributeNS('http://www.w3.org/2000/svg', 'href')");
+ shouldBeEqualToString("window.element.getAttribute('href')", tagHref.svgValue);
+ shouldBeEqualToString("window.element.href.baseVal", tagHref.svgValue);
+ });
+ </script>
+ <script src=""
+</body>
Added: trunk/LayoutTests/svg/custom/href-svg-namespace-static-expected.svg (0 => 234683)
--- trunk/LayoutTests/svg/custom/href-svg-namespace-static-expected.svg (rev 0)
+++ trunk/LayoutTests/svg/custom/href-svg-namespace-static-expected.svg 2018-08-08 00:55:51 UTC (rev 234683)
@@ -0,0 +1,6 @@
+<svg xmlns="http://www.w3.org/2000/svg">
+ <rect x="10" y="10" width="100" height="100" fill="green" />
+ <rect x="120" y="10" width="100" height="100" fill="green" />
+ <rect x="230" y="10" width="100" height="100" fill="green" />
+ <rect x="340" y="10" width="100" height="100" fill="green" />
+</svg>
Added: trunk/LayoutTests/svg/custom/href-svg-namespace-static.svg (0 => 234683)
--- trunk/LayoutTests/svg/custom/href-svg-namespace-static.svg (rev 0)
+++ trunk/LayoutTests/svg/custom/href-svg-namespace-static.svg 2018-08-08 00:55:51 UTC (rev 234683)
@@ -0,0 +1,22 @@
+<svg xmlns="http://www.w3.org/2000/svg">
+ <defs>
+ <linearGradient id="gradient1">
+ <stop offset="0%" stop-color="green" />
+ <stop offset="100%" stop-color="green" />
+ </linearGradient>
+ <linearGradient id="gradient2" x1="0%" y1="0%" x2="100%" y2="0%" href=""
+ <pattern id="pattern1">
+ <rect width="100%" height="100%" fill="green"/>
+ </pattern>
+ <pattern id="pattern2" x="0" y="0" width="100" height="100" href=""
+ <rect id="rect" width="100" height="100"/>
+ </defs>
+ <rect x="10" y="10" width="100" height="100" fill="url(#gradient2)" />
+ <rect x="120" y="10" width="100" height="100" fill="url(#pattern2)" />
+ <image x="230" y="10" width="100" height="100"
+ href=""
+ PHN2ZyB3aWR0aD0iMTAwIiBoZWlnaHQ9IjEwMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICAgI
+ DxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDBweCIgaGVpZ2h0PSIxMDBweCIgZmlsbD0iZ3JlZW4iLz4KPC9zdmc+"
+ />
+ <use x="340" y="10" width="100" height="100" href="" fill="green"/>
+</svg>
Modified: trunk/Source/WebCore/ChangeLog (234682 => 234683)
--- trunk/Source/WebCore/ChangeLog 2018-08-08 00:34:46 UTC (rev 234682)
+++ trunk/Source/WebCore/ChangeLog 2018-08-08 00:55:51 UTC (rev 234683)
@@ -1,3 +1,76 @@
+2018-08-07 Said Abou-Hallawa <[email protected]>
+
+ Allow href attribute without xlink on SVG elements
+ https://bugs.webkit.org/show_bug.cgi?id=153854
+
+ Reviewed by Dean Jackson.
+
+ SVG 2 has moved the href attribute from xlink namespace to svg namespace.
+ Instead of using xlink:href, svg:href should be used or simply use href
+ if the svg namespace is defined.
+
+ See https://www.w3.org/TR/SVG2/linking.html#XLinkRefAttrs.
+
+ For backward compatibility, xlink:href will be treated as an alias to href
+ till it is acceptable to completely remove the support for the deprecated
+ xlink:href.
+
+ Tests: svg/custom/href-svg-namespace-animate.svg
+ svg/custom/href-svg-namespace-dynamic.svg
+ svg/custom/href-svg-namespace-elements.html
+ svg/custom/href-svg-namespace-expected.svg
+ svg/custom/href-svg-namespace-static.svg
+
+ * dom/Element.cpp:
+ (WebCore::Element::absoluteLinkURL const):
+ * dom/Element.h:
+ (WebCore::Element::getAttribute const): This new template function with
+ template pack parameter QualifiedNames is added to return the first none
+ empty attribute value given a set of attributes' names. This should be
+ useful for deprecated attributes. When we decide to remove the support
+ for the deprecated attribute, all we need is to remove it as a parameter
+ to getAttribute(). In this case, the none template function will be called.
+ * dom/VisitedLinkState.cpp:
+ (WebCore::linkAttribute):
+ * html/parser/XSSAuditor.cpp:
+ (WebCore::XSSAuditor::filterScriptToken):
+ * svg/SVGAElement.cpp:
+ (WebCore::SVGAElement::isURLAttribute const):
+ * svg/SVGAltGlyphElement.cpp:
+ (WebCore::SVGAltGlyphElement::hasValidGlyphElements const):
+ * svg/SVGCursorElement.cpp:
+ * svg/SVGDocumentExtensions.cpp:
+ (WebCore::SVGDocumentExtensions::rebuildElements):
+ (WebCore::SVGDocumentExtensions::rebuildAllElementReferencesForTarget):
+ * svg/SVGElement.cpp:
+ (WebCore::SVGElement::animatableAttributeForName):
+ * svg/SVGFEImageElement.cpp:
+ * svg/SVGFilterElement.cpp:
+ * svg/SVGFontFaceUriElement.cpp:
+ (WebCore::SVGFontFaceUriElement::srcValue const):
+ (WebCore::SVGFontFaceUriElement::parseAttribute):
+ (WebCore::SVGFontFaceUriElement::loadFont):
+ * svg/SVGForeignObjectElement.cpp:
+ * svg/SVGGlyphRefElement.cpp:
+ (WebCore::SVGGlyphRefElement::hasValidGlyphElement const):
+ * svg/SVGGradientElement.cpp:
+ * svg/SVGImageElement.cpp:
+ (WebCore::SVGImageElement::imageSourceURL const):
+ * svg/SVGMPathElement.cpp:
+ * svg/SVGPatternElement.cpp:
+ * svg/SVGScriptElement.h:
+ * svg/SVGTRefElement.cpp:
+ * svg/SVGTextPathElement.cpp:
+ * svg/SVGURIReference.cpp:
+ (WebCore::SVGURIReference::registerAttributes):
+ (WebCore::SVGURIReference::parseAttribute):
+ * svg/SVGUseElement.cpp:
+ (WebCore::SVGUseElement::expandUseElementsInShadowTree const):
+ * svg/animation/SVGSMILElement.cpp:
+ (WebCore::SVGSMILElement::isSupportedAttribute):
+ (WebCore::SVGSMILElement::svgAttributeChanged):
+ * svg/svgattrs.in:
+
2018-08-07 Ryosuke Niwa <[email protected]>
document.open and document.write must throw while the HTML parser is synchronously constructing a custom element
Modified: trunk/Source/WebCore/dom/Element.cpp (234682 => 234683)
--- trunk/Source/WebCore/dom/Element.cpp 2018-08-08 00:34:46 UTC (rev 234682)
+++ trunk/Source/WebCore/dom/Element.cpp 2018-08-08 00:55:51 UTC (rev 234683)
@@ -1472,7 +1472,7 @@
AtomicString linkAttribute;
if (hasTagName(SVGNames::aTag))
- linkAttribute = getAttribute(XLinkNames::hrefAttr);
+ linkAttribute = getAttribute(SVGNames::hrefAttr, XLinkNames::hrefAttr);
else
linkAttribute = getAttribute(HTMLNames::hrefAttr);
Modified: trunk/Source/WebCore/dom/Element.h (234682 => 234683)
--- trunk/Source/WebCore/dom/Element.h 2018-08-08 00:34:46 UTC (rev 234682)
+++ trunk/Source/WebCore/dom/Element.h 2018-08-08 00:55:51 UTC (rev 234683)
@@ -76,6 +76,8 @@
WEBCORE_EXPORT bool hasAttribute(const QualifiedName&) const;
WEBCORE_EXPORT const AtomicString& getAttribute(const QualifiedName&) const;
+ template<typename... QualifiedNames>
+ const AtomicString& getAttribute(const QualifiedName&, const QualifiedNames&...) const;
WEBCORE_EXPORT void setAttribute(const QualifiedName&, const AtomicString& value);
WEBCORE_EXPORT void setAttributeWithoutSynchronization(const QualifiedName&, const AtomicString& value);
void setSynchronizedLazyAttribute(const QualifiedName&, const AtomicString& value);
@@ -817,6 +819,15 @@
invalidateStyleForSubtree();
}
+template<typename... QualifiedNames>
+inline const AtomicString& Element::getAttribute(const QualifiedName& name, const QualifiedNames&... names) const
+{
+ const AtomicString& value = getAttribute(name);
+ if (!value.isEmpty())
+ return value;
+ return getAttribute(names...);
+}
+
} // namespace WebCore
SPECIALIZE_TYPE_TRAITS_BEGIN(WebCore::Element)
Modified: trunk/Source/WebCore/dom/VisitedLinkState.cpp (234682 => 234683)
--- trunk/Source/WebCore/dom/VisitedLinkState.cpp 2018-08-08 00:34:46 UTC (rev 234682)
+++ trunk/Source/WebCore/dom/VisitedLinkState.cpp 2018-08-08 00:55:51 UTC (rev 234683)
@@ -33,6 +33,7 @@
#include "Frame.h"
#include "HTMLAnchorElement.h"
#include "Page.h"
+#include "SVGNames.h"
#include "VisitedLinkStore.h"
#include "XLinkNames.h"
@@ -47,7 +48,7 @@
if (element.isHTMLElement())
return &element.attributeWithoutSynchronization(HTMLNames::hrefAttr);
if (element.isSVGElement())
- return &element.getAttribute(XLinkNames::hrefAttr);
+ return &element.getAttribute(SVGNames::hrefAttr, XLinkNames::hrefAttr);
return 0;
}
Modified: trunk/Source/WebCore/html/parser/XSSAuditor.cpp (234682 => 234683)
--- trunk/Source/WebCore/html/parser/XSSAuditor.cpp 2018-08-08 00:34:46 UTC (rev 234682)
+++ trunk/Source/WebCore/html/parser/XSSAuditor.cpp 2018-08-08 00:55:51 UTC (rev 234683)
@@ -447,6 +447,7 @@
bool didBlockScript = false;
if (m_wasScriptTagFoundInRequest) {
didBlockScript |= eraseAttributeIfInjected(request, srcAttr, blankURL().string(), TruncationStyle::SrcLikeAttribute);
+ didBlockScript |= eraseAttributeIfInjected(request, SVGNames::hrefAttr, blankURL().string(), TruncationStyle::SrcLikeAttribute);
didBlockScript |= eraseAttributeIfInjected(request, XLinkNames::hrefAttr, blankURL().string(), TruncationStyle::SrcLikeAttribute);
}
Modified: trunk/Source/WebCore/svg/SVGAElement.cpp (234682 => 234683)
--- trunk/Source/WebCore/svg/SVGAElement.cpp 2018-08-08 00:34:46 UTC (rev 234682)
+++ trunk/Source/WebCore/svg/SVGAElement.cpp 2018-08-08 00:55:51 UTC (rev 234683)
@@ -171,7 +171,7 @@
bool SVGAElement::isURLAttribute(const Attribute& attribute) const
{
- return attribute.name().localName() == XLinkNames::hrefAttr || SVGGraphicsElement::isURLAttribute(attribute);
+ return SVGURIReference::isKnownAttribute(attribute.name()) || SVGGraphicsElement::isURLAttribute(attribute);
}
bool SVGAElement::isMouseFocusable() const
Modified: trunk/Source/WebCore/svg/SVGAltGlyphElement.cpp (234682 => 234683)
--- trunk/Source/WebCore/svg/SVGAltGlyphElement.cpp 2018-08-08 00:34:46 UTC (rev 234682)
+++ trunk/Source/WebCore/svg/SVGAltGlyphElement.cpp 2018-08-08 00:55:51 UTC (rev 234683)
@@ -82,7 +82,7 @@
bool SVGAltGlyphElement::hasValidGlyphElements(Vector<String>& glyphNames) const
{
String target;
- auto element = makeRefPtr(targetElementFromIRIString(getAttribute(XLinkNames::hrefAttr), document(), &target));
+ auto element = makeRefPtr(targetElementFromIRIString(getAttribute(SVGNames::hrefAttr, XLinkNames::hrefAttr), document(), &target));
if (is<SVGGlyphElement>(element)) {
glyphNames.append(target);
Modified: trunk/Source/WebCore/svg/SVGCursorElement.cpp (234682 => 234683)
--- trunk/Source/WebCore/svg/SVGCursorElement.cpp 2018-08-08 00:34:46 UTC (rev 234682)
+++ trunk/Source/WebCore/svg/SVGCursorElement.cpp 2018-08-08 00:55:51 UTC (rev 234683)
@@ -26,7 +26,6 @@
#include "Document.h"
#include "SVGNames.h"
#include "SVGStringList.h"
-#include "XLinkNames.h"
#include <wtf/IsoMallocInlines.h>
#include <wtf/NeverDestroyed.h>
Modified: trunk/Source/WebCore/svg/SVGDocumentExtensions.cpp (234682 => 234683)
--- trunk/Source/WebCore/svg/SVGDocumentExtensions.cpp 2018-08-08 00:34:46 UTC (rev 234682)
+++ trunk/Source/WebCore/svg/SVGDocumentExtensions.cpp 2018-08-08 00:55:51 UTC (rev 234683)
@@ -35,7 +35,6 @@
#include "SVGSVGElement.h"
#include "ScriptableDocumentParser.h"
#include "ShadowRoot.h"
-#include "XLinkNames.h"
#include <wtf/text/AtomicString.h>
namespace WebCore {
@@ -326,7 +325,7 @@
{
Vector<SVGElement*> shadowRebuildElements = WTFMove(m_rebuildElements);
for (auto* element : shadowRebuildElements)
- element->svgAttributeChanged(XLinkNames::hrefAttr);
+ element->svgAttributeChanged(SVGNames::hrefAttr);
}
void SVGDocumentExtensions::clearTargetDependencies(SVGElement& referencedElement)
@@ -356,7 +355,7 @@
elementsToRebuild.uncheckedAppend(element);
for (auto* element : elementsToRebuild)
- element->svgAttributeChanged(XLinkNames::hrefAttr);
+ element->svgAttributeChanged(SVGNames::hrefAttr);
}
void SVGDocumentExtensions::removeAllElementReferencesForTarget(SVGElement* referencedElement)
Modified: trunk/Source/WebCore/svg/SVGElement.cpp (234682 => 234683)
--- trunk/Source/WebCore/svg/SVGElement.cpp 2018-08-08 00:34:46 UTC (rev 234682)
+++ trunk/Source/WebCore/svg/SVGElement.cpp 2018-08-08 00:55:51 UTC (rev 234683)
@@ -50,7 +50,6 @@
#include "SVGTitleElement.h"
#include "SVGUseElement.h"
#include "ShadowRoot.h"
-#include "XLinkNames.h"
#include "XMLNames.h"
#include <wtf/Assertions.h>
#include <wtf/HashMap.h>
@@ -854,7 +853,7 @@
&SVGNames::yAttr.get(),
&SVGNames::yChannelSelectorAttr.get(),
&SVGNames::zAttr.get(),
- &XLinkNames::hrefAttr.get(),
+ &SVGNames::hrefAttr.get(),
};
HashMap<AtomicString, QualifiedName> map;
for (auto& name : names) {
Modified: trunk/Source/WebCore/svg/SVGFEImageElement.cpp (234682 => 234683)
--- trunk/Source/WebCore/svg/SVGFEImageElement.cpp 2018-08-08 00:34:46 UTC (rev 234682)
+++ trunk/Source/WebCore/svg/SVGFEImageElement.cpp 2018-08-08 00:55:51 UTC (rev 234683)
@@ -32,7 +32,6 @@
#include "RenderSVGResource.h"
#include "SVGNames.h"
#include "SVGPreserveAspectRatioValue.h"
-#include "XLinkNames.h"
#include <wtf/IsoMallocInlines.h>
namespace WebCore {
Modified: trunk/Source/WebCore/svg/SVGFilterElement.cpp (234682 => 234683)
--- trunk/Source/WebCore/svg/SVGFilterElement.cpp 2018-08-08 00:34:46 UTC (rev 234682)
+++ trunk/Source/WebCore/svg/SVGFilterElement.cpp 2018-08-08 00:55:51 UTC (rev 234683)
@@ -31,7 +31,6 @@
#include "SVGFilterPrimitiveStandardAttributes.h"
#include "SVGNames.h"
#include "SVGParserUtilities.h"
-#include "XLinkNames.h"
#include <wtf/IsoMallocInlines.h>
#include <wtf/NeverDestroyed.h>
Modified: trunk/Source/WebCore/svg/SVGFontFaceUriElement.cpp (234682 => 234683)
--- trunk/Source/WebCore/svg/SVGFontFaceUriElement.cpp 2018-08-08 00:34:46 UTC (rev 234682)
+++ trunk/Source/WebCore/svg/SVGFontFaceUriElement.cpp 2018-08-08 00:55:51 UTC (rev 234683)
@@ -58,7 +58,7 @@
Ref<CSSFontFaceSrcValue> SVGFontFaceUriElement::srcValue() const
{
- auto src = ""
+ auto src = "" XLinkNames::hrefAttr));
AtomicString value(attributeWithoutSynchronization(formatAttr));
src.get().setFormat(value.isEmpty() ? "svg" : value); // Default format
return src;
@@ -66,7 +66,7 @@
void SVGFontFaceUriElement::parseAttribute(const QualifiedName& name, const AtomicString& value)
{
- if (name == XLinkNames::hrefAttr)
+ if (name == SVGNames::hrefAttr || name == XLinkNames::hrefAttr)
loadFont();
else
SVGElement::parseAttribute(name, value);
@@ -101,7 +101,7 @@
if (m_cachedFont)
m_cachedFont->removeClient(*this);
- const AtomicString& href = ""
+ const AtomicString& href = "" XLinkNames::hrefAttr);
if (!href.isNull()) {
ResourceLoaderOptions options = CachedResourceLoader::defaultCachedResourceOptions();
options.contentSecurityPolicyImposition = isInUserAgentShadowTree() ? ContentSecurityPolicyImposition::SkipPolicyCheck : ContentSecurityPolicyImposition::DoPolicyCheck;
Modified: trunk/Source/WebCore/svg/SVGForeignObjectElement.cpp (234682 => 234683)
--- trunk/Source/WebCore/svg/SVGForeignObjectElement.cpp 2018-08-08 00:34:46 UTC (rev 234682)
+++ trunk/Source/WebCore/svg/SVGForeignObjectElement.cpp 2018-08-08 00:55:51 UTC (rev 234683)
@@ -27,7 +27,6 @@
#include "RenderSVGResource.h"
#include "SVGLengthValue.h"
#include "SVGNames.h"
-#include "XLinkNames.h"
#include <wtf/Assertions.h>
#include <wtf/IsoMallocInlines.h>
#include <wtf/NeverDestroyed.h>
Modified: trunk/Source/WebCore/svg/SVGGlyphRefElement.cpp (234682 => 234683)
--- trunk/Source/WebCore/svg/SVGGlyphRefElement.cpp 2018-08-08 00:34:46 UTC (rev 234682)
+++ trunk/Source/WebCore/svg/SVGGlyphRefElement.cpp 2018-08-08 00:55:51 UTC (rev 234683)
@@ -50,7 +50,7 @@
{
// FIXME: We only support xlink:href so far.
// https://bugs.webkit.org/show_bug.cgi?id=64787
- return is<SVGGlyphElement>(targetElementFromIRIString(getAttribute(XLinkNames::hrefAttr), document(), &glyphName));
+ return is<SVGGlyphElement>(targetElementFromIRIString(getAttribute(SVGNames::hrefAttr, XLinkNames::hrefAttr), document(), &glyphName));
}
static float parseFloat(const AtomicString& value)
Modified: trunk/Source/WebCore/svg/SVGGradientElement.cpp (234682 => 234683)
--- trunk/Source/WebCore/svg/SVGGradientElement.cpp 2018-08-08 00:34:46 UTC (rev 234682)
+++ trunk/Source/WebCore/svg/SVGGradientElement.cpp 2018-08-08 00:55:51 UTC (rev 234683)
@@ -32,7 +32,6 @@
#include "SVGTransformListValues.h"
#include "SVGTransformable.h"
#include "StyleResolver.h"
-#include "XLinkNames.h"
#include <wtf/IsoMallocInlines.h>
#include <wtf/NeverDestroyed.h>
Modified: trunk/Source/WebCore/svg/SVGImageElement.cpp (234682 => 234683)
--- trunk/Source/WebCore/svg/SVGImageElement.cpp 2018-08-08 00:34:46 UTC (rev 234682)
+++ trunk/Source/WebCore/svg/SVGImageElement.cpp 2018-08-08 00:55:51 UTC (rev 234683)
@@ -167,7 +167,7 @@
const AtomicString& SVGImageElement::imageSourceURL() const
{
- return getAttribute(XLinkNames::hrefAttr);
+ return getAttribute(SVGNames::hrefAttr, XLinkNames::hrefAttr);
}
void SVGImageElement::addSubresourceAttributeURLs(ListHashSet<URL>& urls) const
Modified: trunk/Source/WebCore/svg/SVGMPathElement.cpp (234682 => 234683)
--- trunk/Source/WebCore/svg/SVGMPathElement.cpp 2018-08-08 00:34:46 UTC (rev 234682)
+++ trunk/Source/WebCore/svg/SVGMPathElement.cpp 2018-08-08 00:55:51 UTC (rev 234683)
@@ -26,7 +26,6 @@
#include "SVGDocumentExtensions.h"
#include "SVGNames.h"
#include "SVGPathElement.h"
-#include "XLinkNames.h"
namespace WebCore {
Modified: trunk/Source/WebCore/svg/SVGPatternElement.cpp (234682 => 234683)
--- trunk/Source/WebCore/svg/SVGPatternElement.cpp 2018-08-08 00:34:46 UTC (rev 234682)
+++ trunk/Source/WebCore/svg/SVGPatternElement.cpp 2018-08-08 00:55:51 UTC (rev 234683)
@@ -38,7 +38,6 @@
#include "SVGRenderSupport.h"
#include "SVGStringList.h"
#include "SVGTransformable.h"
-#include "XLinkNames.h"
#include <wtf/IsoMallocInlines.h>
#include <wtf/NeverDestroyed.h>
Modified: trunk/Source/WebCore/svg/SVGScriptElement.h (234682 => 234683)
--- trunk/Source/WebCore/svg/SVGScriptElement.h 2018-08-08 00:34:46 UTC (rev 234682)
+++ trunk/Source/WebCore/svg/SVGScriptElement.h 2018-08-08 00:55:51 UTC (rev 234683)
@@ -67,7 +67,7 @@
bool hasAsyncAttribute() const final { return false; }
bool hasDeferAttribute() const final { return false; }
bool hasNoModuleAttribute() const final { return false; }
- bool hasSourceAttribute() const final { return hasAttribute(XLinkNames::hrefAttr); }
+ bool hasSourceAttribute() const final { return hasAttribute(SVGNames::hrefAttr) || hasAttribute(XLinkNames::hrefAttr); }
void dispatchLoadEvent() final { SVGExternalResourcesRequired::dispatchLoadEvent(); }
Modified: trunk/Source/WebCore/svg/SVGTRefElement.cpp (234682 => 234683)
--- trunk/Source/WebCore/svg/SVGTRefElement.cpp 2018-08-08 00:34:46 UTC (rev 234682)
+++ trunk/Source/WebCore/svg/SVGTRefElement.cpp 2018-08-08 00:55:51 UTC (rev 234683)
@@ -36,7 +36,6 @@
#include "ScriptDisallowedScope.h"
#include "StyleInheritedData.h"
#include "Text.h"
-#include "XLinkNames.h"
#include <wtf/IsoMallocInlines.h>
namespace WebCore {
Modified: trunk/Source/WebCore/svg/SVGTextPathElement.cpp (234682 => 234683)
--- trunk/Source/WebCore/svg/SVGTextPathElement.cpp 2018-08-08 00:34:46 UTC (rev 234682)
+++ trunk/Source/WebCore/svg/SVGTextPathElement.cpp 2018-08-08 00:55:51 UTC (rev 234683)
@@ -26,7 +26,6 @@
#include "RenderSVGTextPath.h"
#include "SVGDocumentExtensions.h"
#include "SVGNames.h"
-#include "XLinkNames.h"
#include <wtf/IsoMallocInlines.h>
#include <wtf/NeverDestroyed.h>
Modified: trunk/Source/WebCore/svg/SVGURIReference.cpp (234682 => 234683)
--- trunk/Source/WebCore/svg/SVGURIReference.cpp 2018-08-08 00:34:46 UTC (rev 234682)
+++ trunk/Source/WebCore/svg/SVGURIReference.cpp 2018-08-08 00:55:51 UTC (rev 234683)
@@ -41,6 +41,7 @@
auto& registry = attributeRegistry();
if (!registry.isEmpty())
return;
+ registry.registerAttribute<SVGNames::hrefAttr, &SVGURIReference::m_href>();
registry.registerAttribute<XLinkNames::hrefAttr, &SVGURIReference::m_href>();
}
@@ -56,7 +57,7 @@
void SVGURIReference::parseAttribute(const QualifiedName& name, const AtomicString& value)
{
- if (name.matches(XLinkNames::hrefAttr))
+ if (isKnownAttribute(name))
m_href.setValue(value);
}
Modified: trunk/Source/WebCore/svg/SVGUseElement.cpp (234682 => 234683)
--- trunk/Source/WebCore/svg/SVGUseElement.cpp 2018-08-08 00:34:46 UTC (rev 234682)
+++ trunk/Source/WebCore/svg/SVGUseElement.cpp 2018-08-08 00:55:51 UTC (rev 234683)
@@ -480,6 +480,7 @@
replacementClone->removeAttribute(SVGNames::yAttr);
replacementClone->removeAttribute(SVGNames::widthAttr);
replacementClone->removeAttribute(SVGNames::heightAttr);
+ replacementClone->removeAttribute(SVGNames::hrefAttr);
replacementClone->removeAttribute(XLinkNames::hrefAttr);
if (target)
Modified: trunk/Source/WebCore/svg/animation/SVGSMILElement.cpp (234682 => 234683)
--- trunk/Source/WebCore/svg/animation/SVGSMILElement.cpp 2018-08-08 00:34:46 UTC (rev 234682)
+++ trunk/Source/WebCore/svg/animation/SVGSMILElement.cpp 2018-08-08 00:55:51 UTC (rev 234683)
@@ -467,6 +467,7 @@
SVGNames::minAttr,
SVGNames::maxAttr,
SVGNames::attributeNameAttr,
+ SVGNames::hrefAttr,
XLinkNames::hrefAttr,
});
return supportedAttributes.get().contains<SVGAttributeHashTranslator>(attrName);
@@ -519,7 +520,7 @@
m_cachedMax = invalidCachedTime;
else if (attrName == SVGNames::attributeNameAttr)
updateAttributeName();
- else if (attrName.matches(XLinkNames::hrefAttr)) {
+ else if (attrName.matches(SVGNames::hrefAttr) || attrName.matches(XLinkNames::hrefAttr)) {
InstanceInvalidationGuard guard(*this);
buildPendingResource();
} else if (isConnected()) {
Modified: trunk/Source/WebCore/svg/svgattrs.in (234682 => 234683)
--- trunk/Source/WebCore/svg/svgattrs.in 2018-08-08 00:34:46 UTC (rev 234682)
+++ trunk/Source/WebCore/svg/svgattrs.in 2018-08-08 00:55:51 UTC (rev 234683)
@@ -87,6 +87,7 @@
horiz-adv-x
horiz-origin-x
horiz-origin-y
+href
ideographic
image-rendering
in