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

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

Issue 2741173002: Reduce canonicalization when dragging (Closed)
Patch Set: update Created 3 years, 9 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 5b46a96cc3e4b46234b9885ed4e2c95a28259f69..7072788de5484df5eaa9dc2877c6e0521573c4df 100644
--- a/third_party/WebKit/Source/core/editing/InputMethodController.cpp
+++ b/third_party/WebKit/Source/core/editing/InputMethodController.cpp
@@ -1030,10 +1030,8 @@ WebTextInputInfo InputMethodController::textInputInfo() const {
// plugins/mouse-capture-inside-shadow.html reaches here.
return info;
}
- Element* element = frame()
- .selection()
- .computeVisibleSelectionInDOMTreeDeprecated()
yosin_UTC9 2017/03/16 02:30:05 Let's do mechanical change for computeVisibleSele
yoichio 2017/03/16 04:10:59 Acknowledged.
- .rootEditableElement();
+ Element* element =
+ rootEditableElementOf(frame().selection().selectionInDOMTree().base());
if (!element)
return info;
@@ -1179,15 +1177,6 @@ WebTextInputType InputMethodController::textInputType() const {
return WebTextInputTypeNone;
}
- // It's important to preserve the equivalence of textInputInfo().type and
- // textInputType(), so perform the same rootEditableElement() existence check
- // here for consistency.
- if (!frame()
- .selection()
- .computeVisibleSelectionInDOMTreeDeprecated()
- .rootEditableElement())
- return WebTextInputTypeNone;
-
if (!isAvailable())
return WebTextInputTypeNone;
@@ -1195,6 +1184,12 @@ WebTextInputType InputMethodController::textInputType() const {
if (!element)
return WebTextInputTypeNone;
+ // It's important to preserve the equivalence of textInputInfo().type and
yosin_UTC9 2017/03/16 02:30:05 Please have another patch to moving this block.
yoichio 2017/03/16 04:10:59 Acknowledged.
+ // textInputType(), so perform the same rootEditableElement() existence check
+ // here for consistency.
+ if (!rootEditableElementOf(frame().selection().selectionInDOMTree().base()))
+ return WebTextInputTypeNone;
+
if (isHTMLInputElement(*element)) {
HTMLInputElement& input = toHTMLInputElement(*element);
const AtomicString& type = input.type();

Powered by Google App Engine
This is Rietveld 408576698