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

Unified Diff: Source/core/editing/CompositeEditCommand.cpp

Issue 698113005: The ASSERT in appendNode() should not fire when OBJECTS are cloned. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Full patch 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
Index: Source/core/editing/CompositeEditCommand.cpp
diff --git a/Source/core/editing/CompositeEditCommand.cpp b/Source/core/editing/CompositeEditCommand.cpp
index e05df2ca12e94aeec032c1b456f1697eed4e9920..1b4edb9d2bac5188b9e7a2650c4422d1c82d49b0 100644
--- a/Source/core/editing/CompositeEditCommand.cpp
+++ b/Source/core/editing/CompositeEditCommand.cpp
@@ -360,7 +360,9 @@ void CompositeEditCommand::insertNodeAt(PassRefPtrWillBeRawPtr<Node> insertChild
void CompositeEditCommand::appendNode(PassRefPtrWillBeRawPtr<Node> node, PassRefPtrWillBeRawPtr<ContainerNode> parent)
{
- ASSERT(canHaveChildrenForEditing(parent.get()));
+ // The useFallbackContent() is not set for cloned <object> nodes.
+ ASSERT(canHaveChildrenForEditing(parent.get())
+ || (parent->isElementNode() && toElement(parent.get())->tagQName() == objectTag));
yosin_UTC9 2014/11/20 01:26:41 Could you add a comment why we check OBJECT elemen
applyCommandToComposite(AppendNodeCommand::create(parent, node));
}

Powered by Google App Engine
This is Rietveld 408576698