[Webkit-unassigned] [Bug 120828] loadend ProgressEvent of XHR can not get correct value of attribute of loaded and total
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Dec 20 12:06:43 PST 2013
https://bugs.webkit.org/show_bug.cgi?id=120828
Alexey Proskuryakov <ap at webkit.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #219647| |commit-queue-
Flag| |
--- Comment #11 from Alexey Proskuryakov <ap at webkit.org> 2013-12-20 12:04:44 PST ---
(From update of attachment 219647)
View in context: https://bugs.webkit.org/attachment.cgi?id=219647&action=review
> Source/WebCore/ChangeLog:30
> + (WebCore::XMLHttpRequestProgressEventThrottle::XMLHttpRequestProgressEventThrottle):
I don't quite understand changes to this file. Could you please update the ChangeLog with some explanations?
The reason why prepare-ChangeLog generates these lists is because there is an expectation of per-function comments added manually.
> Source/WebCore/xml/XMLHttpRequest.cpp:1259
> +PassRefPtr<Event> XMLHttpRequest::createEvent(const AtomicString& type)
This function should return PassRefPtr<XMLHttpRequestProgressEvent>.
> Source/WebCore/xml/XMLHttpRequest.cpp:1272
> + long long expectedLength = m_response.expectedContentLength();
> + bool lengthComputable = expectedLength > 0 && m_receivedLength <= expectedLength;
> + unsigned long long total = lengthComputable ? expectedLength : 0;
> + m_progressEventThrottle.dispatchProgressEvent(lengthComputable, m_receivedLength, total);
It looks unfortunate that this code is duplicated. Fixing this would be a bigger task though, as XMLHttpRequestProgressEventThrottle interface is somewhat ugly (it has both dispatchProgressEvent and dispatchEvent, but you can't pass ProgressEvents to dispatchEvent!)
> Source/WebCore/xml/XMLHttpRequestProgressEventThrottle.h:33
> +#include <wtf/text/AtomicString.h>
Please don't include when a forward declaration (or including wtf/Forward.h) whould suffice.
--
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