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

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

Issue 2782413002: Get rid of computeVisibleSelectionInDOMTreeDeprecated() in InputMethodController (Closed)
Patch Set: 2017-04-11T15:54:13 Rename for Grate Blink Renaming Created 3 years, 8 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1055d87630cfe2abcbf372b0d318ff6e8ea2a637..57512ea51f33318b7f07149afe12fd579b00d387 100644
--- a/third_party/WebKit/Source/core/editing/InputMethodController.cpp
+++ b/third_party/WebKit/Source/core/editing/InputMethodController.cpp
@@ -263,6 +263,10 @@ int CalculateAfterDeletionLengthsInCodePoints(
return offset;
}
+Element* RootEditableElementOfSelection(const FrameSelection& selection) {
+ return RootEditableElementOf(selection.GetSelectionInDOMTree().Base());
+}
+
} // anonymous namespace
InputMethodController* InputMethodController::Create(LocalFrame& frame) {
@@ -1019,10 +1023,7 @@ WebTextInputInfo InputMethodController::TextInputInfo() const {
// plugins/mouse-capture-inside-shadow.html reaches here.
return info;
}
- Element* element = GetFrame()
- .Selection()
- .ComputeVisibleSelectionInDOMTreeDeprecated()
- .RootEditableElement();
+ Element* element = RootEditableElementOfSelection(GetFrame().Selection());
if (!element)
return info;
@@ -1172,10 +1173,7 @@ WebTextInputType InputMethodController::TextInputType() const {
// It's important to preserve the equivalence of textInputInfo().type and
// textInputType(), so perform the same rootEditableElement() existence check
// here for consistency.
- if (!GetFrame()
- .Selection()
- .ComputeVisibleSelectionInDOMTreeDeprecated()
- .RootEditableElement())
+ if (!RootEditableElementOfSelection(GetFrame().Selection()))
return kWebTextInputTypeNone;
if (!IsAvailable())
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698