Open Bug 1461610 Opened 3 years ago Updated 2 years ago

Zooming in or out an image doesn't change the cursor into a magnifying-glass

Categories

(Core :: DOM: Core & HTML, defect, P3)

defect

Tracking

()

Tracking Status
firefox60 --- affected
firefox61 --- affected
firefox62 --- affected

People

(Reporter: oana.botisan, Unassigned, NeedInfo)

Details

[Affected versions]:
- Latest Nightly 61.0a1
- beta 61.0b4
- Firefox 60.0

[Affected platforms]:
- Windows 10 x64
- Windows 7 x64
- Ubuntu 16.04 x64
- macOS 10.13

[Steps to reproduce]:
1. Go to http://www.catster.com/wp-content/uploads/2017/08/A-fluffy-cat-looking-funny-surprised-or-concerned.jpg
2. Zoom in or out using Ctrl + mouse wheel. 
3. Observe the cursor's behaviour.

[Expected result]:
- The cursor changes into a magnifying-glass that shows the actions you can do (zoom in or zoom out)

[Actual result]:
- The cursor remains the same until the image becomes bigger than the browser's window. 

[Regression range]:
- last good: 2008-02-07
- last bad: 2008-02-08

[Additional notes]:
- The image changes back to the original size after it was zoomed in or out and the image is clicked, but the cursor doesn't change only if the image is bigger than the browser window. 
- This is not a regression technically speaking, it's more about the date that the browser changed it's behaviour regarding the action of zooming in and out pf an image. 
- Before the behaviour was similar to what Chrome does at the moment. When you zoom in the image, the cursors change, but after clicking the image gets either bigger or a smaller. It doesn't goes back to the original size.
Component: Panning and Zooming → Layout
> 2. Zoom in or out using Ctrl + mouse wheel. 
> 3. Observe the cursor's behaviour.
> 
> [Expected result]:
> - The cursor changes into a magnifying-glass that shows the actions you can do (zoom in or zoom out)

Specifically, the cursor should perhaps change *as soon as you've done any zooming at all* on this image viewer page. There doesn't seem to be any reason to wait until the image is bigger than the window size.  That window-size dependency seems arbitrary.

I suspect [?] the intent of this cursor-change is to indicate what will happen if you click. And the availability of this "click to restore original zoomlevel" action *only* depends on whether or not you've zoomed -- not on whether or not we've exceeded the window size.
(Though maybe the intent of this cursor is to be a hint for the reverse scenario -- e.g. when you load an extremely high-res image and we zoom out by default so that it fits your browser window, and we change the cursor as a small hint that you can click to view it at full scale if you really want to...)

It would be interesting to track down the bug/changeset that "broke" this to see the reasoning there & if this was an intentional change or not.
So, when you zoom in to make the image overflow, you would see a magnifying-glass cursor, which is controlled by rule in ImageDocument.css[1], and the classes there is controlled by ImageDocument[2], and click handling code is also there[3].

We probably should change the logic in [2] to make it match that in [3].


[1] https://searchfox.org/mozilla-central/rev/d4b9e50875ad7e5d20f2fee6a53418315f6dfcc0/layout/style/ImageDocument.css#16-18
[2] https://searchfox.org/mozilla-central/rev/d4b9e50875ad7e5d20f2fee6a53418315f6dfcc0/dom/html/ImageDocument.cpp#557-582
[3] https://searchfox.org/mozilla-central/rev/d4b9e50875ad7e5d20f2fee6a53418315f6dfcc0/dom/html/ImageDocument.cpp#642-658
Component: Layout → DOM
Priority: -- → P3
Maybe Andrew or Timothy are interested?
Flags: needinfo?(tnikkel)
Flags: needinfo?(aosmond)
Component: DOM → DOM: Core & HTML
Flags: needinfo?(aosmond)
You need to log in before you can comment on or make changes to this bug.