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

Unified Diff: third_party/WebKit/Source/core/editing/commands/SplitElementCommand.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/SplitElementCommand.cpp
diff --git a/third_party/WebKit/Source/core/editing/commands/SplitElementCommand.cpp b/third_party/WebKit/Source/core/editing/commands/SplitElementCommand.cpp
index 8181f84fb399f36087d5bb56dd1ebb1516cbbab9..bc3649454e1eadbda94209c93718811d789d3378 100644
--- a/third_party/WebKit/Source/core/editing/commands/SplitElementCommand.cpp
+++ b/third_party/WebKit/Source/core/editing/commands/SplitElementCommand.cpp
@@ -55,7 +55,7 @@ void SplitElementCommand::executeApply()
TrackExceptionState exceptionState;
ContainerNode* parent = m_element2->parentNode();
- if (!parent || !parent->hasEditableStyle())
+ if (!parent || !hasEditableStyle(*parent))
return;
parent->insertBefore(m_element1.get(), m_element2.get(), exceptionState);
if (exceptionState.hadException())
@@ -77,7 +77,7 @@ void SplitElementCommand::doApply(EditingState*)
void SplitElementCommand::doUnapply()
{
- if (!m_element1 || !m_element1->hasEditableStyle() || !m_element2->hasEditableStyle())
+ if (!m_element1 || !hasEditableStyle(*m_element1) || !hasEditableStyle(*m_element2))
return;
NodeVector children;

Powered by Google App Engine
This is Rietveld 408576698