Update to 40.0 Build 4
This commit is contained in:
parent
4eb88dd40c
commit
349fbd0dd5
2
.gitignore
vendored
2
.gitignore
vendored
@ -150,3 +150,5 @@ firefox-3.6.4.source.tar.bz2
|
||||
/firefox-langpacks-39.0-20150702.tar.xz
|
||||
/firefox-39.0.3.source.tar.bz2
|
||||
/firefox-langpacks-39.0.3-20150806.tar.xz
|
||||
/firefox-40.0.source.tar.bz2
|
||||
/firefox-langpacks-40.0-20150807.tar.xz
|
||||
|
24
firefox.spec
24
firefox.spec
@ -46,7 +46,7 @@
|
||||
%define debug_build 0
|
||||
|
||||
%define default_bookmarks_file %{_datadir}/bookmarks/default-bookmarks.html
|
||||
%define firefox_app_id \{ec8030f7-c20a-464f-9b0e-13a3a9e97384\}
|
||||
%define firefox_app_id \{ec8030f7-c20a-464f-9b0e-13a3a9e97384\}
|
||||
# Minimal required versions
|
||||
%global cairo_version 1.13.1
|
||||
%global freetype_version 2.1.9
|
||||
@ -106,14 +106,14 @@
|
||||
|
||||
Summary: Mozilla Firefox Web browser
|
||||
Name: firefox
|
||||
Version: 39.0.3
|
||||
Version: 40.0
|
||||
Release: 1%{?pre_tag}%{?dist}
|
||||
URL: http://www.mozilla.org/projects/firefox/
|
||||
License: MPLv1.1 or GPLv2+ or LGPLv2+
|
||||
Group: Applications/Internet
|
||||
Source0: ftp://ftp.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.bz2
|
||||
%if %{build_langpacks}
|
||||
Source1: firefox-langpacks-%{version}%{?pre_version}-20150806.tar.xz
|
||||
Source1: firefox-langpacks-%{version}%{?pre_version}-20150807.tar.xz
|
||||
%endif
|
||||
Source10: firefox-mozconfig
|
||||
Source11: firefox-mozconfig-branded
|
||||
@ -148,10 +148,6 @@ Patch221: firefox-fedora-ua.patch
|
||||
# Upstream patches
|
||||
|
||||
# Gtk3 upstream patches
|
||||
Patch412: mozilla-1073117-no-gap-tab.patch
|
||||
Patch416: mozilla-1161056.patch
|
||||
Patch417: mozilla-1144745-1.patch
|
||||
Patch418: mozilla-1144745-2.patch
|
||||
Patch419: mozilla-1144745-3.patch
|
||||
Patch420: mozilla-1160154.patch
|
||||
Patch421: mozilla-1169233.patch
|
||||
@ -305,10 +301,6 @@ cd %{tarballdir}
|
||||
|
||||
# Upstream patches
|
||||
%if %{toolkit_gtk3}
|
||||
%patch412 -p1 -b .1073117-no-gap-tab
|
||||
%patch416 -p1 -b .1161056
|
||||
%patch417 -p1 -b .1144745-1
|
||||
%patch418 -p1 -b .1144745-2
|
||||
%patch419 -p1 -b .1144745-3
|
||||
%patch420 -p1 -b .1160154
|
||||
%patch421 -p1 -b .1169233
|
||||
@ -751,8 +743,8 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
|
||||
%{mozappdir}/firefox
|
||||
%{mozappdir}/firefox-bin
|
||||
%doc %{_mandir}/man1/*
|
||||
%dir %{_datadir}/mozilla/extensions/%{firefox_app_id}
|
||||
%dir %{_libdir}/mozilla/extensions/%{firefox_app_id}
|
||||
%dir %{_datadir}/mozilla/extensions/*
|
||||
%dir %{_libdir}/mozilla/extensions/*
|
||||
%{_datadir}/appdata/*.appdata.xml
|
||||
%{_datadir}/applications/*.desktop
|
||||
%dir %{mozappdir}
|
||||
@ -765,13 +757,12 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
|
||||
%{mozappdir}/browser/defaults/preferences/firefox-redhat-default-prefs.js
|
||||
%attr(644, root, root) %{mozappdir}/browser/blocklist.xml
|
||||
%dir %{mozappdir}/browser/extensions
|
||||
%{mozappdir}/browser/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}
|
||||
%{mozappdir}/browser/extensions/*
|
||||
%if %{build_langpacks}
|
||||
%dir %{langpackdir}
|
||||
%endif
|
||||
%{mozappdir}/browser/omni.ja
|
||||
%{mozappdir}/browser/icons
|
||||
%{mozappdir}/browser/searchplugins
|
||||
%{mozappdir}/run-mozilla.sh
|
||||
%{mozappdir}/application.ini
|
||||
%exclude %{mozappdir}/removed-files
|
||||
@ -814,6 +805,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
|
||||
#---------------------------------------------------------------------
|
||||
|
||||
%changelog
|
||||
* Fri Aug 07 2015 Martin Stransky <stransky@redhat.com> - 40.0-1
|
||||
- Update to 40.0 Build 4
|
||||
|
||||
* Thu Aug 06 2015 Martin Stransky <stransky@redhat.com> - 39.0.3-1
|
||||
- Updated to 39.0.3
|
||||
|
||||
|
@ -1,463 +0,0 @@
|
||||
diff --git a/widget/gtk/gtk3drawing.c b/widget/gtk/gtk3drawing.c
|
||||
--- a/widget/gtk/gtk3drawing.c
|
||||
+++ b/widget/gtk/gtk3drawing.c
|
||||
@@ -2098,18 +2098,23 @@ moz_gtk_progress_chunk_paint(cairo_t *cr
|
||||
return MOZ_GTK_SUCCESS;
|
||||
}
|
||||
|
||||
gint
|
||||
moz_gtk_get_tab_thickness(void)
|
||||
{
|
||||
GtkBorder border;
|
||||
GtkStyleContext * style;
|
||||
+ gboolean has_tab_gap;
|
||||
|
||||
ensure_tab_widget();
|
||||
+ gtk_widget_style_get(gTabWidget, "has-tab-gap", &has_tab_gap, NULL);
|
||||
+ if (!has_tab_gap)
|
||||
+ return 0; /* don't use ythickness for tabs without a gap */
|
||||
+
|
||||
style = gtk_widget_get_style_context(gTabWidget);
|
||||
gtk_style_context_add_class(style, GTK_STYLE_CLASS_NOTEBOOK);
|
||||
gtk_style_context_get_border(style, 0, &border);
|
||||
|
||||
if (border.top < 2)
|
||||
return 2; /* some themes don't set ythickness correctly */
|
||||
|
||||
return border.top;
|
||||
@@ -2140,172 +2145,196 @@ moz_gtk_tab_paint(cairo_t *cr, GdkRectan
|
||||
* When it is selected, we overwrite the adjacent border of the tabpanel
|
||||
* touching the tab with a pierced border (called "the gap") to make the
|
||||
* tab appear physically attached to the tabpanel; see details below. */
|
||||
|
||||
GtkStyleContext* style;
|
||||
GdkRectangle tabRect;
|
||||
GdkRectangle focusRect;
|
||||
GdkRectangle backRect;
|
||||
+ gboolean has_tab_gap;
|
||||
int initial_gap = 0;
|
||||
|
||||
ensure_tab_widget();
|
||||
gtk_widget_set_direction(gTabWidget, direction);
|
||||
|
||||
style = gtk_widget_get_style_context(gTabWidget);
|
||||
gtk_style_context_save(style);
|
||||
moz_gtk_tab_prepare_style_context(style, flags);
|
||||
|
||||
- tabRect = *rect;
|
||||
-
|
||||
- if (flags & MOZ_GTK_TAB_FIRST) {
|
||||
- gtk_widget_style_get (gTabWidget, "initial-gap", &initial_gap, NULL);
|
||||
- tabRect.width -= initial_gap;
|
||||
-
|
||||
- if (direction != GTK_TEXT_DIR_RTL) {
|
||||
- tabRect.x += initial_gap;
|
||||
+ gtk_widget_style_get(gTabWidget, "has-tab-gap", &has_tab_gap, NULL);
|
||||
+ if (has_tab_gap) {
|
||||
+ tabRect = *rect;
|
||||
+ if (flags & MOZ_GTK_TAB_FIRST) {
|
||||
+ gtk_widget_style_get (gTabWidget, "initial-gap", &initial_gap, NULL);
|
||||
+ tabRect.width -= initial_gap;
|
||||
+
|
||||
+ if (direction != GTK_TEXT_DIR_RTL) {
|
||||
+ tabRect.x += initial_gap;
|
||||
+ }
|
||||
}
|
||||
- }
|
||||
-
|
||||
- focusRect = backRect = tabRect;
|
||||
-
|
||||
- if ((flags & MOZ_GTK_TAB_SELECTED) == 0) {
|
||||
- /* Only draw the tab */
|
||||
- gtk_render_extension(style, cr,
|
||||
- tabRect.x, tabRect.y, tabRect.width, tabRect.height,
|
||||
- (flags & MOZ_GTK_TAB_BOTTOM) ?
|
||||
- GTK_POS_TOP : GTK_POS_BOTTOM );
|
||||
+
|
||||
+ focusRect = backRect = tabRect;
|
||||
+
|
||||
+ if ((flags & MOZ_GTK_TAB_SELECTED) == 0) {
|
||||
+ /* Only draw the tab */
|
||||
+ gtk_render_extension(style, cr,
|
||||
+ tabRect.x, tabRect.y, tabRect.width, tabRect.height,
|
||||
+ (flags & MOZ_GTK_TAB_BOTTOM) ?
|
||||
+ GTK_POS_TOP : GTK_POS_BOTTOM );
|
||||
+ } else {
|
||||
+ /* Draw the tab and the gap
|
||||
+ * We want the gap to be positioned exactly on the tabpanel top
|
||||
+ * border; since tabbox.css may set a negative margin so that the tab
|
||||
+ * frame rect already overlaps the tabpanel frame rect, we need to take
|
||||
+ * that into account when drawing. To that effect, nsNativeThemeGTK
|
||||
+ * passes us this negative margin (bmargin in the graphic below) in the
|
||||
+ * lowest bits of |flags|. We use it to set gap_voffset, the distance
|
||||
+ * between the top of the gap and the bottom of the tab (resp. the
|
||||
+ * bottom of the gap and the top of the tab when we draw a bottom tab),
|
||||
+ * while ensuring that the gap always touches the border of the tab,
|
||||
+ * i.e. 0 <= gap_voffset <= gap_height, to avoid surprinsing results
|
||||
+ * with big negative or positive margins.
|
||||
+ * Here is a graphical explanation in the case of top tabs:
|
||||
+ * ___________________________
|
||||
+ * / \
|
||||
+ * | T A B |
|
||||
+ * ----------|. . . . . . . . . . . . . . .|----- top of tabpanel
|
||||
+ * : ^ bmargin : ^
|
||||
+ * : | (-negative margin, : |
|
||||
+ * bottom : v passed in flags) : | gap_height
|
||||
+ * of -> :.............................: | (the size of the
|
||||
+ * the tab . part of the gap . | tabpanel top border)
|
||||
+ * . outside of the tab . v
|
||||
+ * ----------------------------------------------
|
||||
+ *
|
||||
+ * To draw the gap, we use gtk_paint_box_gap(), see comment in
|
||||
+ * moz_gtk_tabpanels_paint(). This box_gap is made 3 * gap_height tall,
|
||||
+ * which should suffice to ensure that the only visible border is the
|
||||
+ * pierced one. If the tab is in the middle, we make the box_gap begin
|
||||
+ * a bit to the left of the tab and end a bit to the right, adjusting
|
||||
+ * the gap position so it still is under the tab, because we want the
|
||||
+ * rendering of a gap in the middle of a tabpanel. This is the role of
|
||||
+ * the gints gap_{l,r}_offset. On the contrary, if the tab is the
|
||||
+ * first, we align the start border of the box_gap with the start
|
||||
+ * border of the tab (left if LTR, right if RTL), by setting the
|
||||
+ * appropriate offset to 0.*/
|
||||
+ gint gap_loffset, gap_roffset, gap_voffset, gap_height;
|
||||
+
|
||||
+ /* Get height needed by the gap */
|
||||
+ gap_height = moz_gtk_get_tab_thickness();
|
||||
+
|
||||
+ /* Extract gap_voffset from the first bits of flags */
|
||||
+ gap_voffset = flags & MOZ_GTK_TAB_MARGIN_MASK;
|
||||
+ if (gap_voffset > gap_height)
|
||||
+ gap_voffset = gap_height;
|
||||
+
|
||||
+ /* Set gap_{l,r}_offset to appropriate values */
|
||||
+ gap_loffset = gap_roffset = 20; /* should be enough */
|
||||
+ if (flags & MOZ_GTK_TAB_FIRST) {
|
||||
+ if (direction == GTK_TEXT_DIR_RTL)
|
||||
+ gap_roffset = initial_gap;
|
||||
+ else
|
||||
+ gap_loffset = initial_gap;
|
||||
+ }
|
||||
+
|
||||
+ if (flags & MOZ_GTK_TAB_BOTTOM) {
|
||||
+ /* Draw the tab on bottom */
|
||||
+ focusRect.y += gap_voffset;
|
||||
+ focusRect.height -= gap_voffset;
|
||||
+
|
||||
+ gtk_render_extension(style, cr,
|
||||
+ tabRect.x, tabRect.y + gap_voffset, tabRect.width,
|
||||
+ tabRect.height - gap_voffset, GTK_POS_TOP);
|
||||
+
|
||||
+ gtk_style_context_remove_region(style, GTK_STYLE_REGION_TAB);
|
||||
+
|
||||
+ backRect.y += (gap_voffset - gap_height);
|
||||
+ backRect.height = gap_height;
|
||||
+
|
||||
+ /* Draw the gap; erase with background color before painting in
|
||||
+ * case theme does not */
|
||||
+ gtk_render_background(style, cr, backRect.x, backRect.y,
|
||||
+ backRect.width, backRect.height);
|
||||
+ cairo_save(cr);
|
||||
+ cairo_rectangle(cr, backRect.x, backRect.y, backRect.width, backRect.height);
|
||||
+ cairo_clip(cr);
|
||||
+
|
||||
+ gtk_render_frame_gap(style, cr,
|
||||
+ tabRect.x - gap_loffset,
|
||||
+ tabRect.y + gap_voffset - 3 * gap_height,
|
||||
+ tabRect.width + gap_loffset + gap_roffset,
|
||||
+ 3 * gap_height, GTK_POS_BOTTOM,
|
||||
+ gap_loffset, gap_loffset + tabRect.width);
|
||||
+ cairo_restore(cr);
|
||||
+ } else {
|
||||
+ /* Draw the tab on top */
|
||||
+ focusRect.height -= gap_voffset;
|
||||
+ gtk_render_extension(style, cr,
|
||||
+ tabRect.x, tabRect.y, tabRect.width,
|
||||
+ tabRect.height - gap_voffset, GTK_POS_BOTTOM);
|
||||
+
|
||||
+ gtk_style_context_remove_region(style, GTK_STYLE_REGION_TAB);
|
||||
+
|
||||
+ backRect.y += (tabRect.height - gap_voffset);
|
||||
+ backRect.height = gap_height;
|
||||
+
|
||||
+ /* Draw the gap; erase with background color before painting in
|
||||
+ * case theme does not */
|
||||
+ gtk_render_background(style, cr, backRect.x, backRect.y,
|
||||
+ backRect.width, backRect.height);
|
||||
+
|
||||
+ cairo_save(cr);
|
||||
+ cairo_rectangle(cr, backRect.x, backRect.y, backRect.width, backRect.height);
|
||||
+ cairo_clip(cr);
|
||||
+
|
||||
+ gtk_render_frame_gap(style, cr,
|
||||
+ tabRect.x - gap_loffset,
|
||||
+ tabRect.y + tabRect.height - gap_voffset,
|
||||
+ tabRect.width + gap_loffset + gap_roffset,
|
||||
+ 3 * gap_height, GTK_POS_TOP,
|
||||
+ gap_loffset, gap_loffset + tabRect.width);
|
||||
+ cairo_restore(cr);
|
||||
+ }
|
||||
+
|
||||
+ if (state->focused) {
|
||||
+ /* Paint the focus ring */
|
||||
+ GtkBorder border;
|
||||
+ gtk_style_context_get_border(style, GetStateFlagsFromGtkWidgetState(state), &border);
|
||||
+
|
||||
+ focusRect.x += border.left;
|
||||
+ focusRect.width -= (border.left + border.right);
|
||||
+ focusRect.y += border.top;
|
||||
+ focusRect.height -= (border.top + border.bottom);
|
||||
+
|
||||
+ gtk_render_focus(style, cr,
|
||||
+ focusRect.x, focusRect.y, focusRect.width, focusRect.height);
|
||||
+ }
|
||||
+ }
|
||||
} else {
|
||||
- /* Draw the tab and the gap
|
||||
- * We want the gap to be positioned exactly on the tabpanel top
|
||||
- * border; since tabbox.css may set a negative margin so that the tab
|
||||
- * frame rect already overlaps the tabpanel frame rect, we need to take
|
||||
- * that into account when drawing. To that effect, nsNativeThemeGTK
|
||||
- * passes us this negative margin (bmargin in the graphic below) in the
|
||||
- * lowest bits of |flags|. We use it to set gap_voffset, the distance
|
||||
- * between the top of the gap and the bottom of the tab (resp. the
|
||||
- * bottom of the gap and the top of the tab when we draw a bottom tab),
|
||||
- * while ensuring that the gap always touches the border of the tab,
|
||||
- * i.e. 0 <= gap_voffset <= gap_height, to avoid surprinsing results
|
||||
- * with big negative or positive margins.
|
||||
- * Here is a graphical explanation in the case of top tabs:
|
||||
- * ___________________________
|
||||
- * / \
|
||||
- * | T A B |
|
||||
- * ----------|. . . . . . . . . . . . . . .|----- top of tabpanel
|
||||
- * : ^ bmargin : ^
|
||||
- * : | (-negative margin, : |
|
||||
- * bottom : v passed in flags) : | gap_height
|
||||
- * of -> :.............................: | (the size of the
|
||||
- * the tab . part of the gap . | tabpanel top border)
|
||||
- * . outside of the tab . v
|
||||
- * ----------------------------------------------
|
||||
- *
|
||||
- * To draw the gap, we use gtk_paint_box_gap(), see comment in
|
||||
- * moz_gtk_tabpanels_paint(). This box_gap is made 3 * gap_height tall,
|
||||
- * which should suffice to ensure that the only visible border is the
|
||||
- * pierced one. If the tab is in the middle, we make the box_gap begin
|
||||
- * a bit to the left of the tab and end a bit to the right, adjusting
|
||||
- * the gap position so it still is under the tab, because we want the
|
||||
- * rendering of a gap in the middle of a tabpanel. This is the role of
|
||||
- * the gints gap_{l,r}_offset. On the contrary, if the tab is the
|
||||
- * first, we align the start border of the box_gap with the start
|
||||
- * border of the tab (left if LTR, right if RTL), by setting the
|
||||
- * appropriate offset to 0.*/
|
||||
- gint gap_loffset, gap_roffset, gap_voffset, gap_height;
|
||||
-
|
||||
- /* Get height needed by the gap */
|
||||
- gap_height = moz_gtk_get_tab_thickness();
|
||||
-
|
||||
- /* Extract gap_voffset from the first bits of flags */
|
||||
- gap_voffset = flags & MOZ_GTK_TAB_MARGIN_MASK;
|
||||
- if (gap_voffset > gap_height)
|
||||
- gap_voffset = gap_height;
|
||||
-
|
||||
- /* Set gap_{l,r}_offset to appropriate values */
|
||||
- gap_loffset = gap_roffset = 20; /* should be enough */
|
||||
- if (flags & MOZ_GTK_TAB_FIRST) {
|
||||
- if (direction == GTK_TEXT_DIR_RTL)
|
||||
- gap_roffset = initial_gap;
|
||||
- else
|
||||
- gap_loffset = initial_gap;
|
||||
+ gtk_render_background(style, cr, rect->x, rect->y, rect->width, rect->height);
|
||||
+ gtk_render_frame(style, cr, rect->x, rect->y,rect->width, rect->height);
|
||||
+
|
||||
+ if (state->focused) {
|
||||
+ /* Paint the focus ring */
|
||||
+ GtkBorder padding;
|
||||
+
|
||||
+ GtkStateFlags state_flags = GetStateFlagsFromGtkWidgetState(state);
|
||||
+
|
||||
+ focusRect = *rect;
|
||||
+ gtk_style_context_get_padding(style, state_flags, &padding);
|
||||
+
|
||||
+ focusRect.x += padding.left;
|
||||
+ focusRect.width -= (padding.left + padding.right);
|
||||
+ focusRect.y += padding.top;
|
||||
+ focusRect.height -= (padding.top + padding.bottom);
|
||||
+
|
||||
+ gtk_render_focus(style, cr,
|
||||
+ focusRect.x, focusRect.y, focusRect.width, focusRect.height);
|
||||
}
|
||||
-
|
||||
- if (flags & MOZ_GTK_TAB_BOTTOM) {
|
||||
- /* Draw the tab on bottom */
|
||||
- focusRect.y += gap_voffset;
|
||||
- focusRect.height -= gap_voffset;
|
||||
-
|
||||
- gtk_render_extension(style, cr,
|
||||
- tabRect.x, tabRect.y + gap_voffset, tabRect.width,
|
||||
- tabRect.height - gap_voffset, GTK_POS_TOP);
|
||||
-
|
||||
- gtk_style_context_remove_region(style, GTK_STYLE_REGION_TAB);
|
||||
-
|
||||
- backRect.y += (gap_voffset - gap_height);
|
||||
- backRect.height = gap_height;
|
||||
-
|
||||
- /* Draw the gap; erase with background color before painting in
|
||||
- * case theme does not */
|
||||
- gtk_render_background(style, cr, backRect.x, backRect.y,
|
||||
- backRect.width, backRect.height);
|
||||
- cairo_save(cr);
|
||||
- cairo_rectangle(cr, backRect.x, backRect.y, backRect.width, backRect.height);
|
||||
- cairo_clip(cr);
|
||||
-
|
||||
- gtk_render_frame_gap(style, cr,
|
||||
- tabRect.x - gap_loffset,
|
||||
- tabRect.y + gap_voffset - 3 * gap_height,
|
||||
- tabRect.width + gap_loffset + gap_roffset,
|
||||
- 3 * gap_height, GTK_POS_BOTTOM,
|
||||
- gap_loffset, gap_loffset + tabRect.width);
|
||||
- cairo_restore(cr);
|
||||
- } else {
|
||||
- /* Draw the tab on top */
|
||||
- focusRect.height -= gap_voffset;
|
||||
- gtk_render_extension(style, cr,
|
||||
- tabRect.x, tabRect.y, tabRect.width,
|
||||
- tabRect.height - gap_voffset, GTK_POS_BOTTOM);
|
||||
-
|
||||
- gtk_style_context_remove_region(style, GTK_STYLE_REGION_TAB);
|
||||
-
|
||||
- backRect.y += (tabRect.height - gap_voffset);
|
||||
- backRect.height = gap_height;
|
||||
-
|
||||
- /* Draw the gap; erase with background color before painting in
|
||||
- * case theme does not */
|
||||
- gtk_render_background(style, cr, backRect.x, backRect.y,
|
||||
- backRect.width, backRect.height);
|
||||
-
|
||||
- cairo_save(cr);
|
||||
- cairo_rectangle(cr, backRect.x, backRect.y, backRect.width, backRect.height);
|
||||
- cairo_clip(cr);
|
||||
-
|
||||
- gtk_render_frame_gap(style, cr,
|
||||
- tabRect.x - gap_loffset,
|
||||
- tabRect.y + tabRect.height - gap_voffset,
|
||||
- tabRect.width + gap_loffset + gap_roffset,
|
||||
- 3 * gap_height, GTK_POS_TOP,
|
||||
- gap_loffset, gap_loffset + tabRect.width);
|
||||
- cairo_restore(cr);
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- if (state->focused) {
|
||||
- /* Paint the focus ring */
|
||||
- GtkBorder border;
|
||||
- gtk_style_context_get_border(style, GetStateFlagsFromGtkWidgetState(state), &border);
|
||||
-
|
||||
- focusRect.x += border.left;
|
||||
- focusRect.width -= (border.left + border.right);
|
||||
- focusRect.y += border.top;
|
||||
- focusRect.height -= (border.top + border.bottom);
|
||||
-
|
||||
- gtk_render_focus(style, cr,
|
||||
- focusRect.x, focusRect.y, focusRect.width, focusRect.height);
|
||||
}
|
||||
|
||||
gtk_style_context_restore(style);
|
||||
|
||||
return MOZ_GTK_SUCCESS;
|
||||
}
|
||||
|
||||
/* tab area*/
|
||||
@@ -2963,48 +2992,53 @@ moz_gtk_get_widget_border(GtkThemeWidget
|
||||
}
|
||||
|
||||
gint
|
||||
moz_gtk_get_tab_border(gint* left, gint* top, gint* right, gint* bottom,
|
||||
GtkTextDirection direction, GtkTabFlags flags)
|
||||
{
|
||||
GtkStyleContext* style;
|
||||
int tab_curvature;
|
||||
+ gboolean has_tab_gap;
|
||||
|
||||
ensure_tab_widget();
|
||||
|
||||
style = gtk_widget_get_style_context(gTabWidget);
|
||||
gtk_style_context_save(style);
|
||||
moz_gtk_tab_prepare_style_context(style, flags);
|
||||
|
||||
// TODO add_style_border() should be replaced
|
||||
// with focus-line-width and focus-padding
|
||||
// see Bug 877605
|
||||
*left = *top = *right = *bottom = 0;
|
||||
- moz_gtk_add_style_border(style, left, top, right, bottom);
|
||||
moz_gtk_add_style_padding(style, left, top, right, bottom);
|
||||
|
||||
- gtk_widget_style_get (gTabWidget, "tab-curvature", &tab_curvature, NULL);
|
||||
- *left += tab_curvature;
|
||||
- *right += tab_curvature;
|
||||
-
|
||||
- if (flags & MOZ_GTK_TAB_FIRST) {
|
||||
- int initial_gap;
|
||||
- gtk_widget_style_get (gTabWidget, "initial-gap", &initial_gap, NULL);
|
||||
- if (direction == GTK_TEXT_DIR_RTL)
|
||||
- *right += initial_gap;
|
||||
- else
|
||||
- *left += initial_gap;
|
||||
- }
|
||||
-
|
||||
- // Top tabs have no bottom border, bottom tabs have no top border
|
||||
- if (flags & MOZ_GTK_TAB_BOTTOM) {
|
||||
- *top = 0;
|
||||
- } else {
|
||||
- *bottom = 0;
|
||||
+ gtk_widget_style_get(gTabWidget, "has-tab-gap", &has_tab_gap, NULL);
|
||||
+ if (has_tab_gap) {
|
||||
+ moz_gtk_add_style_border(style, left, top, right, bottom);
|
||||
+
|
||||
+ gtk_widget_style_get (gTabWidget, "tab-curvature", &tab_curvature, NULL);
|
||||
+ *left += tab_curvature;
|
||||
+ *right += tab_curvature;
|
||||
+
|
||||
+ if (flags & MOZ_GTK_TAB_FIRST) {
|
||||
+ int initial_gap;
|
||||
+ gtk_widget_style_get (gTabWidget, "initial-gap", &initial_gap, NULL);
|
||||
+ if (direction == GTK_TEXT_DIR_RTL)
|
||||
+ *right += initial_gap;
|
||||
+ else
|
||||
+ *left += initial_gap;
|
||||
+ }
|
||||
+
|
||||
+ // Top tabs have no bottom border, bottom tabs have no top border
|
||||
+ if (flags & MOZ_GTK_TAB_BOTTOM) {
|
||||
+ *top = 0;
|
||||
+ } else {
|
||||
+ *bottom = 0;
|
||||
+ }
|
||||
}
|
||||
|
||||
gtk_style_context_restore(style);
|
||||
|
||||
return MOZ_GTK_SUCCESS;
|
||||
}
|
||||
|
||||
gint
|
||||
diff --git a/widget/gtk/nsNativeThemeGTK.cpp b/widget/gtk/nsNativeThemeGTK.cpp
|
||||
--- a/widget/gtk/nsNativeThemeGTK.cpp
|
||||
+++ b/widget/gtk/nsNativeThemeGTK.cpp
|
||||
@@ -756,16 +756,18 @@ nsNativeThemeGTK::GetExtraSizeForWidget(
|
||||
return true;
|
||||
}
|
||||
case NS_THEME_TAB :
|
||||
{
|
||||
if (!IsSelectedTab(aFrame))
|
||||
return false;
|
||||
|
||||
gint gap_height = moz_gtk_get_tab_thickness();
|
||||
+ if (!gap_height)
|
||||
+ return false;
|
||||
|
||||
int32_t extra = gap_height - GetTabMarginPixels(aFrame);
|
||||
if (extra <= 0)
|
||||
return false;
|
||||
|
||||
if (IsBottomTab(aFrame)) {
|
||||
aExtra->top = extra;
|
||||
} else {
|
@ -1,150 +0,0 @@
|
||||
diff -up mozilla-release/widget/gtk/nsNativeThemeGTK.cpp.1144745-1 mozilla-release/widget/gtk/nsNativeThemeGTK.cpp
|
||||
--- mozilla-release/widget/gtk/nsNativeThemeGTK.cpp.1144745-1 2015-05-13 10:25:28.638492635 +0200
|
||||
+++ mozilla-release/widget/gtk/nsNativeThemeGTK.cpp 2015-05-13 10:28:41.438095846 +0200
|
||||
@@ -32,6 +32,7 @@
|
||||
#include "gfxPlatformGtk.h"
|
||||
#include "gfxGdkNativeRenderer.h"
|
||||
#include <algorithm>
|
||||
+#include <dlfcn.h>
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::gfx;
|
||||
@@ -88,6 +89,24 @@ nsNativeThemeGTK::RefreshWidgetWindow(ns
|
||||
vm->InvalidateAllViews();
|
||||
}
|
||||
|
||||
+gint
|
||||
+nsNativeThemeGTK::GdkScaleFactor()
|
||||
+{
|
||||
+#if (MOZ_WIDGET_GTK >= 3)
|
||||
+ // Since GDK 3.10
|
||||
+ static auto sGdkScreenGetMonitorScaleFactorPtr = (gint (*)(GdkScreen*, gint))
|
||||
+ dlsym(RTLD_DEFAULT, "gdk_screen_get_monitor_scale_factor");
|
||||
+ if (sGdkScreenGetMonitorScaleFactorPtr) {
|
||||
+ // FIXME: In the future, we'll want to fix this for GTK on Wayland which
|
||||
+ // supports a variable scale factor per display.
|
||||
+ GdkScreen *screen = gdk_screen_get_default();
|
||||
+ return sGdkScreenGetMonitorScaleFactorPtr(screen, 0);
|
||||
+ }
|
||||
+#endif
|
||||
+ return 1;
|
||||
+}
|
||||
+
|
||||
+
|
||||
static bool IsFrameContentNodeInNamespace(nsIFrame *aFrame, uint32_t aNamespace)
|
||||
{
|
||||
nsIContent *content = aFrame ? aFrame->GetContent() : nullptr;
|
||||
@@ -711,10 +730,10 @@ nsNativeThemeGTK::GetExtraSizeForWidget(
|
||||
switch (aWidgetType) {
|
||||
case NS_THEME_SCROLLBAR_THUMB_VERTICAL:
|
||||
aExtra->top = aExtra->bottom = 1;
|
||||
- return true;
|
||||
+ break;
|
||||
case NS_THEME_SCROLLBAR_THUMB_HORIZONTAL:
|
||||
aExtra->left = aExtra->right = 1;
|
||||
- return true;
|
||||
+ break;
|
||||
|
||||
// Include the indicator spacing (the padding around the control).
|
||||
case NS_THEME_CHECKBOX:
|
||||
@@ -732,7 +751,7 @@ nsNativeThemeGTK::GetExtraSizeForWidget(
|
||||
aExtra->right = indicator_spacing;
|
||||
aExtra->bottom = indicator_spacing;
|
||||
aExtra->left = indicator_spacing;
|
||||
- return true;
|
||||
+ break;
|
||||
}
|
||||
case NS_THEME_BUTTON :
|
||||
{
|
||||
@@ -745,7 +764,7 @@ nsNativeThemeGTK::GetExtraSizeForWidget(
|
||||
aExtra->right = right;
|
||||
aExtra->bottom = bottom;
|
||||
aExtra->left = left;
|
||||
- return true;
|
||||
+ break;
|
||||
}
|
||||
}
|
||||
case NS_THEME_FOCUS_OUTLINE:
|
||||
@@ -753,7 +772,7 @@ nsNativeThemeGTK::GetExtraSizeForWidget(
|
||||
moz_gtk_get_focus_outline_size(&aExtra->left, &aExtra->top);
|
||||
aExtra->right = aExtra->left;
|
||||
aExtra->bottom = aExtra->top;
|
||||
- return true;
|
||||
+ break;
|
||||
}
|
||||
case NS_THEME_TAB :
|
||||
{
|
||||
@@ -777,6 +796,11 @@ nsNativeThemeGTK::GetExtraSizeForWidget(
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
+ aExtra->top *= GdkScaleFactor();
|
||||
+ aExtra->right *= GdkScaleFactor();
|
||||
+ aExtra->bottom *= GdkScaleFactor();
|
||||
+ aExtra->left *= GdkScaleFactor();
|
||||
+ return true;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
@@ -803,6 +827,7 @@ nsNativeThemeGTK::DrawWidgetBackground(n
|
||||
|
||||
gfxRect rect = presContext->AppUnitsToGfxUnits(aRect);
|
||||
gfxRect dirtyRect = presContext->AppUnitsToGfxUnits(aDirtyRect);
|
||||
+ gint scaleFactor = GdkScaleFactor();
|
||||
|
||||
// Align to device pixels where sensible
|
||||
// to provide crisper and faster drawing.
|
||||
@@ -840,8 +865,10 @@ nsNativeThemeGTK::DrawWidgetBackground(n
|
||||
|
||||
// gdk rectangles are wrt the drawing rect.
|
||||
|
||||
- GdkRectangle gdk_rect = {-drawingRect.x, -drawingRect.y,
|
||||
- widgetRect.width, widgetRect.height};
|
||||
+ GdkRectangle gdk_rect = {-drawingRect.x/scaleFactor,
|
||||
+ -drawingRect.y/scaleFactor,
|
||||
+ widgetRect.width/scaleFactor,
|
||||
+ widgetRect.height/scaleFactor};
|
||||
|
||||
// translate everything so (0,0) is the top left of the drawingRect
|
||||
gfxContextAutoSaveRestore autoSR(ctx);
|
||||
@@ -850,6 +877,7 @@ nsNativeThemeGTK::DrawWidgetBackground(n
|
||||
tm = ctx->CurrentMatrix();
|
||||
}
|
||||
tm.Translate(rect.TopLeft() + gfxPoint(drawingRect.x, drawingRect.y));
|
||||
+ tm.Scale(scaleFactor, scaleFactor); // Draw in GDK coords
|
||||
ctx->SetMatrix(tm);
|
||||
|
||||
NS_ASSERTION(!IsWidgetTypeDisabled(mDisabledWidgetTypes, aWidgetType),
|
||||
@@ -1038,6 +1066,11 @@ nsNativeThemeGTK::GetWidgetPadding(nsDev
|
||||
aResult->left += horizontal_padding;
|
||||
aResult->right += horizontal_padding;
|
||||
|
||||
+ aResult->top *= GdkScaleFactor();
|
||||
+ aResult->right *= GdkScaleFactor();
|
||||
+ aResult->bottom *= GdkScaleFactor();
|
||||
+ aResult->left *= GdkScaleFactor();
|
||||
+
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -1298,6 +1331,9 @@ nsNativeThemeGTK::GetMinimumWidgetSize(n
|
||||
}
|
||||
break;
|
||||
}
|
||||
+
|
||||
+ *aResult = *aResult * GdkScaleFactor();
|
||||
+
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
diff -up mozilla-release/widget/gtk/nsNativeThemeGTK.h.1144745-1 mozilla-release/widget/gtk/nsNativeThemeGTK.h
|
||||
--- mozilla-release/widget/gtk/nsNativeThemeGTK.h.1144745-1 2015-05-08 18:55:27.000000000 +0200
|
||||
+++ mozilla-release/widget/gtk/nsNativeThemeGTK.h 2015-05-13 10:25:28.642492647 +0200
|
||||
@@ -81,6 +81,7 @@ private:
|
||||
nsIntMargin* aExtra);
|
||||
|
||||
void RefreshWidgetWindow(nsIFrame* aFrame);
|
||||
+ gint GdkScaleFactor();
|
||||
|
||||
uint8_t mDisabledWidgetTypes[32];
|
||||
uint8_t mSafeWidgetStates[1024]; // 256 widgets * 32 bits per widget
|
@ -1,185 +0,0 @@
|
||||
diff -up mozilla-release/widget/gtk/nsLookAndFeel.cpp.1144745-2 mozilla-release/widget/gtk/nsLookAndFeel.cpp
|
||||
--- mozilla-release/widget/gtk/nsLookAndFeel.cpp.1144745-2 2015-05-13 10:30:08.204367309 +0200
|
||||
+++ mozilla-release/widget/gtk/nsLookAndFeel.cpp 2015-05-13 10:30:08.208367321 +0200
|
||||
@@ -18,6 +18,7 @@
|
||||
|
||||
#include <fontconfig/fontconfig.h>
|
||||
#include "gfxPlatformGtk.h"
|
||||
+#include "nsScreenGtk.h"
|
||||
|
||||
#include "gtkdrawing.h"
|
||||
#include "nsStyleConsts.h"
|
||||
@@ -742,12 +743,7 @@ GetSystemFontInfo(GtkWidget *aWidget,
|
||||
// Scale fonts up on HiDPI displays.
|
||||
// This would be done automatically with cairo, but we manually manage
|
||||
// the display scale for platform consistency.
|
||||
- static auto sGdkScreenGetMonitorScaleFactorPtr = (gint (*)(GdkScreen*,gint))
|
||||
- dlsym(RTLD_DEFAULT, "gdk_screen_get_monitor_scale_factor");
|
||||
- if (sGdkScreenGetMonitorScaleFactorPtr) {
|
||||
- GdkScreen *screen = gdk_screen_get_default();
|
||||
- size *= (*sGdkScreenGetMonitorScaleFactorPtr)(screen, 0);
|
||||
- }
|
||||
+ size *= nsScreenGtk::GetGtkMonitorScaleFactor();
|
||||
|
||||
// |size| is now pixels
|
||||
|
||||
diff -up mozilla-release/widget/gtk/nsNativeThemeGTK.cpp.1144745-2 mozilla-release/widget/gtk/nsNativeThemeGTK.cpp
|
||||
--- mozilla-release/widget/gtk/nsNativeThemeGTK.cpp.1144745-2 2015-05-13 10:30:08.206367315 +0200
|
||||
+++ mozilla-release/widget/gtk/nsNativeThemeGTK.cpp 2015-05-13 10:30:46.966488584 +0200
|
||||
@@ -6,6 +6,7 @@
|
||||
#include "nsNativeThemeGTK.h"
|
||||
#include "nsThemeConstants.h"
|
||||
#include "gtkdrawing.h"
|
||||
+#include "nsScreenGtk.h"
|
||||
|
||||
#include "nsIObserverService.h"
|
||||
#include "nsIServiceManager.h"
|
||||
@@ -89,23 +90,6 @@ nsNativeThemeGTK::RefreshWidgetWindow(ns
|
||||
vm->InvalidateAllViews();
|
||||
}
|
||||
|
||||
-gint
|
||||
-nsNativeThemeGTK::GdkScaleFactor()
|
||||
-{
|
||||
-#if (MOZ_WIDGET_GTK >= 3)
|
||||
- // Since GDK 3.10
|
||||
- static auto sGdkScreenGetMonitorScaleFactorPtr = (gint (*)(GdkScreen*, gint))
|
||||
- dlsym(RTLD_DEFAULT, "gdk_screen_get_monitor_scale_factor");
|
||||
- if (sGdkScreenGetMonitorScaleFactorPtr) {
|
||||
- // FIXME: In the future, we'll want to fix this for GTK on Wayland which
|
||||
- // supports a variable scale factor per display.
|
||||
- GdkScreen *screen = gdk_screen_get_default();
|
||||
- return sGdkScreenGetMonitorScaleFactorPtr(screen, 0);
|
||||
- }
|
||||
-#endif
|
||||
- return 1;
|
||||
-}
|
||||
-
|
||||
|
||||
static bool IsFrameContentNodeInNamespace(nsIFrame *aFrame, uint32_t aNamespace)
|
||||
{
|
||||
@@ -796,10 +780,11 @@ nsNativeThemeGTK::GetExtraSizeForWidget(
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
- aExtra->top *= GdkScaleFactor();
|
||||
- aExtra->right *= GdkScaleFactor();
|
||||
- aExtra->bottom *= GdkScaleFactor();
|
||||
- aExtra->left *= GdkScaleFactor();
|
||||
+ gint scale = nsScreenGtk::GetGtkMonitorScaleFactor();
|
||||
+ aExtra->top *= scale;
|
||||
+ aExtra->right *= scale;
|
||||
+ aExtra->bottom *= scale;
|
||||
+ aExtra->left *= scale;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -827,7 +812,7 @@ nsNativeThemeGTK::DrawWidgetBackground(n
|
||||
|
||||
gfxRect rect = presContext->AppUnitsToGfxUnits(aRect);
|
||||
gfxRect dirtyRect = presContext->AppUnitsToGfxUnits(aDirtyRect);
|
||||
- gint scaleFactor = GdkScaleFactor();
|
||||
+ gint scaleFactor = nsScreenGtk::GetGtkMonitorScaleFactor();
|
||||
|
||||
// Align to device pixels where sensible
|
||||
// to provide crisper and faster drawing.
|
||||
@@ -1066,10 +1051,11 @@ nsNativeThemeGTK::GetWidgetPadding(nsDev
|
||||
aResult->left += horizontal_padding;
|
||||
aResult->right += horizontal_padding;
|
||||
|
||||
- aResult->top *= GdkScaleFactor();
|
||||
- aResult->right *= GdkScaleFactor();
|
||||
- aResult->bottom *= GdkScaleFactor();
|
||||
- aResult->left *= GdkScaleFactor();
|
||||
+ gint scale = nsScreenGtk::GetGtkMonitorScaleFactor();
|
||||
+ aResult->top *= scale;
|
||||
+ aResult->right *= scale;
|
||||
+ aResult->bottom *= scale;
|
||||
+ aResult->left *= scale;
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -1332,7 +1318,7 @@ nsNativeThemeGTK::GetMinimumWidgetSize(n
|
||||
break;
|
||||
}
|
||||
|
||||
- *aResult = *aResult * GdkScaleFactor();
|
||||
+ *aResult = *aResult * nsScreenGtk::GetGtkMonitorScaleFactor();
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
diff -up mozilla-release/widget/gtk/nsNativeThemeGTK.h.1144745-2 mozilla-release/widget/gtk/nsNativeThemeGTK.h
|
||||
--- mozilla-release/widget/gtk/nsNativeThemeGTK.h.1144745-2 2015-05-13 10:30:08.206367315 +0200
|
||||
+++ mozilla-release/widget/gtk/nsNativeThemeGTK.h 2015-05-13 10:30:08.209367325 +0200
|
||||
@@ -81,7 +81,6 @@ private:
|
||||
nsIntMargin* aExtra);
|
||||
|
||||
void RefreshWidgetWindow(nsIFrame* aFrame);
|
||||
- gint GdkScaleFactor();
|
||||
|
||||
uint8_t mDisabledWidgetTypes[32];
|
||||
uint8_t mSafeWidgetStates[1024]; // 256 widgets * 32 bits per widget
|
||||
diff -up mozilla-release/widget/gtk/nsScreenGtk.cpp.1144745-2 mozilla-release/widget/gtk/nsScreenGtk.cpp
|
||||
--- mozilla-release/widget/gtk/nsScreenGtk.cpp.1144745-2 2015-05-08 18:55:27.000000000 +0200
|
||||
+++ mozilla-release/widget/gtk/nsScreenGtk.cpp 2015-05-13 10:30:08.209367325 +0200
|
||||
@@ -63,6 +63,23 @@ nsScreenGtk :: GetAvailRect(int32_t *out
|
||||
|
||||
} // GetAvailRect
|
||||
|
||||
+gint
|
||||
+nsScreenGtk :: GetGtkMonitorScaleFactor()
|
||||
+{
|
||||
+#if (MOZ_WIDGET_GTK >= 3)
|
||||
+ // Since GDK 3.10
|
||||
+ static auto sGdkScreenGetMonitorScaleFactorPtr = (gint (*)(GdkScreen*, gint))
|
||||
+ dlsym(RTLD_DEFAULT, "gdk_screen_get_monitor_scale_factor");
|
||||
+ if (sGdkScreenGetMonitorScaleFactorPtr) {
|
||||
+ // FIXME: In the future, we'll want to fix this for GTK on Wayland which
|
||||
+ // supports a variable scale factor per display.
|
||||
+ GdkScreen *screen = gdk_screen_get_default();
|
||||
+ return sGdkScreenGetMonitorScaleFactorPtr(screen, 0);
|
||||
+ }
|
||||
+#endif
|
||||
+ return 1;
|
||||
+}
|
||||
+
|
||||
double
|
||||
nsScreenGtk :: GetDPIScale()
|
||||
{
|
||||
@@ -127,20 +144,9 @@ nsScreenGtk :: GetColorDepth(int32_t *aC
|
||||
void
|
||||
nsScreenGtk :: Init (GdkWindow *aRootWindow)
|
||||
{
|
||||
- gint width = gdk_screen_width();
|
||||
- gint height = gdk_screen_height();
|
||||
-
|
||||
- // Since GDK 3.10
|
||||
- static auto sGdkScreenGetMonitorScaleFactorPtr = (gint (*)(GdkScreen*, gint))
|
||||
- dlsym(RTLD_DEFAULT, "gdk_screen_get_monitor_scale_factor");
|
||||
- if (sGdkScreenGetMonitorScaleFactorPtr) {
|
||||
- // FIXME: In the future, we'll want to fix this for GTK on Wayland which
|
||||
- // supports a variable scale factor per display.
|
||||
- GdkScreen *screen = gdk_window_get_screen(aRootWindow);
|
||||
- gint scale = sGdkScreenGetMonitorScaleFactorPtr(screen, 0);
|
||||
- width *= scale;
|
||||
- height *= scale;
|
||||
- }
|
||||
+ gint scale = nsScreenGtk::GetGtkMonitorScaleFactor();
|
||||
+ gint width = gdk_screen_width()*scale;
|
||||
+ gint height = gdk_screen_height()*scale;
|
||||
|
||||
// We listen for configure events on the root window to pick up
|
||||
// changes to this rect. We could listen for "size_changed" signals
|
||||
diff -up mozilla-release/widget/gtk/nsScreenGtk.h.1144745-2 mozilla-release/widget/gtk/nsScreenGtk.h
|
||||
--- mozilla-release/widget/gtk/nsScreenGtk.h.1144745-2 2015-05-08 18:55:27.000000000 +0200
|
||||
+++ mozilla-release/widget/gtk/nsScreenGtk.h 2015-05-13 10:30:08.209367325 +0200
|
||||
@@ -43,7 +43,8 @@ public:
|
||||
void Init(XineramaScreenInfo *aScreenInfo);
|
||||
#endif /* MOZ_X11 */
|
||||
|
||||
- static double GetDPIScale();
|
||||
+ static gint GetGtkMonitorScaleFactor();
|
||||
+ static double GetDPIScale();
|
||||
|
||||
private:
|
||||
uint32_t mScreenNum;
|
@ -1,75 +0,0 @@
|
||||
# HG changeset patch
|
||||
# Parent a0787486ecf5950b5753d265a15e0f9a3b4e2ad4
|
||||
# User Martin Stransky <stransky@redhat.com>
|
||||
Bug 1161056 - Gtk3 - use sMozWindowBackground colors for combobox background. r=karlt
|
||||
|
||||
diff --git a/widget/gtk/nsLookAndFeel.cpp b/widget/gtk/nsLookAndFeel.cpp
|
||||
--- a/widget/gtk/nsLookAndFeel.cpp
|
||||
+++ b/widget/gtk/nsLookAndFeel.cpp
|
||||
@@ -96,16 +96,17 @@ nsLookAndFeel::NativeGetColor(ColorID aI
|
||||
case eColorID_WidgetBackground:
|
||||
case eColorID_TextBackground:
|
||||
case eColorID_activecaption: // active window caption background
|
||||
case eColorID_appworkspace: // MDI background color
|
||||
case eColorID_background: // desktop background
|
||||
case eColorID_window:
|
||||
case eColorID_windowframe:
|
||||
case eColorID__moz_dialog:
|
||||
+ case eColorID__moz_combobox:
|
||||
aColor = sMozWindowBackground;
|
||||
break;
|
||||
case eColorID_WindowForeground:
|
||||
case eColorID_WidgetForeground:
|
||||
case eColorID_TextForeground:
|
||||
case eColorID_captiontext: // text in active window caption, size box, and scrollbar arrow box (!)
|
||||
case eColorID_windowtext:
|
||||
case eColorID__moz_dialogtext:
|
||||
@@ -399,19 +400,21 @@ nsLookAndFeel::NativeGetColor(ColorID aI
|
||||
aColor = sOddCellBackground;
|
||||
break;
|
||||
case eColorID__moz_nativehyperlinktext:
|
||||
aColor = sNativeHyperLinkText;
|
||||
break;
|
||||
case eColorID__moz_comboboxtext:
|
||||
aColor = sComboBoxText;
|
||||
break;
|
||||
+#if (MOZ_WIDGET_GTK == 2)
|
||||
case eColorID__moz_combobox:
|
||||
aColor = sComboBoxBackground;
|
||||
break;
|
||||
+#endif
|
||||
case eColorID__moz_menubartext:
|
||||
aColor = sMenuBarText;
|
||||
break;
|
||||
case eColorID__moz_menubarhovertext:
|
||||
aColor = sMenuBarHoverText;
|
||||
break;
|
||||
default:
|
||||
/* default color is BLACK */
|
||||
@@ -1143,25 +1146,21 @@ nsLookAndFeel::Init()
|
||||
#else
|
||||
// Button text, background, border
|
||||
style = gtk_widget_get_style_context(label);
|
||||
gtk_style_context_get_color(style, GTK_STATE_FLAG_NORMAL, &color);
|
||||
sButtonText = GDK_RGBA_TO_NS_RGBA(color);
|
||||
gtk_style_context_get_color(style, GTK_STATE_FLAG_PRELIGHT, &color);
|
||||
sButtonHoverText = GDK_RGBA_TO_NS_RGBA(color);
|
||||
|
||||
- // Combobox label and background colors
|
||||
+ // Combobox text color
|
||||
style = gtk_widget_get_style_context(comboboxLabel);
|
||||
gtk_style_context_get_color(style, GTK_STATE_FLAG_NORMAL, &color);
|
||||
sComboBoxText = GDK_RGBA_TO_NS_RGBA(color);
|
||||
|
||||
- style = gtk_widget_get_style_context(combobox);
|
||||
- gtk_style_context_get_background_color(style, GTK_STATE_FLAG_NORMAL, &color);
|
||||
- sComboBoxBackground = GDK_RGBA_TO_NS_RGBA(color);
|
||||
-
|
||||
// Menubar text and hover text colors
|
||||
style = gtk_widget_get_style_context(menuBar);
|
||||
gtk_style_context_get_color(style, GTK_STATE_FLAG_NORMAL, &color);
|
||||
sMenuBarText = GDK_RGBA_TO_NS_RGBA(color);
|
||||
gtk_style_context_get_color(style, GTK_STATE_FLAG_PRELIGHT, &color);
|
||||
sMenuBarHoverText = GDK_RGBA_TO_NS_RGBA(color);
|
||||
|
||||
// GTK's guide to fancy odd row background colors:
|
4
sources
4
sources
@ -1,2 +1,2 @@
|
||||
6ef31cbd34d9905a0648104d916269cb firefox-39.0.3.source.tar.bz2
|
||||
e384eddf25cf124e9d0e703f08cfd58c firefox-langpacks-39.0.3-20150806.tar.xz
|
||||
1a092b40a41d76400f58dc7c3c095b04 firefox-40.0.source.tar.bz2
|
||||
81b7dbf0bee8eeb2ef3ef9f8ba25410d firefox-langpacks-40.0-20150807.tar.xz
|
||||
|
Loading…
Reference in New Issue
Block a user