| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Julien Chaffraix <jchaffraix@webkit.org> All right reserv
ed. | 2 * Copyright (C) 2010 Julien Chaffraix <jchaffraix@webkit.org> All right reserv
ed. |
| 3 * Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies) | 3 * Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies) |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 // the event handler calls xhr.abort()). In such cases a | 124 // the event handler calls xhr.abort()). In such cases a |
| 125 // readystatechange should have been already dispatched if necessary. | 125 // readystatechange should have been already dispatched if necessary. |
| 126 InspectorInstrumentation::AsyncTask asyncTask(m_target->getExecutionCont
ext(), m_target, m_target->isAsync()); | 126 InspectorInstrumentation::AsyncTask asyncTask(m_target->getExecutionCont
ext(), m_target, m_target->isAsync()); |
| 127 m_target->dispatchEvent(event); | 127 m_target->dispatchEvent(event); |
| 128 } | 128 } |
| 129 } | 129 } |
| 130 | 130 |
| 131 void XMLHttpRequestProgressEventThrottle::dispatchProgressProgressEvent(Event* p
rogressEvent) | 131 void XMLHttpRequestProgressEventThrottle::dispatchProgressProgressEvent(Event* p
rogressEvent) |
| 132 { | 132 { |
| 133 XMLHttpRequest::State state = m_target->readyState(); | 133 XMLHttpRequest::State state = m_target->readyState(); |
| 134 if (m_target->readyState() == XMLHttpRequest::LOADING && m_hasDispatchedProg
ressProgressEvent) { | 134 if (m_target->readyState() == XMLHttpRequest::kLoading && m_hasDispatchedPro
gressProgressEvent) { |
| 135 TRACE_EVENT1("devtools.timeline", "XHRReadyStateChange", "data", Inspect
orXhrReadyStateChangeEvent::data(m_target->getExecutionContext(), m_target)); | 135 TRACE_EVENT1("devtools.timeline", "XHRReadyStateChange", "data", Inspect
orXhrReadyStateChangeEvent::data(m_target->getExecutionContext(), m_target)); |
| 136 InspectorInstrumentation::AsyncTask asyncTask(m_target->getExecutionCont
ext(), m_target, m_target->isAsync()); | 136 InspectorInstrumentation::AsyncTask asyncTask(m_target->getExecutionCont
ext(), m_target, m_target->isAsync()); |
| 137 m_target->dispatchEvent(Event::create(EventTypeNames::readystatechange))
; | 137 m_target->dispatchEvent(Event::create(EventTypeNames::readystatechange))
; |
| 138 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "Up
dateCounters", TRACE_EVENT_SCOPE_THREAD, "data", InspectorUpdateCountersEvent::d
ata()); | 138 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "Up
dateCounters", TRACE_EVENT_SCOPE_THREAD, "data", InspectorUpdateCountersEvent::d
ata()); |
| 139 } | 139 } |
| 140 | 140 |
| 141 if (m_target->readyState() != state) | 141 if (m_target->readyState() != state) |
| 142 return; | 142 return; |
| 143 | 143 |
| 144 m_hasDispatchedProgressProgressEvent = true; | 144 m_hasDispatchedProgressProgressEvent = true; |
| (...skipping 30 matching lines...) Expand all Loading... |
| 175 // event-handler could insert new active DOM objects to the list. | 175 // event-handler could insert new active DOM objects to the list. |
| 176 startOneShot(0, BLINK_FROM_HERE); | 176 startOneShot(0, BLINK_FROM_HERE); |
| 177 } | 177 } |
| 178 | 178 |
| 179 DEFINE_TRACE(XMLHttpRequestProgressEventThrottle) | 179 DEFINE_TRACE(XMLHttpRequestProgressEventThrottle) |
| 180 { | 180 { |
| 181 visitor->trace(m_target); | 181 visitor->trace(m_target); |
| 182 } | 182 } |
| 183 | 183 |
| 184 } // namespace blink | 184 } // namespace blink |
| OLD | NEW |