OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2001 Peter Kelly (pmk@post.com) | 4 * (C) 2001 Peter Kelly (pmk@post.com) |
5 * (C) 2001 Dirk Mueller (mueller@kde.org) | 5 * (C) 2001 Dirk Mueller (mueller@kde.org) |
6 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights
reserved. | 6 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights |
| 7 * reserved. |
7 * | 8 * |
8 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
9 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
10 * License as published by the Free Software Foundation; either | 11 * License as published by the Free Software Foundation; either |
11 * version 2 of the License, or (at your option) any later version. | 12 * version 2 of the License, or (at your option) any later version. |
12 * | 13 * |
13 * This library is distributed in the hope that it will be useful, | 14 * This library is distributed in the hope that it will be useful, |
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 15 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
16 * Library General Public License for more details. | 17 * Library General Public License for more details. |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 | 74 |
74 String nodeName() const override { return name(); } | 75 String nodeName() const override { return name(); } |
75 NodeType getNodeType() const override { return kAttributeNode; } | 76 NodeType getNodeType() const override { return kAttributeNode; } |
76 | 77 |
77 String nodeValue() const override { return value(); } | 78 String nodeValue() const override { return value(); } |
78 void setNodeValue(const String&) override; | 79 void setNodeValue(const String&) override; |
79 Node* cloneNode(bool deep) override; | 80 Node* cloneNode(bool deep) override; |
80 | 81 |
81 bool isAttributeNode() const override { return true; } | 82 bool isAttributeNode() const override { return true; } |
82 | 83 |
83 // Attr wraps either an element/name, or a name/value pair (when it's a standa
lone Node.) | 84 // Attr wraps either an element/name, or a name/value pair (when it's a |
84 // Note that m_name is always set, but m_element/m_standaloneValue may be null
. | 85 // standalone Node.) |
| 86 // Note that m_name is always set, but m_element/m_standaloneValue may be |
| 87 // null. |
85 Member<Element> m_element; | 88 Member<Element> m_element; |
86 QualifiedName m_name; | 89 QualifiedName m_name; |
87 // Holds the value if it is a standalone Node, or the local name of the | 90 // Holds the value if it is a standalone Node, or the local name of the |
88 // attribute it is attached to on an Element. The latter may (letter case) | 91 // attribute it is attached to on an Element. The latter may (letter case) |
89 // differ from m_name's local name. As these two modes are non-overlapping, | 92 // differ from m_name's local name. As these two modes are non-overlapping, |
90 // use a single field. | 93 // use a single field. |
91 AtomicString m_standaloneValueOrAttachedLocalName; | 94 AtomicString m_standaloneValueOrAttachedLocalName; |
92 }; | 95 }; |
93 | 96 |
94 DEFINE_NODE_TYPE_CASTS(Attr, isAttributeNode()); | 97 DEFINE_NODE_TYPE_CASTS(Attr, isAttributeNode()); |
95 | 98 |
96 } // namespace blink | 99 } // namespace blink |
97 | 100 |
98 #endif // Attr_h | 101 #endif // Attr_h |
OLD | NEW |