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

Side by Side Diff: Source/core/rendering/svg/SVGResources.cpp

Issue 21042009: [SVG2] Merge SVGStyledElement into SVGElement (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master 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/rendering/svg/SVGRenderSupport.cpp ('k') | Source/core/svg/SVGAElement.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) 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
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
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 }
OLDNEW
« no previous file with comments | « Source/core/rendering/svg/SVGRenderSupport.cpp ('k') | Source/core/svg/SVGAElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698