| 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) 2004, 2005, 2006, 2007, 2008, 2009, 2013 Apple Inc. All rights
reserved. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2013 Apple Inc. All rights
reserved. |
| 7 * (C) 2007 Eric Seidel (eric@webkit.org) | 7 * (C) 2007 Eric Seidel (eric@webkit.org) |
| 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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 | 93 |
| 94 PassRefPtr<Node> NamedNodeMap::setNamedItemNS(Node* node, ExceptionState& except
ionState) | 94 PassRefPtr<Node> NamedNodeMap::setNamedItemNS(Node* node, ExceptionState& except
ionState) |
| 95 { | 95 { |
| 96 return setNamedItem(node, exceptionState); | 96 return setNamedItem(node, exceptionState); |
| 97 } | 97 } |
| 98 | 98 |
| 99 PassRefPtr<Node> NamedNodeMap::item(unsigned index) const | 99 PassRefPtr<Node> NamedNodeMap::item(unsigned index) const |
| 100 { | 100 { |
| 101 if (index >= length()) | 101 if (index >= length()) |
| 102 return nullptr; | 102 return nullptr; |
| 103 return m_element->ensureAttr(m_element->attributeItem(index)->name()); | 103 return m_element->ensureAttr(m_element->attributeItem(index).name()); |
| 104 } | 104 } |
| 105 | 105 |
| 106 size_t NamedNodeMap::length() const | 106 size_t NamedNodeMap::length() const |
| 107 { | 107 { |
| 108 if (!m_element->hasAttributes()) | 108 if (!m_element->hasAttributes()) |
| 109 return 0; | 109 return 0; |
| 110 return m_element->attributeCount(); | 110 return m_element->attributeCount(); |
| 111 } | 111 } |
| 112 | 112 |
| 113 } // namespace WebCore | 113 } // namespace WebCore |
| OLD | NEW |