OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2005, 2006, 2008 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005, 2006, 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) 2005 Alexander Kellett <lypanov@kde.org> | 4 * Copyright (C) 2005 Alexander Kellett <lypanov@kde.org> |
5 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> | 5 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> |
6 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. | 6 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. |
7 * | 7 * |
8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
(...skipping 20 matching lines...) Expand all Loading... |
31 namespace WebCore { | 31 namespace WebCore { |
32 | 32 |
33 // Animated property definitions | 33 // Animated property definitions |
34 DEFINE_ANIMATED_ENUMERATION(SVGMaskElement, SVGNames::maskUnitsAttr, MaskUnits,
maskUnits, SVGUnitTypes::SVGUnitType) | 34 DEFINE_ANIMATED_ENUMERATION(SVGMaskElement, SVGNames::maskUnitsAttr, MaskUnits,
maskUnits, SVGUnitTypes::SVGUnitType) |
35 DEFINE_ANIMATED_ENUMERATION(SVGMaskElement, SVGNames::maskContentUnitsAttr, Mask
ContentUnits, maskContentUnits, SVGUnitTypes::SVGUnitType) | 35 DEFINE_ANIMATED_ENUMERATION(SVGMaskElement, SVGNames::maskContentUnitsAttr, Mask
ContentUnits, maskContentUnits, SVGUnitTypes::SVGUnitType) |
36 | 36 |
37 BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGMaskElement) | 37 BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGMaskElement) |
38 REGISTER_LOCAL_ANIMATED_PROPERTY(maskUnits) | 38 REGISTER_LOCAL_ANIMATED_PROPERTY(maskUnits) |
39 REGISTER_LOCAL_ANIMATED_PROPERTY(maskContentUnits) | 39 REGISTER_LOCAL_ANIMATED_PROPERTY(maskContentUnits) |
40 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGElement) | 40 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGElement) |
41 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGTests) | |
42 END_REGISTER_ANIMATED_PROPERTIES | 41 END_REGISTER_ANIMATED_PROPERTIES |
43 | 42 |
44 inline SVGMaskElement::SVGMaskElement(Document& document) | 43 inline SVGMaskElement::SVGMaskElement(Document& document) |
45 : SVGElement(SVGNames::maskTag, document) | 44 : SVGElement(SVGNames::maskTag, document) |
| 45 , SVGTests(this) |
46 , m_x(SVGAnimatedLength::create(this, SVGNames::xAttr, SVGLength::create(Len
gthModeWidth))) | 46 , m_x(SVGAnimatedLength::create(this, SVGNames::xAttr, SVGLength::create(Len
gthModeWidth))) |
47 , m_y(SVGAnimatedLength::create(this, SVGNames::yAttr, SVGLength::create(Len
gthModeHeight))) | 47 , m_y(SVGAnimatedLength::create(this, SVGNames::yAttr, SVGLength::create(Len
gthModeHeight))) |
48 , m_width(SVGAnimatedLength::create(this, SVGNames::widthAttr, SVGLength::cr
eate(LengthModeWidth))) | 48 , m_width(SVGAnimatedLength::create(this, SVGNames::widthAttr, SVGLength::cr
eate(LengthModeWidth))) |
49 , m_height(SVGAnimatedLength::create(this, SVGNames::heightAttr, SVGLength::
create(LengthModeHeight))) | 49 , m_height(SVGAnimatedLength::create(this, SVGNames::heightAttr, SVGLength::
create(LengthModeHeight))) |
50 , m_maskUnits(SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX) | 50 , m_maskUnits(SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX) |
51 , m_maskContentUnits(SVGUnitTypes::SVG_UNIT_TYPE_USERSPACEONUSE) | 51 , m_maskContentUnits(SVGUnitTypes::SVG_UNIT_TYPE_USERSPACEONUSE) |
52 { | 52 { |
53 ScriptWrappable::init(this); | 53 ScriptWrappable::init(this); |
54 | 54 |
55 // Spec: If the x/y attribute is not specified, the effect is as if a value
of "-10%" were specified. | 55 // Spec: If the x/y attribute is not specified, the effect is as if a value
of "-10%" were specified. |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 | 156 |
157 bool SVGMaskElement::selfHasRelativeLengths() const | 157 bool SVGMaskElement::selfHasRelativeLengths() const |
158 { | 158 { |
159 return m_x->currentValue()->isRelative() | 159 return m_x->currentValue()->isRelative() |
160 || m_y->currentValue()->isRelative() | 160 || m_y->currentValue()->isRelative() |
161 || m_width->currentValue()->isRelative() | 161 || m_width->currentValue()->isRelative() |
162 || m_height->currentValue()->isRelative(); | 162 || m_height->currentValue()->isRelative(); |
163 } | 163 } |
164 | 164 |
165 } | 165 } |
OLD | NEW |