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

commit-queue at webkit.org commit-queue at webkit.org
Wed Dec 22 12:45:10 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 3ef6b3cae9fc460d480ce147f10cb75779bd2248
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Sat Aug 28 16:56:38 2010 +0000

    2010-08-28  Moritz Lipp  <mlq at pwmt.org>
    
            Reviewed by Xan Lopez.
    
            [GTK] Improper webkit_dom_document_evaluate implementation.
            https://bugs.webkit.org/show_bug.cgi?id=42115
    
            The generated webkit_dom_document_evaluate() function does not meet the
            evaluate interface described in the W3 Documentation
            http://www.w3.org/TR/DOM-Level-3-XPath/xpath.html#XPathEvaluator-evaluate
            "If this is specified as nullor the implementation does not reuse the
            specified result,...". The current implementation did not accept the
            result parameter to be NULL.
    
            * bindings/scripts/CodeGeneratorGObject.pm:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@66308 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 72cbbb9..8291680 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,19 @@
+2010-08-28  Moritz Lipp  <mlq at pwmt.org>
+
+        Reviewed by Xan Lopez.
+
+        [GTK] Improper webkit_dom_document_evaluate implementation.
+        https://bugs.webkit.org/show_bug.cgi?id=42115
+
+        The generated webkit_dom_document_evaluate() function does not meet the
+        evaluate interface described in the W3 Documentation
+        http://www.w3.org/TR/DOM-Level-3-XPath/xpath.html#XPathEvaluator-evaluate
+        "If this is specified as nullor the implementation does not reuse the
+        specified result,...". The current implementation did not accept the
+        result parameter to be NULL.
+
+        * bindings/scripts/CodeGeneratorGObject.pm:
+
 2010-08-28  Adam Barth  <abarth at webkit.org>
 
         Reviewed by Eric Seidel.
diff --git a/WebCore/bindings/scripts/CodeGeneratorGObject.pm b/WebCore/bindings/scripts/CodeGeneratorGObject.pm
index 62f17b3..6a1d115 100644
--- a/WebCore/bindings/scripts/CodeGeneratorGObject.pm
+++ b/WebCore/bindings/scripts/CodeGeneratorGObject.pm
@@ -911,7 +911,11 @@ sub GenerateFunction {
         if (!$paramTypeIsPrimitive) {
             if ($returnType ne "void") {
                 # TODO: return proper default result
-                push(@cBody, "    g_return_val_if_fail($paramName, 0);\n");
+                # FIXME: Temporary hack for generating a proper implementation
+                #        of the webkit_dom_document_evaluate function (Bug-ID: 42115)
+                if (!(($functionName eq "webkit_dom_document_evaluate") && ($paramIDLType eq "XPathResult"))) {
+                    push(@cBody, "    g_return_val_if_fail($paramName, 0);\n");
+                }
             } else {
                 push(@cBody, "    g_return_if_fail($paramName);\n");
             }
@@ -929,13 +933,18 @@ sub GenerateFunction {
         } elsif ($paramIDLType eq "CompareHow") {
             push(@cBody, "    WebCore::Range::CompareHow converted_${paramName} = static_cast<WebCore::Range::CompareHow>($paramName);\n");
         } elsif ($paramIsGDOMType) {
-            push(@cBody, "    WebCore::${paramIDLType} * converted_${paramName} = WebKit::core($paramName);\n");
+            push(@cBody, "    WebCore::${paramIDLType} * converted_${paramName} = NULL;\n");
+            push(@cBody, "    if (${paramName} != NULL) {\n");
+            push(@cBody, "        converted_${paramName} = WebKit::core($paramName);\n");
+
             if ($returnType ne "void") {
                 # TODO: return proper default result
-                push(@cBody, "    g_return_val_if_fail(converted_${paramName}, 0);\n");
+                push(@cBody, "        g_return_val_if_fail(converted_${paramName}, 0);\n");
             } else {
-                push(@cBody, "    g_return_if_fail(converted_${paramName});\n");
+                push(@cBody, "        g_return_if_fail(converted_${paramName});\n");
             }
+
+            push(@cBody, "    }\n");
         }
         $returnParamName = "converted_".$paramName if $param->extendedAttributes->{"Return"};
     }

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list