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

Unified Diff: third_party/WebKit/Source/core/editing/Editor.cpp

Issue 2704933006: Expand FrameSeleciton::rootEditableElement() to increase chances of hoisting update layout (Closed)
Patch Set: 2017-02-21T15:42:51 Created 3 years, 10 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 af6c0c9ee6be81a70fe3c60681a4781ea6f58736..dcd44c7ca717db5d9f68c1b52934dc4aa4274bd9 100644
--- a/third_party/WebKit/Source/core/editing/Editor.cpp
+++ b/third_party/WebKit/Source/core/editing/Editor.cpp
@@ -263,7 +263,10 @@ bool Editor::handleTextEvent(TextEvent* event) {
}
bool Editor::canEdit() const {
- return frame().selection().rootEditableElement();
+ return frame()
+ .selection()
+ .computeVisibleSelectionInDOMTreeDeprecated()
+ .rootEditableElement();
}
bool Editor::canEditRichly() const {
« no previous file with comments | « third_party/WebKit/Source/core/dom/Element.cpp ('k') | third_party/WebKit/Source/core/editing/InputMethodController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698