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 633 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
644 | 644 |
645 SVGElement* SVGElement::correspondingElement() const { | 645 SVGElement* SVGElement::correspondingElement() const { |
646 DCHECK(!hasSVGRareData() || !svgRareData()->correspondingElement() || | 646 DCHECK(!hasSVGRareData() || !svgRareData()->correspondingElement() || |
647 containingShadowRoot()); | 647 containingShadowRoot()); |
648 return hasSVGRareData() ? svgRareData()->correspondingElement() : 0; | 648 return hasSVGRareData() ? svgRareData()->correspondingElement() : 0; |
649 } | 649 } |
650 | 650 |
651 SVGUseElement* SVGElement::correspondingUseElement() const { | 651 SVGUseElement* SVGElement::correspondingUseElement() const { |
652 if (ShadowRoot* root = containingShadowRoot()) { | 652 if (ShadowRoot* root = containingShadowRoot()) { |
653 if (isSVGUseElement(root->host()) && | 653 if (isSVGUseElement(root->host()) && |
654 (root->type() == ShadowRootType::UserAgent)) | 654 (root->type() == ShadowRootType::Closed)) |
fs
2017/03/15 13:34:45
Nit: Could you drop the redundant ()?
hayato
2017/03/16 03:57:34
Good catch. It is redundant. Done.
| |
655 return &toSVGUseElement(root->host()); | 655 return &toSVGUseElement(root->host()); |
656 } | 656 } |
657 return nullptr; | 657 return nullptr; |
658 } | 658 } |
659 | 659 |
660 void SVGElement::setCorrespondingElement(SVGElement* correspondingElement) { | 660 void SVGElement::setCorrespondingElement(SVGElement* correspondingElement) { |
661 ensureSVGRareData()->setCorrespondingElement(correspondingElement); | 661 ensureSVGRareData()->setCorrespondingElement(correspondingElement); |
662 } | 662 } |
663 | 663 |
664 bool SVGElement::inUseShadowTree() const { | 664 bool SVGElement::inUseShadowTree() const { |
(...skipping 636 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1301 visitor->trace(m_className); | 1301 visitor->trace(m_className); |
1302 Element::trace(visitor); | 1302 Element::trace(visitor); |
1303 } | 1303 } |
1304 | 1304 |
1305 const AtomicString& SVGElement::eventParameterName() { | 1305 const AtomicString& SVGElement::eventParameterName() { |
1306 DEFINE_STATIC_LOCAL(const AtomicString, evtString, ("evt")); | 1306 DEFINE_STATIC_LOCAL(const AtomicString, evtString, ("evt")); |
1307 return evtString; | 1307 return evtString; |
1308 } | 1308 } |
1309 | 1309 |
1310 } // namespace blink | 1310 } // namespace blink |
OLD | NEW |