User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Q312461; .NET CLR 1.1.4322) Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.3b) Gecko/20030121 the state of the image shouldn't change after resizing the browser window, ie if the image was restored to full size before resizing it shouldn't shrink back to the new size of the window but stay in full size. Reproducible: Always Steps to Reproduce:
Created attachment 112187 [details] [diff] [review] patch this patch achieves the suggested behaviour
Created attachment 112205 [details] [diff] [review] patch2 I already wanted to do this, but instead of additional boolean variable I changed mImageIsResized to mImageState.
why not make mImageState an enum? gives more friendly names in debuggers...
Scratch that. The patch in this bug will be building off the one in bug 190545 when its checked in.
Comment on attachment 112205 [details] [diff] [review] patch2 Actually, they will all be just included in the same patch.
Oops, sorry about the incorrect setting. Sorry about all the SPAM. The problem is that I can't change some bug settings at the same time as others.
Erh... Is that last patch truly obsolete?
Jan recommended that we just include this patch in the patch on bug 190545 (which is about to be revised) since bug 190545 has some changes to the underlying code this patch fixes.
Created attachment 120998 [details] [diff] [review] new patch now with an enum :)
Comment on attachment 120998 [details] [diff] [review] new patch Hm... this does not do the right thing completely... If I enable automatic image resizing, and load say http://www.mozilla.org/ and make my browser window smaller than the image, larger than the image and then again smaller, the image is still shown in its original size and not resized. this works without the patch.
Comment on attachment 120998 [details] [diff] [review] new patch ok, this needs a completely different approach
I'm still working on bug 190545, and this issue is still fixed in my latest code for that bug (the current patch as of writing this is obsolete).
*** Bug 203174 has been marked as a duplicate of this bug. ***
*** Bug 203146 has been marked as a duplicate of this bug. ***
*** Bug 210359 has been marked as a duplicate of this bug. ***
I don't understand comment 12, but I think I can do something reasonable.
Created attachment 178979 [details] [diff] [review] patch With this patch, resizing the window does not toggle scaling (if it was scaled before, it continues to be scaled, and if it wasn't, it stays full size until you click).
Comment on attachment 178979 [details] [diff] [review] patch >Index: content/html/document/src/nsImageDocument.cpp > PRPackedBool mImageIsResized; >+ PRPackedBool mShouldResize; Please document how the latter differs from the former, ok? >+ PRBool wasResized = mImageIsResized; That var looks unused. Take that out? With that, r=bzbarsky
Verified that this Bug is fixed. Version: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b2) Gecko/20050409 Firefox/1.0+
*** Bug 252437 has been marked as a duplicate of this bug. ***