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

Side by Side Diff: third_party/WebKit/Source/core/css/resolver/ElementStyleResources.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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. 3 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc.
4 * All rights reserved. 4 * All rights reserved.
5 * Copyright (C) 2013 Google Inc. All rights reserved. 5 * Copyright (C) 2013 Google Inc. All rights reserved.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 if (CSSImageGeneratorValue* imageGeneratorValue = 130 if (CSSImageGeneratorValue* imageGeneratorValue =
131 pendingImage->cssImageGeneratorValue()) { 131 pendingImage->cssImageGeneratorValue()) {
132 imageGeneratorValue->loadSubimages(*m_document); 132 imageGeneratorValue->loadSubimages(*m_document);
133 return StyleGeneratedImage::create(*imageGeneratorValue); 133 return StyleGeneratedImage::create(*imageGeneratorValue);
134 } 134 }
135 135
136 if (CSSImageSetValue* imageSetValue = pendingImage->cssImageSetValue()) 136 if (CSSImageSetValue* imageSetValue = pendingImage->cssImageSetValue())
137 return imageSetValue->cacheImage(*m_document, m_deviceScaleFactor, 137 return imageSetValue->cacheImage(*m_document, m_deviceScaleFactor,
138 crossOrigin); 138 crossOrigin);
139 139
140 ASSERT_NOT_REACHED(); 140 NOTREACHED();
141 return nullptr; 141 return nullptr;
142 } 142 }
143 143
144 void ElementStyleResources::loadPendingImages(ComputedStyle* style) { 144 void ElementStyleResources::loadPendingImages(ComputedStyle* style) {
145 // We must loop over the properties and then look at the style to see if 145 // We must loop over the properties and then look at the style to see if
146 // a pending image exists, and only load that image. For example: 146 // a pending image exists, and only load that image. For example:
147 // 147 //
148 // <style> 148 // <style>
149 // div { background-image: url(a.png); } 149 // div { background-image: url(a.png); }
150 // div { background-image: url(b.png); } 150 // div { background-image: url(b.png); }
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 break; 244 break;
245 } 245 }
246 case CSSPropertyShapeOutside: 246 case CSSPropertyShapeOutside:
247 if (style->shapeOutside() && style->shapeOutside()->image() && 247 if (style->shapeOutside() && style->shapeOutside()->image() &&
248 style->shapeOutside()->image()->isPendingImage()) 248 style->shapeOutside()->image()->isPendingImage())
249 style->shapeOutside()->setImage(loadPendingImage( 249 style->shapeOutside()->setImage(loadPendingImage(
250 style, toStylePendingImage(style->shapeOutside()->image()), 250 style, toStylePendingImage(style->shapeOutside()->image()),
251 CrossOriginAttributeAnonymous)); 251 CrossOriginAttributeAnonymous));
252 break; 252 break;
253 default: 253 default:
254 ASSERT_NOT_REACHED(); 254 NOTREACHED();
255 } 255 }
256 } 256 }
257 } 257 }
258 258
259 void ElementStyleResources::loadPendingResources(ComputedStyle* computedStyle) { 259 void ElementStyleResources::loadPendingResources(ComputedStyle* computedStyle) {
260 loadPendingImages(computedStyle); 260 loadPendingImages(computedStyle);
261 loadPendingSVGDocuments(computedStyle); 261 loadPendingSVGDocuments(computedStyle);
262 } 262 }
263 263
264 } // namespace blink 264 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698