OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 2 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
3 * | 3 * |
4 * This library is free software; you can redistribute it and/or | 4 * This library is free software; you can redistribute it and/or |
5 * modify it under the terms of the GNU Library General Public | 5 * modify it under the terms of the GNU Library General Public |
6 * License as published by the Free Software Foundation; either | 6 * License as published by the Free Software Foundation; either |
7 * version 2 of the License, or (at your option) any later version. | 7 * version 2 of the License, or (at your option) any later version. |
8 * | 8 * |
9 * This library is distributed in the hope that it will be useful, | 9 * This library is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 RenderSVGResourceType resourceType = container->resourceType(); | 169 RenderSVGResourceType resourceType = container->resourceType(); |
170 if (resourceType != PatternResourceType && resourceType != LinearGradientRes
ourceType && resourceType != RadialGradientResourceType) | 170 if (resourceType != PatternResourceType && resourceType != LinearGradientRes
ourceType && resourceType != RadialGradientResourceType) |
171 return 0; | 171 return 0; |
172 | 172 |
173 return container; | 173 return container; |
174 } | 174 } |
175 | 175 |
176 static inline void registerPendingResource(SVGDocumentExtensions* extensions, co
nst AtomicString& id, SVGElement* element) | 176 static inline void registerPendingResource(SVGDocumentExtensions* extensions, co
nst AtomicString& id, SVGElement* element) |
177 { | 177 { |
178 ASSERT(element); | 178 ASSERT(element); |
179 ASSERT_WITH_SECURITY_IMPLICATION(element->isSVGStyledElement()); | 179 extensions->addPendingResource(id, element); |
180 extensions->addPendingResource(id, toSVGStyledElement(element)); | |
181 } | 180 } |
182 | 181 |
183 bool SVGResources::buildResources(const RenderObject* object, const SVGRenderSty
le* style) | 182 bool SVGResources::buildResources(const RenderObject* object, const SVGRenderSty
le* style) |
184 { | 183 { |
185 ASSERT(object); | 184 ASSERT(object); |
186 ASSERT(style); | 185 ASSERT(style); |
187 | 186 |
188 Node* node = object->node(); | 187 Node* node = object->node(); |
189 ASSERT(node); | 188 ASSERT(node); |
190 ASSERT_WITH_SECURITY_IMPLICATION(node->isSVGElement()); | 189 ASSERT_WITH_SECURITY_IMPLICATION(node->isSVGElement()); |
(...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
656 if (RenderSVGResourceContainer* stroke = m_fillStrokeData->stroke) | 655 if (RenderSVGResourceContainer* stroke = m_fillStrokeData->stroke) |
657 fprintf(stderr, " |-> Stroke : %p (node=%p)\n", stroke, stroke->
node()); | 656 fprintf(stderr, " |-> Stroke : %p (node=%p)\n", stroke, stroke->
node()); |
658 } | 657 } |
659 | 658 |
660 if (m_linkedResource) | 659 if (m_linkedResource) |
661 fprintf(stderr, " |-> xlink:href : %p (node=%p)\n", m_linkedResource, m_
linkedResource->node()); | 660 fprintf(stderr, " |-> xlink:href : %p (node=%p)\n", m_linkedResource, m_
linkedResource->node()); |
662 } | 661 } |
663 #endif | 662 #endif |
664 | 663 |
665 } | 664 } |
OLD | NEW |