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

Side by Side Diff: Source/core/layout/svg/LayoutSVGPath.h

Issue 927583002: Moving RenderSVG* files from rendering/ to layout/ (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 10 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
« no previous file with comments | « Source/core/layout/svg/LayoutSVGInline.h ('k') | Source/core/layout/svg/LayoutSVGPath.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
11 * modify it under the terms of the GNU Library General Public 11 * modify it under the terms of the GNU Library General Public
12 * License as published by the Free Software Foundation; either 12 * License as published by the Free Software Foundation; either
13 * version 2 of the License, or (at your option) any later version. 13 * version 2 of the License, or (at your option) any later version.
14 * 14 *
15 * This library is distributed in the hope that it will be useful, 15 * This library is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 * Library General Public License for more details. 18 * Library General Public License for more details.
19 * 19 *
20 * You should have received a copy of the GNU Library General Public License 20 * You should have received a copy of the GNU Library General Public License
21 * along with this library; see the file COPYING.LIB. If not, write to 21 * along with this library; see the file COPYING.LIB. If not, write to
22 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 22 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
23 * Boston, MA 02110-1301, USA. 23 * Boston, MA 02110-1301, USA.
24 */ 24 */
25 25
26 #ifndef RenderSVGPath_h 26 #ifndef LayoutSVGPath_h
27 #define RenderSVGPath_h 27 #define LayoutSVGPath_h
28 28
29 #include "core/rendering/svg/RenderSVGShape.h" 29 #include "core/layout/svg/LayoutSVGShape.h"
30 30
31 namespace blink { 31 namespace blink {
32 32
33 class RenderSVGPath final : public RenderSVGShape { 33 class LayoutSVGPath final : public LayoutSVGShape {
34 public: 34 public:
35 explicit RenderSVGPath(SVGGraphicsElement*); 35 explicit LayoutSVGPath(SVGGraphicsElement*);
36 virtual ~RenderSVGPath(); 36 virtual ~LayoutSVGPath();
37 37
38 virtual const Vector<MarkerPosition>* markerPositions() const override { ret urn &m_markerPositions; } 38 virtual const Vector<MarkerPosition>* markerPositions() const override { ret urn &m_markerPositions; }
39 39
40 virtual const Vector<FloatPoint>* zeroLengthLineCaps() const override { retu rn &m_zeroLengthLinecapLocations; } 40 virtual const Vector<FloatPoint>* zeroLengthLineCaps() const override { retu rn &m_zeroLengthLinecapLocations; }
41 static FloatRect zeroLengthSubpathRect(const FloatPoint&, float); 41 static FloatRect zeroLengthSubpathRect(const FloatPoint&, float);
42 42
43 private: 43 private:
44 virtual const char* renderName() const override { return "RenderSVGPath"; } 44 virtual const char* renderName() const override { return "LayoutSVGPath"; }
45 45
46 virtual void updateShapeFromElement() override; 46 virtual void updateShapeFromElement() override;
47 FloatRect calculateUpdatedStrokeBoundingBox() const; 47 FloatRect calculateUpdatedStrokeBoundingBox() const;
48 48
49 virtual bool shapeDependentStrokeContains(const FloatPoint&) override; 49 virtual bool shapeDependentStrokeContains(const FloatPoint&) override;
50 50
51 FloatRect markerRect(float strokeWidth) const; 51 FloatRect markerRect(float strokeWidth) const;
52 bool shouldGenerateMarkerPositions() const; 52 bool shouldGenerateMarkerPositions() const;
53 virtual void processMarkerPositions() override; 53 virtual void processMarkerPositions() override;
54 54
55 bool shouldStrokeZeroLengthSubpath() const; 55 bool shouldStrokeZeroLengthSubpath() const;
56 void updateZeroLengthSubpaths(); 56 void updateZeroLengthSubpaths();
57 57
58 Vector<MarkerPosition> m_markerPositions; 58 Vector<MarkerPosition> m_markerPositions;
59 Vector<FloatPoint> m_zeroLengthLinecapLocations; 59 Vector<FloatPoint> m_zeroLengthLinecapLocations;
60 }; 60 };
61 61
62 } 62 }
63 63
64 #endif 64 #endif
OLDNEW
« no previous file with comments | « Source/core/layout/svg/LayoutSVGInline.h ('k') | Source/core/layout/svg/LayoutSVGPath.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698