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

VERIFIED DUPLICATE of bug 7019

Status

()

P3
normal
VERIFIED DUPLICATE of bug 7019
19 years ago
18 years ago

People

(Reporter: martin.honnen, Assigned: jst)

Tracking

Trunk
x86
Windows 98
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

19 years ago
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.
(Reporter)

Comment 1

19 years ago
Created attachment 6697 [details]
bug demo
(Assignee)

Comment 2

19 years ago
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...
(Reporter)

Comment 3

19 years ago
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
Last Resolved: 19 years ago
Resolution: --- → DUPLICATE

Comment 4

19 years ago
vrfy
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.