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

Unified Diff: third_party/WebKit/Source/core/editing/commands/InsertNodeBeforeCommand.cpp

Issue 2121313003: [Editing][DOM][CodeHealth] Make Node::isContentEditable and Node::isRichEditable global functions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 5 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
Index: third_party/WebKit/Source/core/editing/commands/InsertNodeBeforeCommand.cpp
diff --git a/third_party/WebKit/Source/core/editing/commands/InsertNodeBeforeCommand.cpp b/third_party/WebKit/Source/core/editing/commands/InsertNodeBeforeCommand.cpp
index fe10ce6708917073dbc84e31f2e5a98e7357f82e..7032c6514c6a5efb855d8098ad6c88c35e692df3 100644
--- a/third_party/WebKit/Source/core/editing/commands/InsertNodeBeforeCommand.cpp
+++ b/third_party/WebKit/Source/core/editing/commands/InsertNodeBeforeCommand.cpp
@@ -47,16 +47,16 @@ InsertNodeBeforeCommand::InsertNodeBeforeCommand(Node* insertChild, Node* refChi
void InsertNodeBeforeCommand::doApply(EditingState*)
{
ContainerNode* parent = m_refChild->parentNode();
- if (!parent || (m_shouldAssumeContentIsAlwaysEditable == DoNotAssumeContentIsAlwaysEditable && !parent->isContentEditable()))
+ if (!parent || (m_shouldAssumeContentIsAlwaysEditable == DoNotAssumeContentIsAlwaysEditable && !isContentEditable(*parent)))
return;
- DCHECK(parent->isContentEditable()) << parent;
+ DCHECK(isContentEditable(*parent)) << parent;
parent->insertBefore(m_insertChild.get(), m_refChild.get(), IGNORE_EXCEPTION);
}
void InsertNodeBeforeCommand::doUnapply()
{
- if (!m_insertChild->isContentEditable())
+ if (!isContentEditable(*m_insertChild))
return;
m_insertChild->remove(IGNORE_EXCEPTION);

Powered by Google App Engine
This is Rietveld 408576698