|
1 /* |
|
2 * This file is part of the DOM implementation for KDE. |
|
3 * |
|
4 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
|
5 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
|
6 * (C) 2001 Peter Kelly (pmk@post.com) |
|
7 * (C) 2001 Dirk Mueller (mueller@kde.org) |
|
8 * Copyright (C) 2003, 2004, 2005, 2006 Apple Computer, Inc. |
|
9 * |
|
10 * This library is free software; you can redistribute it and/or |
|
11 * modify it under the terms of the GNU Library General Public |
|
12 * License as published by the Free Software Foundation; either |
|
13 * version 2 of the License, or (at your option) any later version. |
|
14 * |
|
15 * This library is distributed in the hope that it will be useful, |
|
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|
18 * Library General Public License for more details. |
|
19 * |
|
20 * You should have received a copy of the GNU Library General Public License |
|
21 * along with this library; see the file COPYING.LIB. If not, write to |
|
22 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
|
23 * Boston, MA 02110-1301, USA. |
|
24 * |
|
25 */ |
|
26 |
|
27 #ifndef MappedAttribute_h |
|
28 #define MappedAttribute_h |
|
29 |
|
30 #include "Attribute.h" |
|
31 #include "CSSMappedAttributeDeclaration.h" |
|
32 |
|
33 namespace WebCore { |
|
34 |
|
35 class Attr; |
|
36 class CSSStyleDeclaration; |
|
37 class CSSStyleSelector; |
|
38 class Element; |
|
39 class NamedAttrMap; |
|
40 |
|
41 class MappedAttribute : public Attribute |
|
42 { |
|
43 public: |
|
44 MappedAttribute(const QualifiedName& name, const AtomicString& value, CSSMappedAttributeDeclaration* decl = 0) |
|
45 : Attribute(name, value), m_styleDecl(decl) |
|
46 { |
|
47 } |
|
48 |
|
49 MappedAttribute(const AtomicString& name, const AtomicString& value, CSSMappedAttributeDeclaration* decl = 0) |
|
50 : Attribute(name, value), m_styleDecl(decl) |
|
51 { |
|
52 } |
|
53 |
|
54 virtual Attribute* clone(bool preserveDecl=true) const; |
|
55 |
|
56 virtual CSSStyleDeclaration* style() const { return m_styleDecl.get(); } |
|
57 |
|
58 CSSMappedAttributeDeclaration* decl() const { return m_styleDecl.get(); } |
|
59 void setDecl(CSSMappedAttributeDeclaration* decl) { m_styleDecl = decl; } |
|
60 |
|
61 private: |
|
62 RefPtr<CSSMappedAttributeDeclaration> m_styleDecl; |
|
63 }; |
|
64 |
|
65 } //namespace |
|
66 |
|
67 #endif |