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. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010 Apple Inc. |
7 * All rights reserved. | 7 * All rights reserved. |
8 * Copyright (C) 2010 Patrick Gansterer <paroga@paroga.com> | 8 * Copyright (C) 2010 Patrick Gansterer <paroga@paroga.com> |
9 * | 9 * |
10 * This library is free software; you can redistribute it and/or | 10 * This library is free software; you can redistribute it and/or |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 virtual void Initialize(LayoutObject*); | 46 virtual void Initialize(LayoutObject*); |
47 virtual void Shutdown(); | 47 virtual void Shutdown(); |
48 | 48 |
49 void SetImageResource(ImageResourceContent*); | 49 void SetImageResource(ImageResourceContent*); |
50 ImageResourceContent* CachedImage() const { return cached_image_.Get(); } | 50 ImageResourceContent* CachedImage() const { return cached_image_.Get(); } |
51 virtual bool HasImage() const { return cached_image_; } | 51 virtual bool HasImage() const { return cached_image_; } |
52 | 52 |
53 void ResetAnimation(); | 53 void ResetAnimation(); |
54 bool MaybeAnimated() const; | 54 bool MaybeAnimated() const; |
55 | 55 |
56 virtual PassRefPtr<Image> GetImage(const IntSize&, float) const; | 56 virtual PassRefPtr<Image> GetImage(const IntSize&) const; |
57 virtual bool ErrorOccurred() const { | 57 virtual bool ErrorOccurred() const { |
58 return cached_image_ && cached_image_->ErrorOccurred(); | 58 return cached_image_ && cached_image_->ErrorOccurred(); |
59 } | 59 } |
60 | 60 |
61 virtual bool ImageHasRelativeSize() const { | 61 virtual bool ImageHasRelativeSize() const { |
62 return cached_image_ ? cached_image_->ImageHasRelativeSize() : false; | 62 return cached_image_ ? cached_image_->ImageHasRelativeSize() : false; |
63 } | 63 } |
64 | 64 |
65 virtual LayoutSize ImageSize(float multiplier) const; | 65 virtual LayoutSize ImageSize(float multiplier) const; |
66 | 66 |
67 virtual WrappedImagePtr ImagePtr() const { return cached_image_.Get(); } | 67 virtual WrappedImagePtr ImagePtr() const { return cached_image_.Get(); } |
68 | 68 |
69 DEFINE_INLINE_VIRTUAL_TRACE() { visitor->Trace(cached_image_); } | 69 DEFINE_INLINE_VIRTUAL_TRACE() { visitor->Trace(cached_image_); } |
70 | 70 |
71 protected: | 71 protected: |
72 LayoutImageResource(); | 72 LayoutImageResource(); |
73 LayoutObject* layout_object_; | 73 LayoutObject* layout_object_; |
74 Member<ImageResourceContent> cached_image_; | 74 Member<ImageResourceContent> cached_image_; |
75 }; | 75 }; |
76 | 76 |
77 } // namespace blink | 77 } // namespace blink |
78 | 78 |
79 #endif // LayoutImage_h | 79 #endif // LayoutImage_h |
OLD | NEW |