Title: [112506] trunk
Revision
112506
Author
[email protected]
Date
2012-03-29 01:32:50 -0700 (Thu, 29 Mar 2012)

Log Message

Remove custom bindings form Internals.idl of attribute type Array.
https://bugs.webkit.org/show_bug.cgi?id=82319

Patch by Vineet Chaudhary <[email protected]> on 2012-03-29
Reviewed by Kentaro Hara.

Source/WebCore:

Remove custom bindings for Array type and replace Array type with sequence<String>.

No new tests. LayoutTests/fast/harness/user-preferred-language.html should pass
even after these changes.

* Target.pri: Remove JSInternalsCustom.cpp and V8InternalsCustom.cpp.
* UseJSC.cmake: Remove JSInternalsCustom.cpp.
* UseV8.cmake: Remove V8InternalsCustom.cpp.
* WebCore.gypi: Remove JSInternalsCustom.cpp and V8InternalsCustom.cpp.
* WebCore.vcproj/WebCoreTestSupport.vcproj: Remove JSInternalsCustom.cpp and V8InternalsCustom.cpp.
* WebCore.xcodeproj/project.pbxproj: Remove JSInternalsCustom.cpp and V8InternalsCustom.cpp.
* bindings/js/JSDOMBinding.h:
(WebCore):
(WebCore::jsArray): Added new specialize function template for Strings.
* bindings/scripts/CodeGeneratorJS.pm:
(JSValueToNative): Add jsArray<String>() to deduce return type.
(NativeToJSValue): Added check for type String.
* bindings/scripts/CodeGeneratorV8.pm:
(JSValueToNative): Add v8Array<String>() to deduce return type.
(NativeToJSValue): Added check for type String.
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::setJSTestObjSequenceAttr): Modified results from run-binding-tests.
* bindings/scripts/test/V8/V8TestObj.cpp: Modified results from run-binding-tests.
(WebCore::TestObjInternal::sequenceAttrAttrSetter):
* bindings/v8/V8Binding.h: Added new specialize function template for Strings.
(WebCore):
(WebCore::v8Array):
(WebCore::toNativeArray):
* testing/Internals.idl: Replace Array type with sequence<String>
* testing/js/JSInternalsCustom.cpp: Removed.
* testing/v8/V8InternalsCustom.cpp: Removed.

Tools:

Remove JSInternalsCustom.cpp and V8InternalsCustom.cpp as no longer required.

* GNUmakefile.am:

Modified Paths

Removed Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (112505 => 112506)


--- trunk/Source/WebCore/ChangeLog	2012-03-29 07:18:09 UTC (rev 112505)
+++ trunk/Source/WebCore/ChangeLog	2012-03-29 08:32:50 UTC (rev 112506)
@@ -1,3 +1,42 @@
+2012-03-29  Vineet Chaudhary  <[email protected]>
+
+        Remove custom bindings form Internals.idl of attribute type Array.
+        https://bugs.webkit.org/show_bug.cgi?id=82319
+
+        Reviewed by Kentaro Hara.
+
+        Remove custom bindings for Array type and replace Array type with sequence<String>.
+
+        No new tests. LayoutTests/fast/harness/user-preferred-language.html should pass
+        even after these changes.
+
+        * Target.pri: Remove JSInternalsCustom.cpp and V8InternalsCustom.cpp.
+        * UseJSC.cmake: Remove JSInternalsCustom.cpp.
+        * UseV8.cmake: Remove V8InternalsCustom.cpp.
+        * WebCore.gypi: Remove JSInternalsCustom.cpp and V8InternalsCustom.cpp.
+        * WebCore.vcproj/WebCoreTestSupport.vcproj: Remove JSInternalsCustom.cpp and V8InternalsCustom.cpp.
+        * WebCore.xcodeproj/project.pbxproj: Remove JSInternalsCustom.cpp and V8InternalsCustom.cpp.
+        * bindings/js/JSDOMBinding.h:
+        (WebCore):
+        (WebCore::jsArray): Added new specialize function template for Strings.
+        * bindings/scripts/CodeGeneratorJS.pm:
+        (JSValueToNative): Add jsArray<String>() to deduce return type.
+        (NativeToJSValue): Added check for type String.
+        * bindings/scripts/CodeGeneratorV8.pm:
+        (JSValueToNative): Add v8Array<String>() to deduce return type.
+        (NativeToJSValue): Added check for type String.
+        * bindings/scripts/test/JS/JSTestObj.cpp:
+        (WebCore::setJSTestObjSequenceAttr): Modified results from run-binding-tests.
+        * bindings/scripts/test/V8/V8TestObj.cpp: Modified results from run-binding-tests.
+        (WebCore::TestObjInternal::sequenceAttrAttrSetter):
+        * bindings/v8/V8Binding.h: Added new specialize function template for Strings.
+        (WebCore):
+        (WebCore::v8Array):
+        (WebCore::toNativeArray):
+        * testing/Internals.idl: Replace Array type with sequence<String>
+        * testing/js/JSInternalsCustom.cpp: Removed.
+        * testing/v8/V8InternalsCustom.cpp: Removed.
+
 2012-03-29  Sheriff Bot  <[email protected]>
 
         Unreviewed, rolling out r112500.

Modified: trunk/Source/WebCore/Target.pri (112505 => 112506)


--- trunk/Source/WebCore/Target.pri	2012-03-29 07:18:09 UTC (rev 112505)
+++ trunk/Source/WebCore/Target.pri	2012-03-29 08:32:50 UTC (rev 112506)
@@ -237,7 +237,6 @@
         bindings/v8/custom/V8ConsoleCustom.cpp \
         bindings/v8/custom/V8SQLTransactionSyncCustom.cpp \
         bindings/v8/V8WorkerContextErrorHandler.cpp \
-        testing/v8/V8InternalsCustom.cpp \
         testing/v8/WebCoreTestSupport.cpp
 } else {
     SOURCES += \
@@ -398,7 +397,6 @@
         bridge/runtime_method.cpp \
         bridge/runtime_object.cpp \
         bridge/runtime_root.cpp \
-        testing/js/JSInternalsCustom.cpp \
         testing/js/WebCoreTestSupport.cpp
 }
 

Modified: trunk/Source/WebCore/UseJSC.cmake (112505 => 112506)


--- trunk/Source/WebCore/UseJSC.cmake	2012-03-29 07:18:09 UTC (rev 112505)
+++ trunk/Source/WebCore/UseJSC.cmake	2012-03-29 08:32:50 UTC (rev 112506)
@@ -169,7 +169,6 @@
 )
 
 LIST(APPEND WebCoreTestSupport_SOURCES
-    testing/js/JSInternalsCustom.cpp
     testing/js/WebCoreTestSupport.cpp
 )
 

Modified: trunk/Source/WebCore/UseV8.cmake (112505 => 112506)


--- trunk/Source/WebCore/UseV8.cmake	2012-03-29 07:18:09 UTC (rev 112505)
+++ trunk/Source/WebCore/UseV8.cmake	2012-03-29 08:32:50 UTC (rev 112506)
@@ -164,7 +164,6 @@
 )
 
 LIST(APPEND WebCoreTestSupport_SOURCES
-    testing/v8/V8InternalsCustom.cpp
     testing/v8/WebCoreTestSupport.cpp
 )
 

Modified: trunk/Source/WebCore/WebCore.gypi (112505 => 112506)


--- trunk/Source/WebCore/WebCore.gypi	2012-03-29 07:18:09 UTC (rev 112505)
+++ trunk/Source/WebCore/WebCore.gypi	2012-03-29 08:32:50 UTC (rev 112506)
@@ -6148,10 +6148,8 @@
           'testing/InternalSettings.idl',
         ],
         'webcore_test_support_files': [
-            'testing/v8/V8InternalsCustom.cpp',
             'testing/v8/WebCoreTestSupport.cpp',
             'testing/v8/WebCoreTestSupport.h',
-            'testing/js/JSInternalsCustom.cpp',
             'testing/js/WebCoreTestSupport.cpp',
             'testing/js/WebCoreTestSupport.h',
             'testing/Internals.cpp',

Modified: trunk/Source/WebCore/WebCore.vcproj/WebCoreTestSupport.vcproj (112505 => 112506)


--- trunk/Source/WebCore/WebCore.vcproj/WebCoreTestSupport.vcproj	2012-03-29 07:18:09 UTC (rev 112505)
+++ trunk/Source/WebCore/WebCore.vcproj/WebCoreTestSupport.vcproj	2012-03-29 08:32:50 UTC (rev 112506)
@@ -691,74 +691,6 @@
 				RelativePath="..\testing\js\WebCoreTestSupport.h"
 				>
 			</File>
-			<File
-				RelativePath="..\testing\js\JSInternalsCustom.cpp"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						UsePrecompiledHeader="0"
-						DisableSpecificWarnings="4065;4273;4565;4701;4702"
-						ForcedIncludeFiles="$(NOINHERIT)"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						UsePrecompiledHeader="0"
-						DisableSpecificWarnings="4065;4273;4565;4701;4702"
-						ForcedIncludeFiles="$(NOINHERIT)"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug_Cairo_CFLite|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						UsePrecompiledHeader="0"
-						DisableSpecificWarnings="4065;4273;4565;4701;4702"
-						ForcedIncludeFiles="$(NOINHERIT)"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release_Cairo_CFLite|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						UsePrecompiledHeader="0"
-						DisableSpecificWarnings="4065;4273;4565;4701;4702"
-						ForcedIncludeFiles="$(NOINHERIT)"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug_All|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						UsePrecompiledHeader="0"
-						DisableSpecificWarnings="4065;4273;4565;4701;4702"
-						ForcedIncludeFiles="$(NOINHERIT)"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Production|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						UsePrecompiledHeader="0"
-						DisableSpecificWarnings="4065;4273;4565;4701;4702"
-						ForcedIncludeFiles="$(NOINHERIT)"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\testing\js\JSInternalsCustom.h"
-				>
-			</File>
 		</Filter>
 		<File
 			RelativePath="..\config.h"

Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (112505 => 112506)


--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2012-03-29 07:18:09 UTC (rev 112505)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2012-03-29 08:32:50 UTC (rev 112506)
@@ -109,7 +109,6 @@
 		0709FC4E1025DEE30059CDBA /* AccessibilitySlider.h in Headers */ = {isa = PBXBuildFile; fileRef = 0709FC4D1025DEE30059CDBA /* AccessibilitySlider.h */; };
 		0720B0A014D3323500642955 /* GenericEventQueue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0720B09E14D3323500642955 /* GenericEventQueue.cpp */; };
 		0720B0A114D3323500642955 /* GenericEventQueue.h in Headers */ = {isa = PBXBuildFile; fileRef = 0720B09F14D3323500642955 /* GenericEventQueue.h */; settings = {ATTRIBUTES = (Private, ); }; };
-		07230CBC14C10ED900F6B702 /* JSInternalsCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07230CBB14C10ED900F6B702 /* JSInternalsCustom.cpp */; };
 		072C8B11131C518600A4FCE9 /* MediaPlayerPrivateAVFoundation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 076F0D0912B8192700C26AA4 /* MediaPlayerPrivateAVFoundation.cpp */; };
 		0735EE6A0F40C5E4004A2604 /* MediaPlayerProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = 0735EE690F40C5E4004A2604 /* MediaPlayerProxy.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		0753860214489E9800B78452 /* CachedTextTrack.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0753860014489E9800B78452 /* CachedTextTrack.cpp */; };
@@ -6895,7 +6894,6 @@
 		070DD8F50F01868000727DEB /* mediaControls.css */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = mediaControls.css; sourceTree = "<group>"; };
 		0720B09E14D3323500642955 /* GenericEventQueue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GenericEventQueue.cpp; sourceTree = "<group>"; };
 		0720B09F14D3323500642955 /* GenericEventQueue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GenericEventQueue.h; sourceTree = "<group>"; };
-		07230CBB14C10ED900F6B702 /* JSInternalsCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSInternalsCustom.cpp; sourceTree = "<group>"; };
 		0735EE690F40C5E4004A2604 /* MediaPlayerProxy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaPlayerProxy.h; sourceTree = "<group>"; };
 		0753860014489E9800B78452 /* CachedTextTrack.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CachedTextTrack.cpp; sourceTree = "<group>"; };
 		0753860114489E9800B78452 /* CachedTextTrack.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CachedTextTrack.h; sourceTree = "<group>"; };
@@ -14537,7 +14535,6 @@
 		41815C1B138319630057AAA4 /* js */ = {
 			isa = PBXGroup;
 			children = (
-				07230CBB14C10ED900F6B702 /* JSInternalsCustom.cpp */,
 				41815C1C138319830057AAA4 /* WebCoreTestSupport.cpp */,
 				41815C1D138319830057AAA4 /* WebCoreTestSupport.h */,
 			);
@@ -24995,7 +24992,6 @@
 				417DA6D913734E6E007C57FB /* Internals.cpp in Sources */,
 				A7BF7EDF14C9175A0014489D /* InternalSettings.cpp in Sources */,
 				417DA71D13735DFA007C57FB /* JSInternals.cpp in Sources */,
-				07230CBC14C10ED900F6B702 /* JSInternalsCustom.cpp in Sources */,
 				A740B5A714C935AF00A77FA4 /* JSInternalSettings.cpp in Sources */,
 				41815C1E138319830057AAA4 /* WebCoreTestSupport.cpp in Sources */,
 			);

Modified: trunk/Source/WebCore/bindings/js/JSDOMBinding.h (112505 => 112506)


--- trunk/Source/WebCore/bindings/js/JSDOMBinding.h	2012-03-29 07:18:09 UTC (rev 112505)
+++ trunk/Source/WebCore/bindings/js/JSDOMBinding.h	2012-03-29 08:32:50 UTC (rev 112506)
@@ -279,18 +279,30 @@
         return toJS(exec, globalObject, ptr.get());
     }
 
-    template <typename Iterable>
-    JSC::JSValue jsArray(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, const Iterable& iterator)
+    template <typename T>
+    JSC::JSValue jsArray(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, const Vector<T>& iterator)
     {
         JSC::MarkedArgumentBuffer list;
-        typename Iterable::const_iterator end = iterator.end();
+        typename Vector<T>::const_iterator end = iterator.end();
 
-        for (typename Iterable::const_iterator iter = iterator.begin(); iter != end; ++iter)
+        for (typename Vector<T>::const_iterator iter = iterator.begin(); iter != end; ++iter)
             list.append(toJS(exec, globalObject, WTF::getPtr(*iter)));
 
         return JSC::constructArray(exec, globalObject, list);
     }
 
+    template<>
+    inline JSC::JSValue jsArray(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, const Vector<String>& iterator)
+    {
+        JSC::MarkedArgumentBuffer array;
+        Vector<String>::const_iterator end = iterator.end();
+
+        for (Vector<String>::const_iterator it = iterator.begin(); it != end; ++it)
+            array.append(jsString(exec, stringToUString(*it)));
+
+        return JSC::constructArray(exec, globalObject, array);
+    }
+
     template <class T>
     Vector<T> toNativeArray(JSC::ExecState* exec, JSC::JSValue value)
     {

Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (112505 => 112506)


--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm	2012-03-29 07:18:09 UTC (rev 112505)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm	2012-03-29 08:32:50 UTC (rev 112506)
@@ -2937,8 +2937,9 @@
     AddToImplIncludes("JSCustomVoidCallback.h", $conditional) if $type eq "VoidCallback";
     AddToImplIncludes("Event.h", $conditional) if $type eq "Event";
 
-    if ($codeGenerator->GetArrayType($type)) {
-        return "toNativeArray(exec, $value)";
+    my $arrayType = $codeGenerator->GetArrayType($type);
+    if ($arrayType) {
+        return "toNativeArray<$arrayType>(exec, $value)";
     }
 
     # Default, assume autogenerated type conversion routines
@@ -3002,9 +3003,11 @@
 
     my $arrayType = $codeGenerator->GetArrayType($type);
     if ($arrayType) {
+        if ($arrayType ne "String") {
+            AddToImplIncludes("JS$arrayType.h", $conditional);
+            AddToImplIncludes("$arrayType.h", $conditional);
+        }
         AddToImplIncludes("<runtime/JSArray.h>", $conditional);
-        AddToImplIncludes("JS$arrayType.h", $conditional);
-        AddToImplIncludes("$arrayType.h", $conditional);
         return "jsArray(exec, $thisValue->globalObject(), $value)";
     }
 

Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm (112505 => 112506)


--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm	2012-03-29 07:18:09 UTC (rev 112505)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm	2012-03-29 08:32:50 UTC (rev 112506)
@@ -3549,8 +3549,9 @@
         return "V8DOMWrapper::getXPathNSResolver($value)";
     }
 
-    if ($codeGenerator->GetArrayType($type)) {
-        return "toNativeArray($value)";
+    my $arrayType = $codeGenerator->GetArrayType($type);
+    if ($arrayType) {
+        return "toNativeArray<$arrayType>($value)";
     }
 
     AddIncludesForType($type);
@@ -3768,8 +3769,10 @@
 
     my $arrayType = $codeGenerator->GetArrayType($type);
     if ($arrayType) {
-        AddToImplIncludes("V8$arrayType.h");
-        AddToImplIncludes("$arrayType.h");
+        if ($arrayType ne "String") {
+            AddToImplIncludes("V8$arrayType.h");
+            AddToImplIncludes("$arrayType.h");
+        }
         return "v8Array($value)";
     }
 

Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp (112505 => 112506)


--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp	2012-03-29 07:18:09 UTC (rev 112505)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp	2012-03-29 08:32:50 UTC (rev 112506)
@@ -984,7 +984,7 @@
 {
     JSTestObj* castedThis = static_cast<JSTestObj*>(thisObject);
     TestObj* impl = static_cast<TestObj*>(castedThis->impl());
-    impl->setSequenceAttr(toNativeArray(exec, value));
+    impl->setSequenceAttr(toNativeArray<ScriptProfile>(exec, value));
 }
 
 

Modified: trunk/Source/WebCore/bindings/scripts/test/V8/V8TestObj.cpp (112505 => 112506)


--- trunk/Source/WebCore/bindings/scripts/test/V8/V8TestObj.cpp	2012-03-29 07:18:09 UTC (rev 112505)
+++ trunk/Source/WebCore/bindings/scripts/test/V8/V8TestObj.cpp	2012-03-29 08:32:50 UTC (rev 112506)
@@ -231,7 +231,7 @@
 {
     INC_STATS("DOM.TestObj.sequenceAttr._set");
     TestObj* imp = V8TestObj::toNative(info.Holder());
-    Vector<ScriptProfile> v = toNativeArray(value);
+    Vector<ScriptProfile> v = toNativeArray<ScriptProfile>(value);
     imp->setSequenceAttr(v);
     return;
 }

Modified: trunk/Source/WebCore/bindings/v8/V8Binding.h (112505 => 112506)


--- trunk/Source/WebCore/bindings/v8/V8Binding.h	2012-03-29 07:18:09 UTC (rev 112505)
+++ trunk/Source/WebCore/bindings/v8/V8Binding.h	2012-03-29 08:32:50 UTC (rev 112506)
@@ -286,17 +286,28 @@
         return v8ExternalString(string);
     }
 
-    template<typename Iterable>
-    v8::Handle<v8::Value> v8Array(const Iterable& iterator)
+    template<typename T>
+    v8::Handle<v8::Value> v8Array(const Vector<T>& iterator)
     {
         v8::Local<v8::Array> result = v8::Array::New(iterator.size());
         int index = 0;
-        typename Iterable::const_iterator end = iterator.end();
-        for (typename Iterable::const_iterator iter = iterator.begin(); iter != end; ++iter)
+        typename Vector<T>::const_iterator end = iterator.end();
+        for (typename Vector<T>::const_iterator iter = iterator.begin(); iter != end; ++iter)
             result->Set(v8::Integer::New(index++), toV8(WTF::getPtr(*iter)));
         return result;
     }
 
+    template<>
+    inline v8::Handle<v8::Value> v8Array(const Vector<String>& iterator)
+    {
+        v8::Local<v8::Array> array = v8::Array::New(iterator.size());
+        Vector<String>::const_iterator end = iterator.end();
+        int index = 0;
+        for (Vector<String>::const_iterator iter = iterator.begin(); iter != end; ++iter)
+            array->Set(v8::Integer::New(index++), v8String(*iter));
+        return array;
+    }
+
     template <class T>
     Vector<T> toNativeArray(v8::Handle<v8::Value> value)
     {
@@ -309,8 +320,7 @@
         size_t length = array->Length();
 
         for (size_t i = 0; i < length; ++i) {
-            String indexedValue = v8StringToWebCoreString(array->Get(i));
-            result.append(indexedValue);
+            result.append(v8ValueToWebCoreString(array->Get(i)));
         }
         return result;
     }

Modified: trunk/Source/WebCore/testing/Internals.idl (112505 => 112506)


--- trunk/Source/WebCore/testing/Internals.idl	2012-03-29 07:18:09 UTC (rev 112505)
+++ trunk/Source/WebCore/testing/Internals.idl	2012-03-29 08:32:50 UTC (rev 112506)
@@ -107,7 +107,7 @@
         boolean shouldDisplayTrackKind(in Document document, in DOMString trackKind) raises (DOMException);
 #endif
 
-        attribute [Custom] Array userPreferredLanguages;
+        attribute sequence<String> userPreferredLanguages;
 
         unsigned long wheelEventHandlerCount(in Document document) raises (DOMException);
         unsigned long touchEventHandlerCount(in Document document) raises (DOMException);

Deleted: trunk/Source/WebCore/testing/js/JSInternalsCustom.cpp (112505 => 112506)


--- trunk/Source/WebCore/testing/js/JSInternalsCustom.cpp	2012-03-29 07:18:09 UTC (rev 112505)
+++ trunk/Source/WebCore/testing/js/JSInternalsCustom.cpp	2012-03-29 08:32:50 UTC (rev 112506)
@@ -1,65 +0,0 @@
-/*
- * Copyright (C) 2012 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 COMPUTER, INC. ``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 COMPUTER, INC. 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 "JSInternals.h"
-
-#include <runtime/Error.h>
-
-using namespace JSC;
-
-namespace WebCore {
-
-JSValue JSInternals::userPreferredLanguages(ExecState* exec) const
-{
-    Internals* imp = static_cast<Internals*>(impl());
-    const Vector<String> languages = imp->userPreferredLanguages();
-    
-    MarkedArgumentBuffer array;
-    Vector<String>::const_iterator end = languages.end();
-    for (Vector<String>::const_iterator it = languages.begin(); it != end; ++it)
-        array.append(jsString(exec, stringToUString(*it)));
-    return constructArray(exec, globalObject(), array);
-}
-
-void JSInternals::setUserPreferredLanguages(ExecState* exec, JSValue value)
-{
-    if (!isJSArray(value)) {
-        throwError(exec, createSyntaxError(exec, "setUserPreferredLanguages: Expected Array"));
-        return;
-    }
-    
-    Vector<String> languages;
-    JSArray* array = asArray(value);
-    for (unsigned i = 0; i < array->length(); ++i) {
-        String language = ustringToString(array->getIndex(i).toString(exec)->value(exec));
-        languages.append(language);
-    }
-    
-    Internals* imp = static_cast<Internals*>(impl());
-    imp->setUserPreferredLanguages(languages);
-}
-    
-} // namespace WebCore

Deleted: trunk/Source/WebCore/testing/v8/V8InternalsCustom.cpp (112505 => 112506)


--- trunk/Source/WebCore/testing/v8/V8InternalsCustom.cpp	2012-03-29 07:18:09 UTC (rev 112505)
+++ trunk/Source/WebCore/testing/v8/V8InternalsCustom.cpp	2012-03-29 08:32:50 UTC (rev 112506)
@@ -1,64 +0,0 @@
-/*
- * Copyright (C) 2012 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 COMPUTER, INC. ``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 COMPUTER, INC. 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 "V8Internals.h"
-
-#include "V8Binding.h"
-#include "V8Proxy.h"
-
-namespace WebCore {
-
-v8::Handle<v8::Value> V8Internals::userPreferredLanguagesAccessorGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
-{
-    Internals* internals = V8Internals::toNative(info.Holder());
-    const Vector<String> languages = internals->userPreferredLanguages();
-
-    v8::Local<v8::Array> array = v8::Array::New(languages.size());
-    Vector<String>::const_iterator end = languages.end();
-    int index = 0;
-    for (Vector<String>::const_iterator iter = languages.begin(); iter != end; ++iter)
-        array->Set(v8::Integer::New(index++), v8String(*iter));
-    return array;
-}
-
-void V8Internals::userPreferredLanguagesAccessorSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
-{
-    if (!value->IsArray()) {
-        throwError("setUserPreferredLanguages: Expected Array");
-        return;
-    }
-    
-    Vector<String> languages;
-
-    v8::Local<v8::Array> array = v8::Local<v8::Array>::Cast(value);
-    for (size_t i = 0; i < array->Length(); ++i)
-        languages.append(toWebCoreString(array->Get(i)));
-    
-    Internals* internals = V8Internals::toNative(info.Holder());
-    internals->setUserPreferredLanguages(languages);
-}
-    
-} // namespace WebCore

Modified: trunk/Tools/ChangeLog (112505 => 112506)


--- trunk/Tools/ChangeLog	2012-03-29 07:18:09 UTC (rev 112505)
+++ trunk/Tools/ChangeLog	2012-03-29 08:32:50 UTC (rev 112506)
@@ -1,3 +1,14 @@
+2012-03-29  Vineet Chaudhary  <[email protected]>
+
+        Remove custom bindings form Internals.idl of attribute type Array.
+        https://bugs.webkit.org/show_bug.cgi?id=82319
+
+        Reviewed by Kentaro Hara.
+
+        Remove JSInternalsCustom.cpp and V8InternalsCustom.cpp as no longer required.
+
+        * GNUmakefile.am:
+
 2012-03-28  Mark Rowe  <[email protected]>
 
         Fix --no-saved-state.

Modified: trunk/Tools/GNUmakefile.am (112505 => 112506)


--- trunk/Tools/GNUmakefile.am	2012-03-29 07:18:09 UTC (rev 112505)
+++ trunk/Tools/GNUmakefile.am	2012-03-29 08:32:50 UTC (rev 112506)
@@ -45,7 +45,6 @@
 	Source/WebCore/testing/Internals.h \
 	Source/WebCore/testing/InternalSettings.cpp \
 	Source/WebCore/testing/InternalSettings.h \
-	Source/WebCore/testing/js/JSInternalsCustom.cpp \
 	Source/WebCore/testing/js/WebCoreTestSupport.cpp \
 	Source/WebCore/testing/js/WebCoreTestSupport.h
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to