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

Unified Diff: third_party/WebKit/Source/modules/accessibility/AXLayoutObject.cpp

Issue 2121313003: [Editing][DOM][CodeHealth] Make Node::isContentEditable and Node::isRichEditable 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/modules/accessibility/AXLayoutObject.cpp
diff --git a/third_party/WebKit/Source/modules/accessibility/AXLayoutObject.cpp b/third_party/WebKit/Source/modules/accessibility/AXLayoutObject.cpp
index 33a802fb36600ba0a3a9e195d493330c33d30ab3..dd67b0d7f1759c37b4c8effd226eaa91d4eafb59 100644
--- a/third_party/WebKit/Source/modules/accessibility/AXLayoutObject.cpp
+++ b/third_party/WebKit/Source/modules/accessibility/AXLayoutObject.cpp
@@ -426,16 +426,16 @@ bool AXLayoutObject::isEditable() const
if (getLayoutObject() && getLayoutObject()->isTextControl())
return true;
- if (getNode() && getNode()->isContentEditable())
+ if (getNode() && isContentEditable(*getNode()))
return true;
if (isWebArea()) {
Document& document = getLayoutObject()->document();
HTMLElement* body = document.body();
- if (body && body->isContentEditable())
+ if (body && isContentEditable(*body))
return true;
- return document.isContentEditable();
+ return isContentEditable(document);
}
return AXNodeObject::isEditable();
@@ -445,16 +445,16 @@ bool AXLayoutObject::isEditable() const
// user-modify. Don't move this logic to AXNodeObject.
bool AXLayoutObject::isRichlyEditable() const
{
- if (getNode() && getNode()->isContentRichlyEditable())
+ if (getNode() && isContentRichlyEditable(*getNode()))
return true;
if (isWebArea()) {
Document& document = m_layoutObject->document();
HTMLElement* body = document.body();
- if (body && body->isContentRichlyEditable())
+ if (body && isContentRichlyEditable(*body))
return true;
- return document.isContentRichlyEditable();
+ return isContentRichlyEditable(document);
}
return AXNodeObject::isRichlyEditable();

Powered by Google App Engine
This is Rietveld 408576698