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 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 { | 193 { |
194 ASSERT(client); | 194 ASSERT(client); |
195 m_clientLayers.remove(client); | 195 m_clientLayers.remove(client); |
196 } | 196 } |
197 | 197 |
198 void RenderSVGResourceContainer::invalidateCacheAndMarkForLayout(SubtreeLayoutSc
ope* layoutScope) | 198 void RenderSVGResourceContainer::invalidateCacheAndMarkForLayout(SubtreeLayoutSc
ope* layoutScope) |
199 { | 199 { |
200 if (selfNeedsLayout()) | 200 if (selfNeedsLayout()) |
201 return; | 201 return; |
202 | 202 |
203 setNeedsLayoutAndFullRepaint(MarkContainingBlockChain, layoutScope); | 203 setNeedsLayoutAndFullPaintInvalidation(MarkContainingBlockChain, layoutScope
); |
204 | 204 |
205 if (everHadLayout()) | 205 if (everHadLayout()) |
206 removeAllClientsFromCache(); | 206 removeAllClientsFromCache(); |
207 } | 207 } |
208 | 208 |
209 void RenderSVGResourceContainer::registerResource() | 209 void RenderSVGResourceContainer::registerResource() |
210 { | 210 { |
211 SVGDocumentExtensions& extensions = svgExtensionsFromElement(element()); | 211 SVGDocumentExtensions& extensions = svgExtensionsFromElement(element()); |
212 if (!extensions.hasPendingResource(m_id)) { | 212 if (!extensions.hasPendingResource(m_id)) { |
213 extensions.addResource(m_id, this); | 213 extensions.addResource(m_id, this); |
(...skipping 10 matching lines...) Expand all Loading... |
224 for (SVGDocumentExtensions::SVGPendingElements::const_iterator it = clients-
>begin(); it != end; ++it) { | 224 for (SVGDocumentExtensions::SVGPendingElements::const_iterator it = clients-
>begin(); it != end; ++it) { |
225 ASSERT((*it)->hasPendingResources()); | 225 ASSERT((*it)->hasPendingResources()); |
226 extensions.clearHasPendingResourcesIfPossible(*it); | 226 extensions.clearHasPendingResourcesIfPossible(*it); |
227 RenderObject* renderer = (*it)->renderer(); | 227 RenderObject* renderer = (*it)->renderer(); |
228 if (!renderer) | 228 if (!renderer) |
229 continue; | 229 continue; |
230 | 230 |
231 StyleDifference diff; | 231 StyleDifference diff; |
232 diff.setNeedsFullLayout(); | 232 diff.setNeedsFullLayout(); |
233 SVGResourcesCache::clientStyleChanged(renderer, diff, renderer->style())
; | 233 SVGResourcesCache::clientStyleChanged(renderer, diff, renderer->style())
; |
234 renderer->setNeedsLayoutAndFullRepaint(); | 234 renderer->setNeedsLayoutAndFullPaintInvalidation(); |
235 } | 235 } |
236 } | 236 } |
237 | 237 |
238 static bool shouldTransformOnTextPainting(RenderObject* object, AffineTransform&
resourceTransform) | 238 static bool shouldTransformOnTextPainting(RenderObject* object, AffineTransform&
resourceTransform) |
239 { | 239 { |
240 ASSERT(object); | 240 ASSERT(object); |
241 | 241 |
242 // This method should only be called for RenderObjects that deal with text r
endering. Cmp. RenderObject.h's is*() methods. | 242 // This method should only be called for RenderObjects that deal with text r
endering. Cmp. RenderObject.h's is*() methods. |
243 ASSERT(object->isSVGText() || object->isSVGTextPath() || object->isSVGInline
()); | 243 ASSERT(object->isSVGText() || object->isSVGTextPath() || object->isSVGInline
()); |
244 | 244 |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
278 if (!object->isSVGShape()) | 278 if (!object->isSVGShape()) |
279 return resourceTransform; | 279 return resourceTransform; |
280 | 280 |
281 SVGGraphicsElement* element = toSVGGraphicsElement(object->node()); | 281 SVGGraphicsElement* element = toSVGGraphicsElement(object->node()); |
282 AffineTransform transform = element->getScreenCTM(SVGGraphicsElement::Disall
owStyleUpdate); | 282 AffineTransform transform = element->getScreenCTM(SVGGraphicsElement::Disall
owStyleUpdate); |
283 transform *= resourceTransform; | 283 transform *= resourceTransform; |
284 return transform; | 284 return transform; |
285 } | 285 } |
286 | 286 |
287 } | 287 } |
OLD | NEW |