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

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

Issue 1328693002: Drop special-case handling of zero-length subpaths (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase; TEs. Created 5 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
« no previous file with comments | « LayoutTests/TestExpectations ('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
(...skipping 19 matching lines...) Expand all
30 30
31 namespace blink { 31 namespace blink {
32 32
33 class LayoutSVGPath final : public LayoutSVGShape { 33 class LayoutSVGPath final : public LayoutSVGShape {
34 public: 34 public:
35 explicit LayoutSVGPath(SVGGeometryElement*); 35 explicit LayoutSVGPath(SVGGeometryElement*);
36 ~LayoutSVGPath() override; 36 ~LayoutSVGPath() override;
37 37
38 const Vector<MarkerPosition>* markerPositions() const override { return &m_m arkerPositions; } 38 const Vector<MarkerPosition>* markerPositions() const override { return &m_m arkerPositions; }
39 39
40 const Vector<FloatPoint>* zeroLengthLineCaps() const override { return &m_ze roLengthLinecapLocations; }
41 static FloatRect zeroLengthSubpathRect(const FloatPoint&, float);
42
43 const char* name() const override { return "LayoutSVGPath"; } 40 const char* name() const override { return "LayoutSVGPath"; }
44 41
45 private: 42 private:
46 void updateShapeFromElement() override;
47 void updateStrokeAndFillBoundingBoxes() override; 43 void updateStrokeAndFillBoundingBoxes() override;
48 44
49 FloatRect hitTestStrokeBoundingBox() const override; 45 FloatRect hitTestStrokeBoundingBox() const override;
50 46
51 bool shapeDependentStrokeContains(const FloatPoint&) override;
52
53 FloatRect markerRect(float strokeWidth) const; 47 FloatRect markerRect(float strokeWidth) const;
54 bool shouldGenerateMarkerPositions() const; 48 bool shouldGenerateMarkerPositions() const;
55 void processMarkerPositions(); 49 void processMarkerPositions();
56 50
57 bool shouldStrokeZeroLengthSubpath() const;
58 void updateZeroLengthSubpaths();
59
60 Vector<MarkerPosition> m_markerPositions; 51 Vector<MarkerPosition> m_markerPositions;
61 Vector<FloatPoint> m_zeroLengthLinecapLocations;
62 }; 52 };
63 53
64 } 54 }
65 55
66 #endif 56 #endif
OLDNEW
« no previous file with comments | « LayoutTests/TestExpectations ('k') | Source/core/layout/svg/LayoutSVGPath.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698