Reviewed by Darin, landed by ap.
authorap <ap@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 28 Dec 2005 18:46:24 +0000 (18:46 +0000)
committerap <ap@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 28 Dec 2005 18:46:24 +0000 (18:46 +0000)
commitb5fcd59d22724878b714eca7dfdb677ca3f798d0
treeb7c5d5158dd4ee660eec6b4c4fab159f2e74095c
parent04569ffbad88c84f7b26dfe565ad5c43c840ffe7
    Reviewed by Darin, landed by ap.

        Test: fast/dom/HTMLScriptElement/script-load-events.html

        - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=5812
          Generate load events for <script> elements

        * khtml/html/html_headimpl.cpp:
        (HTMLScriptElementImpl::parseMappedAttribute): Parse the onload and onerror attributes.
        (HTMLScriptElementImpl::closeRenderer): Call base class's implementation.
        (HTMLScriptElementImpl::notifyFinished): Dispatch load and error events.
        * khtml/html/htmlparser.h:
        * khtml/html/htmlparser.cpp:
        (HTMLParser::parseToken): Return the node that was inserted.
        * khtml/html/htmltokenizer.h: Added scriptNode, a RefPtr to the node corresponding
        to the current load request.
        * khtml/html/htmltokenizer.cpp:
        (HTMLTokenizer::scriptHandler): Reset scriptNode if a load request was not made.
        (HTMLTokenizer::parseTag): Set scriptNode to the node created from the script tag.
        (HTMLTokenizer::processToken): Return the node that was inserted.
        (HTMLTokenizer::notifyFinished): Reset scriptNode and dispatch load and error events.
        * khtml/misc/loader.h:
        (CachedScript::errorOccurred): Added.
        * khtml/misc/loader.cpp:
        (CachedScript::CachedScript):
        (CachedScript::error):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@11791 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebCore/ChangeLog
WebCore/khtml/html/html_headimpl.cpp
WebCore/khtml/html/htmlparser.cpp
WebCore/khtml/html/htmlparser.h
WebCore/khtml/html/htmltokenizer.cpp
WebCore/khtml/html/htmltokenizer.h
WebCore/khtml/misc/loader.cpp
WebCore/khtml/misc/loader.h