| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006 Apple Computer, Inc. | 2 * Copyright (C) 2006 Apple Computer, Inc. |
| 3 * Copyright (C) 2006 Alexander Kellett <lypanov@kde.org> | 3 * Copyright (C) 2006 Alexander Kellett <lypanov@kde.org> |
| 4 * Copyright (C) 2006 Oliver Hunt <ojh16@student.canterbury.ac.nz> | 4 * Copyright (C) 2006 Oliver Hunt <ojh16@student.canterbury.ac.nz> |
| 5 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> | 5 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> |
| 6 * Copyright (C) 2008 Rob Buis <buis@kde.org> | 6 * Copyright (C) 2008 Rob Buis <buis@kde.org> |
| 7 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> | 7 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> |
| 8 * Copyright (C) Research In Motion Limited 2010-2012. All rights reserved. | 8 * Copyright (C) Research In Motion Limited 2010-2012. All rights reserved. |
| 9 * Copyright (C) 2012 Google Inc. | 9 * Copyright (C) 2012 Google Inc. |
| 10 * | 10 * |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 | 189 |
| 190 if (previous) | 190 if (previous) |
| 191 m_layoutAttributesBuilder.buildLayoutAttributesForTextRenderer(p
revious->context()); | 191 m_layoutAttributesBuilder.buildLayoutAttributesForTextRenderer(p
revious->context()); |
| 192 m_layoutAttributesBuilder.buildLayoutAttributesForTextRenderer(attri
butes->context()); | 192 m_layoutAttributesBuilder.buildLayoutAttributesForTextRenderer(attri
butes->context()); |
| 193 if (next) | 193 if (next) |
| 194 m_layoutAttributesBuilder.buildLayoutAttributesForTextRenderer(n
ext->context()); | 194 m_layoutAttributesBuilder.buildLayoutAttributesForTextRenderer(n
ext->context()); |
| 195 break; | 195 break; |
| 196 } | 196 } |
| 197 } | 197 } |
| 198 | 198 |
| 199 #ifndef NDEBUG | 199 #if ENABLE(ASSERT) |
| 200 // Verify that m_layoutAttributes only differs by a maximum of one entry. | 200 // Verify that m_layoutAttributes only differs by a maximum of one entry. |
| 201 for (size_t i = 0; i < size; ++i) | 201 for (size_t i = 0; i < size; ++i) |
| 202 ASSERT(m_layoutAttributes.find(newLayoutAttributes[i]) != kNotFound || n
ewLayoutAttributes[i] == attributes); | 202 ASSERT(m_layoutAttributes.find(newLayoutAttributes[i]) != kNotFound || n
ewLayoutAttributes[i] == attributes); |
| 203 #endif | 203 #endif |
| 204 | 204 |
| 205 m_layoutAttributes = newLayoutAttributes; | 205 m_layoutAttributes = newLayoutAttributes; |
| 206 } | 206 } |
| 207 | 207 |
| 208 static inline void checkLayoutAttributesConsistency(RenderSVGText* text, Vector<
SVGTextLayoutAttributes*>& expectedLayoutAttributes) | 208 static inline void checkLayoutAttributesConsistency(RenderSVGText* text, Vector<
SVGTextLayoutAttributes*>& expectedLayoutAttributes) |
| 209 { | 209 { |
| 210 #ifndef NDEBUG | 210 #if ENABLE(ASSERT) |
| 211 Vector<SVGTextLayoutAttributes*> newLayoutAttributes; | 211 Vector<SVGTextLayoutAttributes*> newLayoutAttributes; |
| 212 collectLayoutAttributes(text, newLayoutAttributes); | 212 collectLayoutAttributes(text, newLayoutAttributes); |
| 213 ASSERT(newLayoutAttributes == expectedLayoutAttributes); | 213 ASSERT(newLayoutAttributes == expectedLayoutAttributes); |
| 214 #endif | 214 #endif |
| 215 } | 215 } |
| 216 | 216 |
| 217 void RenderSVGText::willBeDestroyed() | 217 void RenderSVGText::willBeDestroyed() |
| 218 { | 218 { |
| 219 m_layoutAttributes.clear(); | 219 m_layoutAttributes.clear(); |
| 220 m_layoutAttributesBuilder.clearTextPositioningElements(); | 220 m_layoutAttributesBuilder.clearTextPositioningElements(); |
| (...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 528 SVGResourcesCache::clientWillBeRemovedFromTree(child); | 528 SVGResourcesCache::clientWillBeRemovedFromTree(child); |
| 529 | 529 |
| 530 Vector<SVGTextLayoutAttributes*, 2> affectedAttributes; | 530 Vector<SVGTextLayoutAttributes*, 2> affectedAttributes; |
| 531 FontCachePurgePreventer fontCachePurgePreventer; | 531 FontCachePurgePreventer fontCachePurgePreventer; |
| 532 subtreeChildWillBeRemoved(child, affectedAttributes); | 532 subtreeChildWillBeRemoved(child, affectedAttributes); |
| 533 RenderSVGBlock::removeChild(child); | 533 RenderSVGBlock::removeChild(child); |
| 534 subtreeChildWasRemoved(affectedAttributes); | 534 subtreeChildWasRemoved(affectedAttributes); |
| 535 } | 535 } |
| 536 | 536 |
| 537 } | 537 } |
| OLD | NEW |