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

Unified Diff: LayoutTests/svg/custom/inline-svg-use-available-width-in-stf.html

Issue 341773004: Use available width for replaced element with intrinsic ratio but no dimensions (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase and add NeedsRebaseline to zoom test with off-by-one (or so) errors Created 6 years, 6 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/inline-svg-use-available-width-in-stf.html
diff --git a/LayoutTests/svg/custom/inline-svg-use-available-width-in-stf.html b/LayoutTests/svg/custom/inline-svg-use-available-width-in-stf.html
new file mode 100644
index 0000000000000000000000000000000000000000..19801db933b3cb0e7450a9dd47b9370aca8df7cf
--- /dev/null
+++ b/LayoutTests/svg/custom/inline-svg-use-available-width-in-stf.html
@@ -0,0 +1,34 @@
+<!doctype html>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<style>
+ .specwidth { width: 400px }
+ .stf { float: left; }
+ .test { display: block; background-color: red }
+ .sizer { width: 200px }
+ .control { /* overlay to hide the red */
+ position: absolute;
+ width: 200px;
+ height: 200px;
+ background-color: green;
+ }
+</style>
+<body>
+ <div class="specwidth">
+ <div class="stf">
+ <svg class="test" viewBox="0 0 1 1">
+ </svg>
+ <div class="sizer">
+ </div>
+ </div>
+ </div>
+ <div class="control">
+ </div>
+ <script>
+ test(function() {
+ var bounds = document.querySelector('.test').getBoundingClientRect();
+ assert_equals(bounds.width, 200);
+ assert_equals(bounds.height, 200);
+ }, "Use available width and use intrinsic ratio to compute height");
+ </script>
+</body>
« no previous file with comments | « LayoutTests/svg/custom/inline-svg-use-available-width.html ('k') | Source/core/rendering/RenderReplaced.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698