summaryrefslogtreecommitdiffstats
path: root/WebCore/svg/SVGLineElement.cpp
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2010-02-02 14:57:50 +0000
committerSteve Block <steveblock@google.com>2010-02-04 15:06:55 +0000
commitd0825bca7fe65beaee391d30da42e937db621564 (patch)
tree7461c49eb5844ffd1f35d1ba2c8b7584c1620823 /WebCore/svg/SVGLineElement.cpp
parent3db770bd97c5a59b6c7574ca80a39e5a51c1defd (diff)
downloadexternal_webkit-d0825bca7fe65beaee391d30da42e937db621564.zip
external_webkit-d0825bca7fe65beaee391d30da42e937db621564.tar.gz
external_webkit-d0825bca7fe65beaee391d30da42e937db621564.tar.bz2
Merge webkit.org at r54127 : Initial merge by git
Change-Id: Ib661abb595522f50ea406f72d3a0ce17f7193c82
Diffstat (limited to 'WebCore/svg/SVGLineElement.cpp')
-rw-r--r--WebCore/svg/SVGLineElement.cpp34
1 files changed, 29 insertions, 5 deletions
diff --git a/WebCore/svg/SVGLineElement.cpp b/WebCore/svg/SVGLineElement.cpp
index a359698..6c8a16b 100644
--- a/WebCore/svg/SVGLineElement.cpp
+++ b/WebCore/svg/SVGLineElement.cpp
@@ -36,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)
{
}
@@ -85,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)),