| 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 | 6 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights |
| 7 * reserved. | 7 * reserved. |
| 8 * | 8 * |
| 9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
| 10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 Attr(Document&, const QualifiedName&, const AtomicString& value); | 67 Attr(Document&, const QualifiedName&, const AtomicString& value); |
| 68 | 68 |
| 69 bool isElementNode() const = | 69 bool isElementNode() const = |
| 70 delete; // This will catch anyone doing an unnecessary check. | 70 delete; // This will catch anyone doing an unnecessary check. |
| 71 | 71 |
| 72 String nodeName() const override { return name(); } | 72 String nodeName() const override { return name(); } |
| 73 NodeType getNodeType() const override { return kAttributeNode; } | 73 NodeType getNodeType() const override { return kAttributeNode; } |
| 74 | 74 |
| 75 String nodeValue() const override { return value(); } | 75 String nodeValue() const override { return value(); } |
| 76 void setNodeValue(const String&) override; | 76 void setNodeValue(const String&) override; |
| 77 Node* cloneNode(bool deep) override; | 77 Node* cloneNode(bool deep, ExceptionState&) override; |
| 78 | 78 |
| 79 bool isAttributeNode() const override { return true; } | 79 bool isAttributeNode() const override { return true; } |
| 80 | 80 |
| 81 // Attr wraps either an element/name, or a name/value pair (when it's a | 81 // Attr wraps either an element/name, or a name/value pair (when it's a |
| 82 // standalone Node.) | 82 // standalone Node.) |
| 83 // Note that m_name is always set, but m_element/m_standaloneValue may be | 83 // Note that m_name is always set, but m_element/m_standaloneValue may be |
| 84 // null. | 84 // null. |
| 85 TraceWrapperMember<Element> m_element; | 85 TraceWrapperMember<Element> m_element; |
| 86 QualifiedName m_name; | 86 QualifiedName m_name; |
| 87 // Holds the value if it is a standalone Node, or the local name of the | 87 // 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) | 88 // 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, | 89 // differ from m_name's local name. As these two modes are non-overlapping, |
| 90 // use a single field. | 90 // use a single field. |
| 91 AtomicString m_standaloneValueOrAttachedLocalName; | 91 AtomicString m_standaloneValueOrAttachedLocalName; |
| 92 }; | 92 }; |
| 93 | 93 |
| 94 DEFINE_NODE_TYPE_CASTS(Attr, isAttributeNode()); | 94 DEFINE_NODE_TYPE_CASTS(Attr, isAttributeNode()); |
| 95 | 95 |
| 96 } // namespace blink | 96 } // namespace blink |
| 97 | 97 |
| 98 #endif // Attr_h | 98 #endif // Attr_h |
| OLD | NEW |