Changeset 65851 in webkit
- Timestamp:
- Aug 23, 2010 6:25:37 PM (14 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r65850 r65851 1 2010-08-23 Martin Robinson <mrobinson@igalia.com> 2 3 Reviewed by Gustavo Noronha Silva. 4 5 [GTK] The Mozilla theme drawing code incorrectly renders scrollbar backgrounds 6 https://bugs.webkit.org/show_bug.cgi?id=44388 7 8 No new tests as this functionality is currently unused. When the 9 the new scrollbar theme code lands for GTK+, this will be tested 10 by scrollbar pixel tests. 11 12 * platform/gtk/gtk2drawing.c: Expose a method to paint scrolled window 13 backgrounds and disable incorrect rendering of scrollbar trough backgrounds. 14 (moz_gtk_scrolled_window_paint): Added. 15 (moz_gtk_scrollbar_trough_paint): Disable incorrect background render. 16 * platform/gtk/gtkdrawing.h: Add scrolled window widget type in the enum. 17 1 18 2010-08-23 Martin Robinson <mrobinson@igalia.com> 2 19 -
trunk/WebCore/platform/gtk/gtk2drawing.c
r65850 r65851 1095 1095 1096 1096 static gint 1097 moz_gtk_scrolled_window_paint(GdkDrawable* drawable, GdkRectangle* rect, 1098 GdkRectangle* cliprect, GtkWidgetState* state) 1099 { 1100 GtkStateType state_type = ConvertGtkState(state); 1101 GtkShadowType shadow_type = (state->active) ? GTK_SHADOW_IN : GTK_SHADOW_OUT; 1102 GtkStyle* style; 1103 GtkAllocation allocation; 1104 GtkWidget* widget; 1105 1106 ensure_scrolled_window_widget(); 1107 widget = gParts->scrolledWindowWidget; 1108 1109 gtk_widget_get_allocation(widget, &allocation); 1110 allocation.x = rect->x; 1111 allocation.y = rect->y; 1112 allocation.width = rect->width; 1113 allocation.height = rect->height; 1114 gtk_widget_set_allocation(widget, &allocation); 1115 1116 style = gtk_widget_get_style(widget); 1117 TSOffsetStyleGCs(style, rect->x - 1, rect->y - 1); 1118 gtk_paint_box(style, drawable, state_type, shadow_type, cliprect, 1119 widget, "scrolled_window", rect->x - 1, rect->y - 1, 1120 rect->width + 2, rect->height + 2); 1121 return MOZ_GTK_SUCCESS; 1122 } 1123 1124 static gint 1097 1125 moz_gtk_scrollbar_button_paint(GdkDrawable* drawable, GdkRectangle* rect, 1098 1126 GdkRectangle* cliprect, GtkWidgetState* state, … … 1212 1240 1213 1241 TSOffsetStyleGCs(style, rect->x, rect->y); 1214 gtk_style_apply_default_background(style, drawable, TRUE, GTK_STATE_ACTIVE,1215 cliprect, rect->x, rect->y,1216 rect->width, rect->height);1217 1218 1242 gtk_paint_box(style, drawable, GTK_STATE_ACTIVE, GTK_SHADOW_IN, cliprect, 1219 1243 GTK_WIDGET(scrollbar), "trough", rect->x, rect->y, … … 3108 3132 cliprect, state, direction); 3109 3133 break; 3134 case MOZ_GTK_SCROLLED_WINDOW: 3135 return moz_gtk_scrolled_window_paint(drawable, rect, cliprect, state); 3136 break; 3110 3137 case MOZ_GTK_SCALE_HORIZONTAL: 3111 3138 case MOZ_GTK_SCALE_VERTICAL: -
trunk/WebCore/platform/gtk/gtkdrawing.h
r65850 r65851 182 182 MOZ_GTK_SCROLLBAR_THUMB_HORIZONTAL, 183 183 MOZ_GTK_SCROLLBAR_THUMB_VERTICAL, 184 /* Paints the background of a scrolled window */ 185 MOZ_GTK_SCROLLED_WINDOW, 184 186 /* Paints a GtkScale. */ 185 187 MOZ_GTK_SCALE_HORIZONTAL,
Note: See TracChangeset
for help on using the changeset viewer.