Bug 82188

Summary: [Qt] Taps are sometimes not highlighted
Product: WebKit Reporter: Allan Sandfeld Jensen <allan.jensen>
Component: WebKit2Assignee: Allan Sandfeld Jensen <allan.jensen>
Status: RESOLVED FIXED    
Severity: Normal CC: webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

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.