| 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 | 51 |
| 52 virtual PassRefPtr<CSSValue> cssValue() const; | 52 virtual PassRefPtr<CSSValue> cssValue() const; |
| 53 | 53 |
| 54 // FIXME: This is used by StyleImage for equals comparison, but this impleme
ntation | 54 // FIXME: This is used by StyleImage for equals comparison, but this impleme
ntation |
| 55 // only looks at the image from the set that we have loaded. I'm not sure if
that is | 55 // only looks at the image from the set that we have loaded. I'm not sure if
that is |
| 56 // meaningful enough or not. | 56 // meaningful enough or not. |
| 57 virtual WrappedImagePtr data() const { return m_bestFitImage.get(); } | 57 virtual WrappedImagePtr data() const { return m_bestFitImage.get(); } |
| 58 | 58 |
| 59 CachedImage* cachedImage() const { return m_bestFitImage.get(); } | 59 CachedImage* cachedImage() const { return m_bestFitImage.get(); } |
| 60 | 60 |
| 61 void clearImageSetValue() { m_imageSetValue = 0; } |
| 62 |
| 61 virtual bool canRender(const RenderObject*, float multiplier) const; | 63 virtual bool canRender(const RenderObject*, float multiplier) const; |
| 62 virtual bool isLoaded() const; | 64 virtual bool isLoaded() const; |
| 63 virtual bool errorOccurred() const; | 65 virtual bool errorOccurred() const; |
| 64 virtual LayoutSize imageSize(const RenderObject*, float multiplier) const; | 66 virtual LayoutSize imageSize(const RenderObject*, float multiplier) const; |
| 65 virtual bool imageHasRelativeWidth() const; | 67 virtual bool imageHasRelativeWidth() const; |
| 66 virtual bool imageHasRelativeHeight() const; | 68 virtual bool imageHasRelativeHeight() const; |
| 67 virtual void computeIntrinsicDimensions(const RenderObject*, Length& intrins
icWidth, Length& intrinsicHeight, FloatSize& intrinsicRatio); | 69 virtual void computeIntrinsicDimensions(const RenderObject*, Length& intrins
icWidth, Length& intrinsicHeight, FloatSize& intrinsicRatio); |
| 68 virtual bool usesImageContainerSize() const; | 70 virtual bool usesImageContainerSize() const; |
| 69 virtual void setContainerSizeForRenderer(const RenderObject*, const IntSize&
, float); | 71 virtual void setContainerSizeForRenderer(const RenderObject*, const IntSize&
, float); |
| 70 virtual void addClient(RenderObject*); | 72 virtual void addClient(RenderObject*); |
| 71 virtual void removeClient(RenderObject*); | 73 virtual void removeClient(RenderObject*); |
| 72 virtual PassRefPtr<Image> image(RenderObject*, const IntSize&) const; | 74 virtual PassRefPtr<Image> image(RenderObject*, const IntSize&) const; |
| 73 virtual float imageScaleFactor() const { return m_imageScaleFactor; } | 75 virtual float imageScaleFactor() const { return m_imageScaleFactor; } |
| 74 | 76 |
| 75 private: | 77 private: |
| 76 StyleCachedImageSet(CachedImage*, float imageScaleFactor, CSSImageSetValue*)
; | 78 StyleCachedImageSet(CachedImage*, float imageScaleFactor, CSSImageSetValue*)
; |
| 77 | 79 |
| 78 CachedResourceHandle<CachedImage> m_bestFitImage; | 80 CachedResourceHandle<CachedImage> m_bestFitImage; |
| 79 float m_imageScaleFactor; | 81 float m_imageScaleFactor; |
| 80 CSSImageSetValue* m_imageSetValue; // Not retained; it owns us. | 82 CSSImageSetValue* m_imageSetValue; // Not retained; it owns us. |
| 81 }; | 83 }; |
| 82 | 84 |
| 83 } // namespace WebCore | 85 } // namespace WebCore |
| 84 | 86 |
| 85 #endif // ENABLE(CSS_IMAGE_SET) | 87 #endif // ENABLE(CSS_IMAGE_SET) |
| 86 | 88 |
| 87 #endif // StyleCachedImageSet_h | 89 #endif // StyleCachedImageSet_h |
| OLD | NEW |