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