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

Side by Side Diff: third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceFilter.h

Issue 1382163003: Split SVGFilterbuilder into "builder" and "node map" parts (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: No SVGFilterBuilder::m_filter; Reverse order of args to addPrimitive. Created 5 years, 2 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceFilter.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, 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 static PassOwnPtrWillBeRawPtr<FilterData> create() 53 static PassOwnPtrWillBeRawPtr<FilterData> create()
54 { 54 {
55 return adoptPtrWillBeNoop(new FilterData()); 55 return adoptPtrWillBeNoop(new FilterData());
56 } 56 }
57 57
58 void dispose(); 58 void dispose();
59 59
60 DECLARE_TRACE(); 60 DECLARE_TRACE();
61 61
62 RefPtrWillBeMember<Filter> filter; 62 RefPtrWillBeMember<Filter> filter;
63 RefPtrWillBeMember<SVGFilterBuilder> builder; 63 RefPtrWillBeMember<SVGFilterGraphNodeMap> nodeMap;
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 ~LayoutSVGResourceFilter() override;
74 74
75 bool isChildAllowed(LayoutObject*, const ComputedStyle&) const override; 75 bool isChildAllowed(LayoutObject*, const ComputedStyle&) const override;
76 76
77 const char* name() const override { return "LayoutSVGResourceFilter"; } 77 const char* name() const override { return "LayoutSVGResourceFilter"; }
78 bool isOfType(LayoutObjectType type) const override { return type == LayoutO bjectSVGResourceFilter || LayoutSVGResourceContainer::isOfType(type); } 78 bool isOfType(LayoutObjectType type) const override { return type == LayoutO bjectSVGResourceFilter || LayoutSVGResourceContainer::isOfType(type); }
79 79
80 void removeAllClientsFromCache(bool markForInvalidation = true) override; 80 void removeAllClientsFromCache(bool markForInvalidation = true) override;
81 void removeClientFromCache(LayoutObject*, bool markForInvalidation = true) o verride; 81 void removeClientFromCache(LayoutObject*, bool markForInvalidation = true) o verride;
82 82
83 FloatRect resourceBoundingBox(const LayoutObject*); 83 FloatRect resourceBoundingBox(const LayoutObject*);
84 84
85 PassRefPtrWillBeRawPtr<SVGFilterBuilder> buildPrimitives(Filter*);
86
87 SVGUnitTypes::SVGUnitType filterUnits() const { return toSVGFilterElement(el ement())->filterUnits()->currentValue()->enumValue(); } 85 SVGUnitTypes::SVGUnitType filterUnits() const { return toSVGFilterElement(el ement())->filterUnits()->currentValue()->enumValue(); }
88 SVGUnitTypes::SVGUnitType primitiveUnits() const { return toSVGFilterElement (element())->primitiveUnits()->currentValue()->enumValue(); } 86 SVGUnitTypes::SVGUnitType primitiveUnits() const { return toSVGFilterElement (element())->primitiveUnits()->currentValue()->enumValue(); }
89 87
90 void primitiveAttributeChanged(LayoutObject*, const QualifiedName&); 88 void primitiveAttributeChanged(LayoutObject*, const QualifiedName&);
91 89
92 static const LayoutSVGResourceType s_resourceType = FilterResourceType; 90 static const LayoutSVGResourceType s_resourceType = FilterResourceType;
93 LayoutSVGResourceType resourceType() const override { return s_resourceType; } 91 LayoutSVGResourceType resourceType() const override { return s_resourceType; }
94 92
95 FilterData* getFilterDataForLayoutObject(const LayoutObject* object) { retur n m_filter.get(const_cast<LayoutObject*>(object)); } 93 FilterData* getFilterDataForLayoutObject(const LayoutObject* object) { retur n m_filter.get(const_cast<LayoutObject*>(object)); }
96 void setFilterDataForLayoutObject(LayoutObject* object, PassOwnPtrWillBeRawP tr<FilterData> filterData) { m_filter.set(object, filterData); } 94 void setFilterDataForLayoutObject(LayoutObject* object, PassOwnPtrWillBeRawP tr<FilterData> filterData) { m_filter.set(object, filterData); }
97 95
98 protected: 96 protected:
99 void willBeDestroyed() override; 97 void willBeDestroyed() override;
100 98
101 private: 99 private:
102 void disposeFilterMap(); 100 void disposeFilterMap();
103 101
104 using FilterMap = WillBePersistentHeapHashMap<LayoutObject*, OwnPtrWillBeMem ber<FilterData>>; 102 using FilterMap = WillBePersistentHeapHashMap<LayoutObject*, OwnPtrWillBeMem ber<FilterData>>;
105 FilterMap m_filter; 103 FilterMap m_filter;
106 }; 104 };
107 105
108 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutSVGResourceFilter, isSVGResourceFilter()); 106 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutSVGResourceFilter, isSVGResourceFilter());
109 107
110 } 108 }
111 109
112 #endif 110 #endif
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698