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

Unified Diff: third_party/WebKit/Source/core/editing/CaretBase.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
Index: third_party/WebKit/Source/core/editing/CaretBase.cpp
diff --git a/third_party/WebKit/Source/core/editing/CaretBase.cpp b/third_party/WebKit/Source/core/editing/CaretBase.cpp
index 5759cdb81b5fcdeaca757a1e5f2dba07f2960402..e8f3697ef8dec7a0d6273ea8de9dd8a91c966fdb 100644
--- a/third_party/WebKit/Source/core/editing/CaretBase.cpp
+++ b/third_party/WebKit/Source/core/editing/CaretBase.cpp
@@ -166,7 +166,7 @@ bool CaretBase::shouldRepaintCaret(Node& node) const
// If PositionAnchorType::BeforeAnchor or PositionAnchorType::AfterAnchor,
// carets need to be repainted not only when the node is contentEditable but
// also when its parentNode() is contentEditable.
- return node.isContentEditable() || (node.parentNode() && node.parentNode()->isContentEditable());
+ return isContentEditable(node) || (node.parentNode() && isContentEditable(*node.parentNode()));
}
bool CaretBase::shouldRepaintCaret(const LayoutViewItem view) const
@@ -185,7 +185,7 @@ void CaretBase::invalidateCaretRect(Node* node, bool caretRectChanged)
return;
if (LayoutViewItem view = node->document().layoutViewItem()) {
- if (node->isContentEditable() || shouldRepaintCaret(view))
+ if (isContentEditable(*node) || shouldRepaintCaret(view))
invalidateLocalCaretRect(node, localCaretRectWithoutUpdate());
}
}
« no previous file with comments | « third_party/WebKit/Source/core/dom/Node.cpp ('k') | third_party/WebKit/Source/core/editing/SelectionController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698