Closed Bug 32438 Opened 25 years ago Closed 25 years ago

On image swap IMG dimensions are preserved when they shouldn't

Categories

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

x86
Windows 98
defect

Tracking

()

VERIFIED DUPLICATE of bug 7019

People

(Reporter: martin.honnen, Assigned: jst)

Details

Attachments

(1 file)

When I update the SRC of an IMG element which has no WIDTH and no HEIGHT attribute set the IMG should take on the dimensions of the newly assigned image. It did so in earlier builds of Mozilla but doesn't at least not in the 20000315 build I have. I have the following example code <A HREF="javascript: document.anImage.src = 'http://bugzilla.mozilla.org/ant.jpg'; void 0"> swap in ant </A> | <A HREF="javascript: document.anImage.src = 'http://www.mozilla.org/images/mozilla-banner.gif'; void 0"> swap in banner </A> <BR> <IMG NAME="anImage" SRC="http://www.mozilla.org/images/mozilla-banner.gif"> The banner image is shown in its natural size but when you swap in the ant it is displayed distorted as the banner image's dimensions are preserved. When you mouseover one of the links the IMG suddenly takes on the right dimensions of the ant image but if you then swap in the banner again that is distorted as again the old images dimensions are preserved. So give is back IMG elements which resize correctly when the SRC is changed.
Attached file bug demo
This seems to work perfectly on linux, no distorted drawing that I can see, but due to bug 7019 the image is not resized, it's possible that fixing 7019 fixes this problem too, Could be a dup even...
Yes, it is a duplicate. That 7019 being around for so long I still wonder why I though I had Mozilla builds which did a resize. *** This bug has been marked as a duplicate of 7019 ***
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → DUPLICATE
vrfy
Status: RESOLVED → VERIFIED
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: