Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(57)

Side by Side Diff: Source/core/rendering/svg/RenderSVGShape.h

Issue 492053002: Use LayoutRect during addFocusRingRects to avoid loss of precision (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: NeedsRebaseline (pixel tests about focus rings. 1-pixel width diff at the edge because of different rounding) Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 84
85 virtual FloatRect paintInvalidationRectInLocalCoordinates() const OVERRIDE F INAL { return m_paintInvalidationBoundingBox; } 85 virtual FloatRect paintInvalidationRectInLocalCoordinates() const OVERRIDE F INAL { return m_paintInvalidationBoundingBox; }
86 virtual const AffineTransform& localToParentTransform() const OVERRIDE FINAL { return m_localTransform; } 86 virtual const AffineTransform& localToParentTransform() const OVERRIDE FINAL { return m_localTransform; }
87 virtual AffineTransform localTransform() const OVERRIDE FINAL { return m_loc alTransform; } 87 virtual AffineTransform localTransform() const OVERRIDE FINAL { return m_loc alTransform; }
88 88
89 virtual bool isSVGShape() const OVERRIDE FINAL { return true; } 89 virtual bool isSVGShape() const OVERRIDE FINAL { return true; }
90 virtual const char* renderName() const OVERRIDE { return "RenderSVGShape"; } 90 virtual const char* renderName() const OVERRIDE { return "RenderSVGShape"; }
91 91
92 virtual void layout() OVERRIDE FINAL; 92 virtual void layout() OVERRIDE FINAL;
93 virtual void paint(PaintInfo&, const LayoutPoint&) OVERRIDE FINAL; 93 virtual void paint(PaintInfo&, const LayoutPoint&) OVERRIDE FINAL;
94 virtual void addFocusRingRects(Vector<IntRect>&, const LayoutPoint& addition alOffset, const RenderLayerModelObject* paintContainer = 0) const OVERRIDE FINAL ; 94 virtual void addFocusRingRects(Vector<LayoutRect>&, const LayoutPoint& addit ionalOffset, const RenderLayerModelObject* paintContainer) const OVERRIDE FINAL;
95 95
96 virtual bool nodeAtFloatPoint(const HitTestRequest&, HitTestResult&, const F loatPoint& pointInParent, HitTestAction) OVERRIDE FINAL; 96 virtual bool nodeAtFloatPoint(const HitTestRequest&, HitTestResult&, const F loatPoint& pointInParent, HitTestAction) OVERRIDE FINAL;
97 97
98 virtual FloatRect objectBoundingBox() const OVERRIDE FINAL { return m_fillBo undingBox; } 98 virtual FloatRect objectBoundingBox() const OVERRIDE FINAL { return m_fillBo undingBox; }
99 virtual FloatRect strokeBoundingBox() const OVERRIDE FINAL { return m_stroke BoundingBox; } 99 virtual FloatRect strokeBoundingBox() const OVERRIDE FINAL { return m_stroke BoundingBox; }
100 FloatRect calculateObjectBoundingBox() const; 100 FloatRect calculateObjectBoundingBox() const;
101 FloatRect calculateStrokeBoundingBox() const; 101 FloatRect calculateStrokeBoundingBox() const;
102 void updatePaintInvalidationBoundingBox(); 102 void updatePaintInvalidationBoundingBox();
103 103
104 bool setupNonScalingStrokeContext(AffineTransform&, GraphicsContextStateSave r&); 104 bool setupNonScalingStrokeContext(AffineTransform&, GraphicsContextStateSave r&);
(...skipping 15 matching lines...) Expand all
120 bool m_needsBoundariesUpdate : 1; 120 bool m_needsBoundariesUpdate : 1;
121 bool m_needsShapeUpdate : 1; 121 bool m_needsShapeUpdate : 1;
122 bool m_needsTransformUpdate : 1; 122 bool m_needsTransformUpdate : 1;
123 }; 123 };
124 124
125 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderSVGShape, isSVGShape()); 125 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderSVGShape, isSVGShape());
126 126
127 } 127 }
128 128
129 #endif 129 #endif
OLDNEW
« no previous file with comments | « Source/core/rendering/svg/RenderSVGImage.cpp ('k') | Source/core/rendering/svg/RenderSVGShape.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698