diff options
Diffstat (limited to 'WebCore/svg/SVGStyledElement.cpp')
-rw-r--r-- | WebCore/svg/SVGStyledElement.cpp | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/WebCore/svg/SVGStyledElement.cpp b/WebCore/svg/SVGStyledElement.cpp index 127f7e0..2e4141d 100644 --- a/WebCore/svg/SVGStyledElement.cpp +++ b/WebCore/svg/SVGStyledElement.cpp @@ -2,6 +2,8 @@ Copyright (C) 2004, 2005, 2006, 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org> 2004, 2005, 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 @@ -19,11 +21,11 @@ */ #include "config.h" + #if ENABLE(SVG) #include "SVGStyledElement.h" #include "Attr.h" -#include "CSSParser.h" #include "CSSStyleSelector.h" #include "CString.h" #include "Document.h" @@ -67,9 +69,15 @@ bool SVGStyledElement::rendererIsNeeded(RenderStyle* style) return false; } -static void mapAttributeToCSSProperty(HashMap<AtomicStringImpl*, int>* propertyNameToIdMap, const QualifiedName& attrName) +static inline void mapAttributeToCSSProperty(HashMap<AtomicStringImpl*, int>* propertyNameToIdMap, const QualifiedName& attrName, const char* cssPropertyName = 0) { - int propertyId = cssPropertyID(attrName.localName()); + int propertyId = 0; + if (cssPropertyName) + propertyId = getPropertyID(cssPropertyName, strlen(cssPropertyName)); + else { + CString propertyName = attrName.localName().domString().utf8(); + propertyId = getPropertyID(propertyName.data(), propertyName.length()); + } ASSERT(propertyId > 0); propertyNameToIdMap->set(attrName.localName().impl(), propertyId); } @@ -216,9 +224,9 @@ void SVGStyledElement::invalidateResourcesInAncestorChain() const } } -void SVGStyledElement::childrenChanged(bool changedByParser, Node* beforeChange, Node* afterChange, int childCountDelta) +void SVGStyledElement::childrenChanged(bool changedByParser) { - SVGElement::childrenChanged(changedByParser, beforeChange, afterChange, childCountDelta); + SVGElement::childrenChanged(changedByParser); if (document()->parsing()) return; |