| 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 28 matching lines...) Expand all Loading... |
| 39 ~LayoutImageResourceStyleImage() override; | 39 ~LayoutImageResourceStyleImage() override; |
| 40 | 40 |
| 41 static PassOwnPtrWillBeRawPtr<LayoutImageResource> create(StyleImage* styleI
mage) | 41 static PassOwnPtrWillBeRawPtr<LayoutImageResource> create(StyleImage* styleI
mage) |
| 42 { | 42 { |
| 43 return adoptPtrWillBeNoop(new LayoutImageResourceStyleImage(styleImage))
; | 43 return adoptPtrWillBeNoop(new LayoutImageResourceStyleImage(styleImage))
; |
| 44 } | 44 } |
| 45 void initialize(LayoutObject*) override; | 45 void initialize(LayoutObject*) override; |
| 46 void shutdown() override; | 46 void shutdown() override; |
| 47 | 47 |
| 48 bool hasImage() const override { return true; } | 48 bool hasImage() const override { return true; } |
| 49 PassRefPtr<Image> image(int width = 0, int height = 0) const override; | 49 PassRefPtr<Image> image(const IntSize&) const override; |
| 50 bool errorOccurred() const override { return m_styleImage->errorOccurred();
} | 50 bool errorOccurred() const override { return m_styleImage->errorOccurred();
} |
| 51 | 51 |
| 52 void setContainerSizeForLayoutObject(const IntSize&) override; | 52 void setContainerSizeForLayoutObject(const IntSize&) override; |
| 53 bool imageHasRelativeWidth() const override { return m_styleImage->imageHasR
elativeWidth(); } | 53 bool imageHasRelativeWidth() const override { return m_styleImage->imageHasR
elativeWidth(); } |
| 54 bool imageHasRelativeHeight() const override { return m_styleImage->imageHas
RelativeHeight(); } | 54 bool imageHasRelativeHeight() const override { return m_styleImage->imageHas
RelativeHeight(); } |
| 55 | 55 |
| 56 LayoutSize imageSize(float multiplier) const override { return m_styleImage-
>imageSize(m_layoutObject, multiplier); } | 56 LayoutSize imageSize(float multiplier) const override { return m_styleImage-
>imageSize(m_layoutObject, multiplier); } |
| 57 LayoutSize intrinsicSize(float multiplier) const override { return m_styleIm
age->imageSize(m_layoutObject, multiplier); } | 57 LayoutSize intrinsicSize(float multiplier) const override { return m_styleIm
age->imageSize(m_layoutObject, multiplier); } |
| 58 | 58 |
| 59 WrappedImagePtr imagePtr() const override { return m_styleImage->data(); } | 59 WrappedImagePtr imagePtr() const override { return m_styleImage->data(); } |
| 60 | 60 |
| 61 DECLARE_VIRTUAL_TRACE(); | 61 DECLARE_VIRTUAL_TRACE(); |
| 62 | 62 |
| 63 private: | 63 private: |
| 64 explicit LayoutImageResourceStyleImage(StyleImage*); | 64 explicit LayoutImageResourceStyleImage(StyleImage*); |
| 65 RefPtrWillBeMember<StyleImage> m_styleImage; | 65 RefPtrWillBeMember<StyleImage> m_styleImage; |
| 66 }; | 66 }; |
| 67 | 67 |
| 68 } // namespace blink | 68 } // namespace blink |
| 69 | 69 |
| 70 #endif // LayoutImageStyleImage_h | 70 #endif // LayoutImageStyleImage_h |
| OLD | NEW |