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

Side by Side Diff: third_party/WebKit/LayoutTests/svg/custom/duplicate-ids-addition.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 unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <script src="../../resources/run-after-layout-and-paint.js"></script>
3 <svg>
4 <linearGradient id="f">
5 <stop stop-color="green"/>
6 </linearGradient>
7 <rect width="100" height="100" fill="url(#f) orange"/>
8 </svg>
9 <script>
10 runAfterLayoutAndPaint(function() {
11 const svgNs = 'http://www.w3.org/2000/svg';
12 let gradient = document.createElementNS(svgNs, 'linearGradient');
13 let stop = gradient.appendChild(document.createElementNS(svgNs, 'stop'));
14 stop.setAttribute('stop-color', 'red');
15 gradient.id = 'f';
16
17 let rect = document.querySelector('rect');
18 document.querySelector('svg').insertBefore(gradient, rect);
19 rect.getBoundingClientRect();
20 rect.setAttribute('stroke-width', 0);
21 }, true);
22 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698