[SCM] WebKit Debian packaging branch, webkit-1.3, updated. upstream/1.3.7-4207-g178b198
carlosgc at webkit.org
carlosgc at webkit.org
Sun Feb 20 22:54:34 UTC 2011
The following commit has been merged in the webkit-1.3 branch:
commit f34fef7cfb43f6e62f06f3615089b04c0f930840
Author: carlosgc at webkit.org <carlosgc at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Jan 13 12:07:22 2011 +0000
2011-01-13 Carlos Garcia Campos <cgarcia at igalia.com>
Reviewed by Xan Lopez.
[GTK] Paint toggle buttons inconsistent when the object state is indeterminate
https://bugs.webkit.org/show_bug.cgi?id=52361
Check whether the object state is indeterminate to set the flag
GTK_STATE_FLAG_INCONSISTENT before rendering check and radio
buttons.
* platform/gtk/RenderThemeGtk3.cpp:
(WebCore::paintToggle):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75710 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog
index cc5fa37..e626278 100644
--- a/Source/WebCore/ChangeLog
+++ b/Source/WebCore/ChangeLog
@@ -1,3 +1,17 @@
+2011-01-13 Carlos Garcia Campos <cgarcia at igalia.com>
+
+ Reviewed by Xan Lopez.
+
+ [GTK] Paint toggle buttons inconsistent when the object state is indeterminate
+ https://bugs.webkit.org/show_bug.cgi?id=52361
+
+ Check whether the object state is indeterminate to set the flag
+ GTK_STATE_FLAG_INCONSISTENT before rendering check and radio
+ buttons.
+
+ * platform/gtk/RenderThemeGtk3.cpp:
+ (WebCore::paintToggle):
+
2011-01-13 Yi Shen <yi.4.shen at nokia.com>
Reviewed by Simon Hausmann.
diff --git a/Source/WebCore/platform/gtk/RenderThemeGtk3.cpp b/Source/WebCore/platform/gtk/RenderThemeGtk3.cpp
index ee2a37f..c2fcfb5 100644
--- a/Source/WebCore/platform/gtk/RenderThemeGtk3.cpp
+++ b/Source/WebCore/platform/gtk/RenderThemeGtk3.cpp
@@ -203,25 +203,19 @@ static void paintToggle(const RenderThemeGtk* theme, GType widgetType, RenderObj
gtk_style_context_set_direction(context, static_cast<GtkTextDirection>(gtkTextDirection(renderObject->style()->direction())));
gtk_style_context_add_class(context, widgetType == GTK_TYPE_CHECK_BUTTON ? GTK_STYLE_CLASS_CHECK : GTK_STYLE_CLASS_RADIO);
- gint indicatorSize, indicatorSpacing;
- gtk_style_context_get_style(context,
- "indicator-size", &indicatorSize,
- "indicator-spacing", &indicatorSpacing,
- NULL);
-
guint flags = 0;
if (!theme->isEnabled(renderObject) || theme->isReadOnlyControl(renderObject))
flags |= GTK_STATE_FLAG_INSENSITIVE;
else if (theme->isHovered(renderObject))
flags |= GTK_STATE_FLAG_PRELIGHT;
- if (theme->isChecked(renderObject))
+ if (theme->isIndeterminate(renderObject))
+ flags |= GTK_STATE_FLAG_INCONSISTENT;
+ else if (theme->isChecked(renderObject))
flags |= GTK_STATE_FLAG_ACTIVE;
if (theme->isPressed(renderObject))
flags |= GTK_STATE_FLAG_SELECTED;
gtk_style_context_set_state(context, static_cast<GtkStateFlags>(flags));
- IntRect indicatorRect(rect);
-
if (widgetType == GTK_TYPE_CHECK_BUTTON)
gtk_render_check(context, paintInfo.context->platformContext(), rect.x(), rect.y(), rect.width(), rect.height());
else
@@ -229,6 +223,8 @@ static void paintToggle(const RenderThemeGtk* theme, GType widgetType, RenderObj
if (theme->isFocused(renderObject)) {
IntRect indicatorRect(rect);
+ gint indicatorSpacing;
+ gtk_style_context_get_style(context, "indicator-spacing", &indicatorSpacing, NULL);
indicatorRect.inflate(indicatorSpacing);
gtk_render_focus(context, paintInfo.context->platformContext(), indicatorRect.x(), indicatorRect.y(),
indicatorRect.width(), indicatorRect.height());
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list