Chromium Code Reviews| 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 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 267 // Reference cycle: we are in process of invalidating this depen dant. | 267 // Reference cycle: we are in process of invalidating this depen dant. |
| 268 continue; | 268 continue; |
| 269 } | 269 } |
| 270 | 270 |
| 271 LayoutSVGResourceContainer::markForLayoutAndParentResourceInvalidati on(layoutObject, needsLayout); | 271 LayoutSVGResourceContainer::markForLayoutAndParentResourceInvalidati on(layoutObject, needsLayout); |
| 272 invalidatingDependencies->remove(element); | 272 invalidatingDependencies->remove(element); |
| 273 } | 273 } |
| 274 } | 274 } |
| 275 } | 275 } |
| 276 | 276 |
| 277 void LayoutSVGResourceContainer::markForLayoutAndParentResourceInvalidation(Layo utObject* object, bool needsLayout) | 277 void LayoutSVGResourceContainer::markForLayoutAndParentResourceInvalidation(Layo utObject* object, bool needsLayout, SubtreeLayoutScope* layoutScope) |
| 278 { | 278 { |
| 279 ASSERT(object); | 279 ASSERT(object); |
| 280 ASSERT(object->node()); | 280 ASSERT(object->node()); |
| 281 | 281 |
| 282 if (needsLayout && !object->documentBeingDestroyed()) | 282 if (needsLayout && !object->documentBeingDestroyed()) |
| 283 object->setNeedsLayoutAndFullPaintInvalidation(LayoutInvalidationReason: :SvgResourceInvalidated); | 283 object->setNeedsLayoutAndFullPaintInvalidation(LayoutInvalidationReason: :SvgResourceInvalidated, MarkContainerChain, layoutScope); |
|
fs
2015/04/30 13:36:47
I suppose we should work to thread the layout scop
| |
| 284 | 284 |
| 285 removeFromCacheAndInvalidateDependencies(object, needsLayout); | 285 removeFromCacheAndInvalidateDependencies(object, needsLayout); |
| 286 | 286 |
| 287 // Invalidate resources in ancestor chain, if needed. | 287 // Invalidate resources in ancestor chain, if needed. |
| 288 LayoutObject* current = object->parent(); | 288 LayoutObject* current = object->parent(); |
| 289 while (current) { | 289 while (current) { |
| 290 removeFromCacheAndInvalidateDependencies(current, needsLayout); | 290 removeFromCacheAndInvalidateDependencies(current, needsLayout); |
| 291 | 291 |
| 292 if (current->isSVGResourceContainer()) { | 292 if (current->isSVGResourceContainer()) { |
| 293 // This will process the rest of the ancestors. | 293 // This will process the rest of the ancestors. |
| 294 toLayoutSVGResourceContainer(current)->removeAllClientsFromCache(); | 294 toLayoutSVGResourceContainer(current)->removeAllClientsFromCache(); |
| 295 break; | 295 break; |
| 296 } | 296 } |
| 297 | 297 |
| 298 current = current->parent(); | 298 current = current->parent(); |
| 299 } | 299 } |
| 300 } | 300 } |
| 301 | 301 |
| 302 } | 302 } |
| OLD | NEW |