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 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
5 * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. | 5 * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. |
6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
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 23 matching lines...) Expand all Loading... |
34 : DynamicSubtreeNodeList(rootNode, RootedAtNode, DoNotInvalidateOnAttributeC
hange) | 34 : DynamicSubtreeNodeList(rootNode, RootedAtNode, DoNotInvalidateOnAttributeC
hange) |
35 , m_namespaceURI(namespaceURI) | 35 , m_namespaceURI(namespaceURI) |
36 , m_localName(localName) | 36 , m_localName(localName) |
37 { | 37 { |
38 ASSERT(m_namespaceURI.isNull() || !m_namespaceURI.isEmpty()); | 38 ASSERT(m_namespaceURI.isNull() || !m_namespaceURI.isEmpty()); |
39 } | 39 } |
40 | 40 |
41 TagNodeList::~TagNodeList() | 41 TagNodeList::~TagNodeList() |
42 { | 42 { |
43 if (m_namespaceURI == starAtom) | 43 if (m_namespaceURI == starAtom) |
44 m_node->nodeLists()->removeCacheWithAtomicName(this, DynamicNodeList::Ta
gNodeListType, m_localName); | 44 ownerNode()->nodeLists()->removeCacheWithAtomicName(this, DynamicNodeLis
t::TagNodeListType, m_localName); |
45 else | 45 else |
46 m_node->nodeLists()->removeCacheWithQualifiedName(this, m_namespaceURI,
m_localName); | 46 ownerNode()->nodeLists()->removeCacheWithQualifiedName(this, m_namespace
URI, m_localName); |
47 } | 47 } |
48 | 48 |
49 bool TagNodeList::nodeMatches(Element* testNode) const | 49 bool TagNodeList::nodeMatches(Element* testNode) const |
50 { | 50 { |
51 // Implements http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#conce
pt-getelementsbytagnamens | 51 // Implements http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#conce
pt-getelementsbytagnamens |
52 if (m_localName != starAtom && m_localName != testNode->localName()) | 52 if (m_localName != starAtom && m_localName != testNode->localName()) |
53 return false; | 53 return false; |
54 | 54 |
55 return m_namespaceURI == starAtom || m_namespaceURI == testNode->namespaceUR
I(); | 55 return m_namespaceURI == starAtom || m_namespaceURI == testNode->namespaceUR
I(); |
56 } | 56 } |
(...skipping 11 matching lines...) Expand all Loading... |
68 const AtomicString& localName = testNode->isHTMLElement() ? m_loweredLoc
alName : m_localName; | 68 const AtomicString& localName = testNode->isHTMLElement() ? m_loweredLoc
alName : m_localName; |
69 if (localName != testNode->localName()) | 69 if (localName != testNode->localName()) |
70 return false; | 70 return false; |
71 } | 71 } |
72 | 72 |
73 ASSERT(m_namespaceURI == starAtom); | 73 ASSERT(m_namespaceURI == starAtom); |
74 return true; | 74 return true; |
75 } | 75 } |
76 | 76 |
77 } // namespace WebCore | 77 } // namespace WebCore |
OLD | NEW |