OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006 Alexander Kellett <lypanov@kde.org> | 2 * Copyright (C) 2006 Alexander Kellett <lypanov@kde.org> |
3 * Copyright (C) 2006, 2009 Apple Inc. All rights reserved. | 3 * Copyright (C) 2006, 2009 Apple Inc. All rights reserved. |
4 * Copyright (C) 2007 Rob Buis <buis@kde.org> | 4 * Copyright (C) 2007 Rob Buis <buis@kde.org> |
5 * Copyright (C) 2009 Google, Inc. | 5 * Copyright (C) 2009 Google, Inc. |
6 * Copyright (C) 2010 Patrick Gansterer <paroga@paroga.com> | 6 * Copyright (C) 2010 Patrick Gansterer <paroga@paroga.com> |
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 19 matching lines...) Expand all Loading... |
30 | 30 |
31 class RenderImageResource; | 31 class RenderImageResource; |
32 class SVGImageElement; | 32 class SVGImageElement; |
33 | 33 |
34 class RenderSVGImage FINAL : public RenderSVGModelObject { | 34 class RenderSVGImage FINAL : public RenderSVGModelObject { |
35 public: | 35 public: |
36 explicit RenderSVGImage(SVGImageElement*); | 36 explicit RenderSVGImage(SVGImageElement*); |
37 virtual ~RenderSVGImage(); | 37 virtual ~RenderSVGImage(); |
38 | 38 |
39 bool updateImageViewport(); | 39 bool updateImageViewport(); |
40 virtual void setNeedsBoundariesUpdate() { m_needsBoundariesUpdate = true; } | 40 virtual void setNeedsBoundariesUpdate() OVERRIDE { m_needsBoundariesUpdate =
true; } |
41 virtual void setNeedsTransformUpdate() { m_needsTransformUpdate = true; } | 41 virtual void setNeedsTransformUpdate() OVERRIDE { m_needsTransformUpdate = t
rue; } |
42 | 42 |
43 RenderImageResource* imageResource() { return m_imageResource.get(); } | 43 RenderImageResource* imageResource() { return m_imageResource.get(); } |
44 | 44 |
45 // Note: Assumes the PaintInfo context has had all local transforms applied. | 45 // Note: Assumes the PaintInfo context has had all local transforms applied. |
46 void paintForeground(PaintInfo&); | 46 void paintForeground(PaintInfo&); |
47 | 47 |
48 private: | 48 private: |
49 virtual const char* renderName() const OVERRIDE FINAL { return "RenderSVGIma
ge"; } | 49 virtual const char* renderName() const OVERRIDE { return "RenderSVGImage"; } |
50 virtual bool isSVGImage() const OVERRIDE FINAL { return true; } | 50 virtual bool isSVGImage() const OVERRIDE { return true; } |
51 | 51 |
52 virtual const AffineTransform& localToParentTransform() const { return m_loc
alTransform; } | 52 virtual const AffineTransform& localToParentTransform() const OVERRIDE { ret
urn m_localTransform; } |
53 | 53 |
54 virtual FloatRect objectBoundingBox() const { return m_objectBoundingBox; } | 54 virtual FloatRect objectBoundingBox() const { return m_objectBoundingBox; } |
55 virtual FloatRect strokeBoundingBox() const { return m_objectBoundingBox; } | 55 virtual FloatRect strokeBoundingBox() const { return m_objectBoundingBox; } |
56 virtual FloatRect repaintRectInLocalCoordinates() const { return m_repaintBo
undingBox; } | 56 virtual FloatRect repaintRectInLocalCoordinates() const OVERRIDE { return m_
repaintBoundingBox; } |
57 | 57 |
58 virtual void addFocusRingRects(Vector<IntRect>&, const LayoutPoint& addition
alOffset, const RenderLayerModelObject* paintContainer = 0) OVERRIDE; | 58 virtual void addFocusRingRects(Vector<IntRect>&, const LayoutPoint& addition
alOffset, const RenderLayerModelObject* paintContainer = 0) OVERRIDE; |
59 | 59 |
60 virtual void imageChanged(WrappedImagePtr, const IntRect* = 0); | 60 virtual void imageChanged(WrappedImagePtr, const IntRect* = 0) OVERRIDE; |
61 | 61 |
62 virtual void layout(); | 62 virtual void layout() OVERRIDE; |
63 virtual void paint(PaintInfo&, const LayoutPoint&); | 63 virtual void paint(PaintInfo&, const LayoutPoint&) OVERRIDE; |
64 | 64 |
65 void invalidateBufferedForeground(); | 65 void invalidateBufferedForeground(); |
66 | 66 |
67 virtual bool nodeAtFloatPoint(const HitTestRequest&, HitTestResult&, const F
loatPoint& pointInParent, HitTestAction); | 67 virtual bool nodeAtFloatPoint(const HitTestRequest&, HitTestResult&, const F
loatPoint& pointInParent, HitTestAction) OVERRIDE; |
68 | 68 |
69 virtual AffineTransform localTransform() const { return m_localTransform; } | 69 virtual AffineTransform localTransform() const OVERRIDE { return m_localTran
sform; } |
70 | 70 |
71 bool m_needsBoundariesUpdate : 1; | 71 bool m_needsBoundariesUpdate : 1; |
72 bool m_needsTransformUpdate : 1; | 72 bool m_needsTransformUpdate : 1; |
73 AffineTransform m_localTransform; | 73 AffineTransform m_localTransform; |
74 FloatRect m_objectBoundingBox; | 74 FloatRect m_objectBoundingBox; |
75 FloatRect m_repaintBoundingBox; | 75 FloatRect m_repaintBoundingBox; |
76 OwnPtr<RenderImageResource> m_imageResource; | 76 OwnPtr<RenderImageResource> m_imageResource; |
77 | 77 |
78 OwnPtr<ImageBuffer> m_bufferedForeground; | 78 OwnPtr<ImageBuffer> m_bufferedForeground; |
79 }; | 79 }; |
80 | 80 |
81 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderSVGImage, isSVGImage()); | 81 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderSVGImage, isSVGImage()); |
82 | 82 |
83 } // namespace WebCore | 83 } // namespace WebCore |
84 | 84 |
85 #endif // RenderSVGImage_h | 85 #endif // RenderSVGImage_h |
OLD | NEW |