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

Side by Side Diff: LayoutTests/svg/foreignObject/fO-percentage-height-style.html

Issue 218403009: Map width/height to style for foreignObject (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Added SVG DOM change to test 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 unified diff | Download patch
OLDNEW
(Empty)
1 <!doctype html>
2 <script src="../../resources/js-test.js"></script>
3 <svg viewBox="0 0 250 250">
4 <title>Test use of percentages inside foreignObject</title>
5 <foreignobject width="250" height="250">
6 <svg style="height:100%; background: blue">
7 </svg>
8 </foreignObject>
9 </svg>
10 <script>
11 var nestedSvg = document.querySelectorAll('svg')[1];
12 shouldBe("nestedSvg.offsetHeight", "250");
13
14 nestedSvg.style.height = "50%";
15 shouldBe("nestedSvg.offsetHeight", "125");
16
17 var foreignObject = nestedSvg.parentNode;
18 foreignObject.height.baseVal.value = 400;
19 shouldBe("nestedSvg.offsetHeight", "200");
20 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698