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 |
(...skipping 18 matching lines...) Expand all Loading... | |
29 #include "core/dom/ContextFeatures.h" | 29 #include "core/dom/ContextFeatures.h" |
30 #include "core/dom/DOMImplementation.h" | 30 #include "core/dom/DOMImplementation.h" |
31 #include "core/dom/ExceptionCode.h" | 31 #include "core/dom/ExceptionCode.h" |
32 #include "core/dom/XMLDocument.h" | 32 #include "core/dom/XMLDocument.h" |
33 #include "core/editing/markup.h" | 33 #include "core/editing/markup.h" |
34 #include "core/events/Event.h" | 34 #include "core/events/Event.h" |
35 #include "core/fetch/CrossOriginAccessControl.h" | 35 #include "core/fetch/CrossOriginAccessControl.h" |
36 #include "core/fileapi/Blob.h" | 36 #include "core/fileapi/Blob.h" |
37 #include "core/fileapi/File.h" | 37 #include "core/fileapi/File.h" |
38 #include "core/fileapi/Stream.h" | 38 #include "core/fileapi/Stream.h" |
39 #include "core/frame/Settings.h" | |
40 #include "core/frame/UseCounter.h" | |
39 #include "core/frame/csp/ContentSecurityPolicy.h" | 41 #include "core/frame/csp/ContentSecurityPolicy.h" |
40 #include "core/html/DOMFormData.h" | 42 #include "core/html/DOMFormData.h" |
41 #include "core/html/HTMLDocument.h" | 43 #include "core/html/HTMLDocument.h" |
42 #include "core/html/parser/TextResourceDecoder.h" | 44 #include "core/html/parser/TextResourceDecoder.h" |
43 #include "core/inspector/InspectorInstrumentation.h" | 45 #include "core/inspector/InspectorInstrumentation.h" |
44 #include "core/inspector/InspectorTraceEvents.h" | 46 #include "core/inspector/InspectorTraceEvents.h" |
45 #include "core/loader/ThreadableLoader.h" | 47 #include "core/loader/ThreadableLoader.h" |
46 #include "core/frame/Settings.h" | |
47 #include "core/xml/XMLHttpRequestProgressEvent.h" | 48 #include "core/xml/XMLHttpRequestProgressEvent.h" |
48 #include "core/xml/XMLHttpRequestUpload.h" | 49 #include "core/xml/XMLHttpRequestUpload.h" |
49 #include "platform/Logging.h" | 50 #include "platform/Logging.h" |
50 #include "platform/SharedBuffer.h" | 51 #include "platform/SharedBuffer.h" |
51 #include "platform/blob/BlobData.h" | 52 #include "platform/blob/BlobData.h" |
52 #include "platform/network/HTTPParsers.h" | 53 #include "platform/network/HTTPParsers.h" |
53 #include "platform/network/ParsedContentType.h" | 54 #include "platform/network/ParsedContentType.h" |
54 #include "platform/network/ResourceError.h" | 55 #include "platform/network/ResourceError.h" |
55 #include "platform/network/ResourceRequest.h" | 56 #include "platform/network/ResourceRequest.h" |
56 #include "public/platform/Platform.h" | 57 #include "public/platform/Platform.h" |
(...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
479 } | 480 } |
480 } | 481 } |
481 | 482 |
482 void XMLHttpRequest::setWithCredentials(bool value, ExceptionState& exceptionSta te) | 483 void XMLHttpRequest::setWithCredentials(bool value, ExceptionState& exceptionSta te) |
483 { | 484 { |
484 if (m_state > OPENED || m_loader) { | 485 if (m_state > OPENED || m_loader) { |
485 exceptionState.throwDOMException(InvalidStateError, "The value may only be set if the object's state is UNSENT or OPENED."); | 486 exceptionState.throwDOMException(InvalidStateError, "The value may only be set if the object's state is UNSENT or OPENED."); |
486 return; | 487 return; |
487 } | 488 } |
488 | 489 |
490 // FIXME: According to XMLHttpRequest Level 2 we should throw InvalidAccessE rror exception here. | |
491 // However for time being only throw warning message to console for web deve lopers. | |
Inactive
2014/06/16 18:05:47
s/throw/print a/
| |
492 if (!m_async && executionContext()->isDocument()) { | |
sof
2014/06/16 18:11:12
Remove the braces?
| |
493 UseCounter::countDeprecation(document(), UseCounter::SyncXHRWithCredenti als); | |
494 } | |
495 | |
489 m_includeCredentials = value; | 496 m_includeCredentials = value; |
490 } | 497 } |
491 | 498 |
492 bool XMLHttpRequest::isAllowedHTTPMethod(const String& method) | 499 bool XMLHttpRequest::isAllowedHTTPMethod(const String& method) |
493 { | 500 { |
494 return !equalIgnoringCase(method, "TRACE") | 501 return !equalIgnoringCase(method, "TRACE") |
495 && !equalIgnoringCase(method, "TRACK") | 502 && !equalIgnoringCase(method, "TRACK") |
496 && !equalIgnoringCase(method, "CONNECT"); | 503 && !equalIgnoringCase(method, "CONNECT"); |
497 } | 504 } |
498 | 505 |
(...skipping 959 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1458 { | 1465 { |
1459 visitor->trace(m_responseBlob); | 1466 visitor->trace(m_responseBlob); |
1460 visitor->trace(m_responseStream); | 1467 visitor->trace(m_responseStream); |
1461 visitor->trace(m_responseDocument); | 1468 visitor->trace(m_responseDocument); |
1462 visitor->trace(m_progressEventThrottle); | 1469 visitor->trace(m_progressEventThrottle); |
1463 visitor->trace(m_upload); | 1470 visitor->trace(m_upload); |
1464 XMLHttpRequestEventTarget::trace(visitor); | 1471 XMLHttpRequestEventTarget::trace(visitor); |
1465 } | 1472 } |
1466 | 1473 |
1467 } // namespace WebCore | 1474 } // namespace WebCore |
OLD | NEW |