Bug 9013 - Let correct CSS custom cursor declarations parse
Summary: Let correct CSS custom cursor declarations parse
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 420+
Hardware: Macintosh OS X 10.4
: P2 Normal
Assignee: Alexey Proskuryakov
URL:
Keywords:
Depends on:
Blocks: 6001
  Show dependency treegraph
 
Reported: 2006-05-20 05:16 PDT by Alexey Proskuryakov
Modified: 2006-07-18 13:02 PDT (History)
1 user (show)

See Also:


Attachments
proposed fix (2.57 KB, patch)
2006-05-20 05:17 PDT, Alexey Proskuryakov
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey Proskuryakov 2006-05-20 05:16:20 PDT
Currently, WebKit would reject any compliant CSS custom cursor declaration, because it checks that there is only one value, while CSS mandates that a list of custom cursors should be followed with a named one. Even for a single value, the hot point position (as defined in CSS3) would break parsing.

The attached patch lets compliant declarations parse, but doesn't implement fallback (that's bug 6001). 

WinIE doesn't require that a named cursor should always follow custom ones, so I don't check that there is more than one value.
Comment 1 Alexey Proskuryakov 2006-05-20 05:17:17 PDT
Created attachment 8433 [details]
proposed fix
Comment 2 Alexey Proskuryakov 2006-05-21 03:11:57 PDT
Comment on attachment 8433 [details]
proposed fix

Rob is working on a real implementation that will make this hack unneeded.
Comment 3 Alexey Proskuryakov 2006-07-12 22:28:37 PDT
The patch in bug 6002 isn't finished yet, and I think it would be wrong to introduce custom cursor support that only works with invalid declarations, so I'm reopening this bug (proposing to land this now).
Comment 4 Darin Adler 2006-07-17 19:39:59 PDT
Comment on attachment 8433 [details]
proposed fix

Looks OK, although it's missing a change log entry.
Comment 5 Darin Adler 2006-07-17 19:41:12 PDT
Comment on attachment 8433 [details]
proposed fix

Ideally we'd check that the remaining items are URIs then legal cursor names. This will allow many incorrect cursor declarations to parse too.
Comment 6 Rob Buis 2006-07-18 00:09:22 PDT
Hi Alexey,

(In reply to comment #3)
> The patch in bug 6002 isn't finished yet, and I think it would be wrong to
> introduce custom cursor support that only works with invalid declarations, so
> I'm reopening this bug (proposing to land this now).

I got a bit busy and sidetracked, and since I am not too fond of implementing
complex testcases (IIRC that was required for 6001/6002) I chose not to work on it.
However IIRC it was not that far from finished, so if you feel it is important I can work on it
and finish it soon. Nevertheless, any patches that improve webkit, even when they'll be replaced
by other patches later, are fine by me :) Let me know on IRC how we can best approach the cursor
work, if you have some time.
Cheers,

Rob.
Comment 7 Alexey Proskuryakov 2006-07-18 12:54:30 PDT
Committed revision 15505.

(In reply to comment #5)
> Ideally we'd check that the remaining items are URIs then legal cursor names.
> This will allow many incorrect cursor declarations to parse too.

Agreed; I just felt that simplicity of a patch was more important in this case.