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

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

Issue 966923003: Make SVGLengthMode an enum class (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 9 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/SVGLineElement.cpp ('k') | Source/core/svg/SVGMarkerElement.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 14 matching lines...) Expand all
25 #include "core/svg/SVGLinearGradientElement.h" 25 #include "core/svg/SVGLinearGradientElement.h"
26 26
27 #include "core/layout/svg/LayoutSVGResourceLinearGradient.h" 27 #include "core/layout/svg/LayoutSVGResourceLinearGradient.h"
28 #include "core/svg/LinearGradientAttributes.h" 28 #include "core/svg/LinearGradientAttributes.h"
29 #include "core/svg/SVGLength.h" 29 #include "core/svg/SVGLength.h"
30 30
31 namespace blink { 31 namespace blink {
32 32
33 inline SVGLinearGradientElement::SVGLinearGradientElement(Document& document) 33 inline SVGLinearGradientElement::SVGLinearGradientElement(Document& document)
34 : SVGGradientElement(SVGNames::linearGradientTag, document) 34 : SVGGradientElement(SVGNames::linearGradientTag, document)
35 , m_x1(SVGAnimatedLength::create(this, SVGNames::x1Attr, SVGLength::create(L engthModeWidth), AllowNegativeLengths)) 35 , m_x1(SVGAnimatedLength::create(this, SVGNames::x1Attr, SVGLength::create(S VGLengthMode::Width), AllowNegativeLengths))
36 , m_y1(SVGAnimatedLength::create(this, SVGNames::y1Attr, SVGLength::create(L engthModeHeight), AllowNegativeLengths)) 36 , m_y1(SVGAnimatedLength::create(this, SVGNames::y1Attr, SVGLength::create(S VGLengthMode::Height), AllowNegativeLengths))
37 , m_x2(SVGAnimatedLength::create(this, SVGNames::x2Attr, SVGLength::create(L engthModeWidth), AllowNegativeLengths)) 37 , m_x2(SVGAnimatedLength::create(this, SVGNames::x2Attr, SVGLength::create(S VGLengthMode::Width), AllowNegativeLengths))
38 , m_y2(SVGAnimatedLength::create(this, SVGNames::y2Attr, SVGLength::create(L engthModeHeight), AllowNegativeLengths)) 38 , m_y2(SVGAnimatedLength::create(this, SVGNames::y2Attr, SVGLength::create(S VGLengthMode::Height), AllowNegativeLengths))
39 { 39 {
40 // Spec: If the x2 attribute is not specified, the effect is as if a value o f "100%" were specified. 40 // Spec: If the x2 attribute is not specified, the effect is as if a value o f "100%" were specified.
41 m_x2->setDefaultValueAsString("100%"); 41 m_x2->setDefaultValueAsString("100%");
42 42
43 addToPropertyMap(m_x1); 43 addToPropertyMap(m_x1);
44 addToPropertyMap(m_y1); 44 addToPropertyMap(m_y1);
45 addToPropertyMap(m_x2); 45 addToPropertyMap(m_x2);
46 addToPropertyMap(m_y2); 46 addToPropertyMap(m_y2);
47 } 47 }
48 48
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 169
170 bool SVGLinearGradientElement::selfHasRelativeLengths() const 170 bool SVGLinearGradientElement::selfHasRelativeLengths() const
171 { 171 {
172 return m_x1->currentValue()->isRelative() 172 return m_x1->currentValue()->isRelative()
173 || m_y1->currentValue()->isRelative() 173 || m_y1->currentValue()->isRelative()
174 || m_x2->currentValue()->isRelative() 174 || m_x2->currentValue()->isRelative()
175 || m_y2->currentValue()->isRelative(); 175 || m_y2->currentValue()->isRelative();
176 } 176 }
177 177
178 } // namespace blink 178 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/svg/SVGLineElement.cpp ('k') | Source/core/svg/SVGMarkerElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698