Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/fast/block/block-width-recalc-with-relative-height.html |
| diff --git a/third_party/WebKit/LayoutTests/fast/block/block-width-recalc-with-relative-height.html b/third_party/WebKit/LayoutTests/fast/block/block-width-recalc-with-relative-height.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..42011fa44af9de525b9e16481a73608dbe365c35 |
| --- /dev/null |
| +++ b/third_party/WebKit/LayoutTests/fast/block/block-width-recalc-with-relative-height.html |
| @@ -0,0 +1,55 @@ |
| +<!DOCTYPE html> |
| +<style> |
| +#container { |
| + display: inline-block; |
| + height: 100%; |
| +} |
| +#middle { |
| + height: 100%; |
| +} |
| +#stylefloat { |
| + height: 100%; |
| + float: left; |
| +} |
| +img { |
| + display: block; |
| + min-height: 100%; |
| +} |
| +</style> |
| + |
| +<p> |
| +Tests that recalculate block width when parent changes height |
| +when it has relative height and width auto. |
| +</p> |
| + |
| +<div style="height:100px"> |
| + <div id="parent1" style="height:100px"> |
| + <div id="container" data-expected-width=25> |
| + <img src='data:image/svg+xml;utf8,<svg height="2px" width="1px" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1"></svg>'></img> |
|
mstensho (USE GERRIT)
2017/04/25 07:52:51
IMG doesn't need an end tag.
|
| + </div> |
| + </div> |
| +</div> |
| + |
| +<div id="parent2" style="height:100px;"> |
| + <div id="stylefloat" data-expected-width=25> |
| + <div id="middle" data-expected-width=25> |
| + <img src='data:image/svg+xml;utf8,<svg height="2px" width="1px" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1"></svg>'></img> |
|
mstensho (USE GERRIT)
2017/04/25 07:52:50
Ditto.
|
| + </div> |
| + </div> |
| +</div> |
| + |
| +<div id="results"></div> |
| + |
| +<script src="../../resources/testharness.js"></script> |
| +<script src="../../resources/testharnessreport.js"></script> |
| +<script src="../../resources/check-layout-th.js"></script> |
| +<script> |
| +document.body.offsetTop; |
| +document.getElementById("parent1").style.height = "50px"; |
| +checkLayout("#container", results); |
| + |
| +document.body.offsetTop; |
| +document.getElementById("parent2").style.height = "50px"; |
| +checkLayout("#stylefloat", results); |
| +checkLayout("#middle", results); |
|
mstensho (USE GERRIT)
2017/04/25 07:52:51
You can omit this. checkLayout() processes the ent
|
| +</script> |