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

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

Issue 1370013003: OOPIF: Clear old focused frame when focus moves to a cross-process frame. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove !frame()->page() check from WebLocalFrameImpl::clearFocus() Created 5 years, 3 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 | « third_party/WebKit/Source/web/WebLocalFrameImpl.h ('k') | third_party/WebKit/public/web/WebLocalFrame.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 086a79881696112c584d0d849db0724672006d89..f101593c265bd269854e7b9bafd650e18f36be42 100644
--- a/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
+++ b/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
@@ -1360,6 +1360,13 @@ void WebLocalFrameImpl::setCaretVisible(bool visible)
frame()->selection().setCaretVisible(visible);
}
+void WebLocalFrameImpl::clearFocus()
+{
+ // This uses setFocusedElement rather than setFocusedFrame so that blur
+ // events are properly dispatched on any currently focused elements.
+ frame()->page()->focusController().setFocusedElement(nullptr, nullptr);
+}
+
VisiblePosition WebLocalFrameImpl::visiblePositionForViewportPoint(const WebPoint& pointInViewport)
{
return visiblePositionForContentsPoint(frame()->view()->viewportToContents(pointInViewport), frame());
« no previous file with comments | « third_party/WebKit/Source/web/WebLocalFrameImpl.h ('k') | third_party/WebKit/public/web/WebLocalFrame.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698