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

Side by Side Diff: third_party/WebKit/LayoutTests/svg/custom/svg-image-intrinsic-size-with-cssstyle-auto-dynamic-image-change.html

Issue 2230963002: SVG Image intrinsic size should be used if css style size is 'auto' (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Align with review comments Created 4 years, 3 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 <title>Test <svg:image>'s sizing with css size as auto, with dynamic image chang e</title>
3 <script src="../../resources/testharness.js"></script>
4 <script src="../../resources/testharnessreport.js"></script>
5 <svg height="0">
6 <image width="200" height="200" xlink:href="resources/square-green-checker.png " style="width:auto; height:auto"/>
7 </svg>
8 <script>
9 async_test(function(t) {
10 var image = document.querySelector('image');
11 window.onload = t.step_func(function() {
12 var rectBBox = image.getBBox();
13 assert_equals(rectBBox.width, 400);
14 assert_equals(rectBBox.height, 400);
15 image.setAttributeNS("http://www.w3.org/1999/xlink","href","data:image/svg+x ml,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100'></svg>");
16 image.onload = t.step_func_done(function() {
17 var rectBBox = image.getBBox();
18 assert_equals(rectBBox.width, 100);
19 assert_equals(rectBBox.height, 100);
20 });
21 });
22 });
23 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698