Bug 18039 - Don't fire load until the image is fully decodable. If the image is corrupt or unsupported, the spec says to fire load *and* error, but browsers don't do that.
Don't fire load until the image is fully decodable. If the image is corrupt o...
Status: RESOLVED FIXED
Product: HTML WG
Classification: Unclassified
Component: HTML5 spec
unspecified
Other other
: P4 normal
: ---
Assigned To: Silvia Pfeiffer
HTML WG Bugzilla archive list
http://www.whatwg.org/specs/web-apps/...
: editorial
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-07-18 16:05 UTC by contributor
Modified: 2012-10-06 00:29 UTC (History)
8 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description contributor 2012-07-18 16:05:56 UTC
This was was cloned from bug 15000 as part of operation convergence.
Originally filed: 2011-11-30 09:15:00 +0000

================================================================================
 #0   contributor@whatwg.org                          2011-11-30 09:15:09 +0000 
--------------------------------------------------------------------------------
Specification: http://www.whatwg.org/specs/web-apps/current-work/multipage/embedded-content-1.html
Multipage: http://www.whatwg.org/C#img-load
Complete: http://www.whatwg.org/c#img-load

Comment:
Don't fire load until the image is fully decodable. If the image is corrupt or
unsupported, the spec says to fire load *and* error, but browsers don't do
that.

Posted from: 85.227.157.105 by simonp@opera.com
User agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_5_8) AppleWebKit/535.8 (KHTML, like Gecko) Chrome/17.0.942.0 Safari/535.8
================================================================================
 #1   Simon Pieters                                   2011-11-30 10:03:01 +0000 
--------------------------------------------------------------------------------
Mistake, the spec doesn't say to fire both load and error. It says to fire load if the load was successful, without checking if the image is corrupt first.
================================================================================
 #2   Ian 'Hixie' Hickson                             2012-01-31 21:00:50 +0000 
--------------------------------------------------------------------------------
I believe the spec matches reality here. Browsers fire 'load' before they inspect the data in some cases. Do you have a test case demonstrating otherwise?
================================================================================
 #3   Simon Pieters                                   2012-02-01 08:01:45 +0000 
--------------------------------------------------------------------------------
http://software.hixie.ch/utilities/js/live-dom-viewer/saved/1318

The spec requires 'load' but Opera/Firefox/Chrome fire 'error'
================================================================================
Comment 1 Silvia Pfeiffer 2012-10-06 00:29:55 UTC
EDITOR'S RESPONSE: This is an Editor's Response to your comment. If
you are satisfied with this response, please change the state of
this bug to CLOSED. If you have additional information and would
like the Editor to reconsider, please reopen this bug. If you would
like to escalate the issue to the full HTML Working Group, please
add the TrackerRequest keyword to this bug, and suggest title and
text for the Tracker Issue; or you may create a Tracker Issue
yourself, if you are able to do so. For more details, see this
document:   http://dev.w3.org/html5/decision-policy/decision-policy-v2.html

Status: Accepted
Change Description:
https://github.com/w3c/html/commit/adcabad221997c7209b1be9bccdba4e795abee0f
Rationale: accepted WHATWG change