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

Unified Diff: third_party/WebKit/Source/core/editing/commands/DeleteSelectionCommand.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/DeleteSelectionCommand.cpp
diff --git a/third_party/WebKit/Source/core/editing/commands/DeleteSelectionCommand.cpp b/third_party/WebKit/Source/core/editing/commands/DeleteSelectionCommand.cpp
index 1034596615e1f722207656ac81c84221c37fd687..913fc9df2d5532021fadf84795bcf4cbed427fc5 100644
--- a/third_party/WebKit/Source/core/editing/commands/DeleteSelectionCommand.cpp
+++ b/third_party/WebKit/Source/core/editing/commands/DeleteSelectionCommand.cpp
@@ -335,7 +335,7 @@ static Position firstEditablePositionInNode(Node* node)
{
DCHECK(node);
Node* next = node;
- while (next && !next->hasEditableStyle())
+ while (next && !hasEditableStyle(*next))
next = NodeTraversal::next(*next, node);
return next ? firstPositionInOrBeforeNode(next) : Position();
}
@@ -347,7 +347,7 @@ void DeleteSelectionCommand::removeNode(Node* node, EditingState* editingState,
if (m_startRoot != m_endRoot && !(node->isDescendantOf(m_startRoot.get()) && node->isDescendantOf(m_endRoot.get()))) {
// If a node is not in both the start and end editable roots, remove it only if its inside an editable region.
- if (!node->parentNode()->hasEditableStyle()) {
+ if (!hasEditableStyle(*node->parentNode())) {
// Don't remove non-editable atomic nodes.
if (!node->hasChildren())
return;

Powered by Google App Engine
This is Rietveld 408576698