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

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

Issue 1491023003: Refactor SVGAnimatedLength negative values mode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Replace SVGLengthNegativeValuesMode enum with bool Created 5 years 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, 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 17 matching lines...) Expand all
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 , SVGURIReference(this) 35 , SVGURIReference(this)
36 , SVGTests(this) 36 , SVGTests(this)
37 , SVGFitToViewBox(this) 37 , SVGFitToViewBox(this)
38 , m_x(SVGAnimatedLength::create(this, SVGNames::xAttr, SVGLength::create(SVG LengthMode::Width), AllowNegativeLengths)) 38 , m_x(SVGAnimatedLength::create(this, SVGNames::xAttr, SVGLength::create(SVG LengthMode::Width)))
39 , m_y(SVGAnimatedLength::create(this, SVGNames::yAttr, SVGLength::create(SVG LengthMode::Height), AllowNegativeLengths)) 39 , m_y(SVGAnimatedLength::create(this, SVGNames::yAttr, SVGLength::create(SVG LengthMode::Height)))
40 , m_width(SVGAnimatedLength::create(this, SVGNames::widthAttr, SVGLength::cr eate(SVGLengthMode::Width), ForbidNegativeLengths)) 40 , m_width(SVGAnimatedLength::create(this, SVGNames::widthAttr, SVGLength::cr eate(SVGLengthMode::Width)))
41 , m_height(SVGAnimatedLength::create(this, SVGNames::heightAttr, SVGLength:: create(SVGLengthMode::Height), ForbidNegativeLengths)) 41 , m_height(SVGAnimatedLength::create(this, SVGNames::heightAttr, SVGLength:: create(SVGLengthMode::Height)))
42 , m_patternTransform(SVGAnimatedTransformList::create(this, SVGNames::patter nTransformAttr, SVGTransformList::create())) 42 , m_patternTransform(SVGAnimatedTransformList::create(this, SVGNames::patter nTransformAttr, SVGTransformList::create()))
43 , m_patternUnits(SVGAnimatedEnumeration<SVGUnitTypes::SVGUnitType>::create(t his, SVGNames::patternUnitsAttr, SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX)) 43 , m_patternUnits(SVGAnimatedEnumeration<SVGUnitTypes::SVGUnitType>::create(t his, SVGNames::patternUnitsAttr, SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX))
44 , m_patternContentUnits(SVGAnimatedEnumeration<SVGUnitTypes::SVGUnitType>::c reate(this, SVGNames::patternContentUnitsAttr, SVGUnitTypes::SVG_UNIT_TYPE_USERS PACEONUSE)) 44 , m_patternContentUnits(SVGAnimatedEnumeration<SVGUnitTypes::SVGUnitType>::c reate(this, SVGNames::patternContentUnitsAttr, SVGUnitTypes::SVG_UNIT_TYPE_USERS PACEONUSE))
45 { 45 {
46 addToPropertyMap(m_x); 46 addToPropertyMap(m_x);
47 addToPropertyMap(m_y); 47 addToPropertyMap(m_y);
48 addToPropertyMap(m_width); 48 addToPropertyMap(m_width);
49 addToPropertyMap(m_height); 49 addToPropertyMap(m_height);
50 addToPropertyMap(m_patternTransform); 50 addToPropertyMap(m_patternTransform);
51 addToPropertyMap(m_patternUnits); 51 addToPropertyMap(m_patternUnits);
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 183
184 bool SVGPatternElement::selfHasRelativeLengths() const 184 bool SVGPatternElement::selfHasRelativeLengths() const
185 { 185 {
186 return m_x->currentValue()->isRelative() 186 return m_x->currentValue()->isRelative()
187 || m_y->currentValue()->isRelative() 187 || m_y->currentValue()->isRelative()
188 || m_width->currentValue()->isRelative() 188 || m_width->currentValue()->isRelative()
189 || m_height->currentValue()->isRelative(); 189 || m_height->currentValue()->isRelative();
190 } 190 }
191 191
192 } // namespace blink 192 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGMaskElement.cpp ('k') | third_party/WebKit/Source/core/svg/SVGRadialGradientElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698