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

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

Issue 2478233002: Make 'transform' a presentation attribute on SVG elements (Closed)
Patch Set: Updated expectations Created 4 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
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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 RadialGradientAttributes& attributes, 107 RadialGradientAttributes& attributes,
108 bool isRadial = true) { 108 bool isRadial = true) {
109 if (!attributes.hasSpreadMethod() && element->spreadMethod()->isSpecified()) 109 if (!attributes.hasSpreadMethod() && element->spreadMethod()->isSpecified())
110 attributes.setSpreadMethod( 110 attributes.setSpreadMethod(
111 element->spreadMethod()->currentValue()->enumValue()); 111 element->spreadMethod()->currentValue()->enumValue());
112 112
113 if (!attributes.hasGradientUnits() && element->gradientUnits()->isSpecified()) 113 if (!attributes.hasGradientUnits() && element->gradientUnits()->isSpecified())
114 attributes.setGradientUnits( 114 attributes.setGradientUnits(
115 element->gradientUnits()->currentValue()->enumValue()); 115 element->gradientUnits()->currentValue()->enumValue());
116 116
117 if (!attributes.hasGradientTransform() && 117 if (!attributes.hasGradientTransform() && element->hasTransform())
118 element->gradientTransform()->isSpecified()) { 118 attributes.setGradientTransform(element->calculateTransform());
119 AffineTransform transform;
120 element->gradientTransform()->currentValue()->concatenate(transform);
121 attributes.setGradientTransform(transform);
122 }
123 119
124 if (!attributes.hasStops()) { 120 if (!attributes.hasStops()) {
125 const Vector<Gradient::ColorStop>& stops(element->buildStops()); 121 const Vector<Gradient::ColorStop>& stops(element->buildStops());
126 if (!stops.isEmpty()) 122 if (!stops.isEmpty())
127 attributes.setStops(stops); 123 attributes.setStops(stops);
128 } 124 }
129 125
130 if (isRadial) { 126 if (isRadial) {
131 SVGRadialGradientElement* radial = toSVGRadialGradientElement(element); 127 SVGRadialGradientElement* radial = toSVGRadialGradientElement(element);
132 128
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 bool SVGRadialGradientElement::selfHasRelativeLengths() const { 192 bool SVGRadialGradientElement::selfHasRelativeLengths() const {
197 return m_cx->currentValue()->isRelative() || 193 return m_cx->currentValue()->isRelative() ||
198 m_cy->currentValue()->isRelative() || 194 m_cy->currentValue()->isRelative() ||
199 m_r->currentValue()->isRelative() || 195 m_r->currentValue()->isRelative() ||
200 m_fx->currentValue()->isRelative() || 196 m_fx->currentValue()->isRelative() ||
201 m_fy->currentValue()->isRelative() || 197 m_fy->currentValue()->isRelative() ||
202 m_fr->currentValue()->isRelative(); 198 m_fr->currentValue()->isRelative();
203 } 199 }
204 200
205 } // namespace blink 201 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698