[Webkit-unassigned] [Bug 43559] Computed style of an image being loaded has height and width 0px instead of auto (Products don't show on plan-itinteriors.com)
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Aug 23 16:38:12 PDT 2010
https://bugs.webkit.org/show_bug.cgi?id=43559
Alexey Proskuryakov <ap at webkit.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|Products don't show unless |Computed style of an image
|you go on another page on |being loaded has height and
|site and click back. |width 0px instead of auto
| |(Products don't show on
| |plan-itinteriors.com)
Platform|PC |All
OS/Version|Mac OS X 10.5 |All
Keywords|NeedsReduction |HasReduction
Component|New Bugs |CSS
--- Comment #9 from Alexey Proskuryakov <ap at webkit.org> 2010-08-23 16:38:12 PST ---
The issue here is that a script manipulates the images' width/height before they have finished loading. Firefox returns "auto" in this case, while WebKit returns "0px" - and setting the dimensions back to that makes the image remain 0x0 pixels forever.
This code in captions.js should be made ready for 0px width and height:
var w = _img.css('width');
var h = _img.css('height');
$('.caption',$this).css({'color':o.caption_color,'background-color':o.caption_bgcolor,'bottom':'0px','width':w});
$('.overlay',$this).css('background-color',o.overlay_bgcolor);
$this.css({'width':w , 'height':h, 'border':o.border});
Alternatively, the code can be executed when document is loaded, not just ready (in jQuery, the latter means that the document itself has finished loading, but not necessarily its subresources).
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list