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

xan at webkit.org xan at webkit.org
Wed Dec 22 11:40:23 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit b0b325715da9b7c0939568316b935bd8b5922fd3
Author: xan at webkit.org <xan at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Aug 3 13:38:05 2010 +0000

    WebCore:
    
    2010-08-03  Xan Lopez  <xlopez at igalia.com>
    
            Reviewed by Gustavo Noronha.
    
            Make string parameters be 'const char*' instead of just 'char*'.
    
            * bindings/scripts/CodeGeneratorGObject.pm:
    
    WebKit/gtk:
    
    2010-08-03  Xan Lopez  <xlopez at igalia.com>
    
            Reviewed by Gustavo Noronha.
    
            Update unit tests now that string parameters are 'const char*'.
    
            * tests/testdomdocument.c:
            (test_dom_document_title):
            (test_dom_document_get_elements_by_tag_name):
            (test_dom_document_get_elements_by_class_name):
            (test_dom_document_get_element_by_id):
            * tests/testdomnode.c:
            (test_dom_node_insertion):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64552 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index ad5f95c..2157888 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -2,6 +2,14 @@
 
         Reviewed by Gustavo Noronha.
 
+        Make string parameters be 'const char*' instead of just 'char*'.
+
+        * bindings/scripts/CodeGeneratorGObject.pm:
+
+2010-08-03  Xan Lopez  <xlopez at igalia.com>
+
+        Reviewed by Gustavo Noronha.
+
         Get rid of extra spaces in the type strings.
 
         * bindings/scripts/CodeGeneratorGObject.pm:
diff --git a/WebCore/bindings/scripts/CodeGeneratorGObject.pm b/WebCore/bindings/scripts/CodeGeneratorGObject.pm
index 23c92c0..97bebb6 100644
--- a/WebCore/bindings/scripts/CodeGeneratorGObject.pm
+++ b/WebCore/bindings/scripts/CodeGeneratorGObject.pm
@@ -802,9 +802,10 @@ sub GenerateFunction {
         }
         addIncludeInBody($paramIDLType);
         my $paramType = GetGlibTypeName($paramIDLType);
+        my $const = $paramType eq "gchar*" ? "const " : "";
         my $paramName = decamelize($param->name);
 
-        $functionSig .= ", $paramType $paramName";
+        $functionSig .= ", ${const}$paramType $paramName";
 
         my $paramIsGDOMType = IsGDOMClassType($paramIDLType);
         if ($paramIsGDOMType) {
diff --git a/WebKit/gtk/ChangeLog b/WebKit/gtk/ChangeLog
index 2d02015..d7582ee 100644
--- a/WebKit/gtk/ChangeLog
+++ b/WebKit/gtk/ChangeLog
@@ -1,3 +1,17 @@
+2010-08-03  Xan Lopez  <xlopez at igalia.com>
+
+        Reviewed by Gustavo Noronha.
+
+        Update unit tests now that string parameters are 'const char*'.
+
+        * tests/testdomdocument.c:
+        (test_dom_document_title):
+        (test_dom_document_get_elements_by_tag_name):
+        (test_dom_document_get_elements_by_class_name):
+        (test_dom_document_get_element_by_id):
+        * tests/testdomnode.c:
+        (test_dom_node_insertion):
+
 2010-08-02  Martin Robinson  <mrobinson at igalia.com>
 
         Reviewed by Xan Lopez.
diff --git a/WebKit/gtk/tests/testdomdocument.c b/WebKit/gtk/tests/testdomdocument.c
index 4c677ea..ec2f579 100644
--- a/WebKit/gtk/tests/testdomdocument.c
+++ b/WebKit/gtk/tests/testdomdocument.c
@@ -75,7 +75,7 @@ static void test_dom_document_title(DomDocumentFixture* fixture, gconstpointer d
     g_assert(title);
     g_assert_cmpstr(title, ==, "This is the title");
     g_free(title);
-    webkit_dom_document_set_title(document, (gchar*)"This is the second title");
+    webkit_dom_document_set_title(document, "This is the second title");
     title = webkit_dom_document_get_title(document);
     g_assert(title);
     g_assert_cmpstr(title, ==, "This is the second title");
@@ -89,7 +89,7 @@ static void test_dom_document_get_elements_by_tag_name(DomDocumentFixture* fixtu
     g_assert(view);
     WebKitDOMDocument* document = webkit_web_view_get_dom_document(view);
     g_assert(document);
-    WebKitDOMNodeList* list = webkit_dom_document_get_elements_by_tag_name(document, (gchar*)"li");
+    WebKitDOMNodeList* list = webkit_dom_document_get_elements_by_tag_name(document, "li");
     g_assert(list);
     gulong length = webkit_dom_node_list_get_length(list);
     g_assert_cmpint(length, ==, 3);
@@ -116,7 +116,7 @@ static void test_dom_document_get_elements_by_class_name(DomDocumentFixture* fix
     g_assert(view);
     WebKitDOMDocument* document = webkit_web_view_get_dom_document(view);
     g_assert(document);
-    WebKitDOMNodeList* list = webkit_dom_document_get_elements_by_class_name(document, (gchar*)"test");
+    WebKitDOMNodeList* list = webkit_dom_document_get_elements_by_class_name(document, "test");
     g_assert(list);
     gulong length = webkit_dom_node_list_get_length(list);
     g_assert_cmpint(length, ==, 2);
@@ -139,17 +139,17 @@ static void test_dom_document_get_element_by_id(DomDocumentFixture* fixture, gco
     g_assert(view);
     WebKitDOMDocument* document = webkit_web_view_get_dom_document(view);
     g_assert(document);
-    WebKitDOMElement* element = webkit_dom_document_get_element_by_id(document, (gchar*)"testok");
+    WebKitDOMElement* element = webkit_dom_document_get_element_by_id(document, "testok");
     g_assert(element);
-    element = webkit_dom_document_get_element_by_id(document, (gchar*)"this-id-does-not-exist");
+    element = webkit_dom_document_get_element_by_id(document, "this-id-does-not-exist");
     g_assert(element == 0);
     /* The DOM spec says the return value is undefined when there's
      * more than one element with the same id; in our case the first
      * one will be returned */
-    element = webkit_dom_document_get_element_by_id(document, (gchar*)"testbad");
+    element = webkit_dom_document_get_element_by_id(document, "testbad");
     g_assert(element);
     WebKitDOMHTMLElement* htmlElement = (WebKitDOMHTMLElement*)element;
-    g_assert_cmpstr(webkit_dom_html_element_get_inner_text(htmlElement), ==, (gchar*)"first");
+    g_assert_cmpstr(webkit_dom_html_element_get_inner_text(htmlElement), ==, "first");
 }
 
 static void test_dom_document_get_links(DomDocumentFixture* fixture, gconstpointer data)
diff --git a/WebKit/gtk/tests/testdomnode.c b/WebKit/gtk/tests/testdomnode.c
index b253d1d..c6056d6 100644
--- a/WebKit/gtk/tests/testdomnode.c
+++ b/WebKit/gtk/tests/testdomnode.c
@@ -138,7 +138,7 @@ static void test_dom_node_insertion(DomNodeFixture* fixture, gconstpointer data)
     g_assert(webkit_dom_node_has_child_nodes(WEBKIT_DOM_NODE(body)) == FALSE);
 
     /* Insert one P element */
-    p = webkit_dom_document_create_element(document, (char*)"P", NULL);
+    p = webkit_dom_document_create_element(document, "P", NULL);
     webkit_dom_node_append_child(WEBKIT_DOM_NODE(body), WEBKIT_DOM_NODE(p), NULL);
 
     /* Now it should have one, the same that we inserted */
@@ -150,7 +150,7 @@ static void test_dom_node_insertion(DomNodeFixture* fixture, gconstpointer data)
     g_assert(webkit_dom_node_is_same_node(WEBKIT_DOM_NODE(p), node));
 
     /* Replace the P tag with a DIV tag */
-    div = webkit_dom_document_create_element(document, (char*)"DIV", NULL);
+    div = webkit_dom_document_create_element(document, "DIV", NULL);
     webkit_dom_node_replace_child(WEBKIT_DOM_NODE(body), WEBKIT_DOM_NODE(div), WEBKIT_DOM_NODE(p), NULL);
     g_assert(webkit_dom_node_has_child_nodes(WEBKIT_DOM_NODE(body)));
     list = webkit_dom_node_get_child_nodes(WEBKIT_DOM_NODE(body));

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list