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

Side by Side Diff: third_party/WebKit/Source/core/svg/SVGFilterElement.cpp

Issue 2484153003: Use an SVGElementProxy in ReferenceClipPathOperation (Closed)
Patch Set: Rebase; fix comments; findElement Created 4 years, 1 month 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 | « third_party/WebKit/Source/core/svg/SVGFilterElement.h ('k') | no next file » | 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, 2006 Rob Buis <buis@kde.org> 3 * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org>
4 * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com> 4 * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
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
11 * version 2 of the License, or (at your option) any later version. 11 * version 2 of the License, or (at your option) any later version.
12 * 12 *
13 * This library is distributed in the hope that it will be useful, 13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Library General Public License for more details. 16 * Library General Public License for more details.
17 * 17 *
18 * You should have received a copy of the GNU Library General Public License 18 * You should have received a copy of the GNU Library General Public License
19 * along with this library; see the file COPYING.LIB. If not, write to 19 * along with this library; see the file COPYING.LIB. If not, write to
20 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 20 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21 * Boston, MA 02110-1301, USA. 21 * Boston, MA 02110-1301, USA.
22 */ 22 */
23 23
24 #include "core/svg/SVGFilterElement.h" 24 #include "core/svg/SVGFilterElement.h"
25 25
26 #include "core/frame/UseCounter.h" 26 #include "core/frame/UseCounter.h"
27 #include "core/layout/svg/LayoutSVGResourceFilter.h" 27 #include "core/layout/svg/LayoutSVGResourceFilter.h"
28 #include "core/svg/SVGElementProxy.h"
29 28
30 namespace blink { 29 namespace blink {
31 30
32 inline SVGFilterElement::SVGFilterElement(Document& document) 31 inline SVGFilterElement::SVGFilterElement(Document& document)
33 : SVGElement(SVGNames::filterTag, document), 32 : SVGElement(SVGNames::filterTag, document),
34 SVGURIReference(this), 33 SVGURIReference(this),
35 m_x(SVGAnimatedLength::create(this, 34 m_x(SVGAnimatedLength::create(this,
36 SVGNames::xAttr, 35 SVGNames::xAttr,
37 SVGLength::create(SVGLengthMode::Width))), 36 SVGLength::create(SVGLengthMode::Width))),
38 m_y(SVGAnimatedLength::create(this, 37 m_y(SVGAnimatedLength::create(this,
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 75
77 DEFINE_NODE_FACTORY(SVGFilterElement) 76 DEFINE_NODE_FACTORY(SVGFilterElement)
78 77
79 DEFINE_TRACE(SVGFilterElement) { 78 DEFINE_TRACE(SVGFilterElement) {
80 visitor->trace(m_x); 79 visitor->trace(m_x);
81 visitor->trace(m_y); 80 visitor->trace(m_y);
82 visitor->trace(m_width); 81 visitor->trace(m_width);
83 visitor->trace(m_height); 82 visitor->trace(m_height);
84 visitor->trace(m_filterUnits); 83 visitor->trace(m_filterUnits);
85 visitor->trace(m_primitiveUnits); 84 visitor->trace(m_primitiveUnits);
86 visitor->trace(m_elementProxySet);
87 SVGElement::trace(visitor); 85 SVGElement::trace(visitor);
88 SVGURIReference::trace(visitor); 86 SVGURIReference::trace(visitor);
89 } 87 }
90 88
91 void SVGFilterElement::svgAttributeChanged(const QualifiedName& attrName) { 89 void SVGFilterElement::svgAttributeChanged(const QualifiedName& attrName) {
92 bool isXYWH = attrName == SVGNames::xAttr || attrName == SVGNames::yAttr || 90 bool isXYWH = attrName == SVGNames::xAttr || attrName == SVGNames::yAttr ||
93 attrName == SVGNames::widthAttr || 91 attrName == SVGNames::widthAttr ||
94 attrName == SVGNames::heightAttr; 92 attrName == SVGNames::heightAttr;
95 if (isXYWH) 93 if (isXYWH)
96 updateRelativeLengthsInformation(); 94 updateRelativeLengthsInformation();
(...skipping 27 matching lines...) Expand all
124 return new LayoutSVGResourceFilter(this); 122 return new LayoutSVGResourceFilter(this);
125 } 123 }
126 124
127 bool SVGFilterElement::selfHasRelativeLengths() const { 125 bool SVGFilterElement::selfHasRelativeLengths() const {
128 return m_x->currentValue()->isRelative() || 126 return m_x->currentValue()->isRelative() ||
129 m_y->currentValue()->isRelative() || 127 m_y->currentValue()->isRelative() ||
130 m_width->currentValue()->isRelative() || 128 m_width->currentValue()->isRelative() ||
131 m_height->currentValue()->isRelative(); 129 m_height->currentValue()->isRelative();
132 } 130 }
133 131
134 SVGElementProxySet& SVGFilterElement::elementProxySet() {
135 if (!m_elementProxySet)
136 m_elementProxySet = new SVGElementProxySet;
137 return *m_elementProxySet;
138 }
139
140 } // namespace blink 132 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGFilterElement.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698