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

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

Issue 2785333002: Revert of Get rid of computeVisibleSelectionInDOMTreeDeprecated() in InputMethodController (Closed)
Patch Set: 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
« 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 fd4724b8fff6eb83aaf51c9c840eda12565c157b..5b46a96cc3e4b46234b9885ed4e2c95a28259f69 100644
--- a/third_party/WebKit/Source/core/editing/InputMethodController.cpp
+++ b/third_party/WebKit/Source/core/editing/InputMethodController.cpp
@@ -259,10 +259,6 @@
const int offset = forwardMachine.getBoundaryOffset();
DCHECK_EQ(offset, deletionEnd - selectionEnd);
return offset;
-}
-
-Element* rootEditableElementOfSelection(const FrameSelection& selection) {
- return rootEditableElementOf(selection.selectionInDOMTree().base());
}
} // anonymous namespace
@@ -1034,7 +1030,10 @@
// plugins/mouse-capture-inside-shadow.html reaches here.
return info;
}
- Element* element = rootEditableElementOfSelection(frame().selection());
+ Element* element = frame()
+ .selection()
+ .computeVisibleSelectionInDOMTreeDeprecated()
+ .rootEditableElement();
if (!element)
return info;
@@ -1183,7 +1182,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(frame().selection()))
+ if (!frame()
+ .selection()
+ .computeVisibleSelectionInDOMTreeDeprecated()
+ .rootEditableElement())
return WebTextInputTypeNone;
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