RESOLVED FIXED 102150
Pass clicks through to the restarted plugin
https://bugs.webkit.org/show_bug.cgi?id=102150
Summary Pass clicks through to the restarted plugin
Jon Lee
Reported 2012-11-13 16:19:25 PST
Clicking on the plugin enables snapshotted plugins.
Attachments
Patch (24.03 KB, patch)
2012-11-18 03:10 PST, Jon Lee
no flags
Patch (23.96 KB, patch)
2012-11-26 01:54 PST, Jon Lee
no flags
Patch (23.97 KB, patch)
2012-11-26 02:13 PST, Jon Lee
simon.fraser: review+
Radar WebKit Bug Importer
Comment 1 2012-11-13 16:19:40 PST
Jon Lee
Comment 2 2012-11-18 03:10:47 PST
Early Warning System Bot
Comment 3 2012-11-18 03:19:14 PST
Early Warning System Bot
Comment 4 2012-11-18 03:19:17 PST
EFL EWS Bot
Comment 5 2012-11-18 03:25:12 PST
WebKit Review Bot
Comment 6 2012-11-18 03:36:34 PST
Comment on attachment 174845 [details] Patch Attachment 174845 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/14890096
Build Bot
Comment 7 2012-11-18 03:37:03 PST
Build Bot
Comment 8 2012-11-18 03:37:09 PST
Peter Beverloo (cr-android ews)
Comment 9 2012-11-18 03:39:52 PST
Comment on attachment 174845 [details] Patch Attachment 174845 [details] did not pass cr-android-ews (chromium-android): Output: http://queues.webkit.org/results/14873744
kov's GTK+ EWS bot
Comment 10 2012-11-18 03:46:09 PST
Darin Adler
Comment 11 2012-11-18 07:23:31 PST
Comment on attachment 174845 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=174845&action=review > Source/WebCore/html/HTMLPlugInImageElement.cpp:297 > + dispatchSimulatedClick(m_pendingClickEventFromSnapshot.get(), true, true, false); EWS says that’s too many booleans there.
Darin Adler
Comment 12 2012-11-18 07:40:06 PST
Comment on attachment 174845 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=174845&action=review >> Source/WebCore/html/HTMLPlugInImageElement.cpp:297 >> + dispatchSimulatedClick(m_pendingClickEventFromSnapshot.get(), true, true, false); > > EWS says that’s too many booleans there. I see now. This patch depends on that other patch.
Jon Lee
Comment 13 2012-11-26 01:54:12 PST
Early Warning System Bot
Comment 14 2012-11-26 01:59:42 PST
Jon Lee
Comment 15 2012-11-26 02:13:01 PST
Simon Fraser (smfr)
Comment 16 2012-11-26 12:02:19 PST
Comment on attachment 175946 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=175946&action=review > Source/WebCore/html/HTMLPlugInImageElement.cpp:278 > + ASSERT_UNUSED(timer, timer == &m_simulatedMouseClickTimer); We don't normally assert this. Why do you think you need to? > Source/WebCore/html/HTMLPlugInImageElement.cpp:282 > + dispatchSimulatedClick(m_pendingClickEventFromSnapshot.get(), SendMouseOverUpDownEvents, DoNotShowPressedLook); What if this event runs JS that destroys |this|? Have you tested that? > Source/WebKit2/WebProcess/Plugins/PDF/SimplePDFPlugin.mm:928 > + ASSERT_NOT_REACHED(); > + return IntPoint(); Can't you just call the superclass? > Source/WebKit2/WebProcess/Plugins/PluginView.cpp:71 > -static const double pluginSnapshotTimerDelay = 1; > +static const double pluginSnapshotTimerDelay = 1.1; Should you comment here about the dependency with simulatedMouseClickTimerDelay? > Source/WebKit2/WebProcess/Plugins/PluginView.cpp:735 > +PassOwnPtr<WebEvent> PluginView::createWebEvent(MouseEvent* event) const const MouseEvent* ?
Jon Lee
Comment 17 2012-11-26 14:29:37 PST
Comment on attachment 175946 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=175946&action=review >> Source/WebCore/html/HTMLPlugInImageElement.cpp:278 >> + ASSERT_UNUSED(timer, timer == &m_simulatedMouseClickTimer); > > We don't normally assert this. Why do you think you need to? It is extraneous. I'll remove it. >> Source/WebCore/html/HTMLPlugInImageElement.cpp:282 >> + dispatchSimulatedClick(m_pendingClickEventFromSnapshot.get(), SendMouseOverUpDownEvents, DoNotShowPressedLook); > > What if this event runs JS that destroys |this|? Have you tested that? I have not tested this case. I've been testing with live sites, and have not run into a case where the plugin destroys itself immediately (since |this| would have to be deleted before the 1.1 second timer fired). >> Source/WebKit2/WebProcess/Plugins/PDF/SimplePDFPlugin.mm:928 >> + return IntPoint(); > > Can't you just call the superclass? Superclass uses pure virtual. I can move this up to WebKit::Plugin as a default impl. >> Source/WebKit2/WebProcess/Plugins/PluginView.cpp:71 >> +static const double pluginSnapshotTimerDelay = 1.1; > > Should you comment here about the dependency with simulatedMouseClickTimerDelay? Done. >> Source/WebKit2/WebProcess/Plugins/PluginView.cpp:735 >> +PassOwnPtr<WebEvent> PluginView::createWebEvent(MouseEvent* event) const > > const MouseEvent* ? No. offsetX() and offsetY() are calculated dynamically and then cached, so the event should not be const.
Jon Lee
Comment 18 2012-11-26 14:37:37 PST
Note You need to log in before you can comment on or make changes to this bug.