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

Unified Diff: third_party/WebKit/Source/core/page/FocusController.cpp

Issue 1602663003: Framelet Prototype 2016 using Mojo IPC Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased. Disabled oilpan Created 4 years, 11 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/core/page/FocusController.cpp
diff --git a/third_party/WebKit/Source/core/page/FocusController.cpp b/third_party/WebKit/Source/core/page/FocusController.cpp
index f267514ae2781e2e1731943f323cbb95f3d6587c..5daaa0921899108d2d9bd6ff48a94fcdfce0423b 100644
--- a/third_party/WebKit/Source/core/page/FocusController.cpp
+++ b/third_party/WebKit/Source/core/page/FocusController.cpp
@@ -176,6 +176,9 @@ inline void dispatchEventsOnWindowAndFocusedElement(Document* document, bool foc
if (document->focusedElement() && isHTMLPlugInElement(document->focusedElement()))
toHTMLPlugInElement(document->focusedElement())->setPluginFocus(focused);
+ if (document->focusedElement() && document->focusedElement()->isFrameletElement())
+ toHTMLFrameOwnerElement(document->focusedElement())->ownedWidget()->setFocus(focused, WebFocusTypeNone);
+
// Do not fire events while modal dialogs are up. See https://bugs.webkit.org/show_bug.cgi?id=33962
if (Page* page = document->page()) {
if (page->defersLoading())
@@ -779,7 +782,7 @@ bool FocusController::advanceFocusInDocumentOrder(LocalFrame* frame, Node* start
return true;
}
- if (element->isFrameOwnerElement() && (!isHTMLPlugInElement(*element) || !element->isKeyboardFocusable())) {
+ if (element->isFrameOwnerElement() && ((!element->isFrameletElement() && !isHTMLPlugInElement(*element)) || !element->isKeyboardFocusable())) {
// We focus frames rather than frame owners.
// FIXME: We should not focus frames that have no scrollbars, as focusing them isn't useful to the user.
HTMLFrameOwnerElement* owner = toHTMLFrameOwnerElement(element);
« no previous file with comments | « third_party/WebKit/Source/core/loader/FrameLoaderClient.h ('k') | third_party/WebKit/Source/platform/Widget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698