Title: [90788] trunk/Source/WebCore
Revision
90788
Author
mrobin...@webkit.org
Date
2011-07-11 15:43:00 -0700 (Mon, 11 Jul 2011)

Log Message

Reviewed by Daniel Bates.

[GTK] Transition to Mozilla named cursors have incorrect hotspot and rendering
https://bugs.webkit.org/show_bug.cgi?id=62752

Instead of offsetting the cursor blit by the hotspot, just pass the hotspot
arguments to the GdkCursor constructor.

No new tests. This is covered by manual-tests/cursor.html.

* platform/gtk/CursorGtk.cpp:
(WebCore::createNamedCursor):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (90787 => 90788)


--- trunk/Source/WebCore/ChangeLog	2011-07-11 22:30:48 UTC (rev 90787)
+++ trunk/Source/WebCore/ChangeLog	2011-07-11 22:43:00 UTC (rev 90788)
@@ -1,3 +1,18 @@
+2011-07-11  Martin Robinson  <mrobin...@igalia.com>
+
+        Reviewed by Daniel Bates.
+
+        [GTK] Transition to Mozilla named cursors have incorrect hotspot and rendering
+        https://bugs.webkit.org/show_bug.cgi?id=62752
+
+        Instead of offsetting the cursor blit by the hotspot, just pass the hotspot
+        arguments to the GdkCursor constructor.
+
+        No new tests. This is covered by manual-tests/cursor.html.
+
+        * platform/gtk/CursorGtk.cpp:
+        (WebCore::createNamedCursor):
+
 2011-07-11  Yi Shen  <yi.4.s...@nokia.com>
 
         [Qt] Unreviewed rollout 90779 which may fail the layout-test.

Modified: trunk/Source/WebCore/platform/gtk/CursorGtk.cpp (90787 => 90788)


--- trunk/Source/WebCore/platform/gtk/CursorGtk.cpp	2011-07-11 22:30:48 UTC (rev 90787)
+++ trunk/Source/WebCore/platform/gtk/CursorGtk.cpp	2011-07-11 22:43:00 UTC (rev 90788)
@@ -52,11 +52,11 @@
     RefPtr<cairo_surface_t> surface = adoptRef(cairo_image_surface_create(CAIRO_FORMAT_A1, 32, 32));
     RefPtr<cairo_t> cr = adoptRef(cairo_create(surface.get()));
 
-    cairo_set_source_surface(cr.get(), source.get(), cursor.hot_x, cursor.hot_y);
-    cairo_mask_surface(cr.get(), mask.get(), cursor.hot_x, cursor.hot_y);
+    cairo_set_source_surface(cr.get(), source.get(), 0, 0);
+    cairo_mask_surface(cr.get(), mask.get(), 0, 0);
 
     GRefPtr<GdkPixbuf> pixbuf = adoptGRef(gdk_pixbuf_get_from_surface(surface.get(), 0, 0, 32, 32));
-    return adoptGRef(gdk_cursor_new_from_pixbuf(gdk_display_get_default(), pixbuf.get(), 0, 0));
+    return adoptGRef(gdk_cursor_new_from_pixbuf(gdk_display_get_default(), pixbuf.get(), cursor.hot_x, cursor.hot_y));
 }
 
 static GRefPtr<GdkCursor> createCustomCursor(Image* image, const IntPoint& hotSpot)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to