| 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 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 292 return; | 292 return; |
| 293 | 293 |
| 294 AtomicString imageSourceURL = m_element->imageSourceURL(); | 294 AtomicString imageSourceURL = m_element->imageSourceURL(); |
| 295 KURL url = imageSourceToKURL(imageSourceURL); | 295 KURL url = imageSourceToKURL(imageSourceURL); |
| 296 RefPtrWillBeRawPtr<ImageResource> newImage = nullptr; | 296 RefPtrWillBeRawPtr<ImageResource> newImage = nullptr; |
| 297 RefPtrWillBeRawPtr<Element> protectElement(m_element.get()); | 297 RefPtrWillBeRawPtr<Element> protectElement(m_element.get()); |
| 298 if (!url.isNull()) { | 298 if (!url.isNull()) { |
| 299 // Unlike raw <img>, we block mixed content inside of <picture> or <img
srcset>. | 299 // Unlike raw <img>, we block mixed content inside of <picture> or <img
srcset>. |
| 300 ResourceLoaderOptions resourceLoaderOptions = ResourceFetcher::defaultRe
sourceOptions(); | 300 ResourceLoaderOptions resourceLoaderOptions = ResourceFetcher::defaultRe
sourceOptions(); |
| 301 ResourceRequest resourceRequest(url); | 301 ResourceRequest resourceRequest(url); |
| 302 resourceRequest.setFetchCredentialsMode(WebURLRequest::FetchCredentialsM
odeSameOrigin); | |
| 303 if (updateBehavior == UpdateForcedReload) { | 302 if (updateBehavior == UpdateForcedReload) { |
| 304 resourceRequest.setCachePolicy(ResourceRequestCachePolicy::ReloadByp
assingCache); | 303 resourceRequest.setCachePolicy(ResourceRequestCachePolicy::ReloadByp
assingCache); |
| 305 resourceRequest.setLoFiState(WebURLRequest::LoFiOff); | 304 resourceRequest.setLoFiState(WebURLRequest::LoFiOff); |
| 306 // ImageLoader defers the load of images when in an ImageDocument. | 305 // ImageLoader defers the load of images when in an ImageDocument. |
| 307 // Don't defer this load on a forced reload. | 306 // Don't defer this load on a forced reload. |
| 308 m_loadingImageDocument = false; | 307 m_loadingImageDocument = false; |
| 309 } | 308 } |
| 310 | 309 |
| 311 if (referrerPolicy != ReferrerPolicyDefault) | 310 if (referrerPolicy != ReferrerPolicyDefault) |
| 312 resourceRequest.setHTTPReferrer(SecurityPolicy::generateReferrer(ref
errerPolicy, url, document.outgoingReferrer())); | 311 resourceRequest.setHTTPReferrer(SecurityPolicy::generateReferrer(ref
errerPolicy, url, document.outgoingReferrer())); |
| (...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 627 | 626 |
| 628 void ImageLoader::elementDidMoveToNewDocument() | 627 void ImageLoader::elementDidMoveToNewDocument() |
| 629 { | 628 { |
| 630 if (m_loadDelayCounter) | 629 if (m_loadDelayCounter) |
| 631 m_loadDelayCounter->documentChanged(m_element->document()); | 630 m_loadDelayCounter->documentChanged(m_element->document()); |
| 632 clearFailedLoadURL(); | 631 clearFailedLoadURL(); |
| 633 setImage(0); | 632 setImage(0); |
| 634 } | 633 } |
| 635 | 634 |
| 636 } // namespace blink | 635 } // namespace blink |
| OLD | NEW |