| 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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 ASSERT(renderer); | 115 ASSERT(renderer); |
| 116 return renderer->node() && renderer->node()->isSVGElement() && !renderer->is
SVGInlineText(); | 116 return renderer->node() && renderer->node()->isSVGElement() && !renderer->is
SVGInlineText(); |
| 117 } | 117 } |
| 118 | 118 |
| 119 void SVGResourcesCache::clientStyleChanged(RenderObject* renderer, StyleDifferen
ce diff, const RenderStyle* newStyle) | 119 void SVGResourcesCache::clientStyleChanged(RenderObject* renderer, StyleDifferen
ce diff, const RenderStyle* newStyle) |
| 120 { | 120 { |
| 121 ASSERT(renderer); | 121 ASSERT(renderer); |
| 122 ASSERT(renderer->node()); | 122 ASSERT(renderer->node()); |
| 123 ASSERT(renderer->node()->isSVGElement()); | 123 ASSERT(renderer->node()->isSVGElement()); |
| 124 | 124 |
| 125 if (diff.hasNoChange() || !renderer->parent()) | 125 if (!diff.hasDifference() || !renderer->parent()) |
| 126 return; | 126 return; |
| 127 | 127 |
| 128 // In this case the proper SVGFE*Element will decide whether the modified CS
S properties require a relayout or repaint. | 128 // In this case the proper SVGFE*Element will decide whether the modified CS
S properties require a relayout or repaint. |
| 129 if (renderer->isSVGResourceFilterPrimitive() && !diff.needsLayout()) | 129 if (renderer->isSVGResourceFilterPrimitive() && !diff.needsLayout()) |
| 130 return; | 130 return; |
| 131 | 131 |
| 132 // Dynamic changes of CSS properties like 'clip-path' may require us to reco
mpute the associated resources for a renderer. | 132 // Dynamic changes of CSS properties like 'clip-path' may require us to reco
mpute the associated resources for a renderer. |
| 133 // FIXME: Avoid passing in a useless StyleDifference, but instead compare ol
dStyle/newStyle to see which resources changed | 133 // FIXME: Avoid passing in a useless StyleDifference, but instead compare ol
dStyle/newStyle to see which resources changed |
| 134 // to be able to selectively rebuild individual resources, instead of all of
them. | 134 // to be able to selectively rebuild individual resources, instead of all of
them. |
| 135 if (rendererCanHaveResources(renderer)) { | 135 if (rendererCanHaveResources(renderer)) { |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 // Mark users of destroyed resources as pending resolution based on the
id of the old resource. | 192 // Mark users of destroyed resources as pending resolution based on the
id of the old resource. |
| 193 Element* resourceElement = resource->element(); | 193 Element* resourceElement = resource->element(); |
| 194 Element* clientElement = toElement(it->key->node()); | 194 Element* clientElement = toElement(it->key->node()); |
| 195 SVGDocumentExtensions& extensions = clientElement->document().accessSVGE
xtensions(); | 195 SVGDocumentExtensions& extensions = clientElement->document().accessSVGE
xtensions(); |
| 196 | 196 |
| 197 extensions.addPendingResource(resourceElement->fastGetAttribute(HTMLName
s::idAttr), clientElement); | 197 extensions.addPendingResource(resourceElement->fastGetAttribute(HTMLName
s::idAttr), clientElement); |
| 198 } | 198 } |
| 199 } | 199 } |
| 200 | 200 |
| 201 } | 201 } |
| OLD | NEW |