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

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

Issue 1303173007: Oilpan: Unship Oilpan from CSSValues Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 3 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.h ('k') | Source/core/css/CSSImageValue.h » ('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 * 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 (options.corsEnabled == IsCORSEnabled) 114 if (options.corsEnabled == IsCORSEnabled)
115 request.setCrossOriginAccessControl(document->securityOrigin(), opti ons.allowCredentials, options.credentialsRequested); 115 request.setCrossOriginAccessControl(document->securityOrigin(), opti ons.allowCredentials, options.credentialsRequested);
116 116
117 if (ResourcePtr<ImageResource> cachedImage = ImageResource::fetch(reques t, document->fetcher())) { 117 if (ResourcePtr<ImageResource> cachedImage = ImageResource::fetch(reques t, document->fetcher())) {
118 m_imageSet = StyleFetchedImageSet::create(cachedImage.get(), image.s caleFactor, this); 118 m_imageSet = StyleFetchedImageSet::create(cachedImage.get(), image.s caleFactor, this);
119 m_accessedBestFitImage = true; 119 m_accessedBestFitImage = true;
120 } 120 }
121 } 121 }
122 122
123 return (m_imageSet && m_imageSet->isImageResourceSet()) ? toStyleFetchedImag eSet(m_imageSet) : 0; 123 return (m_imageSet && m_imageSet->isImageResourceSet()) ? toStyleFetchedImag eSet(m_imageSet.get()) : 0;
124 } 124 }
125 125
126 StyleFetchedImageSet* CSSImageSetValue::cachedImageSet(Document* document, float deviceScaleFactor) 126 StyleFetchedImageSet* CSSImageSetValue::cachedImageSet(Document* document, float deviceScaleFactor)
127 { 127 {
128 return cachedImageSet(document, deviceScaleFactor, ResourceFetcher::defaultR esourceOptions()); 128 return cachedImageSet(document, deviceScaleFactor, ResourceFetcher::defaultR esourceOptions());
129 } 129 }
130 130
131 StyleImage* CSSImageSetValue::cachedOrPendingImageSet(float deviceScaleFactor) 131 StyleImage* CSSImageSetValue::cachedOrPendingImageSet(float deviceScaleFactor)
132 { 132 {
133 if (!m_imageSet) { 133 if (!m_imageSet) {
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 } 170 }
171 171
172 result.append(')'); 172 result.append(')');
173 return result.toString(); 173 return result.toString();
174 } 174 }
175 175
176 bool CSSImageSetValue::hasFailedOrCanceledSubresources() const 176 bool CSSImageSetValue::hasFailedOrCanceledSubresources() const
177 { 177 {
178 if (!m_imageSet || !m_imageSet->isImageResourceSet()) 178 if (!m_imageSet || !m_imageSet->isImageResourceSet())
179 return false; 179 return false;
180 if (Resource* cachedResource = toStyleFetchedImageSet(m_imageSet)->cachedIma ge()) 180 if (Resource* cachedResource = toStyleFetchedImageSet(m_imageSet.get())->cac hedImage())
181 return cachedResource->loadFailedOrCanceled(); 181 return cachedResource->loadFailedOrCanceled();
182 return true; 182 return true;
183 } 183 }
184 184
185 DEFINE_TRACE_AFTER_DISPATCH(CSSImageSetValue)
186 {
187 visitor->trace(m_imageSet);
188 CSSValueList::traceAfterDispatch(visitor);
189 }
190
191 } // namespace blink 185 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/css/CSSImageSetValue.h ('k') | Source/core/css/CSSImageValue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698