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 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 | 148 |
149 AtomicString attr = m_element->imageSourceURL(); | 149 AtomicString attr = m_element->imageSourceURL(); |
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(element()->treeScope().completeURL(
sourceURI(attr))), element()->localName()); |
159 | 159 |
160 AtomicString crossOriginMode = m_element->fastGetAttribute(HTMLNames::cr
ossoriginAttr); | 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); |
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
486 handle->notifyImageSourceChanged(); | 486 handle->notifyImageSourceChanged(); |
487 } | 487 } |
488 } | 488 } |
489 | 489 |
490 inline void ImageLoader::clearFailedLoadURL() | 490 inline void ImageLoader::clearFailedLoadURL() |
491 { | 491 { |
492 m_failedLoadURL = AtomicString(); | 492 m_failedLoadURL = AtomicString(); |
493 } | 493 } |
494 | 494 |
495 } | 495 } |
OLD | NEW |