Title: [121611] trunk
- Revision
- 121611
- Author
- [email protected]
- Date
- 2012-06-29 19:36:41 -0700 (Fri, 29 Jun 2012)
Log Message
Allow align-self: stretch to cause the item size to shrink below its intrinsic size
https://bugs.webkit.org/show_bug.cgi?id=90304
Reviewed by Ojan Vafai.
Source/WebCore:
The spec used to say that stretch could only make items grow, but now
it allows items to shrink.
http://dev.w3.org/csswg/css3-flexbox/#align-items-stretch
Tests: css3/flexbox/flex-align-stretch.html Updated expectations.
css3/flexbox/child-overflow.html Updated expectations.
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::applyStretchAlignmentToChild):
LayoutTests:
* css3/flexbox/child-overflow-expected.html:
* css3/flexbox/child-overflow.html:
* css3/flexbox/flex-align-stretch.html:
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (121610 => 121611)
--- trunk/LayoutTests/ChangeLog 2012-06-30 02:02:09 UTC (rev 121610)
+++ trunk/LayoutTests/ChangeLog 2012-06-30 02:36:41 UTC (rev 121611)
@@ -1,3 +1,14 @@
+2012-06-29 Tony Chang <[email protected]>
+
+ Allow align-self: stretch to cause the item size to shrink below its intrinsic size
+ https://bugs.webkit.org/show_bug.cgi?id=90304
+
+ Reviewed by Ojan Vafai.
+
+ * css3/flexbox/child-overflow-expected.html:
+ * css3/flexbox/child-overflow.html:
+ * css3/flexbox/flex-align-stretch.html:
+
2012-06-29 James Weatherall <[email protected]>
NPObjectWrapper may not address all window script object lifetime issues
Modified: trunk/LayoutTests/css3/flexbox/child-overflow-expected.html (121610 => 121611)
--- trunk/LayoutTests/css3/flexbox/child-overflow-expected.html 2012-06-30 02:02:09 UTC (rev 121610)
+++ trunk/LayoutTests/css3/flexbox/child-overflow-expected.html 2012-06-30 02:36:41 UTC (rev 121611)
@@ -29,29 +29,28 @@
</style>
</head>
<body>
- <p>Scrollbars should work in all the flexboxes. The first and third
- columns should overflow the logical height. Each row should be aligned
+ <p>Scrollbars should work in all the flexboxes. Each row should be aligned
to the same corner.</p>
- <div class="container bottomLeft"><div style="height: auto; position: absolute; bottom: 0"><div></div></div></div>
<div class="container bottomLeft"><div><div></div></div></div>
- <div class="container bottomLeft"><div style="height: auto; position: absolute; bottom: 0"><div></div></div></div>
<div class="container bottomLeft"><div><div></div></div></div>
+ <div class="container bottomLeft"><div><div></div></div></div>
+ <div class="container bottomLeft"><div><div></div></div></div>
<br>
- <div class="container topRight"><div style="width: auto; overflow-x: hidden; overflow-y: scroll; position: absolute; right: 0"><div></div></div></div>
<div class="container topRight"><div><div></div></div></div>
- <div class="container topRight"><div style="width: auto; overflow-x: hidden; overflow-y: scroll; position: absolute; right: 0"><div></div></div></div>
<div class="container topRight"><div><div></div></div></div>
+ <div class="container topRight"><div><div></div></div></div>
+ <div class="container topRight"><div><div></div></div></div>
<br>
- <div class="container"><div style="width: auto; overflow-x: hidden; overflow-y: scroll; position: absolute;"><div></div></div></div>
<div class="container"><div><div></div></div></div>
- <div class="container"><div style="width: auto; overflow-x: hidden; overflow-y: scroll; position: absolute;"><div></div></div></div>
<div class="container"><div><div></div></div></div>
+ <div class="container"><div><div></div></div></div>
+ <div class="container"><div><div></div></div></div>
<br>
- <div class="container"><div style="height: auto"><div></div></div></div>
<div class="container"><div><div></div></div></div>
- <div class="container"><div style="height: auto"><div></div></div></div>
<div class="container"><div><div></div></div></div>
+ <div class="container"><div><div></div></div></div>
+ <div class="container"><div><div></div></div></div>
<script>
Modified: trunk/LayoutTests/css3/flexbox/child-overflow.html (121610 => 121611)
--- trunk/LayoutTests/css3/flexbox/child-overflow.html 2012-06-30 02:02:09 UTC (rev 121610)
+++ trunk/LayoutTests/css3/flexbox/child-overflow.html 2012-06-30 02:36:41 UTC (rev 121611)
@@ -62,8 +62,7 @@
</style>
</head>
<body>
- <p>Scrollbars should work in all the flexboxes. The first and third
- columns should overflow the logical height. Each row should be aligned
+ <p>Scrollbars should work in all the flexboxes. Each row should be aligned
to the same corner.</p>
</body>
<script>
Modified: trunk/LayoutTests/css3/flexbox/flex-align-stretch.html (121610 => 121611)
--- trunk/LayoutTests/css3/flexbox/flex-align-stretch.html 2012-06-30 02:02:09 UTC (rev 121610)
+++ trunk/LayoutTests/css3/flexbox/flex-align-stretch.html 2012-06-30 02:36:41 UTC (rev 121611)
@@ -82,14 +82,12 @@
</div>
</div>
-<!-- When overflowing the height, align-items: stretch doesn't cause the flex item to get smaller. -->
<div class="flexbox" style="height: 50px; width: 600px;">
- <div data-expected-height="60" style="background-color: yellow; width: 300px">
+ <div data-expected-height="50" style="background-color: yellow; width: 300px">
<div data-expected-height="60" style="height: 60px; width: 10px; background-color: orange"></div>
</div>
</div>
-<!-- In the column case, the width of the flex item is constrained by the width of the flexbox, so align-items: stretch doesn't change the width. -->
<div class="flexbox" style="-webkit-flex-direction: column; width: 100px;">
<div data-expected-width="100" data-expected-height="50" style="background-color: yellow;">
<div data-expected-width="200" style="height: 50px; width: 200px; background-color: orange"></div>
Modified: trunk/Source/WebCore/ChangeLog (121610 => 121611)
--- trunk/Source/WebCore/ChangeLog 2012-06-30 02:02:09 UTC (rev 121610)
+++ trunk/Source/WebCore/ChangeLog 2012-06-30 02:36:41 UTC (rev 121611)
@@ -1,3 +1,20 @@
+2012-06-29 Tony Chang <[email protected]>
+
+ Allow align-self: stretch to cause the item size to shrink below its intrinsic size
+ https://bugs.webkit.org/show_bug.cgi?id=90304
+
+ Reviewed by Ojan Vafai.
+
+ The spec used to say that stretch could only make items grow, but now
+ it allows items to shrink.
+ http://dev.w3.org/csswg/css3-flexbox/#align-items-stretch
+
+ Tests: css3/flexbox/flex-align-stretch.html Updated expectations.
+ css3/flexbox/child-overflow.html Updated expectations.
+
+ * rendering/RenderFlexibleBox.cpp:
+ (WebCore::RenderFlexibleBox::applyStretchAlignmentToChild):
+
2012-06-29 James Weatherall <[email protected]>
NPObjectWrapper may not address all window script object lifetime issues
Modified: trunk/Source/WebCore/rendering/RenderFlexibleBox.cpp (121610 => 121611)
--- trunk/Source/WebCore/rendering/RenderFlexibleBox.cpp 2012-06-30 02:02:09 UTC (rev 121610)
+++ trunk/Source/WebCore/rendering/RenderFlexibleBox.cpp 2012-06-30 02:36:41 UTC (rev 121611)
@@ -1198,8 +1198,6 @@
if (!isColumnFlow() && child->style()->logicalHeight().isAuto()) {
LayoutUnit logicalHeightBefore = child->logicalHeight();
LayoutUnit stretchedLogicalHeight = child->logicalHeight() + availableAlignmentSpaceForChild(lineCrossAxisExtent, child);
- if (stretchedLogicalHeight < logicalHeightBefore)
- return;
child->setLogicalHeight(stretchedLogicalHeight);
child->computeLogicalHeight();
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes