Index: third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp |
diff --git a/third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp b/third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp |
index d596e313ddac407315aa006accb080faddbac240..07db048527dd63ddeaa418e2970d9182d6132b46 100644 |
--- a/third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp |
+++ b/third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp |
@@ -96,6 +96,24 @@ DEFINE_TRACE(HTMLPlugInElement) { |
HTMLFrameOwnerElement::trace(visitor); |
} |
+void HTMLPlugInElement::dispatchBlurEvent( |
+ Element* newFocusedElement, |
+ WebFocusType type, |
+ InputDeviceCapabilities* sourceCapabilities) { |
+ if (PluginView* plugin = ownedPlugin()) |
+ plugin->setFocused(false, type); |
dcheng
2017/04/05 07:48:08
One potential subtlety that I'm not sure if we nee
haraken
2017/04/05 11:59:00
Would it be crazy to call Element::dispatchBlurEve
dcheng
2017/04/05 21:14:44
Either way, I think we may need to do a focus chec
joelhockey
2017/04/05 23:59:11
I think this change will fix any potential bugs re
dcheng
2017/04/06 03:01:33
I guess my concern mostly regards the short-circui
joelhockey
2017/04/06 06:11:00
I have updated to call the dom onblur/onfocus firs
|
+ Element::dispatchBlurEvent(newFocusedElement, type, sourceCapabilities); |
+} |
+ |
+void HTMLPlugInElement::dispatchFocusEvent( |
+ Element* oldFocusedElement, |
+ WebFocusType type, |
+ InputDeviceCapabilities* sourceCapabilities) { |
+ if (PluginView* plugin = ownedPlugin()) |
+ plugin->setFocused(true, type); |
+ Element::dispatchFocusEvent(oldFocusedElement, type, sourceCapabilities); |
+} |
+ |
// TODO(joelhockey): Move implementation of HTMLFrameOwnerElement |
// setWidget/releaseWidget/ownedWidget that relates to plugins to here and |
// remove inheritance from PluginView to FrameViewBase. |