- 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)
commitdba04e1d5538716540ba32638784ff07af2c2102
tree2663e48c5cf22ccff1eb4c5a0479bb626d21228d
parentc54c5be782b4156097b5a5ec5eca6e453890aa9c
    - 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: https://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