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

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

Issue 133203003: Generate toSVGFooElement() for SVGFELight|AnimateMotion|FontFaceSrc|TextPositioningElement (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 11 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2004, 2005, 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) 2005 Oliver Hunt <oliver@nerget.com> 4 * Copyright (C) 2005 Oliver Hunt <oliver@nerget.com>
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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 { 63 {
64 registerAnimatedPropertiesForSVGFELightElement(); 64 registerAnimatedPropertiesForSVGFELightElement();
65 } 65 }
66 66
67 SVGFELightElement* SVGFELightElement::findLightElement(const SVGElement* svgElem ent) 67 SVGFELightElement* SVGFELightElement::findLightElement(const SVGElement* svgElem ent)
68 { 68 {
69 for (Node* node = svgElement->firstChild(); node; node = node->nextSibling() ) { 69 for (Node* node = svgElement->firstChild(); node; node = node->nextSibling() ) {
70 if (node->hasTagName(SVGNames::feDistantLightTag) 70 if (node->hasTagName(SVGNames::feDistantLightTag)
71 || node->hasTagName(SVGNames::fePointLightTag) 71 || node->hasTagName(SVGNames::fePointLightTag)
72 || node->hasTagName(SVGNames::feSpotLightTag)) { 72 || node->hasTagName(SVGNames::feSpotLightTag)) {
73 return static_cast<SVGFELightElement*>(node); 73 return toSVGFELightElement(node);
Stephen Chennney 2014/01/10 12:32:53 You are doing the hasTagName queries twice. I have
gyuyoung-inactive 2014/01/12 04:37:31 DEFINE_NODE_TYPE_CASTS macro only calls "hasTagNam
74 } 74 }
75 } 75 }
76 return 0; 76 return 0;
77 } 77 }
78 78
79 PassRefPtr<LightSource> SVGFELightElement::findLightSource(const SVGElement* svg Element) 79 PassRefPtr<LightSource> SVGFELightElement::findLightSource(const SVGElement* svg Element)
80 { 80 {
81 SVGFELightElement* lightNode = findLightElement(svgElement); 81 SVGFELightElement* lightNode = findLightElement(svgElement);
82 if (!lightNode) 82 if (!lightNode)
83 return 0; 83 return 0;
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 if (!changedByParser) { 208 if (!changedByParser) {
209 if (ContainerNode* parent = parentNode()) { 209 if (ContainerNode* parent = parentNode()) {
210 RenderObject* renderer = parent->renderer(); 210 RenderObject* renderer = parent->renderer();
211 if (renderer && renderer->isSVGResourceFilterPrimitive()) 211 if (renderer && renderer->isSVGResourceFilterPrimitive())
212 RenderSVGResource::markForLayoutAndParentResourceInvalidation(re nderer); 212 RenderSVGResource::markForLayoutAndParentResourceInvalidation(re nderer);
213 } 213 }
214 } 214 }
215 } 215 }
216 216
217 } 217 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698