[Webkit-unassigned] [Bug 76102] New: Add support for loadstart, progress, and loadend ProgressEvents to the IMG tag.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jan 11 14:14:08 PST 2012


https://bugs.webkit.org/show_bug.cgi?id=76102

           Summary: Add support for loadstart, progress, and loadend
                    ProgressEvents to the IMG tag.
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Enhancement
          Priority: P2
         Component: Images
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: giles_joplin at yahoo.com


Many applications that display large images, large numbers of images, or images that load slowly, would benefit from support for progress events. Displaying a progress indicator for work being done on the user's behalf is reassuring.  Support for progress events would make it straightforward for applications to do this when images are being loaded.

Currently some applications use XMLHttpRequest (XHR) to download image data while reporting progress. Doing so is somewhat complicated and can be inefficient.

This is a request to add support for loadstart, progress, and loadend events to the IMG tag. The semantics of the events would be roughly the same as for XHR or the File API. ProgressEvents would be dispatched for loadstart, progress, abort, error, load, and loadend. 

We suggest promoting the type of the existing IMG load, error, and abort events from Event to ProgressEvent.

ProgressEvents for cross-origin images should not reveal the actual resource size per http://www.w3.org/TR/progress-events/#security-considerations.  This could be avoided by dispatching ProgressEvents with lengthComputable=false (and loaded=0, total=0) for cross-origin images.   Alternatively we could dispatch a subclass of ProgressEvent with normalized total and loaded attributes.  A normalized image ProgressEvent wouldn't expose the actual size of the resource being downloaded but it would still enable developers to observe relative progress.  Normalization would set total to a constant like 1000, and loaded to a relatively correct value.

-- 
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