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

Unified Diff: LayoutTests/css3/flexbox/percent-height-children-of-alignSelf-stretch-flex-item.html

Issue 331203002: Blink doesn't honor percent heights on children of "align-self:stretch" flex items in a fixed-height (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 3 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/css3/flexbox/percent-height-children-of-alignSelf-stretch-flex-item.html
diff --git a/LayoutTests/css3/flexbox/percent-height-children-of-alignSelf-stretch-flex-item.html b/LayoutTests/css3/flexbox/percent-height-children-of-alignSelf-stretch-flex-item.html
new file mode 100644
index 0000000000000000000000000000000000000000..4ef9c9a96d9af64e0f8336280143423c98231062
--- /dev/null
+++ b/LayoutTests/css3/flexbox/percent-height-children-of-alignSelf-stretch-flex-item.html
@@ -0,0 +1,94 @@
+<!DOCTYPE html>
+<link href="resources/flexbox.css" rel="stylesheet">
+<style>
+.horizontal {
+ height: 50px;
+ background-color: purple;
+ position: relative;
+}
+
+.vertical {
+ width: 50px;
+ height: 10px;
+ background-color: purple;
+ position: relative;
+ -webkit-writing-mode: vertical-rl;
+}
+
+.flex-one {
+ background-color: red;
+}
+</style>
+<script src="../../resources/check-layout.js"></script>
+<script>
+function changeHeight()
+{
+ document.getElementById('dynamicHorizontalChild').style.height = "90%";
+ document.getElementById('dynamicVerticalChild').style.width = "30%";
+ checkLayout('.flexbox');
+}
+</script>
+<body onload="changeHeight()">
+<div class="flexbox horizontal">
+ <div data-expected-height="50" class="flex-one">
+ <div data-expected-height="35" style="height: 70%; background-color: lime"></div>
+ </div>
+</div>
+
+<div class="flexbox horizontal">
+ <div data-expected-height="50" class="flex-one">
+ <div id="dynamicHorizontalChild" data-expected-height="45" style="height: 70%; background-color: lime"></div>
+ </div>
+</div>
+
+<div class="flexbox horizontal">
+ <div data-expected-height="50" class="flex-one" style="padding: 10px; border: 2px solid black">
+ <div data-expected-height="18" style="height: 70%; background-color: lime"></div>
+ </div>
+</div>
+
+<div class="flexbox horizontal">
+ <img data-expected-height="25" style="max-height: 50%" src="../images/resources/green-10.png" />
+</div>
+
+<div class="flexbox horizontal">
+ <div data-expected-height="25" class="flex-one" style="max-height:50%">
+ <div data-expected-height="13" style="height: 50%; background-color: lime"></div>
+ </div>
+</div>
+
+<div class="flexbox wrap align-content-flex-start" style="width: 100px; height: 100px; background-color: yellow; padding: 3px;">
+ <div data-expected-height="30" style="min-height: 30%; width: 80px; background-color: purple; margin: 2px; ">
+ <div data-expected-height="15" style="background-color: red; height: 50%; width: 20px;"></div>
+ </div>
+ <div data-expected-height="40" style="height: 40px; width: 80px; background-color: green; margin: 2px;"></div>
+</div>
+
+<div class="flexbox vertical">
+ <div data-expected-width="50" class="flex-one">
+ <div data-expected-width="25" style="width: 50%; background-color: lime"></div>
+ </div>
+</div>
+
+<div class="flexbox vertical">
+ <div data-expected-width="50" class="flex-one">
+ <div id="dynamicVerticalChild" data-expected-width="15" style="width: 50%; background-color: lime"></div>
+ </div>
+</div>
+
+<div class="flexbox vertical">
+ <div data-expected-width="50" class="flex-one" style="padding: 10px; border: 2px solid black">
+ <div data-expected-width="13" style="width: 50%; background-color: lime"></div>
+ </div>
+</div>
+
+<div class="flexbox vertical">
+ <img data-expected-width="25" style="max-width: 50%" src="../images/resources/green-10.png" />
+</div>
+
+<div class="flexbox vertical">
+ <div data-expected-width="25" class="flex-one" style="max-width: 50%">
+ <div data-expected-width="13" style="width: 50%; background-color: lime"></div>
+ </div>
+</div>
+</body>

Powered by Google App Engine
This is Rietveld 408576698