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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 | 44 |
45 const SVGRenderStyle* svgStyle = style->svgStyle(); | 45 const SVGRenderStyle* svgStyle = style->svgStyle(); |
46 ASSERT(svgStyle); | 46 ASSERT(svgStyle); |
47 | 47 |
48 // Build a list of all resources associated with the passed RenderObject | 48 // Build a list of all resources associated with the passed RenderObject |
49 OwnPtr<SVGResources> newResources = SVGResources::buildResources(object, svg
Style); | 49 OwnPtr<SVGResources> newResources = SVGResources::buildResources(object, svg
Style); |
50 if (!newResources) | 50 if (!newResources) |
51 return; | 51 return; |
52 | 52 |
53 // Put object in cache. | 53 // Put object in cache. |
54 SVGResources* resources = m_cache.set(object, newResources.release()).iterat
or->value.get(); | 54 SVGResources* resources = m_cache.set(object, newResources.release()).stored
Value->value.get(); |
55 | 55 |
56 // Run cycle-detection _afterwards_, so self-references can be caught as wel
l. | 56 // Run cycle-detection _afterwards_, so self-references can be caught as wel
l. |
57 SVGResourcesCycleSolver solver(object, resources); | 57 SVGResourcesCycleSolver solver(object, resources); |
58 solver.resolveCycles(); | 58 solver.resolveCycles(); |
59 | 59 |
60 // Walk resources and register the render object at each resources. | 60 // Walk resources and register the render object at each resources. |
61 HashSet<RenderSVGResourceContainer*> resourceSet; | 61 HashSet<RenderSVGResourceContainer*> resourceSet; |
62 resources->buildSetOfResources(resourceSet); | 62 resources->buildSetOfResources(resourceSet); |
63 | 63 |
64 HashSet<RenderSVGResourceContainer*>::iterator end = resourceSet.end(); | 64 HashSet<RenderSVGResourceContainer*>::iterator end = resourceSet.end(); |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 // Mark users of destroyed resources as pending resolution based on the
id of the old resource. | 194 // Mark users of destroyed resources as pending resolution based on the
id of the old resource. |
195 Element* resourceElement = resource->element(); | 195 Element* resourceElement = resource->element(); |
196 Element* clientElement = toElement(it->key->node()); | 196 Element* clientElement = toElement(it->key->node()); |
197 SVGDocumentExtensions* extensions = clientElement->document().accessSVGE
xtensions(); | 197 SVGDocumentExtensions* extensions = clientElement->document().accessSVGE
xtensions(); |
198 | 198 |
199 extensions->addPendingResource(resourceElement->fastGetAttribute(HTMLNam
es::idAttr), clientElement); | 199 extensions->addPendingResource(resourceElement->fastGetAttribute(HTMLNam
es::idAttr), clientElement); |
200 } | 200 } |
201 } | 201 } |
202 | 202 |
203 } | 203 } |
OLD | NEW |