- landed fix for <http://bugzilla.opendarwin.org/show_bug.cgi?id=3677>
authorggaren <ggaren@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 14 Jul 2005 17:58:17 +0000 (17:58 +0000)
committerggaren <ggaren@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 14 Jul 2005 17:58:17 +0000 (17:58 +0000)
commita405b175cf852ea71e8eb237dce8fbcd877f4e2e
tree2663e48c5cf22ccff1eb4c5a0479bb626d21228d
parent5b8ed8bbdfcc603487f8dd0af0814b0f0d5bc0a5
    - landed fix for <bugzilla.opendarwin.org/show_bug.cgi?id=3677>
        Safari fail to access a second time an element whose content was dynamically modified.

        - patch by Anders Carlsson <andersca@mac.com>.

        Reviewed by mjs + darin.

        Test cases added:
        * layout-tests/fast/dom/ids/duplicate-ids-expected.txt: Added.
        * layout-tests/fast/dom/ids/duplicate-ids.html: Added.

        * khtml/xml/dom_docimpl.cpp:
        (DocumentImpl::getElementById):
        If no element in the id dict can be found and we know that there's
        at least one other element with the same id around, then traverse the document
        and insert the new element in the id table.

        (DocumentImpl::addElementById):
        (DocumentImpl::removeElementById):
        Increment and decrement the id count accordingly.

        * khtml/xml/dom_docimpl.h:
        Add QDict for id counts. Make element QDict mutable.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@9764 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/fast/dom/duplicate-ids-expected.txt [new file with mode: 0644]
LayoutTests/fast/dom/duplicate-ids.html [new file with mode: 0644]
WebCore/ChangeLog-2005-08-23
WebCore/khtml/xml/dom_docimpl.cpp
WebCore/khtml/xml/dom_docimpl.h