summaryrefslogtreecommitdiffstats
path: root/WebCore/svg/SVGTextElement.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/svg/SVGTextElement.cpp')
-rw-r--r--WebCore/svg/SVGTextElement.cpp72
1 files changed, 33 insertions, 39 deletions
diff --git a/WebCore/svg/SVGTextElement.cpp b/WebCore/svg/SVGTextElement.cpp
index 96fd11a..e13e611 100644
--- a/WebCore/svg/SVGTextElement.cpp
+++ b/WebCore/svg/SVGTextElement.cpp
@@ -1,22 +1,22 @@
/*
- Copyright (C) 2004, 2005, 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org>
- 2004, 2005, 2006, 2008 Rob Buis <buis@kde.org>
-
- 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
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public License
- along with this library; see the file COPYING.LIB. If not, write to
- the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA.
-*/
+ * Copyright (C) 2004, 2005, 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org>
+ * Copyright (C) 2004, 2005, 2006, 2008 Rob Buis <buis@kde.org>
+ *
+ * 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
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
#include "config.h"
@@ -24,8 +24,9 @@
#include "SVGTextElement.h"
#include "AffineTransform.h"
+#include "Attribute.h"
#include "FloatRect.h"
-#include "MappedAttribute.h"
+#include "RenderSVGResource.h"
#include "RenderSVGText.h"
#include "SVGLengthList.h"
#include "SVGRenderStyle.h"
@@ -45,7 +46,7 @@ SVGTextElement::~SVGTextElement()
{
}
-void SVGTextElement::parseMappedAttribute(MappedAttribute* attr)
+void SVGTextElement::parseMappedAttribute(Attribute* attr)
{
if (SVGTransformable::isKnownAttribute(attr->name())) {
SVGTransformList* localTransforms = transformBaseValue();
@@ -67,19 +68,19 @@ SVGElement* SVGTextElement::farthestViewportElement() const
return SVGTransformable::farthestViewportElement(this);
}
-FloatRect SVGTextElement::getBBox() const
+FloatRect SVGTextElement::getBBox(StyleUpdateStrategy styleUpdateStrategy) const
{
- return SVGTransformable::getBBox(this);
+ return SVGTransformable::getBBox(this, styleUpdateStrategy);
}
-AffineTransform SVGTextElement::getScreenCTM() const
+AffineTransform SVGTextElement::getCTM(StyleUpdateStrategy styleUpdateStrategy) const
{
- return SVGTransformable::getScreenCTM(this);
+ return SVGLocatable::computeCTM(this, SVGLocatable::NearestViewportScope, styleUpdateStrategy);
}
-AffineTransform SVGTextElement::getCTM() const
+AffineTransform SVGTextElement::getScreenCTM(StyleUpdateStrategy styleUpdateStrategy) const
{
- return SVGTransformable::getCTM(this);
+ return SVGLocatable::computeCTM(this, SVGLocatable::ScreenScope, styleUpdateStrategy);
}
AffineTransform SVGTextElement::animatedLocalTransform() const
@@ -114,11 +115,14 @@ void SVGTextElement::svgAttributeChanged(const QualifiedName& attrName)
{
SVGTextPositioningElement::svgAttributeChanged(attrName);
- if (!renderer())
+ RenderObject* renderer = this->renderer();
+ if (!renderer)
return;
- if (SVGTransformable::isKnownAttribute(attrName))
- renderer()->setNeedsLayout(true);
+ if (SVGTransformable::isKnownAttribute(attrName)) {
+ renderer->setNeedsTransformUpdate();
+ RenderSVGResource::markForLayoutAndParentResourceInvalidation(renderer);
+ }
}
void SVGTextElement::synchronizeProperty(const QualifiedName& attrName)
@@ -129,16 +133,6 @@ void SVGTextElement::synchronizeProperty(const QualifiedName& attrName)
synchronizeTransform();
}
-void SVGTextElement::childrenChanged(bool changedByParser, Node* beforeChange, Node* afterChange, int childCountDelta)
-{
- SVGTextPositioningElement::childrenChanged(changedByParser, beforeChange, afterChange, childCountDelta);
-
- if (!renderer())
- return;
-
- renderer()->setNeedsLayout(true);
-}
-
}
#endif // ENABLE(SVG)