summaryrefslogtreecommitdiffstats
path: root/WebCore/dom/StyledElement.h
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/dom/StyledElement.h')
-rw-r--r--WebCore/dom/StyledElement.h20
1 files changed, 11 insertions, 9 deletions
diff --git a/WebCore/dom/StyledElement.h b/WebCore/dom/StyledElement.h
index 6facce7..8040dbf 100644
--- a/WebCore/dom/StyledElement.h
+++ b/WebCore/dom/StyledElement.h
@@ -3,7 +3,7 @@
* (C) 1999 Antti Koivisto (koivisto@kde.org)
* (C) 2001 Peter Kelly (pmk@post.com)
* (C) 2001 Dirk Mueller (mueller@kde.org)
- * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
+ * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -26,10 +26,8 @@
#define StyledElement_h
#include "CSSMutableStyleDeclaration.h"
-#include "CSSPrimitiveValue.h"
#include "Element.h"
#include "MappedAttributeEntry.h"
-#include "NamedNodeMap.h"
namespace WebCore {
@@ -40,10 +38,7 @@ class StyledElement : public Element {
public:
virtual ~StyledElement();
- NamedNodeMap* mappedAttributes() { return namedAttrMap.get(); }
- const NamedNodeMap* mappedAttributes() const { return namedAttrMap.get(); }
-
- bool hasMappedAttributes() const { return namedAttrMap && mappedAttributes()->hasMappedAttributes(); }
+ bool hasMappedAttributes() const { return attributeMap() && attributeMap()->hasMappedAttributes(); }
bool isMappedAttribute(const QualifiedName& name) const { MappedAttributeEntry res = eNone; mapToEntry(name, res); return res != eNone; }
void addCSSLength(Attribute*, int id, const String& value);
@@ -61,12 +56,12 @@ public:
CSSMutableStyleDeclaration* inlineStyleDecl() const { return m_inlineStyleDecl.get(); }
virtual bool canHaveAdditionalAttributeStyleDecls() const { return false; }
- virtual void additionalAttributeStyleDecls(Vector<CSSMutableStyleDeclaration*>&) {};
+ virtual void additionalAttributeStyleDecls(Vector<CSSMutableStyleDeclaration*>&) { }
CSSMutableStyleDeclaration* getInlineStyleDecl();
CSSStyleDeclaration* style();
void invalidateStyleAttribute();
- const SpaceSplitString& classNames() const { ASSERT(hasClass()); ASSERT(mappedAttributes()); return mappedAttributes()->classNames(); }
+ const SpaceSplitString& classNames() const;
virtual bool mapToEntry(const QualifiedName& attrName, MappedAttributeEntry& result) const;
@@ -101,6 +96,13 @@ private:
RefPtr<CSSMutableStyleDeclaration> m_inlineStyleDecl;
};
+inline const SpaceSplitString& StyledElement::classNames() const
+{
+ ASSERT(hasClass());
+ ASSERT(attributeMap());
+ return attributeMap()->classNames();
+}
+
inline void StyledElement::invalidateStyleAttribute()
{
clearIsStyleAttributeValid();