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

Unified 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: Updated TextExpectations to include height variants too 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 | « LayoutTests/TestExpectations ('k') | LayoutTests/svg/foreignObject/fO-percentage-height-style-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/svg/foreignObject/fO-percentage-height-style.html
diff --git a/LayoutTests/svg/foreignObject/fO-percentage-height-style.html b/LayoutTests/svg/foreignObject/fO-percentage-height-style.html
new file mode 100644
index 0000000000000000000000000000000000000000..16475cb1bf3f39cb91c99a4bf7203ee74b2df4c8
--- /dev/null
+++ b/LayoutTests/svg/foreignObject/fO-percentage-height-style.html
@@ -0,0 +1,21 @@
+<!doctype html>
+<script src="../../resources/js-test.js"></script>
+<svg viewBox="0 0 250 250">
+ <foreignObject width="250" height="250">
+ <svg style="height:100%; background: blue">
+ </svg>
+ </foreignObject>
+</svg>
+<script>
+ description("Test use of percentages inside foreignObject");
+
+ var nestedSvg = document.querySelectorAll('svg')[1];
+ shouldBe("nestedSvg.offsetHeight", "250");
+
+ nestedSvg.style.height = "50%";
+ shouldBe("nestedSvg.offsetHeight", "125");
+
+ var foreignObject = nestedSvg.parentNode;
+ foreignObject.height.baseVal.value = 400;
+ shouldBe("nestedSvg.offsetHeight", "200");
+</script>
« no previous file with comments | « LayoutTests/TestExpectations ('k') | LayoutTests/svg/foreignObject/fO-percentage-height-style-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698