summaryrefslogtreecommitdiff
path: root/www/firefox/files/patch-bug1101582
diff options
context:
space:
mode:
Diffstat (limited to 'www/firefox/files/patch-bug1101582')
-rw-r--r--www/firefox/files/patch-bug110158282
1 files changed, 82 insertions, 0 deletions
diff --git a/www/firefox/files/patch-bug1101582 b/www/firefox/files/patch-bug1101582
new file mode 100644
index 000000000000..d3abf8b62378
--- /dev/null
+++ b/www/firefox/files/patch-bug1101582
@@ -0,0 +1,82 @@
+commit 8142810
+Author: Martin Stransky <stransky@redhat.com>
+Date: Thu Nov 27 04:08:00 2014 +0100
+
+ Bug 1101582 - [GTK3] - Use window background color for ThreeDFace,ButtonFace. r=karlt
+ This fixes missing borders on non-natively-styled textareas.
+---
+ widget/gtk/nsLookAndFeel.cpp | 21 ++++++++++-----------
+ widget/gtk/nsLookAndFeel.h | 2 +-
+ 2 files changed, 11 insertions(+), 12 deletions(-)
+
+diff --git widget/gtk/nsLookAndFeel.cpp widget/gtk/nsLookAndFeel.cpp
+index 93066b4..3562cf2 100644
+--- widget/gtk/nsLookAndFeel.cpp
++++ widget/gtk/nsLookAndFeel.cpp
+@@ -284,10 +284,17 @@ nsLookAndFeel::NativeGetColor(ColorID aID, nscolor& aColor)
+ #endif
+ break;
+
++ case eColorID_threedlightshadow:
++ // 3-D highlighted inner edge color
++ // always same as background in GTK code
+ case eColorID_threedface:
+ case eColorID_buttonface:
+ // 3-D face color
+- aColor = sFrameBackground;
++#if (MOZ_WIDGET_GTK == 3)
++ aColor = sMozWindowBackground;
++#else
++ aColor = sButtonBackground;
++#endif
+ break;
+
+ case eColorID_buttontext:
+@@ -302,11 +309,6 @@ nsLookAndFeel::NativeGetColor(ColorID aID, nscolor& aColor)
+ aColor = sFrameOuterLightBorder;
+ break;
+
+- case eColorID_threedlightshadow:
+- // 3-D highlighted inner edge color
+- aColor = sFrameBackground; // always same as background in GTK code
+- break;
+-
+ case eColorID_buttonshadow:
+ // 3-D shadow edge color
+ case eColorID_threedshadow:
+@@ -1141,7 +1143,7 @@ nsLookAndFeel::Init()
+
+ style = gtk_widget_get_style(button);
+ if (style) {
+- sFrameBackground = GDK_COLOR_TO_NS_RGB(style->bg[GTK_STATE_NORMAL]);
++ sButtonBackground = GDK_COLOR_TO_NS_RGB(style->bg[GTK_STATE_NORMAL]);
+ sFrameOuterLightBorder =
+ GDK_COLOR_TO_NS_RGB(style->light[GTK_STATE_NORMAL]);
+ sFrameInnerDarkBorder =
+@@ -1189,12 +1191,9 @@ nsLookAndFeel::Init()
+ GtkWidget *frame = gtk_frame_new(nullptr);
+ gtk_container_add(GTK_CONTAINER(parent), frame);
+
+- style = gtk_widget_get_style_context(frame);
+- gtk_style_context_get_background_color(style, GTK_STATE_FLAG_NORMAL, &color);
+- sFrameBackground = GDK_RGBA_TO_NS_RGBA(color);
+-
+ // TODO GTK3 - update sFrameOuterLightBorder
+ // for GTK_BORDER_STYLE_INSET/OUTSET/GROVE/RIDGE border styles (Bug 978172).
++ style = gtk_widget_get_style_context(frame);
+ gtk_style_context_get_border_color(style, GTK_STATE_FLAG_NORMAL, &color);
+ sFrameInnerDarkBorder = sFrameOuterLightBorder = GDK_RGBA_TO_NS_RGBA(color);
+ #endif
+diff --git widget/gtk/nsLookAndFeel.h widget/gtk/nsLookAndFeel.h
+index be15179..aabbca6 100644
+--- widget/gtk/nsLookAndFeel.h
++++ widget/gtk/nsLookAndFeel.h
+@@ -64,7 +64,7 @@ protected:
+ nscolor sMenuHoverText;
+ nscolor sButtonText;
+ nscolor sButtonHoverText;
+- nscolor sFrameBackground;
++ nscolor sButtonBackground;
+ nscolor sFrameOuterLightBorder;
+ nscolor sFrameInnerDarkBorder;
+ nscolor sOddCellBackground;