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

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

Issue 678163002: Oilpan: move SVG property hierarchy to the heap. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased upto r185213 Created 6 years, 1 month 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
« no previous file with comments | « Source/core/svg/SVGMarkerElement.h ('k') | Source/core/svg/SVGMaskElement.h » ('j') | 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 <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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 m_markerHeight->setDefaultValueAsString("3"); 55 m_markerHeight->setDefaultValueAsString("3");
56 56
57 addToPropertyMap(m_refX); 57 addToPropertyMap(m_refX);
58 addToPropertyMap(m_refY); 58 addToPropertyMap(m_refY);
59 addToPropertyMap(m_markerWidth); 59 addToPropertyMap(m_markerWidth);
60 addToPropertyMap(m_markerHeight); 60 addToPropertyMap(m_markerHeight);
61 addToPropertyMap(m_orientAngle); 61 addToPropertyMap(m_orientAngle);
62 addToPropertyMap(m_markerUnits); 62 addToPropertyMap(m_markerUnits);
63 } 63 }
64 64
65 void SVGMarkerElement::trace(Visitor* visitor)
66 {
67 visitor->trace(m_refX);
68 visitor->trace(m_refY);
69 visitor->trace(m_markerWidth);
70 visitor->trace(m_markerHeight);
71 visitor->trace(m_orientAngle);
72 visitor->trace(m_markerUnits);
73 SVGElement::trace(visitor);
74 SVGFitToViewBox::trace(visitor);
75 }
76
65 DEFINE_NODE_FACTORY(SVGMarkerElement) 77 DEFINE_NODE_FACTORY(SVGMarkerElement)
66 78
67 AffineTransform SVGMarkerElement::viewBoxToViewTransform(float viewWidth, float viewHeight) const 79 AffineTransform SVGMarkerElement::viewBoxToViewTransform(float viewWidth, float viewHeight) const
68 { 80 {
69 return SVGFitToViewBox::viewBoxToViewTransform(viewBox()->currentValue()->va lue(), preserveAspectRatio()->currentValue(), viewWidth, viewHeight); 81 return SVGFitToViewBox::viewBoxToViewTransform(viewBox()->currentValue()->va lue(), preserveAspectRatio()->currentValue(), viewWidth, viewHeight);
70 } 82 }
71 83
72 bool SVGMarkerElement::isSupportedAttribute(const QualifiedName& attrName) 84 bool SVGMarkerElement::isSupportedAttribute(const QualifiedName& attrName)
73 { 85 {
74 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); 86 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ());
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 object->setNeedsLayoutAndFullPaintInvalidation(); 132 object->setNeedsLayoutAndFullPaintInvalidation();
121 } 133 }
122 134
123 void SVGMarkerElement::setOrientToAuto() 135 void SVGMarkerElement::setOrientToAuto()
124 { 136 {
125 m_orientAngle->baseValue()->orientType()->setEnumValue(SVGMarkerOrientAuto); 137 m_orientAngle->baseValue()->orientType()->setEnumValue(SVGMarkerOrientAuto);
126 invalidateSVGAttributes(); 138 invalidateSVGAttributes();
127 svgAttributeChanged(SVGNames::orientAttr); 139 svgAttributeChanged(SVGNames::orientAttr);
128 } 140 }
129 141
130 void SVGMarkerElement::setOrientToAngle(PassRefPtr<SVGAngleTearOff> angle) 142 void SVGMarkerElement::setOrientToAngle(PassRefPtrWillBeRawPtr<SVGAngleTearOff> angle)
131 { 143 {
132 ASSERT(angle); 144 ASSERT(angle);
133 RefPtr<SVGAngle> target = angle->target(); 145 RefPtrWillBeRawPtr<SVGAngle> target = angle->target();
134 m_orientAngle->baseValue()->newValueSpecifiedUnits(target->unitType(), targe t->valueInSpecifiedUnits()); 146 m_orientAngle->baseValue()->newValueSpecifiedUnits(target->unitType(), targe t->valueInSpecifiedUnits());
135 invalidateSVGAttributes(); 147 invalidateSVGAttributes();
136 svgAttributeChanged(SVGNames::orientAttr); 148 svgAttributeChanged(SVGNames::orientAttr);
137 } 149 }
138 150
139 RenderObject* SVGMarkerElement::createRenderer(RenderStyle*) 151 RenderObject* SVGMarkerElement::createRenderer(RenderStyle*)
140 { 152 {
141 return new RenderSVGResourceMarker(this); 153 return new RenderSVGResourceMarker(this);
142 } 154 }
143 155
144 bool SVGMarkerElement::selfHasRelativeLengths() const 156 bool SVGMarkerElement::selfHasRelativeLengths() const
145 { 157 {
146 return m_refX->currentValue()->isRelative() 158 return m_refX->currentValue()->isRelative()
147 || m_refY->currentValue()->isRelative() 159 || m_refY->currentValue()->isRelative()
148 || m_markerWidth->currentValue()->isRelative() 160 || m_markerWidth->currentValue()->isRelative()
149 || m_markerHeight->currentValue()->isRelative(); 161 || m_markerHeight->currentValue()->isRelative();
150 } 162 }
151 163
152 } // namespace blink 164 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/svg/SVGMarkerElement.h ('k') | Source/core/svg/SVGMaskElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698