~ubuntu-branches/ubuntu/lucid/webkit/lucid-updates

« back to all changes in this revision

Viewing changes to WebCore/svg/SVGTextPositioningElement.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Gustavo Noronha Silva
  • Date: 2010-02-04 19:30:57 UTC
  • mfrom: (1.2.8 upstream) (4.3.9 sid)
  • Revision ID: james.westby@ubuntu.com-20100204193057-d3018lm1fipb0703
* New upstream release
* debian/copyright:
- Updated with changes since 1.1.19.

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
 
32
32
namespace WebCore {
33
33
 
34
 
char SVGTextPositioningElementIdentifier[] = "SVGTextPositioningElement";
35
 
 
36
34
SVGTextPositioningElement::SVGTextPositioningElement(const QualifiedName& tagName, Document* doc)
37
35
    : SVGTextContentElement(tagName, doc)
38
 
    , m_x(this, SVGNames::xAttr, SVGLengthList::create(SVGNames::xAttr))
39
 
    , m_y(this, SVGNames::yAttr, SVGLengthList::create(SVGNames::yAttr))
40
 
    , m_dx(this, SVGNames::dxAttr, SVGLengthList::create(SVGNames::dxAttr))
41
 
    , m_dy(this, SVGNames::dyAttr, SVGLengthList::create(SVGNames::dyAttr))
42
 
    , m_rotate(this, SVGNames::rotateAttr, SVGNumberList::create(SVGNames::rotateAttr))
 
36
    , m_x(SVGLengthList::create(SVGNames::xAttr))
 
37
    , m_y(SVGLengthList::create(SVGNames::yAttr))
 
38
    , m_dx(SVGLengthList::create(SVGNames::dxAttr))
 
39
    , m_dy(SVGLengthList::create(SVGNames::dyAttr))
 
40
    , m_rotate(SVGNumberList::create(SVGNames::rotateAttr))
43
41
{
44
42
}
45
43
 
74
72
        renderer()->setNeedsLayout(true);
75
73
}
76
74
 
 
75
void SVGTextPositioningElement::synchronizeProperty(const QualifiedName& attrName)
 
76
{
 
77
    SVGTextContentElement::synchronizeProperty(attrName);
 
78
 
 
79
    if (attrName == anyQName()) {
 
80
        synchronizeX();
 
81
        synchronizeY();
 
82
        synchronizeDx();
 
83
        synchronizeDy();
 
84
        synchronizeRotate();
 
85
        return;
 
86
    }
 
87
 
 
88
    if (attrName == SVGNames::xAttr)
 
89
        synchronizeX();
 
90
    else if (attrName == SVGNames::yAttr)
 
91
        synchronizeY();
 
92
    else if (attrName == SVGNames::dxAttr)
 
93
        synchronizeDx();
 
94
    else if (attrName == SVGNames::dyAttr)
 
95
        synchronizeDy();
 
96
    else if (attrName == SVGNames::rotateAttr)
 
97
        synchronizeRotate();
 
98
}
 
99
 
77
100
bool SVGTextPositioningElement::isKnownAttribute(const QualifiedName& attrName)
78
101
{
79
102
    return (attrName.matches(SVGNames::xAttr) ||