Diff
Modified: trunk/LayoutTests/ChangeLog (143041 => 143042)
--- trunk/LayoutTests/ChangeLog 2013-02-15 21:15:37 UTC (rev 143041)
+++ trunk/LayoutTests/ChangeLog 2013-02-15 21:16:39 UTC (rev 143042)
@@ -1,3 +1,25 @@
+2013-02-15 Xueqing Huang <huangxueq...@baidu.com>
+
+ Flexbox should ignore firstLine pseudo element.
+ https://bugs.webkit.org/show_bug.cgi?id=104485
+
+ Reviewed by Tony Chang.
+
+ Spec[1] said that "None of the properties defined in this module
+ apply to '::first-line' or '::first-letter' pseudo-elements." and
+ css2[2] define "The :first-line pseudo-element can only be attached
+ to a block container element."
+ [1]http://dev.w3.org/csswg/css3-flexbox/#display-flex
+ [2]http://www.w3.org/TR/CSS2/selector.html#first-line-pseudo
+
+ some case by Kenny Lu <kangh...@oupeng.com>
+ * css3/flexbox/flex-item-firstLine-valid-expected.txt: Added.
+ * css3/flexbox/flex-item-firstLine-valid.html: Added.
+ * css3/flexbox/flexbox-ignore-firstLine-expected.txt: Added.
+ * css3/flexbox/flexbox-ignore-firstLine.html: Added.
+ * css3/flexbox/inline-flexbox-ignore-firstLine-expected.txt: Added.
+ * css3/flexbox/inline-flexbox-ignore-firstLine.html: Added.
+
2013-02-15 Philip Rogers <p...@google.com>
Rebaseline 7 SVG tests after r142765.
Added: trunk/LayoutTests/css3/flexbox/flex-item-firstLine-valid-expected.txt (0 => 143042)
--- trunk/LayoutTests/css3/flexbox/flex-item-firstLine-valid-expected.txt (rev 0)
+++ trunk/LayoutTests/css3/flexbox/flex-item-firstLine-valid-expected.txt 2013-02-15 21:16:39 UTC (rev 143042)
@@ -0,0 +1,7 @@
+This test flex item should ignore flex container's firstLine pseudo element, but flex item's firstLine should be valid.
+
+The first item.
+
+The second item.
+
+PASS
Added: trunk/LayoutTests/css3/flexbox/flex-item-firstLine-valid.html (0 => 143042)
--- trunk/LayoutTests/css3/flexbox/flex-item-firstLine-valid.html (rev 0)
+++ trunk/LayoutTests/css3/flexbox/flex-item-firstLine-valid.html 2013-02-15 21:16:39 UTC (rev 143042)
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+<link href="" rel="stylesheet">
+<style>
+ div::first-line { line-height: 100px; }
+ p::first-line { line-height: 100px;}
+</style>
+
+<script src=""
+<body _onload_="checkLayout('.flexbox')">
+<p>This test flex item should ignore flex container's firstLine pseudo element, but flex item's firstLine should be valid.</p>
+
+<div class="flexbox">
+ <p data-expected-height=100>The first item.</p>
+ <p data-expected-height=100>The second item.</p>
+</div>
+</body>
+</html>
Added: trunk/LayoutTests/css3/flexbox/flexbox-ignore-firstLine-expected.txt (0 => 143042)
--- trunk/LayoutTests/css3/flexbox/flexbox-ignore-firstLine-expected.txt (rev 0)
+++ trunk/LayoutTests/css3/flexbox/flexbox-ignore-firstLine-expected.txt 2013-02-15 21:16:39 UTC (rev 143042)
@@ -0,0 +1,7 @@
+This test flex item should ignore flex container's firstLine pseudo element.
+
+The first item.
+
+The second item.
+
+PASS
Added: trunk/LayoutTests/css3/flexbox/flexbox-ignore-firstLine.html (0 => 143042)
--- trunk/LayoutTests/css3/flexbox/flexbox-ignore-firstLine.html (rev 0)
+++ trunk/LayoutTests/css3/flexbox/flexbox-ignore-firstLine.html 2013-02-15 21:16:39 UTC (rev 143042)
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+<link href="" rel="stylesheet">
+<style>
+ div::first-line { line-height: 100px; }
+ p { line-height: 20px; }
+</style>
+
+<script src=""
+<body _onload_="checkLayout('.flexbox')">
+<p>This test flex item should ignore flex container's firstLine pseudo element.</p>
+
+<div class="flexbox">
+ <p data-expected-height=20>The first item.</p>
+ <p data-expected-height=20>The second item.</p>
+</div>
+</body>
+</html>
Added: trunk/LayoutTests/css3/flexbox/inline-flexbox-ignore-firstLine-expected.txt (0 => 143042)
--- trunk/LayoutTests/css3/flexbox/inline-flexbox-ignore-firstLine-expected.txt (rev 0)
+++ trunk/LayoutTests/css3/flexbox/inline-flexbox-ignore-firstLine-expected.txt 2013-02-15 21:16:39 UTC (rev 143042)
@@ -0,0 +1,8 @@
+This test inline-flexbox item should ignore flex container's firstLine pseudo element.
+
+The first item.
+
+The second item.
+
+PASS
+
Added: trunk/LayoutTests/css3/flexbox/inline-flexbox-ignore-firstLine.html (0 => 143042)
--- trunk/LayoutTests/css3/flexbox/inline-flexbox-ignore-firstLine.html (rev 0)
+++ trunk/LayoutTests/css3/flexbox/inline-flexbox-ignore-firstLine.html 2013-02-15 21:16:39 UTC (rev 143042)
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+<link href="" rel="stylesheet">
+<style>
+ div::first-line { line-height: 100px; }
+ p { line-height: 20px; }
+</style>
+
+<script src=""
+<body _onload_="checkLayout('.inline-flexbox')">
+<p>This test inline-flexbox item should ignore flex container's firstLine pseudo element.</p>
+
+<div class="inline-flexbox">
+ <p data-expected-height=20>The first item.</p>
+ <p data-expected-height=20>The second item.</p>
+</div>
+</body>
+</html>
Modified: trunk/Source/WebCore/ChangeLog (143041 => 143042)
--- trunk/Source/WebCore/ChangeLog 2013-02-15 21:15:37 UTC (rev 143041)
+++ trunk/Source/WebCore/ChangeLog 2013-02-15 21:16:39 UTC (rev 143042)
@@ -1,3 +1,25 @@
+2013-02-15 Xueqing Huang <huangxueq...@baidu.com>
+
+ Flexbox should ignore firstLine pseudo element.
+ https://bugs.webkit.org/show_bug.cgi?id=104485
+
+ Reviewed by Tony Chang.
+
+ Spec[1] said that "None of the properties defined in this module
+ apply to '::first-line' or '::first-letter' pseudo-elements." and
+ css2[2] define "The :first-line pseudo-element can only be attached
+ to a block container element."
+ [1]http://dev.w3.org/csswg/css3-flexbox/#display-flex
+ [2]http://www.w3.org/TR/CSS2/selector.html#first-line-pseudo
+
+ tests:
+ css3/flexbox/flexbox-ignore-firstLine.html
+ css3/flexbox/flexitem-firstLine-valid.html
+ css3/flexbox/inline-flexbox-ignore-firstLine.html
+
+ * rendering/RenderBlock.cpp:
+ (WebCore::RenderBlock::firstLineBlock):
+
2013-02-15 Alec Flett <alecfl...@chromium.org>
IndexedDB: Implement SharedBuffer version of put()
Modified: trunk/Source/WebCore/rendering/RenderBlock.cpp (143041 => 143042)
--- trunk/Source/WebCore/rendering/RenderBlock.cpp 2013-02-15 21:15:37 UTC (rev 143041)
+++ trunk/Source/WebCore/rendering/RenderBlock.cpp 2013-02-15 21:16:39 UTC (rev 143042)
@@ -6433,7 +6433,7 @@
break;
RenderObject* parentBlock = firstLineBlock->parent();
if (firstLineBlock->isReplaced() || firstLineBlock->isFloating() ||
- !parentBlock || parentBlock->firstChild() != firstLineBlock || !parentBlock->isBlockFlow())
+ !parentBlock || parentBlock->firstChild() != firstLineBlock || !parentBlock->isBlockFlow() || parentBlock->isFlexibleBox())
break;
ASSERT_WITH_SECURITY_IMPLICATION(parentBlock->isRenderBlock());
firstLineBlock = toRenderBlock(parentBlock);