| 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;
|
|
|
|
|