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

Side by Side Diff: Source/core/css/CSSImageSetValue.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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2012 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 99
100 if (!m_accessedBestFitImage) { 100 if (!m_accessedBestFitImage) {
101 // FIXME: In the future, we want to take much more than deviceScaleFacto r into acount here. 101 // FIXME: In the future, we want to take much more than deviceScaleFacto r into acount here.
102 // All forms of scale should be included: Page::pageScaleFactor(), Local Frame::pageZoomFactor(), 102 // All forms of scale should be included: Page::pageScaleFactor(), Local Frame::pageZoomFactor(),
103 // and any CSS transforms. https://bugs.webkit.org/show_bug.cgi?id=81698 103 // and any CSS transforms. https://bugs.webkit.org/show_bug.cgi?id=81698
104 ImageWithScale image = bestImageForScaleFactor(); 104 ImageWithScale image = bestImageForScaleFactor();
105 if (Document* document = loader->document()) { 105 if (Document* document = loader->document()) {
106 FetchRequest request(ResourceRequest(document->completeURL(image.ima geURL)), FetchInitiatorTypeNames::css, options); 106 FetchRequest request(ResourceRequest(document->completeURL(image.ima geURL)), FetchInitiatorTypeNames::css, options);
107 107
108 if (options.corsEnabled == IsCORSEnabled) 108 if (options.corsEnabled == IsCORSEnabled)
109 request.setCrossOriginAccessControl(loader->document()->security Origin(), options.allowCredentials); 109 request.setCrossOriginAccessControl(loader->document()->security Origin(), options.allowCredentials, options.credentialsRequested);
110 110
111 if (ResourcePtr<ImageResource> cachedImage = loader->fetchImage(requ est)) { 111 if (ResourcePtr<ImageResource> cachedImage = loader->fetchImage(requ est)) {
112 m_imageSet = StyleFetchedImageSet::create(cachedImage.get(), ima ge.scaleFactor, this); 112 m_imageSet = StyleFetchedImageSet::create(cachedImage.get(), ima ge.scaleFactor, this);
113 m_accessedBestFitImage = true; 113 m_accessedBestFitImage = true;
114 } 114 }
115 } 115 }
116 } 116 }
117 117
118 return (m_imageSet && m_imageSet->isImageResourceSet()) ? toStyleFetchedImag eSet(m_imageSet) : 0; 118 return (m_imageSet && m_imageSet->isImageResourceSet()) ? toStyleFetchedImag eSet(m_imageSet) : 0;
119 } 119 }
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 { 184 {
185 // Non-CSSValueList data is not accessible through CSS OM, no need to clone. 185 // Non-CSSValueList data is not accessible through CSS OM, no need to clone.
186 } 186 }
187 187
188 PassRefPtrWillBeRawPtr<CSSImageSetValue> CSSImageSetValue::cloneForCSSOM() const 188 PassRefPtrWillBeRawPtr<CSSImageSetValue> CSSImageSetValue::cloneForCSSOM() const
189 { 189 {
190 return adoptRefWillBeRefCountedGarbageCollected(new CSSImageSetValue(*this)) ; 190 return adoptRefWillBeRefCountedGarbageCollected(new CSSImageSetValue(*this)) ;
191 } 191 }
192 192
193 } // namespace WebCore 193 } // namespace WebCore
OLDNEW
« no previous file with comments | « LayoutTests/http/tests/htmlimports/resources/having-cookie-match-same.cgi ('k') | Source/core/css/CSSImageValue.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698