| 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 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 if (m_error || m_state != DONE) | 233 if (m_error || m_state != DONE) |
| 234 return 0; | 234 return 0; |
| 235 | 235 |
| 236 if (!m_createdDocument) { | 236 if (!m_createdDocument) { |
| 237 bool isHTML = equalIgnoringCase(responseMIMEType(), "text/html"); | 237 bool isHTML = equalIgnoringCase(responseMIMEType(), "text/html"); |
| 238 | 238 |
| 239 // The W3C spec requires the final MIME type to be some valid XML type,
or text/html. | 239 // The W3C spec requires the final MIME type to be some valid XML type,
or text/html. |
| 240 // If it is text/html, then the responseType of "document" must have bee
n supplied explicitly. | 240 // If it is text/html, then the responseType of "document" must have bee
n supplied explicitly. |
| 241 if ((m_response.isHTTP() && !responseIsXML() && !isHTML) | 241 if ((m_response.isHTTP() && !responseIsXML() && !isHTML) |
| 242 || (isHTML && m_responseTypeCode == ResponseTypeDefault) | 242 || (isHTML && m_responseTypeCode == ResponseTypeDefault) |
| 243 || scriptExecutionContext()->isWorkerContext()) { | 243 || scriptExecutionContext()->isWorkerGlobalScope()) { |
| 244 m_responseDocument = 0; | 244 m_responseDocument = 0; |
| 245 } else { | 245 } else { |
| 246 if (isHTML) | 246 if (isHTML) |
| 247 m_responseDocument = HTMLDocument::create(0, m_url); | 247 m_responseDocument = HTMLDocument::create(0, m_url); |
| 248 else | 248 else |
| 249 m_responseDocument = Document::create(0, m_url); | 249 m_responseDocument = Document::create(0, m_url); |
| 250 // FIXME: Set Last-Modified. | 250 // FIXME: Set Last-Modified. |
| 251 m_responseDocument->setContent(m_responseText.flattenToString()); | 251 m_responseDocument->setContent(m_responseText.flattenToString()); |
| 252 m_responseDocument->setSecurityOrigin(securityOrigin()); | 252 m_responseDocument->setSecurityOrigin(securityOrigin()); |
| 253 m_responseDocument->setContextFeatures(document()->contextFeatures()
); | 253 m_responseDocument->setContextFeatures(document()->contextFeatures()
); |
| (...skipping 1016 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1270 info.addMember(m_responseDocument, "responseDocument"); | 1270 info.addMember(m_responseDocument, "responseDocument"); |
| 1271 info.addMember(m_binaryResponseBuilder, "binaryResponseBuilder"); | 1271 info.addMember(m_binaryResponseBuilder, "binaryResponseBuilder"); |
| 1272 info.addMember(m_responseArrayBuffer, "responseArrayBuffer"); | 1272 info.addMember(m_responseArrayBuffer, "responseArrayBuffer"); |
| 1273 info.addMember(m_lastSendURL, "lastSendURL"); | 1273 info.addMember(m_lastSendURL, "lastSendURL"); |
| 1274 info.addMember(m_eventTargetData, "eventTargetData"); | 1274 info.addMember(m_eventTargetData, "eventTargetData"); |
| 1275 info.addMember(m_progressEventThrottle, "progressEventThrottle"); | 1275 info.addMember(m_progressEventThrottle, "progressEventThrottle"); |
| 1276 info.addMember(m_securityOrigin, "securityOrigin"); | 1276 info.addMember(m_securityOrigin, "securityOrigin"); |
| 1277 } | 1277 } |
| 1278 | 1278 |
| 1279 } // namespace WebCore | 1279 } // namespace WebCore |
| OLD | NEW |