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

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

Issue 2877973002: Use CorrespondingUseElement() in SVGElement::TreeScopeForIdResolution (Closed)
Patch Set: Created 3 years, 7 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
« no previous file with comments | « third_party/WebKit/LayoutTests/svg/custom/use-external-local-fill-expected.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 } 81 }
82 82
83 void SVGElement::AttachLayoutTree(const AttachContext& context) { 83 void SVGElement::AttachLayoutTree(const AttachContext& context) {
84 Element::AttachLayoutTree(context); 84 Element::AttachLayoutTree(context);
85 if (SVGElement* element = CorrespondingElement()) 85 if (SVGElement* element = CorrespondingElement())
86 element->MapInstanceToElement(this); 86 element->MapInstanceToElement(this);
87 } 87 }
88 88
89 TreeScope& SVGElement::TreeScopeForIdResolution() const { 89 TreeScope& SVGElement::TreeScopeForIdResolution() const {
90 const SVGElement* tree_scope_element = this; 90 const SVGElement* tree_scope_element = this;
91 if (const SVGElement* element = CorrespondingElement()) 91 if (const SVGElement* element = CorrespondingUseElement())
92 tree_scope_element = element; 92 tree_scope_element = element;
93 return tree_scope_element->GetTreeScope(); 93 return tree_scope_element->GetTreeScope();
94 } 94 }
95 95
96 int SVGElement::tabIndex() const { 96 int SVGElement::tabIndex() const {
97 if (SupportsFocus()) 97 if (SupportsFocus())
98 return Element::tabIndex(); 98 return Element::tabIndex();
99 return -1; 99 return -1;
100 } 100 }
101 101
(...skipping 1237 matching lines...) Expand 10 before | Expand all | Expand 10 after
1339 visitor->Trace(class_name_); 1339 visitor->Trace(class_name_);
1340 Element::Trace(visitor); 1340 Element::Trace(visitor);
1341 } 1341 }
1342 1342
1343 const AtomicString& SVGElement::EventParameterName() { 1343 const AtomicString& SVGElement::EventParameterName() {
1344 DEFINE_STATIC_LOCAL(const AtomicString, evt_string, ("evt")); 1344 DEFINE_STATIC_LOCAL(const AtomicString, evt_string, ("evt"));
1345 return evt_string; 1345 return evt_string;
1346 } 1346 }
1347 1347
1348 } // namespace blink 1348 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/svg/custom/use-external-local-fill-expected.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698