Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Unified Diff: webkit/glue/webcursor_gtk.cc

Issue 7791004: linux: delete code that worked around gtk <2.18 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « views/controls/menu/native_menu_gtk.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/webcursor_gtk.cc
diff --git a/webkit/glue/webcursor_gtk.cc b/webkit/glue/webcursor_gtk.cc
index c315b2ab7b0d584f4252ba9a0103bfd89f33c0c9..209e761b6cc99c54c029994715d4ae87b87a827a 100644
--- a/webkit/glue/webcursor_gtk.cc
+++ b/webkit/glue/webcursor_gtk.cc
@@ -44,23 +44,6 @@ GdkCursor* GetInlineCustomCursor(CustomCursorType type) {
return cursor;
}
-// For GTK 2.16 and beyond, GDK_BLANK_CURSOR is available. Before, we have to
-// use a custom cursor.
-#if !GTK_CHECK_VERSION(2, 16, 0)
-// Get/create a custom cursor which is invisible.
-GdkCursor* GetInvisibleCustomCursor() {
- static GdkCursor* cursor = NULL;
- if (cursor)
- return cursor;
- const char bits[] = { 0 };
- const GdkColor color = { 0, 0, 0, 0 };
- GdkPixmap* bitmap = gdk_bitmap_create_from_data(NULL, bits, 1, 1);
- cursor = gdk_cursor_new_from_pixmap(bitmap, bitmap, &color, &color, 0, 0);
- g_object_unref(bitmap);
- return cursor;
-}
-#endif
-
} // end anonymous namespace
int WebCursor::GetCursorType() const {
@@ -143,12 +126,7 @@ int WebCursor::GetCursorType() const {
case WebCursorInfo::TypeCopy:
NOTIMPLEMENTED(); return GDK_LAST_CURSOR;
case WebCursorInfo::TypeNone:
-// See comment above |GetInvisibleCustomCursor()|.
-#if !GTK_CHECK_VERSION(2, 16, 0)
- return GDK_CURSOR_IS_PIXMAP;
-#else
return GDK_BLANK_CURSOR;
-#endif
case WebCursorInfo::TypeNotAllowed:
NOTIMPLEMENTED(); return GDK_LAST_CURSOR;
case WebCursorInfo::TypeZoomIn:
@@ -171,11 +149,6 @@ gfx::NativeCursor WebCursor::GetNativeCursor() {
GdkCursor* WebCursor::GetCustomCursor() {
switch (type_) {
-// See comment above |GetInvisibleCustomCursor()|.
-#if !GTK_CHECK_VERSION(2, 16, 0)
- case WebCursorInfo::TypeNone:
- return GetInvisibleCustomCursor();
-#endif
case WebCursorInfo::TypeZoomIn:
return GetInlineCustomCursor(CustomCursorZoomIn);
case WebCursorInfo::TypeZoomOut:
« no previous file with comments | « views/controls/menu/native_menu_gtk.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698