Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(159)

Unified Diff: Source/WebCore/rendering/RenderObjectChildList.cpp

Issue 10447080: Merge 117865 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1132/
Patch Set: Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/WebCore/rendering/RenderObject.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/rendering/RenderObjectChildList.cpp
===================================================================
--- Source/WebCore/rendering/RenderObjectChildList.cpp (revision 118863)
+++ Source/WebCore/rendering/RenderObjectChildList.cpp (working copy)
@@ -397,7 +397,7 @@
}
}
-static RenderObject* createRenderForBeforeAfterContent(RenderObject* owner, const ContentData* content, RenderStyle* pseudoElementStyle)
+static RenderObject* createRendererForBeforeAfterContent(RenderObject* owner, const ContentData* content, RenderStyle* pseudoElementStyle)
{
RenderObject* renderer = 0;
switch (content->type()) {
@@ -514,13 +514,18 @@
insertBefore = insertBefore->firstChild();
}
+ // Nothing goes before the intruded run-in, not even generated content.
+ if (insertBefore && insertBefore->isRunIn() && owner->isRenderBlock()
+ && toRenderBlock(owner)->runInIsPlacedIntoSiblingBlock(insertBefore))
+ insertBefore = insertBefore->nextSibling();
+
// Generated content consists of a single container that houses multiple children (specified
// by the content property). This generated content container gets the pseudo-element style set on it.
RenderObject* generatedContentContainer = 0;
// Walk our list of generated content and create render objects for each.
for (const ContentData* content = pseudoElementStyle->contentData(); content; content = content->next()) {
- RenderObject* renderer = createRenderForBeforeAfterContent(owner, content, pseudoElementStyle);
+ RenderObject* renderer = createRendererForBeforeAfterContent(owner, content, pseudoElementStyle);
if (renderer) {
if (!generatedContentContainer) {
@@ -552,6 +557,14 @@
renderer->destroy();
}
}
+
+ if (!generatedContentContainer)
+ return;
+
+ // Handle placement of run-ins. We do the run-in placement at the end since generatedContentContainer can get destroyed.
+ RenderObject* generatedContentContainerImmediateParent = generatedContentContainer->parent();
+ if (generatedContentContainerImmediateParent->isRenderBlock())
+ toRenderBlock(generatedContentContainerImmediateParent)->placeRunInIfNeeded(generatedContentContainer, PlaceGeneratedRunIn);
}
} // namespace WebCore
« no previous file with comments | « Source/WebCore/rendering/RenderObject.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698