| 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 | 55 |
| 56 void highQualityRepaintTimerFired(Timer<RenderImage>*); | 56 void highQualityRepaintTimerFired(Timer<RenderImage>*); |
| 57 | 57 |
| 58 void setIsGeneratedContent(bool generated = true) { m_isGeneratedContent = g
enerated; } | 58 void setIsGeneratedContent(bool generated = true) { m_isGeneratedContent = g
enerated; } |
| 59 | 59 |
| 60 bool isGeneratedContent() const { return m_isGeneratedContent; } | 60 bool isGeneratedContent() const { return m_isGeneratedContent; } |
| 61 | 61 |
| 62 String altText() const { return m_altText; } | 62 String altText() const { return m_altText; } |
| 63 | 63 |
| 64 protected: | 64 protected: |
| 65 virtual bool needsPreferredWidthsRecalculation() const; | 65 virtual bool needsPreferredWidthsRecalculation() const OVERRIDE FINAL; |
| 66 virtual RenderBox* embeddedContentBox() const; | 66 virtual RenderBox* embeddedContentBox() const OVERRIDE FINAL; |
| 67 virtual void computeIntrinsicRatioInformation(FloatSize& intrinsicSize, doub
le& intrinsicRatio, bool& isPercentageIntrinsicSize) const; | 67 virtual void computeIntrinsicRatioInformation(FloatSize& intrinsicSize, doub
le& intrinsicRatio, bool& isPercentageIntrinsicSize) const OVERRIDE FINAL; |
| 68 | 68 |
| 69 virtual void styleDidChange(StyleDifference, const RenderStyle*); | 69 virtual void styleDidChange(StyleDifference, const RenderStyle*) OVERRIDE FI
NAL; |
| 70 | 70 |
| 71 virtual void imageChanged(WrappedImagePtr, const IntRect* = 0); | 71 virtual void imageChanged(WrappedImagePtr, const IntRect* = 0); |
| 72 | 72 |
| 73 virtual void paintIntoRect(GraphicsContext*, const LayoutRect&); | 73 void paintIntoRect(GraphicsContext*, const LayoutRect&); |
| 74 virtual void paint(PaintInfo&, const LayoutPoint&); | 74 virtual void paint(PaintInfo&, const LayoutPoint&) OVERRIDE FINAL; |
| 75 virtual void layout(); | 75 virtual void layout(); |
| 76 | 76 |
| 77 virtual void intrinsicSizeChanged() | 77 virtual void intrinsicSizeChanged() |
| 78 { | 78 { |
| 79 if (m_imageResource) | 79 if (m_imageResource) |
| 80 imageChanged(m_imageResource->imagePtr()); | 80 imageChanged(m_imageResource->imagePtr()); |
| 81 } | 81 } |
| 82 | 82 |
| 83 private: | 83 private: |
| 84 virtual const char* renderName() const { return "RenderImage"; } | 84 virtual const char* renderName() const { return "RenderImage"; } |
| 85 | 85 |
| 86 virtual bool isImage() const { return true; } | 86 virtual bool isImage() const { return true; } |
| 87 virtual bool isRenderImage() const { return true; } | 87 virtual bool isRenderImage() const OVERRIDE FINAL { return true; } |
| 88 | 88 |
| 89 virtual void paintReplaced(PaintInfo&, const LayoutPoint&); | 89 virtual void paintReplaced(PaintInfo&, const LayoutPoint&); |
| 90 | 90 |
| 91 virtual bool foregroundIsKnownToBeOpaqueInRect(const LayoutRect& localRect,
unsigned maxDepthToTest) const OVERRIDE; | 91 virtual bool foregroundIsKnownToBeOpaqueInRect(const LayoutRect& localRect,
unsigned maxDepthToTest) const OVERRIDE FINAL; |
| 92 virtual bool computeBackgroundIsKnownToBeObscured() OVERRIDE; | 92 virtual bool computeBackgroundIsKnownToBeObscured() OVERRIDE FINAL; |
| 93 | 93 |
| 94 virtual LayoutUnit minimumReplacedHeight() const OVERRIDE; | 94 virtual LayoutUnit minimumReplacedHeight() const OVERRIDE; |
| 95 | 95 |
| 96 virtual void notifyFinished(CachedResource*); | 96 virtual void notifyFinished(CachedResource*) OVERRIDE FINAL; |
| 97 virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTes
tLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAct
ion) OVERRIDE; | 97 virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTes
tLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAct
ion) OVERRIDE FINAL; |
| 98 | 98 |
| 99 virtual bool boxShadowShouldBeAppliedToBackground(BackgroundBleedAvoidance,
InlineFlowBox*) const OVERRIDE; | 99 virtual bool boxShadowShouldBeAppliedToBackground(BackgroundBleedAvoidance,
InlineFlowBox*) const OVERRIDE FINAL; |
| 100 | 100 |
| 101 IntSize imageSizeForError(CachedImage*) const; | 101 IntSize imageSizeForError(CachedImage*) const; |
| 102 void imageDimensionsChanged(bool imageSizeChanged, const IntRect* = 0); | 102 void imageDimensionsChanged(bool imageSizeChanged, const IntRect* = 0); |
| 103 bool updateIntrinsicSizeIfNeeded(const LayoutSize&, bool imageSizeChanged); | 103 bool updateIntrinsicSizeIfNeeded(const LayoutSize&, bool imageSizeChanged); |
| 104 | 104 |
| 105 void paintAreaElementFocusRing(PaintInfo&); | 105 void paintAreaElementFocusRing(PaintInfo&); |
| 106 | 106 |
| 107 // Text to display as long as the image isn't available. | 107 // Text to display as long as the image isn't available. |
| 108 String m_altText; | 108 String m_altText; |
| 109 OwnPtr<RenderImageResource> m_imageResource; | 109 OwnPtr<RenderImageResource> m_imageResource; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 125 ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isRenderImage()); | 125 ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isRenderImage()); |
| 126 return static_cast<const RenderImage*>(object); | 126 return static_cast<const RenderImage*>(object); |
| 127 } | 127 } |
| 128 | 128 |
| 129 // This will catch anyone doing an unnecessary cast. | 129 // This will catch anyone doing an unnecessary cast. |
| 130 void toRenderImage(const RenderImage*); | 130 void toRenderImage(const RenderImage*); |
| 131 | 131 |
| 132 } // namespace WebCore | 132 } // namespace WebCore |
| 133 | 133 |
| 134 #endif // RenderImage_h | 134 #endif // RenderImage_h |
| OLD | NEW |