OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2006 Allan Sandfeld Jensen (kde@carewolf.com) | 4 * (C) 2006 Allan Sandfeld Jensen (kde@carewolf.com) |
5 * (C) 2006 Samuel Weinig (sam.weinig@gmail.com) | 5 * (C) 2006 Samuel Weinig (sam.weinig@gmail.com) |
6 * Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010, 2011 Apple Inc. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010, 2011 Apple Inc. |
7 * All rights reserved. | 7 * All rights reserved. |
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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 // See LayoutImageResource that holds this image. | 47 // See LayoutImageResource that holds this image. |
48 class CORE_EXPORT LayoutImage : public LayoutReplaced { | 48 class CORE_EXPORT LayoutImage : public LayoutReplaced { |
49 public: | 49 public: |
50 // These are the paddings to use when displaying either alt text or an image. | 50 // These are the paddings to use when displaying either alt text or an image. |
51 static const unsigned short paddingWidth = 4; | 51 static const unsigned short paddingWidth = 4; |
52 static const unsigned short paddingHeight = 4; | 52 static const unsigned short paddingHeight = 4; |
53 | 53 |
54 LayoutImage(Element*); | 54 LayoutImage(Element*); |
55 ~LayoutImage() override; | 55 ~LayoutImage() override; |
56 | 56 |
57 static LayoutImage* createAnonymous(Document*); | 57 static LayoutImage* createAnonymous(PseudoElement&); |
58 | 58 |
59 void setImageResource(LayoutImageResource*); | 59 void setImageResource(LayoutImageResource*); |
60 | 60 |
61 LayoutImageResource* imageResource() { return m_imageResource.get(); } | 61 LayoutImageResource* imageResource() { return m_imageResource.get(); } |
62 const LayoutImageResource* imageResource() const { | 62 const LayoutImageResource* imageResource() const { |
63 return m_imageResource.get(); | 63 return m_imageResource.get(); |
64 } | 64 } |
65 ImageResourceContent* cachedImage() const { | 65 ImageResourceContent* cachedImage() const { |
66 return m_imageResource ? m_imageResource->cachedImage() : 0; | 66 return m_imageResource ? m_imageResource->cachedImage() : 0; |
67 } | 67 } |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 // This field stores whether this image is generated with 'content'. | 141 // This field stores whether this image is generated with 'content'. |
142 bool m_isGeneratedContent; | 142 bool m_isGeneratedContent; |
143 float m_imageDevicePixelRatio; | 143 float m_imageDevicePixelRatio; |
144 }; | 144 }; |
145 | 145 |
146 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutImage, isLayoutImage()); | 146 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutImage, isLayoutImage()); |
147 | 147 |
148 } // namespace blink | 148 } // namespace blink |
149 | 149 |
150 #endif // LayoutImage_h | 150 #endif // LayoutImage_h |
OLD | NEW |