summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorinferno@chromium.org <inferno@chromium.org@bbb929c8-8fbe-4397-9dbb-9b2b20218538>2011-10-11 05:08:13 +0000
committerinferno@chromium.org <inferno@chromium.org@bbb929c8-8fbe-4397-9dbb-9b2b20218538>2011-10-11 05:08:13 +0000
commit7fda473bb0e9c441e4858fe6dd4d1b6917be2b4c (patch)
tree720a22b30727ddd69579a8bc7163e6ccc29aeff1
parent24e9dd2cdb376c47d90f977b946127b6e8237733 (diff)
downloadchromium_src-7fda473bb0e9c441e4858fe6dd4d1b6917be2b4c.zip
chromium_src-7fda473bb0e9c441e4858fe6dd4d1b6917be2b4c.tar.gz
chromium_src-7fda473bb0e9c441e4858fe6dd4d1b6917be2b4c.tar.bz2
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. Source/WebCore: Test: fast/css-generated-content/first-letter-in-nested-before-table.html * rendering/RenderObjectChildList.cpp: (WebCore::RenderObjectChildList::updateBeforeAfterContent): LayoutTests: * 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. git-svn-id: svn://svn.chromium.org/blink/trunk@97124 bbb929c8-8fbe-4397-9dbb-9b2b20218538
-rw-r--r--third_party/WebKit/LayoutTests/ChangeLog12
-rw-r--r--third_party/WebKit/LayoutTests/fast/css-generated-content/first-letter-in-nested-before-table-expected.pngbin0 -> 11565 bytes
-rw-r--r--third_party/WebKit/LayoutTests/fast/css-generated-content/first-letter-in-nested-before-table-expected.txt40
-rw-r--r--third_party/WebKit/LayoutTests/fast/css-generated-content/first-letter-in-nested-before-table.html24
-rw-r--r--third_party/WebKit/Source/WebCore/ChangeLog13
-rw-r--r--third_party/WebKit/Source/WebCore/rendering/RenderObjectChildList.cpp8
6 files changed, 97 insertions, 0 deletions
diff --git a/third_party/WebKit/LayoutTests/ChangeLog b/third_party/WebKit/LayoutTests/ChangeLog
index 50d6104..f85d7c0 100644
--- a/third_party/WebKit/LayoutTests/ChangeLog
+++ b/third_party/WebKit/LayoutTests/ChangeLog
@@ -1,3 +1,15 @@
+2011-10-10 Abhishek Arya <inferno@chromium.org>
+
+ 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-10-10 James Simonsen <simonjam@chromium.org>
[Chromium] Fix expectations from r97120.
diff --git a/third_party/WebKit/LayoutTests/fast/css-generated-content/first-letter-in-nested-before-table-expected.png b/third_party/WebKit/LayoutTests/fast/css-generated-content/first-letter-in-nested-before-table-expected.png
new file mode 100644
index 0000000..229d455
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/css-generated-content/first-letter-in-nested-before-table-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/fast/css-generated-content/first-letter-in-nested-before-table-expected.txt b/third_party/WebKit/LayoutTests/fast/css-generated-content/first-letter-in-nested-before-table-expected.txt
new file mode 100644
index 0000000..b85cabf
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/css-generated-content/first-letter-in-nested-before-table-expected.txt
@@ -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"
diff --git a/third_party/WebKit/LayoutTests/fast/css-generated-content/first-letter-in-nested-before-table.html b/third_party/WebKit/LayoutTests/fast/css-generated-content/first-letter-in-nested-before-table.html
new file mode 100644
index 0000000..14af9c6
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/css-generated-content/first-letter-in-nested-before-table.html
@@ -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
diff --git a/third_party/WebKit/Source/WebCore/ChangeLog b/third_party/WebKit/Source/WebCore/ChangeLog
index 8a200b8..a17ef88 100644
--- a/third_party/WebKit/Source/WebCore/ChangeLog
+++ b/third_party/WebKit/Source/WebCore/ChangeLog
@@ -1,3 +1,16 @@
+2011-10-10 Abhishek Arya <inferno@chromium.org>
+
+ 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-10-10 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r97121.
diff --git a/third_party/WebKit/Source/WebCore/rendering/RenderObjectChildList.cpp b/third_party/WebKit/Source/WebCore/rendering/RenderObjectChildList.cpp
index d448236..51be59b 100644
--- a/third_party/WebKit/Source/WebCore/rendering/RenderObjectChildList.cpp
+++ b/third_party/WebKit/Source/WebCore/rendering/RenderObjectChildList.cpp
@@ -449,6 +449,14 @@ void RenderObjectChildList::updateBeforeAfterContent(RenderObject* owner, Pseudo
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.
}