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

Unified Diff: third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp

Issue 2710883002: Expand FrameSeleciton::isNone() to increase chances of hoisting update layout (Closed)
Patch Set: 2017-02-23T16:27:43 rebase to resolve conflict with DOMSelection in r452402 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/commands/EditorCommand.cpp
diff --git a/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp b/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp
index b4cff0c3f69c229e8888bb86fa2bf2d1f5477a4d..21ce048ff2a3167b49e90e9835612d993f93580a 100644
--- a/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp
+++ b/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp
@@ -1914,7 +1914,9 @@ static bool enabledInRichlyEditableText(LocalFrame& frame,
// We should update selection to canonicalize with current layout and style,
// before accessing |FrameSelection::selection()|.
frame.selection().updateIfNeeded();
- return !frame.selection().isNone() &&
+ return !frame.selection()
+ .computeVisibleSelectionInDOMTreeDeprecated()
+ .isNone() &&
frame.selection()
.computeVisibleSelectionInDOMTreeDeprecated()
.isContentRichlyEditable() &&

Powered by Google App Engine
This is Rietveld 408576698