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

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

Issue 2810593002: Set plugin focus by implementing HTMLPlugInElement::SetFocused. (Closed)
Patch Set: fix comments Created 3 years, 8 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/core/html/shadow/DateTimeNumericFieldElement.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 fb151dad23a4f8785c6dc4ec35015dae8f2e367a..88bc321b30d6f1ac2fd99e82e873fc8f4f53662a 100644
--- a/third_party/WebKit/Source/core/page/FocusController.cpp
+++ b/third_party/WebKit/Source/core/page/FocusController.cpp
@@ -370,7 +370,8 @@ inline void DispatchEventsOnWindowAndFocusedElement(Document* document,
if (!focused && document->FocusedElement()) {
Element* focused_element = document->FocusedElement();
- focused_element->SetFocused(false);
+ // Use focus_type kWebFocusTypePage, same as used in DispatchBlurEvent.
+ focused_element->SetFocused(false, kWebFocusTypePage);
DispatchBlurEvent(*document, *focused_element);
}
@@ -379,7 +380,8 @@ inline void DispatchEventsOnWindowAndFocusedElement(Document* document,
Event::Create(focused ? EventTypeNames::focus : EventTypeNames::blur));
if (focused && document->FocusedElement()) {
Element* focused_element(document->FocusedElement());
- focused_element->SetFocused(true);
+ // Use focus_type kWebFocusTypePage, same as used in DispatchFocusEvent.
+ focused_element->SetFocused(true, kWebFocusTypePage);
DispatchFocusEvent(*document, *focused_element);
}
}
« no previous file with comments | « third_party/WebKit/Source/core/html/shadow/DateTimeNumericFieldElement.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698