Bug 9276 - Quirksmode: Image swap resize bug
Summary: Quirksmode: Image swap resize bug
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 420+
Hardware: PC OS X 10.4
: P2 Normal
Assignee: Nobody
: 11319 13528 (view as bug list)
Depends on:
Blocks: 9610
  Show dependency treegraph
Reported: 2006-06-02 15:05 PDT by Adele Peterson
Modified: 2007-07-05 03:50 PDT (History)
5 users (show)

See Also:

Dirty pref widths before calcWidth() (29.65 KB, patch)
2007-05-02 00:21 PDT, mitz
hyatt: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Adele Peterson 2006-06-02 15:05:57 PDT

"When swapping images with javascript Safari will stretch the new image to the size of the previous image, unless the previous and new images have different widths AND heights.

Test page http://www.fiddlyio.com/safaribug/
Workaround is not included
Reported by: Justin Heideman."
Comment 1 Joost de Valk (AlthA) 2006-06-24 14:12:51 PDT
Weird bug, probably in the DOM?
Comment 2 jørgen nørgaard 2007-04-30 09:26:16 PDT
*** Bug 13528 has been marked as a duplicate of this bug. ***
Comment 3 mitz 2007-05-01 07:51:24 PDT
RenderImage::imageChanged does a fake calcWidth() but doesn't invalidate the preferred min/max widths before doing it, so it ends up stretching to the old min pref width. I don't think there's any harm in dirtying the pref widths before the fake calcWidth().
Comment 4 Dave Hyatt 2007-05-01 13:31:11 PDT
None at all.  I do this with tables in places too (and with counters).
Comment 5 mitz 2007-05-02 00:21:36 PDT
Created attachment 14305 [details]
Dirty pref widths before calcWidth()
Comment 6 Dave Hyatt 2007-05-02 00:31:24 PDT
Comment on attachment 14305 [details]
Dirty pref widths before calcWidth()

Comment 7 Mark Rowe (bdash) 2007-05-02 02:38:40 PDT
Landed in r21218.
Comment 8 Alexey Proskuryakov 2007-07-05 03:50:31 PDT
*** Bug 11319 has been marked as a duplicate of this bug. ***