From: mitz@apple.com Date: Fri, 9 May 2008 05:06:58 +0000 (+0000) Subject: WebCore: X-Git-Url: http://git.webkit.org/?p=WebKit-https.git;a=commitdiff_plain;h=e8bde47e61ca596db2626481352e0e7b382ccdc9;hp=f97edc089334337c10728223721b6d373f95dbe2 WebCore: Reviewed by Mark Rowe. - fix https://bugs.webkit.org/show_bug.cgi?id=18818 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 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 --- diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog index de2f5f3..f10e097 100644 --- a/LayoutTests/ChangeLog +++ b/LayoutTests/ChangeLog @@ -1,3 +1,19 @@ +2008-05-08 Dan Bernstein + + Reviewed by Mark Rowe. + + - test and updated results for https://bugs.webkit.org/show_bug.cgi?id=18818 + 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 Reviewed by Holger. diff --git a/LayoutTests/fast/css/first-letter-float-after-float.html b/LayoutTests/fast/css/first-letter-float-after-float.html new file mode 100644 index 0000000..780ab53 --- /dev/null +++ b/LayoutTests/fast/css/first-letter-float-after-float.html @@ -0,0 +1,11 @@ + +

+ Test for https://bugs.webkit.org/show_bug.cgi?id=18818 + REGRESSION (3.1.1-TOT): Character order (float:left ordered after the first letter). +

+

+ The next line should say “123”. +

+
123
diff --git a/LayoutTests/platform/mac-leopard/fast/css/first-letter-skip-out-of-flow-expected.checksum b/LayoutTests/platform/mac-leopard/fast/css/first-letter-skip-out-of-flow-expected.checksum index ffcabab..f01d36a 100644 --- a/LayoutTests/platform/mac-leopard/fast/css/first-letter-skip-out-of-flow-expected.checksum +++ b/LayoutTests/platform/mac-leopard/fast/css/first-letter-skip-out-of-flow-expected.checksum @@ -1 +1 @@ -af1642ce11a6e894d15914dbcb6397ff \ No newline at end of file +4d054929ea7fa100e8d1f3b412121822 \ No newline at end of file diff --git a/LayoutTests/platform/mac-leopard/fast/css/first-letter-skip-out-of-flow-expected.png b/LayoutTests/platform/mac-leopard/fast/css/first-letter-skip-out-of-flow-expected.png index 7d9cc40..b82adcc 100644 Binary files a/LayoutTests/platform/mac-leopard/fast/css/first-letter-skip-out-of-flow-expected.png and b/LayoutTests/platform/mac-leopard/fast/css/first-letter-skip-out-of-flow-expected.png differ diff --git a/LayoutTests/platform/mac/fast/css/first-letter-float-after-float-expected.checksum b/LayoutTests/platform/mac/fast/css/first-letter-float-after-float-expected.checksum new file mode 100644 index 0000000..c13a4f3 --- /dev/null +++ b/LayoutTests/platform/mac/fast/css/first-letter-float-after-float-expected.checksum @@ -0,0 +1 @@ +f2222425c9138fdc6d00c6416a59b127 \ No newline at end of file diff --git a/LayoutTests/platform/mac/fast/css/first-letter-float-after-float-expected.png b/LayoutTests/platform/mac/fast/css/first-letter-float-after-float-expected.png new file mode 100644 index 0000000..7296950 Binary files /dev/null and b/LayoutTests/platform/mac/fast/css/first-letter-float-after-float-expected.png differ diff --git a/LayoutTests/platform/mac/fast/css/first-letter-float-after-float-expected.txt b/LayoutTests/platform/mac/fast/css/first-letter-float-after-float-expected.txt new file mode 100644 index 0000000..0a3b62c --- /dev/null +++ b/LayoutTests/platform/mac/fast/css/first-letter-float-after-float-expected.txt @@ -0,0 +1,30 @@ +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" diff --git a/LayoutTests/platform/mac/fast/css/first-letter-skip-out-of-flow-expected.txt b/LayoutTests/platform/mac/fast/css/first-letter-skip-out-of-flow-expected.txt index 0325b30..baa675a 100644 --- a/LayoutTests/platform/mac/fast/css/first-letter-skip-out-of-flow-expected.txt +++ b/LayoutTests/platform/mac/fast/css/first-letter-skip-out-of-flow-expected.txt @@ -17,10 +17,10 @@ layer at (0,0) size 800x600 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 @@ -43,12 +43,12 @@ layer at (0,0) size 800x600 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 diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog index 70feb80..1eee699 100644 --- a/WebCore/ChangeLog +++ b/WebCore/ChangeLog @@ -1,3 +1,17 @@ +2008-05-08 Dan Bernstein + + Reviewed by Mark Rowe. + + - fix https://bugs.webkit.org/show_bug.cgi?id=18818 + 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 Reviewed by Darin Adler. diff --git a/WebCore/rendering/RenderBlock.cpp b/WebCore/rendering/RenderBlock.cpp index 8e6c929..a19a7b5 100644 --- a/WebCore/rendering/RenderBlock.cpp +++ b/WebCore/rendering/RenderBlock.cpp @@ -4231,9 +4231,7 @@ void RenderBlock::updateFirstLetter() 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