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

Side by Side Diff: LayoutTests/svg/custom/inline-svg-use-available-width.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 unified diff | Download patch
OLDNEW
(Empty)
1 <!doctype html>
2 <script src="../../resources/testharness.js"></script>
3 <script src="../../resources/testharnessreport.js"></script>
4 <style>
5 .rel {
6 position: relative;
7 width: 400px;
8 height: 200px;
9 }
10 .abs {
11 position: absolute;
12 left: 100px;
13 right: 100px;
14 }
15 .test {
16 display: block;
17 background: red;
18 }
19 .control { /* overlay to hide the red */
20 position: absolute;
21 left: 100px;
22 width: 200px;
23 height: 200px;
24 background-color: green;
25 }
26 </style>
27 <div class="rel">
28 <div class="abs">
29 <svg class="test" viewBox="0 0 1 1">
30 </svg>
31 </div>
32 <div class="control">
33 </div>
34 </div>
35 <script>
36 test(function() {
37 var bounds = document.querySelector('.test').getBoundingClientRect();
38 assert_equals(bounds.width, 200);
39 assert_equals(bounds.height, 200);
40 }, "Use available width and use intrinsic ratio to compute height");
41 </script>
OLDNEW
« no previous file with comments | « LayoutTests/TestExpectations ('k') | LayoutTests/svg/custom/inline-svg-use-available-width-in-stf.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698