Commit 74485407 authored by alp@webkit.org's avatar alp@webkit.org

2008-03-20 Marco Barisione <marco.barisione@collabora.co.uk>

        Reviewed by Alp Toker.

        http://bugs.webkit.org/show_bug.cgi?id=17946
        [GTK] Widgets are not clipped

        * platform/gtk/RenderThemeGtk.cpp:
        (WebCore::paintMozWidget): pass the clipping rectangle to
        moz_gtk_widget_paint() instead of just the widget rectangle.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31185 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 55be1e2d
2008-03-20 Marco Barisione <marco.barisione@collabora.co.uk>
Reviewed by Alp Toker.
http://bugs.webkit.org/show_bug.cgi?id=17946
[GTK] Widgets are not clipped
* platform/gtk/RenderThemeGtk.cpp:
(WebCore::paintMozWidget): pass the clipping rectangle to
moz_gtk_widget_paint() instead of just the widget rectangle.
2008-03-20 David Hyatt <hyatt@apple.com>
Fix for http://bugs.webkit.org/show_bug.cgi?id=9279
/*
* Copyright (C) 2007 Apple Inc.
* Copyright (C) 2007 Alp Toker <alp@atoker.com>
* Copyright (C) 2008 Collabora Ltd.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
......@@ -155,8 +156,21 @@ static bool paintMozWidget(RenderTheme* theme, GtkThemeWidgetType type, RenderOb
GdkRectangle gdkRect = IntRect(pos.x(), pos.y(), rect.width(), rect.height());
GtkTextDirection direction = gtkTextDirection(o->style()->direction());
// FIXME: Pass the real clip region.
return moz_gtk_widget_paint(type, i.context->gdkDrawable(), &gdkRect, &gdkRect, &mozState, flags, direction) != MOZ_GTK_SUCCESS;
// Find the clip rectangle
cairo_t *cr = i.context->platformContext();
double clipX1, clipX2, clipY1, clipY2;
cairo_clip_extents(cr, &clipX1, &clipY1, &clipX2, &clipY2);
GdkRectangle gdkClipRect;
gdkClipRect.width = clipX2 - clipX1;
gdkClipRect.height = clipY2 - clipY1;
IntPoint clipPos = i.context->translatePoint(IntPoint(clipX1, clipY1));
gdkClipRect.x = clipPos.x();
gdkClipRect.y = clipPos.y();
gdk_rectangle_intersect(&gdkRect, &gdkClipRect, &gdkClipRect);
return moz_gtk_widget_paint(type, i.context->gdkDrawable(), &gdkRect, &gdkClipRect, &mozState, flags, direction) != MOZ_GTK_SUCCESS;
}
static void setButtonPadding(RenderStyle* style)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment