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 13 matching lines...) Expand all Loading... |
24 #ifndef RenderSVGImage_h | 24 #ifndef RenderSVGImage_h |
25 #define RenderSVGImage_h | 25 #define RenderSVGImage_h |
26 | 26 |
27 #include "core/rendering/svg/RenderSVGModelObject.h" | 27 #include "core/rendering/svg/RenderSVGModelObject.h" |
28 | 28 |
29 namespace blink { | 29 namespace blink { |
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 virtual void destroy() OVERRIDE; | 38 virtual void destroy() override; |
39 | 39 |
40 bool updateImageViewport(); | 40 bool updateImageViewport(); |
41 virtual void setNeedsBoundariesUpdate() OVERRIDE { m_needsBoundariesUpdate =
true; } | 41 virtual void setNeedsBoundariesUpdate() override { m_needsBoundariesUpdate =
true; } |
42 virtual void setNeedsTransformUpdate() OVERRIDE { m_needsTransformUpdate = t
rue; } | 42 virtual void setNeedsTransformUpdate() override { m_needsTransformUpdate = t
rue; } |
43 | 43 |
44 RenderImageResource* imageResource() { return m_imageResource.get(); } | 44 RenderImageResource* imageResource() { return m_imageResource.get(); } |
45 | 45 |
46 virtual const AffineTransform& localToParentTransform() const OVERRIDE { ret
urn m_localTransform; } | 46 virtual const AffineTransform& localToParentTransform() const override { ret
urn m_localTransform; } |
47 OwnPtr<ImageBuffer>& bufferedForeground() { return m_bufferedForeground; } | 47 OwnPtr<ImageBuffer>& bufferedForeground() { return m_bufferedForeground; } |
48 | 48 |
49 virtual FloatRect paintInvalidationRectInLocalCoordinates() const OVERRIDE {
return m_paintInvalidationBoundingBox; } | 49 virtual FloatRect paintInvalidationRectInLocalCoordinates() const override {
return m_paintInvalidationBoundingBox; } |
50 virtual FloatRect objectBoundingBox() const OVERRIDE { return m_objectBoundi
ngBox; } | 50 virtual FloatRect objectBoundingBox() const override { return m_objectBoundi
ngBox; } |
51 | 51 |
52 private: | 52 private: |
53 virtual const char* renderName() const OVERRIDE { return "RenderSVGImage"; } | 53 virtual const char* renderName() const override { return "RenderSVGImage"; } |
54 virtual bool isSVGImage() const OVERRIDE { return true; } | 54 virtual bool isSVGImage() const override { return true; } |
55 | 55 |
56 virtual FloatRect strokeBoundingBox() const OVERRIDE { return m_objectBoundi
ngBox; } | 56 virtual FloatRect strokeBoundingBox() const override { return m_objectBoundi
ngBox; } |
57 | 57 |
58 virtual void addFocusRingRects(Vector<LayoutRect>&, const LayoutPoint& addit
ionalOffset, const RenderLayerModelObject* paintContainer) const OVERRIDE; | 58 virtual void addFocusRingRects(Vector<LayoutRect>&, const LayoutPoint& addit
ionalOffset, const RenderLayerModelObject* paintContainer) const override; |
59 | 59 |
60 virtual void imageChanged(WrappedImagePtr, const IntRect* = 0) OVERRIDE; | 60 virtual void imageChanged(WrappedImagePtr, const IntRect* = 0) override; |
61 | 61 |
62 virtual void layout() OVERRIDE; | 62 virtual void layout() override; |
63 virtual void paint(PaintInfo&, const LayoutPoint&) OVERRIDE; | 63 virtual void paint(PaintInfo&, const LayoutPoint&) override; |
64 | 64 |
65 bool forceNonUniformScaling(SVGImageElement*) const; | 65 bool forceNonUniformScaling(SVGImageElement*) const; |
66 void invalidateBufferedForeground(); | 66 void invalidateBufferedForeground(); |
67 | 67 |
68 virtual bool nodeAtFloatPoint(const HitTestRequest&, HitTestResult&, const F
loatPoint& pointInParent, HitTestAction) OVERRIDE; | 68 virtual bool nodeAtFloatPoint(const HitTestRequest&, HitTestResult&, const F
loatPoint& pointInParent, HitTestAction) override; |
69 | 69 |
70 virtual AffineTransform localTransform() const OVERRIDE { return m_localTran
sform; } | 70 virtual AffineTransform localTransform() const override { return m_localTran
sform; } |
71 | 71 |
72 bool m_needsBoundariesUpdate : 1; | 72 bool m_needsBoundariesUpdate : 1; |
73 bool m_needsTransformUpdate : 1; | 73 bool m_needsTransformUpdate : 1; |
74 AffineTransform m_localTransform; | 74 AffineTransform m_localTransform; |
75 FloatRect m_objectBoundingBox; | 75 FloatRect m_objectBoundingBox; |
76 FloatRect m_paintInvalidationBoundingBox; | 76 FloatRect m_paintInvalidationBoundingBox; |
77 OwnPtr<RenderImageResource> m_imageResource; | 77 OwnPtr<RenderImageResource> m_imageResource; |
78 | 78 |
79 OwnPtr<ImageBuffer> m_bufferedForeground; | 79 OwnPtr<ImageBuffer> m_bufferedForeground; |
80 }; | 80 }; |
81 | 81 |
82 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderSVGImage, isSVGImage()); | 82 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderSVGImage, isSVGImage()); |
83 | 83 |
84 } // namespace blink | 84 } // namespace blink |
85 | 85 |
86 #endif // RenderSVGImage_h | 86 #endif // RenderSVGImage_h |
OLD | NEW |