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 | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2013 Apple Inc. All rights |
7 * reserved. | 7 * reserved. |
8 * (C) 2007 Eric Seidel (eric@webkit.org) | 8 * (C) 2007 Eric Seidel (eric@webkit.org) |
9 * | 9 * |
10 * This library is free software; you can redistribute it and/or | 10 * This library is free software; you can redistribute it and/or |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 } | 54 } |
55 return m_element->detachAttribute(index); | 55 return m_element->detachAttribute(index); |
56 } | 56 } |
57 | 57 |
58 Attr* NamedNodeMap::removeNamedItemNS(const AtomicString& namespaceURI, | 58 Attr* NamedNodeMap::removeNamedItemNS(const AtomicString& namespaceURI, |
59 const AtomicString& localName, | 59 const AtomicString& localName, |
60 ExceptionState& exceptionState) { | 60 ExceptionState& exceptionState) { |
61 size_t index = m_element->attributes().findIndex( | 61 size_t index = m_element->attributes().findIndex( |
62 QualifiedName(nullAtom, localName, namespaceURI)); | 62 QualifiedName(nullAtom, localName, namespaceURI)); |
63 if (index == kNotFound) { | 63 if (index == kNotFound) { |
64 exceptionState.throwDOMException( | 64 exceptionState.throwDOMException(NotFoundError, |
65 NotFoundError, "No item with name '" + namespaceURI + "::" + localName + | 65 "No item with name '" + namespaceURI + |
66 "' was found."); | 66 "::" + localName + "' was found."); |
67 return nullptr; | 67 return nullptr; |
68 } | 68 } |
69 return m_element->detachAttribute(index); | 69 return m_element->detachAttribute(index); |
70 } | 70 } |
71 | 71 |
72 Attr* NamedNodeMap::setNamedItem(Attr* attr, ExceptionState& exceptionState) { | 72 Attr* NamedNodeMap::setNamedItem(Attr* attr, ExceptionState& exceptionState) { |
73 DCHECK(attr); | 73 DCHECK(attr); |
74 return m_element->setAttributeNode(attr, exceptionState); | 74 return m_element->setAttributeNode(attr, exceptionState); |
75 } | 75 } |
76 | 76 |
(...skipping 11 matching lines...) Expand all Loading... |
88 | 88 |
89 size_t NamedNodeMap::length() const { | 89 size_t NamedNodeMap::length() const { |
90 return m_element->attributes().size(); | 90 return m_element->attributes().size(); |
91 } | 91 } |
92 | 92 |
93 DEFINE_TRACE(NamedNodeMap) { | 93 DEFINE_TRACE(NamedNodeMap) { |
94 visitor->trace(m_element); | 94 visitor->trace(m_element); |
95 } | 95 } |
96 | 96 |
97 } // namespace blink | 97 } // namespace blink |
OLD | NEW |