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

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

Issue 23886003: Have HTMLElements / SVGElements constructors take a Document reference in argument (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Another Android build fix Created 7 years, 3 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
« no previous file with comments | « Source/core/svg/SVGGradientElement.h ('k') | Source/core/svg/SVGGraphicsElement.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, 2008 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2004, 2005, 2006, 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 2010. All rights reserved. 4 * Copyright (C) Research In Motion Limited 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 46
47 BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGGradientElement) 47 BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGGradientElement)
48 REGISTER_LOCAL_ANIMATED_PROPERTY(spreadMethod) 48 REGISTER_LOCAL_ANIMATED_PROPERTY(spreadMethod)
49 REGISTER_LOCAL_ANIMATED_PROPERTY(gradientUnits) 49 REGISTER_LOCAL_ANIMATED_PROPERTY(gradientUnits)
50 REGISTER_LOCAL_ANIMATED_PROPERTY(gradientTransform) 50 REGISTER_LOCAL_ANIMATED_PROPERTY(gradientTransform)
51 REGISTER_LOCAL_ANIMATED_PROPERTY(href) 51 REGISTER_LOCAL_ANIMATED_PROPERTY(href)
52 REGISTER_LOCAL_ANIMATED_PROPERTY(externalResourcesRequired) 52 REGISTER_LOCAL_ANIMATED_PROPERTY(externalResourcesRequired)
53 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGElement) 53 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGElement)
54 END_REGISTER_ANIMATED_PROPERTIES 54 END_REGISTER_ANIMATED_PROPERTIES
55 55
56 SVGGradientElement::SVGGradientElement(const QualifiedName& tagName, Document* d ocument) 56 SVGGradientElement::SVGGradientElement(const QualifiedName& tagName, Document& d ocument)
57 : SVGElement(tagName, document) 57 : SVGElement(tagName, document)
58 , m_spreadMethod(SVGSpreadMethodPad) 58 , m_spreadMethod(SVGSpreadMethodPad)
59 , m_gradientUnits(SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX) 59 , m_gradientUnits(SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX)
60 { 60 {
61 ScriptWrappable::init(this); 61 ScriptWrappable::init(this);
62 registerAnimatedPropertiesForSVGGradientElement(); 62 registerAnimatedPropertiesForSVGGradientElement();
63 } 63 }
64 64
65 bool SVGGradientElement::isSupportedAttribute(const QualifiedName& attrName) 65 bool SVGGradientElement::isSupportedAttribute(const QualifiedName& attrName)
66 { 66 {
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 float r, g, b, a; 159 float r, g, b, a;
160 color.getRGBA(r, g, b, a); 160 color.getRGBA(r, g, b, a);
161 161
162 stops.append(Gradient::ColorStop(offset, r, g, b, a)); 162 stops.append(Gradient::ColorStop(offset, r, g, b, a));
163 } 163 }
164 164
165 return stops; 165 return stops;
166 } 166 }
167 167
168 } 168 }
OLDNEW
« no previous file with comments | « Source/core/svg/SVGGradientElement.h ('k') | Source/core/svg/SVGGraphicsElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698