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

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

Issue 672953002: Convert first letter into a pseudo element. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 1 month 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/core/rendering/RenderObject.cpp ('k') | Source/core/rendering/RenderTableCell.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderObjectChildList.cpp
diff --git a/Source/core/rendering/RenderObjectChildList.cpp b/Source/core/rendering/RenderObjectChildList.cpp
index 6f08f7d6f99e5a0da46690e640acbc6f782055c7..51e893b0fec5afe712e410a150edb0636cd7470c 100644
--- a/Source/core/rendering/RenderObjectChildList.cpp
+++ b/Source/core/rendering/RenderObjectChildList.cpp
@@ -45,14 +45,16 @@ void RenderObjectChildList::trace(Visitor* visitor)
void RenderObjectChildList::destroyLeftoverChildren()
{
while (firstChild()) {
- if (firstChild()->isListMarker() || (firstChild()->style()->styleType() == FIRST_LETTER && !firstChild()->isText())) {
- firstChild()->remove(); // List markers are owned by their enclosing list and so don't get destroyed by this container. Similarly, first letters are destroyed by their remaining text fragment.
- } else {
- // Destroy any anonymous children remaining in the render tree, as well as implicit (shadow) DOM elements like those used in the engine-based text fields.
- if (firstChild()->node())
- firstChild()->node()->setRenderer(0);
- firstChild()->destroy();
+ // List markers are owned by their enclosing list and so don't get destroyed by this container.
+ if (firstChild()->isListMarker()) {
+ firstChild()->remove();
+ continue;
}
+
+ // Destroy any anonymous children remaining in the render tree, as well as implicit (shadow) DOM elements like those used in the engine-based text fields.
+ if (firstChild()->node())
+ firstChild()->node()->setRenderer(0);
+ firstChild()->destroy();
}
}
« no previous file with comments | « Source/core/rendering/RenderObject.cpp ('k') | Source/core/rendering/RenderTableCell.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698