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: third_party/WebKit/Source/core/svg/SVGPathElement.h

Issue 2168133002: Compute exact bounds for SVGPathElement::getBBox() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review Created 4 years, 4 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2005, 2006, 2008 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2004, 2005, 2006, 2008 Nikolas Zimmermann <zimmermann@kde.org>
3 * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org> 3 * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org>
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 unsigned getPathSegAtLength(float distance); 43 unsigned getPathSegAtLength(float distance);
44 44
45 SVGAnimatedPath* path() const { return m_path.get(); } 45 SVGAnimatedPath* path() const { return m_path.get(); }
46 SVGAnimatedNumber* pathLength() const { return m_pathLength.get(); } 46 SVGAnimatedNumber* pathLength() const { return m_pathLength.get(); }
47 float pathLengthScaleFactor() const; 47 float pathLengthScaleFactor() const;
48 const SVGPathByteStream& pathByteStream() const { return stylePath()->byteSt ream(); } 48 const SVGPathByteStream& pathByteStream() const { return stylePath()->byteSt ream(); }
49 49
50 bool isPresentationAttribute(const QualifiedName&) const override; 50 bool isPresentationAttribute(const QualifiedName&) const override;
51 bool isPresentationAttributeWithSVGDOM(const QualifiedName&) const override; 51 bool isPresentationAttributeWithSVGDOM(const QualifiedName&) const override;
52 52
53 FloatRect getBBox() override;
54
53 DECLARE_VIRTUAL_TRACE(); 55 DECLARE_VIRTUAL_TRACE();
54 56
55 private: 57 private:
56 explicit SVGPathElement(Document&); 58 explicit SVGPathElement(Document&);
57 59
58 const StylePath* stylePath() const; 60 const StylePath* stylePath() const;
59 61
60 void svgAttributeChanged(const QualifiedName&) override; 62 void svgAttributeChanged(const QualifiedName&) override;
61 63
62 void collectStyleForPresentationAttribute(const QualifiedName&, const Atomic String&, MutableStylePropertySet*) override; 64 void collectStyleForPresentationAttribute(const QualifiedName&, const Atomic String&, MutableStylePropertySet*) override;
63 65
64 Node::InsertionNotificationRequest insertedInto(ContainerNode*) override; 66 Node::InsertionNotificationRequest insertedInto(ContainerNode*) override;
65 void removedFrom(ContainerNode*) override; 67 void removedFrom(ContainerNode*) override;
66 68
67 void invalidateMPathDependencies(); 69 void invalidateMPathDependencies();
68 70
69 Member<SVGAnimatedNumber> m_pathLength; 71 Member<SVGAnimatedNumber> m_pathLength;
70 Member<SVGAnimatedPath> m_path; 72 Member<SVGAnimatedPath> m_path;
71 }; 73 };
72 74
73 } // namespace blink 75 } // namespace blink
74 76
75 #endif // SVGPathElement_h 77 #endif // SVGPathElement_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698