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

Unified Diff: third_party/WebKit/LayoutTests/svg/custom/object-current-scale.html

Issue 1827793003: Support currentScale for embedded SVG (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Ignore pageZoomFactor modification Created 4 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/object-current-scale.html
diff --git a/third_party/WebKit/LayoutTests/svg/custom/object-current-scale.html b/third_party/WebKit/LayoutTests/svg/custom/object-current-scale.html
new file mode 100644
index 0000000000000000000000000000000000000000..813276390e44884e335a853afd91f0d193e1ce36
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/svg/custom/object-current-scale.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<script src="../../resources/run-after-layout-and-paint.js"></script>
+<script>
+ if (window.testRunner)
+ testRunner.waitUntilDone();
+
+ function setScale() {
+ var obj = document.querySelector("object");
+ var svgdoc = obj.contentDocument;
+ var svgroot = svgdoc.documentElement;
+ svgroot.currentScale = 0.5;
+ runAfterLayoutAndPaint(function() {
+ if (window.testRunner)
fs 2016/03/31 10:53:04 You can pass 'true' as the second argument to runA
Shanmuga Pandi 2016/03/31 11:53:35 Done.
+ testRunner.notifyDone();
+ });
+ }
+</script>
+
+<body>
fs 2016/03/31 10:53:04 You don't need this <body>.
Shanmuga Pandi 2016/03/31 11:53:35 Done.
+ <object onload="setScale()" data="resources/green-rect.svg" type="image/svg+xml">
+ </object>
+ <svg width='400' height='400' viewBox='0 0 200 200'>
fs 2016/03/31 10:53:04 This is a pretty roundabout way to get a 100x100 r
Shanmuga Pandi 2016/03/31 11:53:35 Acknowledged.
+ <rect width='50' height='50' fill='green'/>
+ </svg>
+</body>

Powered by Google App Engine
This is Rietveld 408576698