OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org> |
3 * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org> |
4 * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com> | 4 * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com> |
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 2010. All rights reserved. | 6 * Copyright (C) Research In Motion Limited 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 15 matching lines...) Expand all Loading... |
26 #include "core/svg/SVGFilterElement.h" | 26 #include "core/svg/SVGFilterElement.h" |
27 | 27 |
28 #include "core/XLinkNames.h" | 28 #include "core/XLinkNames.h" |
29 #include "core/rendering/svg/RenderSVGResourceFilter.h" | 29 #include "core/rendering/svg/RenderSVGResourceFilter.h" |
30 #include "core/svg/SVGParserUtilities.h" | 30 #include "core/svg/SVGParserUtilities.h" |
31 | 31 |
32 namespace blink { | 32 namespace blink { |
33 | 33 |
34 inline SVGFilterElement::SVGFilterElement(Document& document) | 34 inline SVGFilterElement::SVGFilterElement(Document& document) |
35 : SVGElement(SVGNames::filterTag, document) | 35 : SVGElement(SVGNames::filterTag, document) |
36 , SVGURIReference(this) | |
37 , m_x(SVGAnimatedLength::create(this, SVGNames::xAttr, SVGLength::create(Len
gthModeWidth), AllowNegativeLengths)) | 36 , m_x(SVGAnimatedLength::create(this, SVGNames::xAttr, SVGLength::create(Len
gthModeWidth), AllowNegativeLengths)) |
38 , m_y(SVGAnimatedLength::create(this, SVGNames::yAttr, SVGLength::create(Len
gthModeHeight), AllowNegativeLengths)) | 37 , m_y(SVGAnimatedLength::create(this, SVGNames::yAttr, SVGLength::create(Len
gthModeHeight), AllowNegativeLengths)) |
39 , m_width(SVGAnimatedLength::create(this, SVGNames::widthAttr, SVGLength::cr
eate(LengthModeWidth), ForbidNegativeLengths)) | 38 , m_width(SVGAnimatedLength::create(this, SVGNames::widthAttr, SVGLength::cr
eate(LengthModeWidth), ForbidNegativeLengths)) |
40 , m_height(SVGAnimatedLength::create(this, SVGNames::heightAttr, SVGLength::
create(LengthModeHeight), ForbidNegativeLengths)) | 39 , m_height(SVGAnimatedLength::create(this, SVGNames::heightAttr, SVGLength::
create(LengthModeHeight), ForbidNegativeLengths)) |
41 , m_filterUnits(SVGAnimatedEnumeration<SVGUnitTypes::SVGUnitType>::create(th
is, SVGNames::filterUnitsAttr, SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX)) | 40 , m_filterUnits(SVGAnimatedEnumeration<SVGUnitTypes::SVGUnitType>::create(th
is, SVGNames::filterUnitsAttr, SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX)) |
42 , m_primitiveUnits(SVGAnimatedEnumeration<SVGUnitTypes::SVGUnitType>::create
(this, SVGNames::primitiveUnitsAttr, SVGUnitTypes::SVG_UNIT_TYPE_USERSPACEONUSE)
) | 41 , m_primitiveUnits(SVGAnimatedEnumeration<SVGUnitTypes::SVGUnitType>::create
(this, SVGNames::primitiveUnitsAttr, SVGUnitTypes::SVG_UNIT_TYPE_USERSPACEONUSE)
) |
43 , m_filterRes(SVGAnimatedIntegerOptionalInteger::create(this, SVGNames::filt
erResAttr)) | 42 , m_filterRes(SVGAnimatedIntegerOptionalInteger::create(this, SVGNames::filt
erResAttr)) |
44 { | 43 { |
| 44 SVGURIReference::initialize(this); |
| 45 |
45 // Spec: If the x/y attribute is not specified, the effect is as if a value
of "-10%" were specified. | 46 // Spec: If the x/y attribute is not specified, the effect is as if a value
of "-10%" were specified. |
46 // Spec: If the width/height attribute is not specified, the effect is as if
a value of "120%" were specified. | 47 // Spec: If the width/height attribute is not specified, the effect is as if
a value of "120%" were specified. |
47 m_x->setDefaultValueAsString("-10%"); | 48 m_x->setDefaultValueAsString("-10%"); |
48 m_y->setDefaultValueAsString("-10%"); | 49 m_y->setDefaultValueAsString("-10%"); |
49 m_width->setDefaultValueAsString("120%"); | 50 m_width->setDefaultValueAsString("120%"); |
50 m_height->setDefaultValueAsString("120%"); | 51 m_height->setDefaultValueAsString("120%"); |
51 | 52 |
52 addToPropertyMap(m_x); | 53 addToPropertyMap(m_x); |
53 addToPropertyMap(m_y); | 54 addToPropertyMap(m_y); |
54 addToPropertyMap(m_width); | 55 addToPropertyMap(m_width); |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 m_clientsToAdd.add(client); | 163 m_clientsToAdd.add(client); |
163 } | 164 } |
164 | 165 |
165 void SVGFilterElement::removeClient(Node* client) | 166 void SVGFilterElement::removeClient(Node* client) |
166 { | 167 { |
167 ASSERT(client); | 168 ASSERT(client); |
168 m_clientsToAdd.remove(client); | 169 m_clientsToAdd.remove(client); |
169 } | 170 } |
170 | 171 |
171 } // namespace blink | 172 } // namespace blink |
OLD | NEW |