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

Side by Side Diff: sky/engine/core/css/CSSImageSetValue.cpp

Issue 799113003: Remove hasFailedOrCanceledSubresources. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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
« no previous file with comments | « sky/engine/core/css/CSSImageSetValue.h ('k') | sky/engine/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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 // For now 'x' is hard-coded in the parser, so we hard-code it here too. 157 // For now 'x' is hard-coded in the parser, so we hard-code it here too.
158 result.append('x'); 158 result.append('x');
159 159
160 ++i; 160 ++i;
161 } 161 }
162 162
163 result.append(')'); 163 result.append(')');
164 return result.toString(); 164 return result.toString();
165 } 165 }
166 166
167 bool CSSImageSetValue::hasFailedOrCanceledSubresources() const
168 {
169 if (!m_imageSet || !m_imageSet->isImageResourceSet())
170 return false;
171 if (Resource* cachedResource = toStyleFetchedImageSet(m_imageSet)->cachedIma ge())
172 return cachedResource->loadFailedOrCanceled();
173 return true;
174 }
175
176 CSSImageSetValue::CSSImageSetValue(const CSSImageSetValue& cloneFrom) 167 CSSImageSetValue::CSSImageSetValue(const CSSImageSetValue& cloneFrom)
177 : CSSValueList(cloneFrom) 168 : CSSValueList(cloneFrom)
178 , m_accessedBestFitImage(false) 169 , m_accessedBestFitImage(false)
179 , m_scaleFactor(1) 170 , m_scaleFactor(1)
180 { 171 {
181 // Non-CSSValueList data is not accessible through CSS OM, no need to clone. 172 // Non-CSSValueList data is not accessible through CSS OM, no need to clone.
182 } 173 }
183 174
184 PassRefPtr<CSSImageSetValue> CSSImageSetValue::cloneForCSSOM() const 175 PassRefPtr<CSSImageSetValue> CSSImageSetValue::cloneForCSSOM() const
185 { 176 {
186 return adoptRef(new CSSImageSetValue(*this)); 177 return adoptRef(new CSSImageSetValue(*this));
187 } 178 }
188 179
189 } // namespace blink 180 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/core/css/CSSImageSetValue.h ('k') | sky/engine/core/css/CSSImageValue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698