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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/replaced/aspect-ratio-of-replaced-child-with-max-height.html

Issue 2683793007: Keep the aspect ratio of child with percentage max-height when the size of its container changes (Closed)
Patch Set: Updated LayoutReplaced::needsPreferredWidthsRecalculation Created 3 years, 10 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/replaced/aspect-ratio-of-replaced-child-with-max-height-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <style>
3 #container {
4 background-color: lime;
5 }
6
7 img, canvas {
8 max-height: 100%;
9 }
10 </style>
11
12 <p>
13 Tests that a replaced child with percentage max-height should keep the aspect
14 ratio when the size of its container changes.
15 </p>
16
17 <div id="container">
18 <img src="resources/square-blue-100x100.png" data-expected-width="50"
19 data-expected-height="50">
20 <canvas width="400" height="400" data-expected-width="50"
21 data-expected-height="50"></canvas>
22 </div>
23
24 <script src="../../resources/check-layout.js"></script>
25
26 <script>
27 function runTest() {
28 document.body.offsetTop;
29 var container = document.getElementById('container');
30 container.style.height = "50px";
31 document.body.offsetTop;
32 checkLayout("#container");
33 }
34 window.onload = runTest;
35 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/replaced/aspect-ratio-of-replaced-child-with-max-height-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698