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

Unified Diff: LayoutTests/svg/custom/stf-container-with-intrinsic-ratio-svg.html

Issue 325183002: Make preferred widths for replaced content independent on available width (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Address review comments 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
« no previous file with comments | « LayoutTests/svg/custom/size-follows-container-size.html ('k') | Source/core/rendering/RenderReplaced.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/svg/custom/stf-container-with-intrinsic-ratio-svg.html
diff --git a/LayoutTests/svg/custom/stf-container-with-intrinsic-ratio-svg.html b/LayoutTests/svg/custom/stf-container-with-intrinsic-ratio-svg.html
new file mode 100644
index 0000000000000000000000000000000000000000..bfec186eac8e34fe984b64672558e644a6a09bb9
--- /dev/null
+++ b/LayoutTests/svg/custom/stf-container-with-intrinsic-ratio-svg.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<style type="text/css">
+ body > div { width: 100px }
+ #stf1 { float: left }
+ #stf2 { position: absolute }
+ #stf3 { display: table-cell }
+</style>
+<div>
+ <div id="stf1">
+ <svg viewBox='0 0 1 1'></svg>
+ </div>
+ <div id="stf2">
+ <svg viewBox='0 0 1 1'></svg>
+ </div>
+ <div id="stf3">
+ <svg viewBox='0 0 1 1'></svg>
+ </div>
+</div>
+<script>
+ test(function() {
+ var r = document.getElementById('stf1').getBoundingClientRect();
+ assert_equals(r.width, 0);
+ }, "Test floated element width with replaced element with intrinsic ratio but no dimensions");
+ test(function() {
+ var r = document.getElementById('stf2').getBoundingClientRect();
+ assert_equals(r.width, 0);
+ }, "Test absolute positioned element width with replaced element with intrinsic ratio but no dimensions");
+ test(function() {
+ var r = document.getElementById('stf3').getBoundingClientRect();
+ assert_equals(r.width, 1); // Unclear if width should be 0 or 1. (Gecko and Blink disagree)
+ }, "Test table cell width with replaced element with intrinsic ratio but no dimensions");
+</script>
« no previous file with comments | « LayoutTests/svg/custom/size-follows-container-size.html ('k') | Source/core/rendering/RenderReplaced.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698