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

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

Issue 2171493003: [Editing][DOM][CodeHealth] Make Node::hasEditableStyle global functions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/AppendNodeCommand.cpp
diff --git a/third_party/WebKit/Source/core/editing/commands/AppendNodeCommand.cpp b/third_party/WebKit/Source/core/editing/commands/AppendNodeCommand.cpp
index 5750eb69fef6797551f8beacceefa9d728070713..f9a4d83182e4a30cd43e6cd6eca96fd88de546a3 100644
--- a/third_party/WebKit/Source/core/editing/commands/AppendNodeCommand.cpp
+++ b/third_party/WebKit/Source/core/editing/commands/AppendNodeCommand.cpp
@@ -38,12 +38,12 @@ AppendNodeCommand::AppendNodeCommand(ContainerNode* parent, Node* node)
DCHECK(m_node);
DCHECK(!m_node->parentNode()) << m_node;
- DCHECK(m_parent->hasEditableStyle() || !m_parent->inActiveDocument()) << m_parent;
+ DCHECK(hasEditableStyle(*m_parent) || !m_parent->inActiveDocument()) << m_parent;
}
void AppendNodeCommand::doApply(EditingState*)
{
- if (!m_parent->hasEditableStyle() && m_parent->inActiveDocument())
+ if (!hasEditableStyle(*m_parent) && m_parent->inActiveDocument())
return;
m_parent->appendChild(m_node.get(), IGNORE_EXCEPTION);
@@ -51,7 +51,7 @@ void AppendNodeCommand::doApply(EditingState*)
void AppendNodeCommand::doUnapply()
{
- if (!m_parent->hasEditableStyle())
+ if (!hasEditableStyle(*m_parent))
return;
m_node->remove(IGNORE_EXCEPTION);

Powered by Google App Engine
This is Rietveld 408576698