| 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 virtual bool hasImage() const { return m_cachedImage; } | 53 virtual bool hasImage() const { return m_cachedImage; } |
| 54 | 54 |
| 55 void resetAnimation(); | 55 void resetAnimation(); |
| 56 | 56 |
| 57 virtual PassRefPtr<Image> image(int /* width */ = 0, int /* height */ = 0) c
onst | 57 virtual PassRefPtr<Image> image(int /* width */ = 0, int /* height */ = 0) c
onst |
| 58 { | 58 { |
| 59 return m_cachedImage ? m_cachedImage->imageForLayoutObject(m_layoutObjec
t) : Image::nullImage(); | 59 return m_cachedImage ? m_cachedImage->imageForLayoutObject(m_layoutObjec
t) : Image::nullImage(); |
| 60 } | 60 } |
| 61 virtual bool errorOccurred() const { return m_cachedImage && m_cachedImage->
errorOccurred(); } | 61 virtual bool errorOccurred() const { return m_cachedImage && m_cachedImage->
errorOccurred(); } |
| 62 | 62 |
| 63 virtual void setContainerSizeForLayoutObject(const IntSize&); | |
| 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 DEFINE_INLINE_VIRTUAL_TRACE() { } | 71 DEFINE_INLINE_VIRTUAL_TRACE() { } |
| 73 | 72 |
| 74 protected: | 73 protected: |
| 75 LayoutImageResource(); | 74 LayoutImageResource(); |
| 76 LayoutObject* m_layoutObject; | 75 LayoutObject* m_layoutObject; |
| 77 ResourcePtr<ImageResource> m_cachedImage; | 76 ResourcePtr<ImageResource> m_cachedImage; |
| 78 | 77 |
| 79 private: | 78 private: |
| 80 LayoutSize getImageSize(float multiplier, ImageResource::SizeType) const; | 79 LayoutSize getImageSize(float multiplier, ImageResource::SizeType) const; |
| 81 }; | 80 }; |
| 82 | 81 |
| 83 } // namespace blink | 82 } // namespace blink |
| 84 | 83 |
| 85 #endif // LayoutImage_h | 84 #endif // LayoutImage_h |
| OLD | NEW |