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

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

Issue 1865603004: Fix crash when setting invalid URL on content (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: pants Created 4 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) 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2011 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 59
60 return false; 60 return false;
61 } 61 }
62 62
63 static ImageResource* cachedImageForCSSValue(CSSValue* value, Document* document ) 63 static ImageResource* cachedImageForCSSValue(CSSValue* value, Document* document )
64 { 64 {
65 if (!value) 65 if (!value)
66 return nullptr; 66 return nullptr;
67 67
68 if (value->isImageValue()) { 68 if (value->isImageValue()) {
69 StyleFetchedImage* styleImageResource = toCSSImageValue(value)->cacheIma ge(document); 69 StyleImage* styleImageResource = toCSSImageValue(value)->cacheImage(docu ment);
70 if (!styleImageResource) 70 if (!styleImageResource)
71 return nullptr; 71 return nullptr;
72 72
73 return styleImageResource->cachedImage(); 73 return styleImageResource->cachedImage();
74 } 74 }
75 75
76 if (value->isImageGeneratorValue()) { 76 if (value->isImageGeneratorValue()) {
77 toCSSImageGeneratorValue(value)->loadSubimages(document); 77 toCSSImageGeneratorValue(value)->loadSubimages(document);
78 // FIXME: Handle CSSImageGeneratorValue (and thus cross-fades with gradi ents and canvas). 78 // FIXME: Handle CSSImageGeneratorValue (and thus cross-fades with gradi ents and canvas).
79 return nullptr; 79 return nullptr;
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 visitor->trace(m_fromValue); 281 visitor->trace(m_fromValue);
282 visitor->trace(m_toValue); 282 visitor->trace(m_toValue);
283 visitor->trace(m_percentageValue); 283 visitor->trace(m_percentageValue);
284 visitor->trace(m_cachedFromImage); 284 visitor->trace(m_cachedFromImage);
285 visitor->trace(m_cachedToImage); 285 visitor->trace(m_cachedToImage);
286 visitor->trace(m_crossfadeSubimageObserver); 286 visitor->trace(m_crossfadeSubimageObserver);
287 CSSImageGeneratorValue::traceAfterDispatch(visitor); 287 CSSImageGeneratorValue::traceAfterDispatch(visitor);
288 } 288 }
289 289
290 } // namespace blink 290 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698