Changeset 52309 in webkit
- Timestamp:
- Dec 18, 2009 6:01:19 AM (14 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r52308 r52309 1 2009-12-18 Philippe Normand <pnormand@igalia.com> 2 3 Reviewed by Xan Lopez. 4 5 [GTK] segfault during controls initialization if not GTK theme is present. 6 https://bugs.webkit.org/show_bug.cgi?id=32705 7 8 Create empty images for the controls if no GTK theme is set. 9 10 * platform/graphics/gtk/ImageGtk.cpp: 11 (WebCore::getThemeIconFileName): 12 (WebCore::loadImageFromFile): 13 1 14 2009-12-18 Alejandro G. Castro <alex@igalia.com> 2 15 -
trunk/WebCore/platform/graphics/gtk/ImageGtk.cpp
r52266 r52309 49 49 GtkIconInfo* iconInfo = gtk_icon_theme_lookup_icon(gtk_icon_theme_get_default(), 50 50 name, size, GTK_ICON_LOOKUP_NO_SVG); 51 // Try to fallback on MISSING_IMAGE. 51 52 if (!iconInfo) 52 53 iconInfo = gtk_icon_theme_lookup_icon(gtk_icon_theme_get_default(), 53 54 GTK_STOCK_MISSING_IMAGE, size, 54 55 GTK_ICON_LOOKUP_NO_SVG); 56 if (iconInfo) { 57 GOwnPtr<GtkIconInfo> info(iconInfo); 58 return CString(gtk_icon_info_get_filename(info.get())); 59 } 55 60 56 GOwnPtr<GtkIconInfo> info(iconInfo); 57 return CString(gtk_icon_info_get_filename(info.get())); 61 // No icon was found, this can happen if not GTK theme is set. In 62 // that case an empty Image will be created. 63 return CString(); 58 64 } 59 65 … … 79 85 { 80 86 RefPtr<BitmapImage> img = BitmapImage::create(); 81 RefPtr<SharedBuffer> buffer = loadResourceSharedBuffer(fileName); 82 img->setData(buffer.release(), true); 87 if (!fileName.isNull()) { 88 RefPtr<SharedBuffer> buffer = loadResourceSharedBuffer(fileName); 89 img->setData(buffer.release(), true); 90 } 83 91 return img.release(); 84 92 }
Note: See TracChangeset
for help on using the changeset viewer.