| 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 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 290 AtomicString imageSourceURL = m_element->imageSourceURL(); | 290 AtomicString imageSourceURL = m_element->imageSourceURL(); |
| 291 ImageResource* newImage = nullptr; | 291 ImageResource* newImage = nullptr; |
| 292 if (!url.isNull()) { | 292 if (!url.isNull()) { |
| 293 // Unlike raw <img>, we block mixed content inside of <picture> or | 293 // Unlike raw <img>, we block mixed content inside of <picture> or |
| 294 // <img srcset>. | 294 // <img srcset>. |
| 295 ResourceLoaderOptions resourceLoaderOptions = | 295 ResourceLoaderOptions resourceLoaderOptions = |
| 296 ResourceFetcher::defaultResourceOptions(); | 296 ResourceFetcher::defaultResourceOptions(); |
| 297 ResourceRequest resourceRequest(url); | 297 ResourceRequest resourceRequest(url); |
| 298 if (updateBehavior == UpdateForcedReload) { | 298 if (updateBehavior == UpdateForcedReload) { |
| 299 resourceRequest.setCachePolicy(WebCachePolicy::BypassingCache); | 299 resourceRequest.setCachePolicy(WebCachePolicy::BypassingCache); |
| 300 resourceRequest.setLoFiState(WebURLRequest::LoFiOff); | 300 resourceRequest.setPreviewsState( |
| 301 WebURLRequest::PreviewsState::PreviewsOff); |
| 301 } | 302 } |
| 302 | 303 |
| 303 if (referrerPolicy != ReferrerPolicyDefault) { | 304 if (referrerPolicy != ReferrerPolicyDefault) { |
| 304 resourceRequest.setHTTPReferrer(SecurityPolicy::generateReferrer( | 305 resourceRequest.setHTTPReferrer(SecurityPolicy::generateReferrer( |
| 305 referrerPolicy, url, document.outgoingReferrer())); | 306 referrerPolicy, url, document.outgoingReferrer())); |
| 306 } | 307 } |
| 307 | 308 |
| 308 if (isHTMLPictureElement(element()->parentNode()) || | 309 if (isHTMLPictureElement(element()->parentNode()) || |
| 309 !element()->fastGetAttribute(HTMLNames::srcsetAttr).isNull()) | 310 !element()->fastGetAttribute(HTMLNames::srcsetAttr).isNull()) |
| 310 resourceRequest.setRequestContext(WebURLRequest::RequestContextImageSet); | 311 resourceRequest.setRequestContext(WebURLRequest::RequestContextImageSet); |
| (...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 633 } | 634 } |
| 634 | 635 |
| 635 void ImageLoader::elementDidMoveToNewDocument() { | 636 void ImageLoader::elementDidMoveToNewDocument() { |
| 636 if (m_loadDelayCounter) | 637 if (m_loadDelayCounter) |
| 637 m_loadDelayCounter->documentChanged(m_element->document()); | 638 m_loadDelayCounter->documentChanged(m_element->document()); |
| 638 clearFailedLoadURL(); | 639 clearFailedLoadURL(); |
| 639 setImage(0); | 640 setImage(0); |
| 640 } | 641 } |
| 641 | 642 |
| 642 } // namespace blink | 643 } // namespace blink |
| OLD | NEW |