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 1168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1179 mimeType = m_response.mimeType(); | 1179 mimeType = m_response.mimeType(); |
1180 } | 1180 } |
1181 if (mimeType.isEmpty()) | 1181 if (mimeType.isEmpty()) |
1182 mimeType = AtomicString("text/xml", AtomicString::ConstructFromLiteral); | 1182 mimeType = AtomicString("text/xml", AtomicString::ConstructFromLiteral); |
1183 | 1183 |
1184 return mimeType; | 1184 return mimeType; |
1185 } | 1185 } |
1186 | 1186 |
1187 bool XMLHttpRequest::responseIsXML() const | 1187 bool XMLHttpRequest::responseIsXML() const |
1188 { | 1188 { |
1189 // FIXME: Remove the lower() call when DOMImplementation.isXMLMIMEType() is
modified | 1189 return DOMImplementation::isXMLMIMEType(responseMIMEType()); |
1190 // to do case insensitive MIME type matching. | |
1191 return DOMImplementation::isXMLMIMEType(responseMIMEType().lower()); | |
1192 } | 1190 } |
1193 | 1191 |
1194 int XMLHttpRequest::status() const | 1192 int XMLHttpRequest::status() const |
1195 { | 1193 { |
1196 if (m_state == UNSENT || m_state == OPENED || m_error) | 1194 if (m_state == UNSENT || m_state == OPENED || m_error) |
1197 return 0; | 1195 return 0; |
1198 | 1196 |
1199 if (m_response.httpStatusCode()) | 1197 if (m_response.httpStatusCode()) |
1200 return m_response.httpStatusCode(); | 1198 return m_response.httpStatusCode(); |
1201 | 1199 |
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1423 { | 1421 { |
1424 return EventTargetNames::XMLHttpRequest; | 1422 return EventTargetNames::XMLHttpRequest; |
1425 } | 1423 } |
1426 | 1424 |
1427 ExecutionContext* XMLHttpRequest::executionContext() const | 1425 ExecutionContext* XMLHttpRequest::executionContext() const |
1428 { | 1426 { |
1429 return ActiveDOMObject::executionContext(); | 1427 return ActiveDOMObject::executionContext(); |
1430 } | 1428 } |
1431 | 1429 |
1432 } // namespace WebCore | 1430 } // namespace WebCore |
OLD | NEW |