| OLD | NEW |
| 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 11 matching lines...) Expand all Loading... |
| 22 #define SVGPathElement_h | 22 #define SVGPathElement_h |
| 23 | 23 |
| 24 #include "core/SVGNames.h" | 24 #include "core/SVGNames.h" |
| 25 #include "core/svg/SVGAnimatedNumber.h" | 25 #include "core/svg/SVGAnimatedNumber.h" |
| 26 #include "core/svg/SVGAnimatedPath.h" | 26 #include "core/svg/SVGAnimatedPath.h" |
| 27 #include "core/svg/SVGGeometryElement.h" | 27 #include "core/svg/SVGGeometryElement.h" |
| 28 #include "platform/heap/Handle.h" | 28 #include "platform/heap/Handle.h" |
| 29 | 29 |
| 30 namespace blink { | 30 namespace blink { |
| 31 | 31 |
| 32 class StylePath; |
| 33 |
| 32 class SVGPathElement final : public SVGGeometryElement { | 34 class SVGPathElement final : public SVGGeometryElement { |
| 33 DEFINE_WRAPPERTYPEINFO(); | 35 DEFINE_WRAPPERTYPEINFO(); |
| 34 public: | 36 public: |
| 35 DECLARE_NODE_FACTORY(SVGPathElement); | 37 DECLARE_NODE_FACTORY(SVGPathElement); |
| 36 | 38 |
| 37 Path asPath() const override; | 39 Path asPath() const override; |
| 38 | 40 |
| 39 float getTotalLength(); | 41 float getTotalLength(); |
| 40 PassRefPtrWillBeRawPtr<SVGPointTearOff> getPointAtLength(float distance); | 42 PassRefPtrWillBeRawPtr<SVGPointTearOff> getPointAtLength(float distance); |
| 41 unsigned getPathSegAtLength(float distance); | 43 unsigned getPathSegAtLength(float distance); |
| 42 | 44 |
| 43 SVGAnimatedPath* path() const { return m_path.get(); } | 45 SVGAnimatedPath* path() const { return m_path.get(); } |
| 44 SVGAnimatedNumber* pathLength() const { return m_pathLength.get(); } | 46 SVGAnimatedNumber* pathLength() const { return m_pathLength.get(); } |
| 47 float pathLengthScaleFactor() const; |
| 45 | 48 |
| 46 const SVGPathByteStream& pathByteStream() const; | 49 const SVGPathByteStream& pathByteStream() const; |
| 47 | 50 |
| 48 bool isPresentationAttribute(const QualifiedName&) const override; | 51 bool isPresentationAttribute(const QualifiedName&) const override; |
| 49 bool isPresentationAttributeWithSVGDOM(const QualifiedName&) const override; | 52 bool isPresentationAttributeWithSVGDOM(const QualifiedName&) const override; |
| 50 | 53 |
| 51 DECLARE_VIRTUAL_TRACE(); | 54 DECLARE_VIRTUAL_TRACE(); |
| 52 | 55 |
| 53 private: | 56 private: |
| 54 explicit SVGPathElement(Document&); | 57 explicit SVGPathElement(Document&); |
| 55 | 58 |
| 59 const StylePath* stylePath() const; |
| 60 |
| 56 void svgAttributeChanged(const QualifiedName&) override; | 61 void svgAttributeChanged(const QualifiedName&) override; |
| 57 | 62 |
| 58 void collectStyleForPresentationAttribute(const QualifiedName&, const Atomic
String&, MutableStylePropertySet*) override; | 63 void collectStyleForPresentationAttribute(const QualifiedName&, const Atomic
String&, MutableStylePropertySet*) override; |
| 59 | 64 |
| 60 Node::InsertionNotificationRequest insertedInto(ContainerNode*) override; | 65 Node::InsertionNotificationRequest insertedInto(ContainerNode*) override; |
| 61 void removedFrom(ContainerNode*) override; | 66 void removedFrom(ContainerNode*) override; |
| 62 | 67 |
| 63 void invalidateMPathDependencies(); | 68 void invalidateMPathDependencies(); |
| 64 | 69 |
| 65 RefPtrWillBeMember<SVGAnimatedNumber> m_pathLength; | 70 RefPtrWillBeMember<SVGAnimatedNumber> m_pathLength; |
| 66 RefPtrWillBeMember<SVGAnimatedPath> m_path; | 71 RefPtrWillBeMember<SVGAnimatedPath> m_path; |
| 67 }; | 72 }; |
| 68 | 73 |
| 69 } // namespace blink | 74 } // namespace blink |
| 70 | 75 |
| 71 #endif // SVGPathElement_h | 76 #endif // SVGPathElement_h |
| OLD | NEW |