New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 591980 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: May 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug



Sign in to add a comment

Stop limiting the size of custom cursor

Reported by ivan.kuc...@gmail.com, Mar 4 2016

Issue description

UserAgent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.116 Safari/537.36

Example URL:

Steps to reproduce the problem:
1. Make an element with CSS property cursor: url(...), auto;

What is the expected behavior?
Author of a website should be able to use as large cursor as he or she wants.

What went wrong?
Chrome and Firefox don't change cursor, if image width or height is larger than 128px.

Does it occur on multiple sites: Yes

Is it a problem with a plugin? No 

Did this work before? No 

Does this work in other browsers? N/A 

Chrome version: 48.0.2564.116  Channel: n/a
OS Version: 6.1 (Windows 7, Windows Server 2008 R2)
Flash Version: Shockwave Flash 20.0 r0

I am making a photo editor, where I use a custom cursor for a Brush tool. Go to http://www.Photopea.com, choose Brush, set diameter to 100px, it works well. Set it to 150px, cursor is cropped.

I see 2 possible reasons, why you are limiting the size of a cursor:
1) Large cursors may confuse the visitor.
 - author of the web can already hide cursor and make a DOM element move instead of cursor. There is no point in not allowing web developers to do it in a "native" way.
2) Redrawing a large cursor takes too much performance.
 - there are much better ways how a website can "eat" performance, e.g. running some useless JS. Let web developers decide, if they want to trade a large cursor for a little bit of performance, and if it is worth it.

Are there any other reasons, why are you doing it?
 

Comment 1 by rtoy@chromium.org, Mar 4 2016

Components: -Blink Blink>CSS
Components: UI>Input
Labels: -OS-Windows Hotlist-Interop OS-All
Status: Available (was: Unconfirmed)
Confirmed this also occurs on Linux. I see a scaled down version of the larger brushes than what's seen with Firefox. Unable to capture the mouse cursor in screenshot.

Is someone on input able to speak to whether the current behaviour of scaling down is intended?
Hi gusy,

Photopea uses a constant size of the brush cursor now, 128x128 px. I would love to use larger cursors, after you fix it.

The real demo of large cursors is here: http://www.ivank.net/veci/cursors.html 

On Windows 7, all cursors work correctly up to 128x128, larger cursors are not displayed at all.
Cc: zhengw@chromium.org pilgrim@chromium.org
+cursor folks.
Cc: -zhengw@chromium.org
Components: -UI>Input -Blink>CSS Blink
Owner: zhengw@chromium.org
@zhengw, what is the appropriate component for mouse cursor issues? This doesn't seem like CSS.
Components: -Blink IO>Mouse Blink>Paint
Seems reasonable for now to put Blink>Paint for mouse cursor issues.
Hi guys, is there any chance that it will be fixed? It is almost a year since I reported it and it still looks the same (http://www.ivank.net/veci/cursors.html)  . My app realy needs large cursors and sadly, most of my visitors use Chrome :(
Owner: ----
Cc: schenney@chromium.org
Project Member

Comment 10 by sheriffbot@chromium.org, Apr 16 2018

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Components: -Blink>Paint -IO>Mouse Internals>GPU
Cursors are drawn by the GPU and/or OS as far as I understand things. Over to the GPU team to triage it to someone who knows the expected behavior.

If I'm wrong, send it back to me.
It is still an important problem and nothing changed in two years.
Cc: thomasanderson@chromium.org sunn...@chromium.org piman@chromium.org
Hardware cursors are restricted to a size determined by the OS, display adapter, etc. For example, on Windows:

"The nWidth and nHeight parameters must specify a width and height that are supported by the current display driver, because the system cannot create cursors of other sizes. To determine the width and height supported by the display driver, use the GetSystemMetrics function, specifying the SM_CXCURSOR or SM_CYCURSOR value."

https://msdn.microsoft.com/en-us/library/windows/desktop/ms648385(v=vs.85).aspx

The alternative is a software cursor, which would be prone to rendering hiccups in the system, so we don't want that.

It's possible we're doing something wrong on Linux if Firefox is able to show a larger cursor. +thomasanderson for that
Labels: Needs-Investigation
Here's the behavior on Linux for me. http://www.ivank.net/veci/cursors.html
Chrome:
32x32 -> 32x32
64x64 -> 64x64
128x128 -> 64x64
256x256 -> nothing
512x512 -> nothing

Firefox:
Chrome:
32x32 -> 32x32
64x64 -> 64x64
128x128 -> 128x128
256x256 -> nothing
512x512 -> nothing

The 128x128 cursor is fine on Mac, haven't tested on Windows.  So this is either Linux or Aura specific.  Is anyone able to test on Windows?
Same on Windows.
Cc: sadrul@chromium.org sky@chromium.org
Status: Available (was: Untriaged)
Sounds like an Aura issue then? +sadrul,sky
Components: UI>Aura
Sorry, I missed the part about 128x128 cursors being shown as 64x64. That works correctly on Windows.
I meant 256x256 and 512x512 cursors don't show up on Windows either.
Components: -UI>Aura
Owner: thomasanderson@chromium.org
Status: Assigned (was: Available)
Ah, then it is Linux specific, so I guess I'm on the hook now :)
Project Member

Comment 22 by bugdroid1@chromium.org, May 16 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/7b12859a926df008c60d1a370312820a64f7b595

commit 7b12859a926df008c60d1a370312820a64f7b595
Author: Tom Anderson <thomasanderson@chromium.org>
Date: Wed May 16 20:10:26 2018

X11: Allow custom cursors larger than 64x64

BUG= 591980 

Change-Id: I9a16d9a27d909dc696b816ab96e9e154f06d5175
Reviewed-on: https://chromium-review.googlesource.com/1062209
Reviewed-by: Dan Erat <derat@chromium.org>
Commit-Queue: Thomas Anderson <thomasanderson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#559251}
[modify] https://crrev.com/7b12859a926df008c60d1a370312820a64f7b595/ui/base/x/x11_util.cc

Status: Fixed (was: Assigned)
Cc: krajshree@chromium.org
Labels: Needs-Feedback
Able to reproduce the issue on win-10, mac 10.13.3 and ubuntu 17.10 using chrome version #50.0.2661.0 using url: http://www.ivank.net/veci/cursors.html from comment #3.

Tried testing the issue on win-10, mac 10.13.3 and ubuntu 17.10 using latest chrome version #68.0.3433.0 using url: http://www.ivank.net/veci/cursors.html from comment #3.
Observed that Chrome didn't change cursor, if image width or height is larger than 128px, i.e at 256x256 and 512x512, no cursor was displayed. Hence, the issue seems to be still reproducible.

thomasanderson@ - Could you please check the attached screen cast and please help us in verifying the fix.

Thanks...!!




591980.mp4
792 KB View Download
c#24: that looks right.  256 and 512 cursors should still fallback to the default cursor.  The only thing that's changed is now 128 cursors are allowed on Linux.
Guys, why did you mark it as fixed, when 256 and 512 cursors still do not work? Should I report it separately?
> Guys, why did you mark it as fixed, when 256 and 512 cursors still do not work?

It's a limitation of the window server.  128x128 is the max you can set on xorg.
I don't know what a window server is. Should I report it to that window server?

I just see, that in every OS there are native apps, that use cursors much larger than 128x128. So it should be doable somehow.
Other OSes like Windows do allow larger cursors.  But if you try on Linux with firefox, the cursors should also be limited to 128x128.

You can submit an xorg bug report here:
https://gitlab.freedesktop.org/groups/xorg/-/issues
Could you submit the bug report instead of me? You understand much better what is going on. I have thousands of users of my app waiting for large cursors.

BTW. I am discussing this bug with Firefox, too: https://bugzilla.mozilla.org/show_bug.cgi?id=1253573
What happens with 256x256 now on linux? Do we scale to 128x128, or ignore the cursor change entirely?
We get the max cursor size that the server supports and then downsize the image to that:
https://chromium.googlesource.com/chromium/src.git/+/7b12859a926df008c60d1a370312820a64f7b595%5E%21/#F0
Glad to hear it.

Sign in to add a comment