[Webkit-unassigned] [Bug 13596] Implement .onprogress handler on XMLHttpRequest objects to support progressive download content length information

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Apr 21 02:02:32 PDT 2008


http://bugs.webkit.org/show_bug.cgi?id=13596


ap at webkit.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #20708|review?                     |review-
               Flag|                            |




------- Comment #10 from ap at webkit.org  2008-04-21 02:02 PDT -------
(From update of attachment 20708)
I think that we need to support adding handlers via addEventListener, not just
.onprogress.

I have noticed that the spec actually describes when the event should be fired:
"every 350ms (+-200ms) or for every byte received, whichever is least
frequent." I think it's OK to land a first version as is, to improve on this
later.

+        // XmlHttpRequest 2 extension

Should be "XMLHttpRequest".

+unsigned XMLHttpRequestProgressEvent::position()
+{
+    // FIXME: If lengthComputable is false, what should we return?
+    return m_loaded;
+}

What is wrong with returning m_loaded?

+    evt = new XMLHttpRequestProgressEvent("progress", expectedLength &&
m_receivedLength <= expectedLength, m_receivedLength, expectedLength);

Should be progressEvent to avoid constructing an AtomicString from "progress"
again and again.

I think that this is almost ready for landing, but not quite yet.


-- 
Configure bugmail: http://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list