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

Unified Diff: third_party/WebKit/Source/core/dom/Document.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/dom/ContainerNode.cpp ('k') | third_party/WebKit/Source/core/dom/Node.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/dom/Document.cpp
diff --git a/third_party/WebKit/Source/core/dom/Document.cpp b/third_party/WebKit/Source/core/dom/Document.cpp
index a465d2cd70e2b7bfcd083a38b2d97a2f5ffe4ddb..987ef3825986c0c2c582a12a836d461d70c56047 100644
--- a/third_party/WebKit/Source/core/dom/Document.cpp
+++ b/third_party/WebKit/Source/core/dom/Document.cpp
@@ -4056,7 +4056,7 @@ bool Document::SetFocusedElement(Element* prp_new_focused_element,
// Remove focus from the existing focus node (if any)
if (old_focused_element) {
- old_focused_element->SetFocused(false);
+ old_focused_element->SetFocused(false, params.type);
// Dispatch the blur event and let the node do any other blur related
// activities (important for text fields)
@@ -4088,12 +4088,6 @@ bool Document::SetFocusedElement(Element* prp_new_focused_element,
new_focused_element = nullptr;
}
}
-
- if (IsHTMLPlugInElement(old_focused_element)) {
- if (PluginView* plugin =
- ToHTMLPlugInElement(old_focused_element)->Plugin())
- plugin->SetFocused(false, params.type);
- }
}
if (new_focused_element)
@@ -4109,7 +4103,7 @@ bool Document::SetFocusedElement(Element* prp_new_focused_element,
focused_element_ = new_focused_element;
SetSequentialFocusNavigationStartingPoint(focused_element_.Get());
- focused_element_->SetFocused(true);
+ focused_element_->SetFocused(true, params.type);
// Element::setFocused for frames can dispatch events.
if (focused_element_ != new_focused_element) {
focus_change_blocked = true;
@@ -4158,11 +4152,6 @@ bool Document::SetFocusedElement(Element* prp_new_focused_element,
if (IsRootEditableElement(*focused_element_))
GetFrame()->GetSpellChecker().DidBeginEditing(focused_element_.Get());
-
- if (IsHTMLPlugInElement(focused_element_)) {
- if (PluginView* plugin = ToHTMLPlugInElement(focused_element_)->Plugin())
- plugin->SetFocused(true, params.type);
- }
}
if (!focus_change_blocked && focused_element_) {
« no previous file with comments | « third_party/WebKit/Source/core/dom/ContainerNode.cpp ('k') | third_party/WebKit/Source/core/dom/Node.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698