[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

bulach at chromium.org bulach at chromium.org
Wed Dec 22 11:10:57 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit f190c7e669f49c1974bcc459f851d6669a1cdbcf
Author: bulach at chromium.org <bulach at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Jul 14 17:58:18 2010 +0000

    2010-07-14  Marcus Bulach  <bulach at chromium.org>
    
            Reviewed by Jeremy Orlow.
    
            Code generator: ensure generated constants match their corresponding enums.
            https://bugs.webkit.org/show_bug.cgi?id=42250
    
            Specific interfaces can use DontCheckEnums attribute to avoid generating the compile-time check.
    
            Tests: updated bindings tests. Generated code should compile.
    
            * bindings/scripts/CodeGenerator.pm:
            * bindings/scripts/CodeGeneratorJS.pm:
            * bindings/scripts/CodeGeneratorV8.pm:
            * bindings/scripts/test/CPP/WebDOMTestObj.h:
            (WebDOMTestObj::):
            * bindings/scripts/test/JS/JSTestObj.cpp:
            (WebCore::):
            (WebCore::JSTestObjPrototype::getOwnPropertySlot):
            (WebCore::JSTestObjPrototype::getOwnPropertyDescriptor):
            (WebCore::jsTestObjCONST_VALUE_0):
            (WebCore::jsTestObjCONST_VALUE_1):
            (WebCore::jsTestObjCONST_VALUE_2):
            (WebCore::jsTestObjCONST_VALUE_4):
            (WebCore::jsTestObjCONST_VALUE_8):
            * bindings/scripts/test/JS/JSTestObj.h:
            * bindings/scripts/test/ObjC/DOMTestObj.h:
            * bindings/scripts/test/TestObj.idl:
            * bindings/scripts/test/V8/V8TestObj.cpp:
            (WebCore::):
            (WebCore::ConfigureV8TestObjTemplate):
            * css/WebKitCSSTransformValue.idl:
            * dom/DOMCoreException.idl:
            * dom/EventException.idl:
            * dom/Node.idl:
            * dom/OverflowEvent.idl:
            * dom/RangeException.idl:
            * html/FileError.idl:
            * html/FileReader.idl:
            * html/canvas/Float32Array.idl:
            * html/canvas/Int16Array.idl:
            * html/canvas/Int32Array.idl:
            * html/canvas/Int8Array.idl:
            * html/canvas/Uint16Array.idl:
            * html/canvas/Uint32Array.idl:
            * html/canvas/Uint8Array.idl:
            * html/canvas/WebGLRenderingContext.idl:
            * inspector/JavaScriptCallFrame.idl:
            * loader/appcache/DOMApplicationCache.idl:
            * storage/SQLException.idl:
            * svg/SVGComponentTransferFunctionElement.idl:
            * svg/SVGException.idl:
            * svg/SVGFEBlendElement.idl:
            * svg/SVGFEColorMatrixElement.idl:
            * svg/SVGFECompositeElement.idl:
            * svg/SVGFEConvolveMatrixElement.idl:
            * svg/SVGFEDisplacementMapElement.idl:
            * svg/SVGFEMorphologyElement.idl:
            * svg/SVGFETurbulenceElement.idl:
            * svg/SVGGradientElement.idl:
            * xml/XMLHttpRequestException.idl:
            * xml/XPathException.idl:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@63331 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index fa59c01..77e1c56 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,66 @@
+2010-07-14  Marcus Bulach  <bulach at chromium.org>
+
+        Reviewed by Jeremy Orlow.
+
+        Code generator: ensure generated constants match their corresponding enums.
+        https://bugs.webkit.org/show_bug.cgi?id=42250
+
+        Specific interfaces can use DontCheckEnums attribute to avoid generating the compile-time check.
+
+        Tests: updated bindings tests. Generated code should compile.
+
+        * bindings/scripts/CodeGenerator.pm:
+        * bindings/scripts/CodeGeneratorJS.pm:
+        * bindings/scripts/CodeGeneratorV8.pm:
+        * bindings/scripts/test/CPP/WebDOMTestObj.h:
+        (WebDOMTestObj::):
+        * bindings/scripts/test/JS/JSTestObj.cpp:
+        (WebCore::):
+        (WebCore::JSTestObjPrototype::getOwnPropertySlot):
+        (WebCore::JSTestObjPrototype::getOwnPropertyDescriptor):
+        (WebCore::jsTestObjCONST_VALUE_0):
+        (WebCore::jsTestObjCONST_VALUE_1):
+        (WebCore::jsTestObjCONST_VALUE_2):
+        (WebCore::jsTestObjCONST_VALUE_4):
+        (WebCore::jsTestObjCONST_VALUE_8):
+        * bindings/scripts/test/JS/JSTestObj.h:
+        * bindings/scripts/test/ObjC/DOMTestObj.h:
+        * bindings/scripts/test/TestObj.idl:
+        * bindings/scripts/test/V8/V8TestObj.cpp:
+        (WebCore::):
+        (WebCore::ConfigureV8TestObjTemplate):
+        * css/WebKitCSSTransformValue.idl:
+        * dom/DOMCoreException.idl:
+        * dom/EventException.idl:
+        * dom/Node.idl:
+        * dom/OverflowEvent.idl:
+        * dom/RangeException.idl:
+        * html/FileError.idl:
+        * html/FileReader.idl:
+        * html/canvas/Float32Array.idl:
+        * html/canvas/Int16Array.idl:
+        * html/canvas/Int32Array.idl:
+        * html/canvas/Int8Array.idl:
+        * html/canvas/Uint16Array.idl:
+        * html/canvas/Uint32Array.idl:
+        * html/canvas/Uint8Array.idl:
+        * html/canvas/WebGLRenderingContext.idl:
+        * inspector/JavaScriptCallFrame.idl:
+        * loader/appcache/DOMApplicationCache.idl:
+        * storage/SQLException.idl:
+        * svg/SVGComponentTransferFunctionElement.idl:
+        * svg/SVGException.idl:
+        * svg/SVGFEBlendElement.idl:
+        * svg/SVGFEColorMatrixElement.idl:
+        * svg/SVGFECompositeElement.idl:
+        * svg/SVGFEConvolveMatrixElement.idl:
+        * svg/SVGFEDisplacementMapElement.idl:
+        * svg/SVGFEMorphologyElement.idl:
+        * svg/SVGFETurbulenceElement.idl:
+        * svg/SVGGradientElement.idl:
+        * xml/XMLHttpRequestException.idl:
+        * xml/XPathException.idl:
+
 2010-07-14  Andreas Kling  <andreas.kling at nokia.com>
 
         Reviewed by Ojan Vafai.
diff --git a/WebCore/bindings/scripts/CodeGenerator.pm b/WebCore/bindings/scripts/CodeGenerator.pm
index d106920..d1711dc 100644
--- a/WebCore/bindings/scripts/CodeGenerator.pm
+++ b/WebCore/bindings/scripts/CodeGenerator.pm
@@ -467,4 +467,28 @@ sub SetterExpressionPrefix
     return "$functionName($contentAttributeName, "
 }
 
+sub ShouldCheckEnums
+{
+    my $dataNode = shift;
+    return not $dataNode->extendedAttributes->{"DontCheckEnums"};
+}
+
+sub GenerateCompileTimeCheckForEnumsIfNeeded
+{
+    my ($object, $dataNode) = @_;
+    my $interfaceName = $dataNode->name;
+    my @checks = ();
+    # If necessary, check that all constants are available as enums with the same value.
+    if (ShouldCheckEnums($dataNode) && @{$dataNode->constants}) {
+        push(@checks, "\n");
+        foreach my $constant (@{$dataNode->constants}) {
+            my $name = $constant->name;
+            my $value = $constant->value;
+            push(@checks, "COMPILE_ASSERT($value == ${interfaceName}::$name, ${interfaceName}Enum${name}IsWrongUseDontCheckEnums);\n");
+        }
+        push(@checks, "\n");
+    }
+    return @checks;
+}
+
 1;
diff --git a/WebCore/bindings/scripts/CodeGeneratorJS.pm b/WebCore/bindings/scripts/CodeGeneratorJS.pm
index a0a2098..acad90b 100644
--- a/WebCore/bindings/scripts/CodeGeneratorJS.pm
+++ b/WebCore/bindings/scripts/CodeGeneratorJS.pm
@@ -1242,6 +1242,8 @@ sub GenerateImplementation
                                    \@hashKeys, \@hashSpecials,
                                    \@hashValue1, \@hashValue2);
 
+        push(@implContent, $codeGenerator->GenerateCompileTimeCheckForEnumsIfNeeded($dataNode));
+
         my $protoClassName = "${className}Prototype";
 
         GenerateConstructorDeclaration(\@implContent, $className, $dataNode) unless $dataNode->extendedAttributes->{"CustomConstructFunction"};
diff --git a/WebCore/bindings/scripts/CodeGeneratorV8.pm b/WebCore/bindings/scripts/CodeGeneratorV8.pm
index 383bb74..5eb6d3d 100644
--- a/WebCore/bindings/scripts/CodeGeneratorV8.pm
+++ b/WebCore/bindings/scripts/CodeGeneratorV8.pm
@@ -1753,6 +1753,7 @@ END
     }
     if ($has_constants) {
         push(@implContent, "};\n");
+        push(@implContent, $codeGenerator->GenerateCompileTimeCheckForEnumsIfNeeded($dataNode));
     }
 
     push(@implContentDecls, "} // namespace ${interfaceName}Internal\n\n");
diff --git a/WebCore/bindings/scripts/test/CPP/WebDOMTestObj.h b/WebCore/bindings/scripts/test/CPP/WebDOMTestObj.h
index 1eb5ed3..86c7169 100644
--- a/WebCore/bindings/scripts/test/CPP/WebDOMTestObj.h
+++ b/WebCore/bindings/scripts/test/CPP/WebDOMTestObj.h
@@ -42,6 +42,14 @@ public:
     WebDOMTestObj(const WebDOMTestObj&);
     ~WebDOMTestObj();
 
+    enum {
+        WEBDOM_CONST_VALUE_0 = 0,
+        WEBDOM_CONST_VALUE_1 = 1,
+        WEBDOM_CONST_VALUE_2 = 2,
+        WEBDOM_CONST_VALUE_4 = 4,
+        WEBDOM_CONST_VALUE_8 = 8
+    };
+
     int readOnlyIntAttr() const;
     WebDOMString readOnlyStringAttr() const;
     WebDOMTestObj readOnlyTestObjAttr() const;
diff --git a/WebCore/bindings/scripts/test/JS/JSTestObj.cpp b/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
index 2f561f9..6e667f7 100644
--- a/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
+++ b/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
@@ -100,13 +100,25 @@ static JSC_CONST_HASHTABLE HashTable JSTestObjTable = { 68, 63, JSTestObjTableVa
 #define THUNK_GENERATOR(generator)
 #endif
 
-static const HashTableValue JSTestObjConstructorTableValues[1] =
+static const HashTableValue JSTestObjConstructorTableValues[6] =
 {
+    { "CONST_VALUE_0", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_0), (intptr_t)0 THUNK_GENERATOR(0) },
+    { "CONST_VALUE_1", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_1), (intptr_t)0 THUNK_GENERATOR(0) },
+    { "CONST_VALUE_2", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_2), (intptr_t)0 THUNK_GENERATOR(0) },
+    { "CONST_VALUE_4", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_4), (intptr_t)0 THUNK_GENERATOR(0) },
+    { "CONST_VALUE_8", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_8), (intptr_t)0 THUNK_GENERATOR(0) },
     { 0, 0, 0, 0 THUNK_GENERATOR(0) }
 };
 
 #undef THUNK_GENERATOR
-static JSC_CONST_HASHTABLE HashTable JSTestObjConstructorTable = { 1, 0, JSTestObjConstructorTableValues, 0 };
+static JSC_CONST_HASHTABLE HashTable JSTestObjConstructorTable = { 16, 15, JSTestObjConstructorTableValues, 0 };
+
+COMPILE_ASSERT(0 == TestObj::CONST_VALUE_0, TestObjEnumCONST_VALUE_0IsWrongUseDontCheckEnums);
+COMPILE_ASSERT(1 == TestObj::CONST_VALUE_1, TestObjEnumCONST_VALUE_1IsWrongUseDontCheckEnums);
+COMPILE_ASSERT(2 == TestObj::CONST_VALUE_2, TestObjEnumCONST_VALUE_2IsWrongUseDontCheckEnums);
+COMPILE_ASSERT(4 == TestObj::CONST_VALUE_4, TestObjEnumCONST_VALUE_4IsWrongUseDontCheckEnums);
+COMPILE_ASSERT(8 == TestObj::CONST_VALUE_8, TestObjEnumCONST_VALUE_8IsWrongUseDontCheckEnums);
+
 class JSTestObjConstructor : public DOMConstructorObject {
 public:
     JSTestObjConstructor(JSC::ExecState*, JSDOMGlobalObject*);
@@ -148,8 +160,13 @@ bool JSTestObjConstructor::getOwnPropertyDescriptor(ExecState* exec, const Ident
 #define THUNK_GENERATOR(generator)
 #endif
 
-static const HashTableValue JSTestObjPrototypeTableValues[31] =
+static const HashTableValue JSTestObjPrototypeTableValues[36] =
 {
+    { "CONST_VALUE_0", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_0), (intptr_t)0 THUNK_GENERATOR(0) },
+    { "CONST_VALUE_1", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_1), (intptr_t)0 THUNK_GENERATOR(0) },
+    { "CONST_VALUE_2", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_2), (intptr_t)0 THUNK_GENERATOR(0) },
+    { "CONST_VALUE_4", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_4), (intptr_t)0 THUNK_GENERATOR(0) },
+    { "CONST_VALUE_8", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_8), (intptr_t)0 THUNK_GENERATOR(0) },
     { "voidMethod", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionVoidMethod), (intptr_t)0 THUNK_GENERATOR(0) },
     { "voidMethodWithArgs", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionVoidMethodWithArgs), (intptr_t)3 THUNK_GENERATOR(0) },
     { "intMethod", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionIntMethod), (intptr_t)0 THUNK_GENERATOR(0) },
@@ -184,7 +201,7 @@ static const HashTableValue JSTestObjPrototypeTableValues[31] =
 };
 
 #undef THUNK_GENERATOR
-static JSC_CONST_HASHTABLE HashTable JSTestObjPrototypeTable = { 130, 127, JSTestObjPrototypeTableValues, 0 };
+static JSC_CONST_HASHTABLE HashTable JSTestObjPrototypeTable = { 132, 127, JSTestObjPrototypeTableValues, 0 };
 const ClassInfo JSTestObjPrototype::s_info = { "TestObjPrototype", 0, &JSTestObjPrototypeTable, 0 };
 
 JSObject* JSTestObjPrototype::self(ExecState* exec, JSGlobalObject* globalObject)
@@ -194,12 +211,12 @@ JSObject* JSTestObjPrototype::self(ExecState* exec, JSGlobalObject* globalObject
 
 bool JSTestObjPrototype::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
 {
-    return getStaticFunctionSlot<JSObject>(exec, &JSTestObjPrototypeTable, this, propertyName, slot);
+    return getStaticPropertySlot<JSTestObjPrototype, JSObject>(exec, &JSTestObjPrototypeTable, this, propertyName, slot);
 }
 
 bool JSTestObjPrototype::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
 {
-    return getStaticFunctionDescriptor<JSObject>(exec, &JSTestObjPrototypeTable, this, propertyName, descriptor);
+    return getStaticPropertyDescriptor<JSTestObjPrototype, JSObject>(exec, &JSTestObjPrototypeTable, this, propertyName, descriptor);
 }
 
 const ClassInfo JSTestObj::s_info = { "TestObj", 0, &JSTestObjTable, 0 };
@@ -1228,6 +1245,33 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod(ExecStat
     return throwVMTypeError(exec);
 }
 
+// Constant getters
+
+JSValue jsTestObjCONST_VALUE_0(ExecState* exec, JSValue, const Identifier&)
+{
+    return jsNumber(exec, static_cast<int>(0));
+}
+
+JSValue jsTestObjCONST_VALUE_1(ExecState* exec, JSValue, const Identifier&)
+{
+    return jsNumber(exec, static_cast<int>(1));
+}
+
+JSValue jsTestObjCONST_VALUE_2(ExecState* exec, JSValue, const Identifier&)
+{
+    return jsNumber(exec, static_cast<int>(2));
+}
+
+JSValue jsTestObjCONST_VALUE_4(ExecState* exec, JSValue, const Identifier&)
+{
+    return jsNumber(exec, static_cast<int>(4));
+}
+
+JSValue jsTestObjCONST_VALUE_8(ExecState* exec, JSValue, const Identifier&)
+{
+    return jsNumber(exec, static_cast<int>(8));
+}
+
 JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, TestObj* object)
 {
     return getDOMObjectWrapper<JSTestObj>(exec, globalObject, object);
diff --git a/WebCore/bindings/scripts/test/JS/JSTestObj.h b/WebCore/bindings/scripts/test/JS/JSTestObj.h
index c83e568..84122b7 100644
--- a/WebCore/bindings/scripts/test/JS/JSTestObj.h
+++ b/WebCore/bindings/scripts/test/JS/JSTestObj.h
@@ -173,6 +173,13 @@ JSC::JSValue jsTestObjId(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
 void setJSTestObjId(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
 JSC::JSValue jsTestObjHash(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
 JSC::JSValue jsTestObjConstructor(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
+// Constants
+
+JSC::JSValue jsTestObjCONST_VALUE_0(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
+JSC::JSValue jsTestObjCONST_VALUE_1(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
+JSC::JSValue jsTestObjCONST_VALUE_2(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
+JSC::JSValue jsTestObjCONST_VALUE_4(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
+JSC::JSValue jsTestObjCONST_VALUE_8(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
 
 } // namespace WebCore
 
diff --git a/WebCore/bindings/scripts/test/ObjC/DOMTestObj.h b/WebCore/bindings/scripts/test/ObjC/DOMTestObj.h
index 1eac990..33c3a2d 100644
--- a/WebCore/bindings/scripts/test/ObjC/DOMTestObj.h
+++ b/WebCore/bindings/scripts/test/ObjC/DOMTestObj.h
@@ -34,6 +34,14 @@
 @class NSString;
 @protocol DOMEventListener;
 
+enum {
+    DOM_CONST_VALUE_0 = 0,
+    DOM_CONST_VALUE_1 = 1,
+    DOM_CONST_VALUE_2 = 2,
+    DOM_CONST_VALUE_4 = 4,
+    DOM_CONST_VALUE_8 = 8
+};
+
 @interface DOMTestObj : DOMObject
 - (int)readOnlyIntAttr;
 - (NSString *)readOnlyStringAttr;
diff --git a/WebCore/bindings/scripts/test/TestObj.idl b/WebCore/bindings/scripts/test/TestObj.idl
index 43fc211..f9d41d7 100644
--- a/WebCore/bindings/scripts/test/TestObj.idl
+++ b/WebCore/bindings/scripts/test/TestObj.idl
@@ -129,5 +129,12 @@ module test {
         readonly attribute long      description;
         attribute long               id;
         readonly attribute DOMString hash;
+
+        // Check constants and enums.
+        const unsigned short CONST_VALUE_0 = 0;
+        const unsigned short CONST_VALUE_1 = 1;
+        const unsigned short CONST_VALUE_2 = 2;
+        const unsigned short CONST_VALUE_4 = 4;
+        const unsigned short CONST_VALUE_8 = 8;
     };
 }
diff --git a/WebCore/bindings/scripts/test/V8/V8TestObj.cpp b/WebCore/bindings/scripts/test/V8/V8TestObj.cpp
index 0b9d034..c348726 100644
--- a/WebCore/bindings/scripts/test/V8/V8TestObj.cpp
+++ b/WebCore/bindings/scripts/test/V8/V8TestObj.cpp
@@ -1015,6 +1015,20 @@ static const BatchedCallback TestObjCallbacks[] = {
     {"methodWithNonOptionalArgAndTwoOptionalArgs", TestObjInternal::methodWithNonOptionalArgAndTwoOptionalArgsCallback},
     {"overloadedMethod", TestObjInternal::overloadedMethodCallback},
 };
+static const BatchedConstant TestObjConsts[] = {
+    {"CONST_VALUE_0", static_cast<signed int>(0)},
+    {"CONST_VALUE_1", static_cast<signed int>(1)},
+    {"CONST_VALUE_2", static_cast<signed int>(2)},
+    {"CONST_VALUE_4", static_cast<signed int>(4)},
+    {"CONST_VALUE_8", static_cast<signed int>(8)},
+};
+
+COMPILE_ASSERT(0 == TestObj::CONST_VALUE_0, TestObjEnumCONST_VALUE_0IsWrongUseDontCheckEnums);
+COMPILE_ASSERT(1 == TestObj::CONST_VALUE_1, TestObjEnumCONST_VALUE_1IsWrongUseDontCheckEnums);
+COMPILE_ASSERT(2 == TestObj::CONST_VALUE_2, TestObjEnumCONST_VALUE_2IsWrongUseDontCheckEnums);
+COMPILE_ASSERT(4 == TestObj::CONST_VALUE_4, TestObjEnumCONST_VALUE_4IsWrongUseDontCheckEnums);
+COMPILE_ASSERT(8 == TestObj::CONST_VALUE_8, TestObjEnumCONST_VALUE_8IsWrongUseDontCheckEnums);
+
 static v8::Persistent<v8::FunctionTemplate> ConfigureV8TestObjTemplate(v8::Persistent<v8::FunctionTemplate> desc)
 {
     v8::Local<v8::Signature> defaultSignature = configureTemplate(desc, "TestObj", v8::Persistent<v8::FunctionTemplate>(), V8TestObj::internalFieldCount,
@@ -1059,6 +1073,7 @@ static v8::Persistent<v8::FunctionTemplate> ConfigureV8TestObjTemplate(v8::Persi
     v8::Handle<v8::FunctionTemplate> customArgsAndExceptionArgv[customArgsAndExceptionArgc] = { V8log::GetRawTemplate() };
     v8::Handle<v8::Signature> customArgsAndExceptionSignature = v8::Signature::New(desc, customArgsAndExceptionArgc, customArgsAndExceptionArgv);
     proto->Set(v8::String::New("customArgsAndException"), v8::FunctionTemplate::New(TestObjInternal::customArgsAndExceptionCallback, v8::Handle<v8::Value>(), customArgsAndExceptionSignature));
+    batchConfigureConstants(desc, proto, TestObjConsts, sizeof(TestObjConsts) / sizeof(*TestObjConsts));
 
     // Custom toString template
     desc->Set(getToStringName(), getToStringTemplate());
diff --git a/WebCore/css/WebKitCSSTransformValue.idl b/WebCore/css/WebKitCSSTransformValue.idl
index 087aa82..007097e 100644
--- a/WebCore/css/WebKitCSSTransformValue.idl
+++ b/WebCore/css/WebKitCSSTransformValue.idl
@@ -29,7 +29,8 @@
 module css {
 
     interface [
-            HasIndexGetter
+            HasIndexGetter,
+            DontCheckEnums
     ] WebKitCSSTransformValue : CSSValueList {
 
         // OperationTypes
diff --git a/WebCore/dom/DOMCoreException.idl b/WebCore/dom/DOMCoreException.idl
index 2cbc589..945712d 100644
--- a/WebCore/dom/DOMCoreException.idl
+++ b/WebCore/dom/DOMCoreException.idl
@@ -29,7 +29,8 @@
 module core {
 
     interface [
-        NoStaticTables
+        NoStaticTables,
+        DontCheckEnums
     ] DOMCoreException {
 
         readonly attribute unsigned short   code;
diff --git a/WebCore/dom/EventException.idl b/WebCore/dom/EventException.idl
index 1c8fac6..c8f2bde 100644
--- a/WebCore/dom/EventException.idl
+++ b/WebCore/dom/EventException.idl
@@ -30,7 +30,8 @@ module events {
 
     // Introduced in DOM Level 2:
     interface [
-        NoStaticTables
+        NoStaticTables,
+        DontCheckEnums
     ] EventException {
 
         readonly attribute unsigned short   code;
diff --git a/WebCore/dom/Node.idl b/WebCore/dom/Node.idl
index 07046d1..e15b210 100644
--- a/WebCore/dom/Node.idl
+++ b/WebCore/dom/Node.idl
@@ -28,7 +28,8 @@ module core {
         EventTarget,
         GenerateNativeConverter,
         InlineGetOwnPropertySlot,
-        Polymorphic
+        Polymorphic,
+        DontCheckEnums
     ] Node
 #if defined(LANGUAGE_OBJECTIVE_C) && LANGUAGE_OBJECTIVE_C
         : Object, EventTarget
diff --git a/WebCore/dom/OverflowEvent.idl b/WebCore/dom/OverflowEvent.idl
index 0b4f5c6..483d2b0 100644
--- a/WebCore/dom/OverflowEvent.idl
+++ b/WebCore/dom/OverflowEvent.idl
@@ -23,8 +23,8 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 module events {
-
-    interface OverflowEvent : Event {
+    # FIXME: Converge these consts and OverflowEvent::orientType values and remove DontCheckEnums attribute.
+    interface [DontCheckEnums] OverflowEvent : Event {
         const unsigned short HORIZONTAL = 0;
         const unsigned short VERTICAL   = 1;
         const unsigned short BOTH       = 2;
diff --git a/WebCore/dom/RangeException.idl b/WebCore/dom/RangeException.idl
index 100912d..c7c8558 100644
--- a/WebCore/dom/RangeException.idl
+++ b/WebCore/dom/RangeException.idl
@@ -19,7 +19,7 @@
 
 module ranges {
 
-    interface RangeException {
+    interface [DontCheckEnums] RangeException {
 
         readonly attribute unsigned short   code;
         readonly attribute DOMString        name;
diff --git a/WebCore/html/FileError.idl b/WebCore/html/FileError.idl
index adc25e8..555d103 100644
--- a/WebCore/html/FileError.idl
+++ b/WebCore/html/FileError.idl
@@ -30,7 +30,8 @@
 
 module html {
     interface [
-        Conditional=FILE_READER|FILE_WRITER
+        Conditional=FILE_READER|FILE_WRITER,
+        DontCheckEnums
     ] FileError {
 #if !defined(LANGUAGE_OBJECTIVE_C)
         const unsigned short NO_MODIFICATION_ALLOWED_ERR = 7;
diff --git a/WebCore/html/FileReader.idl b/WebCore/html/FileReader.idl
index b933f51..ad0e187 100644
--- a/WebCore/html/FileReader.idl
+++ b/WebCore/html/FileReader.idl
@@ -34,7 +34,8 @@ module html {
         CanBeConstructed,
         CallWith=ScriptExecutionContext,
         EventTarget,
-        NoStaticTables
+        NoStaticTables,
+        DontCheckEnums
     ] FileReader {
         // ready states
         const unsigned short EMPTY = 0;
diff --git a/WebCore/html/canvas/Float32Array.idl b/WebCore/html/canvas/Float32Array.idl
index 651e74f..5a939ca 100644
--- a/WebCore/html/canvas/Float32Array.idl
+++ b/WebCore/html/canvas/Float32Array.idl
@@ -33,7 +33,8 @@ module html {
         HasNumericIndexGetter,
         HasCustomIndexSetter,
         GenerateNativeConverter,
-        CustomToJS
+        CustomToJS,
+        DontCheckEnums
     ] Float32Array : ArrayBufferView {
         const unsigned int BYTES_PER_ELEMENT = 4;
 
diff --git a/WebCore/html/canvas/Int16Array.idl b/WebCore/html/canvas/Int16Array.idl
index 095611b..02417f8 100644
--- a/WebCore/html/canvas/Int16Array.idl
+++ b/WebCore/html/canvas/Int16Array.idl
@@ -32,7 +32,8 @@ module html {
         HasNumericIndexGetter,
         HasCustomIndexSetter,
         GenerateNativeConverter,
-        CustomToJS
+        CustomToJS,
+        DontCheckEnums
     ] Int16Array : ArrayBufferView {
         const unsigned int BYTES_PER_ELEMENT = 2;
 
diff --git a/WebCore/html/canvas/Int32Array.idl b/WebCore/html/canvas/Int32Array.idl
index 9d1e8ee..6977d00 100644
--- a/WebCore/html/canvas/Int32Array.idl
+++ b/WebCore/html/canvas/Int32Array.idl
@@ -33,7 +33,8 @@ module html {
         HasNumericIndexGetter,
         HasCustomIndexSetter,
         GenerateNativeConverter,
-        CustomToJS
+        CustomToJS,
+        DontCheckEnums
     ] Int32Array : ArrayBufferView {
         const unsigned int BYTES_PER_ELEMENT = 4;
 
diff --git a/WebCore/html/canvas/Int8Array.idl b/WebCore/html/canvas/Int8Array.idl
index 43c83f5..4dba9e4 100644
--- a/WebCore/html/canvas/Int8Array.idl
+++ b/WebCore/html/canvas/Int8Array.idl
@@ -33,7 +33,8 @@ module html {
         HasNumericIndexGetter,
         HasCustomIndexSetter,
         GenerateNativeConverter,
-        CustomToJS
+        CustomToJS,
+        DontCheckEnums
     ] Int8Array : ArrayBufferView {
         const unsigned int BYTES_PER_ELEMENT = 1;
 
diff --git a/WebCore/html/canvas/Uint16Array.idl b/WebCore/html/canvas/Uint16Array.idl
index 4c369a0..de1e5e0 100644
--- a/WebCore/html/canvas/Uint16Array.idl
+++ b/WebCore/html/canvas/Uint16Array.idl
@@ -33,7 +33,8 @@ module html {
         HasNumericIndexGetter,
         HasCustomIndexSetter,
         GenerateNativeConverter,
-        CustomToJS
+        CustomToJS,
+        DontCheckEnums
     ] Uint16Array : ArrayBufferView {
         const unsigned int BYTES_PER_ELEMENT = 2;
 
diff --git a/WebCore/html/canvas/Uint32Array.idl b/WebCore/html/canvas/Uint32Array.idl
index 25f5b71..ce632dd 100644
--- a/WebCore/html/canvas/Uint32Array.idl
+++ b/WebCore/html/canvas/Uint32Array.idl
@@ -33,7 +33,8 @@ module html {
         HasNumericIndexGetter,
         HasCustomIndexSetter,
         GenerateNativeConverter,
-        CustomToJS
+        CustomToJS,
+        DontCheckEnums
     ] Uint32Array : ArrayBufferView {
         const unsigned int BYTES_PER_ELEMENT = 4;
 
diff --git a/WebCore/html/canvas/Uint8Array.idl b/WebCore/html/canvas/Uint8Array.idl
index 76b8cdd..c520844 100644
--- a/WebCore/html/canvas/Uint8Array.idl
+++ b/WebCore/html/canvas/Uint8Array.idl
@@ -33,7 +33,8 @@ module html {
         HasNumericIndexGetter,
         HasCustomIndexSetter,
         GenerateNativeConverter,
-        CustomToJS
+        CustomToJS,
+        DontCheckEnums
     ] Uint8Array : ArrayBufferView {
         const unsigned int BYTES_PER_ELEMENT = 1;
 
diff --git a/WebCore/html/canvas/WebGLRenderingContext.idl b/WebCore/html/canvas/WebGLRenderingContext.idl
index 4197da9..654c7aa 100644
--- a/WebCore/html/canvas/WebGLRenderingContext.idl
+++ b/WebCore/html/canvas/WebGLRenderingContext.idl
@@ -28,7 +28,8 @@ module html {
     interface [
         Conditional=3D_CANVAS,
         InterfaceUUID=98fb48ae-7216-489c-862b-8e1217fc4443,
-        ImplementationUUID=ab4f0781-152f-450e-9546-5b3987491a54
+        ImplementationUUID=ab4f0781-152f-450e-9546-5b3987491a54,
+        DontCheckEnums
     ] WebGLRenderingContext : CanvasRenderingContext {
 
         /* ClearBufferMask */
diff --git a/WebCore/inspector/JavaScriptCallFrame.idl b/WebCore/inspector/JavaScriptCallFrame.idl
index 28f4f34..225059d 100644
--- a/WebCore/inspector/JavaScriptCallFrame.idl
+++ b/WebCore/inspector/JavaScriptCallFrame.idl
@@ -25,7 +25,11 @@
 
 module inspector {
 
-    interface [Conditional=JAVASCRIPT_DEBUGGER, OmitConstructor] JavaScriptCallFrame {
+    interface [
+        Conditional=JAVASCRIPT_DEBUGGER,
+        OmitConstructor,
+        DontCheckEnums
+    ] JavaScriptCallFrame {
 
         // Scope type
         const unsigned short GLOBAL_SCOPE = 0;
diff --git a/WebCore/loader/appcache/DOMApplicationCache.idl b/WebCore/loader/appcache/DOMApplicationCache.idl
index 8525fe6..9113ffa 100644
--- a/WebCore/loader/appcache/DOMApplicationCache.idl
+++ b/WebCore/loader/appcache/DOMApplicationCache.idl
@@ -28,7 +28,8 @@ module offline {
     interface [
         Conditional=OFFLINE_WEB_APPLICATIONS,
         EventTarget,
-        OmitConstructor
+        OmitConstructor,
+        DontCheckEnums
     ] DOMApplicationCache {
         // update status
         const unsigned short UNCACHED = 0;
diff --git a/WebCore/storage/SQLException.idl b/WebCore/storage/SQLException.idl
index 9830142..cbbc311 100644
--- a/WebCore/storage/SQLException.idl
+++ b/WebCore/storage/SQLException.idl
@@ -32,7 +32,8 @@ module storage {
 
     interface [
         Conditional=DATABASE,
-        NoStaticTables
+        NoStaticTables,
+        DontCheckEnums
     ] SQLException {
         readonly attribute unsigned long code;
         readonly attribute DOMString message;
diff --git a/WebCore/svg/SVGComponentTransferFunctionElement.idl b/WebCore/svg/SVGComponentTransferFunctionElement.idl
index 950f77d..0a9e05d 100644
--- a/WebCore/svg/SVGComponentTransferFunctionElement.idl
+++ b/WebCore/svg/SVGComponentTransferFunctionElement.idl
@@ -25,7 +25,10 @@
 
 module svg {
 
-    interface [Conditional=SVG&FILTERS] SVGComponentTransferFunctionElement : SVGElement {
+    interface [
+        Conditional=SVG&FILTERS,
+        DontCheckEnums
+    ] SVGComponentTransferFunctionElement : SVGElement {
         // Component Transfer Types
         const unsigned short SVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN  = 0;
         const unsigned short SVG_FECOMPONENTTRANSFER_TYPE_IDENTITY = 1;
diff --git a/WebCore/svg/SVGException.idl b/WebCore/svg/SVGException.idl
index db565ff..3f1f8ec 100644
--- a/WebCore/svg/SVGException.idl
+++ b/WebCore/svg/SVGException.idl
@@ -21,7 +21,8 @@
 module svg {
 
     interface [
-        Conditional=SVG
+        Conditional=SVG,
+        DontCheckEnums
     ] SVGException {
 
         readonly attribute unsigned short   code;
diff --git a/WebCore/svg/SVGFEBlendElement.idl b/WebCore/svg/SVGFEBlendElement.idl
index bb6d86d..0c08603 100644
--- a/WebCore/svg/SVGFEBlendElement.idl
+++ b/WebCore/svg/SVGFEBlendElement.idl
@@ -25,8 +25,11 @@
 
 module svg {
 
-    interface [Conditional=SVG&FILTERS] SVGFEBlendElement : SVGElement,
-                                                    SVGFilterPrimitiveStandardAttributes {
+    interface [
+        Conditional=SVG&FILTERS,
+        DontCheckEnums
+    ] SVGFEBlendElement : SVGElement,
+                          SVGFilterPrimitiveStandardAttributes {
         // Blend Mode Types
         const unsigned short SVG_FEBLEND_MODE_UNKNOWN  = 0;
         const unsigned short SVG_FEBLEND_MODE_NORMAL   = 1;
diff --git a/WebCore/svg/SVGFEColorMatrixElement.idl b/WebCore/svg/SVGFEColorMatrixElement.idl
index d704906..61c5b4a 100644
--- a/WebCore/svg/SVGFEColorMatrixElement.idl
+++ b/WebCore/svg/SVGFEColorMatrixElement.idl
@@ -25,8 +25,11 @@
 
 module svg {
 
-    interface [Conditional=SVG&FILTERS] SVGFEColorMatrixElement : SVGElement,
-                                                          SVGFilterPrimitiveStandardAttributes {
+    interface [
+        Conditional=SVG&FILTERS,
+        DontCheckEnums
+    ] SVGFEColorMatrixElement : SVGElement,
+                                SVGFilterPrimitiveStandardAttributes {
         // Color Matrix Types
         const unsigned short SVG_FECOLORMATRIX_TYPE_UNKNOWN          = 0;
         const unsigned short SVG_FECOLORMATRIX_TYPE_MATRIX           = 1;
diff --git a/WebCore/svg/SVGFECompositeElement.idl b/WebCore/svg/SVGFECompositeElement.idl
index d3adb25..af1d5cf 100644
--- a/WebCore/svg/SVGFECompositeElement.idl
+++ b/WebCore/svg/SVGFECompositeElement.idl
@@ -25,8 +25,11 @@
 
 module svg {
 
-    interface [Conditional=SVG&FILTERS] SVGFECompositeElement : SVGElement,
-                                                        SVGFilterPrimitiveStandardAttributes {
+    interface [
+        Conditional=SVG&FILTERS,
+        DontCheckEnums
+    ] SVGFECompositeElement : SVGElement,
+                              SVGFilterPrimitiveStandardAttributes {
         // Composite Operators
         const unsigned short SVG_FECOMPOSITE_OPERATOR_UNKNOWN    = 0;
         const unsigned short SVG_FECOMPOSITE_OPERATOR_OVER       = 1;
diff --git a/WebCore/svg/SVGFEConvolveMatrixElement.idl b/WebCore/svg/SVGFEConvolveMatrixElement.idl
index 5be4c33..afe859d 100644
--- a/WebCore/svg/SVGFEConvolveMatrixElement.idl
+++ b/WebCore/svg/SVGFEConvolveMatrixElement.idl
@@ -25,8 +25,12 @@
 
 module svg {
 
-    interface [Conditional=SVG&FILTERS, GenerateConstructor] SVGFEConvolveMatrixElement : SVGElement,
-                                                             SVGFilterPrimitiveStandardAttributes {
+    interface [
+        Conditional=SVG&FILTERS,
+        GenerateConstructor,
+        DontCheckEnums
+    ] SVGFEConvolveMatrixElement : SVGElement,
+                                   SVGFilterPrimitiveStandardAttributes {
         // Edge Mode Values
         const unsigned short SVG_EDGEMODE_UNKNOWN   = 0;
         const unsigned short SVG_EDGEMODE_DUPLICATE = 1;
diff --git a/WebCore/svg/SVGFEDisplacementMapElement.idl b/WebCore/svg/SVGFEDisplacementMapElement.idl
index b003e8f..1eb9440 100644
--- a/WebCore/svg/SVGFEDisplacementMapElement.idl
+++ b/WebCore/svg/SVGFEDisplacementMapElement.idl
@@ -25,8 +25,11 @@
 
 module svg {
 
-    interface [Conditional=SVG&FILTERS] SVGFEDisplacementMapElement : SVGElement,
-                                                              SVGFilterPrimitiveStandardAttributes {    
+    interface [
+        Conditional=SVG&FILTERS,
+        DontCheckEnums
+    ] SVGFEDisplacementMapElement : SVGElement,
+                                    SVGFilterPrimitiveStandardAttributes {
         // Channel Selectors
         const unsigned short SVG_CHANNEL_UNKNOWN = 0;
         const unsigned short SVG_CHANNEL_R       = 1;
diff --git a/WebCore/svg/SVGFEMorphologyElement.idl b/WebCore/svg/SVGFEMorphologyElement.idl
index ffd2289..64023e8 100644
--- a/WebCore/svg/SVGFEMorphologyElement.idl
+++ b/WebCore/svg/SVGFEMorphologyElement.idl
@@ -25,8 +25,11 @@
 
 module svg {
 
-    interface [Conditional=SVG&FILTERS] SVGFEMorphologyElement : SVGElement,
-                                                             SVGFilterPrimitiveStandardAttributes {
+    interface [
+        Conditional=SVG&FILTERS,
+        DontCheckEnums
+    ] SVGFEMorphologyElement : SVGElement,
+                               SVGFilterPrimitiveStandardAttributes {
         // Morphology Operators
         const unsigned short SVG_MORPHOLOGY_OPERATOR_UNKNOWN  = 0;
         const unsigned short SVG_MORPHOLOGY_OPERATOR_ERODE    = 1;
diff --git a/WebCore/svg/SVGFETurbulenceElement.idl b/WebCore/svg/SVGFETurbulenceElement.idl
index 934eddf..f011d99 100644
--- a/WebCore/svg/SVGFETurbulenceElement.idl
+++ b/WebCore/svg/SVGFETurbulenceElement.idl
@@ -25,8 +25,11 @@
 
 module svg {
 
-    interface [Conditional=SVG&FILTERS] SVGFETurbulenceElement : SVGElement,
-                                                         SVGFilterPrimitiveStandardAttributes { 
+    interface [
+        Conditional=SVG&FILTERS,
+        DontCheckEnums
+    ] SVGFETurbulenceElement : SVGElement,
+                               SVGFilterPrimitiveStandardAttributes {
         // Turbulence Types
         const unsigned short SVG_TURBULENCE_TYPE_UNKNOWN      = 0;
         const unsigned short SVG_TURBULENCE_TYPE_FRACTALNOISE = 1;
diff --git a/WebCore/svg/SVGGradientElement.idl b/WebCore/svg/SVGGradientElement.idl
index 7485780..16ac636 100644
--- a/WebCore/svg/SVGGradientElement.idl
+++ b/WebCore/svg/SVGGradientElement.idl
@@ -25,11 +25,14 @@
 
 module svg {
 
-    interface [Conditional=SVG] SVGGradientElement : SVGElement,
-                                                     SVGURIReference,
-                                                     SVGExternalResourcesRequired,
-                                                     SVGStylable
-                                                  /* SVGUnitTypes */ {
+    interface [
+        Conditional=SVG,
+        DontCheckEnums
+    ] SVGGradientElement : SVGElement,
+                           SVGURIReference,
+                           SVGExternalResourcesRequired,
+                           SVGStylable
+                           /* SVGUnitTypes */ {
         // Spread Method Types
         const unsigned short SVG_SPREADMETHOD_UNKNOWN = 0;
         const unsigned short SVG_SPREADMETHOD_PAD     = 1;
diff --git a/WebCore/xml/XMLHttpRequestException.idl b/WebCore/xml/XMLHttpRequestException.idl
index 7121468..ffea732 100644
--- a/WebCore/xml/XMLHttpRequestException.idl
+++ b/WebCore/xml/XMLHttpRequestException.idl
@@ -29,7 +29,8 @@
 module xml {
 
     interface [
-        NoStaticTables
+        NoStaticTables,
+        DontCheckEnums
     ] XMLHttpRequestException {
 
         readonly attribute unsigned short   code;
diff --git a/WebCore/xml/XPathException.idl b/WebCore/xml/XPathException.idl
index d5a9af6..b57df57 100644
--- a/WebCore/xml/XPathException.idl
+++ b/WebCore/xml/XPathException.idl
@@ -29,7 +29,8 @@
 module xpath {
 
     interface [
-        Conditional=XPATH
+        Conditional=XPATH,
+        DontCheckEnums
     ] XPathException {
 
         readonly attribute unsigned short   code;

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list