Reviewed by Darin.
authormjs <mjs@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 1 Mar 2005 01:58:34 +0000 (01:58 +0000)
committermjs <mjs@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 1 Mar 2005 01:58:34 +0000 (01:58 +0000)
commitf39e0816c51bc2f9426d381d9862263e0d102773
tree67e01e2973fbc6d52fbfa008d05973f1c8f59912
parent92185fc225d91752878dfd775f1869b93fe408b9
    Reviewed by Darin.

<rdar://problem/4002864> REGRESSION(125-146) getElementById in onload fails in a test case involving external resources

Moved management of elementById hashtable from attach/detach to
insertedIntoDocument/removedFromDocument, to avoid being thrown
off by temporary detaches due to style recalcs.

        * khtml/xml/dom_elementimpl.cpp:
        (ElementImpl::insertedIntoDocument):
        (ElementImpl::removedFromDocument):
        (ElementImpl::attach):
        (ElementImpl::updateId):
        * khtml/xml/dom_elementimpl.h:

Make sure that insertedIntoDocument is called before firing any
DOM events.

        * khtml/xml/dom_nodeimpl.cpp:
        (NodeBaseImpl::dispatchChildInsertedEvents):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8724 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebCore/ChangeLog-2005-08-23
WebCore/khtml/xml/dom_elementimpl.cpp
WebCore/khtml/xml/dom_elementimpl.h
WebCore/khtml/xml/dom_nodeimpl.cpp