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

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

Issue 1433103002: Use FocusParams in FocusController::setFocusedElement and Document::setFocusedElement arguments. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 926efa69f123f2abafe38f3b446591eeb6d99ae1..1beab732d7ec934476aedf01407d701e06338d9b 100644
--- a/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
+++ b/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
@@ -1876,7 +1876,7 @@ void WebLocalFrameImpl::setFindEndstateFocusAndSelection()
// Found a focusable parent node. Set the active match as the
// selection and focus to the focusable node.
frame()->selection().setSelection(VisibleSelection(EphemeralRange(activeMatch)));
- frame()->document()->setFocusedElement(element);
+ frame()->document()->setFocusedElement(element, FocusParams(SelectionBehaviorOnFocus::None, WebFocusTypeNone, nullptr));
return;
}
}
@@ -1890,7 +1890,7 @@ void WebLocalFrameImpl::setFindEndstateFocusAndSelection()
continue;
Element* element = toElement(node);
if (element->isFocusable()) {
- frame()->document()->setFocusedElement(element);
+ frame()->document()->setFocusedElement(element, FocusParams(SelectionBehaviorOnFocus::None, WebFocusTypeNone, nullptr));
return;
}
}
@@ -1901,7 +1901,7 @@ void WebLocalFrameImpl::setFindEndstateFocusAndSelection()
// we have nothing focused (otherwise you might have text selected but
// a link focused, which is weird).
frame()->selection().setSelection(VisibleSelection(EphemeralRange(activeMatch)));
- frame()->document()->setFocusedElement(nullptr);
+ frame()->document()->clearFocusedElement();
// Finally clear the active match, for two reasons:
// We just finished the find 'session' and we don't want future (potentially
« no previous file with comments | « third_party/WebKit/Source/web/TextFinder.cpp ('k') | third_party/WebKit/Source/web/WebPluginContainerImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698