| 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 18 matching lines...) Expand all Loading... |
| 29 #include "core/CoreExport.h" | 29 #include "core/CoreExport.h" |
| 30 #include "core/css/CSSImageGeneratorValue.h" | 30 #include "core/css/CSSImageGeneratorValue.h" |
| 31 #include "core/css/CSSPrimitiveValue.h" | 31 #include "core/css/CSSPrimitiveValue.h" |
| 32 #include "core/loader/resource/ImageResourceContent.h" | 32 #include "core/loader/resource/ImageResourceContent.h" |
| 33 #include "core/loader/resource/ImageResourceObserver.h" | 33 #include "core/loader/resource/ImageResourceObserver.h" |
| 34 #include "platform/graphics/Image.h" | 34 #include "platform/graphics/Image.h" |
| 35 | 35 |
| 36 namespace blink { | 36 namespace blink { |
| 37 | 37 |
| 38 class CrossfadeSubimageObserverProxy; | 38 class CrossfadeSubimageObserverProxy; |
| 39 class LayoutObject; | |
| 40 | 39 |
| 41 class CORE_EXPORT CSSCrossfadeValue final : public CSSImageGeneratorValue { | 40 class CORE_EXPORT CSSCrossfadeValue final : public CSSImageGeneratorValue { |
| 42 friend class CrossfadeSubimageObserverProxy; | 41 friend class CrossfadeSubimageObserverProxy; |
| 43 USING_PRE_FINALIZER(CSSCrossfadeValue, Dispose); | 42 USING_PRE_FINALIZER(CSSCrossfadeValue, Dispose); |
| 44 | 43 |
| 45 public: | 44 public: |
| 46 static CSSCrossfadeValue* Create(CSSValue* from_value, | 45 static CSSCrossfadeValue* Create(CSSValue* from_value, |
| 47 CSSValue* to_value, | 46 CSSValue* to_value, |
| 48 CSSPrimitiveValue* percentage_value) { | 47 CSSPrimitiveValue* percentage_value) { |
| 49 return new CSSCrossfadeValue(from_value, to_value, percentage_value); | 48 return new CSSCrossfadeValue(from_value, to_value, percentage_value); |
| 50 } | 49 } |
| 51 | 50 |
| 52 ~CSSCrossfadeValue(); | 51 ~CSSCrossfadeValue(); |
| 53 | 52 |
| 54 String CustomCSSText() const; | 53 String CustomCSSText() const; |
| 55 | 54 |
| 56 PassRefPtr<Image> GetImage(const LayoutObject&, const IntSize&); | 55 PassRefPtr<Image> GetImage(const ImageResourceObserver&, |
| 56 const Document&, |
| 57 const ComputedStyle&, |
| 58 const IntSize& container_size); |
| 57 bool IsFixedSize() const { return true; } | 59 bool IsFixedSize() const { return true; } |
| 58 IntSize FixedSize(const Document&, const FloatSize&); | 60 IntSize FixedSize(const Document&, const FloatSize&); |
| 59 | 61 |
| 60 bool IsPending() const; | 62 bool IsPending() const; |
| 61 bool KnownToBeOpaque(const Document&, const ComputedStyle&) const; | 63 bool KnownToBeOpaque(const Document&, const ComputedStyle&) const; |
| 62 | 64 |
| 63 void LoadSubimages(const Document&); | 65 void LoadSubimages(const Document&); |
| 64 | 66 |
| 65 bool HasFailedOrCanceledSubresources() const; | 67 bool HasFailedOrCanceledSubresources() const; |
| 66 | 68 |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 Member<ImageResourceContent> cached_to_image_; | 112 Member<ImageResourceContent> cached_to_image_; |
| 111 | 113 |
| 112 CrossfadeSubimageObserverProxy crossfade_subimage_observer_; | 114 CrossfadeSubimageObserverProxy crossfade_subimage_observer_; |
| 113 }; | 115 }; |
| 114 | 116 |
| 115 DEFINE_CSS_VALUE_TYPE_CASTS(CSSCrossfadeValue, IsCrossfadeValue()); | 117 DEFINE_CSS_VALUE_TYPE_CASTS(CSSCrossfadeValue, IsCrossfadeValue()); |
| 116 | 118 |
| 117 } // namespace blink | 119 } // namespace blink |
| 118 | 120 |
| 119 #endif // CSSCrossfadeValue_h | 121 #endif // CSSCrossfadeValue_h |
| OLD | NEW |