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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 | 155 |
156 // Do not load any image if the 'src' attribute is missing or if it is | 156 // Do not load any image if the 'src' attribute is missing or if it is |
157 // an empty string. | 157 // an empty string. |
158 CachedResourceHandle<CachedImage> newImage = 0; | 158 CachedResourceHandle<CachedImage> newImage = 0; |
159 if (!attr.isNull() && !stripLeadingAndTrailingHTMLSpaces(attr).isEmpty()) { | 159 if (!attr.isNull() && !stripLeadingAndTrailingHTMLSpaces(attr).isEmpty()) { |
160 CachedResourceRequest request(ResourceRequest(document->completeURL(sour
ceURI(attr))), element()->localName()); | 160 CachedResourceRequest request(ResourceRequest(document->completeURL(sour
ceURI(attr))), element()->localName()); |
161 | 161 |
162 String crossOriginMode = m_element->fastGetAttribute(HTMLNames::crossori
ginAttr); | 162 String crossOriginMode = m_element->fastGetAttribute(HTMLNames::crossori
ginAttr); |
163 if (!crossOriginMode.isNull()) { | 163 if (!crossOriginMode.isNull()) { |
164 StoredCredentials allowCredentials = equalIgnoringCase(crossOriginMo
de, "use-credentials") ? AllowStoredCredentials : DoNotAllowStoredCredentials; | 164 StoredCredentials allowCredentials = equalIgnoringCase(crossOriginMo
de, "use-credentials") ? AllowStoredCredentials : DoNotAllowStoredCredentials; |
165 updateRequestForAccessControl(request.mutableResourceRequest(), docu
ment->securityOrigin(), allowCredentials); | 165 updateRequestForAccessControl(request.mutableResourceRequest(), allo
wCredentials, document->securityOrigin()); |
166 } | 166 } |
167 | 167 |
168 if (m_loadManually) { | 168 if (m_loadManually) { |
169 bool autoLoadOtherImages = document->cachedResourceLoader()->autoLoa
dImages(); | 169 bool autoLoadOtherImages = document->cachedResourceLoader()->autoLoa
dImages(); |
170 document->cachedResourceLoader()->setAutoLoadImages(false); | 170 document->cachedResourceLoader()->setAutoLoadImages(false); |
171 newImage = new CachedImage(request.resourceRequest()); | 171 newImage = new CachedImage(request.resourceRequest()); |
172 newImage->setLoading(true); | 172 newImage->setLoading(true); |
173 document->cachedResourceLoader()->m_documentResources.set(newImage->
url(), newImage.get()); | 173 document->cachedResourceLoader()->m_documentResources.set(newImage->
url(), newImage.get()); |
174 document->cachedResourceLoader()->setAutoLoadImages(autoLoadOtherIma
ges); | 174 document->cachedResourceLoader()->setAutoLoadImages(autoLoadOtherIma
ges); |
175 } else | 175 } else |
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
452 void ImageLoader::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const | 452 void ImageLoader::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const |
453 { | 453 { |
454 MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::Image); | 454 MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::Image); |
455 info.addMember(m_element, "element"); | 455 info.addMember(m_element, "element"); |
456 info.addMember(m_image.get(), "image", WTF::RetainingPointer); | 456 info.addMember(m_image.get(), "image", WTF::RetainingPointer); |
457 info.addMember(m_derefElementTimer, "derefElementTimer"); | 457 info.addMember(m_derefElementTimer, "derefElementTimer"); |
458 info.addMember(m_failedLoadURL, "failedLoadURL"); | 458 info.addMember(m_failedLoadURL, "failedLoadURL"); |
459 } | 459 } |
460 | 460 |
461 } | 461 } |
OLD | NEW |