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

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

Issue 2755493004: Replace ASSERT, ASSERT_NOT_REACHED, and RELEASE_ASSERT in core/css/ (Closed)
Patch Set: All windows error are Resolved now. Created 3 years, 8 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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 return image; 86 return image;
87 } 87 }
88 return image; 88 return image;
89 } 89 }
90 90
91 bool CSSImageSetValue::isCachePending(float deviceScaleFactor) const { 91 bool CSSImageSetValue::isCachePending(float deviceScaleFactor) const {
92 return !m_cachedImage || deviceScaleFactor != m_cachedScaleFactor; 92 return !m_cachedImage || deviceScaleFactor != m_cachedScaleFactor;
93 } 93 }
94 94
95 StyleImage* CSSImageSetValue::cachedImage(float deviceScaleFactor) const { 95 StyleImage* CSSImageSetValue::cachedImage(float deviceScaleFactor) const {
96 ASSERT(!isCachePending(deviceScaleFactor)); 96 DCHECK(!isCachePending(deviceScaleFactor));
97 return m_cachedImage.get(); 97 return m_cachedImage.get();
98 } 98 }
99 99
100 StyleImage* CSSImageSetValue::cacheImage( 100 StyleImage* CSSImageSetValue::cacheImage(
101 const Document& document, 101 const Document& document,
102 float deviceScaleFactor, 102 float deviceScaleFactor,
103 CrossOriginAttributeValue crossOrigin) { 103 CrossOriginAttributeValue crossOrigin) {
104 if (!m_imagesInSet.size()) 104 if (!m_imagesInSet.size())
105 fillImageSet(); 105 fillImageSet();
106 106
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 CSSImageSetValue* CSSImageSetValue::valueWithURLsMadeAbsolute() { 178 CSSImageSetValue* CSSImageSetValue::valueWithURLsMadeAbsolute() {
179 CSSImageSetValue* value = CSSImageSetValue::create(); 179 CSSImageSetValue* value = CSSImageSetValue::create();
180 for (auto& item : *this) 180 for (auto& item : *this)
181 item->isImageValue() 181 item->isImageValue()
182 ? value->append(*toCSSImageValue(*item).valueWithURLMadeAbsolute()) 182 ? value->append(*toCSSImageValue(*item).valueWithURLMadeAbsolute())
183 : value->append(*item); 183 : value->append(*item);
184 return value; 184 return value;
185 } 185 }
186 186
187 } // namespace blink 187 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSImageGeneratorValue.cpp ('k') | third_party/WebKit/Source/core/css/CSSImageValue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698