Bug 82188 - [Qt] Taps are sometimes not highlighted
Summary: [Qt] Taps are sometimes not highlighted
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Allan Sandfeld Jensen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-26 04:10 PDT by Allan Sandfeld Jensen
Modified: 2012-03-26 06:23 PDT (History)
1 user (show)

See Also:


Attachments
Patch (1.93 KB, patch)
2012-03-26 04:13 PDT, Allan Sandfeld Jensen
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Allan Sandfeld Jensen 2012-03-26 04:10:31 PDT
In some circumstances, such as scripted links, the activated element is not tap-highlighted.

It happens because WebPage::highlightPotentialActivation only looks for links, and incorrectly ends up highlighting nothing if it doesn't find a link.
Comment 1 Allan Sandfeld Jensen 2012-03-26 04:13:36 PDT
Created attachment 133771 [details]
Patch
Comment 2 Kenneth Rohde Christiansen 2012-03-26 04:16:59 PDT
Comment on attachment 133771 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=133771&action=review

> Source/WebKit2/ChangeLog:9
> +        the element returned by bestClickableNodeForTouchPoint.

how does this code ensure that you get the element returned by bestClickab... ?

Maybe we should have a separate method to always get what will be activated by bestClickablenode...
Comment 3 Allan Sandfeld Jensen 2012-03-26 04:18:55 PDT
(In reply to comment #2)
> (From update of attachment 133771 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=133771&action=review
> 
> > Source/WebKit2/ChangeLog:9
> > +        the element returned by bestClickableNodeForTouchPoint.
> 
> how does this code ensure that you get the element returned by bestClickab... ?
>
By not overriding activatedNode if nothing is found. So it just stays unchanged.
 
> Maybe we should have a separate method to always get what will be activated by bestClickablenode...
Yeah, I was thinking about that. We could also add another parameter to return the responding node instead of the target node.
Comment 4 Allan Sandfeld Jensen 2012-03-26 05:15:44 PDT
(In reply to comment #3)
> (In reply to comment #2)
> > (From update of attachment 133771 [details] [details])
> > View in context: https://bugs.webkit.org/attachment.cgi?id=133771&action=review
> > 
> > Maybe we should have a separate method to always get what will be activated by bestClickablenode...
> Yeah, I was thinking about that. We could also add another parameter to return the responding node instead of the target node.

I have tested that now, and I do not think that behaviour is desirable. In many cases scripted elements share a common event-handler, if we highlight the element with the eventhandler, we would highlight almost the entire screen.

The uploaded patch works better.
Comment 5 WebKit Review Bot 2012-03-26 06:23:39 PDT
Comment on attachment 133771 [details]
Patch

Clearing flags on attachment: 133771

Committed r112084: <http://trac.webkit.org/changeset/112084>
Comment 6 WebKit Review Bot 2012-03-26 06:23:43 PDT
All reviewed patches have been landed.  Closing bug.