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
reserved. |
7 * | 7 * |
8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 Attr(Element&, const QualifiedName&); | 63 Attr(Element&, const QualifiedName&); |
64 Attr(Document&, const QualifiedName&, const AtomicString& value); | 64 Attr(Document&, const QualifiedName&, const AtomicString& value); |
65 | 65 |
66 bool isElementNode() const = delete; // This will catch anyone doing an unne
cessary check. | 66 bool isElementNode() const = delete; // This will catch anyone doing an unne
cessary check. |
67 | 67 |
68 String nodeName() const override { return name(); } | 68 String nodeName() const override { return name(); } |
69 NodeType nodeType() const override { return ATTRIBUTE_NODE; } | 69 NodeType nodeType() const override { return ATTRIBUTE_NODE; } |
70 | 70 |
71 String nodeValue() const override { return value(); } | 71 String nodeValue() const override { return value(); } |
72 void setNodeValue(const String&) override; | 72 void setNodeValue(const String&) override; |
73 PassRefPtrWillBeRawPtr<Node> cloneNode(bool deep = true) override; | 73 PassRefPtrWillBeRawPtr<Node> cloneNode(bool deep) override; |
74 | 74 |
75 bool isAttributeNode() const override { return true; } | 75 bool isAttributeNode() const override { return true; } |
76 | 76 |
77 // Attr wraps either an element/name, or a name/value pair (when it's a stan
dalone Node.) | 77 // Attr wraps either an element/name, or a name/value pair (when it's a stan
dalone Node.) |
78 // Note that m_name is always set, but m_element/m_standaloneValue may be nu
ll. | 78 // Note that m_name is always set, but m_element/m_standaloneValue may be nu
ll. |
79 RawPtrWillBeMember<Element> m_element; | 79 RawPtrWillBeMember<Element> m_element; |
80 QualifiedName m_name; | 80 QualifiedName m_name; |
81 // Holds the value if it is a standalone Node, or the local name of the | 81 // Holds the value if it is a standalone Node, or the local name of the |
82 // attribute it is attached to on an Element. The latter may (letter case) | 82 // attribute it is attached to on an Element. The latter may (letter case) |
83 // differ from m_name's local name. As these two modes are non-overlapping, | 83 // differ from m_name's local name. As these two modes are non-overlapping, |
84 // use a single field. | 84 // use a single field. |
85 AtomicString m_standaloneValueOrAttachedLocalName; | 85 AtomicString m_standaloneValueOrAttachedLocalName; |
86 }; | 86 }; |
87 | 87 |
88 DEFINE_NODE_TYPE_CASTS(Attr, isAttributeNode()); | 88 DEFINE_NODE_TYPE_CASTS(Attr, isAttributeNode()); |
89 | 89 |
90 } // namespace blink | 90 } // namespace blink |
91 | 91 |
92 #endif // Attr_h | 92 #endif // Attr_h |
OLD | NEW |