X-Git-Url: https://git.webkit.org/?p=WebKit-https.git;a=blobdiff_plain;f=WebCore%2Fkwq%2FKWQListImpl.mm;h=3899fa70759a1ecde549c6041d71a31f60fe443b;hp=54c621590c5ee55de7c8b891c880eaac273ab508;hb=a066549418c3886bcff8c566f34428acdacc49ea;hpb=564ba30c0453078a37716d228b1f22ccfb8a4f45;ds=sidebyside diff --git a/WebCore/kwq/KWQListImpl.mm b/WebCore/kwq/KWQListImpl.mm index 54c621590c5e..3899fa70759a 100644 --- a/WebCore/kwq/KWQListImpl.mm +++ b/WebCore/kwq/KWQListImpl.mm @@ -448,6 +448,27 @@ uint KWQListImpl::containsRef(const void *item) const return count; } +// Only used for KDOM::NodeImpl::compareDocumentPosition(NodeImpl *other) +// remove when no longer needed. +int KWQListImpl::findRef(const void *item) +{ + KWQListNode *node = head; + int index = 0; + + while (node != NULL && item != node->data) { + node = node->next; + index++; + } + + cur = node; + + if (node == NULL) { + return -1; + } + + return index; +} + KWQListImpl &KWQListImpl::assign(const KWQListImpl &impl, bool deleteItems) { clear(deleteItems);