Patch by Anders Carlsson <andersca@mac.com
authorjusting <justing@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 9 Aug 2005 21:29:43 +0000 (21:29 +0000)
committerjusting <justing@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 9 Aug 2005 21:29:43 +0000 (21:29 +0000)
commit4c4be7dc417f8005947cce9afaf78675925b818b
treed5bf6fc8bae79e858f3180a478bfb7871f7c5a9f
parenta658ba84d234ba48ddee25fe96ca40272b29645c
    Patch by Anders Carlsson <andersca@mac.com

        Reviewed by darin

        Fixes <http://bugzilla.opendarwin.org/show_bug.cgi?id=4331> dispatchEvent should raise an exception

        Test cases added:
        * layout-tests/dom/html/level2/events/createEvent01-expected.txt:
        * layout-tests/dom/html/level2/events/dispatchEvent01-expected.txt:
        * layout-tests/dom/html/level2/events/dispatchEvent02-expected.txt:
        * layout-tests/dom/html/level2/events/dispatchEvent03-expected.txt:
        * layout-tests/dom/html/level2/events/dispatchEvent04-expected.txt:
        * layout-tests/dom/html/level2/events/dispatchEvent05-expected.txt:
        * layout-tests/dom/html/level2/events/dispatchEvent06-expected.txt:
        * layout-tests/dom/html/level2/events/dispatchEvent07-expected.txt:
        * layout-tests/dom/html/level2/events/dispatchEvent09-expected.txt:
        * layout-tests/dom/html/level2/events/dispatchEvent11-expected.txt:
        * layout-tests/dom/html/level2/events/initEvent01-expected.txt:
        * layout-tests/dom/html/level2/events/initEvent02-expected.txt:
        * layout-tests/dom/html/level2/events/initEvent03-expected.txt:
        These tests pass now.

        * layout-tests/dom/html/level2/events/dispatchEvent08-expected.txt:
        * layout-tests/dom/html/level2/events/dispatchEvent10-expected.txt:
        * layout-tests/dom/html/level2/events/dispatchEvent12-expected.txt:
        * layout-tests/dom/html/level2/events/dispatchEvent13-expected.txt:
        These tests fail somplace else now.

        * khtml/dom/dom2_events.h:
        (DOM::EventException::):
        Add _EXCEPTION_OFFSET and _EXCEPTION_MAX.

        * khtml/ecma/kjs_binding.cpp:
        (KJS::setDOMException):
        Handle EventExceptions.

        * khtml/xml/dom_docimpl.cpp:
        (DocumentImpl::createEvent):
        Allow "Events" as event type.

        * khtml/xml/dom_nodeimpl.cpp:
        (DOM::NodeImpl::dispatchEvent):
        Raise exception if event is NULL, uninitialized, or if its name is the empty string.

        * kwq/DOMInternal.mm:
        (raiseDOMException):
        Handle EventExceptions.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@10109 268f45cc-cd09-0410-ab3c-d52691b4dbfc
23 files changed:
LayoutTests/dom/html/level2/events/createEvent01-expected.txt
LayoutTests/dom/html/level2/events/dispatchEvent01-expected.txt
LayoutTests/dom/html/level2/events/dispatchEvent02-expected.txt
LayoutTests/dom/html/level2/events/dispatchEvent03-expected.txt
LayoutTests/dom/html/level2/events/dispatchEvent04-expected.txt
LayoutTests/dom/html/level2/events/dispatchEvent05-expected.txt
LayoutTests/dom/html/level2/events/dispatchEvent06-expected.txt
LayoutTests/dom/html/level2/events/dispatchEvent07-expected.txt
LayoutTests/dom/html/level2/events/dispatchEvent08-expected.txt
LayoutTests/dom/html/level2/events/dispatchEvent09-expected.txt
LayoutTests/dom/html/level2/events/dispatchEvent10-expected.txt
LayoutTests/dom/html/level2/events/dispatchEvent11-expected.txt
LayoutTests/dom/html/level2/events/dispatchEvent12-expected.txt
LayoutTests/dom/html/level2/events/dispatchEvent13-expected.txt
LayoutTests/dom/html/level2/events/initEvent01-expected.txt
LayoutTests/dom/html/level2/events/initEvent02-expected.txt
LayoutTests/dom/html/level2/events/initEvent03-expected.txt
WebCore/ChangeLog-2005-08-23
WebCore/khtml/dom/dom2_events.h
WebCore/khtml/ecma/kjs_binding.cpp
WebCore/khtml/xml/dom_docimpl.cpp
WebCore/khtml/xml/dom_nodeimpl.cpp
WebCore/kwq/DOMInternal.mm