Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(505)

Side by Side Diff: third_party/WebKit/Source/core/svg/SVGElement.cpp

Issue 2752763002: Change the type of a SVG <use> element's shadow tree from "user agent" to "closed" (Closed)
Patch Set: Rebased and resolve a conflict in HitTestResult Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 632 matching lines...) Expand 10 before | Expand all | Expand 10 after
643 } 643 }
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))
655 return &toSVGUseElement(root->host()); 654 return &toSVGUseElement(root->host());
656 } 655 }
657 return nullptr; 656 return nullptr;
658 } 657 }
659 658
660 void SVGElement::setCorrespondingElement(SVGElement* correspondingElement) { 659 void SVGElement::setCorrespondingElement(SVGElement* correspondingElement) {
661 ensureSVGRareData()->setCorrespondingElement(correspondingElement); 660 ensureSVGRareData()->setCorrespondingElement(correspondingElement);
662 } 661 }
663 662
664 bool SVGElement::inUseShadowTree() const { 663 bool SVGElement::inUseShadowTree() const {
(...skipping 636 matching lines...) Expand 10 before | Expand all | Expand 10 after
1301 visitor->trace(m_className); 1300 visitor->trace(m_className);
1302 Element::trace(visitor); 1301 Element::trace(visitor);
1303 } 1302 }
1304 1303
1305 const AtomicString& SVGElement::eventParameterName() { 1304 const AtomicString& SVGElement::eventParameterName() {
1306 DEFINE_STATIC_LOCAL(const AtomicString, evtString, ("evt")); 1305 DEFINE_STATIC_LOCAL(const AtomicString, evtString, ("evt"));
1307 return evtString; 1306 return evtString;
1308 } 1307 }
1309 1308
1310 } // namespace blink 1309 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/HitTestResult.cpp ('k') | third_party/WebKit/Source/core/svg/SVGUseElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698