OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006 Apple Inc. All rights reserved. |
3 * Copyright (C) 2008 Nikolas Zimmermann <zimmermann@kde.org> | 3 * Copyright (C) 2008 Nikolas Zimmermann <zimmermann@kde.org> |
4 * | 4 * |
5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
9 * | 9 * |
10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
(...skipping 19 matching lines...) Expand all Loading... |
30 | 30 |
31 namespace blink { | 31 namespace blink { |
32 | 32 |
33 inline SVGForeignObjectElement::SVGForeignObjectElement(Document& document) | 33 inline SVGForeignObjectElement::SVGForeignObjectElement(Document& document) |
34 : SVGGraphicsElement(SVGNames::foreignObjectTag, document) | 34 : SVGGraphicsElement(SVGNames::foreignObjectTag, document) |
35 , m_x(SVGAnimatedLength::create(this, SVGNames::xAttr, SVGLength::create(Len
gthModeWidth), AllowNegativeLengths)) | 35 , m_x(SVGAnimatedLength::create(this, SVGNames::xAttr, SVGLength::create(Len
gthModeWidth), AllowNegativeLengths)) |
36 , m_y(SVGAnimatedLength::create(this, SVGNames::yAttr, SVGLength::create(Len
gthModeHeight), AllowNegativeLengths)) | 36 , m_y(SVGAnimatedLength::create(this, SVGNames::yAttr, SVGLength::create(Len
gthModeHeight), 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(LengthModeWidth), ForbidNegativeLengths)) |
38 , m_height(SVGAnimatedLength::create(this, SVGNames::heightAttr, SVGLength::
create(LengthModeHeight), ForbidNegativeLengths)) | 38 , m_height(SVGAnimatedLength::create(this, SVGNames::heightAttr, SVGLength::
create(LengthModeHeight), ForbidNegativeLengths)) |
39 { | 39 { |
40 ScriptWrappable::init(this); | |
41 | |
42 addToPropertyMap(m_x); | 40 addToPropertyMap(m_x); |
43 addToPropertyMap(m_y); | 41 addToPropertyMap(m_y); |
44 addToPropertyMap(m_width); | 42 addToPropertyMap(m_width); |
45 addToPropertyMap(m_height); | 43 addToPropertyMap(m_height); |
46 | 44 |
47 UseCounter::count(document, UseCounter::SVGForeignObjectElement); | 45 UseCounter::count(document, UseCounter::SVGForeignObjectElement); |
48 } | 46 } |
49 | 47 |
50 DEFINE_NODE_FACTORY(SVGForeignObjectElement) | 48 DEFINE_NODE_FACTORY(SVGForeignObjectElement) |
51 | 49 |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 } | 138 } |
141 | 139 |
142 bool SVGForeignObjectElement::selfHasRelativeLengths() const | 140 bool SVGForeignObjectElement::selfHasRelativeLengths() const |
143 { | 141 { |
144 return m_x->currentValue()->isRelative() | 142 return m_x->currentValue()->isRelative() |
145 || m_y->currentValue()->isRelative() | 143 || m_y->currentValue()->isRelative() |
146 || m_width->currentValue()->isRelative() | 144 || m_width->currentValue()->isRelative() |
147 || m_height->currentValue()->isRelative(); | 145 || m_height->currentValue()->isRelative(); |
148 } | 146 } |
149 | 147 |
150 } | 148 } // namespace blink |
OLD | NEW |