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

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

Issue 2843943002: Revert of Get rid of computeVisibleSelectionInDOMTreeDeprecated() in InputMethodController (Closed)
Patch Set: 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 57512ea51f33318b7f07149afe12fd579b00d387..1055d87630cfe2abcbf372b0d318ff6e8ea2a637 100644
--- a/third_party/WebKit/Source/core/editing/InputMethodController.cpp
+++ b/third_party/WebKit/Source/core/editing/InputMethodController.cpp
@@ -261,10 +261,6 @@
const int offset = forward_machine.GetBoundaryOffset();
DCHECK_EQ(offset, deletion_end - selection_end);
return offset;
-}
-
-Element* RootEditableElementOfSelection(const FrameSelection& selection) {
- return RootEditableElementOf(selection.GetSelectionInDOMTree().Base());
}
} // anonymous namespace
@@ -1023,7 +1019,10 @@
// plugins/mouse-capture-inside-shadow.html reaches here.
return info;
}
- Element* element = RootEditableElementOfSelection(GetFrame().Selection());
+ Element* element = GetFrame()
+ .Selection()
+ .ComputeVisibleSelectionInDOMTreeDeprecated()
+ .RootEditableElement();
if (!element)
return info;
@@ -1173,7 +1172,10 @@
// It's important to preserve the equivalence of textInputInfo().type and
// textInputType(), so perform the same rootEditableElement() existence check
// here for consistency.
- if (!RootEditableElementOfSelection(GetFrame().Selection()))
+ if (!GetFrame()
+ .Selection()
+ .ComputeVisibleSelectionInDOMTreeDeprecated()
+ .RootEditableElement())
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