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

Unified Diff: WebCore/dom/ContainerNode.cpp

Issue 3007044: Merge 63865 - 2010-07-21 Justin Schuh <jschuh@chromium.org>... (Closed) Base URL: svn://svn.chromium.org/chrome/branches/WebKit/375/
Patch Set: Created 10 years, 4 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 | « LayoutTests/svg/custom/use-invalid-html-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: WebCore/dom/ContainerNode.cpp
===================================================================
--- WebCore/dom/ContainerNode.cpp (revision 55439)
+++ WebCore/dom/ContainerNode.cpp (working copy)
@@ -675,12 +675,13 @@
void ContainerNode::cloneChildNodes(ContainerNode *clone)
{
// disable the delete button so it's elements are not serialized into the markup
- if (document()->frame())
+ bool isEditorEnabled = document()->frame() && document()->frame()->editor()->canEdit();
+ if (isEditorEnabled)
document()->frame()->editor()->deleteButtonController()->disable();
ExceptionCode ec = 0;
for (Node* n = firstChild(); n && !ec; n = n->nextSibling())
clone->appendChild(n->cloneNode(true), ec);
- if (document()->frame())
+ if (isEditorEnabled && document()->frame())
document()->frame()->editor()->deleteButtonController()->enable();
}
« no previous file with comments | « LayoutTests/svg/custom/use-invalid-html-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698