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

Side by Side Diff: Source/core/svg/SVGFilterPrimitiveStandardAttributes.cpp

Issue 21498002: Introduce a SVGUnknownElement class for unknown SVG elements (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add comment for SVGUnknownElement Created 7 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/svg/SVGFilterElement.h ('k') | Source/core/svg/SVGFontFaceElement.h » ('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, 2006 Rob Buis <buis@kde.org> 3 * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org>
4 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> 4 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org>
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 } 137 }
138 138
139 RenderObject* SVGFilterPrimitiveStandardAttributes::createRenderer(RenderStyle*) 139 RenderObject* SVGFilterPrimitiveStandardAttributes::createRenderer(RenderStyle*)
140 { 140 {
141 return new RenderSVGResourceFilterPrimitive(this); 141 return new RenderSVGResourceFilterPrimitive(this);
142 } 142 }
143 143
144 bool SVGFilterPrimitiveStandardAttributes::rendererIsNeeded(const NodeRenderingC ontext& context) 144 bool SVGFilterPrimitiveStandardAttributes::rendererIsNeeded(const NodeRenderingC ontext& context)
145 { 145 {
146 if (parentNode() && (parentNode()->hasTagName(SVGNames::filterTag))) 146 if (parentNode() && (parentNode()->hasTagName(SVGNames::filterTag)))
147 return rendererIsNeededInternal(context); 147 return SVGElement::rendererIsNeeded(context);
148 148
149 return false; 149 return false;
150 } 150 }
151 151
152 void SVGFilterPrimitiveStandardAttributes::primitiveAttributeChanged(const Quali fiedName& attribute) 152 void SVGFilterPrimitiveStandardAttributes::primitiveAttributeChanged(const Quali fiedName& attribute)
153 { 153 {
154 if (RenderObject* primitiveRenderer = renderer()) 154 if (RenderObject* primitiveRenderer = renderer())
155 static_cast<RenderSVGResourceFilterPrimitive*>(primitiveRenderer)->primi tiveAttributeChanged(attribute); 155 static_cast<RenderSVGResourceFilterPrimitive*>(primitiveRenderer)->primi tiveAttributeChanged(attribute);
156 } 156 }
157 157
158 void invalidateFilterPrimitiveParent(SVGElement* element) 158 void invalidateFilterPrimitiveParent(SVGElement* element)
159 { 159 {
160 if (!element) 160 if (!element)
161 return; 161 return;
162 162
163 ContainerNode* parent = element->parentNode(); 163 ContainerNode* parent = element->parentNode();
164 164
165 if (!parent) 165 if (!parent)
166 return; 166 return;
167 167
168 RenderObject* renderer = parent->renderer(); 168 RenderObject* renderer = parent->renderer();
169 if (!renderer || !renderer->isSVGResourceFilterPrimitive()) 169 if (!renderer || !renderer->isSVGResourceFilterPrimitive())
170 return; 170 return;
171 171
172 RenderSVGResource::markForLayoutAndParentResourceInvalidation(renderer, fals e); 172 RenderSVGResource::markForLayoutAndParentResourceInvalidation(renderer, fals e);
173 } 173 }
174 174
175 } 175 }
OLDNEW
« no previous file with comments | « Source/core/svg/SVGFilterElement.h ('k') | Source/core/svg/SVGFontFaceElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698