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

Side by Side Diff: Source/core/css/CSSImageValue.cpp

Issue 196043002: HTML Imports: Send credentials for same origin requests (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Landing again with another fix Created 6 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/css/CSSImageSetValue.cpp ('k') | Source/core/css/resolver/StyleResourceLoader.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * (C) 1999-2003 Lars Knoll (knoll@kde.org) 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2004, 2005, 2006, 2008 Apple Inc. All rights reserved. 3 * Copyright (C) 2004, 2005, 2006, 2008 Apple Inc. All rights reserved.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 StyleFetchedImage* CSSImageValue::cachedImage(ResourceFetcher* fetcher, const Re sourceLoaderOptions& options) 57 StyleFetchedImage* CSSImageValue::cachedImage(ResourceFetcher* fetcher, const Re sourceLoaderOptions& options)
58 { 58 {
59 ASSERT(fetcher); 59 ASSERT(fetcher);
60 60
61 if (!m_accessedImage) { 61 if (!m_accessedImage) {
62 m_accessedImage = true; 62 m_accessedImage = true;
63 63
64 FetchRequest request(ResourceRequest(m_absoluteURL), m_initiatorName.isE mpty() ? FetchInitiatorTypeNames::css : m_initiatorName, options); 64 FetchRequest request(ResourceRequest(m_absoluteURL), m_initiatorName.isE mpty() ? FetchInitiatorTypeNames::css : m_initiatorName, options);
65 65
66 if (options.corsEnabled == IsCORSEnabled) 66 if (options.corsEnabled == IsCORSEnabled)
67 request.setCrossOriginAccessControl(fetcher->document()->securityOri gin(), options.allowCredentials); 67 request.setCrossOriginAccessControl(fetcher->document()->securityOri gin(), options.allowCredentials, options.credentialsRequested);
68 68
69 if (ResourcePtr<ImageResource> cachedImage = fetcher->fetchImage(request )) 69 if (ResourcePtr<ImageResource> cachedImage = fetcher->fetchImage(request ))
70 m_image = StyleFetchedImage::create(cachedImage.get()); 70 m_image = StyleFetchedImage::create(cachedImage.get());
71 } 71 }
72 72
73 return (m_image && m_image->isImageResource()) ? toStyleFetchedImage(m_image ) : 0; 73 return (m_image && m_image->isImageResource()) ? toStyleFetchedImage(m_image ) : 0;
74 } 74 }
75 75
76 bool CSSImageValue::hasFailedOrCanceledSubresources() const 76 bool CSSImageValue::hasFailedOrCanceledSubresources() const
77 { 77 {
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 { 114 {
115 KURL url = document.completeURL(m_relativeURL); 115 KURL url = document.completeURL(m_relativeURL);
116 if (url == m_absoluteURL) 116 if (url == m_absoluteURL)
117 return; 117 return;
118 m_absoluteURL = url.string(); 118 m_absoluteURL = url.string();
119 m_accessedImage = false; 119 m_accessedImage = false;
120 m_image.clear(); 120 m_image.clear();
121 } 121 }
122 122
123 } // namespace WebCore 123 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/css/CSSImageSetValue.cpp ('k') | Source/core/css/resolver/StyleResourceLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698