| 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 , m_maskUnits(SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX) | 62 , m_maskUnits(SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX) |
| 63 , m_maskContentUnits(SVGUnitTypes::SVG_UNIT_TYPE_USERSPACEONUSE) | 63 , m_maskContentUnits(SVGUnitTypes::SVG_UNIT_TYPE_USERSPACEONUSE) |
| 64 , m_x(LengthModeWidth, "-10%") | 64 , m_x(LengthModeWidth, "-10%") |
| 65 , m_y(LengthModeHeight, "-10%") | 65 , m_y(LengthModeHeight, "-10%") |
| 66 , m_width(LengthModeWidth, "120%") | 66 , m_width(LengthModeWidth, "120%") |
| 67 , m_height(LengthModeHeight, "120%") | 67 , m_height(LengthModeHeight, "120%") |
| 68 { | 68 { |
| 69 // Spec: If the x/y attribute is not specified, the effect is as if a value
of "-10%" were specified. | 69 // Spec: If the x/y attribute is not specified, the effect is as if a value
of "-10%" were specified. |
| 70 // Spec: If the width/height attribute is not specified, the effect is as if
a value of "120%" were specified. | 70 // Spec: If the width/height attribute is not specified, the effect is as if
a value of "120%" were specified. |
| 71 ASSERT(hasTagName(SVGNames::maskTag)); | 71 ASSERT(hasTagName(SVGNames::maskTag)); |
| 72 ScriptWrappable::init(this); |
| 72 registerAnimatedPropertiesForSVGMaskElement(); | 73 registerAnimatedPropertiesForSVGMaskElement(); |
| 73 } | 74 } |
| 74 | 75 |
| 75 PassRefPtr<SVGMaskElement> SVGMaskElement::create(const QualifiedName& tagName,
Document* document) | 76 PassRefPtr<SVGMaskElement> SVGMaskElement::create(const QualifiedName& tagName,
Document* document) |
| 76 { | 77 { |
| 77 return adoptRef(new SVGMaskElement(tagName, document)); | 78 return adoptRef(new SVGMaskElement(tagName, document)); |
| 78 } | 79 } |
| 79 | 80 |
| 80 bool SVGMaskElement::isSupportedAttribute(const QualifiedName& attrName) | 81 bool SVGMaskElement::isSupportedAttribute(const QualifiedName& attrName) |
| 81 { | 82 { |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 { | 167 { |
| 167 return x().isRelative() | 168 return x().isRelative() |
| 168 || y().isRelative() | 169 || y().isRelative() |
| 169 || width().isRelative() | 170 || width().isRelative() |
| 170 || height().isRelative(); | 171 || height().isRelative(); |
| 171 } | 172 } |
| 172 | 173 |
| 173 } | 174 } |
| 174 | 175 |
| 175 #endif // ENABLE(SVG) | 176 #endif // ENABLE(SVG) |
| OLD | NEW |