| 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 13 matching lines...) Expand all Loading... |
| 24 #include "core/XLinkNames.h" | 24 #include "core/XLinkNames.h" |
| 25 #include "core/frame/UseCounter.h" | 25 #include "core/frame/UseCounter.h" |
| 26 #include "core/layout/svg/LayoutSVGForeignObject.h" | 26 #include "core/layout/svg/LayoutSVGForeignObject.h" |
| 27 #include "core/svg/SVGLength.h" | 27 #include "core/svg/SVGLength.h" |
| 28 #include "wtf/Assertions.h" | 28 #include "wtf/Assertions.h" |
| 29 | 29 |
| 30 namespace blink { | 30 namespace blink { |
| 31 | 31 |
| 32 inline SVGForeignObjectElement::SVGForeignObjectElement(Document& document) | 32 inline SVGForeignObjectElement::SVGForeignObjectElement(Document& document) |
| 33 : SVGGraphicsElement(SVGNames::foreignObjectTag, document) | 33 : SVGGraphicsElement(SVGNames::foreignObjectTag, document) |
| 34 , m_x(SVGAnimatedLength::create(this, SVGNames::xAttr, SVGLength::create(Len
gthModeWidth), AllowNegativeLengths)) | 34 , m_x(SVGAnimatedLength::create(this, SVGNames::xAttr, SVGLength::create(SVG
LengthMode::Width), AllowNegativeLengths)) |
| 35 , m_y(SVGAnimatedLength::create(this, SVGNames::yAttr, SVGLength::create(Len
gthModeHeight), AllowNegativeLengths)) | 35 , m_y(SVGAnimatedLength::create(this, SVGNames::yAttr, SVGLength::create(SVG
LengthMode::Height), AllowNegativeLengths)) |
| 36 , m_width(SVGAnimatedLength::create(this, SVGNames::widthAttr, SVGLength::cr
eate(LengthModeWidth), ForbidNegativeLengths)) | 36 , m_width(SVGAnimatedLength::create(this, SVGNames::widthAttr, SVGLength::cr
eate(SVGLengthMode::Width), ForbidNegativeLengths)) |
| 37 , m_height(SVGAnimatedLength::create(this, SVGNames::heightAttr, SVGLength::
create(LengthModeHeight), ForbidNegativeLengths)) | 37 , m_height(SVGAnimatedLength::create(this, SVGNames::heightAttr, SVGLength::
create(SVGLengthMode::Height), ForbidNegativeLengths)) |
| 38 { | 38 { |
| 39 addToPropertyMap(m_x); | 39 addToPropertyMap(m_x); |
| 40 addToPropertyMap(m_y); | 40 addToPropertyMap(m_y); |
| 41 addToPropertyMap(m_width); | 41 addToPropertyMap(m_width); |
| 42 addToPropertyMap(m_height); | 42 addToPropertyMap(m_height); |
| 43 | 43 |
| 44 UseCounter::count(document, UseCounter::SVGForeignObjectElement); | 44 UseCounter::count(document, UseCounter::SVGForeignObjectElement); |
| 45 } | 45 } |
| 46 | 46 |
| 47 DEFINE_TRACE(SVGForeignObjectElement) | 47 DEFINE_TRACE(SVGForeignObjectElement) |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 | 152 |
| 153 bool SVGForeignObjectElement::selfHasRelativeLengths() const | 153 bool SVGForeignObjectElement::selfHasRelativeLengths() const |
| 154 { | 154 { |
| 155 return m_x->currentValue()->isRelative() | 155 return m_x->currentValue()->isRelative() |
| 156 || m_y->currentValue()->isRelative() | 156 || m_y->currentValue()->isRelative() |
| 157 || m_width->currentValue()->isRelative() | 157 || m_width->currentValue()->isRelative() |
| 158 || m_height->currentValue()->isRelative(); | 158 || m_height->currentValue()->isRelative(); |
| 159 } | 159 } |
| 160 | 160 |
| 161 } // namespace blink | 161 } // namespace blink |
| OLD | NEW |