Diff
Modified: branches/safari-534.54-branch/LayoutTests/ChangeLog (104079 => 104080)
--- branches/safari-534.54-branch/LayoutTests/ChangeLog 2012-01-04 22:47:49 UTC (rev 104079)
+++ branches/safari-534.54-branch/LayoutTests/ChangeLog 2012-01-04 22:55:43 UTC (rev 104080)
@@ -1,5 +1,19 @@
2011-1-4 Lucas Forschler <[email protected]>
+ Merge 96427
+
+ 2011-09-30 Dan Bernstein <[email protected]>
+
+ <rdar://problem/10208291> first-letter in generated before content with display: table is not updated
+
+ Reviewed by Sam Weinig.
+
+ * fast/css-generated-content/first-letter-in-nested-before-expected.png: Added.
+ * fast/css-generated-content/first-letter-in-nested-before-expected.txt: Added.
+ * fast/css-generated-content/first-letter-in-nested-before.html: Added.
+
+2011-1-4 Lucas Forschler <[email protected]>
+
Merge 96260
2011-09-28 Sergey Glazunov <[email protected]>
Copied: branches/safari-534.54-branch/LayoutTests/fast/css-generated-content/first-letter-in-nested-before-expected.png (from rev 96427, trunk/LayoutTests/fast/css-generated-content/first-letter-in-nested-before-expected.png)
(Binary files differ)
Copied: branches/safari-534.54-branch/LayoutTests/fast/css-generated-content/first-letter-in-nested-before-expected.txt (from rev 96427, trunk/LayoutTests/fast/css-generated-content/first-letter-in-nested-before-expected.txt) (0 => 104080)
--- branches/safari-534.54-branch/LayoutTests/fast/css-generated-content/first-letter-in-nested-before-expected.txt (rev 0)
+++ branches/safari-534.54-branch/LayoutTests/fast/css-generated-content/first-letter-in-nested-before-expected.txt 2012-01-04 22:55:43 UTC (rev 104080)
@@ -0,0 +1,17 @@
+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 {DIV} at (0,0) size 784x100 [color=#FF0000]
+ RenderText {#text} at (0,0) size 100x100
+ text run at (0,0) width 100: "A"
+ RenderBlock {DIV} at (0,0) size 784x100 [color=#008000]
+ RenderTable at (0,0) size 100x100
+ RenderTableSection (anonymous) at (0,0) size 100x100
+ RenderTableRow (anonymous) at (0,0) size 100x100
+ RenderTableCell (anonymous) at (0,0) size 100x100 [r=0 c=0 rs=1 cs=1]
+ RenderInline (generated) at (0,0) size 100x100
+ RenderText at (0,0) size 100x100
+ text run at (0,0) width 100: "A"
+ RenderText at (0,0) size 0x0
Copied: branches/safari-534.54-branch/LayoutTests/fast/css-generated-content/first-letter-in-nested-before.html (from rev 96427, trunk/LayoutTests/fast/css-generated-content/first-letter-in-nested-before.html) (0 => 104080)
--- branches/safari-534.54-branch/LayoutTests/fast/css-generated-content/first-letter-in-nested-before.html (rev 0)
+++ branches/safari-534.54-branch/LayoutTests/fast/css-generated-content/first-letter-in-nested-before.html 2012-01-04 22:55:43 UTC (rev 104080)
@@ -0,0 +1,13 @@
+<style>
+ #target { color: green; margin-top: -100px; }
+ #target:before { display: table; content: "A"; }
+ #target:first-letter { font-size: 200%; }
+</style>
+<body style="font-family: ahem; -webkit-font-smoothing: none;">
+ <div style="font-size: 100px; color: red;">A</div>
+ <div id="target"></div>
+ <script>
+ document.body.offsetTop;
+ document.getElementById("target").style.fontSize = "50px";
+ </script>
+</body>
Modified: branches/safari-534.54-branch/Source/WebCore/ChangeLog (104079 => 104080)
--- branches/safari-534.54-branch/Source/WebCore/ChangeLog 2012-01-04 22:47:49 UTC (rev 104079)
+++ branches/safari-534.54-branch/Source/WebCore/ChangeLog 2012-01-04 22:55:43 UTC (rev 104080)
@@ -1,5 +1,22 @@
2011-1-4 Lucas Forschler <[email protected]>
+ Merge 96427
+
+ 2011-09-30 Dan Bernstein <[email protected]>
+
+ <rdar://problem/10208291> first-letter in generated before content with display: table is not updated
+
+ Reviewed by Sam Weinig.
+
+ Test: fast/css-generated-content/first-letter-in-nested-before.html
+
+ * rendering/RenderObjectChildList.cpp:
+ (WebCore::RenderObjectChildList::updateBeforeAfterContent): Preserve the style type of anonymous
+ containers around the generated content when updating their style. This preserves the first-letter-ness
+ of the inline wrapping the first letter, which allows updateFirstLetter() to identify it later.
+
+2011-1-4 Lucas Forschler <[email protected]>
+
Merge 96260
2011-09-28 Sergey Glazunov <[email protected]>
Modified: branches/safari-534.54-branch/Source/WebCore/rendering/RenderObjectChildList.cpp (104079 => 104080)
--- branches/safari-534.54-branch/Source/WebCore/rendering/RenderObjectChildList.cpp 2012-01-04 22:47:49 UTC (rev 104079)
+++ branches/safari-534.54-branch/Source/WebCore/rendering/RenderObjectChildList.cpp 2012-01-04 22:55:43 UTC (rev 104080)
@@ -403,6 +403,7 @@
RefPtr<RenderStyle> newStyle = RenderStyle::create();
newStyle->inheritFrom(pseudoElementStyle);
newStyle->setDisplay(curr->style()->display());
+ newStyle->setStyleType(curr->style()->styleType());
curr->setStyle(newStyle);
curr = curr->parent();
}
Modified: branches/safari-534.54-branch/Source/WebCore/rendering/RenderView.cpp (104079 => 104080)
--- branches/safari-534.54-branch/Source/WebCore/rendering/RenderView.cpp 2012-01-04 22:47:49 UTC (rev 104079)
+++ branches/safari-534.54-branch/Source/WebCore/rendering/RenderView.cpp 2012-01-04 22:55:43 UTC (rev 104080)
@@ -134,6 +134,10 @@
ASSERT(m_layoutState == &state);
m_layoutState = 0;
setNeedsLayout(false);
+#if !ASSERT_DISABLED
+ for (RenderObject* renderer = this; renderer; renderer = renderer->nextInPreOrder())
+ ASSERT(!renderer->needsLayout());
+#endif
}
void RenderView::mapLocalToContainer(RenderBoxModelObject* repaintContainer, bool fixed, bool useTransforms, TransformState& transformState) const