1
0

Accepting request 405482 from mozilla:Factory

1

OBS-URL: https://build.opensuse.org/request/show/405482
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/MozillaFirefox?expand=0&rev=238
This commit is contained in:
Dominique Leuenberger 2016-07-01 07:54:05 +00:00 committed by Git OBS Bridge
commit f3abfef49d
13 changed files with 437 additions and 122 deletions

View File

@ -1,3 +1,32 @@
-------------------------------------------------------------------
Wed Jun 29 09:25:41 UTC 2016 - astieger@suse.com
- Mozilla Firefox 47.0.1:
* Selenium WebDriver may cause Firefox to crash at startup
(bmo#1280854)
-------------------------------------------------------------------
Wed Jun 15 07:52:18 UTC 2016 - wr@rosenauer.org
- mozilla-binutils-visibility.patch to fix build issues with
gcc/binutils combination used in Leap 42.2 (boo#984637)
-------------------------------------------------------------------
Tue Jun 14 08:35:03 UTC 2016 - badshah400@gmail.com
- Update mozilla-gtk3_20.patch to latest version from Fedora.
-------------------------------------------------------------------
Mon Jun 13 20:28:01 UTC 2016 - agraf@suse.com
- Fix running on 48bit va aarch64 (bsc#984126)
* add patch mozilla-aarch64-48bit-va.patch
-------------------------------------------------------------------
Mon Jun 13 15:27:13 UTC 2016 - wr@rosenauer.org
- fix XUL dialog button order under KDE session (boo#984403)
-------------------------------------------------------------------
Tue Jun 7 19:47:25 UTC 2016 - wr@rosenauer.org

View File

@ -19,9 +19,9 @@
# changed with every update
%define major 47
%define mainver %major.0
%define mainver %major.0.1
%define update_channel release
%define releasedate 20160606000000
%define releasedate 20160628000000
# PIE, full relro (x86_64 for now)
%define build_hardened 1
@ -148,6 +148,8 @@ Patch12: mozilla-gtk3_20.patch
Patch13: mozilla-check_return.patch
Patch14: mozilla-gcc6.patch
Patch15: mozilla-exclude-nametablecpp.patch
Patch16: mozilla-aarch64-48bit-va.patch
Patch17: mozilla-binutils-visibility.patch
# Firefox/browser
Patch101: firefox-kde.patch
Patch102: firefox-no-default-ualocale.patch
@ -262,6 +264,8 @@ cd $RPM_BUILD_DIR/mozilla
%patch13 -p1
%patch14 -p1
%patch15 -p1
%patch16 -p1
%patch17 -p1
# Firefox
%patch101 -p1
%patch102 -p1

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:c4152df4a9b9c731975f3805a2be896f2a5f5652f817564938867ee0aba6fbdc
size 28352
oid sha256:a712b91a411dc057c3a215042d4cb19efe5d19c31fe28aaa67e6d396440189e1
size 28488

View File

@ -7,8 +7,8 @@
CHANNEL="release"
BRANCH="releases/mozilla-$CHANNEL"
RELEASE_TAG="FIREFOX_47_0_RELEASE"
VERSION="47.0"
RELEASE_TAG="FIREFOX_47_0_1_RELEASE"
VERSION="47.0.1"
# mozilla
if [ -d mozilla ]; then

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:7ccff7ad45fbce062caec6861ccdec4a819ce0491ffb49079cd11d3c774f5a5e
size 197750616

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:07043674a25291bb61c3bce6c7ba9c44f693a3aa6440172839221e98bee8a1ca
size 198040700

3
l10n-47.0.1.tar.xz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:1528b0e0f76f64fcc349847bdf666a60c2c83a153670b07071569b12917a895f
size 43355844

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:19442f74115dfe49335c27ba6c52a0fdc6017349f836e776db3862d2a97b54c8
size 43605724

View File

@ -0,0 +1,170 @@
# HG changeset patch
# User Zheng Xu <zheng.xu@linaro.org>
# Date 1464657720 -7200
# Node ID dfaafbaaa2919a033c4c0abdd5830f4ea413bed6
# Parent 499f16ca85ec48d1896a1633730715f32bd62140
Bug 1143022 - Manually mmap on arm64 to ensure high 17 bits are clear. r=ehoogeveen
There might be 48-bit VA on arm64 depending on kernel configuration.
Manually mmap heap memory to align with the assumption made by JS engine.
diff --git a/js/src/gc/Memory.cpp b/js/src/gc/Memory.cpp
--- a/js/src/gc/Memory.cpp
+++ b/js/src/gc/Memory.cpp
@@ -430,17 +430,17 @@ InitMemorySubsystem()
if (pageSize == 0)
pageSize = allocGranularity = size_t(sysconf(_SC_PAGESIZE));
}
static inline void*
MapMemoryAt(void* desired, size_t length, int prot = PROT_READ | PROT_WRITE,
int flags = MAP_PRIVATE | MAP_ANON, int fd = -1, off_t offset = 0)
{
-#if defined(__ia64__) || (defined(__sparc64__) && defined(__NetBSD__))
+#if defined(__ia64__) || (defined(__sparc64__) && defined(__NetBSD__)) || defined(__aarch64__)
MOZ_ASSERT(0xffff800000000000ULL & (uintptr_t(desired) + length - 1) == 0);
#endif
void* region = mmap(desired, length, prot, flags, fd, offset);
if (region == MAP_FAILED)
return nullptr;
/*
* mmap treats the given address as a hint unless the MAP_FIXED flag is
* used (which isn't usually what you want, as this overrides existing
@@ -480,16 +480,51 @@ MapMemory(size_t length, int prot = PROT
* as out of memory.
*/
if ((uintptr_t(region) + (length - 1)) & 0xffff800000000000) {
if (munmap(region, length))
MOZ_ASSERT(errno == ENOMEM);
return nullptr;
}
return region;
+#elif defined(__aarch64__)
+ /*
+ * There might be similar virtual address issue on arm64 which depends on
+ * hardware and kernel configurations. But the work around is slightly
+ * different due to the different mmap behavior.
+ *
+ * TODO: Merge with the above code block if this implementation works for
+ * ia64 and sparc64.
+ */
+ const uintptr_t start = UINT64_C(0x0000070000000000);
+ const uintptr_t end = UINT64_C(0x0000800000000000);
+ const uintptr_t step = ChunkSize;
+ /*
+ * Optimization options if there are too many retries in practice:
+ * 1. Examine /proc/self/maps to find an available address. This file is
+ * not always available, however. In addition, even if we examine
+ * /proc/self/maps, we may still need to retry several times due to
+ * racing with other threads.
+ * 2. Use a global/static variable with lock to track the addresses we have
+ * allocated or tried.
+ */
+ uintptr_t hint;
+ void* region = MAP_FAILED;
+ for (hint = start; region == MAP_FAILED && hint + length <= end; hint += step) {
+ region = mmap((void*)hint, length, prot, flags, fd, offset);
+ if (region != MAP_FAILED) {
+ if ((uintptr_t(region) + (length - 1)) & 0xffff800000000000) {
+ if (munmap(region, length)) {
+ MOZ_ASSERT(errno == ENOMEM);
+ }
+ region = MAP_FAILED;
+ }
+ }
+ }
+ return region == MAP_FAILED ? nullptr : region;
#else
void* region = MozTaggedAnonymousMmap(nullptr, length, prot, flags, fd, offset, "js-gc-heap");
if (region == MAP_FAILED)
return nullptr;
return region;
#endif
}
diff --git a/js/src/jsapi-tests/testGCAllocator.cpp b/js/src/jsapi-tests/testGCAllocator.cpp
--- a/js/src/jsapi-tests/testGCAllocator.cpp
+++ b/js/src/jsapi-tests/testGCAllocator.cpp
@@ -307,48 +307,72 @@ void* mapMemoryAt(void* desired, size_t
void* mapMemory(size_t length) { return nullptr; }
void unmapPages(void* p, size_t size) { }
#elif defined(XP_UNIX)
void*
mapMemoryAt(void* desired, size_t length)
{
-#if defined(__ia64__) || (defined(__sparc64__) && defined(__NetBSD__))
+#if defined(__ia64__) || (defined(__sparc64__) && defined(__NetBSD__)) || defined(__aarch64__)
MOZ_RELEASE_ASSERT(0xffff800000000000ULL & (uintptr_t(desired) + length - 1) == 0);
#endif
void* region = mmap(desired, length, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANON, -1, 0);
if (region == MAP_FAILED)
return nullptr;
if (region != desired) {
if (munmap(region, length))
MOZ_RELEASE_ASSERT(errno == ENOMEM);
return nullptr;
}
return region;
}
void*
mapMemory(size_t length)
{
- void* hint = nullptr;
+ int prot = PROT_READ | PROT_WRITE;
+ int flags = MAP_PRIVATE | MAP_ANON;
+ int fd = -1;
+ off_t offset = 0;
+ // The test code must be aligned with the implementation in gc/Memory.cpp.
#if defined(__ia64__) || (defined(__sparc64__) && defined(__NetBSD__))
- hint = (void*)0x0000070000000000ULL;
-#endif
- void* region = mmap(hint, length, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANON, -1, 0);
+ void* region = mmap((void*)0x0000070000000000, length, prot, flags, fd, offset);
if (region == MAP_FAILED)
return nullptr;
-#if defined(__ia64__) || (defined(__sparc64__) && defined(__NetBSD__))
- if ((uintptr_t(region) + (length - 1)) & 0xffff800000000000ULL) {
+ if ((uintptr_t(region) + (length - 1)) & 0xffff800000000000) {
if (munmap(region, length))
MOZ_RELEASE_ASSERT(errno == ENOMEM);
return nullptr;
}
+ return region;
+#elif defined(__aarch64__)
+ const uintptr_t start = UINT64_C(0x0000070000000000);
+ const uintptr_t end = UINT64_C(0x0000800000000000);
+ const uintptr_t step = ChunkSize;
+ uintptr_t hint;
+ void* region = MAP_FAILED;
+ for (hint = start; region == MAP_FAILED && hint + length <= end; hint += step) {
+ region = mmap((void*)hint, length, prot, flags, fd, offset);
+ if (region != MAP_FAILED) {
+ if ((uintptr_t(region) + (length - 1)) & 0xffff800000000000) {
+ if (munmap(region, length)) {
+ MOZ_RELEASE_ASSERT(errno == ENOMEM);
+ }
+ region = MAP_FAILED;
+ }
+ }
+ }
+ return region == MAP_FAILED ? nullptr : region;
+#else
+ void* region = mmap(nullptr, length, prot, flags, fd, offset);
+ if (region == MAP_FAILED)
+ return nullptr;
+ return region;
#endif
- return region;
}
void
unmapPages(void* p, size_t size)
{
if (munmap(p, size))
MOZ_RELEASE_ASSERT(errno == ENOMEM);
}

View File

@ -0,0 +1,30 @@
# HG changeset patch
# User Wolfgang Rosenauer <wr@rosenauer.org>
# Parent 83bc32d997c714b607db1ffa71f02b30e1484a75
From: NetBSD
Subject: Workaround for gcc/binutils combination in Leap 42.2
References:
https://bugzilla.opensuse.org/show_bug.cgi?id=984637
diff --git a/xpcom/components/Module.h b/xpcom/components/Module.h
--- a/xpcom/components/Module.h
+++ b/xpcom/components/Module.h
@@ -120,17 +120,17 @@ struct Module
#if defined(MOZILLA_INTERNAL_API)
# define NSMODULE_NAME(_name) _name##_NSModule
# if defined(_MSC_VER)
# pragma section(".kPStaticModules$M", read)
# pragma comment(linker, "/merge:.kPStaticModules=.rdata")
# define NSMODULE_SECTION __declspec(allocate(".kPStaticModules$M"), dllexport)
# elif defined(__GNUC__)
# if defined(__ELF__)
-# define NSMODULE_SECTION __attribute__((section(".kPStaticModules"), visibility("protected")))
+# define NSMODULE_SECTION __attribute__((section(".kPStaticModules"), visibility("default")))
# elif defined(__MACH__)
# define NSMODULE_SECTION __attribute__((section("__DATA, .kPStaticModules"), visibility("default")))
# elif defined (_WIN32)
# define NSMODULE_SECTION __attribute__((section(".kPStaticModules"), dllexport))
# endif
# endif
# if !defined(NSMODULE_SECTION)
# error Do not know how to define sections.

View File

@ -1,7 +1,7 @@
diff -up firefox-46.0/widget/gtk/gtk3drawing.c.gtk3-20 firefox-46.0/widget/gtk/gtk3drawing.c
--- firefox-46.0/widget/gtk/gtk3drawing.c.gtk3-20 2016-04-22 02:37:27.000000000 +0200
+++ firefox-46.0/widget/gtk/gtk3drawing.c 2016-04-25 14:56:19.006992927 +0200
@@ -17,32 +17,79 @@
diff -up firefox-46.0.1/widget/gtk/gtk3drawing.c.gtk3-20 firefox-46.0.1/widget/gtk/gtk3drawing.c
--- firefox-46.0.1/widget/gtk/gtk3drawing.c.gtk3-20 2016-05-03 07:31:12.000000000 +0200
+++ firefox-46.0.1/widget/gtk/gtk3drawing.c 2016-05-20 15:05:08.750151522 +0200
@@ -17,34 +17,86 @@
#include <math.h>
@ -22,6 +22,11 @@ diff -up firefox-46.0/widget/gtk/gtk3drawing.c.gtk3-20 firefox-46.0/widget/gtk/g
+
+ struct {
+ GtkStyleContext* style;
+ GtkStyleContext* styleBackground;
+ } tooltip;
+
+ struct {
+ GtkStyleContext* style;
+ GtkStyleContext* styleContents;
+ GtkStyleContext* styleTrough;
+ GtkStyleContext* styleSlider;
@ -88,9 +93,12 @@ diff -up firefox-46.0/widget/gtk/gtk3drawing.c.gtk3-20 firefox-46.0/widget/gtk/g
-static GtkWidget* gProgressWidget;
+static MozGtkWidget gProgressBar;
static GtkWidget* gTabWidget;
static GtkWidget* gTooltipWidget;
-static GtkWidget* gTooltipWidget;
+static MozGtkWidget gTooltip;
static GtkWidget* gMenuBarWidget;
@@ -78,6 +125,37 @@ static gboolean is_initialized;
static GtkWidget* gMenuBarItemWidget;
static GtkWidget* gMenuPopupWidget;
@@ -78,6 +130,37 @@ static gboolean is_initialized;
#define GTK_STATE_FLAG_CHECKED (1 << 11)
#endif
@ -128,7 +136,7 @@ diff -up firefox-46.0/widget/gtk/gtk3drawing.c.gtk3-20 firefox-46.0/widget/gtk/g
static GtkStateFlags
GetStateFlagsFromGtkWidgetState(GtkWidgetState* state)
{
@@ -97,6 +175,41 @@ GetStateFlagsFromGtkWidgetState(GtkWidge
@@ -97,6 +180,41 @@ GetStateFlagsFromGtkWidgetState(GtkWidge
return stateFlags;
}
@ -170,7 +178,7 @@ diff -up firefox-46.0/widget/gtk/gtk3drawing.c.gtk3-20 firefox-46.0/widget/gtk/g
/* Because we have such an unconventional way of drawing widgets, signal to the GTK theme engine
that they are drawing for Mozilla instead of a conventional GTK app so they can do any specific
things they may want to do. */
@@ -141,9 +254,16 @@ setup_widget_prototype(GtkWidget* widget
@@ -141,9 +259,16 @@ setup_widget_prototype(GtkWidget* widget
static gint
ensure_button_widget()
{
@ -190,7 +198,7 @@ diff -up firefox-46.0/widget/gtk/gtk3drawing.c.gtk3-20 firefox-46.0/widget/gtk/g
}
return MOZ_GTK_SUCCESS;
}
@@ -195,9 +315,21 @@ ensure_button_arrow_widget()
@@ -195,9 +320,21 @@ ensure_button_arrow_widget()
static gint
ensure_checkbox_widget()
{
@ -215,7 +223,7 @@ diff -up firefox-46.0/widget/gtk/gtk3drawing.c.gtk3-20 firefox-46.0/widget/gtk/g
}
return MOZ_GTK_SUCCESS;
}
@@ -205,9 +337,21 @@ ensure_checkbox_widget()
@@ -205,9 +342,21 @@ ensure_checkbox_widget()
static gint
ensure_radiobutton_widget()
{
@ -240,7 +248,7 @@ diff -up firefox-46.0/widget/gtk/gtk3drawing.c.gtk3-20 firefox-46.0/widget/gtk/g
}
return MOZ_GTK_SUCCESS;
}
@@ -215,25 +359,62 @@ ensure_radiobutton_widget()
@@ -215,25 +364,62 @@ ensure_radiobutton_widget()
static gint
ensure_scrollbar_widget()
{
@ -316,7 +324,7 @@ diff -up firefox-46.0/widget/gtk/gtk3drawing.c.gtk3-20 firefox-46.0/widget/gtk/g
}
static gint
@@ -253,9 +434,19 @@ ensure_scale_widget()
@@ -253,9 +439,19 @@ ensure_scale_widget()
static gint
ensure_entry_widget()
{
@ -339,7 +347,7 @@ diff -up firefox-46.0/widget/gtk/gtk3drawing.c.gtk3-20 firefox-46.0/widget/gtk/g
}
return MOZ_GTK_SUCCESS;
}
@@ -387,9 +578,9 @@ moz_gtk_get_combo_box_entry_inner_widget
@@ -387,9 +583,9 @@ moz_gtk_get_combo_box_entry_inner_widget
g_object_add_weak_pointer(G_OBJECT(widget),
(gpointer) &gComboBoxEntryButtonWidget);
} else if (GTK_IS_ENTRY(widget)) {
@ -351,7 +359,7 @@ diff -up firefox-46.0/widget/gtk/gtk3drawing.c.gtk3-20 firefox-46.0/widget/gtk/g
} else
return;
gtk_widget_realize(widget);
@@ -411,7 +602,7 @@ ensure_combo_box_entry_widgets()
@@ -411,7 +607,7 @@ ensure_combo_box_entry_widgets()
{
GtkWidget* buttonChild;
@ -360,7 +368,7 @@ diff -up firefox-46.0/widget/gtk/gtk3drawing.c.gtk3-20 firefox-46.0/widget/gtk/g
gComboBoxEntryButtonWidget &&
gComboBoxEntryArrowWidget)
return MOZ_GTK_SUCCESS;
@@ -427,9 +618,9 @@ ensure_combo_box_entry_widgets()
@@ -427,9 +623,9 @@ ensure_combo_box_entry_widgets()
moz_gtk_get_combo_box_entry_inner_widgets,
NULL);
@ -372,7 +380,32 @@ diff -up firefox-46.0/widget/gtk/gtk3drawing.c.gtk3-20 firefox-46.0/widget/gtk/g
}
if (gComboBoxEntryButtonWidget) {
@@ -530,9 +721,21 @@ ensure_tab_widget()
@@ -507,12 +703,18 @@ ensure_toolbar_separator_widget()
static gint
ensure_tooltip_widget()
{
- if (!gTooltipWidget) {
- gTooltipWidget = gtk_window_new(GTK_WINDOW_POPUP);
- GtkStyleContext* style = gtk_widget_get_style_context(gTooltipWidget);
- gtk_style_context_add_class(style, GTK_STYLE_CLASS_TOOLTIP);
- gtk_widget_realize(gTooltipWidget);
- moz_gtk_set_widget_name(gTooltipWidget);
+ if (!gTooltip.widget) {
+ GtkCssNode path[] = {
+ { GTK_TYPE_TOOLTIP, "tooltip", NULL, NULL},
+ { GTK_TYPE_TOOLTIP, "tooltip", "background", NULL},
+ };
+
+ gTooltip.widget = gtk_window_new(GTK_WINDOW_POPUP);
+ gtk_widget_realize(gTooltip.widget);
+ moz_gtk_set_widget_name(gTooltip.widget);
+
+ gTooltip.tooltip.style = moz_gtk_style_create(&path[0], NULL);
+ gTooltip.tooltip.styleBackground = moz_gtk_style_create(&path[1], NULL);
}
return MOZ_GTK_SUCCESS;
}
@@ -530,9 +732,21 @@ ensure_tab_widget()
static gint
ensure_progress_widget()
{
@ -397,7 +430,7 @@ diff -up firefox-46.0/widget/gtk/gtk3drawing.c.gtk3-20 firefox-46.0/widget/gtk/g
}
return MOZ_GTK_SUCCESS;
}
@@ -638,6 +841,11 @@ static gint
@@ -638,6 +852,11 @@ static gint
ensure_check_menu_item_widget()
{
if (!gCheckMenuItemWidget) {
@ -409,7 +442,7 @@ diff -up firefox-46.0/widget/gtk/gtk3drawing.c.gtk3-20 firefox-46.0/widget/gtk/g
ensure_menu_popup_widget();
gCheckMenuItemWidget = gtk_check_menu_item_new_with_label("M");
gtk_menu_shell_append(GTK_MENU_SHELL(gMenuPopupWidget),
@@ -752,7 +960,7 @@ moz_gtk_checkbox_get_metrics(gint* indic
@@ -752,7 +971,7 @@ moz_gtk_checkbox_get_metrics(gint* indic
{
ensure_checkbox_widget();
@ -418,7 +451,7 @@ diff -up firefox-46.0/widget/gtk/gtk3drawing.c.gtk3-20 firefox-46.0/widget/gtk/g
"indicator_size", indicator_size,
"indicator_spacing", indicator_spacing,
NULL);
@@ -765,7 +973,7 @@ moz_gtk_radio_get_metrics(gint* indicato
@@ -765,7 +984,7 @@ moz_gtk_radio_get_metrics(gint* indicato
{
ensure_radiobutton_widget();
@ -427,24 +460,25 @@ diff -up firefox-46.0/widget/gtk/gtk3drawing.c.gtk3-20 firefox-46.0/widget/gtk/g
"indicator_size", indicator_size,
"indicator_spacing", indicator_spacing,
NULL);
@@ -778,13 +986,12 @@ moz_gtk_get_focus_outline_size(gint* foc
@@ -778,13 +997,13 @@ moz_gtk_get_focus_outline_size(gint* foc
{
GtkBorder border;
GtkBorder padding;
- GtkStyleContext *style;
+ GtkStyleContext* style = gEntry.entry.style;
+ GtkStyleContext* style;
ensure_entry_widget();
- style = gtk_widget_get_style_context(gEntryWidget);
- gtk_style_context_get_border(style, 0, &border);
- gtk_style_context_get_padding(style, 0, &padding);
+ style = gEntry.entry.style;
+ gtk_style_context_get_border(style, gtk_style_context_get_state(style), &border);
+ gtk_style_context_get_padding(style, gtk_style_context_get_state(style), &padding);
*focus_h_width = border.left + padding.left;
*focus_v_width = border.top + padding.top;
return MOZ_GTK_SUCCESS;
@@ -821,7 +1028,7 @@ moz_gtk_button_get_default_overflow(gint
@@ -821,7 +1040,7 @@ moz_gtk_button_get_default_overflow(gint
GtkBorder* default_outside_border;
ensure_button_widget();
@ -453,7 +487,7 @@ diff -up firefox-46.0/widget/gtk/gtk3drawing.c.gtk3-20 firefox-46.0/widget/gtk/g
"default-outside-border", &default_outside_border,
NULL);
@@ -844,7 +1051,7 @@ moz_gtk_button_get_default_border(gint*
@@ -844,7 +1063,7 @@ moz_gtk_button_get_default_border(gint*
GtkBorder* default_border;
ensure_button_widget();
@ -462,7 +496,7 @@ diff -up firefox-46.0/widget/gtk/gtk3drawing.c.gtk3-20 firefox-46.0/widget/gtk/g
"default-border", &default_border,
NULL);
@@ -935,7 +1142,7 @@ moz_gtk_button_paint(cairo_t *cr, GdkRec
@@ -935,7 +1154,7 @@ moz_gtk_button_paint(cairo_t *cr, GdkRec
if (state->focused) {
GtkBorder border;
@ -471,7 +505,7 @@ diff -up firefox-46.0/widget/gtk/gtk3drawing.c.gtk3-20 firefox-46.0/widget/gtk/g
x += border.left;
y += border.top;
width -= (border.left + border.right);
@@ -956,15 +1163,14 @@ moz_gtk_toggle_paint(cairo_t *cr, GdkRec
@@ -956,15 +1175,14 @@ moz_gtk_toggle_paint(cairo_t *cr, GdkRec
gint indicator_size, indicator_spacing;
gint x, y, width, height;
gint focus_x, focus_y, focus_width, focus_height;
@ -490,7 +524,7 @@ diff -up firefox-46.0/widget/gtk/gtk3drawing.c.gtk3-20 firefox-46.0/widget/gtk/g
}
// XXX we should assert rect->height >= indicator_size too
@@ -983,11 +1189,9 @@ moz_gtk_toggle_paint(cairo_t *cr, GdkRec
@@ -983,11 +1201,9 @@ moz_gtk_toggle_paint(cairo_t *cr, GdkRec
focus_width = width + 2 * indicator_spacing;
focus_height = height + 2 * indicator_spacing;
@ -505,7 +539,7 @@ diff -up firefox-46.0/widget/gtk/gtk3drawing.c.gtk3-20 firefox-46.0/widget/gtk/g
if (selected)
state_flags |= checkbox_check_state;
@@ -995,13 +1199,15 @@ moz_gtk_toggle_paint(cairo_t *cr, GdkRec
@@ -995,13 +1211,15 @@ moz_gtk_toggle_paint(cairo_t *cr, GdkRec
if (inconsistent)
state_flags |= GTK_STATE_FLAG_INCONSISTENT;
@ -525,7 +559,7 @@ diff -up firefox-46.0/widget/gtk/gtk3drawing.c.gtk3-20 firefox-46.0/widget/gtk/g
focus_width, focus_height);
}
}
@@ -1010,15 +1216,14 @@ moz_gtk_toggle_paint(cairo_t *cr, GdkRec
@@ -1010,15 +1228,14 @@ moz_gtk_toggle_paint(cairo_t *cr, GdkRec
* 'indeterminate' type on checkboxes. In GTK, the shadow type
* must also be changed for the state to be drawn.
*/
@ -545,7 +579,7 @@ diff -up firefox-46.0/widget/gtk/gtk3drawing.c.gtk3-20 firefox-46.0/widget/gtk/g
return MOZ_GTK_SUCCESS;
}
@@ -1035,8 +1240,8 @@ calculate_button_inner_rect(GtkWidget* b
@@ -1035,8 +1252,8 @@ calculate_button_inner_rect(GtkWidget* b
style = gtk_widget_get_style_context(button);
/* This mirrors gtkbutton's child positioning */
@ -556,7 +590,7 @@ diff -up firefox-46.0/widget/gtk/gtk3drawing.c.gtk3-20 firefox-46.0/widget/gtk/g
inner_rect->x = rect->x + border.left + padding.left;
inner_rect->y = rect->y + padding.top + border.top;
@@ -1099,9 +1304,9 @@ moz_gtk_scrollbar_button_paint(cairo_t *
@@ -1099,9 +1316,9 @@ moz_gtk_scrollbar_button_paint(cairo_t *
ensure_scrollbar_widget();
if (flags & MOZ_GTK_STEPPER_VERTICAL)
@ -568,7 +602,7 @@ diff -up firefox-46.0/widget/gtk/gtk3drawing.c.gtk3-20 firefox-46.0/widget/gtk/g
gtk_widget_set_direction(scrollbar, direction);
@@ -1181,25 +1386,22 @@ moz_gtk_scrollbar_trough_paint(GtkThemeW
@@ -1181,25 +1398,22 @@ moz_gtk_scrollbar_trough_paint(GtkThemeW
GtkTextDirection direction)
{
GtkStyleContext* style;
@ -602,7 +636,7 @@ diff -up firefox-46.0/widget/gtk/gtk3drawing.c.gtk3-20 firefox-46.0/widget/gtk/g
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);
@@ -1208,7 +1410,6 @@ moz_gtk_scrollbar_trough_paint(GtkThemeW
@@ -1208,7 +1422,6 @@ moz_gtk_scrollbar_trough_paint(GtkThemeW
gtk_render_focus(style, cr,
rect->x, rect->y, rect->width, rect->height);
}
@ -610,7 +644,7 @@ diff -up firefox-46.0/widget/gtk/gtk3drawing.c.gtk3-20 firefox-46.0/widget/gtk/g
return MOZ_GTK_SUCCESS;
}
@@ -1220,24 +1421,20 @@ moz_gtk_scrollbar_thumb_paint(GtkThemeWi
@@ -1220,24 +1433,20 @@ moz_gtk_scrollbar_thumb_paint(GtkThemeWi
{
GtkStateFlags state_flags = GetStateFlagsFromGtkWidgetState(state);
GtkStyleContext* style;
@ -643,7 +677,7 @@ diff -up firefox-46.0/widget/gtk/gtk3drawing.c.gtk3-20 firefox-46.0/widget/gtk/g
gtk_style_context_get_margin (style, state_flags, &margin);
gtk_render_slider(style, cr,
@@ -1248,8 +1445,6 @@ moz_gtk_scrollbar_thumb_paint(GtkThemeWi
@@ -1248,8 +1457,6 @@ moz_gtk_scrollbar_thumb_paint(GtkThemeWi
(widget == MOZ_GTK_SCROLLBAR_THUMB_HORIZONTAL) ?
GTK_ORIENTATION_HORIZONTAL : GTK_ORIENTATION_VERTICAL);
@ -652,7 +686,7 @@ diff -up firefox-46.0/widget/gtk/gtk3drawing.c.gtk3-20 firefox-46.0/widget/gtk/g
return MOZ_GTK_SUCCESS;
}
@@ -1260,8 +1455,8 @@ moz_gtk_spin_paint(cairo_t *cr, GdkRecta
@@ -1260,8 +1467,8 @@ moz_gtk_spin_paint(cairo_t *cr, GdkRecta
GtkStyleContext* style;
ensure_spin_widget();
@ -663,7 +697,7 @@ diff -up firefox-46.0/widget/gtk/gtk3drawing.c.gtk3-20 firefox-46.0/widget/gtk/g
gtk_style_context_save(style);
gtk_style_context_add_class(style, GTK_STYLE_CLASS_SPINBUTTON);
gtk_render_background(style, cr, rect->x, rect->y, rect->width, rect->height);
@@ -1280,11 +1475,10 @@ moz_gtk_spin_updown_paint(cairo_t *cr, G
@@ -1280,11 +1487,10 @@ moz_gtk_spin_updown_paint(cairo_t *cr, G
GtkStyleContext* style;
ensure_spin_widget();
@ -677,7 +711,7 @@ diff -up firefox-46.0/widget/gtk/gtk3drawing.c.gtk3-20 firefox-46.0/widget/gtk/g
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);
@@ -1450,15 +1644,13 @@ moz_gtk_vpaned_paint(cairo_t *cr, GdkRec
@@ -1450,15 +1656,13 @@ moz_gtk_vpaned_paint(cairo_t *cr, GdkRec
static gint
moz_gtk_entry_paint(cairo_t *cr, GdkRectangle* rect,
GtkWidgetState* state,
@ -696,7 +730,7 @@ diff -up firefox-46.0/widget/gtk/gtk3drawing.c.gtk3-20 firefox-46.0/widget/gtk/g
if (draw_focus_outline_only) {
// Inflate the given 'rect' with the focus outline size.
@@ -1478,10 +1670,9 @@ moz_gtk_entry_paint(cairo_t *cr, GdkRect
@@ -1478,10 +1682,9 @@ moz_gtk_entry_paint(cairo_t *cr, GdkRect
* textarea window uses gtk_paint_flat_box when exposed */
/* This gets us a lovely greyish disabledish look */
@ -708,7 +742,7 @@ diff -up firefox-46.0/widget/gtk/gtk3drawing.c.gtk3-20 firefox-46.0/widget/gtk/g
/* Now paint the shadow and focus border.
* We do like in gtk_entry_draw_frame, we first draw the shadow, a tad
@@ -1531,7 +1722,7 @@ moz_gtk_treeview_paint(cairo_t *cr, GdkR
@@ -1531,7 +1734,7 @@ moz_gtk_treeview_paint(cairo_t *cr, GdkR
style = gtk_widget_get_style_context(gScrolledWindowWidget);
gtk_style_context_save(style);
gtk_style_context_add_class(style, GTK_STYLE_CLASS_FRAME);
@ -717,7 +751,7 @@ diff -up firefox-46.0/widget/gtk/gtk3drawing.c.gtk3-20 firefox-46.0/widget/gtk/g
xthickness = border.left;
ythickness = border.top;
@@ -1702,7 +1893,7 @@ moz_gtk_combo_box_paint(cairo_t *cr, Gdk
@@ -1702,7 +1905,7 @@ moz_gtk_combo_box_paint(cairo_t *cr, Gdk
if (direction == GTK_TEXT_DIR_LTR) {
GtkBorder padding;
GtkStateFlags state_flags = GetStateFlagsFromGtkWidgetState(state);
@ -726,7 +760,7 @@ diff -up firefox-46.0/widget/gtk/gtk3drawing.c.gtk3-20 firefox-46.0/widget/gtk/g
arrow_rect.x -= padding.left;
}
else
@@ -1804,29 +1995,27 @@ moz_gtk_container_paint(cairo_t *cr, Gdk
@@ -1804,29 +2007,27 @@ moz_gtk_container_paint(cairo_t *cr, Gdk
gboolean isradio, GtkTextDirection direction)
{
GtkStateFlags state_flags = GetStateFlagsFromGtkWidgetState(state);
@ -764,7 +798,7 @@ diff -up firefox-46.0/widget/gtk/gtk3drawing.c.gtk3-20 firefox-46.0/widget/gtk/g
return MOZ_GTK_SUCCESS;
}
@@ -1836,32 +2025,26 @@ moz_gtk_toggle_label_paint(cairo_t *cr,
@@ -1836,32 +2037,26 @@ moz_gtk_toggle_label_paint(cairo_t *cr,
GtkWidgetState* state,
gboolean isradio, GtkTextDirection direction)
{
@ -782,15 +816,15 @@ diff -up firefox-46.0/widget/gtk/gtk3drawing.c.gtk3-20 firefox-46.0/widget/gtk/g
} else {
ensure_checkbox_widget();
- widget = gCheckboxWidget;
+ widget = &gCheckbox;
}
- }
- style = gtk_widget_get_style_context(widget);
- gtk_style_context_save(style);
- if (isradio) {
- gtk_style_context_add_class(style, GTK_STYLE_CLASS_RADIO);
- } else {
- gtk_style_context_add_class(style, GTK_STYLE_CLASS_CHECK);
- }
+ widget = &gCheckbox;
}
- gtk_widget_set_direction(widget, direction);
+ gtk_style_context_save(widget->check.styleLabel);
+ gtk_widget_set_direction(widget->widget, direction);
@ -806,7 +840,7 @@ diff -up firefox-46.0/widget/gtk/gtk3drawing.c.gtk3-20 firefox-46.0/widget/gtk/g
return MOZ_GTK_SUCCESS;
}
@@ -1922,7 +2105,7 @@ moz_gtk_toolbar_separator_paint(cairo_t
@@ -1922,7 +2117,7 @@ moz_gtk_toolbar_separator_paint(cairo_t
rect->height * (end_fraction - start_fraction));
} else {
GtkBorder padding;
@ -815,7 +849,19 @@ diff -up firefox-46.0/widget/gtk/gtk3drawing.c.gtk3-20 firefox-46.0/widget/gtk/g
paint_width = padding.left;
if (paint_width > rect->width)
@@ -2006,18 +2189,13 @@ static gint
@@ -1945,9 +2140,9 @@ moz_gtk_tooltip_paint(cairo_t *cr, GdkRe
GtkStyleContext* style;
ensure_tooltip_widget();
- gtk_widget_set_direction(gTooltipWidget, direction);
+ gtk_widget_set_direction(gTooltip.widget, direction);
- style = gtk_widget_get_style_context(gTooltipWidget);
+ style = gTooltip.tooltip.styleBackground;
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);
return MOZ_GTK_SUCCESS;
@@ -2006,18 +2201,13 @@ static gint
moz_gtk_progressbar_paint(cairo_t *cr, GdkRectangle* rect,
GtkTextDirection direction)
{
@ -839,7 +885,7 @@ diff -up firefox-46.0/widget/gtk/gtk3drawing.c.gtk3-20 firefox-46.0/widget/gtk/g
return MOZ_GTK_SUCCESS;
}
@@ -2027,15 +2205,8 @@ moz_gtk_progress_chunk_paint(cairo_t *cr
@@ -2027,15 +2217,8 @@ moz_gtk_progress_chunk_paint(cairo_t *cr
GtkTextDirection direction,
GtkThemeWidgetType widget)
{
@ -856,7 +902,7 @@ diff -up firefox-46.0/widget/gtk/gtk3drawing.c.gtk3-20 firefox-46.0/widget/gtk/g
if (widget == MOZ_GTK_PROGRESS_CHUNK_INDETERMINATE ||
widget == MOZ_GTK_PROGRESS_CHUNK_VERTICAL_INDETERMINATE) {
@@ -2074,12 +2245,14 @@ moz_gtk_progress_chunk_paint(cairo_t *cr
@@ -2074,12 +2257,14 @@ moz_gtk_progress_chunk_paint(cairo_t *cr
// gtk_render_activity was used to render progress chunks on GTK versions
// before 3.13.7, see bug 1173907.
if (!gtk_check_version(3, 13, 7)) {
@ -875,7 +921,7 @@ diff -up firefox-46.0/widget/gtk/gtk3drawing.c.gtk3-20 firefox-46.0/widget/gtk/g
return MOZ_GTK_SUCCESS;
}
@@ -2096,7 +2269,7 @@ moz_gtk_get_tab_thickness(void)
@@ -2096,7 +2281,7 @@ moz_gtk_get_tab_thickness(void)
style = gtk_widget_get_style_context(gTabWidget);
gtk_style_context_add_class(style, GTK_STYLE_CLASS_NOTEBOOK);
@ -884,7 +930,7 @@ diff -up firefox-46.0/widget/gtk/gtk3drawing.c.gtk3-20 firefox-46.0/widget/gtk/g
if (border.top < 2)
return 2; /* some themes don't set ythickness correctly */
@@ -2292,7 +2465,7 @@ moz_gtk_tab_paint(cairo_t *cr, GdkRectan
@@ -2292,7 +2477,7 @@ moz_gtk_tab_paint(cairo_t *cr, GdkRectan
gtk_style_context_save(style);
moz_gtk_tab_prepare_style_context(style, flags);
@ -893,7 +939,7 @@ diff -up firefox-46.0/widget/gtk/gtk3drawing.c.gtk3-20 firefox-46.0/widget/gtk/g
focusRect.x += padding.left;
focusRect.width -= (padding.left + padding.right);
@@ -2408,7 +2581,7 @@ moz_gtk_tab_scroll_arrow_paint(cairo_t *
@@ -2408,7 +2593,7 @@ moz_gtk_tab_scroll_arrow_paint(cairo_t *
}
static gint
@ -902,7 +948,7 @@ diff -up firefox-46.0/widget/gtk/gtk3drawing.c.gtk3-20 firefox-46.0/widget/gtk/g
GtkTextDirection direction)
{
GtkStyleContext* style;
@@ -2468,7 +2641,7 @@ moz_gtk_menu_separator_paint(cairo_t *cr
@@ -2468,7 +2653,7 @@ moz_gtk_menu_separator_paint(cairo_t *cr
border_width = gtk_container_get_border_width(GTK_CONTAINER(gMenuSeparatorWidget));
style = gtk_widget_get_style_context(gMenuSeparatorWidget);
@ -911,7 +957,7 @@ diff -up firefox-46.0/widget/gtk/gtk3drawing.c.gtk3-20 firefox-46.0/widget/gtk/g
x = rect->x + border_width;
y = rect->y + border_width;
@@ -2521,7 +2694,8 @@ moz_gtk_menu_item_paint(cairo_t *cr, Gdk
@@ -2521,7 +2706,8 @@ moz_gtk_menu_item_paint(cairo_t *cr, Gdk
item_widget = gMenuItemWidget;
}
style = gtk_widget_get_style_context(item_widget);
@ -921,7 +967,7 @@ diff -up firefox-46.0/widget/gtk/gtk3drawing.c.gtk3-20 firefox-46.0/widget/gtk/g
if (flags & MOZ_TOPLEVEL_MENU_ITEM) {
gtk_style_context_add_class(style, GTK_STYLE_CLASS_MENUBAR);
@@ -2540,7 +2714,7 @@ moz_gtk_menu_item_paint(cairo_t *cr, Gdk
@@ -2540,7 +2726,7 @@ moz_gtk_menu_item_paint(cairo_t *cr, Gdk
gtk_render_background(style, cr, x, y, w, h);
gtk_render_frame(style, cr, x, y, w, h);
@ -930,7 +976,7 @@ diff -up firefox-46.0/widget/gtk/gtk3drawing.c.gtk3-20 firefox-46.0/widget/gtk/g
}
return MOZ_GTK_SUCCESS;
@@ -2556,7 +2730,10 @@ moz_gtk_menu_arrow_paint(cairo_t *cr, Gd
@@ -2556,7 +2742,10 @@ moz_gtk_menu_arrow_paint(cairo_t *cr, Gd
ensure_menu_item_widget();
gtk_widget_set_direction(gMenuItemWidget, direction);
@ -942,7 +988,7 @@ diff -up firefox-46.0/widget/gtk/gtk3drawing.c.gtk3-20 firefox-46.0/widget/gtk/g
style = gtk_widget_get_style_context(gMenuItemWidget);
gtk_style_context_save(style);
gtk_style_context_add_class(style, GTK_STYLE_CLASS_MENUITEM);
@@ -2606,7 +2783,7 @@ moz_gtk_check_menu_item_paint(cairo_t *c
@@ -2606,7 +2795,7 @@ moz_gtk_check_menu_item_paint(cairo_t *c
}
gtk_style_context_set_state(style, state_flags);
@ -951,7 +997,7 @@ diff -up firefox-46.0/widget/gtk/gtk3drawing.c.gtk3-20 firefox-46.0/widget/gtk/g
offset = gtk_container_get_border_width(GTK_CONTAINER(gCheckMenuItemWidget)) +
padding.left + 2;
@@ -2658,7 +2835,7 @@ moz_gtk_add_style_border(GtkStyleContext
@@ -2658,7 +2847,7 @@ moz_gtk_add_style_border(GtkStyleContext
{
GtkBorder border;
@ -960,7 +1006,7 @@ diff -up firefox-46.0/widget/gtk/gtk3drawing.c.gtk3-20 firefox-46.0/widget/gtk/g
*left += border.left;
*right += border.right;
@@ -2667,12 +2844,22 @@ moz_gtk_add_style_border(GtkStyleContext
@@ -2667,12 +2856,22 @@ moz_gtk_add_style_border(GtkStyleContext
}
static void
@ -984,7 +1030,7 @@ diff -up firefox-46.0/widget/gtk/gtk3drawing.c.gtk3-20 firefox-46.0/widget/gtk/g
*left += padding.left;
*right += padding.right;
@@ -2680,6 +2867,16 @@ moz_gtk_add_style_padding(GtkStyleContex
@@ -2680,6 +2879,16 @@ moz_gtk_add_style_padding(GtkStyleContex
*bottom += padding.bottom;
}
@ -1001,7 +1047,7 @@ diff -up firefox-46.0/widget/gtk/gtk3drawing.c.gtk3-20 firefox-46.0/widget/gtk/g
gint
moz_gtk_get_widget_border(GtkThemeWidgetType widget, gint* left, gint* top,
gint* right, gint* bottom, GtkTextDirection direction,
@@ -2694,36 +2891,27 @@ moz_gtk_get_widget_border(GtkThemeWidget
@@ -2694,37 +2903,35 @@ moz_gtk_get_widget_border(GtkThemeWidget
case MOZ_GTK_TOOLBAR_BUTTON:
{
ensure_button_widget();
@ -1039,13 +1085,21 @@ diff -up firefox-46.0/widget/gtk/gtk3drawing.c.gtk3-20 firefox-46.0/widget/gtk/g
*left = *top = *right = *bottom = -1;
- moz_gtk_add_style_padding(style, left, top, right, bottom);
- moz_gtk_add_style_border(style, left, top, right, bottom);
+
+ moz_gtk_add_style_padding(gEntry.entry.style, left, top, right, bottom);
+ moz_gtk_add_style_border(gEntry.entry.style, left, top, right, bottom);
+
+ return MOZ_GTK_SUCCESS;
+ }
+ case MOZ_GTK_TOOLTIP:
+ {
+ ensure_tooltip_widget();
+ moz_gtk_add_style_padding(gTooltip.tooltip.styleBackground, left, top, right, bottom);
+ moz_gtk_add_style_border(gTooltip.tooltip.styleBackground, left, top, right, bottom);
return MOZ_GTK_SUCCESS;
}
@@ -2759,7 +2947,7 @@ moz_gtk_get_widget_border(GtkThemeWidget
case MOZ_GTK_TREEVIEW:
@@ -2759,7 +2966,7 @@ moz_gtk_get_widget_border(GtkThemeWidget
break;
case MOZ_GTK_DROPDOWN_ENTRY:
ensure_combo_box_entry_widgets();
@ -1054,7 +1108,7 @@ diff -up firefox-46.0/widget/gtk/gtk3drawing.c.gtk3-20 firefox-46.0/widget/gtk/g
break;
case MOZ_GTK_DROPDOWN_ARROW:
ensure_combo_box_entry_widgets();
@@ -2795,7 +2983,7 @@ moz_gtk_get_widget_border(GtkThemeWidget
@@ -2795,7 +3002,7 @@ moz_gtk_get_widget_border(GtkThemeWidget
if (!wide_separators) {
style = gtk_widget_get_style_context(gComboBoxSeparatorWidget);
@ -1063,7 +1117,7 @@ diff -up firefox-46.0/widget/gtk/gtk3drawing.c.gtk3-20 firefox-46.0/widget/gtk/g
separator_width = border.left;
}
}
@@ -2814,14 +3002,17 @@ moz_gtk_get_widget_border(GtkThemeWidget
@@ -2814,14 +3021,17 @@ moz_gtk_get_widget_border(GtkThemeWidget
w = gTabWidget;
break;
case MOZ_GTK_PROGRESSBAR:
@ -1085,7 +1139,7 @@ diff -up firefox-46.0/widget/gtk/gtk3drawing.c.gtk3-20 firefox-46.0/widget/gtk/g
break;
case MOZ_GTK_SCALE_HORIZONTAL:
ensure_scale_widget();
@@ -2840,12 +3031,13 @@ moz_gtk_get_widget_border(GtkThemeWidget
@@ -2840,12 +3050,13 @@ moz_gtk_get_widget_border(GtkThemeWidget
{
if (widget == MOZ_GTK_CHECKBUTTON_CONTAINER) {
ensure_checkbox_widget();
@ -1102,7 +1156,15 @@ diff -up firefox-46.0/widget/gtk/gtk3drawing.c.gtk3-20 firefox-46.0/widget/gtk/g
*left = *top = *right = *bottom = gtk_container_get_border_width(GTK_CONTAINER(w));
moz_gtk_add_style_border(style,
@@ -2978,6 +3170,32 @@ moz_gtk_get_combo_box_entry_button_size(
@@ -2904,7 +3115,6 @@ moz_gtk_get_widget_border(GtkThemeWidget
case MOZ_GTK_MENUSEPARATOR:
/* These widgets have no borders.*/
case MOZ_GTK_SPINBUTTON:
- case MOZ_GTK_TOOLTIP:
case MOZ_GTK_WINDOW:
case MOZ_GTK_RESIZER:
case MOZ_GTK_MENUARROW:
@@ -2978,6 +3188,32 @@ moz_gtk_get_combo_box_entry_button_size(
}
gint
@ -1135,7 +1197,7 @@ diff -up firefox-46.0/widget/gtk/gtk3drawing.c.gtk3-20 firefox-46.0/widget/gtk/g
moz_gtk_get_tab_scroll_arrow_size(gint* width, gint* height)
{
gint arrow_size;
@@ -3030,7 +3248,7 @@ moz_gtk_get_toolbar_separator_width(gint
@@ -3030,7 +3266,7 @@ moz_gtk_get_toolbar_separator_width(gint
"separator-width", &separator_width,
NULL);
/* Just in case... */
@ -1144,7 +1206,7 @@ diff -up firefox-46.0/widget/gtk/gtk3drawing.c.gtk3-20 firefox-46.0/widget/gtk/g
*size = MAX(*size, (wide_separators ? separator_width : border.left));
return MOZ_GTK_SUCCESS;
}
@@ -3072,7 +3290,7 @@ moz_gtk_get_menu_separator_height(gint *
@@ -3072,7 +3308,7 @@ moz_gtk_get_menu_separator_height(gint *
border_width = gtk_container_get_border_width(GTK_CONTAINER(gMenuSeparatorWidget));
style = gtk_widget_get_style_context(gMenuSeparatorWidget);
@ -1153,7 +1215,7 @@ diff -up firefox-46.0/widget/gtk/gtk3drawing.c.gtk3-20 firefox-46.0/widget/gtk/g
gtk_style_context_save(style);
gtk_style_context_add_class(style, GTK_STYLE_CLASS_SEPARATOR);
@@ -3130,15 +3348,21 @@ moz_gtk_get_scrollbar_metrics(MozGtkScro
@@ -3130,15 +3366,21 @@ moz_gtk_get_scrollbar_metrics(MozGtkScro
{
ensure_scrollbar_widget();
@ -1178,7 +1240,7 @@ diff -up firefox-46.0/widget/gtk/gtk3drawing.c.gtk3-20 firefox-46.0/widget/gtk/g
return MOZ_GTK_SUCCESS;
}
@@ -3163,7 +3387,7 @@ moz_gtk_images_in_buttons()
@@ -3163,7 +3405,7 @@ moz_gtk_images_in_buttons()
GtkSettings* settings;
ensure_button_widget();
@ -1187,7 +1249,7 @@ diff -up firefox-46.0/widget/gtk/gtk3drawing.c.gtk3-20 firefox-46.0/widget/gtk/g
g_object_get(settings, "gtk-button-images", &result, NULL);
return result;
@@ -3191,7 +3415,7 @@ moz_gtk_widget_paint(GtkThemeWidgetType
@@ -3191,7 +3433,7 @@ moz_gtk_widget_paint(GtkThemeWidgetType
}
ensure_button_widget();
return moz_gtk_button_paint(cr, rect, state,
@ -1196,7 +1258,7 @@ diff -up firefox-46.0/widget/gtk/gtk3drawing.c.gtk3-20 firefox-46.0/widget/gtk/g
direction);
break;
case MOZ_GTK_CHECKBUTTON:
@@ -3241,7 +3465,7 @@ moz_gtk_widget_paint(GtkThemeWidgetType
@@ -3241,7 +3483,7 @@ moz_gtk_widget_paint(GtkThemeWidgetType
case MOZ_GTK_SPINBUTTON_ENTRY:
ensure_spin_widget();
return moz_gtk_entry_paint(cr, rect, state,
@ -1205,7 +1267,7 @@ diff -up firefox-46.0/widget/gtk/gtk3drawing.c.gtk3-20 firefox-46.0/widget/gtk/g
break;
case MOZ_GTK_GRIPPER:
return moz_gtk_gripper_paint(cr, rect, state,
@@ -3268,7 +3492,7 @@ moz_gtk_widget_paint(GtkThemeWidgetType
@@ -3268,7 +3510,7 @@ moz_gtk_widget_paint(GtkThemeWidgetType
case MOZ_GTK_ENTRY:
ensure_entry_widget();
return moz_gtk_entry_paint(cr, rect, state,
@ -1214,7 +1276,7 @@ diff -up firefox-46.0/widget/gtk/gtk3drawing.c.gtk3-20 firefox-46.0/widget/gtk/g
break;
case MOZ_GTK_DROPDOWN:
return moz_gtk_combo_box_paint(cr, rect, state, direction);
@@ -3280,7 +3504,7 @@ moz_gtk_widget_paint(GtkThemeWidgetType
@@ -3280,7 +3522,7 @@ moz_gtk_widget_paint(GtkThemeWidgetType
case MOZ_GTK_DROPDOWN_ENTRY:
ensure_combo_box_entry_widgets();
return moz_gtk_entry_paint(cr, rect, state,
@ -1223,7 +1285,7 @@ diff -up firefox-46.0/widget/gtk/gtk3drawing.c.gtk3-20 firefox-46.0/widget/gtk/g
break;
case MOZ_GTK_CHECKBUTTON_CONTAINER:
case MOZ_GTK_RADIOBUTTON_CONTAINER:
@@ -3332,7 +3556,7 @@ moz_gtk_widget_paint(GtkThemeWidgetType
@@ -3332,7 +3574,7 @@ moz_gtk_widget_paint(GtkThemeWidgetType
(GtkArrowType) flags, direction);
break;
case MOZ_GTK_MENUBAR:
@ -1232,7 +1294,7 @@ diff -up firefox-46.0/widget/gtk/gtk3drawing.c.gtk3-20 firefox-46.0/widget/gtk/g
break;
case MOZ_GTK_MENUPOPUP:
return moz_gtk_menu_popup_paint(cr, rect, direction);
@@ -3383,7 +3607,7 @@ GtkWidget* moz_gtk_get_scrollbar_widget(
@@ -3383,7 +3625,7 @@ GtkWidget* moz_gtk_get_scrollbar_widget(
{
MOZ_ASSERT(is_initialized, "Forgot to call moz_gtk_init()");
ensure_scrollbar_widget();
@ -1241,7 +1303,7 @@ diff -up firefox-46.0/widget/gtk/gtk3drawing.c.gtk3-20 firefox-46.0/widget/gtk/g
}
gboolean moz_gtk_has_scrollbar_buttons(void)
@@ -3391,7 +3615,7 @@ gboolean moz_gtk_has_scrollbar_buttons(v
@@ -3391,7 +3633,7 @@ gboolean moz_gtk_has_scrollbar_buttons(v
gboolean backward, forward, secondary_backward, secondary_forward;
MOZ_ASSERT(is_initialized, "Forgot to call moz_gtk_init()");
ensure_scrollbar_widget();
@ -1250,7 +1312,18 @@ diff -up firefox-46.0/widget/gtk/gtk3drawing.c.gtk3-20 firefox-46.0/widget/gtk/g
"has-backward-stepper", &backward,
"has-forward-stepper", &forward,
"has-secondary-backward-stepper", &secondary_backward,
@@ -3415,17 +3639,19 @@ moz_gtk_shutdown()
@@ -3403,8 +3645,8 @@ gboolean moz_gtk_has_scrollbar_buttons(v
gint
moz_gtk_shutdown()
{
- if (gTooltipWidget)
- gtk_widget_destroy(gTooltipWidget);
+ moz_gtk_widget_free(&gTooltip);
+
/* This will destroy all of our widgets */
if (gProtoWindow)
gtk_widget_destroy(gProtoWindow);
@@ -3415,17 +3657,19 @@ moz_gtk_shutdown()
gProtoWindow = NULL;
gProtoLayout = NULL;
@ -1277,7 +1350,7 @@ diff -up firefox-46.0/widget/gtk/gtk3drawing.c.gtk3-20 firefox-46.0/widget/gtk/g
gComboBoxWidget = NULL;
gComboBoxButtonWidget = NULL;
gComboBoxSeparatorWidget = NULL;
@@ -3433,12 +3659,12 @@ moz_gtk_shutdown()
@@ -3433,14 +3677,13 @@ moz_gtk_shutdown()
gComboBoxEntryWidget = NULL;
gComboBoxEntryButtonWidget = NULL;
gComboBoxEntryArrowWidget = NULL;
@ -1290,11 +1363,13 @@ diff -up firefox-46.0/widget/gtk/gtk3drawing.c.gtk3-20 firefox-46.0/widget/gtk/g
- gProgressWidget = NULL;
+ moz_gtk_widget_free(&gProgressBar);
gTabWidget = NULL;
gTooltipWidget = NULL;
- gTooltipWidget = NULL;
gMenuBarWidget = NULL;
diff -up firefox-46.0/widget/gtk/gtkdrawing.h.gtk3-20 firefox-46.0/widget/gtk/gtkdrawing.h
--- firefox-46.0/widget/gtk/gtkdrawing.h.gtk3-20 2016-04-22 02:37:27.000000000 +0200
+++ firefox-46.0/widget/gtk/gtkdrawing.h 2016-04-25 14:42:42.000000000 +0200
gMenuBarItemWidget = NULL;
gMenuPopupWidget = NULL;
diff -up firefox-46.0.1/widget/gtk/gtkdrawing.h.gtk3-20 firefox-46.0.1/widget/gtk/gtkdrawing.h
--- firefox-46.0.1/widget/gtk/gtkdrawing.h.gtk3-20 2016-05-03 07:31:12.000000000 +0200
+++ firefox-46.0.1/widget/gtk/gtkdrawing.h 2016-05-19 15:20:11.656519199 +0200
@@ -67,6 +67,13 @@ typedef enum {
MOZ_GTK_TAB_SELECTED = 1 << 10
} GtkTabFlags;
@ -1332,9 +1407,9 @@ diff -up firefox-46.0/widget/gtk/gtkdrawing.h.gtk3-20 firefox-46.0/widget/gtk/gt
#ifdef __cplusplus
}
#endif /* __cplusplus */
diff -up firefox-46.0/widget/gtk/mozgtk/mozgtk.c.gtk3-20 firefox-46.0/widget/gtk/mozgtk/mozgtk.c
--- firefox-46.0/widget/gtk/mozgtk/mozgtk.c.gtk3-20 2016-04-22 02:37:27.000000000 +0200
+++ firefox-46.0/widget/gtk/mozgtk/mozgtk.c 2016-04-25 14:46:15.299592716 +0200
diff -up firefox-46.0.1/widget/gtk/mozgtk/mozgtk.c.gtk3-20 firefox-46.0.1/widget/gtk/mozgtk/mozgtk.c
--- firefox-46.0.1/widget/gtk/mozgtk/mozgtk.c.gtk3-20 2016-05-03 07:31:12.000000000 +0200
+++ firefox-46.0.1/widget/gtk/mozgtk/mozgtk.c 2016-05-20 10:40:19.442320669 +0200
@@ -504,6 +504,11 @@ STUB(gtk_window_set_type_hint)
STUB(gtk_window_set_wmclass)
STUB(gtk_window_unfullscreen)
@ -1347,7 +1422,7 @@ diff -up firefox-46.0/widget/gtk/mozgtk/mozgtk.c.gtk3-20 firefox-46.0/widget/gtk
#endif
#ifdef GTK3_SYMBOLS
@@ -581,6 +586,13 @@ STUB(gtk_color_chooser_get_type)
@@ -581,6 +586,14 @@ STUB(gtk_color_chooser_get_type)
STUB(gtk_color_chooser_set_rgba)
STUB(gtk_color_chooser_get_rgba)
STUB(gtk_color_chooser_set_use_alpha)
@ -1358,12 +1433,13 @@ diff -up firefox-46.0/widget/gtk/mozgtk/mozgtk.c.gtk3-20 firefox-46.0/widget/gtk
+STUB(gtk_widget_path_iter_get_state)
+STUB(gtk_style_context_set_parent)
+STUB(gtk_widget_path_unref)
+STUB(gtk_tooltip_get_type)
#endif
#ifdef GTK2_SYMBOLS
diff -up firefox-46.0/widget/gtk/nsLookAndFeel.cpp.gtk3-20 firefox-46.0/widget/gtk/nsLookAndFeel.cpp
--- firefox-46.0/widget/gtk/nsLookAndFeel.cpp.gtk3-20 2016-04-22 02:37:27.000000000 +0200
+++ firefox-46.0/widget/gtk/nsLookAndFeel.cpp 2016-04-25 14:18:25.000000000 +0200
diff -up firefox-46.0.1/widget/gtk/nsLookAndFeel.cpp.gtk3-20 firefox-46.0.1/widget/gtk/nsLookAndFeel.cpp
--- firefox-46.0.1/widget/gtk/nsLookAndFeel.cpp.gtk3-20 2016-05-03 07:31:12.000000000 +0200
+++ firefox-46.0.1/widget/gtk/nsLookAndFeel.cpp 2016-05-20 13:53:54.085049707 +0200
@@ -353,14 +353,18 @@ nsLookAndFeel::NativeGetColor(ColorID aI
case eColorID_activeborder:
// active window border
@ -1419,7 +1495,7 @@ diff -up firefox-46.0/widget/gtk/nsLookAndFeel.cpp.gtk3-20 firefox-46.0/widget/g
aColor = GDK_RGBA_TO_NS_RGBA(gdk_color);
break;
case eColorID__moz_buttonhovertext:
@@ -1110,7 +1121,7 @@ nsLookAndFeel::Init()
@@ -1110,27 +1126,29 @@ nsLookAndFeel::Init()
style = create_context(path);
gtk_style_context_add_class(style, GTK_STYLE_CLASS_SCROLLBAR);
gtk_style_context_add_class(style, GTK_STYLE_CLASS_TROUGH);
@ -1428,9 +1504,9 @@ diff -up firefox-46.0/widget/gtk/nsLookAndFeel.cpp.gtk3-20 firefox-46.0/widget/g
sMozScrollbar = GDK_RGBA_TO_NS_RGBA(color);
g_object_unref(style);
@@ -1118,18 +1129,18 @@ nsLookAndFeel::Init()
// Window colors
style = create_context(path);
gtk_style_context_save(style);
- gtk_style_context_save(style);
gtk_style_context_add_class(style, GTK_STYLE_CLASS_BACKGROUND);
- gtk_style_context_get_background_color(style, GTK_STATE_FLAG_NORMAL, &color);
+ gtk_style_context_get_background_color(style, gtk_style_context_get_state(style), &color);
@ -1438,20 +1514,27 @@ diff -up firefox-46.0/widget/gtk/nsLookAndFeel.cpp.gtk3-20 firefox-46.0/widget/g
- gtk_style_context_get_color(style, GTK_STATE_FLAG_NORMAL, &color);
+ gtk_style_context_get_color(style, gtk_style_context_get_state(style), &color);
sMozWindowText = GDK_RGBA_TO_NS_RGBA(color);
gtk_style_context_restore(style);
- gtk_style_context_restore(style);
+ g_object_unref(style);
// tooltip foreground and background
gtk_style_context_add_class(style, GTK_STYLE_CLASS_TOOLTIP);
- gtk_style_context_add_class(style, GTK_STYLE_CLASS_TOOLTIP);
+ GtkCssNode tooltipPath[] = {
+ { GTK_TYPE_TOOLTIP, "tooltip", NULL, NULL},
+ };
+ style = moz_gtk_style_create(tooltipPath, NULL);
+ gtk_style_context_get_color(style, gtk_style_context_get_state(style), &color);
+ sInfoText = GDK_RGBA_TO_NS_RGBA(color);
gtk_style_context_add_class(style, GTK_STYLE_CLASS_BACKGROUND);
- gtk_style_context_get_background_color(style, GTK_STATE_FLAG_NORMAL, &color);
+ gtk_style_context_get_background_color(style, gtk_style_context_get_state(style), &color);
sInfoBackground = GDK_RGBA_TO_NS_RGBA(color);
- gtk_style_context_get_color(style, GTK_STATE_FLAG_NORMAL, &color);
+ gtk_style_context_get_color(style, gtk_style_context_get_state(style), &color);
sInfoText = GDK_RGBA_TO_NS_RGBA(color);
- sInfoText = GDK_RGBA_TO_NS_RGBA(color);
g_object_unref(style);
@@ -1144,20 +1155,26 @@ nsLookAndFeel::Init()
// menu foreground & menu background
@@ -1144,20 +1162,26 @@ nsLookAndFeel::Init()
gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem);
style = gtk_widget_get_style_context(accel_label);
@ -1483,7 +1566,7 @@ diff -up firefox-46.0/widget/gtk/nsLookAndFeel.cpp.gtk3-20 firefox-46.0/widget/g
g_object_unref(menu);
#endif
@@ -1266,44 +1283,54 @@ nsLookAndFeel::Init()
@@ -1266,44 +1290,54 @@ nsLookAndFeel::Init()
GDK_COLOR_TO_NS_RGB(style->dark[GTK_STATE_NORMAL]);
}
#else
@ -1555,7 +1638,7 @@ diff -up firefox-46.0/widget/gtk/nsLookAndFeel.cpp.gtk3-20 firefox-46.0/widget/g
// GTK's guide to fancy odd row background colors:
// 1) Check if a theme explicitly defines an odd row color
@@ -1316,7 +1343,7 @@ nsLookAndFeel::Init()
@@ -1316,7 +1350,7 @@ nsLookAndFeel::Init()
// Get odd row background color
gtk_style_context_save(style);
gtk_style_context_add_region(style, GTK_STYLE_REGION_ROW, GTK_REGION_ODD);
@ -1564,7 +1647,7 @@ diff -up firefox-46.0/widget/gtk/nsLookAndFeel.cpp.gtk3-20 firefox-46.0/widget/g
sOddCellBackground = GDK_RGBA_TO_NS_RGBA(color);
gtk_style_context_restore(style);
@@ -1334,9 +1361,11 @@ nsLookAndFeel::Init()
@@ -1334,9 +1368,11 @@ nsLookAndFeel::Init()
gtk_container_add(GTK_CONTAINER(parent), infoBar);
gtk_container_add(GTK_CONTAINER(infoBarContent), infoBarLabel);
style = gtk_widget_get_style_context(infoBarLabel);
@ -1577,9 +1660,9 @@ diff -up firefox-46.0/widget/gtk/nsLookAndFeel.cpp.gtk3-20 firefox-46.0/widget/g
#endif
// Some themes have a unified menu bar, and support window dragging on it
gboolean supports_menubar_drag = FALSE;
diff -up firefox-46.0/widget/gtk/nsNativeThemeGTK.cpp.gtk3-20 firefox-46.0/widget/gtk/nsNativeThemeGTK.cpp
--- firefox-46.0/widget/gtk/nsNativeThemeGTK.cpp.gtk3-20 2016-04-25 14:46:15.300592722 +0200
+++ firefox-46.0/widget/gtk/nsNativeThemeGTK.cpp 2016-04-25 14:40:42.000000000 +0200
diff -up firefox-46.0.1/widget/gtk/nsNativeThemeGTK.cpp.gtk3-20 firefox-46.0.1/widget/gtk/nsNativeThemeGTK.cpp
--- firefox-46.0.1/widget/gtk/nsNativeThemeGTK.cpp.gtk3-20 2016-05-03 07:31:12.000000000 +0200
+++ firefox-46.0.1/widget/gtk/nsNativeThemeGTK.cpp 2016-05-19 15:20:11.658519202 +0200
@@ -1567,9 +1567,6 @@ nsNativeThemeGTK::GetMinimumWidgetSize(n
case NS_THEME_RADIO_CONTAINER:
case NS_THEME_CHECKBOX_LABEL:
@ -1612,4 +1695,3 @@ diff -up firefox-46.0/widget/gtk/nsNativeThemeGTK.cpp.gtk3-20 firefox-46.0/widge
case NS_THEME_TOOLBAR_SEPARATOR:
{
gint separator_width;

View File

@ -1,5 +1,5 @@
# HG changeset patch
# Parent f2726ebfae7cdded8e7ca6030829b0a3fae4e438
# Parent d153e2141b97a77b90ba0b9befe2d80330dcd472
Description: Add KDE integration to Firefox (toolkit parts)
Author: Wolfgang Rosenauer <wolfgang@rosenauer.org>
Author: Lubos Lunak <lunak@suse.com>
@ -337,7 +337,7 @@ new file mode 100644
+
+ <xul:hbox class="dialog-button-box" anonid="buttons"
+ xbl:inherits="pack=buttonpack,align=buttonalign,dir=buttondir,orient=buttonorient"
+#ifdef XP_UNIX
+#ifdef XP_UNIX_GNOME
+ >
+ <xul:button dlgtype="disclosure" class="dialog-button" hidden="true"/>
+ <xul:button dlgtype="help" class="dialog-button" hidden="true"/>

View File

@ -1,2 +1,2 @@
REV=b0310cb90fd0
REV=7f5abf95991b
REPO=http://hg.mozilla.org/releases/mozilla-release