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 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 302 removeFromCacheAndInvalidateDependencies(object, needsLayout); | 302 removeFromCacheAndInvalidateDependencies(object, needsLayout); |
| 303 | 303 |
| 304 // Invalidate resources in ancestor chain, if needed. | 304 // Invalidate resources in ancestor chain, if needed. |
| 305 LayoutObject* current = object->parent(); | 305 LayoutObject* current = object->parent(); |
| 306 while (current) { | 306 while (current) { |
| 307 removeFromCacheAndInvalidateDependencies(current, needsLayout); | 307 removeFromCacheAndInvalidateDependencies(current, needsLayout); |
| 308 | 308 |
| 309 if (current->isSVGResourceContainer()) { | 309 if (current->isSVGResourceContainer()) { |
| 310 // This will process the rest of the ancestors. | 310 // This will process the rest of the ancestors. |
| 311 toLayoutSVGResourceContainer(current)->removeAllClientsFromCache(); | 311 toLayoutSVGResourceContainer(current)->removeAllClientsFromCache(); |
| 312 | |
| 313 LayoutSVGResourceContainer* container = | |
|
fs
2017/01/19 13:24:41
The line just above here will call markAllClientsF
| |
| 314 toLayoutSVGResourceContainer(current); | |
| 315 | |
| 316 if (object->style()->visibility() == EVisibility::kVisible) { | |
| 317 for (auto client : container->clients()) { | |
| 318 LayoutRect boundingBox = client->visualRect(); | |
| 319 if (client->style()->visibility() == EVisibility::kVisible && | |
| 320 !boundingBox.width() && !boundingBox.height()) { | |
| 321 client->setNeedsLayout( | |
| 322 LayoutInvalidationReason::SvgResourceInvalidated); | |
| 323 } | |
| 324 } | |
| 325 } | |
| 326 | |
| 312 break; | 327 break; |
| 313 } | 328 } |
| 314 | 329 |
| 315 current = current->parent(); | 330 current = current->parent(); |
| 316 } | 331 } |
| 317 } | 332 } |
| 318 | 333 |
| 319 } // namespace blink | 334 } // namespace blink |
| OLD | NEW |