| 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. All rights
reserved. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010, 2011 Apple Inc. All rights
reserved. |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 RenderImageResource* imageResource() { return m_imageResource.get(); } | 43 RenderImageResource* imageResource() { return m_imageResource.get(); } |
| 44 const RenderImageResource* imageResource() const { return m_imageResource.ge
t(); } | 44 const RenderImageResource* imageResource() const { return m_imageResource.ge
t(); } |
| 45 ImageResource* cachedImage() const { return m_imageResource ? m_imageResourc
e->cachedImage() : 0; } | 45 ImageResource* cachedImage() const { return m_imageResource ? m_imageResourc
e->cachedImage() : 0; } |
| 46 | 46 |
| 47 bool setImageSizeForAltText(ImageResource* newImage = 0); | 47 bool setImageSizeForAltText(ImageResource* newImage = 0); |
| 48 | 48 |
| 49 void updateAltText(); | 49 void updateAltText(); |
| 50 | 50 |
| 51 void highQualityRepaintTimerFired(Timer<RenderImage>*); | 51 void highQualityRepaintTimerFired(Timer<RenderImage>*); |
| 52 | 52 |
| 53 void setIsGeneratedContent(bool generated = true) { m_isGeneratedContent = g
enerated; } | |
| 54 | |
| 55 bool isGeneratedContent() const { return m_isGeneratedContent; } | |
| 56 | |
| 57 String altText() const { return m_altText; } | 53 String altText() const { return m_altText; } |
| 58 | 54 |
| 59 inline void setImageDevicePixelRatio(float factor) { m_imageDevicePixelRatio
= factor; } | 55 inline void setImageDevicePixelRatio(float factor) { m_imageDevicePixelRatio
= factor; } |
| 60 float imageDevicePixelRatio() const { return m_imageDevicePixelRatio; } | 56 float imageDevicePixelRatio() const { return m_imageDevicePixelRatio; } |
| 61 | 57 |
| 62 virtual void intrinsicSizeChanged() override | 58 virtual void intrinsicSizeChanged() override |
| 63 { | 59 { |
| 64 if (m_imageResource) | 60 if (m_imageResource) |
| 65 imageChanged(m_imageResource->imagePtr()); | 61 imageChanged(m_imageResource->imagePtr()); |
| 66 } | 62 } |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 void paintInvalidationOrMarkForLayout(bool imageSizeChanged, const IntRect*
= 0); | 94 void paintInvalidationOrMarkForLayout(bool imageSizeChanged, const IntRect*
= 0); |
| 99 void updateIntrinsicSizeIfNeeded(const LayoutSize&); | 95 void updateIntrinsicSizeIfNeeded(const LayoutSize&); |
| 100 // Update the size of the image to be rendered. Object-fit may cause this to
be different from the CSS box's content rect. | 96 // Update the size of the image to be rendered. Object-fit may cause this to
be different from the CSS box's content rect. |
| 101 void updateInnerContentRect(); | 97 void updateInnerContentRect(); |
| 102 | 98 |
| 103 void paintAreaElementFocusRing(PaintInfo&); | 99 void paintAreaElementFocusRing(PaintInfo&); |
| 104 | 100 |
| 105 // Text to display as long as the image isn't available. | 101 // Text to display as long as the image isn't available. |
| 106 String m_altText; | 102 String m_altText; |
| 107 OwnPtr<RenderImageResource> m_imageResource; | 103 OwnPtr<RenderImageResource> m_imageResource; |
| 108 bool m_isGeneratedContent; | |
| 109 float m_imageDevicePixelRatio; | 104 float m_imageDevicePixelRatio; |
| 110 | 105 |
| 111 friend class RenderImageScaleObserver; | 106 friend class RenderImageScaleObserver; |
| 112 }; | 107 }; |
| 113 | 108 |
| 114 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderImage, isRenderImage()); | 109 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderImage, isRenderImage()); |
| 115 | 110 |
| 116 } // namespace blink | 111 } // namespace blink |
| 117 | 112 |
| 118 #endif // RenderImage_h | 113 #endif // RenderImage_h |
| OLD | NEW |