Closed
Bug 1182929
Opened 9 years ago
Closed 9 years ago
High quality image resizing sometimes doesn't work after ver. 40
Categories
(Core :: Graphics: ImageLib, defect)
Tracking
()
VERIFIED
FIXED
mozilla42
Tracking | Status | |
---|---|---|
firefox39 | --- | unaffected |
firefox40 | --- | affected |
firefox41 | --- | affected |
firefox42 | --- | fixed |
People
(Reporter: fireattack, Assigned: mstange)
References
Details
(Keywords: regression)
Attachments
(3 files)
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.0
Build ID: 20150709163524
Steps to reproduce:
How to reproduce:
You need to have RES (https://addons.mozilla.org/en-us/firefox/addon/reddit-enhancement-suite/) addon to reproduce this bug. All you need is to install it, no further configuration is required. It might be easier for users who are familiar with reddit to reproduce.
1. go to https://www.reddit.com/r/all, find a large enough image link (don't click it).
2. Click the "expando" button (left of "submitted xxx").
3. Shrink the image by dragging.
4. You will find the image is very aliasing (no high-quality resizing), instead of smoothly resized. see this example: http://i.imgur.com/R8tPqBH.png
5. If u expand the same image inside subreddit or thread, the resizing would be high quality (check http://i.imgur.com/x2CCFOX.png
and http://i.imgur.com/AXoY22H.png )
We don't have this problem on version 39 and before. So it's a regression.
Reporter | ||
Updated•9 years ago
|
Keywords: regression
Reporter | ||
Comment 1•9 years ago
|
||
I understand this bug is a little bit hard to reproduce, so I recorded a video to demonstrate.
https://www.youtube.com/watch?v=pKeEwMq3r78 (please view in 1080P)
I tried to reproduce this but the images look identical to me in Firefox 39 and Firefox 42.0a1. As well, both images look the same to me in your video. Perhaps there is some way you've set up your system that I need to do before seeing this issue, or perhaps I just perceive things differently, but without further information I don't see a bug here.
I'm able to reproduce, see the screenshot.
Regression range:
good=2015-04-02
bad=2015-04-03
http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=d222742756c4&tochange=70a113676b21
Keywords: regressionwindow-wanted
Comment 4•9 years ago
|
||
In the certain condition, HQ image resizing doesn't work for position:absolute image.
top-left: position: static
top-right: position: fixed --- known Bug 803703
bottom-left: position: absolute --- related to this bug
Pushlog:
https://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=4d6d69f0f499&tochange=d0fc7202b4cb
Regressed by: Bug 1148855
Updated•9 years ago
|
Blocks: 1148855
Keywords: regressionwindow-wanted
Updated•9 years ago
|
Status: UNCONFIRMED → NEW
status-firefox39:
--- → unaffected
status-firefox40:
--- → affected
status-firefox41:
--- → affected
status-firefox42:
--- → affected
Ever confirmed: true
Flags: needinfo?(mstange)
Assignee | ||
Comment 5•9 years ago
|
||
Thanks for filing this bug.
Fixing bug 803703 will fix this too, so I think that's what we should do.
The reason bug 1148855 caused us to use an ImageLayer here where we weren't using one before is that the image is, in z-order, above a fixed element (even thought it doesn't intersect it), and we now put it in a separate layer so that it doesn't need to be pulled out of the page background layer once scrolling causes the fixed layer to move between the page background and the image.
In the testcase you can't actually scroll, so creating a new layer for the image doesn't actually achieve anything. But I think it would be too much complexity to analyze the current scroll range for this purpose, so I think we're doing the right thing here.
Assignee | ||
Comment 6•9 years ago
|
||
Actually, we can work around this bug here by refusing to use ImageLayers in cases where we're scaling down by a large factor.
Flags: needinfo?(mstange)
Assignee | ||
Comment 7•9 years ago
|
||
Comment 8•9 years ago
|
||
Comment on attachment 8633157 [details] [diff] [review]
1-Bug_1182929___Work_around_bug_803703_by_refusing_to_turn_heavily_downscaled_images_into_image_layers__r_seth.diff
Review of attachment 8633157 [details] [diff] [review]:
-----------------------------------------------------------------
Looks good.
::: layout/generic/nsImageFrame.cpp
@@ +1436,5 @@
> +
> + int32_t imageWidth;
> + int32_t imageHeight;
> + mImage->GetWidth(&imageWidth);
> + mImage->GetHeight(&imageHeight);
You should probably make sure that imageWidth and imageHeight are nonzero.
Attachment #8633157 -
Flags: review?(seth) → review+
Assignee | ||
Comment 9•9 years ago
|
||
Assignee | ||
Comment 10•9 years ago
|
||
Comment 11•9 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla42
Comment 12•9 years ago
|
||
Benjamin, can you please check that this is working for you now in the latest Firefox Nightly?
Flags: needinfo?(human.peng)
Reporter | ||
Comment 13•9 years ago
|
||
As far as I can tell, it's fixed in Nightly. Thank you.
Flags: needinfo?(human.peng)
Comment 14•9 years ago
|
||
(In reply to Benjamin Peng from comment #13)
> As far as I can tell, it's fixed in Nightly. Thank you.
Thanks for verifying and thanks for reporting this bug.
Status: RESOLVED → VERIFIED
Reporter | ||
Comment 15•9 years ago
|
||
It's weird. I sometimes till have this problem when dragging to resize images on reddit with RES.
I haven't find a reliable way to reproduce it though, will keep doing investigation.
Reporter | ||
Comment 16•9 years ago
|
||
This one is not actually fixed. The work aground some times doesn't work, especially for images that are extra large.
You can still use the steps in #1 to find a case. You need to find very large image, open the expando, try to resized it some, and scroll down and up your screen (IMPORTANT), *sometimes* the image will become very aliasing just before the fix.
It's harder to reproduce in Nightly but rather easy in beta version (the one I use daily).
Reporter | ||
Comment 17•9 years ago
|
||
The bug is supposed to fixed in 42, but now on 43 beta I can still sometimes reproduce it. For example, this Paris image:
https://youtu.be/eUVeutapIUo
(However, I can't reproduce it on Nighly.)
Alice, could you help investigate some? My front-end knowledge is very very limited. And if you think this is not actually fixed on Firefox 43, could you reopen this?
Flags: needinfo?(alice0775)
Reporter | ||
Comment 18•9 years ago
|
||
Sorry I made a minor mistake in the video. Here is the new one https://youtu.be/u4dqjWcyqdU
As you can see, on 43 if open (expando) that image, the resize is bad; however if I drag it to make it smaller, when passing certain size it magically became correctly resized. After that you can re-drag to to larger size just fine. On Nightly there is no such problem.
Comment 19•9 years ago
|
||
I cannot reproduce the problem on Firefox43.0rc anymore
Flags: needinfo?(alice0775)
Reporter | ||
Comment 20•9 years ago
|
||
(In reply to Alice0775 White from comment #19)
> I cannot reproduce the problem on Firefox43.0rc anymore
yeah, it cannot be reproduced by your testcase any more, but in everyday use I can still see it occasionally (depends on the image size, as the above video). Thank you anyway!
You need to log in
before you can comment on or make changes to this bug.
Description
•