| OLD | NEW |
| 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 21 matching lines...) Expand all Loading... |
| 32 | 32 |
| 33 namespace blink { | 33 namespace blink { |
| 34 | 34 |
| 35 class ImageResource; | 35 class ImageResource; |
| 36 class CSSImageSetValue; | 36 class CSSImageSetValue; |
| 37 | 37 |
| 38 // This class keeps one cached image and has access to a set of alternatives. | 38 // This class keeps one cached image and has access to a set of alternatives. |
| 39 | 39 |
| 40 class StyleFetchedImageSet final : public StyleImage, private ResourceClient { | 40 class StyleFetchedImageSet final : public StyleImage, private ResourceClient { |
| 41 USING_PRE_FINALIZER(StyleFetchedImageSet, dispose); | 41 USING_PRE_FINALIZER(StyleFetchedImageSet, dispose); |
| 42 USING_GARBAGE_COLLECTED_MIXIN(StyleFetchedImageSet); |
| 42 public: | 43 public: |
| 43 static StyleFetchedImageSet* create(ImageResource* image, float imageScaleFa
ctor, CSSImageSetValue* value, const KURL& url) | 44 static StyleFetchedImageSet* create(ImageResource* image, float imageScaleFa
ctor, CSSImageSetValue* value, const KURL& url) |
| 44 { | 45 { |
| 45 return new StyleFetchedImageSet(image, imageScaleFactor, value, url); | 46 return new StyleFetchedImageSet(image, imageScaleFactor, value, url); |
| 46 } | 47 } |
| 47 ~StyleFetchedImageSet() override; | 48 ~StyleFetchedImageSet() override; |
| 48 | 49 |
| 49 CSSValue* cssValue() const override; | 50 CSSValue* cssValue() const override; |
| 50 CSSValue* computedCSSValue() const override; | 51 CSSValue* computedCSSValue() const override; |
| 51 | 52 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 81 | 82 |
| 82 Member<CSSImageSetValue> m_imageSetValue; // Not retained; it owns us. | 83 Member<CSSImageSetValue> m_imageSetValue; // Not retained; it owns us. |
| 83 const KURL m_url; | 84 const KURL m_url; |
| 84 }; | 85 }; |
| 85 | 86 |
| 86 DEFINE_STYLE_IMAGE_TYPE_CASTS(StyleFetchedImageSet, isImageResourceSet()); | 87 DEFINE_STYLE_IMAGE_TYPE_CASTS(StyleFetchedImageSet, isImageResourceSet()); |
| 87 | 88 |
| 88 } // namespace blink | 89 } // namespace blink |
| 89 | 90 |
| 90 #endif // StyleFetchedImageSet_h | 91 #endif // StyleFetchedImageSet_h |
| OLD | NEW |