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 29 matching lines...) Expand all Loading... |
40 | 40 |
41 class StyleFetchedImageSet final : public StyleImage, private ImageResourceClien
t { | 41 class StyleFetchedImageSet final : public StyleImage, private ImageResourceClien
t { |
42 WTF_MAKE_FAST_ALLOCATED(StyleFetchedImageSet); | 42 WTF_MAKE_FAST_ALLOCATED(StyleFetchedImageSet); |
43 public: | 43 public: |
44 static PassRefPtr<StyleFetchedImageSet> create(ImageResource* image, float i
mageScaleFactor, CSSImageSetValue* value) | 44 static PassRefPtr<StyleFetchedImageSet> create(ImageResource* image, float i
mageScaleFactor, CSSImageSetValue* value) |
45 { | 45 { |
46 return adoptRef(new StyleFetchedImageSet(image, imageScaleFactor, value)
); | 46 return adoptRef(new StyleFetchedImageSet(image, imageScaleFactor, value)
); |
47 } | 47 } |
48 virtual ~StyleFetchedImageSet(); | 48 virtual ~StyleFetchedImageSet(); |
49 | 49 |
50 virtual PassRefPtrWillBeRawPtr<CSSValue> cssValue() const override; | 50 virtual NullableCSSValue cssValue() const override; |
51 | 51 |
52 // FIXME: This is used by StyleImage for equals comparison, but this impleme
ntation | 52 // FIXME: This is used by StyleImage for equals comparison, but this impleme
ntation |
53 // only looks at the image from the set that we have loaded. I'm not sure if
that is | 53 // only looks at the image from the set that we have loaded. I'm not sure if
that is |
54 // meaningful enough or not. | 54 // meaningful enough or not. |
55 virtual WrappedImagePtr data() const override { return m_bestFitImage.get();
} | 55 virtual WrappedImagePtr data() const override { return m_bestFitImage.get();
} |
56 | 56 |
57 void clearImageSetValue() { m_imageSetValue = 0; } | 57 void clearImageSetValue() { m_imageSetValue = 0; } |
58 | 58 |
59 virtual bool canRender(const LayoutObject&, float multiplier) const override
; | 59 virtual bool canRender(const LayoutObject&, float multiplier) const override
; |
60 virtual bool isLoaded() const override; | 60 virtual bool isLoaded() const override; |
(...skipping 22 matching lines...) Expand all Loading... |
83 // caller since it should not be needed once both of the objects are on the
heap and | 83 // caller since it should not be needed once both of the objects are on the
heap and |
84 // oilpan is enabled. | 84 // oilpan is enabled. |
85 CSSImageSetValue* m_imageSetValue; // Not retained; it owns us. | 85 CSSImageSetValue* m_imageSetValue; // Not retained; it owns us. |
86 }; | 86 }; |
87 | 87 |
88 DEFINE_STYLE_IMAGE_TYPE_CASTS(StyleFetchedImageSet, isImageResourceSet()); | 88 DEFINE_STYLE_IMAGE_TYPE_CASTS(StyleFetchedImageSet, isImageResourceSet()); |
89 | 89 |
90 } // namespace blink | 90 } // namespace blink |
91 | 91 |
92 #endif // StyleFetchedImageSet_h | 92 #endif // StyleFetchedImageSet_h |
OLD | NEW |