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

Unified Diff: third_party/WebKit/Source/web/WebFrameWidgetImpl.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: rebase 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
« no previous file with comments | « third_party/WebKit/Source/web/WebElement.cpp ('k') | third_party/WebKit/Source/web/WebNode.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp
diff --git a/third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp b/third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp
index c1fb53364f0859a4b141af76431f52eceab92404..be708ee3537ff64ddd418fb55fdf05c3b4b894b7 100644
--- a/third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp
+++ b/third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp
@@ -460,7 +460,7 @@ void WebFrameWidgetImpl::setFocus(bool enable)
// no caret and does respond to keyboard inputs.
if (element->isTextFormControl()) {
element->updateFocusAppearance(SelectionBehaviorOnFocus::Restore);
- } else if (element->isContentEditable()) {
+ } else if (isContentEditable(*element)) {
// updateFocusAppearance() selects all the text of
// contentseditable DIVs. So we set the selection explicitly
// instead. Note that this has the side effect of moving the
@@ -517,7 +517,7 @@ bool WebFrameWidgetImpl::setComposition(
const EphemeralRange range = inputMethodController.compositionEphemeralRange();
if (range.isNotNull()) {
Node* node = range.startPosition().computeContainerNode();
- if (!node || !node->isContentEditable())
+ if (!node || !isContentEditable(*node))
return false;
}
@@ -715,7 +715,7 @@ WebTextInputType WebFrameWidgetImpl::textInputType()
return WebTextInputTypeDateTimeField;
}
- if (element->isContentEditable())
+ if (isContentEditable(*element))
return WebTextInputTypeContentEditable;
return WebTextInputTypeNone;
« no previous file with comments | « third_party/WebKit/Source/web/WebElement.cpp ('k') | third_party/WebKit/Source/web/WebNode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698