summaryrefslogtreecommitdiff
path: root/mozilla-1160154.patch
diff options
context:
space:
mode:
Diffstat (limited to 'mozilla-1160154.patch')
-rw-r--r--mozilla-1160154.patch53
1 files changed, 53 insertions, 0 deletions
diff --git a/mozilla-1160154.patch b/mozilla-1160154.patch
new file mode 100644
index 0000000..8971fbb
--- /dev/null
+++ b/mozilla-1160154.patch
@@ -0,0 +1,53 @@
+diff --git a/widget/gtk/gtk3drawing.c b/widget/gtk/gtk3drawing.c
+--- a/widget/gtk/gtk3drawing.c
++++ b/widget/gtk/gtk3drawing.c
+@@ -72,16 +72,19 @@ static gboolean is_initialized;
+ #define ARROW_DOWN G_PI
+ #define ARROW_RIGHT G_PI_2
+ #define ARROW_LEFT (G_PI+G_PI_2)
+
+ #if !GTK_CHECK_VERSION(3,14,0)
+ #define GTK_STATE_FLAG_CHECKED (1 << 11)
+ #endif
+
++// See Bug 1160154 for details
++#define MAX_WIDGET_PADDING 6
++
+ static GtkStateFlags
+ GetStateFlagsFromGtkWidgetState(GtkWidgetState* state)
+ {
+ GtkStateFlags stateFlags = GTK_STATE_FLAG_NORMAL;
+
+ if (state->disabled)
+ stateFlags = GTK_STATE_FLAG_INSENSITIVE;
+ else {
+@@ -2590,22 +2593,22 @@ moz_gtk_add_style_border(GtkStyleContext
+ }
+
+ static void
+ moz_gtk_add_style_padding(GtkStyleContext* style,
+ gint* left, gint* top, gint* right, gint* bottom)
+ {
+ GtkBorder padding;
+
+- gtk_style_context_get_padding(style, 0, &padding);
+-
+- *left += padding.left;
+- *right += padding.right;
+- *top += padding.top;
+- *bottom += padding.bottom;
++ gtk_style_context_get_padding(style, 0, &padding);
++
++ *left += (padding.left > MAX_WIDGET_PADDING) ? MAX_WIDGET_PADDING : padding.left;
++ *right += (padding.right > MAX_WIDGET_PADDING) ? MAX_WIDGET_PADDING : padding.right;
++ *top += (padding.top > MAX_WIDGET_PADDING) ? MAX_WIDGET_PADDING : padding.top;
++ *bottom += (padding.bottom > MAX_WIDGET_PADDING) ? MAX_WIDGET_PADDING : padding.bottom;
+ }
+
+ gint
+ moz_gtk_get_widget_border(GtkThemeWidgetType widget, gint* left, gint* top,
+ gint* right, gint* bottom, GtkTextDirection direction,
+ gboolean inhtml)
+ {
+ GtkWidget* w;
+
bgstack15