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

Unified Diff: third_party/WebKit/Source/core/editing/Editor.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/Editor.cpp
diff --git a/third_party/WebKit/Source/core/editing/Editor.cpp b/third_party/WebKit/Source/core/editing/Editor.cpp
index c10850424f9618fdbc765156bb3008961723bc84..5c3248a348792db6d1499155d8ad3e578f03e4d7 100644
--- a/third_party/WebKit/Source/core/editing/Editor.cpp
+++ b/third_party/WebKit/Source/core/editing/Editor.cpp
@@ -319,7 +319,7 @@ bool Editor::canDeleteRange(const EphemeralRange& range) const
if (!startContainer || !endContainer)
return false;
- if (!startContainer->hasEditableStyle() || !endContainer->hasEditableStyle())
+ if (!hasEditableStyle(*startContainer) || !hasEditableStyle(*endContainer))
return false;
if (range.isCollapsed()) {
@@ -1400,7 +1400,7 @@ void Editor::tidyUpHTMLStructure(Document& document)
{
// hasEditableStyle() needs up-to-date ComputedStyle.
document.updateStyleAndLayoutTree();
- bool needsValidStructure = document.hasEditableStyle() || (document.documentElement() && document.documentElement()->hasEditableStyle());
+ bool needsValidStructure = hasEditableStyle(document) || (document.documentElement() && hasEditableStyle(*document.documentElement()));
if (!needsValidStructure)
return;
Element* existingHead = nullptr;

Powered by Google App Engine
This is Rietveld 408576698