Bug 9276

Summary: Quirksmode: Image swap resize bug
Product: WebKit Reporter: Adele Peterson <adele>
Component: Layout and RenderingAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: bugs-webkit, davidmoe, ian, jnp, mitz
Priority: P2    
Version: 420+   
Hardware: PC   
OS: OS X 10.4   
Bug Depends on:    
Bug Blocks: 9610    
Attachments:
Description Flags
Dirty pref widths before calcWidth() hyatt: review+

Description Adele Peterson 2006-06-02 15:05:57 PDT
http://www.quirksmode.org/bugreports/archives/safari/index.html

"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()

r=me
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. ***