Modified: branches/safari-534.54-branch/LayoutTests/ChangeLog (104098 => 104099)
--- branches/safari-534.54-branch/LayoutTests/ChangeLog 2012-01-05 01:00:44 UTC (rev 104098)
+++ branches/safari-534.54-branch/LayoutTests/ChangeLog 2012-01-05 01:01:16 UTC (rev 104099)
@@ -1,5 +1,21 @@
2011-1-4 Lucas Forschler <[email protected]>
+ Merge 97124
+
+ 2011-10-10 Abhishek Arya <[email protected]>
+
+ Style not updated on text fragment in :first-letter
+ nested in :before table.
+ https://bugs.webkit.org/show_bug.cgi?id=69540
+
+ Reviewed by Dan Bernstein.
+
+ * fast/css-generated-content/first-letter-in-nested-before-table-expected.png: Added.
+ * fast/css-generated-content/first-letter-in-nested-before-table-expected.txt: Added.
+ * fast/css-generated-content/first-letter-in-nested-before-table.html: Added.
+
+2011-1-4 Lucas Forschler <[email protected]>
+
Merge 97114
2011-10-10 Dan Bernstein <[email protected]>
Copied: branches/safari-534.54-branch/LayoutTests/fast/css-generated-content/first-letter-in-nested-before-table-expected.txt (from rev 97124, trunk/LayoutTests/fast/css-generated-content/first-letter-in-nested-before-table-expected.txt) (0 => 104099)
--- branches/safari-534.54-branch/LayoutTests/fast/css-generated-content/first-letter-in-nested-before-table-expected.txt (rev 0)
+++ branches/safari-534.54-branch/LayoutTests/fast/css-generated-content/first-letter-in-nested-before-table-expected.txt 2012-01-05 01:01:16 UTC (rev 104099)
@@ -0,0 +1,40 @@
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x266
+ RenderBlock {HTML} at (0,0) size 800x266
+ RenderBody {BODY} at (8,8) size 784x250 [color=#0000FF]
+ RenderBlock {DIV} at (0,0) size 784x100
+ RenderTable at (0,0) size 100x50
+ RenderTableSection (anonymous) at (0,0) size 100x50
+ RenderTableRow (anonymous) at (0,0) size 100x50
+ RenderTableCell (anonymous) at (0,0) size 100x50 [r=0 c=0 rs=1 cs=1]
+ RenderInline (generated) at (0,0) size 50x50 [color=#008000]
+ RenderText at (0,0) size 50x50
+ text run at (0,0) width 50: "A"
+ RenderText at (50,0) size 50x50
+ text run at (50,0) width 50: "B"
+ RenderBlock (anonymous) at (0,50) size 784x50
+ RenderText {#text} at (0,0) size 50x50
+ text run at (0,0) width 50: "C"
+ RenderBlock {DIV} at (0,100) size 784x100
+ RenderBlock (anonymous) at (0,0) size 784x50
+ RenderInline (generated) at (0,0) size 50x50 [color=#008000]
+ RenderText {#text} at (0,0) size 50x50
+ text run at (0,0) width 50: "D"
+ RenderText {#text} at (0,0) size 0x0
+ RenderTable at (0,50) size 100x50
+ RenderTableSection (anonymous) at (0,0) size 100x50
+ RenderTableRow (anonymous) at (0,0) size 100x50
+ RenderTableCell (anonymous) at (0,0) size 100x50 [r=0 c=0 rs=1 cs=1]
+ RenderText at (0,0) size 100x50
+ text run at (0,0) width 100: "EF"
+ RenderBlock {DIV} at (0,200) size 784x50
+ RenderTable at (0,0) size 100x50
+ RenderTableSection (anonymous) at (0,0) size 100x50
+ RenderTableRow (anonymous) at (0,0) size 100x50
+ RenderTableCell (anonymous) at (0,0) size 100x50 [r=0 c=0 rs=1 cs=1]
+ RenderInline (generated) at (0,0) size 50x50 [color=#008000]
+ RenderText at (0,0) size 50x50
+ text run at (0,0) width 50: "E"
+ RenderText at (50,0) size 50x50
+ text run at (50,0) width 50: "F"
Copied: branches/safari-534.54-branch/LayoutTests/fast/css-generated-content/first-letter-in-nested-before-table.html (from rev 97124, trunk/LayoutTests/fast/css-generated-content/first-letter-in-nested-before-table.html) (0 => 104099)
--- branches/safari-534.54-branch/LayoutTests/fast/css-generated-content/first-letter-in-nested-before-table.html (rev 0)
+++ branches/safari-534.54-branch/LayoutTests/fast/css-generated-content/first-letter-in-nested-before-table.html 2012-01-05 01:01:16 UTC (rev 104099)
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<!-- No text in black, B and F should be blue. -->
+<html>
+<body style="font-family: ahem; font-size: 50px; -webkit-font-smoothing: none;">
+<style>
+.test1:before {
+ display: table;
+ content: "AB";
+}
+.test2:after {
+ display: table;
+ content: "EF";
+}
+.test1:first-letter { color: green; }
+.test2:first-letter { color: green; }
+</style>
+<div class="test1">C</div>
+<div class="test2">D</div>
+<div class="test2"></div>
+<script>
+document.body.offsetTop;
+document.body.style.color = "blue";
+</script>
+</html>
\ No newline at end of file
Modified: branches/safari-534.54-branch/Source/WebCore/ChangeLog (104098 => 104099)
--- branches/safari-534.54-branch/Source/WebCore/ChangeLog 2012-01-05 01:00:44 UTC (rev 104098)
+++ branches/safari-534.54-branch/Source/WebCore/ChangeLog 2012-01-05 01:01:16 UTC (rev 104099)
@@ -1,5 +1,22 @@
2011-1-4 Lucas Forschler <[email protected]>
+ Merge 97124
+
+ 2011-10-10 Abhishek Arya <[email protected]>
+
+ Style not updated on text fragment in :first-letter
+ nested in :before table.
+ https://bugs.webkit.org/show_bug.cgi?id=69540
+
+ Reviewed by Dan Bernstein.
+
+ Test: fast/css-generated-content/first-letter-in-nested-before-table.html
+
+ * rendering/RenderObjectChildList.cpp:
+ (WebCore::RenderObjectChildList::updateBeforeAfterContent):
+
+2011-1-4 Lucas Forschler <[email protected]>
+
Merge 97114
2011-10-10 Dan Bernstein <[email protected]>
Modified: branches/safari-534.54-branch/Source/WebCore/rendering/RenderObjectChildList.cpp (104098 => 104099)
--- branches/safari-534.54-branch/Source/WebCore/rendering/RenderObjectChildList.cpp 2012-01-05 01:00:44 UTC (rev 104098)
+++ branches/safari-534.54-branch/Source/WebCore/rendering/RenderObjectChildList.cpp 2012-01-05 01:01:16 UTC (rev 104099)
@@ -418,6 +418,14 @@
ASSERT(genChild->isListMarker() || genChild->style()->styleType() == FIRST_LETTER);
}
}
+
+ // Update style on the remaining text fragment after the first-letter.
+ if (beforeAfterParent->style()->styleType() == FIRST_LETTER) {
+ if (RenderObject* nextSibling = beforeAfterParent->nextSibling()) {
+ if (nextSibling->isText() && nextSibling->style()->styleType() == child->style()->styleType())
+ nextSibling->setStyle(pseudoElementStyle);
+ }
+ }
}
return; // We've updated the generated content. That's all we needed to do.
}