Changeset 83034 in webkit


Ignore:
Timestamp:
Apr 6, 2011 2:03:39 AM (13 years ago)
Author:
alex
Message:

2011-04-06 Alejandro G. Castro <alex@igalia.com>

Fix GTK3 compilation after r82962.

  • platform/gtk/RenderThemeGtk3.cpp: (WebCore::paintToggle): (WebCore::renderButton): (WebCore::RenderThemeGtk::paintMenuList): (WebCore::RenderThemeGtk::paintTextField): (WebCore::RenderThemeGtk::paintSliderTrack): (WebCore::RenderThemeGtk::paintSliderThumb): (WebCore::RenderThemeGtk::paintProgressBar): (WebCore::paintSpinArrowButton):
  • platform/gtk/ScrollbarThemeGtk3.cpp: (WebCore::ScrollbarThemeGtk::paintTrackBackground): (WebCore::ScrollbarThemeGtk::paintScrollbarBackground): (WebCore::ScrollbarThemeGtk::paintThumb): (WebCore::ScrollbarThemeGtk::paintButton):
Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r83033 r83034  
     12011-04-06  Alejandro G. Castro  <alex@igalia.com>
     2
     3        Fix GTK3 compilation after r82962.
     4
     5        * platform/gtk/RenderThemeGtk3.cpp:
     6        (WebCore::paintToggle):
     7        (WebCore::renderButton):
     8        (WebCore::RenderThemeGtk::paintMenuList):
     9        (WebCore::RenderThemeGtk::paintTextField):
     10        (WebCore::RenderThemeGtk::paintSliderTrack):
     11        (WebCore::RenderThemeGtk::paintSliderThumb):
     12        (WebCore::RenderThemeGtk::paintProgressBar):
     13        (WebCore::paintSpinArrowButton):
     14        * platform/gtk/ScrollbarThemeGtk3.cpp:
     15        (WebCore::ScrollbarThemeGtk::paintTrackBackground):
     16        (WebCore::ScrollbarThemeGtk::paintScrollbarBackground):
     17        (WebCore::ScrollbarThemeGtk::paintThumb):
     18        (WebCore::ScrollbarThemeGtk::paintButton):
     19
    1202011-04-06  Andrey Kosyakov  <caseq@chromium.org>
    221
  • trunk/Source/WebCore/platform/gtk/RenderThemeGtk3.cpp

    r80554 r83034  
    3535#include "Page.h"
    3636#include "PaintInfo.h"
     37#include "PlatformContextCairo.h"
    3738#include "RenderObject.h"
    3839#include "TextDirection.h"
     
    217218
    218219    if (widgetType == GTK_TYPE_CHECK_BUTTON)
    219         gtk_render_check(context, paintInfo.context->platformContext(), rect.x(), rect.y(), rect.width(), rect.height());
     220        gtk_render_check(context, paintInfo.context->platformContext()->cr(), rect.x(), rect.y(), rect.width(), rect.height());
    220221    else
    221         gtk_render_option(context, paintInfo.context->platformContext(), rect.x(), rect.y(), rect.width(), rect.height());
     222        gtk_render_option(context, paintInfo.context->platformContext()->cr(), rect.x(), rect.y(), rect.width(), rect.height());
    222223
    223224    if (theme->isFocused(renderObject)) {
     
    226227        gtk_style_context_get_style(context, "indicator-spacing", &indicatorSpacing, NULL);
    227228        indicatorRect.inflate(indicatorSpacing);
    228         gtk_render_focus(context, paintInfo.context->platformContext(), indicatorRect.x(), indicatorRect.y(),
     229        gtk_render_focus(context, paintInfo.context->platformContext()->cr(), indicatorRect.x(), indicatorRect.y(),
    229230                         indicatorRect.width(), indicatorRect.height());
    230231    }
     
    285286    }
    286287
    287     gtk_render_background(context, paintInfo.context->platformContext(), buttonRect.x(), buttonRect.y(), buttonRect.width(), buttonRect.height());
    288     gtk_render_frame(context, paintInfo.context->platformContext(), buttonRect.x(), buttonRect.y(), buttonRect.width(), buttonRect.height());
     288    gtk_render_background(context, paintInfo.context->platformContext()->cr(), buttonRect.x(), buttonRect.y(), buttonRect.width(), buttonRect.height());
     289    gtk_render_frame(context, paintInfo.context->platformContext()->cr(), buttonRect.x(), buttonRect.y(), buttonRect.width(), buttonRect.height());
    289290
    290291    if (theme->isFocused(renderObject)) {
     
    318319        }
    319320
    320         gtk_render_focus(context, paintInfo.context->platformContext(), buttonRect.x(), buttonRect.y(), buttonRect.width(), buttonRect.height());
     321        gtk_render_focus(context, paintInfo.context->platformContext()->cr(), buttonRect.x(), buttonRect.y(), buttonRect.width(), buttonRect.height());
    321322    }
    322323}
     
    424425bool RenderThemeGtk::paintMenuList(RenderObject* renderObject, const PaintInfo& paintInfo, const IntRect& rect)
    425426{
    426     cairo_t* cairoContext = paintInfo.context->platformContext();
     427    cairo_t* cairoContext = paintInfo.context->platformContext()->cr();
    427428    GtkTextDirection direction = static_cast<GtkTextDirection>(gtkTextDirection(renderObject->style()->direction()));
    428429
     
    569570    gtk_style_context_set_state(context, static_cast<GtkStateFlags>(flags));
    570571
    571     gtk_render_background(context, paintInfo.context->platformContext(), rect.x(), rect.y(), rect.width(), rect.height());
    572     gtk_render_frame(context, paintInfo.context->platformContext(), rect.x(), rect.y(), rect.width(), rect.height());
     572    gtk_render_background(context, paintInfo.context->platformContext()->cr(), rect.x(), rect.y(), rect.width(), rect.height());
     573    gtk_render_frame(context, paintInfo.context->platformContext()->cr(), rect.x(), rect.y(), rect.width(), rect.height());
    573574
    574575    if (isFocused(renderObject) && isEnabled(renderObject)) {
     
    583584            IntRect focusRect(rect);
    584585            focusRect.inflate(focusWidth + focusPad);
    585             gtk_render_focus(context, paintInfo.context->platformContext(),
     586            gtk_render_focus(context, paintInfo.context->platformContext()->cr(),
    586587                             focusRect.x(), focusRect.y(), focusRect.width(), focusRect.height());
    587588        }
     
    608609        gtk_style_context_set_state(context, GTK_STATE_FLAG_INSENSITIVE);
    609610
    610     gtk_render_background(context, paintInfo.context->platformContext(),
     611    gtk_render_background(context, paintInfo.context->platformContext()->cr(),
    611612                          rect.x(), rect.y(), rect.width(), rect.height());
    612     gtk_render_frame(context, paintInfo.context->platformContext(),
     613    gtk_render_frame(context, paintInfo.context->platformContext()->cr(),
    613614                     rect.x(), rect.y(), rect.width(), rect.height());
    614615
     
    620621        IntRect focusRect(rect);
    621622        focusRect.inflate(focusWidth + focusPad);
    622         gtk_render_focus(context, paintInfo.context->platformContext(),
     623        gtk_render_focus(context, paintInfo.context->platformContext()->cr(),
    623624                         focusRect.x(), focusRect.y(), focusRect.width(), focusRect.height());
    624625    }
     
    655656    gtk_style_context_set_state(context, static_cast<GtkStateFlags>(flags));
    656657
    657     gtk_render_slider(context, paintInfo.context->platformContext(), sliderRect.x(), sliderRect.y(), sliderRect.width(), sliderRect.height(),
     658    gtk_render_slider(context, paintInfo.context->platformContext()->cr(), sliderRect.x(), sliderRect.y(), sliderRect.width(), sliderRect.height(),
    658659                      part == SliderThumbHorizontalPart ? GTK_ORIENTATION_HORIZONTAL : GTK_ORIENTATION_VERTICAL);
    659660
     
    699700    gtk_style_context_add_class(context, GTK_STYLE_CLASS_TROUGH);
    700701
    701     gtk_render_background(context, paintInfo.context->platformContext(), rect.x(), rect.y(), rect.width(), rect.height());
    702     gtk_render_frame(context, paintInfo.context->platformContext(), rect.x(), rect.y(), rect.width(), rect.height());
     702    gtk_render_background(context, paintInfo.context->platformContext()->cr(), rect.x(), rect.y(), rect.width(), rect.height());
     703    gtk_render_frame(context, paintInfo.context->platformContext()->cr(), rect.x(), rect.y(), rect.width(), rect.height());
    703704
    704705    gtk_style_context_restore(context);
     
    716717
    717718    if (!progressRect.isEmpty())
    718         gtk_render_activity(context, paintInfo.context->platformContext(), progressRect.x(), progressRect.y(), progressRect.width(), progressRect.height());
     719        gtk_render_activity(context, paintInfo.context->platformContext()->cr(), progressRect.x(), progressRect.y(), progressRect.width(), progressRect.height());
    719720
    720721    gtk_style_context_restore(context);
     
    778779    gtk_style_context_set_junction_sides(context, static_cast<GtkJunctionSides>(junction));
    779780
    780     gtk_render_background(context, paintInfo.context->platformContext(), buttonRect.x(), buttonRect.y(), buttonRect.width(), buttonRect.height());
    781     gtk_render_frame(context, paintInfo.context->platformContext(), buttonRect.x(), buttonRect.y(), buttonRect.width(), buttonRect.height());
     781    gtk_render_background(context, paintInfo.context->platformContext()->cr(), buttonRect.x(), buttonRect.y(), buttonRect.width(), buttonRect.height());
     782    gtk_render_frame(context, paintInfo.context->platformContext()->cr(), buttonRect.x(), buttonRect.y(), buttonRect.width(), buttonRect.height());
    782783
    783784    // Paint arrow centered inside button.
     
    805806
    806807    arrowRect.move((arrowRect.width() - width) / 2, (arrowRect.height() - height) / 2);
    807     gtk_render_arrow(context, paintInfo.context->platformContext(), angle, arrowRect.x(), arrowRect.y(), width);
     808    gtk_render_arrow(context, paintInfo.context->platformContext()->cr(), angle, arrowRect.x(), arrowRect.y(), width);
    808809
    809810    gtk_style_context_restore(context);
  • trunk/Source/WebCore/platform/gtk/ScrollbarThemeGtk3.cpp

    r80555 r83034  
    2929#ifndef GTK_API_VERSION_2
    3030
     31#include "PlatformContextCairo.h"
    3132#include "PlatformMouseEvent.h"
    3233#include "RenderThemeGtk.h"
     
    7879    gtk_style_context_add_class(m_context, GTK_STYLE_CLASS_TROUGH);
    7980
    80     gtk_render_background(m_context, context->platformContext(),
     81    gtk_render_background(m_context, context->platformContext()->cr(),
    8182                          fullScrollbarRect.x(), fullScrollbarRect.y(), fullScrollbarRect.width(), fullScrollbarRect.height());
    82     gtk_render_frame(m_context, context->platformContext(),
     83    gtk_render_frame(m_context, context->platformContext()->cr(),
    8384                     fullScrollbarRect.x(), fullScrollbarRect.y(), fullScrollbarRect.width(), fullScrollbarRect.height());
    8485
     
    9293    gtk_style_context_add_class(m_context, GTK_STYLE_CLASS_SCROLLBAR);
    9394    gtk_style_context_add_class(m_context, "scrolled-window");
    94     gtk_render_frame(m_context, context->platformContext(), scrollbar->x(), scrollbar->y(), scrollbar->width(), scrollbar->height());
     95    gtk_render_frame(m_context, context->platformContext()->cr(), scrollbar->x(), scrollbar->y(), scrollbar->width(), scrollbar->height());
    9596
    9697    gtk_style_context_restore(m_context);
     
    111112    gtk_style_context_set_state(m_context, static_cast<GtkStateFlags>(flags));
    112113
    113     gtk_render_slider(m_context, context->platformContext(), rect.x(), rect.y(), rect.width(), rect.height(),
     114    gtk_render_slider(m_context, context->platformContext()->cr(), rect.x(), rect.y(), rect.width(), rect.height(),
    114115                      scrollbar->orientation() == VerticalScrollbar ? GTK_ORIENTATION_VERTICAL : GTK_ORIENTATION_HORIZONTAL);
    115116
     
    137138
    138139    gtk_style_context_add_class(m_context, GTK_STYLE_CLASS_BUTTON);
    139     gtk_render_background(m_context, context->platformContext(), rect.x(), rect.y(), rect.width(), rect.height());
    140     gtk_render_frame(m_context, context->platformContext(), rect.x(), rect.y(), rect.width(), rect.height());
     140    gtk_render_background(m_context, context->platformContext()->cr(), rect.x(), rect.y(), rect.width(), rect.height());
     141    gtk_render_frame(m_context, context->platformContext()->cr(), rect.x(), rect.y(), rect.width(), rect.height());
    141142
    142143    gfloat arrowScaling;
     
    163164    }
    164165
    165     gtk_render_arrow(m_context, context->platformContext(), angle, arrowPoint.x(), arrowPoint.y(), arrowSize);
     166    gtk_render_arrow(m_context, context->platformContext()->cr(), angle, arrowPoint.x(), arrowPoint.y(), arrowSize);
    166167
    167168    gtk_style_context_restore(m_context);
Note: See TracChangeset for help on using the changeset viewer.