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

Side by Side Diff: Source/core/svg/SVGMarkerElement.cpp

Issue 19097005: Remove one SVG animated type special case from the bindings generator (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix the regressions Created 7 years, 5 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 | Annotate | Revision Log
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, 2007 Rob Buis <buis@kde.org> 3 * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org>
4 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. 4 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 } 97 }
98 98
99 const AtomicString& SVGMarkerElement::orientAngleIdentifier() 99 const AtomicString& SVGMarkerElement::orientAngleIdentifier()
100 { 100 {
101 DEFINE_STATIC_LOCAL(AtomicString, s_identifier, ("SVGOrientAngle", AtomicStr ing::ConstructFromLiteral)); 101 DEFINE_STATIC_LOCAL(AtomicString, s_identifier, ("SVGOrientAngle", AtomicStr ing::ConstructFromLiteral));
102 return s_identifier; 102 return s_identifier;
103 } 103 }
104 104
105 AffineTransform SVGMarkerElement::viewBoxToViewTransform(float viewWidth, float viewHeight) const 105 AffineTransform SVGMarkerElement::viewBoxToViewTransform(float viewWidth, float viewHeight) const
106 { 106 {
107 return SVGFitToViewBox::viewBoxToViewTransform(viewBox(), preserveAspectRati o(), viewWidth, viewHeight); 107 return SVGFitToViewBox::viewBoxToViewTransform(viewBoxCurrentValue(), preser veAspectRatioCurrentValue(), viewWidth, viewHeight);
108 } 108 }
109 109
110 bool SVGMarkerElement::isSupportedAttribute(const QualifiedName& attrName) 110 bool SVGMarkerElement::isSupportedAttribute(const QualifiedName& attrName)
111 { 111 {
112 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); 112 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ());
113 if (supportedAttributes.isEmpty()) { 113 if (supportedAttributes.isEmpty()) {
114 SVGExternalResourcesRequired::addSupportedAttributes(supportedAttributes ); 114 SVGExternalResourcesRequired::addSupportedAttributes(supportedAttributes );
115 SVGFitToViewBox::addSupportedAttributes(supportedAttributes); 115 SVGFitToViewBox::addSupportedAttributes(supportedAttributes);
116 supportedAttributes.add(SVGNames::markerUnitsAttr); 116 supportedAttributes.add(SVGNames::markerUnitsAttr);
117 supportedAttributes.add(SVGNames::refXAttr); 117 supportedAttributes.add(SVGNames::refXAttr);
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 svgAttributeChanged(orientAnglePropertyInfo()->attributeName); 210 svgAttributeChanged(orientAnglePropertyInfo()->attributeName);
211 } 211 }
212 212
213 RenderObject* SVGMarkerElement::createRenderer(RenderStyle*) 213 RenderObject* SVGMarkerElement::createRenderer(RenderStyle*)
214 { 214 {
215 return new (document()->renderArena()) RenderSVGResourceMarker(this); 215 return new (document()->renderArena()) RenderSVGResourceMarker(this);
216 } 216 }
217 217
218 bool SVGMarkerElement::selfHasRelativeLengths() const 218 bool SVGMarkerElement::selfHasRelativeLengths() const
219 { 219 {
220 return refX().isRelative() 220 return refXCurrentValue().isRelative()
221 || refY().isRelative() 221 || refYCurrentValue().isRelative()
222 || markerWidth().isRelative() 222 || markerWidthCurrentValue().isRelative()
223 || markerHeight().isRelative(); 223 || markerHeightCurrentValue().isRelative();
224 } 224 }
225 225
226 void SVGMarkerElement::synchronizeOrientType(SVGElement* contextElement) 226 void SVGMarkerElement::synchronizeOrientType(SVGElement* contextElement)
227 { 227 {
228 ASSERT(contextElement); 228 ASSERT(contextElement);
229 SVGMarkerElement* ownerType = toSVGMarkerElement(contextElement); 229 SVGMarkerElement* ownerType = toSVGMarkerElement(contextElement);
230 if (!ownerType->m_orientType.shouldSynchronize) 230 if (!ownerType->m_orientType.shouldSynchronize)
231 return; 231 return;
232 232
233 // If orient is not auto, the previous call to synchronizeOrientAngle alread y set the orientAttr to the right angle. 233 // If orient is not auto, the previous call to synchronizeOrientAngle alread y set the orientAttr to the right angle.
234 if (ownerType->m_orientType.value != SVGMarkerOrientAuto) 234 if (ownerType->m_orientType.value != SVGMarkerOrientAuto)
235 return; 235 return;
236 236
237 DEFINE_STATIC_LOCAL(AtomicString, autoString, ("auto", AtomicString::Constru ctFromLiteral)); 237 DEFINE_STATIC_LOCAL(AtomicString, autoString, ("auto", AtomicString::Constru ctFromLiteral));
238 ownerType->m_orientType.synchronize(ownerType, orientTypePropertyInfo()->att ributeName, autoString); 238 ownerType->m_orientType.synchronize(ownerType, orientTypePropertyInfo()->att ributeName, autoString);
239 } 239 }
240 240
241 PassRefPtr<SVGAnimatedProperty> SVGMarkerElement::lookupOrCreateOrientTypeWrappe r(SVGElement* contextElement) 241 PassRefPtr<SVGAnimatedProperty> SVGMarkerElement::lookupOrCreateOrientTypeWrappe r(SVGElement* contextElement)
242 { 242 {
243 ASSERT(contextElement); 243 ASSERT(contextElement);
244 SVGMarkerElement* ownerType = toSVGMarkerElement(contextElement); 244 SVGMarkerElement* ownerType = toSVGMarkerElement(contextElement);
245 return SVGAnimatedProperty::lookupOrCreateWrapper<SVGMarkerElement, SVGAnima tedEnumerationPropertyTearOff<SVGMarkerOrientType>, SVGMarkerOrientType> 245 return SVGAnimatedProperty::lookupOrCreateWrapper<SVGMarkerElement, SVGAnima tedEnumerationPropertyTearOff<SVGMarkerOrientType>, SVGMarkerOrientType>
246 (ownerType, orientTypePropertyInfo(), ownerType->m_orientType.value); 246 (ownerType, orientTypePropertyInfo(), ownerType->m_orientType.value);
247 } 247 }
248 248
249 PassRefPtr<SVGAnimatedEnumerationPropertyTearOff<SVGMarkerOrientType> > SVGMarke rElement::orientTypeAnimated() 249 PassRefPtr<SVGAnimatedEnumerationPropertyTearOff<SVGMarkerOrientType> > SVGMarke rElement::orientType()
250 { 250 {
251 m_orientType.shouldSynchronize = true; 251 m_orientType.shouldSynchronize = true;
252 return static_pointer_cast<SVGAnimatedEnumerationPropertyTearOff<SVGMarkerOr ientType> >(lookupOrCreateOrientTypeWrapper(this)); 252 return static_pointer_cast<SVGAnimatedEnumerationPropertyTearOff<SVGMarkerOr ientType> >(lookupOrCreateOrientTypeWrapper(this));
253 } 253 }
254 254
255 } 255 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698