| 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 17 matching lines...) Expand all Loading... |
| 28 | 28 |
| 29 namespace blink { | 29 namespace blink { |
| 30 | 30 |
| 31 inline SVGMaskElement::SVGMaskElement(Document& document) | 31 inline SVGMaskElement::SVGMaskElement(Document& document) |
| 32 : SVGElement(SVGNames::maskTag, document) | 32 : SVGElement(SVGNames::maskTag, document) |
| 33 , SVGTests(this) | 33 , SVGTests(this) |
| 34 , m_x(SVGAnimatedLength::create(this, SVGNames::xAttr, SVGLength::create(SVG
LengthMode::Width))) | 34 , m_x(SVGAnimatedLength::create(this, SVGNames::xAttr, SVGLength::create(SVG
LengthMode::Width))) |
| 35 , m_y(SVGAnimatedLength::create(this, SVGNames::yAttr, SVGLength::create(SVG
LengthMode::Height))) | 35 , m_y(SVGAnimatedLength::create(this, SVGNames::yAttr, SVGLength::create(SVG
LengthMode::Height))) |
| 36 , m_width(SVGAnimatedLength::create(this, SVGNames::widthAttr, SVGLength::cr
eate(SVGLengthMode::Width))) | 36 , m_width(SVGAnimatedLength::create(this, SVGNames::widthAttr, SVGLength::cr
eate(SVGLengthMode::Width))) |
| 37 , m_height(SVGAnimatedLength::create(this, SVGNames::heightAttr, SVGLength::
create(SVGLengthMode::Height))) | 37 , m_height(SVGAnimatedLength::create(this, SVGNames::heightAttr, SVGLength::
create(SVGLengthMode::Height))) |
| 38 , m_maskUnits(SVGAnimatedEnumeration<SVGUnitTypes::SVGUnitType>::create(this
, SVGNames::maskUnitsAttr, SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX)) | 38 , m_maskUnits(SVGAnimatedEnumeration<SVGUnitTypes::SVGUnitType>::create(this
, SVGNames::maskUnitsAttr, SVGUnitTypes::kSvgUnitTypeObjectboundingbox)) |
| 39 , m_maskContentUnits(SVGAnimatedEnumeration<SVGUnitTypes::SVGUnitType>::crea
te(this, SVGNames::maskContentUnitsAttr, SVGUnitTypes::SVG_UNIT_TYPE_USERSPACEON
USE)) | 39 , m_maskContentUnits(SVGAnimatedEnumeration<SVGUnitTypes::SVGUnitType>::crea
te(this, SVGNames::maskContentUnitsAttr, SVGUnitTypes::kSvgUnitTypeUserspaceonus
e)) |
| 40 { | 40 { |
| 41 // Spec: If the x/y attribute is not specified, the effect is as if a value
of "-10%" were specified. | 41 // Spec: If the x/y attribute is not specified, the effect is as if a value
of "-10%" were specified. |
| 42 m_x->setDefaultValueAsString("-10%"); | 42 m_x->setDefaultValueAsString("-10%"); |
| 43 m_y->setDefaultValueAsString("-10%"); | 43 m_y->setDefaultValueAsString("-10%"); |
| 44 | 44 |
| 45 // Spec: If the width/height attribute is not specified, the effect is as if
a value of "120%" were specified. | 45 // Spec: If the width/height attribute is not specified, the effect is as if
a value of "120%" were specified. |
| 46 m_width->setDefaultValueAsString("120%"); | 46 m_width->setDefaultValueAsString("120%"); |
| 47 m_height->setDefaultValueAsString("120%"); | 47 m_height->setDefaultValueAsString("120%"); |
| 48 | 48 |
| 49 addToPropertyMap(m_x); | 49 addToPropertyMap(m_x); |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 | 147 |
| 148 bool SVGMaskElement::selfHasRelativeLengths() const | 148 bool SVGMaskElement::selfHasRelativeLengths() const |
| 149 { | 149 { |
| 150 return m_x->currentValue()->isRelative() | 150 return m_x->currentValue()->isRelative() |
| 151 || m_y->currentValue()->isRelative() | 151 || m_y->currentValue()->isRelative() |
| 152 || m_width->currentValue()->isRelative() | 152 || m_width->currentValue()->isRelative() |
| 153 || m_height->currentValue()->isRelative(); | 153 || m_height->currentValue()->isRelative(); |
| 154 } | 154 } |
| 155 | 155 |
| 156 } // namespace blink | 156 } // namespace blink |
| OLD | NEW |