diff options
Diffstat (limited to 'src/3rdparty/webkit/WebCore/svg/SVGLineElement.cpp')
-rw-r--r-- | src/3rdparty/webkit/WebCore/svg/SVGLineElement.cpp | 36 |
1 files changed, 29 insertions, 7 deletions
diff --git a/src/3rdparty/webkit/WebCore/svg/SVGLineElement.cpp b/src/3rdparty/webkit/WebCore/svg/SVGLineElement.cpp index 4f7b7e5f1b..6c8a16b599 100644 --- a/src/3rdparty/webkit/WebCore/svg/SVGLineElement.cpp +++ b/src/3rdparty/webkit/WebCore/svg/SVGLineElement.cpp @@ -2,8 +2,6 @@ Copyright (C) 2004, 2005, 2006, 2008 Nikolas Zimmermann <zimmermann@kde.org> 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org> - This file is part of the KDE project - This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either @@ -38,11 +36,10 @@ SVGLineElement::SVGLineElement(const QualifiedName& tagName, Document* doc) , SVGTests() , SVGLangSpace() , SVGExternalResourcesRequired() - , m_x1(this, SVGNames::x1Attr, LengthModeWidth) - , m_y1(this, SVGNames::y1Attr, LengthModeHeight) - , m_x2(this, SVGNames::x2Attr, LengthModeWidth) - , m_y2(this, SVGNames::y2Attr, LengthModeHeight) - , m_externalResourcesRequired(this, SVGNames::externalResourcesRequiredAttr, false) + , m_x1(LengthModeWidth) + , m_y1(LengthModeHeight) + , m_x2(LengthModeWidth) + , m_y2(LengthModeHeight) { } @@ -87,6 +84,31 @@ void SVGLineElement::svgAttributeChanged(const QualifiedName& attrName) renderer()->setNeedsLayout(true); } +void SVGLineElement::synchronizeProperty(const QualifiedName& attrName) +{ + SVGStyledTransformableElement::synchronizeProperty(attrName); + + if (attrName == anyQName()) { + synchronizeX1(); + synchronizeY1(); + synchronizeX2(); + synchronizeY2(); + synchronizeExternalResourcesRequired(); + return; + } + + if (attrName == SVGNames::x1Attr) + synchronizeX1(); + else if (attrName == SVGNames::y1Attr) + synchronizeY1(); + else if (attrName == SVGNames::x2Attr) + synchronizeX2(); + else if (attrName == SVGNames::y2Attr) + synchronizeY2(); + else if (SVGExternalResourcesRequired::isKnownAttribute(attrName)) + synchronizeExternalResourcesRequired(); +} + Path SVGLineElement::toPathData() const { return Path::createLine(FloatPoint(x1().value(this), y1().value(this)), |