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

Unified Diff: LayoutTests/svg/custom/use-attribute-invalidations.html

Issue 252903004: Avoid using SVGElementInstance in calcViewport (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase one more time 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
Index: LayoutTests/svg/custom/use-attribute-invalidations.html
diff --git a/LayoutTests/svg/custom/use-attribute-invalidations.html b/LayoutTests/svg/custom/use-attribute-invalidations.html
new file mode 100644
index 0000000000000000000000000000000000000000..7817ca481f4b3abfc8809b365e366a7a0e95ac68
--- /dev/null
+++ b/LayoutTests/svg/custom/use-attribute-invalidations.html
@@ -0,0 +1,27 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+This test passes if there are three green squares below:<br>
+<svg width="300" height="300">
+ <defs>
+ <symbol id="symbol" width="100">
+ <rect width="100%" height="100%" fill="green"/>
+ </symbol>
+ </defs>
+ <svg x="0" y="0" width="100" height="100">
+ <use id="use1" xlink:href="#symbol"/>
+ </svg>
+ <use id="use2" xlink:href="#symbol" x="100" y="100" width="10" height="100"/>
+ <use id="use3" xlink:href="#symbol" x="200" y="200" width="100" height="10"/>
+</svg>
+<script>
+ onload = function() {
+ // Wait until first layout is finished.
+ window.requestAnimationFrame(function() {
+ document.getElementById('use2').removeAttribute('width');
+ document.getElementById('use3').setAttribute('height', '100');
+ });
+ }
+</script>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698