OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005, 2006, 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) 2009 Dirk Schulze <krit@webkit.org> | 5 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> |
6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
7 * | 7 * |
8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 RefPtrWillBeMember<SVGFilterBuilder> builder; | 63 RefPtrWillBeMember<SVGFilterBuilder> builder; |
64 FilterDataState m_state; | 64 FilterDataState m_state; |
65 | 65 |
66 private: | 66 private: |
67 FilterData() : m_state(Initial) { } | 67 FilterData() : m_state(Initial) { } |
68 }; | 68 }; |
69 | 69 |
70 class LayoutSVGResourceFilter final : public LayoutSVGResourceContainer { | 70 class LayoutSVGResourceFilter final : public LayoutSVGResourceContainer { |
71 public: | 71 public: |
72 explicit LayoutSVGResourceFilter(SVGFilterElement*); | 72 explicit LayoutSVGResourceFilter(SVGFilterElement*); |
| 73 ~LayoutSVGResourceFilter() override; |
73 | 74 |
74 virtual ~LayoutSVGResourceFilter(); | 75 bool isChildAllowed(LayoutObject*, const ComputedStyle&) const override; |
75 | 76 |
76 virtual bool isChildAllowed(LayoutObject*, const ComputedStyle&) const overr
ide; | 77 const char* name() const override { return "LayoutSVGResourceFilter"; } |
| 78 bool isOfType(LayoutObjectType type) const override { return type == LayoutO
bjectSVGResourceFilter || LayoutSVGResourceContainer::isOfType(type); } |
77 | 79 |
78 virtual const char* name() const override { return "LayoutSVGResourceFilter"
; } | 80 void removeAllClientsFromCache(bool markForInvalidation = true) override; |
79 virtual bool isOfType(LayoutObjectType type) const override { return type ==
LayoutObjectSVGResourceFilter || LayoutSVGResourceContainer::isOfType(type); } | 81 void removeClientFromCache(LayoutObject*, bool markForInvalidation = true) o
verride; |
80 | |
81 virtual void removeAllClientsFromCache(bool markForInvalidation = true) over
ride; | |
82 virtual void removeClientFromCache(LayoutObject*, bool markForInvalidation =
true) override; | |
83 | 82 |
84 FloatRect resourceBoundingBox(const LayoutObject*); | 83 FloatRect resourceBoundingBox(const LayoutObject*); |
85 | 84 |
86 PassRefPtrWillBeRawPtr<SVGFilterBuilder> buildPrimitives(SVGFilter*); | 85 PassRefPtrWillBeRawPtr<SVGFilterBuilder> buildPrimitives(SVGFilter*); |
87 | 86 |
88 SVGUnitTypes::SVGUnitType filterUnits() const { return toSVGFilterElement(el
ement())->filterUnits()->currentValue()->enumValue(); } | 87 SVGUnitTypes::SVGUnitType filterUnits() const { return toSVGFilterElement(el
ement())->filterUnits()->currentValue()->enumValue(); } |
89 SVGUnitTypes::SVGUnitType primitiveUnits() const { return toSVGFilterElement
(element())->primitiveUnits()->currentValue()->enumValue(); } | 88 SVGUnitTypes::SVGUnitType primitiveUnits() const { return toSVGFilterElement
(element())->primitiveUnits()->currentValue()->enumValue(); } |
90 | 89 |
91 void primitiveAttributeChanged(LayoutObject*, const QualifiedName&); | 90 void primitiveAttributeChanged(LayoutObject*, const QualifiedName&); |
92 | 91 |
93 static const LayoutSVGResourceType s_resourceType = FilterResourceType; | 92 static const LayoutSVGResourceType s_resourceType = FilterResourceType; |
94 virtual LayoutSVGResourceType resourceType() const override { return s_resou
rceType; } | 93 LayoutSVGResourceType resourceType() const override { return s_resourceType;
} |
95 | 94 |
96 FilterData* getFilterDataForLayoutObject(LayoutObject* object) { return m_fi
lter.get(object); } | 95 FilterData* getFilterDataForLayoutObject(LayoutObject* object) { return m_fi
lter.get(object); } |
97 void setFilterDataForLayoutObject(LayoutObject* object, PassOwnPtrWillBeRawP
tr<FilterData> filterData) { m_filter.set(object, filterData); } | 96 void setFilterDataForLayoutObject(LayoutObject* object, PassOwnPtrWillBeRawP
tr<FilterData> filterData) { m_filter.set(object, filterData); } |
98 | 97 |
99 protected: | 98 protected: |
100 virtual void willBeDestroyed() override; | 99 void willBeDestroyed() override; |
101 | 100 |
102 private: | 101 private: |
103 void disposeFilterMap(); | 102 void disposeFilterMap(); |
104 | 103 |
105 using FilterMap = WillBePersistentHeapHashMap<LayoutObject*, OwnPtrWillBeMem
ber<FilterData>>; | 104 using FilterMap = WillBePersistentHeapHashMap<LayoutObject*, OwnPtrWillBeMem
ber<FilterData>>; |
106 FilterMap m_filter; | 105 FilterMap m_filter; |
107 }; | 106 }; |
108 | 107 |
109 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutSVGResourceFilter, isSVGResourceFilter()); | 108 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutSVGResourceFilter, isSVGResourceFilter()); |
110 | 109 |
111 } | 110 } |
112 | 111 |
113 #endif | 112 #endif |
OLD | NEW |