Closed
Bug 513912
Opened 15 years ago
Closed 15 years ago
Fix image zoom in Firefox
Categories
(Firefox :: General, defect)
Tracking
()
RESOLVED
FIXED
Firefox 3.7a1
Tracking | Status | |
---|---|---|
status1.9.2 | --- | beta1-fixed |
People
(Reporter: smaug, Assigned: smaug)
References
Details
(Keywords: regression)
Attachments
(2 files, 5 obsolete files)
5.78 KB,
patch
|
dao
:
review+
jst
:
superreview+
jst
:
approval1.9.2+
|
Details | Diff | Splinter Review |
5.90 KB,
patch
|
Details | Diff | Splinter Review |
Bug 503729 fixed image zoom handling in gecko, but Firefox may want to do something else what gecko does by default. In Bug 503729 some Firefox tests had to be changed. Should make sure those changes are what we want. I think this bug should end up removing all the cases where image document's zoom level is automatically set to 1.
Flags: blocking-firefox3.6?
Assignee | ||
Updated•15 years ago
|
Component: File Handling → General
QA Contact: file.handling → general
Assignee | ||
Comment 1•15 years ago
|
||
This is the behavior I'd prefer. (But I guess someone will disagree with me.)
Attachment #397874 -
Flags: review?(dao)
Comment 2•15 years ago
|
||
Comment on attachment 397874 [details] [diff] [review] patch I think we should load images at 100% in the siteSpecific case, as we store the previous zoom level and thus won't encounter bug 503729.
Assignee | ||
Comment 3•15 years ago
|
||
Attachment #397931 -
Flags: review?(dao)
Comment 4•15 years ago
|
||
Yeah, although the test changes from bug 503729 still look wrong.
Updated•15 years ago
|
Attachment #397874 -
Attachment is obsolete: true
Attachment #397874 -
Flags: review?(dao)
Assignee | ||
Comment 5•15 years ago
|
||
Had to tweak the gecko part a bit, so that the zoom level doesn't get reset at wrong time. Doesn't regress Bug 503729.
Attachment #397931 -
Attachment is obsolete: true
Attachment #398118 -
Flags: review?(dao)
Attachment #397931 -
Flags: review?(dao)
Comment 6•15 years ago
|
||
Something is still not right in the gecko part. If I select "View Image" for a small image on a zoomed page, the image gets loaded with zoom level 1, but will resize when being clicked on. If I do the same for a big image, it will be zoomed to fill the content area are correctly, but clicking it will zoom it to the page's level, and clicking it again won't make it fill the content are correctly.
Comment 7•15 years ago
|
||
... both of which are regressions from your gecko changes in comment 5, I think.
Comment 8•15 years ago
|
||
Also, the early return for !this.siteSpecific regresses bug 487656: browser_privatebrowsing_zoomrestore.js | Zoom level for about:privatebrowsing should be reset - Got 1.100000023841858, expected 1
Comment 9•15 years ago
|
||
(In reply to comment #7) > ... both of which are regressions from your gecko changes in comment 5, I > think. Well, said cases are also broken without that change, although in a slightly different manner. The patch from bug 503729 should be backed out, imho.
Assignee | ||
Comment 10•15 years ago
|
||
Well, IMHO, Bug 487656 should be backed out. Anyway, I'm trying to fix this all now in this bug.
Comment 11•15 years ago
|
||
Bug 487656 is unrelated to the problems mentioned in comment 6.
Assignee | ||
Comment 12•15 years ago
|
||
(In reply to comment #8) > Also, the early return for !this.siteSpecific regresses bug 487656: > browser_privatebrowsing_zoomrestore.js | Zoom level for about:privatebrowsing > should be reset - Got 1.100000023841858, expected 1 I've fixed other cases, but this is still something to do. The bug is that browser-fullzoom handles sitespecific and private browsing the same way. I wonder what to do with that. Probably have to split FullZoom_get_siteSpecific to two different getters. (This is sort of a regression from Bug 487656)
Assignee | ||
Comment 13•15 years ago
|
||
Waiting for test results
Attachment #398118 -
Attachment is obsolete: true
Attachment #398118 -
Flags: review?(dao)
Updated•15 years ago
|
Attachment #398224 -
Attachment is patch: true
Attachment #398224 -
Attachment mime type: application/octet-stream → text/plain
Comment 14•15 years ago
|
||
Won't this regress bug 503729?
Comment 15•15 years ago
|
||
(In reply to comment #14) > Won't this regress bug 503729? FWIW, I'm fine with breaking browser.zoom.siteSpecific, but it still seems that the backend code should be able to handle this better, and without a pref.
Assignee | ||
Comment 16•15 years ago
|
||
(In reply to comment #14) > Won't this regress bug 503729? Um, did I upload something wrong. Testing... (In reply to comment #15) > but it still seems that > the backend code should be able to handle this better, and without a pref. All the suggestions how backend could handle this in a good way are very welcome. By default (in gecko, not necessarily in FF) image documents shouldn't change full page zoom and the next page should have the same zoom as the previous page.
Assignee | ||
Comment 17•15 years ago
|
||
Not perfect, but perhaps good enough even if FF user has browser.zoom.siteSpecific=false (like I do).
Attachment #398224 -
Attachment is obsolete: true
Attachment #398243 -
Flags: review?(dao)
Comment 18•15 years ago
|
||
(In reply to comment #17) > Not perfect, but perhaps good enough even if FF user has > browser.zoom.siteSpecific=false (like I do). So with siteSpecific=false, you load the image zoomed (expected), but clicking it will set the zoom level to 1, and going back gives you bug 503729. However, if I also set browser.reset_image_document_zoom to false, that's not a problem. Can the Gecko code just read browser.zoom.siteSpecific instead?
Assignee | ||
Comment 19•15 years ago
|
||
(In reply to comment #18) > So with siteSpecific=false, you load the image zoomed (expected), but clicking > it will set the zoom level to 1, and going back gives you bug 503729. Well, "clicking" isn't part of bug 503729. > > However, if I also set browser.reset_image_document_zoom to false, that's not a > problem. right. > Can the Gecko code just read browser.zoom.siteSpecific instead? Well, what has browser.zoom.siteSpecific to do with image documents?
Comment 20•15 years ago
|
||
browser.zoom.siteSpecific=true implies that the zoom level for the image document can safely be set to 1, as the browser stored the zoom level of the previous page.
Assignee | ||
Comment 21•15 years ago
|
||
(In reply to comment #20) > browser.zoom.siteSpecific=true implies that the zoom level for the image > document can safely be set to 1 Why does that imply such thing? I'd just take the new pref.
Comment 22•15 years ago
|
||
(In reply to comment #21) > (In reply to comment #20) > > browser.zoom.siteSpecific=true implies that the zoom level for the image > > document can safely be set to 1 > Why does that imply such thing? Because the browser stored the zoom level of the previous page. In that case, bug 503729 is not an issue. > I'd just take the new pref. Me too, if siteSpecific=false + reset_image_document_zoom=true wasn't broken.
Assignee | ||
Comment 23•15 years ago
|
||
(In reply to comment #22) > Because the browser stored the zoom level of the previous page. In that case, > bug 503729 is not an issue. I have no idea how this says that browser.zoom.siteSpecific=true implies that image document zoom should be 1. It is just a FF feature that siteSpecific happens to want image zoom to default to 1. > Me too, if siteSpecific=false + reset_image_document_zoom=true wasn't broken. It isn't really broken. It has the "feature" to reset zoom if image document's "click zoom" is used. And in any case, the normal FF user should get the default handling: siteSpecific+resetZoom, and non-FF should have !siteSpecific+!resetZoom.
Comment 24•15 years ago
|
||
(In reply to comment #23) > I have no idea how this says that browser.zoom.siteSpecific=true implies that > image document zoom should be 1. It is just a FF feature that > siteSpecific happens to want image zoom to default to 1. I just don't think loading images zoomed makes any sense, as I've said multiple times elsewhere. It seems that we only do it now because of bug 503729. > It isn't really broken. It has the "feature" to reset zoom if image document's > "click zoom" is used. Traditionally only if the image overflows the content area. Also, a zoom cursor is expected to appear and another click is expected to set the zoom level back.
Assignee | ||
Comment 25•15 years ago
|
||
Note, other gecko users may want to disable the whole image document zoom and just use full page zoom. And in that case loading images zoomed, if the previous page was zoomed makes a lot of sense (because full page zoom is per docshell not per page by default).
Comment 26•15 years ago
|
||
browser.reset_image_document_zoom is not what these gecko users need, though, is it?
Assignee | ||
Comment 27•15 years ago
|
||
No, but FF needs that.
Assignee | ||
Comment 28•15 years ago
|
||
Because it has its own zoom handling, which depends on .siteSpecific, private browsing mode, image document, and print preview.
Comment 29•15 years ago
|
||
FF would be satisfied if that code just read browser.zoom.siteSpecific. It seems that another pref could be added for comment 25 independently.
Assignee | ||
Comment 30•15 years ago
|
||
But image documents don't have anything to do with "siteSpecific". It is just a firefox feature to provide zoom level 1 for image documents.
Comment 31•15 years ago
|
||
It is indeed a Firefox feature. But another browser could implement a similar feature and set the pref. The site-specific behavior relates to bug 503729, which relates to image documents, but we already discussed this.
Updated•15 years ago
|
Keywords: regression
Summary: Figure out how image zoom should work in Firefox → Fix image zoom in Firefox
Comment 32•15 years ago
|
||
(In reply to comment #23) > And in any case, the normal FF user should get the default handling: > siteSpecific+resetZoom, and non-FF should have !siteSpecific+!resetZoom. So is there a use case for siteSpecific+!resetZoom or !siteSpecific+resetZoom? If not, why allow it? There's also no migration path for users with !siteSpecific.
Assignee | ||
Comment 33•15 years ago
|
||
siteSpecific is Firefox only and has nothing to do with image documents (except in Firefox)
Comment 34•15 years ago
|
||
I suggest we make siteSpecific not Firefox-only. As I said in comment 31, another browser could implement this and accordingly set the pref. If there is no use for the resetZoom pref without the site-specific behavior, then the extra pref will just annoy users.
Assignee | ||
Comment 35•15 years ago
|
||
Well are you willing to implement siteSpecific in gecko? Or are you saying we should just add that pref to gecko, although gecko knows nothing about siteSpecific? I guess the latter, which doesn't make sense, IMO. I agree adding new prefs sucks, but in this case I haven't figured out anything better.
Comment 36•15 years ago
|
||
(In reply to comment #35) > Well are you willing to implement siteSpecific in gecko? Or are you saying > we should just add that pref to gecko, although gecko knows nothing about > siteSpecific? I suggest we make browser.zoom.siteSpecific the way for the Gecko user to tell Gecko "I'm implementing site-specific zoom", and that Gecko in that case loads images with a zoom level of 1, knowing that this won't cause bug 503729, because the Gecko user implemented site-specific zoom. > I guess the latter, which doesn't make sense, IMO. In contrast I think supporting browser.reset_image_document_zoom alone doesn't make sense. Flipping it without doing site-specific zoom would cause bug 503729.
Comment 37•15 years ago
|
||
Comment on attachment 398243 [details] [diff] [review] compomise I keep saying that this produces broken behavior (second part of comment 24), and I don't think it's reasonable to expect existing and new users of browser.zoom.siteSpecific to figure out that they have to flip browser.reset_image_document_zoom. (Heck, it wasn't even immediately obvious to me when I tried the patch the first time. I expected it to do something reasonable with any combination of the two prefs.) At that point me would have made these users jump through enough hoops that they'd be better served by an extension, so I'd rather remove browser.zoom.siteSpecific altogether if we can't fix it reasonably (although I think we can, see previous comment).
Attachment #398243 -
Flags: review?(dao) → review-
Assignee | ||
Comment 38•15 years ago
|
||
Attachment #398243 -
Attachment is obsolete: true
Attachment #399174 -
Flags: superreview?(jst)
Attachment #399174 -
Flags: review?(dao)
Updated•15 years ago
|
Attachment #399174 -
Flags: review?(dao) → review+
Comment 39•15 years ago
|
||
Comment on attachment 399174 [details] [diff] [review] using the siteSpecific pref in gecko Image zoom still doesn't quite work with siteSpecific=false. For example, if you zoom in on a page and load a large image, it will be resized as if the zoom level was 1 and thus still overflow the content area initially rather than fitting into it. Pretty useless. The browser-specific changes look fine though, and image zoom with siteSpecific=true works like a charm.
Assignee | ||
Comment 40•15 years ago
|
||
(In reply to comment #39) > (From update of attachment 399174 [details] [diff] [review]) > Image zoom still doesn't quite work with siteSpecific=false. For example, if > you zoom in on a page and load a large image, it will be resized as if the zoom > level was 1 and thus still overflow the content area initially rather than > fitting into it. That is how it should work, when gecko doesn't change zoom level between document loads.
Comment 41•15 years ago
|
||
From a user's perspective, it's hard to understand why the browser just zoomed that image to 37% if it still overflows the content area. Even if you manage to understand it, it doesn't seem useful. I'd expect to see the image either fitting into the content area or at its original size with the appropriate zoom level (1 or the unmodified one).
Comment 42•15 years ago
|
||
Comment on attachment 399174 [details] [diff] [review] using the siteSpecific pref in gecko > _applyPrefToSetting: function FullZoom__applyPrefToSetting(aValue, aBrowser) { > var browser = aBrowser || gBrowser.selectedBrowser; > >- var resetZoom = (!this.siteSpecific || gInPrintPreviewMode || >- browser.contentDocument instanceof Ci.nsIImageDocument); >+ if (!this.siteSpecific && !this._inPrivateBrowsing) >+ return; This could now be moved above the var browser declaration.
Updated•15 years ago
|
Flags: wanted-firefox3.6+
Flags: blocking-firefox3.6?
Flags: blocking-firefox3.6-
Comment 43•15 years ago
|
||
Comment on attachment 399174 [details] [diff] [review] using the siteSpecific pref in gecko sr=jst, and I think we should take this for 1.9.2.
Attachment #399174 -
Flags: superreview?(jst)
Attachment #399174 -
Flags: superreview+
Attachment #399174 -
Flags: approval1.9.2+
Assignee | ||
Comment 44•15 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/82575e77ef96
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Updated•15 years ago
|
Target Milestone: --- → Firefox 3.7a1
Comment 45•15 years ago
|
||
(In reply to comment #42) http://hg.mozilla.org/mozilla-central/rev/8afb65205203
Assignee | ||
Comment 46•15 years ago
|
||
Assignee | ||
Comment 47•15 years ago
|
||
http://hg.mozilla.org/releases/mozilla-1.9.2/rev/3f43e96a2da4
status1.9.2:
--- → beta1-fixed
Assignee | ||
Updated•15 years ago
|
Assignee: nobody → Olli.Pettay
You need to log in
before you can comment on or make changes to this bug.
Description
•