| 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 | 4 * Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010 Apple Inc. All rights |
| 5 * reserved. | 5 * reserved. |
| 6 * | 6 * |
| 7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
| 8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
| 9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
| 10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
| (...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 292 AtomicString imageSourceURL = m_element->imageSourceURL(); | 292 AtomicString imageSourceURL = m_element->imageSourceURL(); |
| 293 ImageResourceContent* newImage = nullptr; | 293 ImageResourceContent* newImage = nullptr; |
| 294 if (!url.isNull()) { | 294 if (!url.isNull()) { |
| 295 // Unlike raw <img>, we block mixed content inside of <picture> or | 295 // Unlike raw <img>, we block mixed content inside of <picture> or |
| 296 // <img srcset>. | 296 // <img srcset>. |
| 297 ResourceLoaderOptions resourceLoaderOptions = | 297 ResourceLoaderOptions resourceLoaderOptions = |
| 298 ResourceFetcher::defaultResourceOptions(); | 298 ResourceFetcher::defaultResourceOptions(); |
| 299 ResourceRequest resourceRequest(url); | 299 ResourceRequest resourceRequest(url); |
| 300 if (updateBehavior == UpdateForcedReload) { | 300 if (updateBehavior == UpdateForcedReload) { |
| 301 resourceRequest.setCachePolicy(WebCachePolicy::BypassingCache); | 301 resourceRequest.setCachePolicy(WebCachePolicy::BypassingCache); |
| 302 resourceRequest.setLoFiState(WebURLRequest::LoFiOff); | 302 resourceRequest.setPreviewsState( |
| 303 WebURLRequest::PreviewsState::PreviewsOff); |
| 303 } | 304 } |
| 304 | 305 |
| 305 if (referrerPolicy != ReferrerPolicyDefault) { | 306 if (referrerPolicy != ReferrerPolicyDefault) { |
| 306 resourceRequest.setHTTPReferrer(SecurityPolicy::generateReferrer( | 307 resourceRequest.setHTTPReferrer(SecurityPolicy::generateReferrer( |
| 307 referrerPolicy, url, document.outgoingReferrer())); | 308 referrerPolicy, url, document.outgoingReferrer())); |
| 308 } | 309 } |
| 309 | 310 |
| 310 if (isHTMLPictureElement(element()->parentNode()) || | 311 if (isHTMLPictureElement(element()->parentNode()) || |
| 311 !element()->fastGetAttribute(HTMLNames::srcsetAttr).isNull()) | 312 !element()->fastGetAttribute(HTMLNames::srcsetAttr).isNull()) |
| 312 resourceRequest.setRequestContext(WebURLRequest::RequestContextImageSet); | 313 resourceRequest.setRequestContext(WebURLRequest::RequestContextImageSet); |
| (...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 636 } | 637 } |
| 637 | 638 |
| 638 void ImageLoader::elementDidMoveToNewDocument() { | 639 void ImageLoader::elementDidMoveToNewDocument() { |
| 639 if (m_loadDelayCounter) | 640 if (m_loadDelayCounter) |
| 640 m_loadDelayCounter->documentChanged(m_element->document()); | 641 m_loadDelayCounter->documentChanged(m_element->document()); |
| 641 clearFailedLoadURL(); | 642 clearFailedLoadURL(); |
| 642 setImage(0); | 643 setImage(0); |
| 643 } | 644 } |
| 644 | 645 |
| 645 } // namespace blink | 646 } // namespace blink |
| OLD | NEW |