Bug 25412

Summary: The Window object should be an EventTarget
Product: WebKit Reporter: Sam Weinig <sam>
Component: WebCore JavaScriptAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal    
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Mac   
OS: OS X 10.5   
Attachments:
Description Flags
Patch [WIP]
none
patch with tests mitz: review+

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.

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