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

Side by Side Diff: third_party/WebKit/Source/core/css/CSSImageSetValue.cpp

Issue 1773813007: blink: Rename modules/ method to prefix with get when they collide. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: clash-modules: rebase-fixes Created 4 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
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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 113
114 if (isCachePending(deviceScaleFactor)) { 114 if (isCachePending(deviceScaleFactor)) {
115 // FIXME: In the future, we want to take much more than deviceScaleFacto r into acount here. 115 // FIXME: In the future, we want to take much more than deviceScaleFacto r into acount here.
116 // All forms of scale should be included: Page::pageScaleFactor(), Local Frame::pageZoomFactor(), 116 // All forms of scale should be included: Page::pageScaleFactor(), Local Frame::pageZoomFactor(),
117 // and any CSS transforms. https://bugs.webkit.org/show_bug.cgi?id=81698 117 // and any CSS transforms. https://bugs.webkit.org/show_bug.cgi?id=81698
118 ImageWithScale image = bestImageForScaleFactor(deviceScaleFactor); 118 ImageWithScale image = bestImageForScaleFactor(deviceScaleFactor);
119 FetchRequest request(ResourceRequest(document->completeURL(image.imageUR L)), FetchInitiatorTypeNames::css); 119 FetchRequest request(ResourceRequest(document->completeURL(image.imageUR L)), FetchInitiatorTypeNames::css);
120 request.mutableResourceRequest().setHTTPReferrer(image.referrer); 120 request.mutableResourceRequest().setHTTPReferrer(image.referrer);
121 121
122 if (crossOrigin != CrossOriginAttributeNotSet) 122 if (crossOrigin != CrossOriginAttributeNotSet)
123 request.setCrossOriginAccessControl(document->securityOrigin(), cros sOrigin); 123 request.setCrossOriginAccessControl(document->getSecurityOrigin(), c rossOrigin);
124 124
125 if (RefPtrWillBeRawPtr<ImageResource> cachedImage = ImageResource::fetch (request, document->fetcher())) 125 if (RefPtrWillBeRawPtr<ImageResource> cachedImage = ImageResource::fetch (request, document->fetcher()))
126 m_cachedImage = StyleFetchedImageSet::create(cachedImage.get(), imag e.scaleFactor, this, request.url()); 126 m_cachedImage = StyleFetchedImageSet::create(cachedImage.get(), imag e.scaleFactor, this, request.url());
127 else 127 else
128 m_cachedImage = StyleInvalidImage::create(image.imageURL); 128 m_cachedImage = StyleInvalidImage::create(image.imageURL);
129 m_cachedScaleFactor = deviceScaleFactor; 129 m_cachedScaleFactor = deviceScaleFactor;
130 } 130 }
131 131
132 return m_cachedImage.get(); 132 return m_cachedImage.get();
133 } 133 }
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 PassRefPtrWillBeRawPtr<CSSImageSetValue> CSSImageSetValue::valueWithURLsMadeAbso lute() 180 PassRefPtrWillBeRawPtr<CSSImageSetValue> CSSImageSetValue::valueWithURLsMadeAbso lute()
181 { 181 {
182 RefPtrWillBeRawPtr<CSSImageSetValue> value = CSSImageSetValue::create(); 182 RefPtrWillBeRawPtr<CSSImageSetValue> value = CSSImageSetValue::create();
183 for (auto& item : *this) 183 for (auto& item : *this)
184 item->isImageValue() ? value->append(toCSSImageValue(*item).valueWithURL MadeAbsolute()) : value->append(item); 184 item->isImageValue() ? value->append(toCSSImageValue(*item).valueWithURL MadeAbsolute()) : value->append(item);
185 return value.release(); 185 return value.release();
186 } 186 }
187 187
188 188
189 } // namespace blink 189 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSFontFaceSrcValue.cpp ('k') | third_party/WebKit/Source/core/css/CSSImageValue.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698