| 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 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 258 | 258 |
| 259 AtomicString imageSourceURL = m_element->imageSourceURL(); | 259 AtomicString imageSourceURL = m_element->imageSourceURL(); |
| 260 KURL url = imageSourceToKURL(imageSourceURL); | 260 KURL url = imageSourceToKURL(imageSourceURL); |
| 261 ResourcePtr<ImageResource> newImage = 0; | 261 ResourcePtr<ImageResource> newImage = 0; |
| 262 RefPtrWillBeRawPtr<Element> protectElement(m_element.get()); | 262 RefPtrWillBeRawPtr<Element> protectElement(m_element.get()); |
| 263 if (!url.isNull()) { | 263 if (!url.isNull()) { |
| 264 // Unlike raw <img>, we block mixed content inside of <picture> or <img
srcset>. | 264 // Unlike raw <img>, we block mixed content inside of <picture> or <img
srcset>. |
| 265 ResourceLoaderOptions resourceLoaderOptions = ResourceFetcher::defaultRe
sourceOptions(); | 265 ResourceLoaderOptions resourceLoaderOptions = ResourceFetcher::defaultRe
sourceOptions(); |
| 266 ResourceRequest resourceRequest(url); | 266 ResourceRequest resourceRequest(url); |
| 267 resourceRequest.setFetchCredentialsMode(WebURLRequest::FetchCredentialsM
odeSameOrigin); | 267 resourceRequest.setFetchCredentialsMode(WebURLRequest::FetchCredentialsM
odeSameOrigin); |
| 268 if (updateBehavior == UpdateForcedReload) |
| 269 resourceRequest.setCachePolicy(ResourceRequestCachePolicy::ReloadByp
assingCache); |
| 268 if (isHTMLPictureElement(element()->parentNode()) || !element()->fastGet
Attribute(HTMLNames::srcsetAttr).isNull()) | 270 if (isHTMLPictureElement(element()->parentNode()) || !element()->fastGet
Attribute(HTMLNames::srcsetAttr).isNull()) |
| 269 resourceRequest.setRequestContext(WebURLRequest::RequestContextImage
Set); | 271 resourceRequest.setRequestContext(WebURLRequest::RequestContextImage
Set); |
| 270 FetchRequest request(resourceRequest, element()->localName(), resourceLo
aderOptions); | 272 FetchRequest request(resourceRequest, element()->localName(), resourceLo
aderOptions); |
| 271 configureRequest(request, bypassBehavior, *m_element, document.clientHin
tsPreferences()); | 273 configureRequest(request, bypassBehavior, *m_element, document.clientHin
tsPreferences()); |
| 272 | 274 |
| 273 // Prevent the immediate creation of a ResourceLoader (and therefore a n
etwork | 275 // Prevent the immediate creation of a ResourceLoader (and therefore a n
etwork |
| 274 // request) for ImageDocument loads. In this case, the image contents ha
ve already | 276 // request) for ImageDocument loads. In this case, the image contents ha
ve already |
| 275 // been requested as a main resource and ImageDocumentParser will take c
are of | 277 // been requested as a main resource and ImageDocumentParser will take c
are of |
| 276 // funneling the main resource bytes into the ImageResource. | 278 // funneling the main resource bytes into the ImageResource. |
| 277 if (m_loadingImageDocument) { | 279 if (m_loadingImageDocument) { |
| (...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 612 #endif | 614 #endif |
| 613 } | 615 } |
| 614 | 616 |
| 615 #if ENABLE(OILPAN) | 617 #if ENABLE(OILPAN) |
| 616 ImageLoader::ImageLoaderClientRemover::~ImageLoaderClientRemover() | 618 ImageLoader::ImageLoaderClientRemover::~ImageLoaderClientRemover() |
| 617 { | 619 { |
| 618 m_loader.willRemoveClient(m_client); | 620 m_loader.willRemoveClient(m_client); |
| 619 } | 621 } |
| 620 #endif | 622 #endif |
| 621 } | 623 } |
| OLD | NEW |