diff options
Diffstat (limited to 'WebCore/xml')
-rw-r--r-- | WebCore/xml/XMLHttpRequest.cpp | 9 | ||||
-rw-r--r-- | WebCore/xml/XMLHttpRequestException.idl | 3 | ||||
-rw-r--r-- | WebCore/xml/XPathException.idl | 3 |
3 files changed, 10 insertions, 5 deletions
diff --git a/WebCore/xml/XMLHttpRequest.cpp b/WebCore/xml/XMLHttpRequest.cpp index 8762bb5..3e76407 100644 --- a/WebCore/xml/XMLHttpRequest.cpp +++ b/WebCore/xml/XMLHttpRequest.cpp @@ -283,7 +283,8 @@ void XMLHttpRequest::callReadyStateChangeListener() timelineAgent->willChangeXHRReadyState(m_url.string(), m_state); #endif - m_progressEventThrottle.dispatchEvent(XMLHttpRequestProgressEvent::create(eventNames().readystatechangeEvent), m_state == DONE ? FlushProgressEvent : DoNotFlushProgressEvent); + if (m_async || (m_state <= OPENED || m_state == DONE)) + m_progressEventThrottle.dispatchEvent(XMLHttpRequestProgressEvent::create(eventNames().readystatechangeEvent), m_state == DONE ? FlushProgressEvent : DoNotFlushProgressEvent); #if ENABLE(INSPECTOR) if (callTimelineAgentOnReadyStateChange && (timelineAgent = InspectorTimelineAgent::retrieve(scriptExecutionContext()))) @@ -978,8 +979,10 @@ void XMLHttpRequest::didReceiveData(const char* data, int len) long long expectedLength = m_response.expectedContentLength(); m_receivedLength += len; - bool lengthComputable = expectedLength && m_receivedLength <= expectedLength; - m_progressEventThrottle.dispatchProgressEvent(lengthComputable, static_cast<unsigned>(m_receivedLength), static_cast<unsigned>(expectedLength)); + if (m_async) { + bool lengthComputable = expectedLength && m_receivedLength <= expectedLength; + m_progressEventThrottle.dispatchProgressEvent(lengthComputable, static_cast<unsigned>(m_receivedLength), static_cast<unsigned>(expectedLength)); + } if (m_state != LOADING) changeState(LOADING); diff --git a/WebCore/xml/XMLHttpRequestException.idl b/WebCore/xml/XMLHttpRequestException.idl index 7121468..ffea732 100644 --- a/WebCore/xml/XMLHttpRequestException.idl +++ b/WebCore/xml/XMLHttpRequestException.idl @@ -29,7 +29,8 @@ module xml { interface [ - NoStaticTables + NoStaticTables, + DontCheckEnums ] XMLHttpRequestException { readonly attribute unsigned short code; diff --git a/WebCore/xml/XPathException.idl b/WebCore/xml/XPathException.idl index d5a9af6..b57df57 100644 --- a/WebCore/xml/XPathException.idl +++ b/WebCore/xml/XPathException.idl @@ -29,7 +29,8 @@ module xpath { interface [ - Conditional=XPATH + Conditional=XPATH, + DontCheckEnums ] XPathException { readonly attribute unsigned short code; |