Bug 99862 - [chromium] Restrict link highlights to targets that display a hand-cursor
Summary: [chromium] Restrict link highlights to targets that display a hand-cursor
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: W. James MacLean
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-19 12:14 PDT by W. James MacLean
Modified: 2012-10-30 14:29 PDT (History)
3 users (show)

See Also:


Attachments
Patch (10.28 KB, patch)
2012-10-19 12:18 PDT, W. James MacLean
no flags Details | Formatted Diff | Diff
Patch (12.93 KB, patch)
2012-10-19 12:40 PDT, W. James MacLean
no flags Details | Formatted Diff | Diff
Patch (16.49 KB, patch)
2012-10-30 10:29 PDT, W. James MacLean
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description W. James MacLean 2012-10-19 12:14:34 PDT
[chromium] Restrict link highlights to targets that display a hand-cursor
Comment 1 W. James MacLean 2012-10-19 12:18:56 PDT
Created attachment 169671 [details]
Patch
Comment 2 W. James MacLean 2012-10-19 12:40:55 PDT
Created attachment 169676 [details]
Patch
Comment 3 W. James MacLean 2012-10-19 12:41:43 PDT
Add fixed to rotated div layout test in this revised patch.
Comment 4 James Robinson 2012-10-19 12:54:53 PDT
Comment on attachment 169676 [details]
Patch

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

> Source/WebKit/chromium/src/WebViewImpl.cpp:1179
> +static bool invokesHandCursor(Node* node, bool shiftKey)

This seems like a strange heuristic to be applying in the WebKit layer.  Normally this is the sort of decision that WebCore would make.
Comment 5 W. James MacLean 2012-10-22 09:35:19 PDT
(In reply to comment #4)
> (From update of attachment 169676 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=169676&action=review
> 
> > Source/WebKit/chromium/src/WebViewImpl.cpp:1179
> > +static bool invokesHandCursor(Node* node, bool shiftKey)
> 
> This seems like a strange heuristic to be applying in the WebKit layer.  Normally this is the sort of decision that WebCore would make.

Agreed, but there doesn't seem to be a simple way to ask WebCore if a particular node *would* get a hand cursor (I looked at re-factoring EventHandler::selectCursor() to see if I could separate the logic used for auto-cursor selection in a way that would allow it to be used externally, but it seemed  difficult to get a clean re-factoring). I can present a CL based on this if you prefer.
Comment 6 James Robinson 2012-10-22 19:17:57 PDT
(In reply to comment #5)
> (In reply to comment #4)
> > (From update of attachment 169676 [details] [details])
> > View in context: https://bugs.webkit.org/attachment.cgi?id=169676&action=review
> > 
> > > Source/WebKit/chromium/src/WebViewImpl.cpp:1179
> > > +static bool invokesHandCursor(Node* node, bool shiftKey)
> > 
> > This seems like a strange heuristic to be applying in the WebKit layer.  Normally this is the sort of decision that WebCore would make.
> 
> Agreed, but there doesn't seem to be a simple way to ask WebCore if a particular node *would* get a hand cursor (I looked at re-factoring EventHandler::selectCursor() to see if I could separate the logic used for auto-cursor selection in a way that would allow it to be used externally, but it seemed  difficult to get a clean re-factoring). I can present a CL based on this if you prefer.

I'd like to explore that direction.  This case seems very similar.  We're doing a hit-test and want to see what the resulting cursor is.
Comment 7 W. James MacLean 2012-10-30 10:29:04 PDT
Created attachment 171481 [details]
Patch
Comment 8 W. James MacLean 2012-10-30 10:30:57 PDT
I've re-factored this to keep all the logic for determining when a handCursor() is appropriate in EventHandler, short of consulting node->style()-cursor().

PTAL.
Comment 9 James Robinson 2012-10-30 13:55:23 PDT
Comment on attachment 171481 [details]
Patch

R=me
Comment 10 WebKit Review Bot 2012-10-30 14:29:53 PDT
Comment on attachment 171481 [details]
Patch

Clearing flags on attachment: 171481

Committed r132945: <http://trac.webkit.org/changeset/132945>
Comment 11 WebKit Review Bot 2012-10-30 14:29:56 PDT
All reviewed patches have been landed.  Closing bug.