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

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

Issue 395813002: Resolve light-source position/direction when updated (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 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/SVGFELightElement.h ('k') | Source/core/svg/SVGFEPointLightElement.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, 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 addToPropertyMap(m_pointsAtZ); 55 addToPropertyMap(m_pointsAtZ);
56 addToPropertyMap(m_specularExponent); 56 addToPropertyMap(m_specularExponent);
57 addToPropertyMap(m_limitingConeAngle); 57 addToPropertyMap(m_limitingConeAngle);
58 } 58 }
59 59
60 SVGFELightElement* SVGFELightElement::findLightElement(const SVGElement& svgElem ent) 60 SVGFELightElement* SVGFELightElement::findLightElement(const SVGElement& svgElem ent)
61 { 61 {
62 return Traversal<SVGFELightElement>::firstChild(svgElement); 62 return Traversal<SVGFELightElement>::firstChild(svgElement);
63 } 63 }
64 64
65 FloatPoint3D SVGFELightElement::position() const
66 {
67 return FloatPoint3D(x()->currentValue()->value(), y()->currentValue()->value (), z()->currentValue()->value());
68 }
69
70 FloatPoint3D SVGFELightElement::pointsAt() const
71 {
72 return FloatPoint3D(pointsAtX()->currentValue()->value(), pointsAtY()->curre ntValue()->value(), pointsAtZ()->currentValue()->value());
73 }
74
65 bool SVGFELightElement::isSupportedAttribute(const QualifiedName& attrName) 75 bool SVGFELightElement::isSupportedAttribute(const QualifiedName& attrName)
66 { 76 {
67 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); 77 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ());
68 if (supportedAttributes.isEmpty()) { 78 if (supportedAttributes.isEmpty()) {
69 supportedAttributes.add(SVGNames::azimuthAttr); 79 supportedAttributes.add(SVGNames::azimuthAttr);
70 supportedAttributes.add(SVGNames::elevationAttr); 80 supportedAttributes.add(SVGNames::elevationAttr);
71 supportedAttributes.add(SVGNames::xAttr); 81 supportedAttributes.add(SVGNames::xAttr);
72 supportedAttributes.add(SVGNames::yAttr); 82 supportedAttributes.add(SVGNames::yAttr);
73 supportedAttributes.add(SVGNames::zAttr); 83 supportedAttributes.add(SVGNames::zAttr);
74 supportedAttributes.add(SVGNames::pointsAtXAttr); 84 supportedAttributes.add(SVGNames::pointsAtXAttr);
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 if (!change.byParser) { 172 if (!change.byParser) {
163 if (ContainerNode* parent = parentNode()) { 173 if (ContainerNode* parent = parentNode()) {
164 RenderObject* renderer = parent->renderer(); 174 RenderObject* renderer = parent->renderer();
165 if (renderer && renderer->isSVGResourceFilterPrimitive()) 175 if (renderer && renderer->isSVGResourceFilterPrimitive())
166 RenderSVGResource::markForLayoutAndParentResourceInvalidation(re nderer); 176 RenderSVGResource::markForLayoutAndParentResourceInvalidation(re nderer);
167 } 177 }
168 } 178 }
169 } 179 }
170 180
171 } 181 }
OLDNEW
« no previous file with comments | « Source/core/svg/SVGFELightElement.h ('k') | Source/core/svg/SVGFEPointLightElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698