| OLD | NEW |
| 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 Loading... |
| 59 | 59 |
| 60 return false; | 60 return false; |
| 61 } | 61 } |
| 62 | 62 |
| 63 static ImageResourceContent* CachedImageForCSSValue(CSSValue* value, | 63 static ImageResourceContent* CachedImageForCSSValue(CSSValue* value, |
| 64 const Document& document) { | 64 const Document& document) { |
| 65 if (!value) | 65 if (!value) |
| 66 return nullptr; | 66 return nullptr; |
| 67 | 67 |
| 68 if (value->IsImageValue()) { | 68 if (value->IsImageValue()) { |
| 69 StyleImage* style_image_resource = | 69 StyleImage* style_image_resource = ToCSSImageValue(value)->CacheImage( |
| 70 ToCSSImageValue(value)->CacheImage(document); | 70 document, FetchParameters::kAllowPlaceholder); |
| 71 if (!style_image_resource) | 71 if (!style_image_resource) |
| 72 return nullptr; | 72 return nullptr; |
| 73 | 73 |
| 74 return style_image_resource->CachedImage(); | 74 return style_image_resource->CachedImage(); |
| 75 } | 75 } |
| 76 | 76 |
| 77 if (value->IsImageGeneratorValue()) { | 77 if (value->IsImageGeneratorValue()) { |
| 78 ToCSSImageGeneratorValue(value)->LoadSubimages(document); | 78 ToCSSImageGeneratorValue(value)->LoadSubimages(document); |
| 79 // FIXME: Handle CSSImageGeneratorValue (and thus cross-fades with gradients | 79 // FIXME: Handle CSSImageGeneratorValue (and thus cross-fades with gradients |
| 80 // and canvas). | 80 // and canvas). |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 296 visitor->Trace(from_value_); | 296 visitor->Trace(from_value_); |
| 297 visitor->Trace(to_value_); | 297 visitor->Trace(to_value_); |
| 298 visitor->Trace(percentage_value_); | 298 visitor->Trace(percentage_value_); |
| 299 visitor->Trace(cached_from_image_); | 299 visitor->Trace(cached_from_image_); |
| 300 visitor->Trace(cached_to_image_); | 300 visitor->Trace(cached_to_image_); |
| 301 visitor->Trace(crossfade_subimage_observer_); | 301 visitor->Trace(crossfade_subimage_observer_); |
| 302 CSSImageGeneratorValue::TraceAfterDispatch(visitor); | 302 CSSImageGeneratorValue::TraceAfterDispatch(visitor); |
| 303 } | 303 } |
| 304 | 304 |
| 305 } // namespace blink | 305 } // namespace blink |
| OLD | NEW |