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

Unified Diff: third_party/WebKit/Source/core/editing/commands/IndentOutdentCommand.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/IndentOutdentCommand.cpp
diff --git a/third_party/WebKit/Source/core/editing/commands/IndentOutdentCommand.cpp b/third_party/WebKit/Source/core/editing/commands/IndentOutdentCommand.cpp
index 8c6f691acaa73280127d870e1cbcd3db7327a4f5..b9f8cef4b26ae82d4f603d6ae553097731a1f9da 100644
--- a/third_party/WebKit/Source/core/editing/commands/IndentOutdentCommand.cpp
+++ b/third_party/WebKit/Source/core/editing/commands/IndentOutdentCommand.cpp
@@ -157,7 +157,7 @@ void IndentOutdentCommand::outdentParagraph(EditingState* editingState)
VisiblePosition visibleEndOfParagraph = endOfParagraph(visibleStartOfParagraph);
HTMLElement* enclosingElement = toHTMLElement(enclosingNodeOfType(visibleStartOfParagraph.deepEquivalent(), &isHTMLListOrBlockquoteElement));
- if (!enclosingElement || !enclosingElement->parentNode()->hasEditableStyle()) // We can't outdent if there is no place to go!
+ if (!enclosingElement || !hasEditableStyle(*enclosingElement->parentNode())) // We can't outdent if there is no place to go!
return;
// Use InsertListCommand to remove the selection from the list
@@ -190,7 +190,7 @@ void IndentOutdentCommand::outdentParagraph(EditingState* editingState)
if (Element* splitPointParent = splitPoint->parentElement()) {
if (splitPointParent->hasTagName(blockquoteTag)
&& !splitPoint->hasTagName(blockquoteTag)
- && splitPointParent->parentNode()->hasEditableStyle()) // We can't outdent if there is no place to go!
+ && hasEditableStyle(*splitPointParent->parentNode())) // We can't outdent if there is no place to go!
splitElement(splitPointParent, splitPoint);
}
}

Powered by Google App Engine
This is Rietveld 408576698