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

Unified Diff: third_party/WebKit/Source/web/WebViewImpl.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/WebViewImpl.cpp
diff --git a/third_party/WebKit/Source/web/WebViewImpl.cpp b/third_party/WebKit/Source/web/WebViewImpl.cpp
index bc80f45bd1cbca16345dd0cf23964df93e0d58bc..bc4fb6baca09a440f5f8290038e3102ade37f4be 100644
--- a/third_party/WebKit/Source/web/WebViewImpl.cpp
+++ b/third_party/WebKit/Source/web/WebViewImpl.cpp
@@ -2818,7 +2818,7 @@ void WebViewImpl::setInitialFocus(bool reverse)
Frame* frame = page()->focusController().focusedOrMainFrame();
if (frame->isLocalFrame()) {
if (Document* document = toLocalFrame(frame)->document())
- document->setFocusedElement(nullptr);
+ document->clearFocusedElement();
}
page()->focusController().setInitialFocus(reverse ? WebFocusTypeBackward : WebFocusTypeForward);
}
@@ -2836,10 +2836,7 @@ void WebViewImpl::clearFocusedElement()
return;
RefPtrWillBeRawPtr<Element> oldFocusedElement = document->focusedElement();
-
- // Clear the focused node.
- document->setFocusedElement(nullptr);
-
+ document->clearFocusedElement();
if (!oldFocusedElement)
return;
« no previous file with comments | « third_party/WebKit/Source/web/WebPluginContainerImpl.cpp ('k') | third_party/WebKit/Source/web/tests/WebViewTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698