Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8)

Unified Diff: third_party/WebKit/LayoutTests/svg/custom/duplicate-ids-addition-before.html

Issue 2722543002: Improve handling of duplicate id's for SVG resources (Closed)
Patch Set: Rebase Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/svg/custom/duplicate-ids-addition-before.html
diff --git a/third_party/WebKit/LayoutTests/svg/custom/duplicate-ids-addition-before.html b/third_party/WebKit/LayoutTests/svg/custom/duplicate-ids-addition-before.html
new file mode 100644
index 0000000000000000000000000000000000000000..921dc56f91826c3b3316ea0cde7ffff96a65e878
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/svg/custom/duplicate-ids-addition-before.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<script src="../../resources/run-after-layout-and-paint.js"></script>
+<svg>
+ <linearGradient id="f">
+ <stop stop-color="red"/>
+ </linearGradient>
+ <rect width="100" height="100" fill="url(#f) orange"/>
+</svg>
+<script>
+runAfterLayoutAndPaint(function() {
+ const svgNs = 'http://www.w3.org/2000/svg';
+ let gradient = document.createElementNS(svgNs, 'linearGradient');
+ let stop = gradient.appendChild(document.createElementNS(svgNs, 'stop'));
+ stop.setAttribute('stop-color', 'green');
+ gradient.id = 'f';
+
+ let existingGradient = document.getElementById('f');
+ document.querySelector('svg').insertBefore(gradient, existingGradient);
+}, true);
+</script>

Powered by Google App Engine
This is Rietveld 408576698