OLD | NEW |
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 15 matching lines...) Expand all Loading... |
26 #include "core/XLinkNames.h" | 26 #include "core/XLinkNames.h" |
27 #include "core/dom/ElementTraversal.h" | 27 #include "core/dom/ElementTraversal.h" |
28 #include "core/rendering/svg/RenderSVGResourcePattern.h" | 28 #include "core/rendering/svg/RenderSVGResourcePattern.h" |
29 #include "core/svg/PatternAttributes.h" | 29 #include "core/svg/PatternAttributes.h" |
30 #include "platform/transforms/AffineTransform.h" | 30 #include "platform/transforms/AffineTransform.h" |
31 | 31 |
32 namespace blink { | 32 namespace blink { |
33 | 33 |
34 inline SVGPatternElement::SVGPatternElement(Document& document) | 34 inline SVGPatternElement::SVGPatternElement(Document& document) |
35 : SVGElement(SVGNames::patternTag, document) | 35 : SVGElement(SVGNames::patternTag, document) |
36 , SVGURIReference(this) | |
37 , SVGTests(this) | |
38 , SVGFitToViewBox(this) | |
39 , m_x(SVGAnimatedLength::create(this, SVGNames::xAttr, SVGLength::create(Len
gthModeWidth), AllowNegativeLengths)) | 36 , m_x(SVGAnimatedLength::create(this, SVGNames::xAttr, SVGLength::create(Len
gthModeWidth), AllowNegativeLengths)) |
40 , m_y(SVGAnimatedLength::create(this, SVGNames::yAttr, SVGLength::create(Len
gthModeHeight), AllowNegativeLengths)) | 37 , m_y(SVGAnimatedLength::create(this, SVGNames::yAttr, SVGLength::create(Len
gthModeHeight), AllowNegativeLengths)) |
41 , m_width(SVGAnimatedLength::create(this, SVGNames::widthAttr, SVGLength::cr
eate(LengthModeWidth), ForbidNegativeLengths)) | 38 , m_width(SVGAnimatedLength::create(this, SVGNames::widthAttr, SVGLength::cr
eate(LengthModeWidth), ForbidNegativeLengths)) |
42 , m_height(SVGAnimatedLength::create(this, SVGNames::heightAttr, SVGLength::
create(LengthModeHeight), ForbidNegativeLengths)) | 39 , m_height(SVGAnimatedLength::create(this, SVGNames::heightAttr, SVGLength::
create(LengthModeHeight), ForbidNegativeLengths)) |
43 , m_patternTransform(SVGAnimatedTransformList::create(this, SVGNames::patter
nTransformAttr, SVGTransformList::create())) | 40 , m_patternTransform(SVGAnimatedTransformList::create(this, SVGNames::patter
nTransformAttr, SVGTransformList::create())) |
44 , m_patternUnits(SVGAnimatedEnumeration<SVGUnitTypes::SVGUnitType>::create(t
his, SVGNames::patternUnitsAttr, SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX)) | 41 , m_patternUnits(SVGAnimatedEnumeration<SVGUnitTypes::SVGUnitType>::create(t
his, SVGNames::patternUnitsAttr, SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX)) |
45 , m_patternContentUnits(SVGAnimatedEnumeration<SVGUnitTypes::SVGUnitType>::c
reate(this, SVGNames::patternContentUnitsAttr, SVGUnitTypes::SVG_UNIT_TYPE_USERS
PACEONUSE)) | 42 , m_patternContentUnits(SVGAnimatedEnumeration<SVGUnitTypes::SVGUnitType>::c
reate(this, SVGNames::patternContentUnitsAttr, SVGUnitTypes::SVG_UNIT_TYPE_USERS
PACEONUSE)) |
46 { | 43 { |
| 44 SVGURIReference::initialize(this); |
| 45 SVGTests::initialize(this); |
| 46 SVGFitToViewBox::initialize(this); |
| 47 |
47 addToPropertyMap(m_x); | 48 addToPropertyMap(m_x); |
48 addToPropertyMap(m_y); | 49 addToPropertyMap(m_y); |
49 addToPropertyMap(m_width); | 50 addToPropertyMap(m_width); |
50 addToPropertyMap(m_height); | 51 addToPropertyMap(m_height); |
51 addToPropertyMap(m_patternTransform); | 52 addToPropertyMap(m_patternTransform); |
52 addToPropertyMap(m_patternUnits); | 53 addToPropertyMap(m_patternUnits); |
53 addToPropertyMap(m_patternContentUnits); | 54 addToPropertyMap(m_patternContentUnits); |
54 } | 55 } |
55 | 56 |
56 void SVGPatternElement::trace(Visitor* visitor) | 57 void SVGPatternElement::trace(Visitor* visitor) |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 | 200 |
200 bool SVGPatternElement::selfHasRelativeLengths() const | 201 bool SVGPatternElement::selfHasRelativeLengths() const |
201 { | 202 { |
202 return m_x->currentValue()->isRelative() | 203 return m_x->currentValue()->isRelative() |
203 || m_y->currentValue()->isRelative() | 204 || m_y->currentValue()->isRelative() |
204 || m_width->currentValue()->isRelative() | 205 || m_width->currentValue()->isRelative() |
205 || m_height->currentValue()->isRelative(); | 206 || m_height->currentValue()->isRelative(); |
206 } | 207 } |
207 | 208 |
208 } // namespace blink | 209 } // namespace blink |
OLD | NEW |