Closed Bug 1251280 Opened 8 years ago Closed 8 years ago

Top of the image is missing after zooming in at the maximum zoom level

Categories

(Core :: Layout: Images, Video, and HTML Frames, defect)

47 Branch
x86_64
Windows 7
defect
Not set
normal

Tracking

()

VERIFIED FIXED
mozilla47
Tracking Status
firefox46 --- unaffected
firefox47 + fixed

People

(Reporter: epinal99-bugzilla2, Assigned: bzbarsky)

References

Details

(Keywords: regression)

Attachments

(1 file)

Reported here: http://forums.mozillazine.org/viewtopic.php?p=14521289#p14521289

STR:
1) Open http://i.imgur.com/Kwlo6.jpg
2) Hold Ctrl and start rotating the mouse wheel until you reach the maximum zoom level

Result:
Only a small part of the zoomed image is visible and top is missing even if the vertical scrollbar is on top.

https://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=aeceae3e0e96758aa71ca551a9cc65fa90c95766&tochange=c766b041302f7b96b526d9e8d4ff02e3e57efb55
Blocks: 812899
Has Regression Range: --- → yes
Has STR: --- → yes
Flags: needinfo?(bzbarsky)
Keywords: regression
Yeah, ok.  Zooming seems to keep the current zoom state but change whether the image overflows...

Note to self: need to use either the parent of changeset 93f722efcdec or some changeset after bug 1251796 is fixed to test fixes, since between those zooming is just broken on standalone images.
Another note to self: we get into CheckOverflowing and all that, but the basic problem is that we're in the "shrinkToFit" state (in which in theory we never have vertical overflow) but we're not actually shrinking to fit once the zoom happens.  Need to think a bit about what to do about this.
Blocks: 1145903
Sorry to tag you for this, Kyle, but you reviewed bug 812899....

I tried to come up with a way to test this, and haven't figured it out yet.  I'll try to think about it a bit more, I guess, if we really care.
Attachment #8725908 - Flags: review?(khuey)
Assignee: nobody → bzbarsky
Status: NEW → ASSIGNED
> When zooming or out 

"When zooming in or out".  Fixed locally.
Flags: needinfo?(bzbarsky)
https://hg.mozilla.org/mozilla-central/rev/6d8a648e89b6
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla47
Loic, thank you for filing this and hunting down the regression range!
Loic, could you please verify this issue is fixed as expected on a latest Nightly build? Thanks!
Flags: needinfo?(epinal99-bugzilla2)
Not really jet.
(In reply to Ritu Kothari (:ritu) from comment #8)
> Loic, could you please verify this issue is fixed as expected on a latest
> Nightly build? Thanks!

I tested on Win 7 with the latest Nightly, zoom in/out are fixed (both (non-)e10s).
Built from https://hg.mozilla.org/mozilla-central/rev/05c087337043dd8e71cc27bdb5b9d55fd00aaa26
Flags: needinfo?(epinal99-bugzilla2)
Could you test this bug with the following js function? (using Scratchpad)

https://gist.github.com/TyDraniu/2aeb9fa8e5b87ed6d068
(In reply to Krzysztof from comment #11)
> Could you test this bug with the following js function? (using Scratchpad)
> 
> https://gist.github.com/TyDraniu/2aeb9fa8e5b87ed6d068

It's still broken.
I'm not quite sure what the function in comment 11 has to do with this bug...
@Boris, do you mean that I should file another bug? Or there is no bug at all? 

Running this function 3-5 times on img gives the same effect as this bug: top of the image is missing and you can't go to the top using vertical scrollbar.
> @Boris, do you mean that I should file another bug? 

At the very least, yes.  This bug was about the built-in image zoom UI not working properly.

> Or there is no bug at all? 

Possibly, yes.  It depends on what sorts of things we want to support here.

> top of the image is missing and you can't go to the top using vertical scrollbar.

Right, because you're manually messing with the state ImageDocument set up and ImageDocument doesn't know you did that.  The same thing would happen if you set "margin-top: -1000px" on the <img>, for example...
Thanks for the explanation. 

The strange thing is that it was working few versions earlier. I was using this function quite often as a bookmarklet to zoom in/out images.
It was working because we hadn't fixed bug 812899.
(In reply to Loic from comment #10)
> (In reply to Ritu Kothari (:ritu) from comment #8)
> > Loic, could you please verify this issue is fixed as expected on a latest
> > Nightly build? Thanks!
> 
> I tested on Win 7 with the latest Nightly, zoom in/out are fixed (both
> (non-)e10s).
> Built from
> https://hg.mozilla.org/mozilla-central/rev/
> 05c087337043dd8e71cc27bdb5b9d55fd00aaa26

Thank you for the verification.
Status: RESOLVED → VERIFIED
Product: Core → Core Graveyard
Product: Core Graveyard → Core
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: