| 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 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 return 0; | 179 return 0; |
| 180 } | 180 } |
| 181 | 181 |
| 182 RenderSVGResourceType resourceType = container->resourceType(); | 182 RenderSVGResourceType resourceType = container->resourceType(); |
| 183 if (resourceType != PatternResourceType && resourceType != LinearGradientRes
ourceType && resourceType != RadialGradientResourceType) | 183 if (resourceType != PatternResourceType && resourceType != LinearGradientRes
ourceType && resourceType != RadialGradientResourceType) |
| 184 return 0; | 184 return 0; |
| 185 | 185 |
| 186 return container; | 186 return container; |
| 187 } | 187 } |
| 188 | 188 |
| 189 static inline void registerPendingResource(SVGDocumentExtensions* extensions, co
nst AtomicString& id, SVGElement* element) | 189 static inline void registerPendingResource(SVGDocumentExtensions& extensions, co
nst AtomicString& id, SVGElement* element) |
| 190 { | 190 { |
| 191 ASSERT(element); | 191 ASSERT(element); |
| 192 extensions->addPendingResource(id, element); | 192 extensions.addPendingResource(id, element); |
| 193 } | 193 } |
| 194 | 194 |
| 195 bool SVGResources::hasResourceData() const | 195 bool SVGResources::hasResourceData() const |
| 196 { | 196 { |
| 197 return !m_clipperFilterMaskerData | 197 return !m_clipperFilterMaskerData |
| 198 && !m_markerData | 198 && !m_markerData |
| 199 && !m_fillStrokeData | 199 && !m_fillStrokeData |
| 200 && !m_linkedResource; | 200 && !m_linkedResource; |
| 201 } | 201 } |
| 202 | 202 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 216 Node* node = object->node(); | 216 Node* node = object->node(); |
| 217 ASSERT(node); | 217 ASSERT(node); |
| 218 ASSERT_WITH_SECURITY_IMPLICATION(node->isSVGElement()); | 218 ASSERT_WITH_SECURITY_IMPLICATION(node->isSVGElement()); |
| 219 | 219 |
| 220 SVGElement* element = toSVGElement(node); | 220 SVGElement* element = toSVGElement(node); |
| 221 if (!element) | 221 if (!element) |
| 222 return nullptr; | 222 return nullptr; |
| 223 | 223 |
| 224 Document& document = object->document(); | 224 Document& document = object->document(); |
| 225 | 225 |
| 226 SVGDocumentExtensions* extensions = document.accessSVGExtensions(); | 226 SVGDocumentExtensions& extensions = document.accessSVGExtensions(); |
| 227 ASSERT(extensions); | |
| 228 | 227 |
| 229 const AtomicString& tagName = element->localName(); | 228 const AtomicString& tagName = element->localName(); |
| 230 if (tagName.isNull()) | 229 if (tagName.isNull()) |
| 231 return nullptr; | 230 return nullptr; |
| 232 | 231 |
| 233 OwnPtr<SVGResources> resources; | 232 OwnPtr<SVGResources> resources; |
| 234 if (clipperFilterMaskerTags().contains(tagName)) { | 233 if (clipperFilterMaskerTags().contains(tagName)) { |
| 235 if (style->hasClipper()) { | 234 if (style->hasClipper()) { |
| 236 AtomicString id = style->clipperResource(); | 235 AtomicString id = style->clipperResource(); |
| 237 if (!ensureResources(resources)->setClipper(getRenderSVGResourceById
<RenderSVGResourceClipper>(document, id))) | 236 if (!ensureResources(resources)->setClipper(getRenderSVGResourceById
<RenderSVGResourceClipper>(document, id))) |
| (...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 700 if (RenderSVGResourceContainer* stroke = m_fillStrokeData->stroke) | 699 if (RenderSVGResourceContainer* stroke = m_fillStrokeData->stroke) |
| 701 fprintf(stderr, " |-> Stroke : %p (node=%p)\n", stroke, stroke->
element()); | 700 fprintf(stderr, " |-> Stroke : %p (node=%p)\n", stroke, stroke->
element()); |
| 702 } | 701 } |
| 703 | 702 |
| 704 if (m_linkedResource) | 703 if (m_linkedResource) |
| 705 fprintf(stderr, " |-> xlink:href : %p (node=%p)\n", m_linkedResource, m_
linkedResource->element()); | 704 fprintf(stderr, " |-> xlink:href : %p (node=%p)\n", m_linkedResource, m_
linkedResource->element()); |
| 706 } | 705 } |
| 707 #endif | 706 #endif |
| 708 | 707 |
| 709 } | 708 } |
| OLD | NEW |