Use GTK cursors for zoom-in or zoom-out css cursors (bug 1328724) draft
authorAndy Kluger <andykluger@gmail.com>
Wed, 08 Mar 2017 01:28:47 -0500
changeset 495059 8aac1d1f35f7b11c90097d9be5358f630d3baef5
parent 494872 58753259bfeb3b818eac7870871b0aae1f8de64a
child 548267 c6ca481810e0c7a2679f1d9b2dae909c74e5bcfb
push id48213
push userbmo:andydecleyre@gmail.com
push dateWed, 08 Mar 2017 06:30:19 +0000
bugs1328724
milestone55.0a1
Use GTK cursors for zoom-in or zoom-out css cursors (bug 1328724) get_gtk_cursor attempts to use themed cursor icons for most css cursor types, but left these two out. Now it will try to use the theme for these as well, and fall back to the generic FF set used previously. MozReview-Commit-ID: 9QHV0mc5AxK
widget/gtk/nsWindow.cpp
--- a/widget/gtk/nsWindow.cpp
+++ b/widget/gtk/nsWindow.cpp
@@ -5190,20 +5190,24 @@ get_gtk_cursor(nsCursor aCursor)
             newType = MOZ_CURSOR_HAND_GRABBING;
         break;
     case eCursor_spinning:
         gdkcursor = gdk_cursor_new_from_name(defaultDisplay, "progress");
         if (!gdkcursor)
             newType = MOZ_CURSOR_SPINNING;
         break;
     case eCursor_zoom_in:
-        newType = MOZ_CURSOR_ZOOM_IN;
+        gdkcursor = gdk_cursor_new_from_name(defaultDisplay, "zoom-in");
+        if (!gdkcursor)
+            newType = MOZ_CURSOR_ZOOM_IN;
         break;
     case eCursor_zoom_out:
-        newType = MOZ_CURSOR_ZOOM_OUT;
+        gdkcursor = gdk_cursor_new_from_name(defaultDisplay, "zoom-out");
+        if (!gdkcursor)
+            newType = MOZ_CURSOR_ZOOM_OUT;
         break;
     case eCursor_not_allowed:
         gdkcursor = gdk_cursor_new_from_name(defaultDisplay, "not-allowed");
         if (!gdkcursor) // nonstandard, yet common
             gdkcursor = gdk_cursor_new_from_name(defaultDisplay, "crossed_circle");
         if (!gdkcursor)
             newType = MOZ_CURSOR_NOT_ALLOWED;
         break;