Reviewed by Sam Weinig.
Source/WebCore:
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.
LayoutTests:
* 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.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@96427
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2011-09-30 Dan Bernstein <mitz@apple.com>
+
+ <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-09-30 David Hyatt <hyatt@apple.com>
https://bugs.webkit.org/show_bug.cgi?id=69167
--- /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 {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
--- /dev/null
+<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>
+2011-09-30 Dan Bernstein <mitz@apple.com>
+
+ <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-09-30 Cary Clark <caryclark@google.com>
Inset focus ring (Skia on Mac)
RefPtr<RenderStyle> newStyle = RenderStyle::create();
newStyle->inheritFrom(pseudoElementStyle);
newStyle->setDisplay(curr->style()->display());
+ newStyle->setStyleType(curr->style()->styleType());
curr->setStyle(newStyle);
curr = curr->parent();
}
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, bool* wasFixed) const