| 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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 m_imageDevicePixelRatio = factor; | 79 m_imageDevicePixelRatio = factor; |
| 80 } | 80 } |
| 81 float imageDevicePixelRatio() const { return m_imageDevicePixelRatio; } | 81 float imageDevicePixelRatio() const { return m_imageDevicePixelRatio; } |
| 82 | 82 |
| 83 void intrinsicSizeChanged() override { | 83 void intrinsicSizeChanged() override { |
| 84 if (m_imageResource) | 84 if (m_imageResource) |
| 85 imageChanged(m_imageResource->imagePtr()); | 85 imageChanged(m_imageResource->imagePtr()); |
| 86 } | 86 } |
| 87 | 87 |
| 88 const char* name() const override { return "LayoutImage"; } | 88 const char* name() const override { return "LayoutImage"; } |
| 89 char objectSize() const override { return sizeof(this); } |
| 89 | 90 |
| 90 protected: | 91 protected: |
| 91 bool needsPreferredWidthsRecalculation() const final; | 92 bool needsPreferredWidthsRecalculation() const final; |
| 92 LayoutReplaced* embeddedReplacedContent() const final; | 93 LayoutReplaced* embeddedReplacedContent() const final; |
| 93 void computeIntrinsicSizingInfo(IntrinsicSizingInfo&) const final; | 94 void computeIntrinsicSizingInfo(IntrinsicSizingInfo&) const final; |
| 94 | 95 |
| 95 void imageChanged(WrappedImagePtr, const IntRect* = nullptr) override; | 96 void imageChanged(WrappedImagePtr, const IntRect* = nullptr) override; |
| 96 | 97 |
| 97 void paint(const PaintInfo&, const LayoutPoint&) const final; | 98 void paint(const PaintInfo&, const LayoutPoint&) const final; |
| 98 | 99 |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 // This field stores whether this image is generated with 'content'. | 142 // This field stores whether this image is generated with 'content'. |
| 142 bool m_isGeneratedContent; | 143 bool m_isGeneratedContent; |
| 143 float m_imageDevicePixelRatio; | 144 float m_imageDevicePixelRatio; |
| 144 }; | 145 }; |
| 145 | 146 |
| 146 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutImage, isLayoutImage()); | 147 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutImage, isLayoutImage()); |
| 147 | 148 |
| 148 } // namespace blink | 149 } // namespace blink |
| 149 | 150 |
| 150 #endif // LayoutImage_h | 151 #endif // LayoutImage_h |
| OLD | NEW |