OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll <knoll@kde.org> | 2 * Copyright (C) 1999 Lars Knoll <knoll@kde.org> |
3 * Copyright (C) 1999 Antti Koivisto <koivisto@kde.org> | 3 * Copyright (C) 1999 Antti Koivisto <koivisto@kde.org> |
4 * Copyright (C) 2006 Allan Sandfeld Jensen <kde@carewolf.com> | 4 * Copyright (C) 2006 Allan Sandfeld Jensen <kde@carewolf.com> |
5 * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com> | 5 * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com> |
6 * Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010 Apple Inc. All rights reserv
ed. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010 Apple Inc. All rights reserv
ed. |
7 * Copyright (C) 2010 Patrick Gansterer <paroga@paroga.com> | 7 * Copyright (C) 2010 Patrick Gansterer <paroga@paroga.com> |
8 * | 8 * |
9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 | 53 |
54 void resetAnimation(); | 54 void resetAnimation(); |
55 | 55 |
56 virtual PassRefPtr<Image> image(int /* width */ = 0, int /* height */ = 0) c
onst | 56 virtual PassRefPtr<Image> image(int /* width */ = 0, int /* height */ = 0) c
onst |
57 { | 57 { |
58 return m_cachedImage ? m_cachedImage->imageForRenderer(m_renderer) : Ima
ge::nullImage(); | 58 return m_cachedImage ? m_cachedImage->imageForRenderer(m_renderer) : Ima
ge::nullImage(); |
59 } | 59 } |
60 virtual bool errorOccurred() const { return m_cachedImage && m_cachedImage->
errorOccurred(); } | 60 virtual bool errorOccurred() const { return m_cachedImage && m_cachedImage->
errorOccurred(); } |
61 | 61 |
62 virtual void setContainerSizeForRenderer(const IntSize&); | 62 virtual void setContainerSizeForRenderer(const IntSize&); |
63 virtual bool usesImageContainerSize() const { return m_cachedImage ? m_cache
dImage->usesImageContainerSize() : false; } | |
64 virtual bool imageHasRelativeWidth() const { return m_cachedImage ? m_cached
Image->imageHasRelativeWidth() : false; } | 63 virtual bool imageHasRelativeWidth() const { return m_cachedImage ? m_cached
Image->imageHasRelativeWidth() : false; } |
65 virtual bool imageHasRelativeHeight() const { return m_cachedImage ? m_cache
dImage->imageHasRelativeHeight() : false; } | 64 virtual bool imageHasRelativeHeight() const { return m_cachedImage ? m_cache
dImage->imageHasRelativeHeight() : false; } |
66 | 65 |
67 virtual LayoutSize imageSize(float multiplier) const { return getImageSize(m
ultiplier, ImageResource::NormalSize); } | 66 virtual LayoutSize imageSize(float multiplier) const { return getImageSize(m
ultiplier, ImageResource::NormalSize); } |
68 virtual LayoutSize intrinsicSize(float multiplier) const { return getImageSi
ze(multiplier, ImageResource::IntrinsicSize); } | 67 virtual LayoutSize intrinsicSize(float multiplier) const { return getImageSi
ze(multiplier, ImageResource::IntrinsicSize); } |
69 | 68 |
70 virtual WrappedImagePtr imagePtr() const { return m_cachedImage.get(); } | 69 virtual WrappedImagePtr imagePtr() const { return m_cachedImage.get(); } |
71 | 70 |
72 protected: | 71 protected: |
73 RenderImageResource(); | 72 RenderImageResource(); |
74 RenderObject* m_renderer; | 73 RenderObject* m_renderer; |
75 ResourcePtr<ImageResource> m_cachedImage; | 74 ResourcePtr<ImageResource> m_cachedImage; |
76 | 75 |
77 private: | 76 private: |
78 LayoutSize getImageSize(float multiplier, ImageResource::SizeType) const; | 77 LayoutSize getImageSize(float multiplier, ImageResource::SizeType) const; |
79 }; | 78 }; |
80 | 79 |
81 } // namespace blink | 80 } // namespace blink |
82 | 81 |
83 #endif // RenderImage_h | 82 #endif // RenderImage_h |
OLD | NEW |