WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
WIP Patch
154170_Window_EventTarget_wip.patch (text/plain), 21.48 KB, created by
Chris Dumez
on 2016-02-12 16:40:21 PST
(
hide
)
Description:
WIP Patch
Filename:
MIME Type:
Creator:
Chris Dumez
Created:
2016-02-12 16:40:21 PST
Size:
21.48 KB
patch
obsolete
>diff --git a/LayoutTests/fast/loader/window-clearing-expected.txt b/LayoutTests/fast/loader/window-clearing-expected.txt >index c76bb65..c8c6e71 100644 >--- a/LayoutTests/fast/loader/window-clearing-expected.txt >+++ b/LayoutTests/fast/loader/window-clearing-expected.txt >@@ -7,3 +7,5 @@ PASS: element 0 in the window's prototype chain was cleared > PASS: element 1 in the window's prototype chain was cleared > > PASS: element 2 in the window's prototype chain was cleared >+ >+PASS: element 3 in the window's prototype chain was cleared >diff --git a/LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt >index 46618ef..67d0788 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt >+++ b/LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt >@@ -3799,14 +3799,10 @@ FAIL DragEvent interface object name assert_own_property: self does not have own > FAIL DragEvent interface: existence and properties of interface prototype object assert_own_property: self does not have own property "DragEvent" expected property "DragEvent" missing > FAIL DragEvent interface: existence and properties of interface prototype object's "constructor" property assert_own_property: self does not have own property "DragEvent" expected property "DragEvent" missing > FAIL DragEvent interface: attribute dataTransfer assert_own_property: self does not have own property "DragEvent" expected property "DragEvent" missing >-FAIL Window interface: existence and properties of interface object assert_equals: prototype of Window is not EventTarget expected function "function EventTarget() { >- [native code] >-}" but got function "function () { >- [native code] >-}" >+PASS Window interface: existence and properties of interface object > PASS Window interface object length > PASS Window interface object name >-FAIL Window interface: existence and properties of interface prototype object assert_equals: Class name for prototype of Window.prototype is not "WindowProperties" expected "[object WindowProperties]" but got "[object Object]" >+FAIL Window interface: existence and properties of interface prototype object assert_equals: Class name for prototype of Window.prototype is not "WindowProperties" expected "[object WindowProperties]" but got "[object EventTargetPrototype]" > FAIL Window interface: existence and properties of interface prototype object's "constructor" property assert_own_property: Window.prototype does not have own property "constructor" expected property "constructor" missing > PASS Window interface: attribute self > PASS Window interface: attribute name >diff --git a/Source/WebCore/WebCore.xcodeproj/project.pbxproj b/Source/WebCore/WebCore.xcodeproj/project.pbxproj >index aac1efa..d42f135 100644 >--- a/Source/WebCore/WebCore.xcodeproj/project.pbxproj >+++ b/Source/WebCore/WebCore.xcodeproj/project.pbxproj >@@ -1709,6 +1709,7 @@ > 4669B2871B852A0B000F905F /* JSDOMNamedFlowCollectionCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46F2768E1B85297F005C2556 /* JSDOMNamedFlowCollectionCustom.cpp */; }; > 467302021C4EFE7800BCB357 /* IgnoreOpensDuringUnloadCountIncrementer.h in Headers */ = {isa = PBXBuildFile; fileRef = 467302011C4EFE6600BCB357 /* IgnoreOpensDuringUnloadCountIncrementer.h */; }; > 4689F1AF1267BAE100E8D380 /* FileMetadata.h in Headers */ = {isa = PBXBuildFile; fileRef = 4689F1AE1267BAE100E8D380 /* FileMetadata.h */; }; >+ 46B63F6C1C6E8D19002E914B /* JSEventTargetCustom.h in Headers */ = {isa = PBXBuildFile; fileRef = 46B63F6B1C6E8CDF002E914B /* JSEventTargetCustom.h */; settings = {ATTRIBUTES = (Private, ); }; }; > 46C83EFD1A9BBE2900A79A41 /* GeoNotifier.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46C83EFB1A9BBE2900A79A41 /* GeoNotifier.cpp */; }; > 46C83EFE1A9BBE2900A79A41 /* GeoNotifier.h in Headers */ = {isa = PBXBuildFile; fileRef = 46C83EFC1A9BBE2900A79A41 /* GeoNotifier.h */; settings = {ATTRIBUTES = (Private, ); }; }; > 46DB7D571B20FE46005651B2 /* VNodeTrackerCocoa.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46DB7D561B20FE3C005651B2 /* VNodeTrackerCocoa.cpp */; }; >@@ -9190,6 +9191,7 @@ > 463EB6211B8789CB0096ED51 /* TagCollection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TagCollection.h; sourceTree = "<group>"; }; > 467302011C4EFE6600BCB357 /* IgnoreOpensDuringUnloadCountIncrementer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IgnoreOpensDuringUnloadCountIncrementer.h; sourceTree = "<group>"; }; > 4689F1AE1267BAE100E8D380 /* FileMetadata.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FileMetadata.h; sourceTree = "<group>"; }; >+ 46B63F6B1C6E8CDF002E914B /* JSEventTargetCustom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSEventTargetCustom.h; sourceTree = "<group>"; }; > 46C83EFB1A9BBE2900A79A41 /* GeoNotifier.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GeoNotifier.cpp; sourceTree = "<group>"; }; > 46C83EFC1A9BBE2900A79A41 /* GeoNotifier.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GeoNotifier.h; sourceTree = "<group>"; }; > 46DB7D561B20FE3C005651B2 /* VNodeTrackerCocoa.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = VNodeTrackerCocoa.cpp; sourceTree = "<group>"; }; >@@ -22193,6 +22195,7 @@ > F3D461461161D53200CA0D09 /* JSErrorHandler.cpp */, > F3D461471161D53200CA0D09 /* JSErrorHandler.h */, > BC60901E0E91B8EC000C68B5 /* JSEventTargetCustom.cpp */, >+ 46B63F6B1C6E8CDF002E914B /* JSEventTargetCustom.h */, > 3314ACE910892086000F0E56 /* JSExceptionBase.cpp */, > 3314ACEA10892086000F0E56 /* JSExceptionBase.h */, > 8F934D841189F1EE00508D5D /* JSMainThreadExecState.cpp */, >@@ -24981,6 +24984,7 @@ > 2EDEF1F7121B0EFC00726DB2 /* BlobRegistryImpl.h in Headers */, > 2EB4BCD3121F03E300EC4885 /* BlobResourceHandle.h in Headers */, > 976D6C7F122B8A3D001FD1F7 /* BlobURL.h in Headers */, >+ 46B63F6C1C6E8D19002E914B /* JSEventTargetCustom.h in Headers */, > 93F199BE08245E59001E9ABC /* BlockExceptions.h in Headers */, > BC5EB5E10E81BE8700B25965 /* BorderData.h in Headers */, > 589556ED18D4A44000764B03 /* BorderEdge.h in Headers */, >diff --git a/Source/WebCore/bindings/js/JSDOMWindowCustom.cpp b/Source/WebCore/bindings/js/JSDOMWindowCustom.cpp >index 115dae5..a518fc7 100644 >--- a/Source/WebCore/bindings/js/JSDOMWindowCustom.cpp >+++ b/Source/WebCore/bindings/js/JSDOMWindowCustom.cpp >@@ -751,34 +751,6 @@ JSValue JSDOMWindow::setInterval(ExecState& state) > return jsNumber(result); > } > >-JSValue JSDOMWindow::addEventListener(ExecState& state) >-{ >- Frame* frame = wrapped().frame(); >- if (!frame) >- return jsUndefined(); >- >- JSValue listener = state.argument(1); >- if (!listener.isObject()) >- return jsUndefined(); >- >- wrapped().addEventListener(state.argument(0).toString(&state)->toAtomicString(&state), JSEventListener::create(asObject(listener), this, false, globalObject()->world()), state.argument(2).toBoolean(&state)); >- return jsUndefined(); >-} >- >-JSValue JSDOMWindow::removeEventListener(ExecState& state) >-{ >- Frame* frame = wrapped().frame(); >- if (!frame) >- return jsUndefined(); >- >- JSValue listener = state.argument(1); >- if (!listener.isObject()) >- return jsUndefined(); >- >- wrapped().removeEventListener(state.argument(0).toString(&state)->toAtomicString(&state), JSEventListener::create(asObject(listener), this, false, globalObject()->world()).ptr(), state.argument(2).toBoolean(&state)); >- return jsUndefined(); >-} >- > DOMWindow* JSDOMWindow::toWrapped(JSValue value) > { > if (!value.isObject()) >diff --git a/Source/WebCore/bindings/js/JSDOMWindowShell.cpp b/Source/WebCore/bindings/js/JSDOMWindowShell.cpp >index 1120668..6603540 100644 >--- a/Source/WebCore/bindings/js/JSDOMWindowShell.cpp >+++ b/Source/WebCore/bindings/js/JSDOMWindowShell.cpp >@@ -32,7 +32,7 @@ > #include "Frame.h" > #include "GCController.h" > #include "JSDOMWindow.h" >-#include "DOMWindow.h" >+#include "JSEventTarget.h" > #include "ScriptController.h" > #include <heap/StrongInlines.h> > #include <runtime/JSObject.h> >@@ -85,6 +85,7 @@ void JSDOMWindowShell::setWindow(PassRefPtr<DOMWindow> domWindow) > Structure* structure = JSDOMWindow::createStructure(vm, 0, prototype.get()); > JSDOMWindow* jsDOMWindow = JSDOMWindow::create(vm, structure, *domWindow, this); > prototype->structure()->setGlobalObject(vm, jsDOMWindow); >+ prototype->structure()->setPrototypeWithoutTransition(vm, JSEventTarget::getPrototype(vm, jsDOMWindow)); > setWindow(vm, jsDOMWindow); > ASSERT(jsDOMWindow->globalObject() == jsDOMWindow); > ASSERT(prototype->globalObject() == jsDOMWindow); >diff --git a/Source/WebCore/bindings/js/JSDOMWindowShell.h b/Source/WebCore/bindings/js/JSDOMWindowShell.h >index 01f048d..bdfdd2f 100644 >--- a/Source/WebCore/bindings/js/JSDOMWindowShell.h >+++ b/Source/WebCore/bindings/js/JSDOMWindowShell.h >@@ -29,12 +29,12 @@ > #ifndef JSDOMWindowShell_h > #define JSDOMWindowShell_h > >+#include "DOMWindow.h" > #include "JSDOMWindow.h" > #include <runtime/JSProxy.h> > > namespace WebCore { > >- class DOMWindow; > class Frame; > > class JSDOMWindowShell : public JSC::JSProxy { >diff --git a/Source/WebCore/bindings/js/JSDictionary.cpp b/Source/WebCore/bindings/js/JSDictionary.cpp >index 3346ccf..6634e16 100644 >--- a/Source/WebCore/bindings/js/JSDictionary.cpp >+++ b/Source/WebCore/bindings/js/JSDictionary.cpp >@@ -27,6 +27,7 @@ > #include "JSDictionary.h" > > #include "ArrayValue.h" >+#include "DOMWindow.h" > #include "Dictionary.h" > #include "JSCSSFontFaceRule.h" > #include "JSDOMError.h" >diff --git a/Source/WebCore/bindings/js/JSEventTargetCustom.cpp b/Source/WebCore/bindings/js/JSEventTargetCustom.cpp >index e8ead1c..ba8d160 100644 >--- a/Source/WebCore/bindings/js/JSEventTargetCustom.cpp >+++ b/Source/WebCore/bindings/js/JSEventTargetCustom.cpp >@@ -1,5 +1,5 @@ > /* >- * Copyright (C) 2008 Apple Inc. All Rights Reserved. >+ * Copyright (C) 2008, 2016 Apple Inc. All Rights Reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions >@@ -26,10 +26,15 @@ > #include "config.h" > #include "JSEventTarget.h" > >+#include "DOMWindow.h" >+#include "EventTarget.h" > #include "EventTargetHeaders.h" > #include "EventTargetInterfaces.h" >+#include "JSDOMWindow.h" > #include "JSDOMWindowShell.h" > #include "JSEventListener.h" >+#include "JSWorkerGlobalScope.h" >+#include "WorkerGlobalScope.h" > > using namespace JSC; > >@@ -61,12 +66,23 @@ JSValue toJS(ExecState* exec, JSDOMGlobalObject* globalObject, EventTarget* targ > EventTarget* JSEventTarget::toWrapped(JSC::JSValue value) > { > TRY_TO_UNWRAP_WITH_INTERFACE(DOMWindowShell) >+ TRY_TO_UNWRAP_WITH_INTERFACE(DOMWindow) >+ TRY_TO_UNWRAP_WITH_INTERFACE(WorkerGlobalScope) > TRY_TO_UNWRAP_WITH_INTERFACE(EventTarget) >- // FIXME: Remove this once all event targets extend EventTarget >- DOM_EVENT_TARGET_INTERFACES_FOR_EACH(TRY_TO_UNWRAP_WITH_INTERFACE) >- return 0; >+ return nullptr; > } > > #undef TRY_TO_UNWRAP_WITH_INTERFACE > >+std::unique_ptr<JSEventTargetCastedThis> JSEventTargetCastedThis::create(JSC::JSValue thisValue) >+{ >+ if (auto* jsEventTarget = JSC::jsDynamicCast<JSEventTarget*>(thisValue)) >+ return std::make_unique<JSEventTargetCastedThis>(jsEventTarget->wrapped(), *jsEventTarget); >+ if (auto* jsDOMWindow = toJSDOMWindow(thisValue)) >+ return std::make_unique<JSEventTargetCastedThis>(jsDOMWindow->wrapped(), *jsDOMWindow); >+ if (auto* jsWorkerGlobalScope = toJSWorkerGlobalScope(thisValue)) >+ return std::make_unique<JSEventTargetCastedThis>(jsWorkerGlobalScope->wrapped(), *jsWorkerGlobalScope); >+ return nullptr; >+} >+ > } // namespace WebCore >diff --git a/Source/WebCore/bindings/js/JSEventTargetCustom.h b/Source/WebCore/bindings/js/JSEventTargetCustom.h >new file mode 100644 >index 0000000..a91111f >--- /dev/null >+++ b/Source/WebCore/bindings/js/JSEventTargetCustom.h >@@ -0,0 +1,55 @@ >+/* >+ * Copyright (C) 2016 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#ifndef JSEventTargetCustom_h >+#define JSEventTargetCustom_h >+ >+#include "JSDOMBinding.h" >+ >+namespace WebCore { >+ >+// Wrapper type for JSEventTarget's castedThis because JSDOMWindow and JSWorkerGlobalScope do not inherit JSEventTarget. >+class JSEventTargetCastedThis { >+ WTF_MAKE_FAST_ALLOCATED; >+public: >+ static std::unique_ptr<JSEventTargetCastedThis> create(JSC::JSValue thisValue); >+ >+ EventTarget& wrapped() { return m_wrapped; } >+ >+ operator JSC::JSObject&() { return m_wrapper; } >+ >+ JSEventTargetCastedThis(EventTarget& wrapped, JSC::JSObject& wrapper) >+ : m_wrapped(wrapped) >+ , m_wrapper(wrapper) >+ { } >+ >+private: >+ EventTarget& m_wrapped; >+ JSC::JSObject& m_wrapper; >+}; >+ >+} >+ >+#endif // JSEventTargetCustom_h >diff --git a/Source/WebCore/bindings/js/WorkerScriptController.cpp b/Source/WebCore/bindings/js/WorkerScriptController.cpp >index 09d178b..de2d00e 100644 >--- a/Source/WebCore/bindings/js/WorkerScriptController.cpp >+++ b/Source/WebCore/bindings/js/WorkerScriptController.cpp >@@ -30,6 +30,7 @@ > > #include "JSDOMBinding.h" > #include "JSDedicatedWorkerGlobalScope.h" >+#include "JSEventTarget.h" > #include "ScriptSourceCode.h" > #include "WebCoreJSClientData.h" > #include "WorkerGlobalScope.h" >@@ -89,6 +90,7 @@ void WorkerScriptController::initScript() > ASSERT(structure->globalObject() == m_workerGlobalScopeWrapper); > ASSERT(m_workerGlobalScopeWrapper->structure()->globalObject() == m_workerGlobalScopeWrapper); > workerGlobalScopePrototype->structure()->setGlobalObject(*m_vm, m_workerGlobalScopeWrapper.get()); >+ workerGlobalScopePrototype->structure()->setPrototypeWithoutTransition(*m_vm, JSEventTarget::getPrototype(*m_vm, m_workerGlobalScopeWrapper.get())); > dedicatedContextPrototype->structure()->setGlobalObject(*m_vm, m_workerGlobalScopeWrapper.get()); > } > ASSERT(m_workerGlobalScopeWrapper->globalObject() == m_workerGlobalScopeWrapper); >diff --git a/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm b/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm >index e2c50a8..3a371c4 100644 >--- a/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm >+++ b/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm >@@ -558,6 +558,7 @@ sub ShouldGenerateToJSDeclaration > return 0 if ($interface->extendedAttributes->{"SuppressToJSObject"}); > return 0 if not NeedsImplementationClass($interface); > return 0 if $interface->name eq "AbstractView"; >+ return 0 if $interface->extendedAttributes->{"CustomProxyToJSObject"}; > return 1 if (!$hasParent or $interface->extendedAttributes->{"JSGenerateToJSObject"} or $interface->extendedAttributes->{"CustomToJSObject"}); > return 1 if $interface->parent && $interface->parent eq "EventTarget"; > return 0; >@@ -1740,6 +1741,7 @@ sub GetCastingHelperForThisObject > if ($interface->name eq "Document") { > return "jsDocumentCast"; > } >+ return "JSEventTargetCastedThis::create" if $interface->name eq "EventTarget"; > return "jsDynamicCast<JS" . $interface->name . "*>"; > } > >@@ -3228,19 +3230,15 @@ sub GenerateFunctionCastedThis > push(@implContent, " $className* castedThis = to${className}(state->thisValue().toThis(state, NotStrictMode));\n"); > push(@implContent, " if (UNLIKELY(!castedThis))\n"); > push(@implContent, " return throwVMTypeError(state);\n"); >- } elsif ($interface->extendedAttributes->{"WorkerGlobalScope"}) { >- push(@implContent, " $className* castedThis = to${className}(state->thisValue().toThis(state, NotStrictMode));\n"); >- push(@implContent, " if (UNLIKELY(!castedThis))\n"); >- push(@implContent, " return throwVMTypeError(state);\n"); > } else { > push(@implContent, " JSValue thisValue = state->thisValue();\n"); >- push(@implContent, " $className* castedThis = " . GetCastingHelperForThisObject($interface) . "(thisValue);\n"); >+ push(@implContent, " auto castedThis = " . GetCastingHelperForThisObject($interface) . "(thisValue);\n"); > my $domFunctionName = $function->signature->name; > push(@implContent, " if (UNLIKELY(!castedThis))\n"); > push(@implContent, " return throwThisTypeError(*state, \"$interfaceName\", \"$domFunctionName\");\n"); > } > >- push(@implContent, " ASSERT_GC_OBJECT_INHERITS(castedThis, ${className}::info());\n"); >+ push(@implContent, " ASSERT_GC_OBJECT_INHERITS(castedThis, ${className}::info());\n") unless $interfaceName eq "EventTarget"; > } > > sub GenerateCallWith >diff --git a/Source/WebCore/dom/EventTarget.cpp b/Source/WebCore/dom/EventTarget.cpp >index 56aa293..5bb90b0 100644 >--- a/Source/WebCore/dom/EventTarget.cpp >+++ b/Source/WebCore/dom/EventTarget.cpp >@@ -76,11 +76,20 @@ bool EventTarget::isMessagePort() const > > bool EventTarget::addEventListener(const AtomicString& eventType, RefPtr<EventListener>&& listener, bool useCapture) > { >+ if (auto* window = toDOMWindow()) { >+ if (!window->frame()) >+ return false; >+ } > return ensureEventTargetData().eventListenerMap.add(eventType, WTFMove(listener), useCapture); > } > > bool EventTarget::removeEventListener(const AtomicString& eventType, EventListener* listener, bool useCapture) > { >+ if (auto* window = toDOMWindow()) { >+ if (!window->frame()) >+ return false; >+ } >+ > EventTargetData* d = eventTargetData(); > if (!d) > return false; >diff --git a/Source/WebCore/dom/EventTarget.idl b/Source/WebCore/dom/EventTarget.idl >index a48b3db..a955287 100644 >--- a/Source/WebCore/dom/EventTarget.idl >+++ b/Source/WebCore/dom/EventTarget.idl >@@ -25,6 +25,7 @@ > CustomToJSObject, > JSCustomToNativeObject, > EventTarget, >+ JSCustomHeader, > ] interface EventTarget { > [ObjCLegacyUnnamedParameters] void addEventListener(DOMString type, EventListener listener, optional boolean useCapture); > [ObjCLegacyUnnamedParameters] void removeEventListener(DOMString type, EventListener listener, optional boolean useCapture); >diff --git a/Source/WebCore/page/DOMWindow.idl b/Source/WebCore/page/DOMWindow.idl >index 883c923..522a1f9 100644 >--- a/Source/WebCore/page/DOMWindow.idl >+++ b/Source/WebCore/page/DOMWindow.idl >@@ -36,10 +36,9 @@ > JSCustomToNativeObject, > CustomPutFunction, > EventTarget, >- JSGenerateToNativeObject, > JSLegacyParent=JSDOMWindowBase, > InterfaceName=Window, >-] interface DOMWindow { >+] interface DOMWindow : EventTarget { > // DOM Level 0 > [Replaceable] readonly attribute Screen screen; > [Replaceable] readonly attribute History history; >@@ -186,11 +185,6 @@ > > [Replaceable] readonly attribute DOMWindowCSS CSS; > >- // EventTarget interface >- [Custom] void addEventListener(DOMString type, EventListener listener, optional boolean useCapture); >- [Custom] void removeEventListener(DOMString type, EventListener listener, optional boolean useCapture); >- [ImplementedAs=dispatchEventForBindings, RaisesException] boolean dispatchEvent(Event event); >- > void captureEvents(/*in long eventFlags*/); > void releaseEvents(/*in long eventFlags*/); > >diff --git a/Source/WebCore/workers/WorkerGlobalScope.idl b/Source/WebCore/workers/WorkerGlobalScope.idl >index 748eaf0..3a1110f 100644 >--- a/Source/WebCore/workers/WorkerGlobalScope.idl >+++ b/Source/WebCore/workers/WorkerGlobalScope.idl >@@ -31,7 +31,7 @@ > JSCustomGetOwnPropertySlotAndDescriptor, > EventTarget, > JSLegacyParent=JSWorkerGlobalScopeBase, >-] interface WorkerGlobalScope { >+] interface WorkerGlobalScope : EventTarget { > > #if defined(LANGUAGE_JAVASCRIPT) && LANGUAGE_JAVASCRIPT > [Replaceable] readonly attribute WorkerGlobalScope self; >@@ -48,12 +48,6 @@ > [Custom] void importScripts(/*[Variadic] DOMString urls */); > [Replaceable] readonly attribute WorkerNavigator navigator; > >- // EventTarget interface >- >- void addEventListener(DOMString type, EventListener listener, optional boolean useCapture); >- void removeEventListener(DOMString type, EventListener listener, optional boolean useCapture); >- [ImplementedAs=dispatchEventForBindings, RaisesException] boolean dispatchEvent(Event event); >- > // Additional constructors > > attribute DOMURLConstructor webkitURL; // FIXME: deprecate this.
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 154170
:
271245
|
271246
|
271251
|
271267
|
271317