Bug 126574

Summary: Make abort event sending compliant with XHR spec
Product: WebKit Reporter: youenn fablet <youennf>
Component: XMLAssignee: Nobody <webkit-unassigned>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: ap, ossy
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
potential fix over 120828 patch none

Description youenn fablet 2014-01-07 05:03:25 PST
WebKit always send abort event when XHR abort() method is called. 
http://www.w3.org/TR/XMLHttpRequest/#the-abort()-method mandates to do that only if the XHR state is unset or opened.
Related WTP test is XMLHttpRequest/abort-after-receive.htm
Comment 1 youenn fablet 2014-01-07 05:39:49 PST
XMLHttpRequestUpload events should be sent before XMLHttpRequest events.
This reordering may be handled as part of code refactoring done in bug 120828
Comment 2 youenn fablet 2014-01-07 07:53:39 PST
Created attachment 220528 [details]
potential fix over 120828 patch
Comment 3 youenn fablet 2014-01-13 01:19:04 PST
WebKit XHR implementation currently sends abort event when its state is DONE and abort() is called.
According to spec, the expected behavior should be to not send any abort event, but to ensure that load and loadend events are sent (since XHR is actually DONE).

This should happen in particular even when xhr.abort is called in onreadystatechange callback in DONE case.

Firefox is behaving this way (no abort event but load and loadend events).
Blink currently does not send any load/loadend/abort event at all
Comment 4 youenn fablet 2014-01-13 01:22:37 PST
Potential duplicate of bug 98404
Comment 5 Csaba Osztrogonác 2014-01-13 05:45:05 PST
Please set the r? flag if you would like to ask review.
Comment 6 youenn fablet 2016-01-15 09:28:08 PST

*** This bug has been marked as a duplicate of bug 98404 ***