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 14 matching lines...) Expand all Loading... |
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 , SVGURIReference(this) |
| 36 , SVGTests(this) |
| 37 , SVGFitToViewBox(this) |
35 , 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), AllowNegativeLengths)) |
36 , 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), AllowNegativeLengths)) |
37 , 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), ForbidNegativeLengths)) |
38 , m_height(SVGAnimatedLength::create(this, SVGNames::heightAttr, SVGLength::
create(SVGLengthMode::Height), ForbidNegativeLengths)) | 41 , m_height(SVGAnimatedLength::create(this, SVGNames::heightAttr, SVGLength::
create(SVGLengthMode::Height), ForbidNegativeLengths)) |
39 , m_patternTransform(SVGAnimatedTransformList::create(this, SVGNames::patter
nTransformAttr, SVGTransformList::create())) | 42 , 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)) | 43 , 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)) | 44 , m_patternContentUnits(SVGAnimatedEnumeration<SVGUnitTypes::SVGUnitType>::c
reate(this, SVGNames::patternContentUnitsAttr, SVGUnitTypes::SVG_UNIT_TYPE_USERS
PACEONUSE)) |
42 { | 45 { |
43 SVGURIReference::initialize(this); | |
44 SVGTests::initialize(this); | |
45 SVGFitToViewBox::initialize(this); | |
46 | |
47 addToPropertyMap(m_x); | 46 addToPropertyMap(m_x); |
48 addToPropertyMap(m_y); | 47 addToPropertyMap(m_y); |
49 addToPropertyMap(m_width); | 48 addToPropertyMap(m_width); |
50 addToPropertyMap(m_height); | 49 addToPropertyMap(m_height); |
51 addToPropertyMap(m_patternTransform); | 50 addToPropertyMap(m_patternTransform); |
52 addToPropertyMap(m_patternUnits); | 51 addToPropertyMap(m_patternUnits); |
53 addToPropertyMap(m_patternContentUnits); | 52 addToPropertyMap(m_patternContentUnits); |
54 } | 53 } |
55 | 54 |
56 DEFINE_TRACE(SVGPatternElement) | 55 DEFINE_TRACE(SVGPatternElement) |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 | 192 |
194 bool SVGPatternElement::selfHasRelativeLengths() const | 193 bool SVGPatternElement::selfHasRelativeLengths() const |
195 { | 194 { |
196 return m_x->currentValue()->isRelative() | 195 return m_x->currentValue()->isRelative() |
197 || m_y->currentValue()->isRelative() | 196 || m_y->currentValue()->isRelative() |
198 || m_width->currentValue()->isRelative() | 197 || m_width->currentValue()->isRelative() |
199 || m_height->currentValue()->isRelative(); | 198 || m_height->currentValue()->isRelative(); |
200 } | 199 } |
201 | 200 |
202 } // namespace blink | 201 } // namespace blink |
OLD | NEW |