Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(208)

Side by Side Diff: third_party/WebKit/Source/core/loader/ImageLoader.cpp

Issue 1846733004: Rename IgnoringCacheData to ValidatingCacheData (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: git cl format Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 298
299 AtomicString imageSourceURL = m_element->imageSourceURL(); 299 AtomicString imageSourceURL = m_element->imageSourceURL();
300 KURL url = imageSourceToKURL(imageSourceURL); 300 KURL url = imageSourceToKURL(imageSourceURL);
301 RefPtrWillBeRawPtr<ImageResource> newImage = nullptr; 301 RefPtrWillBeRawPtr<ImageResource> newImage = nullptr;
302 RefPtrWillBeRawPtr<Element> protectElement(m_element.get()); 302 RefPtrWillBeRawPtr<Element> protectElement(m_element.get());
303 if (!url.isNull()) { 303 if (!url.isNull()) {
304 // Unlike raw <img>, we block mixed content inside of <picture> or <img srcset>. 304 // Unlike raw <img>, we block mixed content inside of <picture> or <img srcset>.
305 ResourceLoaderOptions resourceLoaderOptions = ResourceFetcher::defaultRe sourceOptions(); 305 ResourceLoaderOptions resourceLoaderOptions = ResourceFetcher::defaultRe sourceOptions();
306 ResourceRequest resourceRequest(url); 306 ResourceRequest resourceRequest(url);
307 if (updateBehavior == UpdateForcedReload) { 307 if (updateBehavior == UpdateForcedReload) {
308 resourceRequest.setCachePolicy(ResourceRequestCachePolicy::ReloadByp assingCache); 308 resourceRequest.setCachePolicy(ResourceRequestCachePolicy::Bypassing Cache);
309 resourceRequest.setLoFiState(WebURLRequest::LoFiOff); 309 resourceRequest.setLoFiState(WebURLRequest::LoFiOff);
310 // ImageLoader defers the load of images when in an ImageDocument. 310 // ImageLoader defers the load of images when in an ImageDocument.
311 // Don't defer this load on a forced reload. 311 // Don't defer this load on a forced reload.
312 m_loadingImageDocument = false; 312 m_loadingImageDocument = false;
313 } 313 }
314 314
315 if (referrerPolicy != ReferrerPolicyDefault) 315 if (referrerPolicy != ReferrerPolicyDefault)
316 resourceRequest.setHTTPReferrer(SecurityPolicy::generateReferrer(ref errerPolicy, url, document.outgoingReferrer())); 316 resourceRequest.setHTTPReferrer(SecurityPolicy::generateReferrer(ref errerPolicy, url, document.outgoingReferrer()));
317 317
318 if (isHTMLPictureElement(element()->parentNode()) || !element()->fastGet Attribute(HTMLNames::srcsetAttr).isNull()) 318 if (isHTMLPictureElement(element()->parentNode()) || !element()->fastGet Attribute(HTMLNames::srcsetAttr).isNull())
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
636 636
637 void ImageLoader::elementDidMoveToNewDocument() 637 void ImageLoader::elementDidMoveToNewDocument()
638 { 638 {
639 if (m_loadDelayCounter) 639 if (m_loadDelayCounter)
640 m_loadDelayCounter->documentChanged(m_element->document()); 640 m_loadDelayCounter->documentChanged(m_element->document());
641 clearFailedLoadURL(); 641 clearFailedLoadURL();
642 setImage(0); 642 setImage(0);
643 } 643 }
644 644
645 } // namespace blink 645 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/loader/FrameLoader.cpp ('k') | third_party/WebKit/Source/core/loader/NavigationScheduler.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698