Bug 25412 - The Window object should be an EventTarget
Summary: The Window object should be an EventTarget
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore JavaScript (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.5
: P2 Normal
Assignee: Nobody
Depends on:
Reported: 2009-04-26 14:47 PDT by Sam Weinig
Modified: 2009-04-26 17:03 PDT (History)
0 users

See Also:

Patch [WIP] (8.06 KB, patch)
2009-04-26 14:50 PDT, Sam Weinig
no flags Details | Formatted Diff | Diff
patch with tests (14.07 KB, patch)
2009-04-26 16:53 PDT, Sam Weinig
mitz: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sam Weinig 2009-04-26 14:47:55 PDT
The Window object should be a full fledged EventTarget and implement dispatchEvent.
Comment 1 Sam Weinig 2009-04-26 14:50:12 PDT
Created attachment 29805 [details]
Patch [WIP]

This patch turns makes the DOMWindow an EventTarget but it is still a WIP as I have not had time to make tests yet.  I will update when I next have a chance.  I am putting this up so I don't lose it.
Comment 2 Sam Weinig 2009-04-26 14:50:40 PDT
A follow up patch should move more the window event dispatch code to DOMWindow.
Comment 3 Sam Weinig 2009-04-26 16:53:15 PDT
Created attachment 29808 [details]
patch with tests
Comment 4 mitz 2009-04-26 16:57:54 PDT
Comment on attachment 29808 [details]
patch with tests

> Index: WebCore/page/DOMWindow.h
> ===================================================================
> --- WebCore/page/DOMWindow.h	(revision 42880)
> +++ WebCore/page/DOMWindow.h	(working copy)
> @@ -30,6 +30,7 @@
>  #include "PlatformString.h"
>  #include "RegisteredEventListener.h"
>  #include "SecurityOrigin.h"
> +#include "EventTarget.h"
>  #include <wtf/Forward.h>
>  #include <wtf/RefCounted.h>
>  #include <wtf/RefPtr.h>

Please keep in ASCII order.

Comment 5 Sam Weinig 2009-04-26 17:03:28 PDT
Landed in r42882.