summaryrefslogtreecommitdiff
path: root/mozilla-1101582.patch
diff options
context:
space:
mode:
authorMartin Stransky <stransky@anakreon.cz>2014-12-08 10:06:21 +0100
committerMartin Stransky <stransky@anakreon.cz>2014-12-08 10:06:21 +0100
commita7cca11adb34355a78886e15d706bb07615b3ad2 (patch)
tree2edad82ac4a158c9551f85a2bafb57f7d510d2fe /mozilla-1101582.patch
parentFixed dict patch (diff)
downloadlibrewolf-fedora-ff-a7cca11adb34355a78886e15d706bb07615b3ad2.tar.gz
librewolf-fedora-ff-a7cca11adb34355a78886e15d706bb07615b3ad2.tar.bz2
librewolf-fedora-ff-a7cca11adb34355a78886e15d706bb07615b3ad2.zip
Gtk3 flash plugin fix (rhbz#1171457), Gtk3 theme fixes
Diffstat (limited to 'mozilla-1101582.patch')
-rw-r--r--mozilla-1101582.patch122
1 files changed, 122 insertions, 0 deletions
diff --git a/mozilla-1101582.patch b/mozilla-1101582.patch
new file mode 100644
index 0000000..c1963f8
--- /dev/null
+++ b/mozilla-1101582.patch
@@ -0,0 +1,122 @@
+# HG changeset patch
+# Parent cef590a6f94681064fa954890bae6014db819158
+# User Martin Stransky <stransky@redhat.com>
+Bug 1101582 - [GTK3] - Use window background color for ThreeDFace,ButtonFace r=karlt
+This fixes missing borders on non-natively-styled textareas.
+
+diff --git a/widget/gtk/nsLookAndFeel.cpp b/widget/gtk/nsLookAndFeel.cpp
+--- a/widget/gtk/nsLookAndFeel.cpp
++++ b/widget/gtk/nsLookAndFeel.cpp
+@@ -279,39 +279,41 @@ nsLookAndFeel::NativeGetColor(ColorID aI
+ // scrollbar gray area
+ #if (MOZ_WIDGET_GTK == 2)
+ aColor = GDK_COLOR_TO_NS_RGB(mStyle->bg[GTK_STATE_ACTIVE]);
+ #else
+ aColor = sMozScrollbar;
+ #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:
+ // text on push buttons
+ aColor = sButtonText;
+ break;
+
+ case eColorID_buttonhighlight:
+ // 3-D highlighted edge color
+ case eColorID_threedhighlight:
+ // 3-D highlighted outer edge color
+ 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:
+ // 3-D shadow inner edge color
+ aColor = sFrameInnerDarkBorder;
+ break;
+
+ #if (MOZ_WIDGET_GTK == 2)
+@@ -1136,17 +1138,17 @@ nsLookAndFeel::Init()
+ }
+
+ sOddCellBackground = GDK_COLOR_TO_NS_RGB(colorValue);
+ if (colorValuePtr)
+ gdk_color_free(colorValuePtr);
+
+ 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 =
+ GDK_COLOR_TO_NS_RGB(style->dark[GTK_STATE_NORMAL]);
+ }
+ #else
+ // Button text, background, border
+ style = gtk_widget_get_style_context(label);
+@@ -1184,22 +1186,19 @@ nsLookAndFeel::Init()
+ gtk_style_context_add_region(style, GTK_STYLE_REGION_ROW, GTK_REGION_ODD);
+ gtk_style_context_get_background_color(style, GTK_STATE_FLAG_NORMAL, &color);
+ sOddCellBackground = GDK_RGBA_TO_NS_RGBA(color);
+ gtk_style_context_restore(style);
+
+ 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
+ // Some themes have a unified menu bar, and support window dragging on it
+ gboolean supports_menubar_drag = FALSE;
+ GParamSpec *param_spec =
+ gtk_widget_class_find_style_property(GTK_WIDGET_GET_CLASS(menuBar),
+ "window-dragging");
+diff --git a/widget/gtk/nsLookAndFeel.h b/widget/gtk/nsLookAndFeel.h
+--- a/widget/gtk/nsLookAndFeel.h
++++ b/widget/gtk/nsLookAndFeel.h
+@@ -59,17 +59,17 @@ protected:
+ nscolor sMenuBackground;
+ nscolor sMenuBarText;
+ nscolor sMenuBarHoverText;
+ nscolor sMenuText;
+ nscolor sMenuHover;
+ nscolor sMenuHoverText;
+ nscolor sButtonText;
+ nscolor sButtonHoverText;
+- nscolor sFrameBackground;
++ nscolor sButtonBackground;
+ nscolor sFrameOuterLightBorder;
+ nscolor sFrameInnerDarkBorder;
+ nscolor sOddCellBackground;
+ nscolor sNativeHyperLinkText;
+ nscolor sComboBoxText;
+ nscolor sComboBoxBackground;
+ nscolor sMozFieldText;
+ nscolor sMozFieldBackground;
bgstack15