Changeset 62002 in webkit


Ignore:
Timestamp:
Jun 28, 2010 7:18:12 AM (14 years ago)
Author:
xan@webkit.org
Message:

2010-06-28 Xan Lopez <xlopez@igalia.com>

Reviewed by Gustavo Noronha.

[GTK] Does not compile with -DGSEAL_ENABLE
https://bugs.webkit.org/show_bug.cgi?id=37851

Add automake flag to signal whether we are building with GTK+ 2.x
or 3.x.

  • configure.ac:

WebCore:

2010-06-28 Xan Lopez <xlopez@igalia.com>

Reviewed by Gustavo Noronha.

[GTK] Does not compile with -DGSEAL_ENABLE
https://bugs.webkit.org/show_bug.cgi?id=37851

Fix build with GSEAL enabled.

  • GNUmakefile.am:
  • platform/gtk/GtkVersioning.h:
  • platform/gtk/RenderThemeGtk.cpp: (WebCore::paintMozillaGtkWidget): (WebCore::RenderThemeGtk::platformActiveSelectionBackgroundColor): (WebCore::RenderThemeGtk::platformInactiveSelectionBackgroundColor): (WebCore::RenderThemeGtk::platformActiveSelectionForegroundColor): (WebCore::RenderThemeGtk::platformInactiveSelectionForegroundColor): (WebCore::RenderThemeGtk::activeListBoxSelectionBackgroundColor): (WebCore::RenderThemeGtk::inactiveListBoxSelectionBackgroundColor): (WebCore::RenderThemeGtk::activeListBoxSelectionForegroundColor): (WebCore::RenderThemeGtk::inactiveListBoxSelectionForegroundColor): (WebCore::RenderThemeGtk::systemColor):
  • platform/gtk/ScrollViewGtk.cpp: (WebCore::ScrollView::platformRemoveChild): (WebCore::ScrollView::visibleContentRect):
  • platform/gtk/gtk2drawing.c: (ensure_toggle_button_widget): (ensure_combo_box_widgets): (ensure_combo_box_entry_widgets): (ensure_tree_header_cell_widget): (moz_gtk_button_paint): (moz_gtk_toggle_paint): (calculate_button_inner_rect): (calculate_arrow_rect): (moz_gtk_scrollbar_button_paint): (moz_gtk_scrollbar_trough_paint): (moz_gtk_scrollbar_thumb_paint): (moz_gtk_spin_paint): (moz_gtk_spin_updown_paint): (moz_gtk_scale_paint): (moz_gtk_scale_thumb_paint): (moz_gtk_gripper_paint): (moz_gtk_hpaned_paint): (moz_gtk_vpaned_paint): (moz_gtk_entry_paint): (moz_gtk_treeview_paint): (moz_gtk_tree_header_sort_arrow_paint): (moz_gtk_treeview_expander_paint): (moz_gtk_expander_paint): (moz_gtk_combo_box_paint): (moz_gtk_downarrow_paint): (moz_gtk_combo_box_entry_button_paint): (moz_gtk_container_paint): (moz_gtk_toggle_label_paint): (moz_gtk_toolbar_paint): (moz_gtk_toolbar_separator_paint): (moz_gtk_tooltip_paint): (moz_gtk_resizer_paint): (moz_gtk_frame_paint): (moz_gtk_progressbar_paint): (moz_gtk_progress_chunk_paint): (moz_gtk_get_tab_thickness): (moz_gtk_tab_paint): (moz_gtk_tabpanels_paint): (moz_gtk_tab_scroll_arrow_paint): (moz_gtk_menu_bar_paint): (moz_gtk_menu_popup_paint): (moz_gtk_menu_separator_paint): (moz_gtk_menu_item_paint): (moz_gtk_menu_arrow_paint):

WebKit/gtk:

2010-06-28 Xan Lopez <xlopez@igalia.com>

Reviewed by Gustavo Noronha.

[GTK] Does not compile with -DGSEAL_ENABLE
https://bugs.webkit.org/show_bug.cgi?id=37851

Fix build with GSEAL enabled.

  • WebCoreSupport/FrameLoaderClientGtk.cpp: (WebKit::FrameLoaderClient::transitionToCommittedForNewPage):
  • webkit/webkitsoupauthdialog.c: (show_auth_dialog):

WebKitTools:

2010-06-28 Xan Lopez <xlopez@igalia.com>

Reviewed by Gustavo Noronha.

[GTK] Does not compile with -DGSEAL_ENABLE
https://bugs.webkit.org/show_bug.cgi?id=37851

Fix build with GSEAL enabled.

  • DumpRenderTree/gtk/EventSender.cpp: (gtk_widget_get_window): (prepareMouseButtonEvent): (mouseMoveToCallback): (mouseWheelToCallback): (keyDownCallback):
Location:
trunk
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r62001 r62002  
     12010-06-28  Xan Lopez  <xlopez@igalia.com>
     2
     3        Reviewed by Gustavo Noronha.
     4
     5        [GTK] Does not compile with -DGSEAL_ENABLE
     6        https://bugs.webkit.org/show_bug.cgi?id=37851
     7
     8        Add automake flag to signal whether we are building with GTK+ 2.x
     9        or 3.x.
     10
     11        * configure.ac:
     12
    1132010-06-28  Xan Lopez  <xlopez@igalia.com>
    214
  • trunk/WebCore/ChangeLog

    r62001 r62002  
     12010-06-28  Xan Lopez  <xlopez@igalia.com>
     2
     3        Reviewed by Gustavo Noronha.
     4
     5        [GTK] Does not compile with -DGSEAL_ENABLE
     6        https://bugs.webkit.org/show_bug.cgi?id=37851
     7
     8        Fix build with GSEAL enabled.
     9
     10        * GNUmakefile.am:
     11        * platform/gtk/GtkVersioning.h:
     12        * platform/gtk/RenderThemeGtk.cpp:
     13        (WebCore::paintMozillaGtkWidget):
     14        (WebCore::RenderThemeGtk::platformActiveSelectionBackgroundColor):
     15        (WebCore::RenderThemeGtk::platformInactiveSelectionBackgroundColor):
     16        (WebCore::RenderThemeGtk::platformActiveSelectionForegroundColor):
     17        (WebCore::RenderThemeGtk::platformInactiveSelectionForegroundColor):
     18        (WebCore::RenderThemeGtk::activeListBoxSelectionBackgroundColor):
     19        (WebCore::RenderThemeGtk::inactiveListBoxSelectionBackgroundColor):
     20        (WebCore::RenderThemeGtk::activeListBoxSelectionForegroundColor):
     21        (WebCore::RenderThemeGtk::inactiveListBoxSelectionForegroundColor):
     22        (WebCore::RenderThemeGtk::systemColor):
     23        * platform/gtk/ScrollViewGtk.cpp:
     24        (WebCore::ScrollView::platformRemoveChild):
     25        (WebCore::ScrollView::visibleContentRect):
     26        * platform/gtk/gtk2drawing.c:
     27        (ensure_toggle_button_widget):
     28        (ensure_combo_box_widgets):
     29        (ensure_combo_box_entry_widgets):
     30        (ensure_tree_header_cell_widget):
     31        (moz_gtk_button_paint):
     32        (moz_gtk_toggle_paint):
     33        (calculate_button_inner_rect):
     34        (calculate_arrow_rect):
     35        (moz_gtk_scrollbar_button_paint):
     36        (moz_gtk_scrollbar_trough_paint):
     37        (moz_gtk_scrollbar_thumb_paint):
     38        (moz_gtk_spin_paint):
     39        (moz_gtk_spin_updown_paint):
     40        (moz_gtk_scale_paint):
     41        (moz_gtk_scale_thumb_paint):
     42        (moz_gtk_gripper_paint):
     43        (moz_gtk_hpaned_paint):
     44        (moz_gtk_vpaned_paint):
     45        (moz_gtk_entry_paint):
     46        (moz_gtk_treeview_paint):
     47        (moz_gtk_tree_header_sort_arrow_paint):
     48        (moz_gtk_treeview_expander_paint):
     49        (moz_gtk_expander_paint):
     50        (moz_gtk_combo_box_paint):
     51        (moz_gtk_downarrow_paint):
     52        (moz_gtk_combo_box_entry_button_paint):
     53        (moz_gtk_container_paint):
     54        (moz_gtk_toggle_label_paint):
     55        (moz_gtk_toolbar_paint):
     56        (moz_gtk_toolbar_separator_paint):
     57        (moz_gtk_tooltip_paint):
     58        (moz_gtk_resizer_paint):
     59        (moz_gtk_frame_paint):
     60        (moz_gtk_progressbar_paint):
     61        (moz_gtk_progress_chunk_paint):
     62        (moz_gtk_get_tab_thickness):
     63        (moz_gtk_tab_paint):
     64        (moz_gtk_tabpanels_paint):
     65        (moz_gtk_tab_scroll_arrow_paint):
     66        (moz_gtk_menu_bar_paint):
     67        (moz_gtk_menu_popup_paint):
     68        (moz_gtk_menu_separator_paint):
     69        (moz_gtk_menu_item_paint):
     70        (moz_gtk_menu_arrow_paint):
     71
    1722010-06-28  Xan Lopez  <xlopez@igalia.com>
    273
  • trunk/WebCore/GNUmakefile.am

    r62001 r62002  
    22612261
    22622262# ----
     2263# GTK+ 2.x/3.x support
     2264# ----
     2265
     2266if GTK_API_VERSION_2
     2267webcore_cppflags += \
     2268        -DGTK_API_VERSION_2=1
     2269endif
     2270
     2271# ----
    22632272# icu unicode backend
    22642273# ----
  • trunk/WebCore/platform/gtk/GtkVersioning.h

    r61798 r62002  
    3232#if !GTK_CHECK_VERSION(2, 20, 0)
    3333#define gtk_widget_set_realized(widget, TRUE) GTK_WIDGET_SET_FLAGS((widget), GTK_REALIZED)
     34#define gtk_range_get_min_slider_size(range) (range)->min_slider_size
    3435#endif // GTK_CHECK_VERSION(2, 20, 0)
    3536
     
    5253#define gtk_adjustment_get_value(adj) (adj)->value
    5354#define gtk_dialog_get_content_area(dialog) (dialog)->vbox
     55#define gtk_dialog_get_action_area(dialog) (dialog)->action_area
    5456#define gtk_selection_data_get_length(data) (data)->length
    5557#define gtk_selection_data_get_data(data) (data)->data
     58#define gtk_adjustment_set_page_size(adj, value) (adj)->page_size = value
    5659#endif // GTK_CHECK_VERSION(2, 14, 0)
    5760
  • trunk/WebCore/platform/gtk/RenderThemeGtk.cpp

    r61785 r62002  
    339339        // backed by a GdkDrawable. In those situations, we render onto a pixmap and then
    340340        // copy the rendered data back to the GraphicsContext via Cairo.
    341         drawable = adoptGRef(gdk_pixmap_new(0, rect.width(), rect.height(), gdk_visual_get_system()->depth));
     341        drawable = adoptGRef(gdk_pixmap_new(0, rect.width(), rect.height(), gdk_visual_get_depth(gdk_visual_get_system())));
    342342        paintRect = clipRect = IntRect(0, 0, rect.width(), rect.height());
    343343    }
     
    581581{
    582582    GtkWidget* widget = gtkEntry();
    583     return widget->style->base[GTK_STATE_SELECTED];
     583    return gtk_widget_get_style(widget)->base[GTK_STATE_SELECTED];
    584584}
    585585
     
    587587{
    588588    GtkWidget* widget = gtkEntry();
    589     return widget->style->base[GTK_STATE_ACTIVE];
     589    return gtk_widget_get_style(widget)->base[GTK_STATE_ACTIVE];
    590590}
    591591
     
    593593{
    594594    GtkWidget* widget = gtkEntry();
    595     return widget->style->text[GTK_STATE_SELECTED];
     595    return gtk_widget_get_style(widget)->text[GTK_STATE_SELECTED];
    596596}
    597597
     
    599599{
    600600    GtkWidget* widget = gtkEntry();
    601     return widget->style->text[GTK_STATE_ACTIVE];
     601    return gtk_widget_get_style(widget)->text[GTK_STATE_ACTIVE];
    602602}
    603603
     
    605605{
    606606    GtkWidget* widget = gtkTreeView();
    607     return widget->style->base[GTK_STATE_SELECTED];
     607    return gtk_widget_get_style(widget)->base[GTK_STATE_SELECTED];
    608608}
    609609
     
    611611{
    612612    GtkWidget* widget = gtkTreeView();
    613     return widget->style->base[GTK_STATE_ACTIVE];
     613    return gtk_widget_get_style(widget)->base[GTK_STATE_ACTIVE];
    614614}
    615615
     
    617617{
    618618    GtkWidget* widget = gtkTreeView();
    619     return widget->style->text[GTK_STATE_SELECTED];
     619    return gtk_widget_get_style(widget)->text[GTK_STATE_SELECTED];
    620620}
    621621
     
    623623{
    624624    GtkWidget* widget = gtkTreeView();
    625     return widget->style->text[GTK_STATE_ACTIVE];
     625    return gtk_widget_get_style(widget)->text[GTK_STATE_ACTIVE];
    626626}
    627627
     
    651651    switch (cssValueId) {
    652652    case CSSValueButtontext:
    653         return Color(gtkButton()->style->fg[GTK_STATE_NORMAL]);
     653        return Color(gtk_widget_get_style(gtkButton())->fg[GTK_STATE_NORMAL]);
    654654    case CSSValueCaptiontext:
    655         return Color(gtkEntry()->style->fg[GTK_STATE_NORMAL]);
     655        return Color(gtk_widget_get_style(gtkEntry())->fg[GTK_STATE_NORMAL]);
    656656    default:
    657657        return RenderTheme::systemColor(cssValueId);
  • trunk/WebCore/platform/gtk/ScrollViewGtk.cpp

    r58946 r62002  
    170170        parent = GTK_WIDGET(hostWindow()->platformPageClient());
    171171    else
    172         parent = GTK_WIDGET(child->platformWidget()->parent);
    173 
    174     if (GTK_IS_CONTAINER(parent) && parent == child->platformWidget()->parent)
     172        parent = GTK_WIDGET(gtk_widget_get_parent(child->platformWidget()));
     173
     174    if (GTK_IS_CONTAINER(parent) && parent == gtk_widget_get_parent(child->platformWidget()))
    175175        gtk_container_remove(GTK_CONTAINER(parent), child->platformWidget());
    176176}
     
    192192        measuredWidget = parent;
    193193
     194    GtkAllocation allocation;
     195#if GTK_CHECK_VERSION(2, 18, 0)
     196    gtk_widget_get_allocation(measuredWidget, &allocation);
     197#else
     198    allocation = widget->allocation;
     199#endif
    194200    return IntRect(IntPoint(m_scrollOffset.width(), m_scrollOffset.height()),
    195                    IntSize(measuredWidget->allocation.width,
    196                            measuredWidget->allocation.height));
     201                   IntSize(allocation.width, allocation.height));
    197202}
    198203
  • trunk/WebCore/platform/gtk/gtk2drawing.c

    r53372 r62002  
    4949
    5050#include "Assertions.h"
     51#include "GtkVersioning.h"
    5152
    5253#include <math.h>
     
    151152        setup_widget_prototype(gParts->toggleButtonWidget);
    152153        /* toggle button must be set active to get the right style on hover. */
    153         GTK_TOGGLE_BUTTON(gParts->toggleButtonWidget)->active = TRUE;
     154        gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(gParts->toggleButtonWidget), TRUE);
    154155  }
    155156  return MOZ_GTK_SUCCESS;
     
    298299    if (gParts->comboBoxButtonWidget) {
    299300        /* Get the widgets inside the Button */
    300         buttonChild = GTK_BIN(gParts->comboBoxButtonWidget)->child;
     301        buttonChild = gtk_bin_get_child(GTK_BIN(gParts->comboBoxButtonWidget));
    301302        if (GTK_IS_HBOX(buttonChild)) {
    302303            /* appears-as-list = FALSE, cell-view = TRUE; the button
     
    408409    if (gParts->comboBoxEntryButtonWidget) {
    409410        /* Get the Arrow inside the Button */
    410         buttonChild = GTK_BIN(gParts->comboBoxEntryButtonWidget)->child;
     411        buttonChild = gtk_bin_get_child(GTK_BIN(gParts->comboBoxEntryButtonWidget));
    411412        if (GTK_IS_HBOX(buttonChild)) {
    412413            /* appears-as-list = FALSE, cell-view = TRUE; the button
     
    683684        gtk_tree_view_append_column(GTK_TREE_VIEW(gParts->treeViewWidget), lastTreeViewColumn);
    684685
     686#ifdef GTK_API_VERSION_2
    685687        /* Use the middle column's header for our button */
    686688        gParts->treeHeaderCellWidget = gParts->middleTreeViewColumn->button;
    687689        gParts->treeHeaderSortArrowWidget = gParts->middleTreeViewColumn->arrow;
     690#else
     691        gParts->treeHeaderCellWidget = gtk_button_new();
     692        gParts->treeHeaderSortArrowWidget = gtk_arrow_new(GTK_ARROW_DOWN, GTK_SHADOW_NONE);
     693#endif
    688694        g_object_set_data(G_OBJECT(gParts->treeHeaderCellWidget),
    689695                          "transparent-bg-hint", GINT_TO_POINTER(TRUE));
     
    759765{
    760766    GtkShadowType shadow_type;
    761     GtkStyle* style = widget->style;
     767    GtkStyle* style = gtk_widget_get_style(widget);
    762768    GtkStateType button_state = ConvertGtkState(state);
    763769    gint x = rect->x, y=rect->y, width=rect->width, height=rect->height;
     
    777783    gtk_widget_set_direction(widget, direction);
    778784
     785#ifdef GTK_API_VERSION_2
    779786    if (state->isDefault)
    780787        GTK_WIDGET_SET_FLAGS(widget, GTK_HAS_DEFAULT);
    781 
    782     GTK_BUTTON(widget)->relief = relief;
     788#endif
     789
     790    gtk_button_set_relief(GTK_BUTTON(widget), relief);
    783791
    784792    /* Some theme engines love to cause us pain in that gtk_paint_focus is a
    785793       no-op on buttons and button-like widgets. They only listen to this flag. */
     794#ifdef GTK_API_VERSION_2
    786795    if (state->focused && !state->disabled)
    787796        GTK_WIDGET_SET_FLAGS(widget, GTK_HAS_FOCUS);
     797#endif
    788798
    789799    if (!interior_focus && state->focused) {
     
    815825    if (state->focused) {
    816826        if (interior_focus) {
    817             x += widget->style->xthickness + focus_pad;
    818             y += widget->style->ythickness + focus_pad;
    819             width -= 2 * (widget->style->xthickness + focus_pad);
    820             height -= 2 * (widget->style->ythickness + focus_pad);
     827            GtkStyle* style = gtk_widget_get_style(widget);
     828            x += style->xthickness + focus_pad;
     829            y += style->ythickness + focus_pad;
     830            width -= 2 * (style->xthickness + focus_pad);
     831            height -= 2 * (style->ythickness + focus_pad);
    821832        } else {
    822833            x -= focus_width + focus_pad;
     
    831842    }
    832843
     844#ifdef GTK_API_VERSION_2
    833845    GTK_WIDGET_UNSET_FLAGS(widget, GTK_HAS_DEFAULT);
    834846    GTK_WIDGET_UNSET_FLAGS(widget, GTK_HAS_FOCUS);
     847#endif
    835848    return MOZ_GTK_SUCCESS;
    836849}
     
    971984    focus_height = height + 2 * indicator_spacing;
    972985 
    973     style = w->style;
     986    style = gtk_widget_get_style(w);
    974987    TSOffsetStyleGCs(style, x, y);
    975988
    976989    gtk_widget_set_sensitive(w, !state->disabled);
    977990    gtk_widget_set_direction(w, direction);
    978     GTK_TOGGLE_BUTTON(w)->active = selected;
     991    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(w), selected);
    979992     
    980993    if (isradio) {
     
    10231036    GtkStyle* style;
    10241037
    1025     style = button->style;
     1038    style = gtk_widget_get_style(button);
    10261039
    10271040    /* This mirrors gtkbutton's child positioning */
     
    10561069    gint extent;
    10571070    GtkMisc* misc = GTK_MISC(arrow);
     1071    gfloat misc_xalign, misc_yalign;
     1072    gint misc_xpad, misc_ypad;
    10581073
    10591074    if (have_arrow_scaling)
    10601075        gtk_widget_style_get(arrow, "arrow_scaling", &arrow_scaling, NULL);
    10611076
    1062     extent = MIN((rect->width - misc->xpad * 2),
    1063                  (rect->height - misc->ypad * 2)) * arrow_scaling;
    1064 
    1065     xalign = direction == GTK_TEXT_DIR_LTR ? misc->xalign : 1.0 - misc->xalign;
    1066     xpad = misc->xpad + (rect->width - extent) * xalign;
     1077    gtk_misc_get_padding(misc, &misc_xpad, &misc_ypad);
     1078    gtk_misc_get_alignment(misc, &misc_xalign, &misc_yalign);
     1079
     1080    extent = MIN((rect->width - misc_xpad * 2),
     1081                 (rect->height - misc_ypad * 2)) * arrow_scaling;
     1082
     1083    xalign = direction == GTK_TEXT_DIR_LTR ? misc_xalign : 1.0 - misc_xalign;
     1084    xpad = misc_xpad + (rect->width - extent) * xalign;
    10671085
    10681086    arrow_rect->x = direction == GTK_TEXT_DIR_LTR ?
    10691087                        floor(rect->x + xpad) : ceil(rect->x + xpad);
    1070     arrow_rect->y = floor(rect->y + misc->ypad +
    1071                           ((rect->height - extent) * misc->yalign));
     1088    arrow_rect->y = floor(rect->y + misc_ypad +
     1089                          ((rect->height - extent) * misc_yalign));
    10721090
    10731091    arrow_rect->width = arrow_rect->height = extent;
     
    10881106    GtkStyle* style;
    10891107    GtkWidget *scrollbar;
     1108    GtkAllocation allocation;
    10901109    GtkArrowType arrow_type;
    10911110    gint arrow_displacement_x, arrow_displacement_y;
     
    11061125       We need to trick them into drawing the buttons the way we want them. */
    11071126
    1108     scrollbar->allocation.x = rect->x;
    1109     scrollbar->allocation.y = rect->y;
    1110     scrollbar->allocation.width = rect->width;
    1111     scrollbar->allocation.height = rect->height;
     1127#if GTK_CHECK_VERSION(2, 18, 0)
     1128    gtk_widget_get_allocation(scrollbar, &allocation);
     1129#else
     1130    allocation = scrollbar->allocation;
     1131#endif
     1132    allocation.x = rect->x;
     1133    allocation.y = rect->y;
     1134    allocation.width = rect->width;
     1135    allocation.height = rect->height;
    11121136
    11131137    if (flags & MOZ_GTK_STEPPER_VERTICAL) {
    1114         scrollbar->allocation.height *= 5;
     1138        allocation.height *= 5;
    11151139        if (flags & MOZ_GTK_STEPPER_DOWN) {
    11161140            arrow_type = GTK_ARROW_DOWN;
    11171141            if (flags & MOZ_GTK_STEPPER_BOTTOM)
    1118                 scrollbar->allocation.y -= 4 * rect->height;
     1142                allocation.y -= 4 * rect->height;
    11191143            else
    1120                 scrollbar->allocation.y -= rect->height;
     1144                allocation.y -= rect->height;
    11211145
    11221146        } else {
    11231147            arrow_type = GTK_ARROW_UP;
    11241148            if (flags & MOZ_GTK_STEPPER_BOTTOM)
    1125                 scrollbar->allocation.y -= 3 * rect->height;
     1149                allocation.y -= 3 * rect->height;
    11261150        }
    11271151    } else {
    1128         scrollbar->allocation.width *= 5;
     1152        allocation.width *= 5;
    11291153        if (flags & MOZ_GTK_STEPPER_DOWN) {
    11301154            arrow_type = GTK_ARROW_RIGHT;
    11311155            if (flags & MOZ_GTK_STEPPER_BOTTOM)
    1132                 scrollbar->allocation.x -= 4 * rect->width;
     1156                allocation.x -= 4 * rect->width;
    11331157            else
    1134                 scrollbar->allocation.x -= rect->width;
     1158                allocation.x -= rect->width;
    11351159        } else {
    11361160            arrow_type = GTK_ARROW_LEFT;
    11371161            if (flags & MOZ_GTK_STEPPER_BOTTOM)
    1138                 scrollbar->allocation.x -= 3 * rect->width;
     1162                allocation.x -= 3 * rect->width;
    11391163        }
    11401164    }
    11411165
    1142     style = scrollbar->style;
     1166    style = gtk_widget_get_style(scrollbar);
    11431167
    11441168    TSOffsetStyleGCs(style, rect->x, rect->y);
     
    11881212    gtk_widget_set_direction(GTK_WIDGET(scrollbar), direction);
    11891213
    1190     style = GTK_WIDGET(scrollbar)->style;
     1214    style = gtk_widget_get_style(GTK_WIDGET(scrollbar));
    11911215
    11921216    TSOffsetStyleGCs(style, rect->x, rect->y);
     
    12471271        cliprect->x -= 1;
    12481272        cliprect->width += 2;
    1249         adj->page_size = rect->width;
     1273        gtk_adjustment_set_page_size(adj, rect->width);
    12501274    }
    12511275    else {
    12521276        cliprect->y -= 1;
    12531277        cliprect->height += 2;
    1254         adj->page_size = rect->height;
    1255     }
    1256 
     1278        gtk_adjustment_set_page_size(adj, rect->height);
     1279    }
     1280
     1281#if GTK_CHECK_VERSION(2, 14, 0)
     1282    gtk_adjustment_configure(adj,
     1283                             state->curpos,
     1284                             0,
     1285                             state->maxpos,
     1286                             gtk_adjustment_get_step_increment(adj),
     1287                             gtk_adjustment_get_page_increment(adj),
     1288                             gtk_adjustment_get_page_size(adj));
     1289#else
    12571290    adj->lower = 0;
    12581291    adj->value = state->curpos;
    12591292    adj->upper = state->maxpos;
    12601293    gtk_adjustment_changed(adj);
    1261 
    1262     style = GTK_WIDGET(scrollbar)->style;
     1294#endif
     1295
     1296    style = gtk_widget_get_style(GTK_WIDGET(scrollbar));
    12631297   
    12641298    gtk_widget_style_get(GTK_WIDGET(scrollbar), "activate-slider",
     
    12891323    ensure_spin_widget();
    12901324    gtk_widget_set_direction(gParts->spinWidget, direction);
    1291     style = gParts->spinWidget->style;
     1325    style = gtk_widget_get_style(gParts->spinWidget);
    12921326
    12931327    TSOffsetStyleGCs(style, rect->x, rect->y);
     
    13101344
    13111345    ensure_spin_widget();
    1312     style = gParts->spinWidget->style;
     1346    style = gtk_widget_get_style(gParts->spinWidget);
    13131347    gtk_widget_set_direction(gParts->spinWidget, direction);
    13141348
     
    13481382  gtk_widget_set_direction(widget, direction);
    13491383
    1350   style = widget->style;
     1384  style = gtk_widget_get_style(widget);
    13511385
    13521386  if (flags == GTK_ORIENTATION_HORIZONTAL) {
     
    13891423  gtk_widget_set_direction(widget, direction);
    13901424
    1391   style = widget->style;
     1425  style = gtk_widget_get_style(widget);
    13921426
    13931427  /* determine the thumb size, and position the thumb in the center in the opposite axis */
     
    14231457    gtk_widget_set_direction(gParts->handleBoxWidget, direction);
    14241458
    1425     style = gParts->handleBoxWidget->style;
    1426     shadow_type = GTK_HANDLE_BOX(gParts->handleBoxWidget)->shadow_type;
     1459    style = gtk_widget_get_style(gParts->handleBoxWidget);
     1460    shadow_type = gtk_handle_box_get_shadow_type(GTK_HANDLE_BOX(gParts->handleBoxWidget));
    14271461
    14281462    TSOffsetStyleGCs(style, rect->x, rect->y);
     
    14411475
    14421476    ensure_hpaned_widget();
    1443     gtk_paint_handle(gParts->hpanedWidget->style, drawable, hpaned_state,
     1477    gtk_paint_handle(gtk_widget_get_style(gParts->hpanedWidget), drawable, hpaned_state,
    14441478                     GTK_SHADOW_NONE, cliprect, gParts->hpanedWidget, "paned",
    14451479                     rect->x, rect->y, rect->width, rect->height,
     
    14561490
    14571491    ensure_vpaned_widget();
    1458     gtk_paint_handle(gParts->vpanedWidget->style, drawable, vpaned_state,
     1492    gtk_paint_handle(gtk_widget_get_style(gParts->vpanedWidget), drawable, vpaned_state,
    14591493                     GTK_SHADOW_NONE, cliprect, gParts->vpanedWidget, "paned",
    14601494                     rect->x, rect->y, rect->width, rect->height,
     
    14961530    gtk_widget_set_direction(widget, direction);
    14971531
    1498     style = widget->style;
     1532    style = gtk_widget_get_style(widget);
    14991533
    15001534    gtk_widget_style_get(widget,
     
    15521586        /* This will get us the lit borders that focused textboxes enjoy on
    15531587         * some themes. */
     1588#ifdef GTK_API_VERSION_2
    15541589        GTK_WIDGET_SET_FLAGS(widget, GTK_HAS_FOCUS);
     1590#endif
    15551591
    15561592        if (!interior_focus) {
     
    15761612        /* Now unset the focus flag. We don't want other entries to look
    15771613         * like they're focused too! */
     1614#ifdef GTK_API_VERSION_2
    15781615        GTK_WIDGET_UNSET_FLAGS(widget, GTK_HAS_FOCUS);
     1616#endif
    15791617    }
    15801618
     
    15891627    gint xthickness, ythickness;
    15901628
    1591     GtkStyle *style;
     1629    GtkStyle *style, *treeview_style;
    15921630    GtkStateType state_type;
    15931631
     
    16061644     * If we don't set it here the background color will not be correct.*/
    16071645    gtk_widget_modify_bg(gParts->treeViewWidget, state_type,
    1608                          &gParts->treeViewWidget->style->base[state_type]);
    1609 
    1610     style = gParts->scrolledWindowWidget->style;
     1646                         &gtk_widget_get_style(gParts->treeViewWidget)->base[state_type]);
     1647
     1648    style = gtk_widget_get_style(gParts->scrolledWindowWidget);
    16111649    xthickness = XTHICKNESS(style);
    16121650    ythickness = YTHICKNESS(style);
    16131651
    1614     TSOffsetStyleGCs(gParts->treeViewWidget->style, rect->x, rect->y);
     1652    treeview_style = gtk_widget_get_style(gParts->treeViewWidget);
     1653    TSOffsetStyleGCs(treeview_style, rect->x, rect->y);
    16151654    TSOffsetStyleGCs(style, rect->x, rect->y);
    16161655
    1617     gtk_paint_flat_box(gParts->treeViewWidget->style, drawable, state_type,
     1656    gtk_paint_flat_box(treeview_style, drawable, state_type,
    16181657                       GTK_SHADOW_NONE, cliprect, gParts->treeViewWidget, "treeview",
    16191658                       rect->x + xthickness, rect->y + ythickness,
     
    16621701    arrow_rect.y = rect->y + (rect->height - arrow_rect.height) / 2;
    16631702
    1664     style = gParts->treeHeaderSortArrowWidget->style;
     1703    style = gtk_widget_get_style(gParts->treeHeaderSortArrowWidget);
    16651704    TSOffsetStyleGCs(style, arrow_rect.x, arrow_rect.y);
    16661705
     
    16851724    gtk_widget_set_direction(gParts->treeViewWidget, direction);
    16861725
    1687     style = gParts->treeViewWidget->style;
     1726    style = gtk_widget_get_style(gParts->treeViewWidget);
    16881727
    16891728    /* Because the frame we get is of the entire treeview, we can't get the precise
     
    17101749    gtk_widget_set_direction(gParts->expanderWidget, direction);
    17111750
    1712     style = gParts->expanderWidget->style;
     1751    style = gtk_widget_get_style(gParts->expanderWidget);
    17131752
    17141753    TSOffsetStyleGCs(style, rect->x, rect->y);
     
    17511790                         &arrow_rect, &real_arrow_rect, direction);
    17521791
    1753     style = gParts->comboBoxArrowWidget->style;
     1792    style = gtk_widget_get_style(gParts->comboBoxArrowWidget);
    17541793    TSOffsetStyleGCs(style, rect->x, rect->y);
    17551794
     
    17661805        return MOZ_GTK_SUCCESS;
    17671806
    1768     style = gParts->comboBoxSeparatorWidget->style;
     1807    style = gtk_widget_get_style(gParts->comboBoxSeparatorWidget);
    17691808    TSOffsetStyleGCs(style, rect->x, rect->y);
    17701809
     
    18101849
    18111850    ensure_button_arrow_widget();
    1812     style = gParts->buttonArrowWidget->style;
     1851    style = gtk_widget_get_style(gParts->buttonArrowWidget);
    18131852
    18141853    calculate_arrow_rect(gParts->buttonArrowWidget, rect, &arrow_rect,
     
    18411880        /* Some themes draw a complementary focus ring for the dropdown button
    18421881         * when the dropdown entry has focus */
     1882#ifdef GTK_API_VERSION_2
    18431883        GTK_WIDGET_SET_FLAGS(gParts->comboBoxEntryTextareaWidget, GTK_HAS_FOCUS);
     1884#endif
    18441885    }
    18451886
     
    18471888                         gParts->comboBoxEntryButtonWidget, direction);
    18481889
     1890#ifdef GTK_API_VERSION_2
    18491891    if (input_focus)
    18501892        GTK_WIDGET_UNSET_FLAGS(gParts->comboBoxEntryTextareaWidget, GTK_HAS_FOCUS);
     1893#endif
    18511894
    18521895    calculate_button_inner_rect(gParts->comboBoxEntryButtonWidget,
     
    18641907                         &arrow_rect, &real_arrow_rect, direction);
    18651908
    1866     style = gParts->comboBoxEntryArrowWidget->style;
     1909    style = gtk_widget_get_style(gParts->comboBoxEntryArrowWidget);
    18671910    TSOffsetStyleGCs(style, real_arrow_rect.x, real_arrow_rect.y);
    18681911
     
    18951938    gtk_widget_set_direction(widget, direction);
    18961939
    1897     style = widget->style;
     1940    style = gtk_widget_get_style(widget);
    18981941    moz_gtk_widget_get_focus(widget, &interior_focus, &focus_width,
    18991942                             &focus_pad);
     
    19521995    state_type = ConvertGtkState(state);
    19531996
    1954     style = widget->style;
     1997    style = gtk_widget_get_style(widget);
    19551998    TSOffsetStyleGCs(style, rect->x, rect->y);
    19561999
     
    19732016    gtk_widget_set_direction(gParts->toolbarWidget, direction);
    19742017
    1975     style = gParts->toolbarWidget->style;
     2018    style = gtk_widget_get_style(gParts->toolbarWidget);
    19762019
    19772020    TSOffsetStyleGCs(style, rect->x, rect->y);
     
    20082051    gtk_widget_set_direction(gParts->toolbarSeparatorWidget, direction);
    20092052
    2010     style = gParts->toolbarSeparatorWidget->style;
     2053    style = gtk_widget_get_style(gParts->toolbarSeparatorWidget);
    20112054
    20122055    gtk_widget_style_get(gParts->toolbarWidget,
     
    20592102                                      GTK_TYPE_WINDOW);
    20602103
    2061     style = gtk_style_attach(style, gParts->tooltipWidget->window);
     2104    style = gtk_style_attach(style, gtk_widget_get_window(gParts->tooltipWidget));
    20622105    TSOffsetStyleGCs(style, rect->x, rect->y);
    20632106    gtk_paint_flat_box(style, drawable, GTK_STATE_NORMAL, GTK_SHADOW_OUT,
     
    20792122    gtk_widget_set_direction(gParts->protoWindow, direction);
    20802123
    2081     style = gParts->protoWindow->style;
     2124    style = gtk_widget_get_style(gParts->protoWindow);
    20822125
    20832126    TSOffsetStyleGCs(style, rect->x, rect->y);
     
    21012144    gtk_widget_set_direction(gParts->frameWidget, direction);
    21022145
    2103     style = gParts->frameWidget->style;
     2146    style = gtk_widget_get_style(gParts->frameWidget);
    21042147
    21052148    gtk_widget_style_get(gParts->statusbarWidget, "shadow-type", &shadow_type, NULL);
     
    21222165    gtk_widget_set_direction(gParts->progresWidget, direction);
    21232166
    2124     style = gParts->progresWidget->style;
     2167    style = gtk_widget_get_style(gParts->progresWidget);
    21252168
    21262169    TSOffsetStyleGCs(style, rect->x, rect->y);
     
    21412184    gtk_widget_set_direction(gParts->progresWidget, direction);
    21422185
    2143     style = gParts->progresWidget->style;
     2186    style = gtk_widget_get_style(gParts->progresWidget);
    21442187
    21452188    TSOffsetStyleGCs(style, rect->x, rect->y);
     
    21542197moz_gtk_get_tab_thickness(void)
    21552198{
     2199    GtkStyle* style;
     2200
    21562201    ensure_tab_widget();
    2157     if (YTHICKNESS(gParts->tabWidget->style) < 2)
     2202    style = gtk_widget_get_style(gParts->tabWidget);
     2203    if (YTHICKNESS(style) < 2)
    21582204        return 2; /* some themes don't set ythickness correctly */
    21592205
    2160     return YTHICKNESS(gParts->tabWidget->style);
     2206    return YTHICKNESS(style);
    21612207}
    21622208
     
    21762222    gtk_widget_set_direction(gParts->tabWidget, direction);
    21772223
    2178     style = gParts->tabWidget->style;
     2224    style = gtk_widget_get_style(gParts->tabWidget);
    21792225    TSOffsetStyleGCs(style, rect->x, rect->y);
    21802226
     
    23132359    gtk_widget_set_direction(gParts->tabWidget, direction);
    23142360
    2315     style = gParts->tabWidget->style;
     2361    style = gtk_widget_get_style(gParts->tabWidget);
    23162362
    23172363    TSOffsetStyleGCs(style, rect->x, rect->y);
     
    23392385    ensure_tab_widget();
    23402386
    2341     style = gParts->tabWidget->style;
     2387    style = gtk_widget_get_style(gParts->tabWidget);
    23422388    TSOffsetStyleGCs(style, rect->x, rect->y);
    23432389
     
    23652411    gtk_widget_style_get(gParts->menuBarWidget, "shadow-type", &shadow_type, NULL);
    23662412
    2367     style = gParts->menuBarWidget->style;
     2413    style = gtk_widget_get_style(gParts->menuBarWidget);
    23682414
    23692415    TSOffsetStyleGCs(style, rect->x, rect->y);
     
    23862432    gtk_widget_set_direction(gParts->menuPopupWidget, direction);
    23872433
    2388     style = gParts->menuPopupWidget->style;
     2434    style = gtk_widget_get_style(gParts->menuPopupWidget);
    23892435
    23902436    TSOffsetStyleGCs(style, rect->x, rect->y);
     
    24122458    gtk_widget_set_direction(gParts->menuSeparatorWidget, direction);
    24132459
    2414     style = gParts->menuSeparatorWidget->style;
     2460    style = gtk_widget_get_style(gParts->menuSeparatorWidget);
    24152461
    24162462    gtk_widget_style_get(gParts->menuSeparatorWidget,
     
    24682514        gtk_widget_set_direction(item_widget, direction);
    24692515       
    2470         style = item_widget->style;
     2516        style = gtk_widget_get_style(item_widget);
    24712517        TSOffsetStyleGCs(style, rect->x, rect->y);
    24722518
     
    24932539    gtk_widget_set_direction(gParts->menuItemWidget, direction);
    24942540
    2495     style = gParts->menuItemWidget->style;
     2541    style = gtk_widget_get_style(gParts->menuItemWidget);
    24962542
    24972543    TSOffsetStyleGCs(style, rect->x, rect->y);
     
    25272573                          NULL);
    25282574
     2575#ifdef GTK_API_VERSION_2
    25292576    if (checked || GTK_CHECK_MENU_ITEM(gParts->checkMenuItemWidget)->always_show_toggle) {
    2530       style = gParts->checkMenuItemWidget->style;
    2531 
    2532       offset = GTK_CONTAINER(gParts->checkMenuItemWidget)->border_width +
    2533              gParts->checkMenuItemWidget->style->xthickness + 2;
     2577#else
     2578    if (checked || FALSE) {
     2579#endif
     2580      style = gtk_widget_get_style(gParts->checkMenuItemWidget);
     2581
     2582      offset = gtk_container_get_border_width(GTK_CONTAINER(gParts->checkMenuItemWidget)) + style->xthickness + 2;
    25342583
    25352584      /* while normally this "3" would be the horizontal-padding style value, passing it to Gecko
     
    25672616    gtk_widget_set_direction(gParts->protoWindow, direction);
    25682617
    2569     style = gParts->protoWindow->style;
     2618    style = gtk_widget_get_style(gParts->protoWindow);
    25702619
    25712620    TSOffsetStyleGCs(style, rect->x, rect->y);
     
    25832632{
    25842633    GtkWidget* w;
     2634    GtkStyle *style;
    25852635
    25862636    switch (widget) {
     
    25902640            gboolean interior_focus;
    25912641            gint focus_width, focus_pad;
     2642            GtkStyle *style;
    25922643
    25932644            ensure_button_widget();
    2594             *left = *top = *right = *bottom = GTK_CONTAINER(gParts->buttonWidget)->border_width;
     2645            *left = *top = *right = *bottom = gtk_container_get_border_width(GTK_CONTAINER(gParts->buttonWidget));
    25952646
    25962647            /* Don't add this padding in HTML, otherwise the buttons will
     
    26052656            }
    26062657
    2607             *left += gParts->buttonWidget->style->xthickness;
    2608             *right += gParts->buttonWidget->style->xthickness;
    2609             *top += gParts->buttonWidget->style->ythickness;
    2610             *bottom += gParts->buttonWidget->style->ythickness;
     2658            style = gtk_widget_get_style(gParts->buttonWidget);
     2659            *left += style->xthickness;
     2660            *right += style->xthickness;
     2661            *top += style->ythickness;
     2662            *bottom += style->ythickness;
    26112663            return MOZ_GTK_SUCCESS;
    26122664        }
     
    26302682            gboolean interior_focus;
    26312683            gint focus_width, focus_pad;
     2684            GtkStyle* style;
    26322685
    26332686            ensure_tree_header_cell_widget();
    2634             *left = *top = *right = *bottom = GTK_CONTAINER(gParts->treeHeaderCellWidget)->border_width;
     2687            *left = *top = *right = *bottom = gtk_container_get_border_width(GTK_CONTAINER(gParts->treeHeaderCellWidget));
    26352688
    26362689            moz_gtk_widget_get_focus(gParts->treeHeaderCellWidget, &interior_focus, &focus_width, &focus_pad);
     
    26412694            *bottom += focus_width + focus_pad + inner_border.bottom;
    26422695           
    2643             *left += gParts->treeHeaderCellWidget->style->xthickness;
    2644             *right += gParts->treeHeaderCellWidget->style->xthickness;
    2645             *top += gParts->treeHeaderCellWidget->style->ythickness;
    2646             *bottom += gParts->treeHeaderCellWidget->style->ythickness;
     2696            style = gtk_widget_get_style(gParts->treeHeaderCellWidget);
     2697            *left += style->xthickness;
     2698            *right += style->xthickness;
     2699            *top += style->ythickness;
     2700            *bottom += style->ythickness;
    26472701            return MOZ_GTK_SUCCESS;
    26482702        }
     
    26672721            gint focus_width, focus_pad, separator_width;
    26682722            GtkRequisition arrow_req;
     2723            GtkStyle* style;
    26692724
    26702725            ensure_combo_box_widgets();
    26712726
    2672             *left = GTK_CONTAINER(gParts->comboBoxButtonWidget)->border_width;
     2727            *left = gtk_container_get_border_width(GTK_CONTAINER(gParts->comboBoxButtonWidget));
    26732728
    26742729            if (!inhtml) {
     
    26792734            }
    26802735
    2681             *top = *left + gParts->comboBoxButtonWidget->style->ythickness;
    2682             *left += gParts->comboBoxButtonWidget->style->xthickness;
     2736            style = gtk_widget_get_style(gParts->comboBoxButtonWidget);
     2737            *top = *left + style->ythickness;
     2738            *left += style->xthickness;
    26832739
    26842740            *right = *left; *bottom = *top;
     
    26942750                if (!wide_separators)
    26952751                    separator_width =
    2696                         XTHICKNESS(gParts->comboBoxSeparatorWidget->style);
     2752                        XTHICKNESS(style);
    26972753            }
    26982754
     
    27792835            }
    27802836
    2781             *left = *top = *right = *bottom = GTK_CONTAINER(w)->border_width;
     2837            *left = *top = *right = *bottom = gtk_container_get_border_width(GTK_CONTAINER(w));
    27822838
    27832839            if (!interior_focus) {
     
    28442900    }
    28452901
    2846     *right = *left = XTHICKNESS(w->style);
    2847     *bottom = *top = YTHICKNESS(w->style);
     2902    style = gtk_widget_get_style(w);
     2903    *right = *left = XTHICKNESS(style);
     2904    *bottom = *top = YTHICKNESS(style);
    28482905
    28492906    return MOZ_GTK_SUCCESS;
     
    29052962    ensure_toolbar_widget();
    29062963
    2907     style = gParts->toolbarWidget->style;
     2964    style = gtk_widget_get_style(gParts->toolbarWidget);
    29082965
    29092966    gtk_widget_style_get(gParts->toolbarWidget,
     
    29463003    gboolean wide_separators;
    29473004    gint     separator_height;
     3005    GtkStyle *style;
    29483006
    29493007    ensure_menu_separator_widget();
     
    29543012                          NULL);
    29553013
     3014    style = gtk_widget_get_style(gParts->menuSeparatorWidget);
     3015
    29563016    if (wide_separators)
    2957         *size = separator_height + gParts->menuSeparatorWidget->style->ythickness;
     3017        *size = separator_height + style->ythickness;
    29583018    else
    2959         *size = gParts->menuSeparatorWidget->style->ythickness * 2;
     3019        *size = style->ythickness * 2;
    29603020
    29613021    return MOZ_GTK_SUCCESS;
     
    29903050                          NULL);
    29913051
    2992     metrics->min_slider_size =
    2993         GTK_RANGE(gParts->horizScrollbarWidget)->min_slider_size;
     3052    metrics->min_slider_size = gtk_range_get_min_slider_size(GTK_RANGE(gParts->horizScrollbarWidget));
    29943053
    29953054    return MOZ_GTK_SUCCESS;
  • trunk/WebKit/gtk/ChangeLog

    r62001 r62002  
     12010-06-28  Xan Lopez  <xlopez@igalia.com>
     2
     3        Reviewed by Gustavo Noronha.
     4
     5        [GTK] Does not compile with -DGSEAL_ENABLE
     6        https://bugs.webkit.org/show_bug.cgi?id=37851
     7
     8        Fix build with GSEAL enabled.
     9
     10        * WebCoreSupport/FrameLoaderClientGtk.cpp:
     11        (WebKit::FrameLoaderClient::transitionToCommittedForNewPage):
     12        * webkit/webkitsoupauthdialog.c:
     13        (show_auth_dialog):
     14
    1152010-06-28  Xan Lopez  <xlopez@igalia.com>
    216
  • trunk/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp

    r61288 r62002  
    11651165{
    11661166    WebKitWebView* containingWindow = getViewFromFrame(m_frame);
    1167     IntSize size = IntSize(GTK_WIDGET(containingWindow)->allocation.width,
    1168                            GTK_WIDGET(containingWindow)->allocation.height);
     1167    GtkAllocation allocation;
     1168#if GTK_CHECK_VERSION(2, 18, 0)
     1169    gtk_widget_get_allocation(GTK_WIDGET(containingWindow), &allocation);
     1170#else
     1171    allocation = GTK_WIDGET(containingWindow)->allocation;
     1172#endif
     1173    IntSize size = IntSize(allocation.width, allocation.height);
    11691174    bool transparent = webkit_web_view_get_transparent(containingWindow);
    11701175    Color backgroundColor = transparent ? WebCore::Color::transparent : WebCore::Color::white;
  • trunk/WebKit/gtk/tests/testcopyandpaste.c

    r61881 r62002  
    133133    event.key.keyval = gdk_unicode_to_keyval('v');
    134134    event.key.state = GDK_CONTROL_MASK;
    135     event.key.window = GTK_WIDGET(currentFixture->webView)->window;
     135    event.key.window = gtk_widget_get_window(GTK_WIDGET(currentFixture->webView));
    136136    GdkKeymapKey* keys;
    137137    gint n_keys;
  • trunk/WebKit/gtk/webkit/webkitsoupauthdialog.c

    r55139 r62002  
    2626#include <libsoup/soup.h>
    2727
     28#include "GtkVersioning.h"
    2829#include "webkitmarshal.h"
    2930#include "webkitsoupauthdialog.h"
     
    215216    gtk_dialog_set_has_separator(dialog, FALSE);
    216217    gtk_container_set_border_width(GTK_CONTAINER(dialog), 5);
    217     gtk_box_set_spacing(GTK_BOX(dialog->vbox), 2); /* 2 * 5 + 2 = 12 */
    218     gtk_container_set_border_width(GTK_CONTAINER(dialog->action_area), 5);
    219     gtk_box_set_spacing(GTK_BOX(dialog->action_area), 6);
     218    gtk_box_set_spacing(GTK_BOX(gtk_dialog_get_content_area(dialog)), 2); /* 2 * 5 + 2 = 12 */
     219    gtk_container_set_border_width(GTK_CONTAINER(gtk_dialog_get_action_area(dialog)), 5);
     220    gtk_box_set_spacing(GTK_BOX(gtk_dialog_get_action_area(dialog)), 6);
    220221
    221222    gtk_window_set_resizable(window, FALSE);
     
    234235    hbox = gtk_hbox_new(FALSE, 12);
    235236    gtk_container_set_border_width(GTK_CONTAINER(hbox), 5);
    236     gtk_box_pack_start(GTK_BOX(dialog->vbox), hbox, TRUE, TRUE, 0);
     237    gtk_box_pack_start(GTK_BOX(gtk_dialog_get_content_area(dialog)), hbox, TRUE, TRUE, 0);
    237238
    238239    icon = gtk_image_new_from_stock(GTK_STOCK_DIALOG_AUTHENTICATION,
  • trunk/WebKitTools/ChangeLog

    r62001 r62002  
     12010-06-28  Xan Lopez  <xlopez@igalia.com>
     2
     3        Reviewed by Gustavo Noronha.
     4
     5        [GTK] Does not compile with -DGSEAL_ENABLE
     6        https://bugs.webkit.org/show_bug.cgi?id=37851
     7
     8        Fix build with GSEAL enabled.
     9
     10        * DumpRenderTree/gtk/EventSender.cpp:
     11        (gtk_widget_get_window):
     12        (prepareMouseButtonEvent):
     13        (mouseMoveToCallback):
     14        (mouseWheelToCallback):
     15        (keyDownCallback):
     16
    1172010-06-28  Xan Lopez  <xlopez@igalia.com>
    218
  • trunk/WebKitTools/DumpRenderTree/gtk/EventSender.cpp

    r61805 r62002  
    9797#endif
    9898
     99#if !GTK_CHECK_VERSION(2, 14, 0)
     100static GdkWindow* gtk_widget_get_window(GtkWidget* widget)
     101{
     102    g_return_val_if_fail(GTK_IS_WIDGET(widget), 0);
     103    return widget->window;
     104}
     105#endif
     106
    99107static JSValueRef getDragModeCallback(JSContextRef context, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception)
    100108{
     
    140148    event->button.x = lastMousePositionX;
    141149    event->button.y = lastMousePositionY;
    142     event->button.window = GTK_WIDGET(view)->window;
     150    event->button.window = gtk_widget_get_window(GTK_WIDGET(view));
    143151    event->button.device = gdk_device_get_core_pointer();
    144152    event->button.state = getStateFlags();
     
    146154
    147155    int xRoot, yRoot;
    148     gdk_window_get_root_coords(GTK_WIDGET(view)->window, lastMousePositionX, lastMousePositionY, &xRoot, &yRoot);
     156    gdk_window_get_root_coords(gtk_widget_get_window(GTK_WIDGET(view)), lastMousePositionX, lastMousePositionY, &xRoot, &yRoot);
    149157    event->button.x_root = xRoot;
    150158    event->button.y_root = yRoot;
     
    267275
    268276    event.motion.time = GDK_CURRENT_TIME;
    269     event.motion.window = GTK_WIDGET(view)->window;
     277    event.motion.window = gtk_widget_get_window(GTK_WIDGET(view));
    270278    event.motion.device = gdk_device_get_core_pointer();
    271279    event.motion.state = getStateFlags();
    272280
    273281    int xRoot, yRoot;
    274     gdk_window_get_root_coords(GTK_WIDGET(view)->window, lastMousePositionX, lastMousePositionY, &xRoot, &yRoot);
     282    gdk_window_get_root_coords(gtk_widget_get_window(GTK_WIDGET(view)), lastMousePositionX, lastMousePositionY, &xRoot, &yRoot);
    275283    event.motion.x_root = xRoot;
    276284    event.motion.y_root = yRoot;
     
    302310    event.scroll.y = lastMousePositionY;
    303311    event.scroll.time = GDK_CURRENT_TIME;
    304     event.scroll.window = GTK_WIDGET(view)->window;
     312    event.scroll.window = gtk_widget_get_window(GTK_WIDGET(view));
    305313
    306314    if (horizontal < 0)
     
    500508    event.key.keyval = gdkKeySym;
    501509    event.key.state = state;
    502     event.key.window = GTK_WIDGET(view)->window;
     510    event.key.window = gtk_widget_get_window(GTK_WIDGET(view));
    503511
    504512    // When synthesizing an event, an invalid hardware_keycode value
  • trunk/configure.ac

    r62001 r62002  
    205205AC_SUBST([WEBKITGTK_PC_NAME])
    206206AC_SUBST([GTK_API_VERSION])
     207AM_CONDITIONAL([GTK_API_VERSION_2],[test "$GTK_API_VERSION" = "2.0"])
    207208
    208209# determine the GDK/GTK+ target
Note: See TracChangeset for help on using the changeset viewer.