Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(362)

Side by Side Diff: Source/core/rendering/svg/RenderSVGResource.cpp

Issue 23531032: RenderSVGResource shouldn't trigger relayout during render tree teardown (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698