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 , 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 Loading... |
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 |
OLD | NEW |