Index: third_party/WebKit/Source/core/layout/LayoutObject.cpp |
diff --git a/third_party/WebKit/Source/core/layout/LayoutObject.cpp b/third_party/WebKit/Source/core/layout/LayoutObject.cpp |
index 5dbf8d895f1764f103350b0fdd31822ba1b14999..9c37179e8907ae7dec32fa7bc319a9aad0d69393 100644 |
--- a/third_party/WebKit/Source/core/layout/LayoutObject.cpp |
+++ b/third_party/WebKit/Source/core/layout/LayoutObject.cpp |
@@ -2515,7 +2515,8 @@ void LayoutObject::destroyAndCleanupAnonymousWrappers() |
} |
LayoutObject* destroyRoot = this; |
- for (LayoutObject* destroyRootParent = destroyRoot->parent(); destroyRootParent && destroyRootParent->isAnonymous(); destroyRoot = destroyRootParent, destroyRootParent = destroyRootParent->parent()) { |
+ for (LayoutObject* destroyRootParent = destroyRoot->parent(); destroyRootParent && destroyRootParent->isAnonymous() && !destroyRootParent->parent()->createsAnonymousWrapper(); destroyRoot = destroyRootParent, destroyRootParent = destroyRootParent->parent()) { |
+ |
// Anonymous block continuations are tracked and destroyed elsewhere (see the bottom of LayoutBlock::removeChild) |
if (destroyRootParent->isLayoutBlockFlow() && toLayoutBlockFlow(destroyRootParent)->isAnonymousBlockContinuation()) |
break; |