Title: [98434] trunk
Revision
98434
Author
[email protected]
Date
2011-10-25 23:46:35 -0700 (Tue, 25 Oct 2011)

Log Message

Unreviewed, rolling out r98379.
http://trac.webkit.org/changeset/98379
https://bugs.webkit.org/show_bug.cgi?id=70875

Did not pass on JSC ports (Requested by abarth on #webkit).

Patch by Sheriff Bot <[email protected]> on 2011-10-25

Source/WebCore:

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader):
(GenerateImplementation):
* bindings/scripts/CodeGeneratorV8.pm:
(GenerateHeader):
(GenerateArgumentsCountCheck):
(GenerateImplementation):
* html/canvas/CanvasRenderingContext2D.idl:
* page/DOMWindow.idl:

LayoutTests:

* fast/canvas/canvas-putImageData-expected.txt:
* fast/canvas/canvas-putImageData.js:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (98433 => 98434)


--- trunk/LayoutTests/ChangeLog	2011-10-26 06:25:39 UTC (rev 98433)
+++ trunk/LayoutTests/ChangeLog	2011-10-26 06:46:35 UTC (rev 98434)
@@ -1,5 +1,16 @@
 2011-10-25  Sheriff Bot  <[email protected]>
 
+        Unreviewed, rolling out r98379.
+        http://trac.webkit.org/changeset/98379
+        https://bugs.webkit.org/show_bug.cgi?id=70875
+
+        Did not pass on JSC ports (Requested by abarth on #webkit).
+
+        * fast/canvas/canvas-putImageData-expected.txt:
+        * fast/canvas/canvas-putImageData.js:
+
+2011-10-25  Sheriff Bot  <[email protected]>
+
         Unreviewed, rolling out r98346.
         http://trac.webkit.org/changeset/98346
         https://bugs.webkit.org/show_bug.cgi?id=70874

Modified: trunk/LayoutTests/fast/canvas/canvas-putImageData-expected.txt (98433 => 98434)


--- trunk/LayoutTests/fast/canvas/canvas-putImageData-expected.txt	2011-10-26 06:25:39 UTC (rev 98433)
+++ trunk/LayoutTests/fast/canvas/canvas-putImageData-expected.txt	2011-10-26 06:46:35 UTC (rev 98434)
@@ -144,7 +144,7 @@
 PASS getPixel(9,9) is [0,128,0,255]
 PASS getPixel(1,1) is [0,128,0,255]
 PASS getPixel(9,9) is [0,128,0,255]
-PASS context.putImageData({}, 0, 0) threw exception TypeError: Type error.
+PASS context.putImageData({}, 0, 0) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
 PASS context.putImageData(buffer, NaN, 0, 0, 0, 0, 0) threw exception Error: NOT_SUPPORTED_ERR: DOM Exception 9.
 PASS context.putImageData(buffer, 0, NaN, 0, 0, 0, 0) threw exception Error: NOT_SUPPORTED_ERR: DOM Exception 9.
 PASS context.putImageData(buffer, 0, 0, NaN, 0, 0, 0) threw exception Error: NOT_SUPPORTED_ERR: DOM Exception 9.

Modified: trunk/LayoutTests/fast/canvas/canvas-putImageData.js (98433 => 98434)


--- trunk/LayoutTests/fast/canvas/canvas-putImageData.js	2011-10-26 06:25:39 UTC (rev 98433)
+++ trunk/LayoutTests/fast/canvas/canvas-putImageData.js	2011-10-26 06:46:35 UTC (rev 98434)
@@ -201,7 +201,7 @@
 pixelShouldBe(9, 9, [0, 128,0,255]);
 
 
-shouldThrow("context.putImageData({}, 0, 0)", "'TypeError: Type error'");
+shouldThrow("context.putImageData({}, 0, 0)", "'Error: TYPE_MISMATCH_ERR: DOM Exception 17'");
 shouldThrow("context.putImageData(buffer, NaN, 0, 0, 0, 0, 0)", "'Error: NOT_SUPPORTED_ERR: DOM Exception 9'");
 shouldThrow("context.putImageData(buffer, 0, NaN, 0, 0, 0, 0)", "'Error: NOT_SUPPORTED_ERR: DOM Exception 9'");
 shouldThrow("context.putImageData(buffer, 0, 0, NaN, 0, 0, 0)", "'Error: NOT_SUPPORTED_ERR: DOM Exception 9'");

Modified: trunk/Source/WebCore/ChangeLog (98433 => 98434)


--- trunk/Source/WebCore/ChangeLog	2011-10-26 06:25:39 UTC (rev 98433)
+++ trunk/Source/WebCore/ChangeLog	2011-10-26 06:46:35 UTC (rev 98434)
@@ -1,5 +1,23 @@
 2011-10-25  Sheriff Bot  <[email protected]>
 
+        Unreviewed, rolling out r98379.
+        http://trac.webkit.org/changeset/98379
+        https://bugs.webkit.org/show_bug.cgi?id=70875
+
+        Did not pass on JSC ports (Requested by abarth on #webkit).
+
+        * bindings/scripts/CodeGeneratorJS.pm:
+        (GenerateHeader):
+        (GenerateImplementation):
+        * bindings/scripts/CodeGeneratorV8.pm:
+        (GenerateHeader):
+        (GenerateArgumentsCountCheck):
+        (GenerateImplementation):
+        * html/canvas/CanvasRenderingContext2D.idl:
+        * page/DOMWindow.idl:
+
+2011-10-25  Sheriff Bot  <[email protected]>
+
         Unreviewed, rolling out r98346.
         http://trac.webkit.org/changeset/98346
         https://bugs.webkit.org/show_bug.cgi?id=70874

Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (98433 => 98434)


--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm	2011-10-26 06:25:39 UTC (rev 98433)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm	2011-10-26 06:46:35 UTC (rev 98434)
@@ -908,10 +908,10 @@
     if ($numCustomFunctions > 0) {
         push(@headerContent, "\n    // Custom functions\n");
         foreach my $function (@{$dataNode->functions}) {
-            next unless $function->signature->extendedAttributes->{"Custom"} or $function->signature->extendedAttributes->{"JSCCustom"};
-            next if $function->{overloads} && $function->{overloadIndex} != 1;
-            my $functionImplementationName = $function->signature->extendedAttributes->{"ImplementationFunction"} || $codeGenerator->WK_lcfirst($function->signature->name);
-            push(@headerContent, "    JSC::JSValue " . $functionImplementationName . "(JSC::ExecState*);\n");
+            if ($function->signature->extendedAttributes->{"Custom"} || $function->signature->extendedAttributes->{"JSCCustom"}) {
+                my $functionImplementationName = $function->signature->extendedAttributes->{"ImplementationFunction"} || $codeGenerator->WK_lcfirst($function->signature->name);
+                push(@headerContent, "    JSC::JSValue " . $functionImplementationName . "(JSC::ExecState*);\n");
+            }
         }
     }
 
@@ -1961,12 +1961,8 @@
             AddIncludesForTypeInImpl($function->signature->type);
 
             my $functionName = $codeGenerator->WK_lcfirst($className) . "PrototypeFunction" . $codeGenerator->WK_ucfirst($function->signature->name);
-            my $isCustom = $function->signature->extendedAttributes->{"Custom"} || $function->signature->extendedAttributes->{"JSCCustom"};
-            my $isOverloaded = $function->{overloads} && @{$function->{overloads}} > 1;
 
-            next if $isCustom && $isOverloaded && $function->{overloadIndex} > 1;
-
-            if (!$isCustom && $isOverloaded) {
+            if ($function->{overloads} && @{$function->{overloads}} > 1) {
                 # Append a number to an overloaded method's name to make it unique:
                 $functionName = $functionName . $function->{overloadIndex};
                 # Make this function static to avoid compiler warnings, since we
@@ -2009,7 +2005,7 @@
                 push(@implContent, "        return JSValue::encode(jsUndefined());\n");
             }
 
-            if ($isCustom) {
+            if ($function->signature->extendedAttributes->{"Custom"} || $function->signature->extendedAttributes->{"JSCCustom"}) {
                 push(@implContent, "    return JSValue::encode(castedThis->" . $functionImplementationName . "(exec));\n");
             } else {
                 push(@implContent, "    $implType* imp = static_cast<$implType*>(castedThis->impl());\n");
@@ -2046,7 +2042,7 @@
 
             push(@implContent, "}\n\n");
 
-            if (!$isCustom && $isOverloaded && $function->{overloadIndex} == @{$function->{overloads}}) {
+            if ($function->{overloads} && @{$function->{overloads}} > 1 && $function->{overloadIndex} == @{$function->{overloads}}) {
                 # Generate a function dispatching call to the rest of the overloads.
                 GenerateOverloadedPrototypeFunction($function, $dataNode, $implClassName);
             }

Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm (98433 => 98434)


--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm	2011-10-26 06:25:39 UTC (rev 98433)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm	2011-10-26 06:46:35 UTC (rev 98434)
@@ -264,7 +264,6 @@
     # Copy contents of parent classes except the first parent or if it is
     # EventTarget.
     $codeGenerator->AddMethodsConstantsAndAttributesFromParentClasses($dataNode, \@allParents, 1);
-    $codeGenerator->LinkOverloadedFunctions($dataNode);
 
     my $hasDependentLifetime = $dataNode->extendedAttributes->{"V8DependentLifetime"} || $dataNode->extendedAttributes->{"ActiveDOMObject"} || $className =~ /SVG/;
     if (!$hasDependentLifetime) {
@@ -372,7 +371,7 @@
         my $name = $function->signature->name;
         my $attrExt = $function->signature->extendedAttributes;
 
-        if (($attrExt->{"Custom"} || $attrExt->{"V8Custom"}) && $function->{overloadIndex} == 1) {
+        if ($attrExt->{"Custom"} || $attrExt->{"V8Custom"}) {
             push(@headerContent, <<END);
     static v8::Handle<v8::Value> ${name}Callback(const v8::Arguments&);
 END
@@ -1390,14 +1389,12 @@
     }
     $requiresAllArguments = $function->signature->extendedAttributes->{"RequiresAllArguments"} || $requiresAllArgumentsDefault;
     if ($requiresAllArguments) {
-        my $numMandatoryParams = 0;
-        my $optionalSeen = 0;
-        foreach my $param (@{$function->parameters}) {
+        my $numMandatoryParams = @{$function->parameters};
+        foreach my $param (reverse(@{$function->parameters})) {
             if ($param->extendedAttributes->{"Optional"}) {
-                $optionalSeen = 1;
+                $numMandatoryParams--;
             } else {
-                die "An argument must not be declared to be optional unless all subsequent arguments to the operation are also optional." if $optionalSeen;
-                $numMandatoryParams++;
+                last;
             }
         }
         if ($numMandatoryParams >= 1) {
@@ -2005,12 +2002,13 @@
         GenerateConstructorGetter($implClassName);
     }
 
+    $codeGenerator->LinkOverloadedFunctions($dataNode);
+
     my $indexer;
     my $namedPropertyGetter;
     # Generate methods for functions.
     foreach my $function (@{$dataNode->functions}) {
-        my $isCustom = $function->signature->extendedAttributes->{"Custom"} || $function->signature->extendedAttributes->{"V8Custom"};
-        if (!$isCustom) {
+        if (!($function->signature->extendedAttributes->{"Custom"} || $function->signature->extendedAttributes->{"V8Custom"})) {
             GenerateFunctionCallback($function, $dataNode, $implClassName);
             if ($function->{overloadIndex} > 1 && $function->{overloadIndex} == @{$function->{overloads}}) {
                 GenerateOverloadedFunctionCallback($function, $dataNode, $implClassName);
@@ -2029,9 +2027,7 @@
         # generate an access getter that returns different function objects
         # for different calling context.
         if (($dataNode->extendedAttributes->{"CheckDomainSecurity"} || ($interfaceName eq "DOMWindow")) && $function->signature->extendedAttributes->{"DoNotCheckDomainSecurity"}) {
-            if (!$isCustom || $function->{overloadIndex} == 1) {
-                GenerateDomainSafeFunctionGetter($function, $implClassName);
-            }
+            GenerateDomainSafeFunctionGetter($function, $implClassName);
         }
     }
 

Modified: trunk/Source/WebCore/html/canvas/CanvasRenderingContext2D.idl (98433 => 98434)


--- trunk/Source/WebCore/html/canvas/CanvasRenderingContext2D.idl	2011-10-26 06:25:39 UTC (rev 98433)
+++ trunk/Source/WebCore/html/canvas/CanvasRenderingContext2D.idl	2011-10-26 06:46:35 UTC (rev 98434)
@@ -157,10 +157,8 @@
             raises (DOMException);
         CanvasPattern createPattern(in HTMLImageElement image, in [ConvertNullToNullString] DOMString repetitionType)
             raises (DOMException);
-        void putImageData(in ImageData imagedata, in float dx, in float dy)
+        void putImageData(in ImageData imagedata, in float dx, in float dy, in [Optional] float dirtyX, in float dirtyY, in float dirtyWidth, in float dirtyHeight)
             raises(DOMException);
-        void putImageData(in ImageData imagedata, in float dx, in float dy, in float dirtyX, in float dirtyY, in float dirtyWidth, in float dirtyHeight)
-            raises(DOMException);
         ImageData createImageData(in ImageData imagedata)
             raises (DOMException);
         ImageData createImageData(in float sw, in float sh)

Modified: trunk/Source/WebCore/page/DOMWindow.idl (98433 => 98434)


--- trunk/Source/WebCore/page/DOMWindow.idl	2011-10-26 06:25:39 UTC (rev 98433)
+++ trunk/Source/WebCore/page/DOMWindow.idl	2011-10-26 06:46:35 UTC (rev 98434)
@@ -212,15 +212,10 @@
 
         // cross-document messaging
 #if defined(LANGUAGE_JAVASCRIPT) && LANGUAGE_JAVASCRIPT
-        [DoNotCheckDomainSecurity, Custom] void postMessage(in SerializedScriptValue message, in DOMString targetOrigin)
+        [DoNotCheckDomainSecurity, Custom] void postMessage(in SerializedScriptValue message, in [Optional] Array messagePorts, in DOMString targetOrigin)
             raises(DOMException);
-        [DoNotCheckDomainSecurity, Custom] void postMessage(in SerializedScriptValue message, in Array messagePorts, in DOMString targetOrigin)
+        [DoNotCheckDomainSecurity, Custom] void webkitPostMessage(in SerializedScriptValue message, in [Optional] Array transferList, in DOMString targetOrigin)
             raises(DOMException);
-
-        [DoNotCheckDomainSecurity, Custom] void webkitPostMessage(in SerializedScriptValue message, in DOMString targetOrigin)
-            raises(DOMException);
-        [DoNotCheckDomainSecurity, Custom] void webkitPostMessage(in SerializedScriptValue message, in Array transferList, in DOMString targetOrigin)
-            raises(DOMException);
 #else
         // There's no good way to expose an array via the ObjC bindings, so for now just allow passing in a single port.
         [DoNotCheckDomainSecurity, Custom] void postMessage(in SerializedScriptValue message, in [Optional] MessagePort messagePort, in DOMString targetOrigin)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to