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

Unified Diff: third_party/WebKit/Source/core/editing/commands/SplitTextNodeCommand.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/SplitTextNodeCommand.cpp
diff --git a/third_party/WebKit/Source/core/editing/commands/SplitTextNodeCommand.cpp b/third_party/WebKit/Source/core/editing/commands/SplitTextNodeCommand.cpp
index 34bef5c854473e7207ae716bbfa5c36143547341..00272e0164d764d8fd87e1493ee74a700a2690d2 100644
--- a/third_party/WebKit/Source/core/editing/commands/SplitTextNodeCommand.cpp
+++ b/third_party/WebKit/Source/core/editing/commands/SplitTextNodeCommand.cpp
@@ -52,7 +52,7 @@ SplitTextNodeCommand::SplitTextNodeCommand(Text* text, int offset)
void SplitTextNodeCommand::doApply(EditingState*)
{
ContainerNode* parent = m_text2->parentNode();
- if (!parent || !parent->hasEditableStyle())
+ if (!parent || !hasEditableStyle(*parent))
return;
String prefixText = m_text2->substringData(0, m_offset, IGNORE_EXCEPTION);
@@ -68,7 +68,7 @@ void SplitTextNodeCommand::doApply(EditingState*)
void SplitTextNodeCommand::doUnapply()
{
- if (!m_text1 || !m_text1->hasEditableStyle())
+ if (!m_text1 || !hasEditableStyle(*m_text1))
return;
DCHECK_EQ(m_text1->document(), document());
@@ -88,7 +88,7 @@ void SplitTextNodeCommand::doReapply()
return;
ContainerNode* parent = m_text2->parentNode();
- if (!parent || !parent->hasEditableStyle())
+ if (!parent || !hasEditableStyle(*parent))
return;
insertText1AndTrimText2();

Powered by Google App Engine
This is Rietveld 408576698