| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Nikolas Zimmermann | 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Nikolas Zimmermann |
| 3 * <zimmermann@kde.org> | 3 * <zimmermann@kde.org> |
| 4 * Copyright (C) 2004, 2005, 2006, 2008 Rob Buis <buis@kde.org> | 4 * Copyright (C) 2004, 2005, 2006, 2008 Rob Buis <buis@kde.org> |
| 5 * Copyright (C) 2008 Apple Inc. All rights reserved. | 5 * Copyright (C) 2008 Apple Inc. All rights reserved. |
| 6 * Copyright (C) 2008 Alp Toker <alp@atoker.com> | 6 * Copyright (C) 2008 Alp Toker <alp@atoker.com> |
| 7 * Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au> | 7 * Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au> |
| 8 * | 8 * |
| 9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
| 10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
| (...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 533 // notification. | 533 // notification. |
| 534 if (hadRelativeLengths == currentElement.hasRelativeLengths()) | 534 if (hadRelativeLengths == currentElement.hasRelativeLengths()) |
| 535 return; | 535 return; |
| 536 | 536 |
| 537 clientElement = ¤tElement; | 537 clientElement = ¤tElement; |
| 538 clientHasRelativeLengths = clientElement->hasRelativeLengths(); | 538 clientHasRelativeLengths = clientElement->hasRelativeLengths(); |
| 539 } | 539 } |
| 540 | 540 |
| 541 // Register root SVG elements for top level viewport change notifications. | 541 // Register root SVG elements for top level viewport change notifications. |
| 542 if (isSVGSVGElement(*clientElement)) { | 542 if (isSVGSVGElement(*clientElement)) { |
| 543 SVGDocumentExtensions& svgExtensions = accessDocumentSVGExtensions(); | 543 SVGDocumentExtensions& svgExtensions = document().accessSVGExtensions(); |
| 544 if (clientElement->hasRelativeLengths()) | 544 if (clientElement->hasRelativeLengths()) |
| 545 svgExtensions.addSVGRootWithRelativeLengthDescendents( | 545 svgExtensions.addSVGRootWithRelativeLengthDescendents( |
| 546 toSVGSVGElement(clientElement)); | 546 toSVGSVGElement(clientElement)); |
| 547 else | 547 else |
| 548 svgExtensions.removeSVGRootWithRelativeLengthDescendents( | 548 svgExtensions.removeSVGRootWithRelativeLengthDescendents( |
| 549 toSVGSVGElement(clientElement)); | 549 toSVGSVGElement(clientElement)); |
| 550 } | 550 } |
| 551 } | 551 } |
| 552 | 552 |
| 553 void SVGElement::invalidateRelativeLengthClients( | 553 void SVGElement::invalidateRelativeLengthClients( |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 596 while (n) { | 596 while (n) { |
| 597 if (isSVGSVGElement(*n) || isSVGImageElement(*n) || isSVGSymbolElement(*n)) | 597 if (isSVGSVGElement(*n) || isSVGImageElement(*n) || isSVGSymbolElement(*n)) |
| 598 return toSVGElement(n); | 598 return toSVGElement(n); |
| 599 | 599 |
| 600 n = n->parentOrShadowHostNode(); | 600 n = n->parentOrShadowHostNode(); |
| 601 } | 601 } |
| 602 | 602 |
| 603 return nullptr; | 603 return nullptr; |
| 604 } | 604 } |
| 605 | 605 |
| 606 SVGDocumentExtensions& SVGElement::accessDocumentSVGExtensions() { | |
| 607 // This function is provided for use by SVGAnimatedProperty to avoid | |
| 608 // global inclusion of core/dom/Document.h in SVG code. | |
| 609 return document().accessSVGExtensions(); | |
| 610 } | |
| 611 | |
| 612 void SVGElement::mapInstanceToElement(SVGElement* instance) { | 606 void SVGElement::mapInstanceToElement(SVGElement* instance) { |
| 613 ASSERT(instance); | 607 ASSERT(instance); |
| 614 ASSERT(instance->inUseShadowTree()); | 608 ASSERT(instance->inUseShadowTree()); |
| 615 | 609 |
| 616 HeapHashSet<WeakMember<SVGElement>>& instances = | 610 HeapHashSet<WeakMember<SVGElement>>& instances = |
| 617 ensureSVGRareData()->elementInstances(); | 611 ensureSVGRareData()->elementInstances(); |
| 618 ASSERT(!instances.contains(instance)); | 612 ASSERT(!instances.contains(instance)); |
| 619 | 613 |
| 620 instances.add(instance); | 614 instances.add(instance); |
| 621 } | 615 } |
| (...skipping 687 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1309 visitor->trace(m_className); | 1303 visitor->trace(m_className); |
| 1310 Element::trace(visitor); | 1304 Element::trace(visitor); |
| 1311 } | 1305 } |
| 1312 | 1306 |
| 1313 const AtomicString& SVGElement::eventParameterName() { | 1307 const AtomicString& SVGElement::eventParameterName() { |
| 1314 DEFINE_STATIC_LOCAL(const AtomicString, evtString, ("evt")); | 1308 DEFINE_STATIC_LOCAL(const AtomicString, evtString, ("evt")); |
| 1315 return evtString; | 1309 return evtString; |
| 1316 } | 1310 } |
| 1317 | 1311 |
| 1318 } // namespace blink | 1312 } // namespace blink |
| OLD | NEW |