Reviewed by Mark Rowe.
- fix https://bugs.webkit.org/show_bug.cgi?id=18818
<rdar://problem/5901544> REGRESSION (3.1.1-TOT): Character order (float:left ordered after the first letter)
Test: fast/css/first-letter-float-after-float.html
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::updateFirstLetter): Changed to add the first
letter container right before the rest of the text it is taken from,
instead of at the beginning of the block.
LayoutTests:
Reviewed by Mark Rowe.
- test and updated results for https://bugs.webkit.org/show_bug.cgi?id=18818
<rdar://problem/5901544> REGRESSION (3.1.1-TOT): Character order (float:left ordered after the first letter)
* ChangeLog:
* fast/css/first-letter-float-after-float.html: Added.
* platform/mac-leopard/fast/css/first-letter-skip-out-of-flow-expected.checksum:
* platform/mac-leopard/fast/css/first-letter-skip-out-of-flow-expected.png:
* platform/mac/fast/css/first-letter-float-after-float-expected.checksum: Added.
* platform/mac/fast/css/first-letter-float-after-float-expected.png: Added.
* platform/mac/fast/css/first-letter-float-after-float-expected.txt: Added.
* platform/mac/fast/css/first-letter-skip-out-of-flow-expected.txt:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@32992
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2008-05-08 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Mark Rowe.
+
+ - test and updated results for https://bugs.webkit.org/show_bug.cgi?id=18818
+ <rdar://problem/5901544> REGRESSION (3.1.1-TOT): Character order (float:left ordered after the first letter)
+
+ * ChangeLog:
+ * fast/css/first-letter-float-after-float.html: Added.
+ * platform/mac-leopard/fast/css/first-letter-skip-out-of-flow-expected.checksum:
+ * platform/mac-leopard/fast/css/first-letter-skip-out-of-flow-expected.png:
+ * platform/mac/fast/css/first-letter-float-after-float-expected.checksum: Added.
+ * platform/mac/fast/css/first-letter-float-after-float-expected.png: Added.
+ * platform/mac/fast/css/first-letter-float-after-float-expected.txt: Added.
+ * platform/mac/fast/css/first-letter-skip-out-of-flow-expected.txt:
+
2008-05-08 Simon Hausmann <hausmann@webkit.org>
Reviewed by Holger.
--- /dev/null
+<style>
+ div:first-letter { float: left; }
+</style>
+<p>
+ Test for <i><a href="https://bugs.webkit.org/show_bug.cgi?id=18818">https://bugs.webkit.org/show_bug.cgi?id=18818</a>
+ REGRESSION (3.1.1-TOT): Character order (float:left ordered after the first letter)</i>.
+</p>
+<p>
+ The next line should say “123”.
+</p>
+<div><span style="float: left;">1</span>23</div>
-af1642ce11a6e894d15914dbcb6397ff
\ No newline at end of file
+4d054929ea7fa100e8d1f3b412121822
\ No newline at end of file
--- /dev/null
+f2222425c9138fdc6d00c6416a59b127
\ No newline at end of file
--- /dev/null
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderBlock {HTML} at (0,0) size 800x600
+ RenderBody {BODY} at (8,8) size 784x584
+ RenderBlock {P} at (0,0) size 784x36
+ RenderText {#text} at (0,0) size 53x18
+ text run at (0,0) width 53: "Test for "
+ RenderInline {I} at (0,0) size 769x36
+ RenderInline {A} at (0,0) size 307x18 [color=#0000EE]
+ RenderText {#text} at (53,0) size 307x18
+ text run at (53,0) width 307: "https://bugs.webkit.org/show_bug.cgi?id=18818"
+ RenderText {#text} at (360,0) size 769x36
+ text run at (360,0) width 4: " "
+ text run at (364,0) width 405: "REGRESSION (3.1.1-TOT): Character order (float:left ordered"
+ text run at (0,18) width 121: "after the first letter)"
+ RenderText {#text} at (121,18) size 4x18
+ text run at (121,18) width 4: "."
+ RenderBlock {P} at (0,52) size 784x18
+ RenderText {#text} at (0,0) size 200x18
+ text run at (0,0) width 200: "The next line should say \x{201C}123\x{201D}."
+ RenderBlock {DIV} at (0,86) size 784x18
+ RenderBlock (floating) {SPAN} at (0,0) size 8x18
+ RenderText {#text} at (0,0) size 8x18
+ text run at (0,0) width 8: "1"
+ RenderBlock (floating) at (8,0) size 8x18
+ RenderText {#text} at (0,0) size 8x18
+ text run at (0,0) width 8: "2"
+ RenderText {#text} at (16,0) size 8x18
+ text run at (16,0) width 8: "3"
RenderText {#text} at (0,0) size 22x18
text run at (0,0) width 22: "YZ"
RenderBlock {DIV} at (0,70) size 784x18
+ RenderImage {IMG} at (0,0) size 0x0
RenderInline (generated) at (0,0) size 12x18 [color=#008000]
RenderText {#text} at (0,0) size 12x18
text run at (0,0) width 12: "X"
- RenderImage {IMG} at (0,0) size 0x0
RenderText {#text} at (12,0) size 12x18
text run at (12,0) width 12: "Y"
RenderBlock {DIV} at (0,88) size 784x18
text run at (0,0) width 4: " "
RenderText {#text} at (4,0) size 22x18
text run at (4,0) width 22: "YZ"
-layer at (100,114) size 27x18
- RenderBlock (positioned) {DIV} at (100,114) size 27x18
+layer at (100,96) size 27x18
+ RenderBlock (positioned) {DIV} at (100,96) size 27x18
RenderText {#text} at (0,0) size 27x18
text run at (0,0) width 27: "VW"
-layer at (100,132) size 27x18
- RenderBlock (positioned) {DIV} at (100,132) size 27x18
+layer at (100,114) size 27x18
+ RenderBlock (positioned) {DIV} at (100,114) size 27x18
RenderText {#text} at (0,0) size 27x18
text run at (0,0) width 27: "VW"
layer at (100,150) size 27x18
+2008-05-08 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Mark Rowe.
+
+ - fix https://bugs.webkit.org/show_bug.cgi?id=18818
+ <rdar://problem/5901544> REGRESSION (3.1.1-TOT): Character order (float:left ordered after the first letter)
+
+ Test: fast/css/first-letter-float-after-float.html
+
+ * rendering/RenderBlock.cpp:
+ (WebCore::RenderBlock::updateFirstLetter): Changed to add the first
+ letter container right before the rest of the text it is taken from,
+ instead of at the beginning of the block.
+
2008-05-08 Chris Fleizach <cfleizach@apple.com>
Reviewed by Darin Adler.
pseudoStyle->setPosition( StaticPosition ); // CSS2 says first-letter can't be positioned.
RenderObject* firstLetter = RenderFlow::createAnonymousFlow(document(), pseudoStyle); // anonymous box
- // FIXME: This adds in the wrong place if list markers were skipped above. Should be
- // firstLetterContainer->addChild(firstLetter, currChild);
- firstLetterContainer->addChild(firstLetter, firstLetterContainer->firstChild());
+ firstLetterContainer->addChild(firstLetter, currChild);
// The original string is going to be either a generated content string or a DOM node's
// string. We want the original string before it got transformed in case first-letter has