Title: [124064] trunk
- Revision
- 124064
- Author
- t...@chromium.org
- Date
- 2012-07-30 11:39:53 -0700 (Mon, 30 Jul 2012)
Log Message
new flexbox should ignore float set on flexitems
https://bugs.webkit.org/show_bug.cgi?id=70792
Reviewed by Ojan Vafai.
Source/WebCore:
Force flex items to not float.
Test: css3/flexbox/floated-flexitem.html
* css/StyleResolver.cpp:
(WebCore::StyleResolver::adjustRenderStyle): Force NoFloat on flex items.
LayoutTests:
Make an example in the spec into a ref test. Add some styles to make it a bit more clear what's happening.
* css3/flexbox/floated-flexitem-expected.html: Added.
* css3/flexbox/floated-flexitem.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (124063 => 124064)
--- trunk/LayoutTests/ChangeLog 2012-07-30 18:37:18 UTC (rev 124063)
+++ trunk/LayoutTests/ChangeLog 2012-07-30 18:39:53 UTC (rev 124064)
@@ -1,3 +1,15 @@
+2012-07-30 Tony Chang <t...@chromium.org>
+
+ new flexbox should ignore float set on flexitems
+ https://bugs.webkit.org/show_bug.cgi?id=70792
+
+ Reviewed by Ojan Vafai.
+
+ Make an example in the spec into a ref test. Add some styles to make it a bit more clear what's happening.
+
+ * css3/flexbox/floated-flexitem-expected.html: Added.
+ * css3/flexbox/floated-flexitem.html: Added.
+
2012-07-30 Peter Kasting <pkast...@google.com>
[Chromium] New baselines and test expectations update.
Added: trunk/LayoutTests/css3/flexbox/floated-flexitem-expected.html (0 => 124064)
--- trunk/LayoutTests/css3/flexbox/floated-flexitem-expected.html (rev 0)
+++ trunk/LayoutTests/css3/flexbox/floated-flexitem-expected.html 2012-07-30 18:39:53 UTC (rev 124064)
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<html>
+<style>
+#flexbox {
+ background-color: lightgrey;
+}
+#flexbox > * {
+ border: 1px solid green;
+ vertical-align: top;
+}
+</style>
+<body>
+<p>
+This example is from the spec. There should be four flex items. Anonymous item 3 shouldn't have
+a green border because the anonymous block is the flex item.
+</p>
+<div id="flexbox">
+ <div style="display: inline-block">block</div><div
+ style="display: inline-block">float</div><div
+ style="display: inline-block; border: 0">anonymous item 3</div><div
+ style="display: inline-block">
+ item 4<br>
+ item 4<br>
+ item 4
+ </div>
+</div>
+</body>
+</html>
Added: trunk/LayoutTests/css3/flexbox/floated-flexitem.html (0 => 124064)
--- trunk/LayoutTests/css3/flexbox/floated-flexitem.html (rev 0)
+++ trunk/LayoutTests/css3/flexbox/floated-flexitem.html 2012-07-30 18:39:53 UTC (rev 124064)
@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<html>
+<style>
+#flexbox {
+ background-color: lightgrey;
+ -webkit-align-items: flex-start;
+}
+#flexbox > * {
+ border: 1px solid green;
+}
+</style>
+<body>
+<p>
+This example is from the spec. There should be four flex items. Anonymous item 3 shouldn't have
+a green border because the anonymous block is the flex item.
+</p>
+<div id="flexbox" style="display: -webkit-flex">
+
+ <!-- flex item: block child -->
+ <div id="item1">block</div>
+
+ <!-- flex item: floated element; floating is ignored -->
+ <div id="item2" style="float: left;">float</div>
+
+ <!-- flex item: anonymous block box around inline content -->
+ anonymous item 3
+
+ <!-- flex item: inline child -->
+ <span>
+ item 4
+ <!-- flex items do not split around blocks -->
+ <div id=not-an-item>item 4</div>
+ item 4
+ </span>
+</div>
+</body>
+</html>
Modified: trunk/Source/WebCore/ChangeLog (124063 => 124064)
--- trunk/Source/WebCore/ChangeLog 2012-07-30 18:37:18 UTC (rev 124063)
+++ trunk/Source/WebCore/ChangeLog 2012-07-30 18:39:53 UTC (rev 124064)
@@ -1,3 +1,17 @@
+2012-07-30 Tony Chang <t...@chromium.org>
+
+ new flexbox should ignore float set on flexitems
+ https://bugs.webkit.org/show_bug.cgi?id=70792
+
+ Reviewed by Ojan Vafai.
+
+ Force flex items to not float.
+
+ Test: css3/flexbox/floated-flexitem.html
+
+ * css/StyleResolver.cpp:
+ (WebCore::StyleResolver::adjustRenderStyle): Force NoFloat on flex items.
+
2012-07-30 Adrienne Walker <e...@google.com>
[chromium] Turn back on ScrollbarLayerChromium for Windows
Modified: trunk/Source/WebCore/css/StyleResolver.cpp (124063 => 124064)
--- trunk/Source/WebCore/css/StyleResolver.cpp 2012-07-30 18:37:18 UTC (rev 124063)
+++ trunk/Source/WebCore/css/StyleResolver.cpp 2012-07-30 18:39:53 UTC (rev 124064)
@@ -2143,8 +2143,10 @@
if (style->writingMode() != TopToBottomWritingMode && (style->display() == BOX || style->display() == INLINE_BOX))
style->setWritingMode(TopToBottomWritingMode);
- if (e && e->parentNode() && e->parentNode()->renderer() && e->parentNode()->renderer()->isFlexibleBox())
+ if (e && e->parentNode() && e->parentNode()->renderer() && e->parentNode()->renderer()->isFlexibleBox()) {
+ style->setFloating(NoFloat);
style->setDisplay(equivalentBlockDisplay(style->display(), style->isFloating(), m_checker.strictParsing()));
+ }
}
// Make sure our z-index value is only applied if the object is positioned.
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes