| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2006, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2004, 2006, 2008 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2005-2007 Alexey Proskuryakov <ap@webkit.org> | 3 * Copyright (C) 2005-2007 Alexey Proskuryakov <ap@webkit.org> |
| 4 * Copyright (C) 2007, 2008 Julien Chaffraix <jchaffraix@webkit.org> | 4 * Copyright (C) 2007, 2008 Julien Chaffraix <jchaffraix@webkit.org> |
| 5 * Copyright (C) 2008, 2011 Google Inc. All rights reserved. | 5 * Copyright (C) 2008, 2011 Google Inc. All rights reserved. |
| 6 * Copyright (C) 2012 Intel Corporation | 6 * Copyright (C) 2012 Intel Corporation |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Lesser General Public | 9 * modify it under the terms of the GNU Lesser General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| 11 * version 2 of the License, or (at your option) any later version. | 11 * version 2 of the License, or (at your option) any later version. |
| 12 * | 12 * |
| 13 * This library is distributed in the hope that it will be useful, | 13 * This library is distributed in the hope that it will be useful, |
| 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 16 * Lesser General Public License for more details. | 16 * Lesser General Public License for more details. |
| 17 * | 17 * |
| 18 * You should have received a copy of the GNU Lesser General Public | 18 * You should have received a copy of the GNU Lesser General Public |
| 19 * License along with this library; if not, write to the Free Software | 19 * License along with this library; if not, write to the Free Software |
| 20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 U
SA | 20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 U
SA |
| 21 */ | 21 */ |
| 22 | 22 |
| 23 #include "config.h" | 23 #include "config.h" |
| 24 #include "core/xml/XMLHttpRequest.h" | 24 #include "core/xmlhttprequest/XMLHttpRequest.h" |
| 25 | 25 |
| 26 #include "bindings/core/v8/ExceptionState.h" | 26 #include "bindings/core/v8/ExceptionState.h" |
| 27 #include "core/FetchInitiatorTypeNames.h" | 27 #include "core/FetchInitiatorTypeNames.h" |
| 28 #include "core/dom/ContextFeatures.h" | 28 #include "core/dom/ContextFeatures.h" |
| 29 #include "core/dom/DOMArrayBuffer.h" | 29 #include "core/dom/DOMArrayBuffer.h" |
| 30 #include "core/dom/DOMException.h" | 30 #include "core/dom/DOMException.h" |
| 31 #include "core/dom/DOMImplementation.h" | 31 #include "core/dom/DOMImplementation.h" |
| 32 #include "core/dom/DocumentParser.h" | 32 #include "core/dom/DocumentParser.h" |
| 33 #include "core/dom/ExceptionCode.h" | 33 #include "core/dom/ExceptionCode.h" |
| 34 #include "core/dom/XMLDocument.h" | 34 #include "core/dom/XMLDocument.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 46 #include "core/html/HTMLDocument.h" | 46 #include "core/html/HTMLDocument.h" |
| 47 #include "core/html/parser/TextResourceDecoder.h" | 47 #include "core/html/parser/TextResourceDecoder.h" |
| 48 #include "core/inspector/ConsoleMessage.h" | 48 #include "core/inspector/ConsoleMessage.h" |
| 49 #include "core/inspector/InspectorInstrumentation.h" | 49 #include "core/inspector/InspectorInstrumentation.h" |
| 50 #include "core/inspector/InspectorTraceEvents.h" | 50 #include "core/inspector/InspectorTraceEvents.h" |
| 51 #include "core/loader/ThreadableLoader.h" | 51 #include "core/loader/ThreadableLoader.h" |
| 52 #include "core/streams/ReadableStream.h" | 52 #include "core/streams/ReadableStream.h" |
| 53 #include "core/streams/ReadableStreamImpl.h" | 53 #include "core/streams/ReadableStreamImpl.h" |
| 54 #include "core/streams/Stream.h" | 54 #include "core/streams/Stream.h" |
| 55 #include "core/streams/UnderlyingSource.h" | 55 #include "core/streams/UnderlyingSource.h" |
| 56 #include "core/xml/XMLHttpRequestProgressEvent.h" | 56 #include "core/xmlhttprequest/XMLHttpRequestProgressEvent.h" |
| 57 #include "core/xml/XMLHttpRequestUpload.h" | 57 #include "core/xmlhttprequest/XMLHttpRequestUpload.h" |
| 58 #include "platform/Logging.h" | 58 #include "platform/Logging.h" |
| 59 #include "platform/RuntimeEnabledFeatures.h" | 59 #include "platform/RuntimeEnabledFeatures.h" |
| 60 #include "platform/SharedBuffer.h" | 60 #include "platform/SharedBuffer.h" |
| 61 #include "platform/blob/BlobData.h" | 61 #include "platform/blob/BlobData.h" |
| 62 #include "platform/network/HTTPParsers.h" | 62 #include "platform/network/HTTPParsers.h" |
| 63 #include "platform/network/ParsedContentType.h" | 63 #include "platform/network/ParsedContentType.h" |
| 64 #include "platform/network/ResourceError.h" | 64 #include "platform/network/ResourceError.h" |
| 65 #include "platform/network/ResourceRequest.h" | 65 #include "platform/network/ResourceRequest.h" |
| 66 #include "public/platform/WebURLRequest.h" | 66 #include "public/platform/WebURLRequest.h" |
| 67 #include "wtf/ArrayBuffer.h" | 67 #include "wtf/ArrayBuffer.h" |
| (...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 520 action = XMLHttpRequestProgressEventThrottle::Clear; | 520 action = XMLHttpRequestProgressEventThrottle::Clear; |
| 521 else | 521 else |
| 522 action = XMLHttpRequestProgressEventThrottle::Flush; | 522 action = XMLHttpRequestProgressEventThrottle::Flush; |
| 523 } | 523 } |
| 524 m_progressEventThrottle.dispatchReadyStateChangeEvent(Event::create(Even
tTypeNames::readystatechange), action); | 524 m_progressEventThrottle.dispatchReadyStateChangeEvent(Event::create(Even
tTypeNames::readystatechange), action); |
| 525 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "Up
dateCounters", "data", InspectorUpdateCountersEvent::data()); | 525 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "Up
dateCounters", "data", InspectorUpdateCountersEvent::data()); |
| 526 } | 526 } |
| 527 | 527 |
| 528 InspectorInstrumentation::didDispatchXHRReadyStateChangeEvent(cookie); | 528 InspectorInstrumentation::didDispatchXHRReadyStateChangeEvent(cookie); |
| 529 if (m_state == DONE && !m_error) { | 529 if (m_state == DONE && !m_error) { |
| 530 { | 530 TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "XHRLoad",
"data", InspectorXhrLoadEvent::data(executionContext(), this)); |
| 531 TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "XHRLoa
d", "data", InspectorXhrLoadEvent::data(executionContext(), this)); | 531 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline.stack"
), "CallStack", "stack", InspectorCallStackEvent::currentCallStack()); |
| 532 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline.st
ack"), "CallStack", "stack", InspectorCallStackEvent::currentCallStack()); | 532 InspectorInstrumentationCookie cookie = InspectorInstrumentation::willDi
spatchXHRLoadEvent(executionContext(), this); |
| 533 InspectorInstrumentationCookie cookie = InspectorInstrumentation::wi
llDispatchXHRLoadEvent(executionContext(), this); | 533 dispatchProgressEventFromSnapshot(EventTypeNames::load); |
| 534 dispatchProgressEventFromSnapshot(EventTypeNames::load); | 534 InspectorInstrumentation::didDispatchXHRLoadEvent(cookie); |
| 535 InspectorInstrumentation::didDispatchXHRLoadEvent(cookie); | 535 |
| 536 } | |
| 537 dispatchProgressEventFromSnapshot(EventTypeNames::loadend); | 536 dispatchProgressEventFromSnapshot(EventTypeNames::loadend); |
| 538 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "Up
dateCounters", "data", InspectorUpdateCountersEvent::data()); | 537 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "Up
dateCounters", "data", InspectorUpdateCountersEvent::data()); |
| 539 } | 538 } |
| 540 } | 539 } |
| 541 | 540 |
| 542 void XMLHttpRequest::setWithCredentials(bool value, ExceptionState& exceptionSta
te) | 541 void XMLHttpRequest::setWithCredentials(bool value, ExceptionState& exceptionSta
te) |
| 543 { | 542 { |
| 544 if (m_state > OPENED || m_loader) { | 543 if (m_state > OPENED || m_loader) { |
| 545 exceptionState.throwDOMException(InvalidStateError, "The value may only
be set if the object's state is UNSENT or OPENED."); | 544 exceptionState.throwDOMException(InvalidStateError, "The value may only
be set if the object's state is UNSENT or OPENED."); |
| 546 return; | 545 return; |
| (...skipping 1105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1652 visitor->trace(m_responseDocument); | 1651 visitor->trace(m_responseDocument); |
| 1653 visitor->trace(m_responseDocumentParser); | 1652 visitor->trace(m_responseDocumentParser); |
| 1654 visitor->trace(m_progressEventThrottle); | 1653 visitor->trace(m_progressEventThrottle); |
| 1655 visitor->trace(m_upload); | 1654 visitor->trace(m_upload); |
| 1656 visitor->trace(m_blobLoader); | 1655 visitor->trace(m_blobLoader); |
| 1657 XMLHttpRequestEventTarget::trace(visitor); | 1656 XMLHttpRequestEventTarget::trace(visitor); |
| 1658 DocumentParserClient::trace(visitor); | 1657 DocumentParserClient::trace(visitor); |
| 1659 } | 1658 } |
| 1660 | 1659 |
| 1661 } // namespace blink | 1660 } // namespace blink |
| OLD | NEW |