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

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

Issue 153883003: [SVG] SVGAnimatedTransform{,List} migration to new SVG property impl. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: remove m_zoomAndPan Created 6 years, 10 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/SVGGraphicsElement.idl ('k') | Source/core/svg/SVGMPathElement.cpp » ('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) 2008 Eric Seidel <eric@webkit.org> 4 * Copyright (C) 2008 Eric Seidel <eric@webkit.org>
5 * Copyright (C) 2008 Dirk Schulze <krit@webkit.org> 5 * Copyright (C) 2008 Dirk Schulze <krit@webkit.org>
6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 } 116 }
117 117
118 static void setGradientAttributes(SVGGradientElement* element, LinearGradientAtt ributes& attributes, bool isLinear = true) 118 static void setGradientAttributes(SVGGradientElement* element, LinearGradientAtt ributes& attributes, bool isLinear = true)
119 { 119 {
120 if (!attributes.hasSpreadMethod() && element->spreadMethod()->isSpecified()) 120 if (!attributes.hasSpreadMethod() && element->spreadMethod()->isSpecified())
121 attributes.setSpreadMethod(element->spreadMethod()->currentValue()->enum Value()); 121 attributes.setSpreadMethod(element->spreadMethod()->currentValue()->enum Value());
122 122
123 if (!attributes.hasGradientUnits() && element->gradientUnits()->isSpecified( )) 123 if (!attributes.hasGradientUnits() && element->gradientUnits()->isSpecified( ))
124 attributes.setGradientUnits(element->gradientUnits()->currentValue()->en umValue()); 124 attributes.setGradientUnits(element->gradientUnits()->currentValue()->en umValue());
125 125
126 if (!attributes.hasGradientTransform() && element->gradientTransformSpecifie d()) { 126 if (!attributes.hasGradientTransform() && element->gradientTransform()->isSp ecified()) {
127 AffineTransform transform; 127 AffineTransform transform;
128 element->gradientTransformCurrentValue().concatenate(transform); 128 element->gradientTransform()->currentValue()->concatenate(transform);
129 attributes.setGradientTransform(transform); 129 attributes.setGradientTransform(transform);
130 } 130 }
131 131
132 if (!attributes.hasStops()) { 132 if (!attributes.hasStops()) {
133 const Vector<Gradient::ColorStop>& stops(element->buildStops()); 133 const Vector<Gradient::ColorStop>& stops(element->buildStops());
134 if (!stops.isEmpty()) 134 if (!stops.isEmpty())
135 attributes.setStops(stops); 135 attributes.setStops(stops);
136 } 136 }
137 137
138 if (isLinear) { 138 if (isLinear) {
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 189
190 bool SVGLinearGradientElement::selfHasRelativeLengths() const 190 bool SVGLinearGradientElement::selfHasRelativeLengths() const
191 { 191 {
192 return m_x1->currentValue()->isRelative() 192 return m_x1->currentValue()->isRelative()
193 || m_y1->currentValue()->isRelative() 193 || m_y1->currentValue()->isRelative()
194 || m_x2->currentValue()->isRelative() 194 || m_x2->currentValue()->isRelative()
195 || m_y2->currentValue()->isRelative(); 195 || m_y2->currentValue()->isRelative();
196 } 196 }
197 197
198 } 198 }
OLDNEW
« no previous file with comments | « Source/core/svg/SVGGraphicsElement.idl ('k') | Source/core/svg/SVGMPathElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698