Diff
Modified: trunk/Source/WebCore/ChangeLog (97583 => 97584)
--- trunk/Source/WebCore/ChangeLog 2011-10-17 04:27:09 UTC (rev 97583)
+++ trunk/Source/WebCore/ChangeLog 2011-10-17 05:06:15 UTC (rev 97584)
@@ -1,3 +1,25 @@
+2011-10-16 Kentaro Hara <hara...@chromium.org>
+
+ Generate EventSource constructor for JSC by [Constructor] IDL
+ https://bugs.webkit.org/show_bug.cgi?id=70212
+
+ Reviewed by Adam Barth.
+
+ Removed JSEventSourceCustom.cpp.
+
+ Tests: fast/dom/global-constructors.html
+ fast/eventsource/eventsource-constructor.html
+ fast/eventsource/eventsource-attribute-listeners.html
+
+ * GNUmakefile.list.am: Removed JSEventSourceCustom.cpp.
+ * UseJSC.cmake: Ditto.
+ * WebCore.gypi: Ditto.
+ * WebCore.pro: Ditto.
+ * WebCore.xcodeproj/project.pbxproj: Ditto.
+ * bindings/js/JSBindingsAllInOne.cpp: Ditto.
+ * bindings/js/JSEventSourceCustom.cpp: Removed this file.
+ * page/EventSource.idl: Removed 'JSCustomConstructor' IDL.
+
2011-10-16 David Barr <davidb...@chromium.org>
Inline CSSPrimitiveValue::isQuirkValue() as non-virtual function
Modified: trunk/Source/WebCore/GNUmakefile.list.am (97583 => 97584)
--- trunk/Source/WebCore/GNUmakefile.list.am 2011-10-17 04:27:09 UTC (rev 97583)
+++ trunk/Source/WebCore/GNUmakefile.list.am 2011-10-17 05:06:15 UTC (rev 97584)
@@ -730,7 +730,6 @@
Source/WebCore/bindings/js/JSEventConstructors.cpp \
Source/WebCore/bindings/js/JSEventListener.cpp \
Source/WebCore/bindings/js/JSEventListener.h \
- Source/WebCore/bindings/js/JSEventSourceCustom.cpp \
Source/WebCore/bindings/js/JSEventTarget.cpp \
Source/WebCore/bindings/js/JSEventTarget.h \
Source/WebCore/bindings/js/JSErrorHandler.cpp \
Modified: trunk/Source/WebCore/UseJSC.cmake (97583 => 97584)
--- trunk/Source/WebCore/UseJSC.cmake 2011-10-17 04:27:09 UTC (rev 97583)
+++ trunk/Source/WebCore/UseJSC.cmake 2011-10-17 05:06:15 UTC (rev 97584)
@@ -54,7 +54,6 @@
bindings/js/JSEventConstructors.cpp
bindings/js/JSEventCustom.cpp
bindings/js/JSEventListener.cpp
- bindings/js/JSEventSourceCustom.cpp
bindings/js/JSEventTarget.cpp
bindings/js/JSExceptionBase.cpp
bindings/js/JSFloat32ArrayCustom.cpp
Modified: trunk/Source/WebCore/WebCore.gypi (97583 => 97584)
--- trunk/Source/WebCore/WebCore.gypi 2011-10-17 04:27:09 UTC (rev 97583)
+++ trunk/Source/WebCore/WebCore.gypi 2011-10-17 05:06:15 UTC (rev 97584)
@@ -1842,7 +1842,6 @@
'bindings/js/JSEventCustom.cpp',
'bindings/js/JSEventListener.cpp',
'bindings/js/JSEventListener.h',
- 'bindings/js/JSEventSourceCustom.cpp',
'bindings/js/JSEventTarget.cpp',
'bindings/js/JSEventTarget.h',
'bindings/js/JSExceptionBase.cpp',
Modified: trunk/Source/WebCore/WebCore.pro (97583 => 97584)
--- trunk/Source/WebCore/WebCore.pro 2011-10-17 04:27:09 UTC (rev 97583)
+++ trunk/Source/WebCore/WebCore.pro 2011-10-17 05:06:15 UTC (rev 97584)
@@ -277,7 +277,6 @@
bindings/js/JSEventConstructors.cpp \
bindings/js/JSEventCustom.cpp \
bindings/js/JSEventListener.cpp \
- bindings/js/JSEventSourceCustom.cpp \
bindings/js/JSEventTarget.cpp \
bindings/js/JSExceptionBase.cpp \
bindings/js/JSFileReaderCustom.cpp \
Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (97583 => 97584)
--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2011-10-17 04:27:09 UTC (rev 97583)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2011-10-17 05:06:15 UTC (rev 97584)
@@ -4950,7 +4950,6 @@
BC274B31140EBED800EADFA6 /* CSSBorderImageSliceValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC274B30140EBED800EADFA6 /* CSSBorderImageSliceValue.cpp */; };
BC275B7911C5D1C300C9206C /* JSWebKitPointCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC275B7811C5D1C300C9206C /* JSWebKitPointCustom.cpp */; };
BC275B7D11C5D23500C9206C /* JSWebKitCSSMatrixCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC275B7C11C5D23500C9206C /* JSWebKitCSSMatrixCustom.cpp */; };
- BC275B8111C5D2B400C9206C /* JSEventSourceCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC275B8011C5D2B400C9206C /* JSEventSourceCustom.cpp */; };
BC275CB311C5E85C00C9206C /* JSArrayBufferCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC275CB211C5E85C00C9206C /* JSArrayBufferCustom.cpp */; };
BC2CBF4E140F1ABD003879BE /* JSWebGLContextEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = BC2CBF4B140F1A65003879BE /* JSWebGLContextEvent.h */; };
BC2CBF7B140F1D58003879BE /* JSWebGLContextEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC2CBF7A140F1D58003879BE /* JSWebGLContextEvent.cpp */; };
@@ -12206,7 +12205,6 @@
BC274B30140EBED800EADFA6 /* CSSBorderImageSliceValue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CSSBorderImageSliceValue.cpp; sourceTree = "<group>"; };
BC275B7811C5D1C300C9206C /* JSWebKitPointCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSWebKitPointCustom.cpp; sourceTree = "<group>"; };
BC275B7C11C5D23500C9206C /* JSWebKitCSSMatrixCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSWebKitCSSMatrixCustom.cpp; sourceTree = "<group>"; };
- BC275B8011C5D2B400C9206C /* JSEventSourceCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSEventSourceCustom.cpp; sourceTree = "<group>"; };
BC275CB211C5E85C00C9206C /* JSArrayBufferCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSArrayBufferCustom.cpp; sourceTree = "<group>"; };
BC2CBF4B140F1A65003879BE /* JSWebGLContextEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSWebGLContextEvent.h; sourceTree = "<group>"; };
BC2CBF7A140F1D58003879BE /* JSWebGLContextEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSWebGLContextEvent.cpp; sourceTree = "<group>"; };
@@ -19585,7 +19583,6 @@
893C47CA123EEBA2002B3D86 /* JSEntryCustom.cpp */,
893C485212499B06002B3D86 /* JSEntrySyncCustom.cpp */,
BCEFAF4D0C317E6900FA81F6 /* JSEventCustom.cpp */,
- BC275B8011C5D2B400C9206C /* JSEventSourceCustom.cpp */,
2E7582ED12764F260062628B /* JSFileReaderCustom.cpp */,
49EECF7210508D9C00099FAB /* JSFloat32ArrayCustom.cpp */,
6EBC5D84138B4CE000A0CF8A /* JSFloat64ArrayCustom.cpp */,
@@ -26111,7 +26108,6 @@
BC60D9BF0D2A269A00B9918F /* JSEventException.cpp in Sources */,
93B70D6909EB0C7C009D8468 /* JSEventListener.cpp in Sources */,
E0FEF372B47C53EAC1C1FBEE /* JSEventSource.cpp in Sources */,
- BC275B8111C5D2B400C9206C /* JSEventSourceCustom.cpp in Sources */,
BC6090200E91B8EC000C68B5 /* JSEventTarget.cpp in Sources */,
3314ACEB10892086000F0E56 /* JSExceptionBase.cpp in Sources */,
BC00F0140E0A189500FD04E3 /* JSFile.cpp in Sources */,
Modified: trunk/Source/WebCore/bindings/js/JSBindingsAllInOne.cpp (97583 => 97584)
--- trunk/Source/WebCore/bindings/js/JSBindingsAllInOne.cpp 2011-10-17 04:27:09 UTC (rev 97583)
+++ trunk/Source/WebCore/bindings/js/JSBindingsAllInOne.cpp 2011-10-17 05:06:15 UTC (rev 97584)
@@ -75,7 +75,6 @@
#include "JSEventConstructors.cpp"
#include "JSEventCustom.cpp"
#include "JSEventListener.cpp"
-#include "JSEventSourceCustom.cpp"
#include "JSEventTarget.cpp"
#include "JSExceptionBase.cpp"
#include "JSFloat32ArrayCustom.cpp"
Deleted: trunk/Source/WebCore/bindings/js/JSEventSourceCustom.cpp (97583 => 97584)
--- trunk/Source/WebCore/bindings/js/JSEventSourceCustom.cpp 2011-10-17 04:27:09 UTC (rev 97583)
+++ trunk/Source/WebCore/bindings/js/JSEventSourceCustom.cpp 2011-10-17 05:06:15 UTC (rev 97584)
@@ -1,68 +0,0 @@
-/*
- * Copyright (C) 2009 Ericsson AB. All rights reserved.
- * Copyright (C) 2010 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.
- * 3. Neither the name of Ericsson nor the names of its contributors
- * may be used to endorse or promote products derived from this
- * software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 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 THE COPYRIGHT
- * OWNER OR 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.
- */
-
-#include "config.h"
-#include "JSEventSource.h"
-
-#include "EventSource.h"
-#include "ExceptionCode.h"
-#include "ScriptExecutionContext.h"
-#include <runtime/Error.h>
-
-using namespace JSC;
-
-namespace WebCore {
-
-EncodedJSValue JSC_HOST_CALL JSEventSourceConstructor::constructJSEventSource(ExecState* exec)
-{
- if (exec->argumentCount() < 1)
- return throwVMError(exec, createTypeError(exec, "Not enough arguments"));
-
- UString url = ""
- if (exec->hadException())
- return JSValue::encode(JSValue());
-
- JSEventSourceConstructor* jsConstructor = static_cast<JSEventSourceConstructor*>(exec->callee());
- ScriptExecutionContext* context = jsConstructor->scriptExecutionContext();
- if (!context)
- return throwVMError(exec, createReferenceError(exec, "EventSource constructor associated document is unavailable"));
-
- ExceptionCode ec = 0;
- RefPtr<EventSource> eventSource = EventSource::create(context, ustringToString(url), ec);
- if (ec) {
- setDOMException(exec, ec);
- return JSValue::encode(JSValue());
- }
-
- return JSValue::encode(asObject(toJS(exec, jsConstructor->globalObject(), eventSource.release())));
-}
-
-} // namespace WebCore
Modified: trunk/Source/WebCore/page/EventSource.idl (97583 => 97584)
--- trunk/Source/WebCore/page/EventSource.idl 2011-10-17 04:27:09 UTC (rev 97583)
+++ trunk/Source/WebCore/page/EventSource.idl 2011-10-17 05:06:15 UTC (rev 97584)
@@ -34,7 +34,6 @@
interface [
ActiveDOMObject,
CanBeConstructed,
- JSCustomConstructor,
ConstructorParameters=1,
Constructor(in DOMString scriptUrl),
CallWith=ScriptExecutionContext,