Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Nikolas Zimmermann <zimmermann@kde .org> | 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Nikolas Zimmermann <zimmermann@kde .org> |
| 3 * Copyright (C) 2004, 2005, 2006, 2008 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2006, 2008 Rob Buis <buis@kde.org> |
| 4 * Copyright (C) 2008 Apple Inc. All rights reserved. | 4 * Copyright (C) 2008 Apple Inc. All rights reserved. |
| 5 * Copyright (C) 2008 Alp Toker <alp@atoker.com> | 5 * Copyright (C) 2008 Alp Toker <alp@atoker.com> |
| 6 * Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au> | 6 * Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au> |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 456 break; | 456 break; |
| 457 | 457 |
| 458 SVGElement* element = toSVGElement(node); | 458 SVGElement* element = toSVGElement(node); |
| 459 | 459 |
| 460 // Register us in the parent element map. | 460 // Register us in the parent element map. |
| 461 element->updateRelativeLengthsInformation(hasRelativeLengths, this); | 461 element->updateRelativeLengthsInformation(hasRelativeLengths, this); |
| 462 break; | 462 break; |
| 463 } | 463 } |
| 464 } | 464 } |
| 465 | 465 |
| 466 void SVGElement::invalidateRelativeLengthClients(SubtreeLayoutScope* layoutScope ) | |
| 467 { | |
| 468 if (!inDocument()) | |
| 469 return; | |
| 470 | |
| 471 HashSet<SVGElement*>::iterator end = m_elementsWithRelativeLengths.end(); | |
| 472 for (HashSet<SVGElement*>::iterator it = m_elementsWithRelativeLengths.begin (); it != end; ++it) { | |
|
pdr.
2013/09/23 22:26:02
This always scares me. Are we sure nothing in this
f(malita)
2013/09/23 23:20:33
Pretty sure:
* the only way to modify m_elementsW
| |
| 473 if (*it == this) | |
| 474 continue; | |
| 475 | |
| 476 if ((*it)->renderer() && (*it)->selfHasRelativeLengths()) | |
| 477 (*it)->renderer()->setNeedsLayout(MarkContainingBlockChain, layoutSc ope); | |
| 478 | |
| 479 (*it)->invalidateRelativeLengthClients(layoutScope); | |
| 480 } | |
| 481 } | |
| 482 | |
| 466 SVGSVGElement* SVGElement::ownerSVGElement() const | 483 SVGSVGElement* SVGElement::ownerSVGElement() const |
| 467 { | 484 { |
| 468 ContainerNode* n = parentOrShadowHostNode(); | 485 ContainerNode* n = parentOrShadowHostNode(); |
| 469 while (n) { | 486 while (n) { |
| 470 if (n->hasTagName(SVGNames::svgTag)) | 487 if (n->hasTagName(SVGNames::svgTag)) |
| 471 return toSVGSVGElement(n); | 488 return toSVGSVGElement(n); |
| 472 | 489 |
| 473 n = n->parentOrShadowHostNode(); | 490 n = n->parentOrShadowHostNode(); |
| 474 } | 491 } |
| 475 | 492 |
| (...skipping 661 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1137 } | 1154 } |
| 1138 | 1155 |
| 1139 if (name == classAttr) | 1156 if (name == classAttr) |
| 1140 return true; | 1157 return true; |
| 1141 | 1158 |
| 1142 return animatableAttributes.contains(name); | 1159 return animatableAttributes.contains(name); |
| 1143 } | 1160 } |
| 1144 #endif | 1161 #endif |
| 1145 | 1162 |
| 1146 } | 1163 } |
| OLD | NEW |