[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.15.1-1414-gc69ee75

xan at webkit.org xan at webkit.org
Thu Oct 29 20:31:52 UTC 2009


The following commit has been merged in the webkit-1.1 branch:
commit 33b826bf90e7970c6b9a4a7c01fcd19c1eaa69fa
Author: xan at webkit.org <xan at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Sep 22 13:00:20 2009 +0000

    2009-09-22  Xan Lopez  <xlopez at igalia.com>
    
            Reviewed by Jan Alonzo.
    
            Hardcode element positions at 0,0 so that we know where to
            generate events to test WebKitHitTestResult.
    
            * tests/testhittestresult.c:
            (load_status_cb):
            (test_webkit_hit_test_result):
            (main):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48631 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/gtk/ChangeLog b/WebKit/gtk/ChangeLog
index 8588cd9..9cbf430 100644
--- a/WebKit/gtk/ChangeLog
+++ b/WebKit/gtk/ChangeLog
@@ -2,6 +2,18 @@
 
         Reviewed by Jan Alonzo.
 
+        Hardcode element positions at 0,0 so that we know where to
+        generate events to test WebKitHitTestResult.
+
+        * tests/testhittestresult.c:
+        (load_status_cb):
+        (test_webkit_hit_test_result):
+        (main):
+
+2009-09-22  Xan Lopez  <xlopez at igalia.com>
+
+        Reviewed by Jan Alonzo.
+
         [GTK] WebKitHitTestResult is completely broken in gmail
         https://bugs.webkit.org/show_bug.cgi?id=29527
 
diff --git a/WebKit/gtk/tests/testhittestresult.c b/WebKit/gtk/tests/testhittestresult.c
index c80810e..eedf144 100644
--- a/WebKit/gtk/tests/testhittestresult.c
+++ b/WebKit/gtk/tests/testhittestresult.c
@@ -82,8 +82,9 @@ load_status_cb(WebKitWebView* webView,
         WebKitHitTestResult* result;
         guint context;
         GdkEventButton event;
-        event.x = GTK_WIDGET(webView)->allocation.width / 2;
-        event.y = GTK_WIDGET(webView)->allocation.height / 2;
+        /* Close enough to 0,0 */
+        event.x = 5;
+        event.y = 5;
 
         result = webkit_web_view_get_hit_test_result(webView, &event);
         g_assert(result);
@@ -98,7 +99,7 @@ static void
 test_webkit_hit_test_result(HitTestResultFixture* fixture, gconstpointer data)
 {
     TestInfo* info = (TestInfo*)data;
-    GtkAllocation allocation = { 0, 0, 2, 2 };
+    GtkAllocation allocation = { 0, 0, 50, 50 };
 
     webkit_web_view_load_string(fixture->webView,
                                 info->data,
@@ -121,24 +122,20 @@ int main(int argc, char** argv)
                test_info_new("<html><body><h1>WebKitGTK+!</h1></body></html>",
                              WEBKIT_HIT_TEST_RESULT_CONTEXT_DOCUMENT),
                hit_test_result_fixture_setup, test_webkit_hit_test_result, hit_test_result_fixture_teardown);
-
-/* We should really test this, but it's complicated to know where to
-   ask for the coordinates in general without either DOM bindings or
-   using JSC APIs */
-#if 0
+    /* We hardcode all elements to be at 0,0 so that we know where to
+     * generate the button events */
     g_test_add("/webkit/hittestresult/image", HitTestResultFixture,
-               test_info_new("<html><body><img src='0xdeadbeef' width=50 height=50></img></body></html>",
+               test_info_new("<html><body><img style='position:absolute; left:0; top:0'src='0xdeadbeef' width=50 height=50></img></body></html>",
                              WEBKIT_HIT_TEST_RESULT_CONTEXT_IMAGE),
                hit_test_result_fixture_setup, test_webkit_hit_test_result, hit_test_result_fixture_teardown);
     g_test_add("/webkit/hittestresult/editable", HitTestResultFixture,
-               test_info_new("<html><body><input type='submit'></input>></body></html>",
+               test_info_new("<html><body><input style='position:absolute; left:0; top:0' size='35'></input>></body></html>",
                              WEBKIT_HIT_TEST_RESULT_CONTEXT_EDITABLE),
                hit_test_result_fixture_setup, test_webkit_hit_test_result, hit_test_result_fixture_teardown);
     g_test_add("/webkit/hittestresult/link", HitTestResultFixture,
-               test_info_new("<html><body><a href='http://www.example.com'>HELLO WORLD</a></body></html>",
+               test_info_new("<html><body><a style='position:absolute; left:0; top:0' href='http://www.example.com'>HELLO WORLD</a></body></html>",
                              WEBKIT_HIT_TEST_RESULT_CONTEXT_LINK),
                hit_test_result_fixture_setup, test_webkit_hit_test_result, hit_test_result_fixture_teardown);
-#endif
                
     return g_test_run ();
 }

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list