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

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

Issue 1423053002: Make document.activeElement work with OOPIF (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@focus-preserve-page-focus-on-subframe-navigations
Patch Set: Created 5 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 22473b153a188850a12e783f021304d29ea362e2..a6c380b0c56d5d4e9b727a8291c8455b9c6dd2e3 100644
--- a/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
+++ b/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
@@ -1355,11 +1355,11 @@ void WebLocalFrameImpl::setCaretVisible(bool visible)
frame()->selection().setCaretVisible(visible);
}
-void WebLocalFrameImpl::clearFocus()
+void WebLocalFrameImpl::clearFocus(WebRemoteFrame* newFocusedFrame)
{
// This uses setFocusedElement rather than setFocusedFrame so that blur
// events are properly dispatched on any currently focused elements.
- frame()->page()->focusController().setFocusedElement(nullptr, nullptr);
+ frame()->page()->focusController().setFocusedElement(nullptr, toCoreFrame(newFocusedFrame));
}
VisiblePosition WebLocalFrameImpl::visiblePositionForViewportPoint(const WebPoint& pointInViewport)

Powered by Google App Engine
This is Rietveld 408576698