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

Unified Diff: third_party/WebKit/Source/core/editing/InputMethodController.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/InputMethodController.cpp
diff --git a/third_party/WebKit/Source/core/editing/InputMethodController.cpp b/third_party/WebKit/Source/core/editing/InputMethodController.cpp
index 844581bd473eacd989f55d81de8598add7ecd74d..6b23c57f2884d08920fe83696590fd163cb2dc29 100644
--- a/third_party/WebKit/Source/core/editing/InputMethodController.cpp
+++ b/third_party/WebKit/Source/core/editing/InputMethodController.cpp
@@ -326,7 +326,7 @@ bool InputMethodController::replaceComposition(const String& text) {
// Select the text that will be deleted or replaced.
selectComposition();
- if (frame().selection().isNone())
+ if (frame().selection().computeVisibleSelectionInDOMTreeDeprecated().isNone())
return false;
if (!isAvailable())
@@ -447,7 +447,7 @@ void InputMethodController::cancelComposition() {
Editor::RevealSelectionScope revealSelectionScope(&editor());
- if (frame().selection().isNone())
+ if (frame().selection().computeVisibleSelectionInDOMTreeDeprecated().isNone())
return;
clear();
@@ -507,7 +507,7 @@ void InputMethodController::setComposition(
selectComposition();
- if (frame().selection().isNone())
+ if (frame().selection().computeVisibleSelectionInDOMTreeDeprecated().isNone())
return;
Element* target = document().focusedElement();

Powered by Google App Engine
This is Rietveld 408576698