| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org> |
| 3 * Copyright (C) 2004, 2005 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005 Rob Buis <buis@kde.org> |
| 4 * Copyright (C) 2005 Eric Seidel <eric@webkit.org> | 4 * Copyright (C) 2005 Eric Seidel <eric@webkit.org> |
| 5 * Copyright (C) 2006 Apple Computer, Inc | 5 * Copyright (C) 2006 Apple Computer, Inc |
| 6 * Copyright (C) 2009 Google, Inc. | 6 * Copyright (C) 2009 Google, Inc. |
| 7 * Copyright (C) 2011 Renata Hodovan <reni@webkit.org> | 7 * Copyright (C) 2011 Renata Hodovan <reni@webkit.org> |
| 8 * Copyright (C) 2011 University of Szeged | 8 * Copyright (C) 2011 University of Szeged |
| 9 * | 9 * |
| 10 * This library is free software; you can redistribute it and/or | 10 * This library is free software; you can redistribute it and/or |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 RenderStyle* m_style; | 64 RenderStyle* m_style; |
| 65 }; | 65 }; |
| 66 | 66 |
| 67 class RenderSVGShape : public RenderSVGModelObject { | 67 class RenderSVGShape : public RenderSVGModelObject { |
| 68 public: | 68 public: |
| 69 explicit RenderSVGShape(SVGStyledTransformableElement*); | 69 explicit RenderSVGShape(SVGStyledTransformableElement*); |
| 70 RenderSVGShape(SVGStyledTransformableElement*, Path*, bool); | 70 RenderSVGShape(SVGStyledTransformableElement*, Path*, bool); |
| 71 virtual ~RenderSVGShape(); | 71 virtual ~RenderSVGShape(); |
| 72 | 72 |
| 73 void setNeedsShapeUpdate() { m_needsShapeUpdate = true; } | 73 void setNeedsShapeUpdate() { m_needsShapeUpdate = true; } |
| 74 virtual void setNeedsBoundariesUpdate() { m_needsBoundariesUpdate = true; } | 74 virtual void setNeedsBoundariesUpdate() OVERRIDE FINAL { m_needsBoundariesUp
date = true; } |
| 75 virtual bool needsBoundariesUpdate() OVERRIDE { return m_needsBoundariesUpda
te; } | 75 virtual bool needsBoundariesUpdate() OVERRIDE FINAL { return m_needsBoundari
esUpdate; } |
| 76 virtual void setNeedsTransformUpdate() { m_needsTransformUpdate = true; } | 76 virtual void setNeedsTransformUpdate() OVERRIDE FINAL { m_needsTransformUpda
te = true; } |
| 77 virtual void fillShape(GraphicsContext*) const; | 77 virtual void fillShape(GraphicsContext*) const; |
| 78 virtual void strokeShape(GraphicsContext*) const; | 78 virtual void strokeShape(GraphicsContext*) const; |
| 79 | 79 |
| 80 Path& path() const | 80 Path& path() const |
| 81 { | 81 { |
| 82 ASSERT(m_path); | 82 ASSERT(m_path); |
| 83 return *m_path; | 83 return *m_path; |
| 84 } | 84 } |
| 85 | 85 |
| 86 protected: | 86 protected: |
| (...skipping 10 matching lines...) Expand all Loading... |
| 97 Path* nonScalingStrokePath(const Path*, const AffineTransform&) const; | 97 Path* nonScalingStrokePath(const Path*, const AffineTransform&) const; |
| 98 | 98 |
| 99 FloatRect m_fillBoundingBox; | 99 FloatRect m_fillBoundingBox; |
| 100 FloatRect m_strokeBoundingBox; | 100 FloatRect m_strokeBoundingBox; |
| 101 | 101 |
| 102 private: | 102 private: |
| 103 // Hit-detection separated for the fill and the stroke | 103 // Hit-detection separated for the fill and the stroke |
| 104 bool fillContains(const FloatPoint&, bool requiresFill = true, const WindRul
e fillRule = RULE_NONZERO); | 104 bool fillContains(const FloatPoint&, bool requiresFill = true, const WindRul
e fillRule = RULE_NONZERO); |
| 105 bool strokeContains(const FloatPoint&, bool requiresStroke = true); | 105 bool strokeContains(const FloatPoint&, bool requiresStroke = true); |
| 106 | 106 |
| 107 virtual FloatRect repaintRectInLocalCoordinates() const { return m_repaintBo
undingBox; } | 107 virtual FloatRect repaintRectInLocalCoordinates() const OVERRIDE FINAL { ret
urn m_repaintBoundingBox; } |
| 108 virtual FloatRect repaintRectInLocalCoordinatesExcludingSVGShadow() const OV
ERRIDE { return m_repaintBoundingBoxExcludingShadow; } | 108 virtual FloatRect repaintRectInLocalCoordinatesExcludingSVGShadow() const OV
ERRIDE FINAL { return m_repaintBoundingBoxExcludingShadow; } |
| 109 virtual const AffineTransform& localToParentTransform() const { return m_loc
alTransform; } | 109 virtual const AffineTransform& localToParentTransform() const OVERRIDE FINAL
{ return m_localTransform; } |
| 110 virtual AffineTransform localTransform() const { return m_localTransform; } | 110 virtual AffineTransform localTransform() const OVERRIDE FINAL { return m_loc
alTransform; } |
| 111 | 111 |
| 112 virtual bool isSVGShape() const { return true; } | 112 virtual bool isSVGShape() const OVERRIDE FINAL { return true; } |
| 113 virtual const char* renderName() const { return "RenderSVGShape"; } | 113 virtual const char* renderName() const { return "RenderSVGShape"; } |
| 114 | 114 |
| 115 virtual void layout(); | 115 virtual void layout() OVERRIDE FINAL; |
| 116 virtual void paint(PaintInfo&, const LayoutPoint&); | 116 virtual void paint(PaintInfo&, const LayoutPoint&) OVERRIDE FINAL; |
| 117 virtual void addFocusRingRects(Vector<IntRect>&, const LayoutPoint& addition
alOffset, const RenderLayerModelObject* paintContainer = 0) OVERRIDE; | 117 virtual void addFocusRingRects(Vector<IntRect>&, const LayoutPoint& addition
alOffset, const RenderLayerModelObject* paintContainer = 0) OVERRIDE FINAL; |
| 118 | 118 |
| 119 virtual bool nodeAtFloatPoint(const HitTestRequest&, HitTestResult&, const F
loatPoint& pointInParent, HitTestAction); | 119 virtual bool nodeAtFloatPoint(const HitTestRequest&, HitTestResult&, const F
loatPoint& pointInParent, HitTestAction) OVERRIDE FINAL; |
| 120 | 120 |
| 121 virtual FloatRect objectBoundingBox() const { return m_fillBoundingBox; } | 121 virtual FloatRect objectBoundingBox() const OVERRIDE FINAL { return m_fillBo
undingBox; } |
| 122 virtual FloatRect strokeBoundingBox() const { return m_strokeBoundingBox; } | 122 virtual FloatRect strokeBoundingBox() const OVERRIDE FINAL { return m_stroke
BoundingBox; } |
| 123 FloatRect calculateObjectBoundingBox() const; | 123 FloatRect calculateObjectBoundingBox() const; |
| 124 FloatRect calculateStrokeBoundingBox() const; | 124 FloatRect calculateStrokeBoundingBox() const; |
| 125 void updateRepaintBoundingBox(); | 125 void updateRepaintBoundingBox(); |
| 126 | 126 |
| 127 bool setupNonScalingStrokeContext(AffineTransform&, GraphicsContextStateSave
r&); | 127 bool setupNonScalingStrokeContext(AffineTransform&, GraphicsContextStateSave
r&); |
| 128 | 128 |
| 129 bool shouldGenerateMarkerPositions() const; | 129 bool shouldGenerateMarkerPositions() const; |
| 130 FloatRect markerRect(float strokeWidth) const; | 130 FloatRect markerRect(float strokeWidth) const; |
| 131 void processMarkerPositions(); | 131 void processMarkerPositions(); |
| 132 | 132 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 159 return static_cast<const RenderSVGShape*>(object); | 159 return static_cast<const RenderSVGShape*>(object); |
| 160 } | 160 } |
| 161 | 161 |
| 162 // This will catch anyone doing an unnecessary cast. | 162 // This will catch anyone doing an unnecessary cast. |
| 163 void toRenderSVGShape(const RenderSVGShape*); | 163 void toRenderSVGShape(const RenderSVGShape*); |
| 164 | 164 |
| 165 } | 165 } |
| 166 | 166 |
| 167 #endif // ENABLE(SVG) | 167 #endif // ENABLE(SVG) |
| 168 #endif | 168 #endif |
| OLD | NEW |