diff options
author | Steve Block <steveblock@google.com> | 2010-09-29 17:32:26 +0100 |
---|---|---|
committer | Steve Block <steveblock@google.com> | 2010-09-29 17:35:08 +0100 |
commit | 68513a70bcd92384395513322f1b801e7bf9c729 (patch) | |
tree | 161b50f75a5921d61731bb25e730005994fcec85 /WebCore/platform/gtk/gtk2drawing.c | |
parent | fd5c6425ce58eb75211be7718d5dee960842a37e (diff) | |
download | external_webkit-68513a70bcd92384395513322f1b801e7bf9c729.zip external_webkit-68513a70bcd92384395513322f1b801e7bf9c729.tar.gz external_webkit-68513a70bcd92384395513322f1b801e7bf9c729.tar.bz2 |
Merge WebKit at r67908: Initial merge by Git
Change-Id: I43a553e7b3299b28cb6ee8aa035ed70fe342b972
Diffstat (limited to 'WebCore/platform/gtk/gtk2drawing.c')
-rw-r--r-- | WebCore/platform/gtk/gtk2drawing.c | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/WebCore/platform/gtk/gtk2drawing.c b/WebCore/platform/gtk/gtk2drawing.c index ba69cdc..fd770d2 100644 --- a/WebCore/platform/gtk/gtk2drawing.c +++ b/WebCore/platform/gtk/gtk2drawing.c @@ -1265,7 +1265,9 @@ moz_gtk_scrollbar_thumb_paint(GtkThemeWidgetType widget, GtkStyle* style; GtkScrollbar *scrollbar; GtkAdjustment *adj; +#ifdef GTK_API_VERSION_2 gboolean activate_slider; +#endif ensure_scrollbar_widget(); @@ -1317,6 +1319,7 @@ moz_gtk_scrollbar_thumb_paint(GtkThemeWidgetType widget, style = gtk_widget_get_style(GTK_WIDGET(scrollbar)); +#ifdef GTK_API_VERSION_2 gtk_widget_style_get(GTK_WIDGET(scrollbar), "activate-slider", &activate_slider, NULL); @@ -1324,6 +1327,7 @@ moz_gtk_scrollbar_thumb_paint(GtkThemeWidgetType widget, shadow_type = GTK_SHADOW_IN; state_type = GTK_STATE_ACTIVE; } +#endif TSOffsetStyleGCs(style, rect->x, rect->y); @@ -1812,7 +1816,11 @@ moz_gtk_combo_box_paint(GdkDrawable* drawable, GdkRectangle* rect, rect, &arrow_rect, direction, ishtml); /* Now arrow_rect contains the inner rect ; we want to correct the width * to what the arrow needs (see gtk_combo_box_size_allocate) */ +#ifdef GTK_API_VERSION_2 gtk_widget_size_request(gParts->comboBoxArrowWidget, &arrow_req); +#else + gtk_size_request_get_size(GTK_SIZE_REQUEST(gParts->comboBoxArrowWidget), &arrow_req, NULL); +#endif if (direction == GTK_TEXT_DIR_LTR) arrow_rect.x += arrow_rect.width - arrow_req.width; arrow_rect.width = arrow_req.width; @@ -2783,8 +2791,11 @@ moz_gtk_get_widget_border(GtkThemeWidgetType widget, gint* left, gint* top, XTHICKNESS(style); } +#ifdef GTK_API_VERSION_2 gtk_widget_size_request(gParts->comboBoxArrowWidget, &arrow_req); - +#else + gtk_size_request_get_size(GTK_SIZE_REQUEST(gParts->comboBoxArrowWidget), &arrow_req, NULL); +#endif if (direction == GTK_TEXT_DIR_RTL) *left += separator_width + arrow_req.width; else @@ -2948,7 +2959,12 @@ moz_gtk_get_combo_box_entry_button_size(gint* width, gint* height) GtkRequisition requisition; ensure_combo_box_entry_widgets(); +#ifdef GTK_API_VERSION_2 gtk_widget_size_request(gParts->comboBoxEntryButtonWidget, &requisition); +#else + gtk_size_request_get_size(GTK_SIZE_REQUEST(gParts->comboBoxEntryButtonWidget), &requisition, NULL); +#endif + *width = requisition.width; *height = requisition.height; @@ -2976,7 +2992,12 @@ moz_gtk_get_downarrow_size(gint* width, gint* height) GtkRequisition requisition; ensure_button_arrow_widget(); +#ifdef GTK_API_VERSION_2 gtk_widget_size_request(gParts->buttonArrowWidget, &requisition); +#else + gtk_size_request_get_size(GTK_SIZE_REQUEST(gParts->buttonArrowWidget), &requisition, NULL); +#endif + *width = requisition.width; *height = requisition.height; |