RESOLVED FIXED 99938
Touch adjustment snaps to wrong target at a plugin boundary.
https://bugs.webkit.org/show_bug.cgi?id=99938
Summary Touch adjustment snaps to wrong target at a plugin boundary.
Kevin Ellis
Reported 2012-10-21 10:07:12 PDT
Touch adjustment snaps to wrong target at a plugin boundary.
Attachments
Patch (6.71 KB, patch)
2012-10-21 10:23 PDT, Kevin Ellis
no flags
Patch (6.99 KB, patch)
2012-10-22 10:08 PDT, Kevin Ellis
no flags
Kevin Ellis
Comment 1 2012-10-21 10:23:08 PDT
Kevin Ellis
Comment 2 2012-10-21 10:30:03 PDT
Touch adjustment snaps to an on-screen target when I touch on a control in a flash plugin (e.g. Youtube flash player). <embed> elements were not considered as candidates for touch adjustment. It is difficult to tap on a control at the bottom of the flash player without also clipping the toolbar below the player, which triggers touch adjustment to the toolbar buttons.
Allan Sandfeld Jensen
Comment 3 2012-10-22 04:57:19 PDT
Comment on attachment 169807 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=169807&action=review > Source/WebCore/html/HTMLEmbedElement.cpp:239 > +bool HTMLEmbedElement::willRespondToMouseClickEvents() > +{ > + return !disabled(); > +} I think we might want to make this slightly more specific. For instance check if it actually embeds a plugin or plugin-document.
Allan Sandfeld Jensen
Comment 4 2012-10-22 05:01:25 PDT
Comment on attachment 169807 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=169807&action=review >> Source/WebCore/html/HTMLEmbedElement.cpp:239 >> +} > > I think we might want to make this slightly more specific. For instance check if it actually embeds a plugin or plugin-document. Specifically. WillRespondToMouseClickEvents is a companion function to defaultEventHandler, so it might fit better in HTMLPlugInElement where the defaultEventHandler is, and it uses a toRenderWidget()->widget() call to get the widget. We could say it could responds to mouseClickEvents if it has a widget.
Kevin Ellis
Comment 5 2012-10-22 10:08:36 PDT
Kevin Ellis
Comment 6 2012-10-23 13:19:05 PDT
Comment on attachment 169807 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=169807&action=review >>> Source/WebCore/html/HTMLEmbedElement.cpp:239 >>> +} >> >> I think we might want to make this slightly more specific. For instance check if it actually embeds a plugin or plugin-document. > > Specifically. WillRespondToMouseClickEvents is a companion function to defaultEventHandler, so it might fit better in HTMLPlugInElement where the defaultEventHandler is, and it uses a toRenderWidget()->widget() call to get the widget. We could say it could responds to mouseClickEvents if it has a widget. Done, with one small caveat. The default event handler has some special handling for embedded objects that is performed before testing for a widget, thus basing the rule on being an embedded object or widget.
Kevin Ellis
Comment 7 2012-10-25 09:11:51 PDT
Tonikitoo, can you please take a look at this latest patch.
Antonio Gomes
Comment 8 2012-10-25 10:40:18 PDT
Comment on attachment 169933 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=169933&action=review > Source/WebCore/html/HTMLPlugInElement.cpp:88 > + if (!r->isEmbeddedObject() && !r->isWidget()) AND or OR?
Kevin Ellis
Comment 9 2012-10-25 11:13:11 PDT
Comment on attachment 169933 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=169933&action=review >> Source/WebCore/html/HTMLPlugInElement.cpp:88 >> + if (!r->isEmbeddedObject() && !r->isWidget()) > > AND or OR? And is correct here. Could have used !(A || B) instead.
WebKit Review Bot
Comment 10 2012-10-25 11:50:04 PDT
Comment on attachment 169933 [details] Patch Clearing flags on attachment: 169933 Committed r132509: <http://trac.webkit.org/changeset/132509>
WebKit Review Bot
Comment 11 2012-10-25 11:50:08 PDT
All reviewed patches have been landed. Closing bug.
Matt Falkenhagen
Comment 12 2013-03-14 00:55:11 PDT
Comment on attachment 169933 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=169933&action=review > Source/WebCore/html/HTMLPlugInElement.cpp:83 > + if (disabled()) Hi, I'm working on refactoring Node::disabled. It seems the concept is really just for form control elements. Do you expect HTMLPlugInElement to have disable() return true ever? My guess is this just copied Node::willRespondToMouseClickEvents(), in which case I should be able to remove this call in the refactoring, but wanted to ask just in case.
Allan Sandfeld Jensen
Comment 13 2013-03-14 04:32:20 PDT
(In reply to comment #12) > (From update of attachment 169933 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=169933&action=review > > > Source/WebCore/html/HTMLPlugInElement.cpp:83 > > + if (disabled()) > > Hi, I'm working on refactoring Node::disabled. It seems the concept is really just for form control elements. Do you expect HTMLPlugInElement to have disable() return true ever? > > My guess is this just copied Node::willRespondToMouseClickEvents(), in which case I should be able to remove this call in the refactoring, but wanted to ask just in case. While disabled() is mainly for form-elements, it has been named genericly so that any Node objects could have circumstances where they are disabled. I would keep the check, but no, I don't think there are any cases currently where it would return true.
Matt Falkenhagen
Comment 14 2013-03-19 12:11:50 PDT
(In reply to comment #13) Thanks! (I forgot to CC myself earlier). The context of the Node::disabled refactoring is bug 112085 and bug 110952. I'm still working through the codebase and seeing if it makes sense to move it out of Node.
Note You need to log in before you can comment on or make changes to this bug.