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

Unified Diff: third_party/WebKit/Source/web/WebLocalFrameImpl.cpp

Issue 2430253003: Get rid of createVisibleSelection() to take EphemeralRange (Closed)
Patch Set: 2016-10-20T14:03:19 Created 4 years, 2 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/web/WebLocalFrameImpl.cpp
diff --git a/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp b/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
index 58ada7277f3b6b973e9ec7388aaada886650367e..60e9d6af7e1ea57f71c52112a213983d34ba5e0d 100644
--- a/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
+++ b/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
@@ -1788,7 +1788,9 @@ void WebLocalFrameImpl::setFindEndstateFocusAndSelection() {
// Found a focusable parent node. Set the active match as the
// selection and focus to the focusable node.
frame()->selection().setSelection(
- createVisibleSelection(activeMatchRange));
+ SelectionInDOMTree::Builder()
+ .setBaseAndExtent(activeMatchRange)
+ .build());
frame()->document()->setFocusedElement(
&element, FocusParams(SelectionBehaviorOnFocus::None,
WebFocusTypeNone, nullptr));
@@ -1817,7 +1819,9 @@ void WebLocalFrameImpl::setFindEndstateFocusAndSelection() {
// you'll have the last thing you found highlighted) and make sure that
// we have nothing focused (otherwise you might have text selected but
// a link focused, which is weird).
- frame()->selection().setSelection(createVisibleSelection(activeMatchRange));
+ frame()->selection().setSelection(SelectionInDOMTree::Builder()
+ .setBaseAndExtent(activeMatchRange)
+ .build());
frame()->document()->clearFocusedElement();
// Finally clear the active match, for two reasons:
« no previous file with comments | « third_party/WebKit/Source/core/page/DragController.cpp ('k') | third_party/WebKit/Source/web/mac/WebSubstringUtil.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698