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

Side by Side Diff: Source/core/svg/SVGPatternElement.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/SVGMaskElement.cpp ('k') | Source/core/svg/SVGRadialGradientElement.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, 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 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 14 matching lines...) Expand all
25 #include "core/XLinkNames.h" 25 #include "core/XLinkNames.h"
26 #include "core/dom/ElementTraversal.h" 26 #include "core/dom/ElementTraversal.h"
27 #include "core/layout/svg/LayoutSVGResourcePattern.h" 27 #include "core/layout/svg/LayoutSVGResourcePattern.h"
28 #include "core/svg/PatternAttributes.h" 28 #include "core/svg/PatternAttributes.h"
29 #include "platform/transforms/AffineTransform.h" 29 #include "platform/transforms/AffineTransform.h"
30 30
31 namespace blink { 31 namespace blink {
32 32
33 inline SVGPatternElement::SVGPatternElement(Document& document) 33 inline SVGPatternElement::SVGPatternElement(Document& document)
34 : SVGElement(SVGNames::patternTag, document) 34 : SVGElement(SVGNames::patternTag, document)
35 , m_x(SVGAnimatedLength::create(this, SVGNames::xAttr, SVGLength::create(Len gthModeWidth), AllowNegativeLengths)) 35 , m_x(SVGAnimatedLength::create(this, SVGNames::xAttr, SVGLength::create(SVG LengthMode::Width), AllowNegativeLengths))
36 , m_y(SVGAnimatedLength::create(this, SVGNames::yAttr, SVGLength::create(Len gthModeHeight), AllowNegativeLengths)) 36 , m_y(SVGAnimatedLength::create(this, SVGNames::yAttr, SVGLength::create(SVG LengthMode::Height), AllowNegativeLengths))
37 , m_width(SVGAnimatedLength::create(this, SVGNames::widthAttr, SVGLength::cr eate(LengthModeWidth), ForbidNegativeLengths)) 37 , m_width(SVGAnimatedLength::create(this, SVGNames::widthAttr, SVGLength::cr eate(SVGLengthMode::Width), ForbidNegativeLengths))
38 , m_height(SVGAnimatedLength::create(this, SVGNames::heightAttr, SVGLength:: create(LengthModeHeight), ForbidNegativeLengths)) 38 , m_height(SVGAnimatedLength::create(this, SVGNames::heightAttr, SVGLength:: create(SVGLengthMode::Height), ForbidNegativeLengths))
39 , m_patternTransform(SVGAnimatedTransformList::create(this, SVGNames::patter nTransformAttr, SVGTransformList::create())) 39 , m_patternTransform(SVGAnimatedTransformList::create(this, SVGNames::patter nTransformAttr, SVGTransformList::create()))
40 , m_patternUnits(SVGAnimatedEnumeration<SVGUnitTypes::SVGUnitType>::create(t his, SVGNames::patternUnitsAttr, SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX)) 40 , m_patternUnits(SVGAnimatedEnumeration<SVGUnitTypes::SVGUnitType>::create(t his, SVGNames::patternUnitsAttr, SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX))
41 , m_patternContentUnits(SVGAnimatedEnumeration<SVGUnitTypes::SVGUnitType>::c reate(this, SVGNames::patternContentUnitsAttr, SVGUnitTypes::SVG_UNIT_TYPE_USERS PACEONUSE)) 41 , m_patternContentUnits(SVGAnimatedEnumeration<SVGUnitTypes::SVGUnitType>::c reate(this, SVGNames::patternContentUnitsAttr, SVGUnitTypes::SVG_UNIT_TYPE_USERS PACEONUSE))
42 { 42 {
43 SVGURIReference::initialize(this); 43 SVGURIReference::initialize(this);
44 SVGTests::initialize(this); 44 SVGTests::initialize(this);
45 SVGFitToViewBox::initialize(this); 45 SVGFitToViewBox::initialize(this);
46 46
47 addToPropertyMap(m_x); 47 addToPropertyMap(m_x);
48 addToPropertyMap(m_y); 48 addToPropertyMap(m_y);
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 231
232 bool SVGPatternElement::selfHasRelativeLengths() const 232 bool SVGPatternElement::selfHasRelativeLengths() const
233 { 233 {
234 return m_x->currentValue()->isRelative() 234 return m_x->currentValue()->isRelative()
235 || m_y->currentValue()->isRelative() 235 || m_y->currentValue()->isRelative()
236 || m_width->currentValue()->isRelative() 236 || m_width->currentValue()->isRelative()
237 || m_height->currentValue()->isRelative(); 237 || m_height->currentValue()->isRelative();
238 } 238 }
239 239
240 } // namespace blink 240 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/svg/SVGMaskElement.cpp ('k') | Source/core/svg/SVGRadialGradientElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698