| 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 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 309 return; | 309 return; |
| 310 | 310 |
| 311 AtomicString imageSourceURL = m_element->imageSourceURL(); | 311 AtomicString imageSourceURL = m_element->imageSourceURL(); |
| 312 KURL url = imageSourceToKURL(imageSourceURL); | 312 KURL url = imageSourceToKURL(imageSourceURL); |
| 313 ResourcePtr<ImageResource> newImage = 0; | 313 ResourcePtr<ImageResource> newImage = 0; |
| 314 RefPtrWillBeRawPtr<Element> protectElement(m_element.get()); | 314 RefPtrWillBeRawPtr<Element> protectElement(m_element.get()); |
| 315 if (!url.isNull()) { | 315 if (!url.isNull()) { |
| 316 // Unlike raw <img>, we block mixed content inside of <picture> or <img
srcset>. | 316 // Unlike raw <img>, we block mixed content inside of <picture> or <img
srcset>. |
| 317 ResourceLoaderOptions resourceLoaderOptions = ResourceFetcher::defaultRe
sourceOptions(); | 317 ResourceLoaderOptions resourceLoaderOptions = ResourceFetcher::defaultRe
sourceOptions(); |
| 318 ResourceRequest resourceRequest(url); | 318 ResourceRequest resourceRequest(url); |
| 319 resourceRequest.setFetchCredentialsMode(WebURLRequest::FetchCredentialsM
odeSameOrigin); | |
| 320 if (updateBehavior == UpdateForcedReload) { | 319 if (updateBehavior == UpdateForcedReload) { |
| 321 resourceRequest.setCachePolicy(ResourceRequestCachePolicy::ReloadByp
assingCache); | 320 resourceRequest.setCachePolicy(ResourceRequestCachePolicy::ReloadByp
assingCache); |
| 322 resourceRequest.setLoFiState(WebURLRequest::LoFiOff); | 321 resourceRequest.setLoFiState(WebURLRequest::LoFiOff); |
| 323 // ImageLoader defers the load of images when in an ImageDocument. | 322 // ImageLoader defers the load of images when in an ImageDocument. |
| 324 // Don't defer this load on a forced reload. | 323 // Don't defer this load on a forced reload. |
| 325 m_loadingImageDocument = false; | 324 m_loadingImageDocument = false; |
| 326 } | 325 } |
| 327 | 326 |
| 328 if (RuntimeEnabledFeatures::referrerPolicyAttributeEnabled() && referrer
Policy != ReferrerPolicyDefault) | 327 if (RuntimeEnabledFeatures::referrerPolicyAttributeEnabled() && referrer
Policy != ReferrerPolicyDefault) |
| 329 resourceRequest.setHTTPReferrer(SecurityPolicy::generateReferrer(ref
errerPolicy, url, document.outgoingReferrer())); | 328 resourceRequest.setHTTPReferrer(SecurityPolicy::generateReferrer(ref
errerPolicy, url, document.outgoingReferrer())); |
| (...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 680 | 679 |
| 681 void ImageLoader::sourceImageChanged() | 680 void ImageLoader::sourceImageChanged() |
| 682 { | 681 { |
| 683 for (auto& client : m_clients) { | 682 for (auto& client : m_clients) { |
| 684 ImageLoaderClient* handle = client; | 683 ImageLoaderClient* handle = client; |
| 685 handle->notifyImageSourceChanged(); | 684 handle->notifyImageSourceChanged(); |
| 686 } | 685 } |
| 687 } | 686 } |
| 688 | 687 |
| 689 } // namespace blink | 688 } // namespace blink |
| OLD | NEW |