Title: [101724] trunk
Revision
101724
Author
[email protected]
Date
2011-12-01 17:03:37 -0800 (Thu, 01 Dec 2011)

Log Message

Replace a custom constructor of window.Option with the [NamedConstructor] IDL
https://bugs.webkit.org/show_bug.cgi?id=73498

Reviewed by Adam Barth.

Removes JSOptionConstructor.{h,cpp} and generates the constructor of window.Option
by the [NamedConstructor] IDL.

Source/WebCore:

Tests: fast/js/custom-constructors.html
       fast/forms/option-index.html
       fast/forms/add-and-remove-option.html
       fast/dom/dom-add-optionelement.html

* GNUmakefile.list.am: Removed JSOptionConstructor.{h,cpp}.
* Target.pri: Ditto.
* UseJSC.cmake: Ditto.
* WebCore.gypi: Ditto.
* WebCore.order: Ditto.
* WebCore.vcproj/WebCore.vcproj: Ditto.
* WebCore.xcodeproj/project.pbxproj: Ditto.
* bindings/js/JSBindingsAllInOne.cpp: Ditto.

* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::JSDOMWindow::option): Specifies the NamedConstructor.
* bindings/js/JSOptionConstructor.cpp: Removed.
* bindings/js/JSOptionConstructor.h: Removed.
* page/DOMWindow.idl: Removed the [JSCustomConstructor] IDL.

LayoutTests:

* platform/mac/fast/dom/Window/window-properties-expected.txt: Updated the test result.

Modified Paths

Removed Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (101723 => 101724)


--- trunk/LayoutTests/ChangeLog	2011-12-02 00:59:17 UTC (rev 101723)
+++ trunk/LayoutTests/ChangeLog	2011-12-02 01:03:37 UTC (rev 101724)
@@ -1,5 +1,17 @@
 2011-12-01  Kentaro Hara  <[email protected]>
 
+        Replace a custom constructor of window.Option with the [NamedConstructor] IDL
+        https://bugs.webkit.org/show_bug.cgi?id=73498
+
+        Reviewed by Adam Barth.
+
+        Removes JSOptionConstructor.{h,cpp} and generates the constructor of window.Option
+        by the [NamedConstructor] IDL.
+
+        * platform/mac/fast/dom/Window/window-properties-expected.txt: Updated the test result.
+
+2011-12-01  Kentaro Hara  <[email protected]>
+
         Replace a custom constructor of window.Audio with the [NamedConstructor] IDL
         https://bugs.webkit.org/show_bug.cgi?id=73496
 

Modified: trunk/LayoutTests/platform/mac/fast/dom/Window/window-properties-expected.txt (101723 => 101724)


--- trunk/LayoutTests/platform/mac/fast/dom/Window/window-properties-expected.txt	2011-12-02 00:59:17 UTC (rev 101723)
+++ trunk/LayoutTests/platform/mac/fast/dom/Window/window-properties-expected.txt	2011-12-02 01:03:37 UTC (rev 101724)
@@ -1435,7 +1435,6 @@
 window.OfflineAudioCompletionEvent [object OfflineAudioCompletionEventConstructor]
 window.OfflineAudioCompletionEvent.prototype [printed above as window.Event.prototype]
 window.Option [object OptionConstructor]
-window.Option.length [number]
 window.Option.prototype [printed above as window.Element.prototype]
 window.OverflowEvent [object OverflowEventConstructor]
 window.OverflowEvent.BOTH [number]

Modified: trunk/Source/WebCore/ChangeLog (101723 => 101724)


--- trunk/Source/WebCore/ChangeLog	2011-12-02 00:59:17 UTC (rev 101723)
+++ trunk/Source/WebCore/ChangeLog	2011-12-02 01:03:37 UTC (rev 101724)
@@ -1,5 +1,35 @@
 2011-12-01  Kentaro Hara  <[email protected]>
 
+        Replace a custom constructor of window.Option with the [NamedConstructor] IDL
+        https://bugs.webkit.org/show_bug.cgi?id=73498
+
+        Reviewed by Adam Barth.
+
+        Removes JSOptionConstructor.{h,cpp} and generates the constructor of window.Option
+        by the [NamedConstructor] IDL.
+
+        Tests: fast/js/custom-constructors.html
+               fast/forms/option-index.html
+               fast/forms/add-and-remove-option.html
+               fast/dom/dom-add-optionelement.html
+
+        * GNUmakefile.list.am: Removed JSOptionConstructor.{h,cpp}.
+        * Target.pri: Ditto.
+        * UseJSC.cmake: Ditto.
+        * WebCore.gypi: Ditto.
+        * WebCore.order: Ditto.
+        * WebCore.vcproj/WebCore.vcproj: Ditto.
+        * WebCore.xcodeproj/project.pbxproj: Ditto.
+        * bindings/js/JSBindingsAllInOne.cpp: Ditto.
+
+        * bindings/js/JSDOMWindowCustom.cpp:
+        (WebCore::JSDOMWindow::option): Specifies the NamedConstructor.
+        * bindings/js/JSOptionConstructor.cpp: Removed.
+        * bindings/js/JSOptionConstructor.h: Removed.
+        * page/DOMWindow.idl: Removed the [JSCustomConstructor] IDL.
+
+2011-12-01  Kentaro Hara  <[email protected]>
+
         Replace a custom constructor of window.Audio with the [NamedConstructor] IDL
         https://bugs.webkit.org/show_bug.cgi?id=73496
 

Modified: trunk/Source/WebCore/GNUmakefile.list.am (101723 => 101724)


--- trunk/Source/WebCore/GNUmakefile.list.am	2011-12-02 00:59:17 UTC (rev 101723)
+++ trunk/Source/WebCore/GNUmakefile.list.am	2011-12-02 01:03:37 UTC (rev 101724)
@@ -833,8 +833,6 @@
 	Source/WebCore/bindings/js/JSNodeFilterCustom.cpp \
 	Source/WebCore/bindings/js/JSNodeIteratorCustom.cpp \
 	Source/WebCore/bindings/js/JSNodeListCustom.cpp \
-	Source/WebCore/bindings/js/JSOptionConstructor.cpp \
-	Source/WebCore/bindings/js/JSOptionConstructor.h \
 	Source/WebCore/bindings/js/JSPeerConnectionCustom.cpp \
 	Source/WebCore/bindings/js/JSPluginElementFunctions.cpp \
 	Source/WebCore/bindings/js/JSPluginElementFunctions.h \

Modified: trunk/Source/WebCore/Target.pri (101723 => 101724)


--- trunk/Source/WebCore/Target.pri	2011-12-02 00:59:17 UTC (rev 101723)
+++ trunk/Source/WebCore/Target.pri	2011-12-02 01:03:37 UTC (rev 101724)
@@ -327,7 +327,6 @@
         bindings/js/JSNodeFilterCustom.cpp \
         bindings/js/JSNodeIteratorCustom.cpp \
         bindings/js/JSNodeListCustom.cpp \
-        bindings/js/JSOptionConstructor.cpp \
         bindings/js/JSPluginElementFunctions.cpp \
         bindings/js/JSPopStateEventCustom.cpp \
         bindings/js/JSProcessingInstructionCustom.cpp \
@@ -1431,7 +1430,6 @@
         bindings/js/JSLocationCustom.h \
         bindings/js/JSNodeCustom.h \
         bindings/js/JSNodeFilterCondition.h \
-        bindings/js/JSOptionConstructor.h \
         bindings/js/JSPluginElementFunctions.h \
         bindings/js/JSStorageCustom.h \
         bindings/js/JSWorkerContextBase.h \

Modified: trunk/Source/WebCore/UseJSC.cmake (101723 => 101724)


--- trunk/Source/WebCore/UseJSC.cmake	2011-12-02 00:59:17 UTC (rev 101723)
+++ trunk/Source/WebCore/UseJSC.cmake	2011-12-02 01:03:37 UTC (rev 101724)
@@ -102,7 +102,6 @@
     bindings/js/JSNodeFilterCustom.cpp
     bindings/js/JSNodeIteratorCustom.cpp
     bindings/js/JSNodeListCustom.cpp
-    bindings/js/JSOptionConstructor.cpp
     bindings/js/JSPluginElementFunctions.cpp
     bindings/js/JSPopStateEventCustom.cpp
     bindings/js/JSProcessingInstructionCustom.cpp

Modified: trunk/Source/WebCore/WebCore.gypi (101723 => 101724)


--- trunk/Source/WebCore/WebCore.gypi	2011-12-02 00:59:17 UTC (rev 101723)
+++ trunk/Source/WebCore/WebCore.gypi	2011-12-02 01:03:37 UTC (rev 101724)
@@ -1933,8 +1933,6 @@
             'bindings/js/JSNodeFilterCustom.cpp',
             'bindings/js/JSNodeIteratorCustom.cpp',
             'bindings/js/JSNodeListCustom.cpp',
-            'bindings/js/JSOptionConstructor.cpp',
-            'bindings/js/JSOptionConstructor.h',
             'bindings/js/JSPeerConnectionCustom.cpp',
             'bindings/js/JSPluginElementFunctions.cpp',
             'bindings/js/JSPopStateEventCustom.cpp',

Modified: trunk/Source/WebCore/WebCore.order (101723 => 101724)


--- trunk/Source/WebCore/WebCore.order	2011-12-02 00:59:17 UTC (rev 101723)
+++ trunk/Source/WebCore/WebCore.order	2011-12-02 01:03:37 UTC (rev 101724)
@@ -20702,8 +20702,6 @@
 __ZN7WebCore17getDOMConstructorINS_30JSHTMLKeygenElementConstructorEEEPN3JSC8JSObjectEPNS2_9ExecStateEPKNS_17JSDOMGlobalObjectE
 __ZN7WebCore28jsDOMWindowOptionConstructorEPN3JSC9ExecStateENS0_7JSValueERKNS0_10IdentifierE
 __ZNK7WebCore11JSDOMWindow6optionEPN3JSC9ExecStateE
-__ZN7WebCore17getDOMConstructorINS_19JSOptionConstructorEEEPN3JSC8JSObjectEPNS2_9ExecStateEPKNS_17JSDOMGlobalObjectE
-__ZN7WebCore19JSOptionConstructorC1EPN3JSC9ExecStateEPNS1_9StructureEPNS_17JSDOMGlobalObjectE
 __ZN7WebCore28JSHTMLOptionElementPrototype4selfEPN3JSC9ExecStateEPNS1_14JSGlobalObjectE
 __ZN7WebCore39jsDOMWindowSVGEllipseElementConstructorEPN3JSC9ExecStateENS0_7JSValueERKNS0_10IdentifierE
 __ZN7WebCore19JSSVGEllipseElement14getConstructorEPN3JSC9ExecStateEPNS1_14JSGlobalObjectE
@@ -21409,7 +21407,6 @@
 __ZN3JSC18getStaticValueSlotIN7WebCore21JSNodeListConstructorENS1_12JSDOMWrapperEEEbPNS_9ExecStateEPKNS_9HashTableEPT_RKNS_10IdentifierERNS_12PropertySlotE
 __ZN7WebCore21JSNotationConstructor18getOwnPropertySlotEPN3JSC9ExecStateERKNS1_10IdentifierERNS1_12PropertySlotE
 __ZN3JSC18getStaticValueSlotIN7WebCore21JSNotationConstructorENS1_12JSDOMWrapperEEEbPNS_9ExecStateEPKNS_9HashTableEPT_RKNS_10IdentifierERNS_12PropertySlotE
-__ZN7WebCore19JSOptionConstructor16getConstructDataERN3JSC13ConstructDataE
 __ZN7WebCoreL26constructHTMLOptionElementEPN3JSC9ExecStateE
 __ZN7WebCore17HTMLOptionElement22createForJSConstructorEPNS_8DocumentERKN3WTF6StringES6_bbRi
 __ZN7WebCore17HTMLOptionElement18setDefaultSelectedEb
@@ -21868,7 +21865,6 @@
 __ZN7WebCore29JSSVGSymbolElementConstructorD1Ev
 __ZN7WebCore27JSSVGSymbolElementPrototypeD1Ev
 __ZN7WebCore30JSHTMLKeygenElementConstructorD1Ev
-__ZN7WebCore19JSOptionConstructorD1Ev
 __ZN7WebCore30JSSVGEllipseElementConstructorD1Ev
 __ZN7WebCore28JSSVGEllipseElementPrototypeD1Ev
 __ZN7WebCore37JSSVGLinearGradientElementConstructorD1Ev

Modified: trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj (101723 => 101724)


--- trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj	2011-12-02 00:59:17 UTC (rev 101723)
+++ trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj	2011-12-02 01:03:37 UTC (rev 101724)
@@ -63369,62 +63369,6 @@
 					</FileConfiguration>
 				</File>
 				<File
-					RelativePath="..\bindings\js\JSOptionConstructor.cpp"
-					>
-					<FileConfiguration
-						Name="Debug|Win32"
-						ExcludedFromBuild="true"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-						/>
-					</FileConfiguration>
-					<FileConfiguration
-						Name="Release|Win32"
-						ExcludedFromBuild="true"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-						/>
-					</FileConfiguration>
-					<FileConfiguration
-						Name="Debug_Cairo_CFLite|Win32"
-						ExcludedFromBuild="true"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-						/>
-					</FileConfiguration>
-					<FileConfiguration
-						Name="Release_Cairo_CFLite|Win32"
-						ExcludedFromBuild="true"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-						/>
-					</FileConfiguration>
-					<FileConfiguration
-						Name="Debug_All|Win32"
-						ExcludedFromBuild="true"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-						/>
-					</FileConfiguration>
-					<FileConfiguration
-						Name="Production|Win32"
-						ExcludedFromBuild="true"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-						/>
-					</FileConfiguration>
-				</File>
-				<File
-					RelativePath="..\bindings\js\JSOptionConstructor.h"
-					>
-				</File>
-				<File
 					RelativePath="..\bindings\js\JSPluginElementFunctions.cpp"
 					>
 					<FileConfiguration

Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (101723 => 101724)


--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2011-12-02 00:59:17 UTC (rev 101723)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2011-12-02 01:03:37 UTC (rev 101724)
@@ -3763,8 +3763,6 @@
 		A8239E0009B3CF8A00B60641 /* Logging.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8239DFE09B3CF8A00B60641 /* Logging.cpp */; };
 		A8239E0109B3CF8A00B60641 /* Logging.h in Headers */ = {isa = PBXBuildFile; fileRef = A8239DFF09B3CF8A00B60641 /* Logging.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		A824B4650E2EF2EA0081A7B7 /* TextRun.h in Headers */ = {isa = PBXBuildFile; fileRef = A824B4640E2EF2EA0081A7B7 /* TextRun.h */; settings = {ATTRIBUTES = (Private, ); }; };
-		A826E8AE0A1A8F2300CD1BB6 /* JSOptionConstructor.h in Headers */ = {isa = PBXBuildFile; fileRef = A826E8AC0A1A8F2300CD1BB6 /* JSOptionConstructor.h */; };
-		A826EC480A1B0CBE00CD1BB6 /* JSOptionConstructor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A826E8AD0A1A8F2300CD1BB6 /* JSOptionConstructor.cpp */; };
 		A833C7CA0A2CF06B00D57664 /* SVGNames.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 656581E809D1508D000E61D7 /* SVGNames.cpp */; };
 		A833C7CC0A2CF07400D57664 /* XLinkNames.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 656581EA09D1508D000E61D7 /* XLinkNames.cpp */; };
 		A833C80C0A2CF25600D57664 /* XMLNames.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A833C80A0A2CF25600D57664 /* XMLNames.cpp */; };
@@ -10852,8 +10850,6 @@
 		A8239DFE09B3CF8A00B60641 /* Logging.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Logging.cpp; sourceTree = "<group>"; };
 		A8239DFF09B3CF8A00B60641 /* Logging.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Logging.h; sourceTree = "<group>"; };
 		A824B4640E2EF2EA0081A7B7 /* TextRun.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextRun.h; sourceTree = "<group>"; };
-		A826E8AC0A1A8F2300CD1BB6 /* JSOptionConstructor.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSOptionConstructor.h; sourceTree = "<group>"; };
-		A826E8AD0A1A8F2300CD1BB6 /* JSOptionConstructor.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSOptionConstructor.cpp; sourceTree = "<group>"; };
 		A833C7F60A2CF1D800D57664 /* xmlattrs.in */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = xmlattrs.in; sourceTree = "<group>"; };
 		A833C80A0A2CF25600D57664 /* XMLNames.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = XMLNames.cpp; sourceTree = "<group>"; };
 		A833C80B0A2CF25600D57664 /* XMLNames.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = XMLNames.h; sourceTree = "<group>"; };
@@ -20044,8 +20040,6 @@
 			children = (
 				BC6C49F10D7DBA0500FFA558 /* JSImageConstructor.cpp */,
 				BC6C49F20D7DBA0500FFA558 /* JSImageConstructor.h */,
-				A826E8AD0A1A8F2300CD1BB6 /* JSOptionConstructor.cpp */,
-				A826E8AC0A1A8F2300CD1BB6 /* JSOptionConstructor.h */,
 			);
 			name = Constructors;
 			sourceTree = "<group>";
@@ -23370,7 +23364,6 @@
 				77A17AA712F28B2A004E02F6 /* JSOESVertexArrayObject.h in Headers */,
 				FDF6BAF9134A4C9800822920 /* JSOfflineAudioCompletionEvent.h in Headers */,
 				2E24476913959173004B6C19 /* JSOperationNotAllowedException.h in Headers */,
-				A826E8AE0A1A8F2300CD1BB6 /* JSOptionConstructor.h in Headers */,
 				1A0D57410A5C7867007EDD4C /* JSOverflowEvent.h in Headers */,
 				E1284BB110449FFA00EAEB52 /* JSPageTransitionEvent.h in Headers */,
 				8A9A587511E84C81008ACFD1 /* JSPerformance.h in Headers */,
@@ -26428,7 +26421,6 @@
 				77A17AA612F28B2A004E02F6 /* JSOESVertexArrayObject.cpp in Sources */,
 				FDF6BAF8134A4C9800822920 /* JSOfflineAudioCompletionEvent.cpp in Sources */,
 				2E24476813959173004B6C19 /* JSOperationNotAllowedException.cpp in Sources */,
-				A826EC480A1B0CBE00CD1BB6 /* JSOptionConstructor.cpp in Sources */,
 				1A0D57400A5C7867007EDD4C /* JSOverflowEvent.cpp in Sources */,
 				E1284BB210449FFA00EAEB52 /* JSPageTransitionEvent.cpp in Sources */,
 				8A9A587411E84C81008ACFD1 /* JSPerformance.cpp in Sources */,

Modified: trunk/Source/WebCore/bindings/js/JSBindingsAllInOne.cpp (101723 => 101724)


--- trunk/Source/WebCore/bindings/js/JSBindingsAllInOne.cpp	2011-12-02 00:59:17 UTC (rev 101723)
+++ trunk/Source/WebCore/bindings/js/JSBindingsAllInOne.cpp	2011-12-02 01:03:37 UTC (rev 101724)
@@ -120,7 +120,6 @@
 #include "JSNodeFilterCustom.cpp"
 #include "JSNodeIteratorCustom.cpp"
 #include "JSNodeListCustom.cpp"
-#include "JSOptionConstructor.cpp"
 #include "JSPluginElementFunctions.cpp"
 #include "JSPopStateEventCustom.cpp"
 #include "JSProcessingInstructionCustom.cpp"

Modified: trunk/Source/WebCore/bindings/js/JSDOMWindowCustom.cpp (101723 => 101724)


--- trunk/Source/WebCore/bindings/js/JSDOMWindowCustom.cpp	2011-12-02 00:59:17 UTC (rev 101723)
+++ trunk/Source/WebCore/bindings/js/JSDOMWindowCustom.cpp	2011-12-02 01:03:37 UTC (rev 101724)
@@ -34,6 +34,7 @@
 #include "JSFloat64Array.h"
 #include "JSHTMLAudioElement.h"
 #include "JSHTMLCollection.h"
+#include "JSHTMLOptionElement.h"
 #include "JSHistory.h"
 #include "JSImageConstructor.h"
 #include "JSInt16Array.h"
@@ -42,7 +43,6 @@
 #include "JSLocation.h"
 #include "JSMessageChannel.h"
 #include "JSMessagePortCustom.h"
-#include "JSOptionConstructor.h"
 #include "JSUint16Array.h"
 #include "JSUint32Array.h"
 #include "JSUint8Array.h"
@@ -488,7 +488,7 @@
 
 JSValue JSDOMWindow::option(ExecState* exec) const
 {
-    return getDOMConstructor<JSOptionConstructor>(exec, this);
+    return getDOMConstructor<JSHTMLOptionElementNamedConstructor>(exec, this);
 }
 
 #if ENABLE(VIDEO)

Deleted: trunk/Source/WebCore/bindings/js/JSOptionConstructor.cpp (101723 => 101724)


--- trunk/Source/WebCore/bindings/js/JSOptionConstructor.cpp	2011-12-02 00:59:17 UTC (rev 101723)
+++ trunk/Source/WebCore/bindings/js/JSOptionConstructor.cpp	2011-12-02 01:03:37 UTC (rev 101724)
@@ -1,85 +0,0 @@
-/*
- * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include "config.h"
-#include "JSOptionConstructor.h"
-
-#include "HTMLNames.h"
-#include "HTMLOptionElement.h"
-#include "JSHTMLOptionElement.h"
-#include "ScriptExecutionContext.h"
-#include "Text.h"
-#include <runtime/Error.h>
-
-using namespace JSC;
-
-namespace WebCore {
-
-ASSERT_CLASS_FITS_IN_CELL(JSOptionConstructor);
-
-const ClassInfo JSOptionConstructor::s_info = { "OptionConstructor", &DOMConstructorWithDocument::s_info, 0, 0, CREATE_METHOD_TABLE(JSOptionConstructor) };
-
-JSOptionConstructor::JSOptionConstructor(Structure* structure, JSDOMGlobalObject* globalObject)
-    : DOMConstructorWithDocument(structure, globalObject)
-{
-}
-
-void JSOptionConstructor::finishCreation(ExecState* exec, JSDOMGlobalObject* globalObject)
-{
-    Base::finishCreation(globalObject);
-    ASSERT(inherits(&s_info));
-    putDirect(exec->globalData(), exec->propertyNames().prototype, JSHTMLOptionElementPrototype::self(exec, globalObject), None);
-    putDirect(exec->globalData(), exec->propertyNames().length, jsNumber(4), ReadOnly | DontDelete | DontEnum);
-}
-
-static EncodedJSValue JSC_HOST_CALL constructHTMLOptionElement(ExecState* exec)
-{
-    JSOptionConstructor* jsConstructor = static_cast<JSOptionConstructor*>(exec->callee());
-    Document* document = jsConstructor->document();
-    if (!document)
-        return throwVMError(exec, createReferenceError(exec, "Option constructor associated document is unavailable"));
-
-    String data;
-    if (exec->argumentCount() >= 1)
-        data = ""
-
-    String value;
-    if (exec->argumentCount() >= 2)
-        value = ustringToString(exec->argument(1).toString(exec));
-    bool defaultSelected = (exec->argumentCount() >= 3) && exec->argument(2).toBoolean(exec);
-    bool selected = (exec->argumentCount() >= 4) && exec->argument(3).toBoolean(exec);
-
-    ExceptionCode ec = 0;
-    RefPtr<HTMLOptionElement> element = HTMLOptionElement::createForJSConstructor(document, data, value, defaultSelected, selected, ec);
-    if (ec) {
-        setDOMException(exec, ec);
-        return JSValue::encode(JSValue());
-    }
-
-    return JSValue::encode(asObject(toJS(exec, jsConstructor->globalObject(), element.release())));
-}
-
-ConstructType JSOptionConstructor::getConstructData(JSCell*, ConstructData& constructData)
-{
-    constructData.native.function = constructHTMLOptionElement;
-    return ConstructTypeHost;
-}
-
-
-} // namespace WebCore

Deleted: trunk/Source/WebCore/bindings/js/JSOptionConstructor.h (101723 => 101724)


--- trunk/Source/WebCore/bindings/js/JSOptionConstructor.h	2011-12-02 00:59:17 UTC (rev 101723)
+++ trunk/Source/WebCore/bindings/js/JSOptionConstructor.h	2011-12-02 01:03:37 UTC (rev 101724)
@@ -1,55 +0,0 @@
-/*
- * Copyright (C) 2006, 2008 Apple Inc. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifndef JSOptionConstructor_h
-#define JSOptionConstructor_h
-
-#include "JSDOMBinding.h"
-#include "JSDocument.h"
-#include <wtf/RefPtr.h>
-
-namespace WebCore {
-
-    class JSOptionConstructor : public DOMConstructorWithDocument {
-    public:
-        typedef DOMConstructorWithDocument Base;
-
-        static JSOptionConstructor* create(JSC::ExecState* exec, JSC::Structure* structure, JSDOMGlobalObject* globalObject)
-        {
-            JSOptionConstructor* constructor = new (JSC::allocateCell<JSOptionConstructor>(*exec->heap())) JSOptionConstructor(structure, globalObject);
-            constructor->finishCreation(exec, globalObject);
-            return constructor;
-        }
-
-        static JSC::Structure* createStructure(JSC::JSGlobalData& globalData, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
-        {
-            return JSC::Structure::create(globalData, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), &s_info);
-        }
-
-        static const JSC::ClassInfo s_info;
-
-    private:
-        JSOptionConstructor(JSC::Structure*, JSDOMGlobalObject*);
-        void finishCreation(JSC::ExecState*, JSDOMGlobalObject*);
-        static JSC::ConstructType getConstructData(JSC::JSCell*, JSC::ConstructData&);
-    };
-
-} // namespace WebCore
-
-#endif // JSOptionConstructor_h

Modified: trunk/Source/WebCore/page/DOMWindow.idl (101723 => 101724)


--- trunk/Source/WebCore/page/DOMWindow.idl	2011-12-02 00:59:17 UTC (rev 101723)
+++ trunk/Source/WebCore/page/DOMWindow.idl	2011-12-02 01:03:37 UTC (rev 101724)
@@ -492,7 +492,7 @@
         attribute HTMLUnknownElementConstructor HTMLUnknownElement;
 
         attribute [JSCCustomGetter, CustomConstructor] HTMLImageElementConstructorConstructor Image; // Usable with new operator
-        attribute [JSCCustomGetter, JSCustomConstructor] HTMLOptionElementConstructorConstructor Option; // Usable with new operator
+        attribute [JSCCustomGetter] HTMLOptionElementConstructorConstructor Option; // Usable with new operator
 
         attribute CanvasPatternConstructor CanvasPattern;
         attribute CanvasGradientConstructor CanvasGradient;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to