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

Unified Diff: LayoutTests/svg/dynamic-updates/SVGUseElement-target-changed.html

Issue 234633004: Update <use> trees when the referenced element is changed. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 8 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
« no previous file with comments | « no previous file | LayoutTests/svg/dynamic-updates/SVGUseElement-target-changed-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/svg/dynamic-updates/SVGUseElement-target-changed.html
diff --git a/LayoutTests/svg/dynamic-updates/SVGUseElement-target-changed.html b/LayoutTests/svg/dynamic-updates/SVGUseElement-target-changed.html
new file mode 100644
index 0000000000000000000000000000000000000000..e233f2832d167a04091a29917760369bd89a99f5
--- /dev/null
+++ b/LayoutTests/svg/dynamic-updates/SVGUseElement-target-changed.html
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+
+<style>
+ svg { width: 500px; height: 500px; }
+</style>
+
+<script src="../../resources/js-test.js"></script>
+
+<svg viewBox="0 0 1000 1000" version="1.1">
+ <defs id="defs">
+ <ellipse id="ellipse" cx="200" cy="150" rx="200" ry="150" fill="salmon"/>
+ </defs>
+ <use id="use" x="0" y="0" xlink:href="#ellipse"/>
+</svg>
+
+<script>
+description("Adding or removing the element referenced by <use> should update the rendering.");
+
+var defs = document.getElementById("defs");
+var use = document.getElementById("use");
+var ellipse = document.getElementById("ellipse");
+var bigElipse = ellipse.cloneNode(true);
+bigElipse.setAttribute("rx", "500");
+
+shouldBe("use.getBoundingClientRect().width", "200");
+
+ellipse.remove();
+shouldBe("use.getBoundingClientRect().width", "0");
+
+defs.appendChild(bigElipse);
+shouldBe("use.getBoundingClientRect().width", "500");
+</script>
« no previous file with comments | « no previous file | LayoutTests/svg/dynamic-updates/SVGUseElement-target-changed-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698