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

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

Issue 1461193003: Revert of [Oilpan] Prepare full definition of classes before using Member (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make patch applicable Created 5 years 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 <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 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 150
151 SVGElementRareData* SVGElement::ensureSVGRareData() 151 SVGElementRareData* SVGElement::ensureSVGRareData()
152 { 152 {
153 if (hasSVGRareData()) 153 if (hasSVGRareData())
154 return svgRareData(); 154 return svgRareData();
155 155
156 m_SVGRareData = adoptPtrWillBeNoop(new SVGElementRareData(this)); 156 m_SVGRareData = adoptPtrWillBeNoop(new SVGElementRareData(this));
157 return m_SVGRareData.get(); 157 return m_SVGRareData.get();
158 } 158 }
159 159
160 bool SVGElement::hasSVGRareData() const
161 {
162 return m_SVGRareData;
163 }
164
165 SVGElementRareData* SVGElement::svgRareData() const
166 {
167 ASSERT(m_SVGRareData);
168 return m_SVGRareData.get();
169 }
170
171 bool SVGElement::isOutermostSVGSVGElement() const 160 bool SVGElement::isOutermostSVGSVGElement() const
172 { 161 {
173 if (!isSVGSVGElement(*this)) 162 if (!isSVGSVGElement(*this))
174 return false; 163 return false;
175 164
176 // Element may not be in the document, pretend we're outermost for viewport( ), getCTM(), etc. 165 // Element may not be in the document, pretend we're outermost for viewport( ), getCTM(), etc.
177 if (!parentNode()) 166 if (!parentNode())
178 return true; 167 return true;
179 168
180 // We act like an outermost SVG element, if we're a direct child of a <forei gnObject> element. 169 // We act like an outermost SVG element, if we're a direct child of a <forei gnObject> element.
(...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after
685 return AnimatedUnknown; 674 return AnimatedUnknown;
686 } 675 }
687 676
688 void SVGElement::addToPropertyMap(PassRefPtrWillBeRawPtr<SVGAnimatedPropertyBase > passProperty) 677 void SVGElement::addToPropertyMap(PassRefPtrWillBeRawPtr<SVGAnimatedPropertyBase > passProperty)
689 { 678 {
690 RefPtrWillBeRawPtr<SVGAnimatedPropertyBase> property(passProperty); 679 RefPtrWillBeRawPtr<SVGAnimatedPropertyBase> property(passProperty);
691 QualifiedName attributeName = property->attributeName(); 680 QualifiedName attributeName = property->attributeName();
692 m_attributeToPropertyMap.set(attributeName, property.release()); 681 m_attributeToPropertyMap.set(attributeName, property.release());
693 } 682 }
694 683
695 SVGAnimatedString* SVGElement::className()
696 {
697 return m_className.get();
698 }
699
700 PassRefPtrWillBeRawPtr<SVGAnimatedPropertyBase> SVGElement::propertyFromAttribut e(const QualifiedName& attributeName) 684 PassRefPtrWillBeRawPtr<SVGAnimatedPropertyBase> SVGElement::propertyFromAttribut e(const QualifiedName& attributeName)
701 { 685 {
702 AttributeToPropertyMap::iterator it = m_attributeToPropertyMap.find<SVGAttri buteHashTranslator>(attributeName); 686 AttributeToPropertyMap::iterator it = m_attributeToPropertyMap.find<SVGAttri buteHashTranslator>(attributeName);
703 if (it == m_attributeToPropertyMap.end()) 687 if (it == m_attributeToPropertyMap.end())
704 return nullptr; 688 return nullptr;
705 689
706 return it->value; 690 return it->value;
707 } 691 }
708 692
709 bool SVGElement::isAnimatableCSSProperty(const QualifiedName& attrName) 693 bool SVGElement::isAnimatableCSSProperty(const QualifiedName& attrName)
(...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after
1175 Element::trace(visitor); 1159 Element::trace(visitor);
1176 } 1160 }
1177 1161
1178 const AtomicString& SVGElement::eventParameterName() 1162 const AtomicString& SVGElement::eventParameterName()
1179 { 1163 {
1180 DEFINE_STATIC_LOCAL(const AtomicString, evtString, ("evt", AtomicString::Con structFromLiteral)); 1164 DEFINE_STATIC_LOCAL(const AtomicString, evtString, ("evt", AtomicString::Con structFromLiteral));
1181 return evtString; 1165 return evtString;
1182 } 1166 }
1183 1167
1184 } // namespace blink 1168 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGElement.h ('k') | third_party/WebKit/Source/core/svg/SVGElementRareData.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698