| 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 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 284 | 284 |
| 285 AtomicString imageSourceURL = m_element->imageSourceURL(); | 285 AtomicString imageSourceURL = m_element->imageSourceURL(); |
| 286 KURL url = imageSourceToKURL(imageSourceURL); | 286 KURL url = imageSourceToKURL(imageSourceURL); |
| 287 ResourcePtr<ImageResource> newImage = 0; | 287 ResourcePtr<ImageResource> newImage = 0; |
| 288 RefPtrWillBeRawPtr<Element> protectElement(m_element.get()); | 288 RefPtrWillBeRawPtr<Element> protectElement(m_element.get()); |
| 289 if (!url.isNull()) { | 289 if (!url.isNull()) { |
| 290 // Unlike raw <img>, we block mixed content inside of <picture> or <img
srcset>. | 290 // Unlike raw <img>, we block mixed content inside of <picture> or <img
srcset>. |
| 291 ResourceLoaderOptions resourceLoaderOptions = ResourceFetcher::defaultRe
sourceOptions(); | 291 ResourceLoaderOptions resourceLoaderOptions = ResourceFetcher::defaultRe
sourceOptions(); |
| 292 ResourceRequest resourceRequest(url); | 292 ResourceRequest resourceRequest(url); |
| 293 resourceRequest.setFetchCredentialsMode(WebURLRequest::FetchCredentialsM
odeSameOrigin); | 293 resourceRequest.setFetchCredentialsMode(WebURLRequest::FetchCredentialsM
odeSameOrigin); |
| 294 if (updateBehavior == UpdateForcedReload) | 294 if (updateBehavior == UpdateForcedReload) { |
| 295 resourceRequest.setCachePolicy(ResourceRequestCachePolicy::ReloadByp
assingCache); | 295 resourceRequest.setCachePolicy(ResourceRequestCachePolicy::ReloadByp
assingCache); |
| 296 // ImageLoader defers the load of images when in an ImageDocument. D
on't defer this load on a forced reload. |
| 297 m_loadingImageDocument = false; |
| 298 } |
| 296 if (isHTMLPictureElement(element()->parentNode()) || !element()->fastGet
Attribute(HTMLNames::srcsetAttr).isNull()) | 299 if (isHTMLPictureElement(element()->parentNode()) || !element()->fastGet
Attribute(HTMLNames::srcsetAttr).isNull()) |
| 297 resourceRequest.setRequestContext(WebURLRequest::RequestContextImage
Set); | 300 resourceRequest.setRequestContext(WebURLRequest::RequestContextImage
Set); |
| 298 FetchRequest request(resourceRequest, element()->localName(), resourceLo
aderOptions); | 301 FetchRequest request(resourceRequest, element()->localName(), resourceLo
aderOptions); |
| 299 configureRequest(request, bypassBehavior, *m_element, document.clientHin
tsPreferences()); | 302 configureRequest(request, bypassBehavior, *m_element, document.clientHin
tsPreferences()); |
| 300 | 303 |
| 301 // Prevent the immediate creation of a ResourceLoader (and therefore a n
etwork | 304 // Prevent the immediate creation of a ResourceLoader (and therefore a n
etwork |
| 302 // request) for ImageDocument loads. In this case, the image contents ha
ve already | 305 // request) for ImageDocument loads. In this case, the image contents ha
ve already |
| 303 // been requested as a main resource and ImageDocumentParser will take c
are of | 306 // been requested as a main resource and ImageDocumentParser will take c
are of |
| 304 // funneling the main resource bytes into the ImageResource. | 307 // funneling the main resource bytes into the ImageResource. |
| 305 if (m_loadingImageDocument) { | 308 if (m_loadingImageDocument) { |
| (...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 660 #endif | 663 #endif |
| 661 } | 664 } |
| 662 | 665 |
| 663 #if ENABLE(OILPAN) | 666 #if ENABLE(OILPAN) |
| 664 ImageLoader::ImageLoaderClientRemover::~ImageLoaderClientRemover() | 667 ImageLoader::ImageLoaderClientRemover::~ImageLoaderClientRemover() |
| 665 { | 668 { |
| 666 m_loader.willRemoveClient(m_client); | 669 m_loader.willRemoveClient(m_client); |
| 667 } | 670 } |
| 668 #endif | 671 #endif |
| 669 } | 672 } |
| OLD | NEW |