Chromium Code Reviews| Index: Source/core/rendering/RenderObjectChildList.cpp |
| diff --git a/Source/core/rendering/RenderObjectChildList.cpp b/Source/core/rendering/RenderObjectChildList.cpp |
| index b084b3932d96d5b0fa9c550c3b62d0b42d5cf994..f313bf40fc11935e4953494674e68c46f4dff04f 100644 |
| --- a/Source/core/rendering/RenderObjectChildList.cpp |
| +++ b/Source/core/rendering/RenderObjectChildList.cpp |
| @@ -45,14 +45,15 @@ 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(); |
| + if (firstChild()->isListMarker()) { |
| + firstChild()->remove(); // List markers are owned by their enclosing list and so don't get destroyed by this container. |
|
Julien - ping for review
2014/10/01 21:14:47
Nit: I would move that above the isListMarker chec
dsinclair
2014/10/04 02:01:34
Done.
|
| + 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(); |
| } |
| } |