1 | /* |
2 | * Copyright (C) 2007 Eric Seidel <eric@webkit.org> |
3 | * Copyright (C) 2018-2019 Apple Inc. All rights reserved. |
4 | * |
5 | * This library is free software; you can redistribute it and/or |
6 | * modify it under the terms of the GNU Library General Public |
7 | * License as published by the Free Software Foundation; either |
8 | * version 2 of the License, or (at your option) any later version. |
9 | * |
10 | * This library is distributed in the hope that it will be useful, |
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 | * Library General Public License for more details. |
14 | * |
15 | * You should have received a copy of the GNU Library General Public License |
16 | * along with this library; see the file COPYING.LIB. If not, write to |
17 | * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
18 | * Boston, MA 02110-1301, USA. |
19 | */ |
20 | |
21 | #pragma once |
22 | |
23 | #include "SVGElement.h" |
24 | #include "SVGExternalResourcesRequired.h" |
25 | #include "SVGNames.h" |
26 | #include "SVGURIReference.h" |
27 | |
28 | namespace WebCore { |
29 | |
30 | class SVGPathElement; |
31 | |
32 | class SVGMPathElement final : public SVGElement, public SVGExternalResourcesRequired, public SVGURIReference { |
33 | WTF_MAKE_ISO_ALLOCATED(SVGMPathElement); |
34 | public: |
35 | static Ref<SVGMPathElement> create(const QualifiedName&, Document&); |
36 | |
37 | virtual ~SVGMPathElement(); |
38 | |
39 | RefPtr<SVGPathElement> pathElement(); |
40 | |
41 | void targetPathChanged(); |
42 | |
43 | private: |
44 | SVGMPathElement(const QualifiedName&, Document&); |
45 | |
46 | using PropertyRegistry = SVGPropertyOwnerRegistry<SVGMPathElement, SVGElement, SVGExternalResourcesRequired, SVGURIReference>; |
47 | const SVGPropertyRegistry& propertyRegistry() const final { return m_propertyRegistry; } |
48 | |
49 | void parseAttribute(const QualifiedName&, const AtomicString&) final; |
50 | void svgAttributeChanged(const QualifiedName&) final; |
51 | |
52 | void buildPendingResource() final; |
53 | void clearResourceReferences(); |
54 | InsertedIntoAncestorResult insertedIntoAncestor(InsertionType, ContainerNode&) final; |
55 | void removedFromAncestor(RemovalType, ContainerNode&) final; |
56 | |
57 | bool rendererIsNeeded(const RenderStyle&) final { return false; } |
58 | void didFinishInsertingNode() final; |
59 | |
60 | void notifyParentOfPathChange(ContainerNode*); |
61 | |
62 | PropertyRegistry m_propertyRegistry { *this }; |
63 | }; |
64 | |
65 | } // namespace WebCore |
66 | |