Bug 8988 - Add support for Mozilla CSS custom cursors
Summary: Add support for Mozilla CSS custom cursors
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 420+
Hardware: Mac OS X 10.4
: P3 Enhancement
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-05-19 02:58 PDT by Alexey Proskuryakov
Modified: 2008-11-19 10:03 PST (History)
7 users (show)

See Also:


Attachments
test case (158 bytes, text/html)
2006-05-19 02:58 PDT, Alexey Proskuryakov
no flags Details
adds cursor images for future grabbing and dragging (2.09 KB, patch)
2007-02-24 17:39 PST, Lars Næsbye Christensen
no flags Details | Formatted Diff | Diff
Adds testcases for Mozilla cursors (no code change) (1.98 KB, patch)
2007-03-07 14:25 PST, Lars Næsbye Christensen
no flags Details | Formatted Diff | Diff
-webkit-grab & -webkit-grabbing support (11.42 KB, patch)
2008-03-01 13:05 PST, Michael Knaup
no flags Details | Formatted Diff | Diff
Patch with dummy implementations for non mac systems (13.86 KB, patch)
2008-03-03 12:41 PST, Michael Knaup
no flags 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-19 02:58:00 PDT
This includes -moz-zoom-in, -moz-zoom-out, -moz-grab, -moz-grabbing etc. from <http://developer.mozilla.org/en/docs/Category:CSS:Mozilla_Extensions>
Comment 1 Alexey Proskuryakov 2006-05-19 02:58:37 PDT
Created attachment 8400 [details]
test case
Comment 2 Alexey Proskuryakov 2006-05-20 04:11:39 PDT
-moz-alias   - same as CSS3 "alias"
-moz-cell   - same as CSS3 "cell"
-moz-context-menu   - same as CSS3 "context-menu"
-moz-copy   - same as CSS3 "copy"
-moz-grab
-moz-grabbing
-moz-spinning   - same as CSS2.1 "progress"
-moz-zoom-in
-moz-zoom-out
Comment 3 Lars Næsbye Christensen 2007-02-24 17:39:26 PST
Created attachment 13365 [details]
adds cursor images for future grabbing and dragging

Made these two from the hands in Quicktime (added dropshadows and converted to PNG). This first patch doesn't alter the code, I just want to know if it they look OK.
Comment 4 Dave Hyatt 2007-02-27 03:39:22 PST
Should worry about this post-stabilization.  Clearing review flag for now.
Comment 5 Lars Næsbye Christensen 2007-03-07 14:25:05 PST
Created attachment 13529 [details]
Adds testcases for Mozilla cursors (no code change)
Comment 6 Timothy Hatcher 2007-03-08 09:39:58 PST
Comment on attachment 13529 [details]
Adds testcases for Mozilla cursors (no code change)

Why should we land a test when these cursor types aren't supported yet in our code?
Comment 7 Darin Adler 2007-03-09 06:45:48 PST
Comment on attachment 13529 [details]
Adds testcases for Mozilla cursors (no code change)

Seems fine.

But if we add these cursors, they need to work with -webkit- names too, not just -moz- ones.

r=me
Comment 8 Dave Hyatt 2007-03-09 12:16:56 PST
Comment on attachment 13529 [details]
Adds testcases for Mozilla cursors (no code change)

Clearing this.  There's no logical reason to land just a test case like this when the support isn't there.
Comment 9 Michael Knaup 2008-03-01 13:05:09 PST
Created attachment 19473 [details]
-webkit-grab & -webkit-grabbing support

A small patch to add support for -webkit-grab and -webkit-grabbing cursors. I think this should be enough, because there is no support for any -moz-* feature in webkit so far and I think it would be bad idea to add it.
Comment 10 Alexey Proskuryakov 2008-03-01 13:28:53 PST
On one hand, it may be a bad idea indeed - but on the other hand, adding them would help web compatibility. I feel conflicted about this one.
Comment 11 Michael Knaup 2008-03-01 14:34:32 PST
Maybe you are right, but looking at the standard I think it is a bad idea at all to add named custom cursors, because only one named cursor is permitted. So it would have been better to add something like
-webkit-cursor:[zoom-in|zoom-out|grab|grabbing|...]
Comment 12 Darin Adler 2008-03-02 19:05:13 PST
Comment on attachment 19473 [details]
-webkit-grab & -webkit-grabbing support

Thanks for taking this on.

This will break the build on all the non-Mac platforms, since the only definition of the new functions is for Mac. Please fix that.

Patch otherwise looks great.
Comment 13 Darin Adler 2008-03-02 19:06:22 PST
(In reply to comment #10)
> On one hand, it may be a bad idea indeed - but on the other hand, adding them
> would help web compatibility. I feel conflicted about this one.

I think we may indeed want to make the -moz- names work. I'd like to hear Hyatt's thoughts on it.
Comment 14 Anne van Kesteren 2008-03-03 07:01:05 PST
How about proposing them as additions to CSS on www-style@w3.org?
Comment 15 Michael Knaup 2008-03-03 12:41:57 PST
Created attachment 19501 [details]
Patch with dummy implementations for non mac systems

Sorry, but I am not able to implement this feature for non mac plattforms, so the default pointer will be used instead of the grab/grabbing pointer
Comment 16 Darin Adler 2008-03-07 12:31:25 PST
Comment on attachment 19501 [details]
Patch with dummy implementations for non mac systems

The best behavior for systems where we don't actually have the cursors would probably be to ignore the CSS value as if we didn't understand it.

It's not obvious how to code that.

I'm not too fond of the "TODO" comments, but maybe that's the way those ports are keeping track of loose ends.

Someone needs to look at the cursors to make sure the art is not owned by anyone.

r=me
Comment 17 Holger Freyther 2008-03-21 11:28:32 PDT
(In reply to comment #15)
> Created an attachment (id=19501) [edit]
> Patch with dummy implementations for non mac systems
> 
> Sorry, but I am not able to implement this feature for non mac plattforms, so
> the default pointer will be used instead of the grab/grabbing pointer


then use the notImplemented() function instead of a TODO. We grep for notImplemented and not TODO to find not implemented things.
Comment 18 Darin Adler 2008-10-14 11:17:39 PDT
I'd like to land this, but I'm blocked by the task of making sure that none of this art is owned by anyone. Not sure what to do next.
Comment 19 Darin Adler 2008-10-24 09:04:44 PDT
Is there a good reason not to use +[NSCursor openHandCursor] and +[NSCursor closedHandCursor] for this? I think I'll just land it working that way.
Comment 20 Darin Adler 2008-10-27 14:21:15 PDT
Comment on attachment 19501 [details]
Patch with dummy implementations for non mac systems

Landed as http://trac.webkit.org/changeset/37902
Comment 21 Darin Adler 2008-11-19 10:03:56 PST
We added support for grab and grabbing with the -webkit- prefix.

If you want some additional cursors that aren't supported feel free to file new specific bug reports.