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

Unified Diff: third_party/WebKit/Source/core/dom/Node.h

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/core/dom/Node.h
diff --git a/third_party/WebKit/Source/core/dom/Node.h b/third_party/WebKit/Source/core/dom/Node.h
index ad8cbb44bc25ed3e16ec6a51c36b4e1fb368847f..35e6d020c6d8e0bb42544b4a4912d953bafc8809 100644
--- a/third_party/WebKit/Source/core/dom/Node.h
+++ b/third_party/WebKit/Source/core/dom/Node.h
@@ -431,9 +431,9 @@ public:
{
switch (editableType) {
case ContentIsEditable:
- return hasEditableStyle(Editable, treatment);
+ return hasEditableStyle(this, Editable, treatment);
case HasEditableAXRole:
- return isEditableToAccessibility(Editable);
+ return isEditableToAccessibility(this, Editable);
}
ASSERT_NOT_REACHED();
return false;
@@ -443,9 +443,9 @@ public:
{
switch (editableType) {
case ContentIsEditable:
- return hasEditableStyle(RichlyEditable, UserSelectAllIsAlwaysNonEditable);
+ return hasEditableStyle(this, RichlyEditable, UserSelectAllIsAlwaysNonEditable);
case HasEditableAXRole:
- return isEditableToAccessibility(RichlyEditable);
+ return isEditableToAccessibility(this, RichlyEditable);
}
ASSERT_NOT_REACHED();
return false;
@@ -804,9 +804,10 @@ private:
void checkSlotChange();
+ // TODO(yoichio): Move these to core/editing
enum EditableLevel { Editable, RichlyEditable };
- bool hasEditableStyle(EditableLevel, UserSelectAllTreatment = UserSelectAllIsAlwaysNonEditable) const;
- bool isEditableToAccessibility(EditableLevel) const;
+ static bool hasEditableStyle(const Node*, EditableLevel, UserSelectAllTreatment = UserSelectAllIsAlwaysNonEditable);
+ static bool isEditableToAccessibility(const Node*, EditableLevel);
bool isUserActionElementActive() const;
bool isUserActionElementInActiveChain() const;
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/Node.cpp » ('j') | third_party/WebKit/Source/core/dom/Node.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698