| Index: Source/WebCore/dom/ChildNodeList.cpp
|
| ===================================================================
|
| --- Source/WebCore/dom/ChildNodeList.cpp (revision 122247)
|
| +++ Source/WebCore/dom/ChildNodeList.cpp (working copy)
|
| @@ -34,7 +34,7 @@
|
|
|
| ChildNodeList::~ChildNodeList()
|
| {
|
| - node()->removeCachedChildNodeList();
|
| + ownerNode()->removeCachedChildNodeList();
|
| }
|
|
|
| unsigned ChildNodeList::length() const
|
| @@ -43,7 +43,7 @@
|
| return m_caches.cachedLength;
|
|
|
| unsigned len = 0;
|
| - for (Node* n = node()->firstChild(); n; n = n->nextSibling())
|
| + for (Node* n = rootNode()->firstChild(); n; n = n->nextSibling())
|
| len++;
|
|
|
| m_caches.cachedLength = len;
|
| @@ -55,7 +55,7 @@
|
| Node* ChildNodeList::item(unsigned index) const
|
| {
|
| unsigned int pos = 0;
|
| - Node* n = node()->firstChild();
|
| + Node* n = rootNode()->firstChild();
|
|
|
| if (m_caches.isItemCacheValid) {
|
| if (index == m_caches.lastItemOffset)
|
| @@ -76,7 +76,7 @@
|
| int diff = index - pos;
|
| unsigned dist = abs(diff);
|
| if (dist > m_caches.cachedLength - 1 - index) {
|
| - n = node()->lastChild();
|
| + n = rootNode()->lastChild();
|
| pos = m_caches.cachedLength - 1;
|
| }
|
| }
|
| @@ -108,7 +108,7 @@
|
| // Note: Due to the overrides of the length and item functions above,
|
| // this function will be called only by DynamicNodeList::itemWithName,
|
| // for an element that was located with getElementById.
|
| - return testNode->parentNode() == node();
|
| + return testNode->parentNode() == rootNode();
|
| }
|
|
|
| } // namespace WebCore
|
|
|