OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2006 Nikolas Zimmermann <zimmermann@kde.org> |
3 * Copyright (C) 2007 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2007 Rob Buis <buis@kde.org> |
4 * Copyright (C) 2008 Dirk Schulze <krit@webkit.org> | 4 * Copyright (C) 2008 Dirk Schulze <krit@webkit.org> |
5 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 5 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
6 * | 6 * |
7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 if (RenderObject* renderer = (*it)->renderer()) | 182 if (RenderObject* renderer = (*it)->renderer()) |
183 RenderSVGResource::markForLayoutAndParentResourceInvalidation(render
er, needsLayout); | 183 RenderSVGResource::markForLayoutAndParentResourceInvalidation(render
er, needsLayout); |
184 } | 184 } |
185 } | 185 } |
186 | 186 |
187 void RenderSVGResource::markForLayoutAndParentResourceInvalidation(RenderObject*
object, bool needsLayout) | 187 void RenderSVGResource::markForLayoutAndParentResourceInvalidation(RenderObject*
object, bool needsLayout) |
188 { | 188 { |
189 ASSERT(object); | 189 ASSERT(object); |
190 ASSERT(object->node()); | 190 ASSERT(object->node()); |
191 | 191 |
192 if (needsLayout) | 192 if (needsLayout && !object->documentBeingDestroyed()) |
193 object->setNeedsLayout(); | 193 object->setNeedsLayout(); |
194 | 194 |
195 removeFromCacheAndInvalidateDependencies(object, needsLayout); | 195 removeFromCacheAndInvalidateDependencies(object, needsLayout); |
196 | 196 |
197 // Invalidate resources in ancestor chain, if needed. | 197 // Invalidate resources in ancestor chain, if needed. |
198 RenderObject* current = object->parent(); | 198 RenderObject* current = object->parent(); |
199 while (current) { | 199 while (current) { |
200 removeFromCacheAndInvalidateDependencies(current, needsLayout); | 200 removeFromCacheAndInvalidateDependencies(current, needsLayout); |
201 | 201 |
202 if (current->isSVGResourceContainer()) { | 202 if (current->isSVGResourceContainer()) { |
203 // This will process the rest of the ancestors. | 203 // This will process the rest of the ancestors. |
204 current->toRenderSVGResourceContainer()->removeAllClientsFromCache()
; | 204 current->toRenderSVGResourceContainer()->removeAllClientsFromCache()
; |
205 break; | 205 break; |
206 } | 206 } |
207 | 207 |
208 current = current->parent(); | 208 current = current->parent(); |
209 } | 209 } |
210 } | 210 } |
211 | 211 |
212 } | 212 } |
OLD | NEW |