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

Unified Diff: Source/web/WebLocalFrameImpl.cpp

Issue 1307763003: Get rid of VisibleSelection constructor with Range parameter (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 4 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 | « Source/core/page/DragController.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebLocalFrameImpl.cpp
diff --git a/Source/web/WebLocalFrameImpl.cpp b/Source/web/WebLocalFrameImpl.cpp
index 15f0799bdd6337f05ac7d1a844955c360bb3b745..4fcbaea8be97cd49f734474c7b6011c09f2c3008 100644
--- a/Source/web/WebLocalFrameImpl.cpp
+++ b/Source/web/WebLocalFrameImpl.cpp
@@ -1899,7 +1899,7 @@ void WebLocalFrameImpl::setFindEndstateFocusAndSelection()
if (element->isFocusable()) {
// Found a focusable parent node. Set the active match as the
// selection and focus to the focusable node.
- frame()->selection().setSelection(VisibleSelection(activeMatch));
+ frame()->selection().setSelection(VisibleSelection(EphemeralRange(activeMatch)));
frame()->document()->setFocusedElement(element);
return;
}
@@ -1924,7 +1924,7 @@ 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(VisibleSelection(activeMatch));
+ frame()->selection().setSelection(VisibleSelection(EphemeralRange(activeMatch)));
frame()->document()->setFocusedElement(nullptr);
// Finally clear the active match, for two reasons:
« no previous file with comments | « Source/core/page/DragController.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698