OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010 Apple Inc. All rights reserv
ed. | 4 * Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010 Apple Inc. All rights reserv
ed. |
5 * | 5 * |
6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
10 * | 10 * |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 | 150 |
151 if (!m_failedLoadURL.isEmpty() && attr == m_failedLoadURL) | 151 if (!m_failedLoadURL.isEmpty() && attr == m_failedLoadURL) |
152 return; | 152 return; |
153 | 153 |
154 // Do not load any image if the 'src' attribute is missing or if it is | 154 // Do not load any image if the 'src' attribute is missing or if it is |
155 // an empty string. | 155 // an empty string. |
156 ResourcePtr<ImageResource> newImage = 0; | 156 ResourcePtr<ImageResource> newImage = 0; |
157 if (!attr.isNull() && !stripLeadingAndTrailingHTMLSpaces(attr).isEmpty()) { | 157 if (!attr.isNull() && !stripLeadingAndTrailingHTMLSpaces(attr).isEmpty()) { |
158 FetchRequest request(ResourceRequest(document.completeURL(sourceURI(attr
))), element()->localName()); | 158 FetchRequest request(ResourceRequest(document.completeURL(sourceURI(attr
))), element()->localName()); |
159 | 159 |
160 String crossOriginMode = m_element->fastGetAttribute(HTMLNames::crossori
ginAttr); | 160 AtomicString crossOriginMode = m_element->fastGetAttribute(HTMLNames::cr
ossoriginAttr); |
161 if (!crossOriginMode.isNull()) { | 161 if (!crossOriginMode.isNull()) { |
162 StoredCredentials allowCredentials = equalIgnoringCase(crossOriginMo
de, "use-credentials") ? AllowStoredCredentials : DoNotAllowStoredCredentials; | 162 StoredCredentials allowCredentials = equalIgnoringCase(crossOriginMo
de, "use-credentials") ? AllowStoredCredentials : DoNotAllowStoredCredentials; |
163 updateRequestForAccessControl(request.mutableResourceRequest(), docu
ment.securityOrigin(), allowCredentials); | 163 updateRequestForAccessControl(request.mutableResourceRequest(), docu
ment.securityOrigin(), allowCredentials); |
164 } | 164 } |
165 | 165 |
166 if (m_loadManually) { | 166 if (m_loadManually) { |
167 bool autoLoadOtherImages = document.fetcher()->autoLoadImages(); | 167 bool autoLoadOtherImages = document.fetcher()->autoLoadImages(); |
168 document.fetcher()->setAutoLoadImages(false); | 168 document.fetcher()->setAutoLoadImages(false); |
169 newImage = new ImageResource(request.resourceRequest()); | 169 newImage = new ImageResource(request.resourceRequest()); |
170 newImage->setLoading(true); | 170 newImage->setLoading(true); |
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
475 handle->notifyImageSourceChanged(); | 475 handle->notifyImageSourceChanged(); |
476 } | 476 } |
477 } | 477 } |
478 | 478 |
479 inline void ImageLoader::clearFailedLoadURL() | 479 inline void ImageLoader::clearFailedLoadURL() |
480 { | 480 { |
481 m_failedLoadURL = AtomicString(); | 481 m_failedLoadURL = AtomicString(); |
482 } | 482 } |
483 | 483 |
484 } | 484 } |
OLD | NEW |