From de7bd010f9eb81af7e74e4d996c28bc7736b2185 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Jun 23 2015 12:19:31 +0000 Subject: Update to 39.0 Build 3 --- diff --git a/.gitignore b/.gitignore index e118d66..b237157 100644 --- a/.gitignore +++ b/.gitignore @@ -143,3 +143,5 @@ firefox-3.6.4.source.tar.bz2 /firefox-langpacks-38.0.1-20150518.tar.xz /firefox-38.0.5.source.tar.bz2 /firefox-langpacks-38.0.5-20150603.tar.xz +/firefox-39.0.source.tar.bz2 +/firefox-langpacks-39.0-20150623.tar.xz diff --git a/firefox-mozconfig b/firefox-mozconfig index 6e2668d..c0cda82 100644 --- a/firefox-mozconfig +++ b/firefox-mozconfig @@ -35,7 +35,6 @@ ac_add_options --enable-pulseaudio ac_add_options --with-system-icu ac_add_options --with-mozilla-api-keyfile=../mozilla-api-key ac_add_options --enable-release -ac_add_options --enable-skia export BUILD_OFFICIAL=1 export MOZILLA_OFFICIAL=1 diff --git a/firefox-nss-3.18.0.patch b/firefox-nss-3.18.0.patch deleted file mode 100644 index a693832..0000000 --- a/firefox-nss-3.18.0.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff -up mozilla-release/configure.in.old mozilla-release/configure.in ---- mozilla-release/configure.in.old 2015-04-28 20:31:45.000000000 +0200 -+++ mozilla-release/configure.in 2015-04-28 20:32:40.807783614 +0200 -@@ -3627,7 +3627,7 @@ MOZ_ARG_WITH_BOOL(system-nss, - _USE_SYSTEM_NSS=1 ) - - if test -n "$_USE_SYSTEM_NSS"; then -- AM_PATH_NSS(3.18.1, [MOZ_NATIVE_NSS=1], [AC_MSG_ERROR([you don't have NSS installed or your version is too old])]) -+ AM_PATH_NSS(3.18.0, [MOZ_NATIVE_NSS=1], [AC_MSG_ERROR([you don't have NSS installed or your version is too old])]) - fi - - if test -n "$MOZ_NATIVE_NSS"; then -diff -up mozilla-release/media/webrtc/trunk/Makefile.old mozilla-release/media/webrtc/trunk/Makefile diff --git a/firefox.spec b/firefox.spec index aabf4ad..241126d 100644 --- a/firefox.spec +++ b/firefox.spec @@ -106,14 +106,14 @@ Summary: Mozilla Firefox Web browser Name: firefox -Version: 38.0.5 -Release: 4%{?pre_tag}%{?dist} +Version: 39.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}-20150603.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20150623.tar.xz %endif Source10: firefox-mozconfig Source11: firefox-mozconfig-branded @@ -133,7 +133,6 @@ Patch18: xulrunner-24.0-jemalloc-ppc.patch Patch19: xulrunner-24.0-s390-inlines.patch Patch20: firefox-build-prbool.patch Patch21: firefox-ppc64le.patch -Patch23: mozilla-1005535.patch Patch24: firefox-debug.patch Patch25: rhbz-1219542-s390-build.patch @@ -144,16 +143,11 @@ Patch215: firefox-enable-addons.patch Patch219: rhbz-1173156.patch Patch220: rhbz-1014858.patch Patch221: firefox-fedora-ua.patch -Patch222: firefox-nss-3.18.0.patch # Upstream patches # Gtk3 upstream patches -Patch410: mozilla-1073117-button-focus.patch -Patch411: mozilla-1073117-focus.patch Patch412: mozilla-1073117-no-gap-tab.patch -Patch414: mozilla-1143686.patch -Patch415: mozilla-1144643.patch Patch416: mozilla-1161056.patch Patch417: mozilla-1144745-1.patch Patch418: mozilla-1144745-2.patch @@ -293,7 +287,6 @@ cd %{tarballdir} %patch19 -p2 -b .s390-inlines %patch20 -p1 -b .prbool %patch21 -p2 -b .ppc64le -%patch23 -p1 -b .1005535 %patch24 -p1 -b .debug %ifarch s390 %patch25 -p1 -b .rhbz-1219542-s390 @@ -309,15 +302,10 @@ cd %{tarballdir} %patch219 -p2 -b .rhbz-1173156 %patch220 -p1 -b .rhbz-1014858 %patch221 -p2 -b .fedora-ua -%patch222 -p1 -b .nss-3.18.0 # Upstream patches %if %{toolkit_gtk3} -%patch410 -p1 -b .1073117-button-focus -%patch411 -p1 -b .1073117-focus %patch412 -p1 -b .1073117-no-gap-tab -%patch414 -p1 -b .1143686 -%patch415 -p1 -b .1144643 %patch416 -p1 -b .1161056 %patch417 -p1 -b .1144745-1 %patch418 -p1 -b .1144745-2 @@ -817,6 +805,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : #--------------------------------------------------------------------- %changelog +* Tue Jun 23 2015 Martin Stransky - 39.0-1 +- Update to 39.0 + * Wed Jun 17 2015 Fedora Release Engineering - 38.0.5-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild diff --git a/mozilla-1005535.patch b/mozilla-1005535.patch deleted file mode 100644 index 2f0381b..0000000 --- a/mozilla-1005535.patch +++ /dev/null @@ -1,194 +0,0 @@ -# HG changeset patch -# Parent b7eb1ce0237d6125b75bc8ff1cb3afc328d6e78c -# User Steve Singer -Bug 1005535 - Get skia GPU building on big endian. - -diff --git a/configure.in b/configure.in ---- a/configure.in -+++ b/configure.in -@@ -8231,21 +8231,21 @@ dnl Skia - dnl ======================================================== - if test "$MOZ_ENABLE_SKIA"; then - AC_DEFINE(MOZ_ENABLE_SKIA) - AC_DEFINE(USE_SKIA) - if test "${MOZ_WIDGET_TOOLKIT}" = "android" -o x"$MOZ_WIDGET_TOOLKIT" = x"gonk"; then - AC_DEFINE(SK_BUILD_FOR_ANDROID_NDK) - fi - -- if test "${CPU_ARCH}" != "ppc" -a "${CPU_ARCH}" != "ppc64" -a "${CPU_ARCH}" != "sparc" -a -z "$MOZ_DISABLE_SKIA_GPU" ; then -+# if test "${CPU_ARCH}" != "ppc" -a "${CPU_ARCH}" != "ppc64" -a "${CPU_ARCH}" != "sparc" -a -z "$MOZ_DISABLE_SKIA_GPU" ; then - MOZ_ENABLE_SKIA_GPU=1 - AC_DEFINE(USE_SKIA_GPU) - AC_SUBST(MOZ_ENABLE_SKIA_GPU) -- fi -+# fi - fi - AC_SUBST(MOZ_ENABLE_SKIA) - - dnl ======================================================== - dnl disable xul - dnl ======================================================== - MOZ_ARG_DISABLE_BOOL(xul, - [ --disable-xul Disable XUL], -diff --git a/gfx/skia/generate_mozbuild.py b/gfx/skia/generate_mozbuild.py ---- a/gfx/skia/generate_mozbuild.py -+++ b/gfx/skia/generate_mozbuild.py -@@ -236,17 +236,17 @@ def generate_separated_sources(platform_ - return True - - return False - - separated = { - 'common': { - #'trunk/src/effects/gradients/SkGradientTileProc.cpp', - 'trunk/src/gpu/gl/GrGLCreateNativeInterface_none.cpp', -- 'trunk/src/ports/SkDiscardableMemory_none.cpp', -+ #'trunk/src/ports/SkDiscardableMemory_none.cpp', - 'trunk/src/ports/SkImageDecoder_empty.cpp', - 'trunk/src/ports/SkMemory_mozalloc.cpp', - # 'trunk/src/images/SkImages.cpp', - # 'trunk/src/images/SkImageRef.cpp', - # 'trunk/src/images/SkImageRef_GlobalPool.cpp', - # 'trunk/src/images/SkImageRefPool.cpp', - # 'trunk/src/images/SkImageDecoder.cpp', - # 'trunk/src/images/SkImageDecoder_Factory.cpp', -diff --git a/gfx/skia/moz.build b/gfx/skia/moz.build ---- a/gfx/skia/moz.build -+++ b/gfx/skia/moz.build -@@ -847,17 +847,16 @@ else: - 'trunk/src/opts/SkBitmapProcState_opts_none.cpp', - 'trunk/src/opts/SkBlitMask_opts_none.cpp', - 'trunk/src/opts/SkBlitRow_opts_none.cpp', - 'trunk/src/opts/SkBlurImage_opts_none.cpp', - 'trunk/src/opts/SkMorphology_opts_none.cpp', - 'trunk/src/opts/SkTextureCompression_opts_none.cpp', - 'trunk/src/opts/SkUtils_opts_none.cpp', - 'trunk/src/opts/SkXfermode_opts_none.cpp', -- 'trunk/src/ports/SkDiscardableMemory_none.cpp', - ] - - - # can we find a better way of dealing with asm sources? - - # left out of UNIFIED_SOURCES for now; that's not C++ anyway, nothing else to unify it with - if not CONFIG['INTEL_ARCHITECTURE'] and CONFIG['CPU_ARCH'] == 'arm' and CONFIG['GNU_CC']: - SOURCES += [ -diff --git a/gfx/skia/trunk/include/config/SkUserConfig.h b/gfx/skia/trunk/include/config/SkUserConfig.h ---- a/gfx/skia/trunk/include/config/SkUserConfig.h -+++ b/gfx/skia/trunk/include/config/SkUserConfig.h -@@ -192,16 +192,17 @@ - - #if defined(SK_CPU_ARM32) || defined(SK_CPU_ARM64) - # define SK_BARRIERS_PLATFORM_H "skia/SkBarriers_arm.h" - #else - # define SK_BARRIERS_PLATFORM_H "skia/SkBarriers_x86.h" - #endif - - // On all platforms we have this byte order -+ - #define SK_A32_SHIFT 24 - #define SK_R32_SHIFT 16 - #define SK_G32_SHIFT 8 - #define SK_B32_SHIFT 0 - - #define SK_ALLOW_STATIC_GLOBAL_INITIALIZERS 0 - - #define SK_SUPPORT_LEGACY_GETDEVICE -diff --git a/gfx/skia/trunk/include/core/SkColorPriv.h b/gfx/skia/trunk/include/core/SkColorPriv.h ---- a/gfx/skia/trunk/include/core/SkColorPriv.h -+++ b/gfx/skia/trunk/include/core/SkColorPriv.h -@@ -27,37 +27,27 @@ - * For easier compatibility with Skia's GPU backend, we further restrict these - * to either (in memory-byte-order) RGBA or BGRA. Note that this "order" does - * not directly correspond to the same shift-order, since we have to take endianess - * into account. - * - * Here we enforce this constraint. - */ - --#ifdef SK_CPU_BENDIAN -- #define SK_RGBA_R32_SHIFT 24 -- #define SK_RGBA_G32_SHIFT 16 -- #define SK_RGBA_B32_SHIFT 8 -- #define SK_RGBA_A32_SHIFT 0 - -- #define SK_BGRA_B32_SHIFT 24 -- #define SK_BGRA_G32_SHIFT 16 -- #define SK_BGRA_R32_SHIFT 8 -- #define SK_BGRA_A32_SHIFT 0 --#else - #define SK_RGBA_R32_SHIFT 0 - #define SK_RGBA_G32_SHIFT 8 - #define SK_RGBA_B32_SHIFT 16 - #define SK_RGBA_A32_SHIFT 24 - - #define SK_BGRA_B32_SHIFT 0 - #define SK_BGRA_G32_SHIFT 8 - #define SK_BGRA_R32_SHIFT 16 - #define SK_BGRA_A32_SHIFT 24 --#endif -+ - - #if defined(SK_PMCOLOR_IS_RGBA) && defined(SK_PMCOLOR_IS_BGRA) - #error "can't define PMCOLOR to be RGBA and BGRA" - #endif - - #define LOCAL_PMCOLOR_SHIFTS_EQUIVALENT_TO_RGBA \ - (SK_A32_SHIFT == SK_RGBA_A32_SHIFT && \ - SK_R32_SHIFT == SK_RGBA_R32_SHIFT && \ -diff --git a/gfx/skia/trunk/include/core/SkImageInfo.h b/gfx/skia/trunk/include/core/SkImageInfo.h ---- a/gfx/skia/trunk/include/core/SkImageInfo.h -+++ b/gfx/skia/trunk/include/core/SkImageInfo.h -@@ -83,19 +83,20 @@ enum SkColorType { - - kLastEnum_SkColorType = kIndex_8_SkColorType, - - #if SK_PMCOLOR_BYTE_ORDER(B,G,R,A) - kN32_SkColorType = kBGRA_8888_SkColorType, - #elif SK_PMCOLOR_BYTE_ORDER(R,G,B,A) - kN32_SkColorType = kRGBA_8888_SkColorType, - #else --#error "SK_*32_SHFIT values must correspond to BGRA or RGBA byte order" -+ kN32_SkColorType = kBGRA_8888_SkColorType - #endif - -+ - #ifdef SK_SUPPORT_LEGACY_N32_NAME - kPMColor_SkColorType = kN32_SkColorType - #endif - }; - - static int SkColorTypeBytesPerPixel(SkColorType ct) { - static const uint8_t gSize[] = { - 0, // Unknown -diff --git a/gfx/skia/trunk/include/gpu/GrTypes.h b/gfx/skia/trunk/include/gpu/GrTypes.h ---- a/gfx/skia/trunk/include/gpu/GrTypes.h -+++ b/gfx/skia/trunk/include/gpu/GrTypes.h -@@ -304,25 +304,23 @@ enum GrPixelConfig { - * Byte order is r, g, b, a. This color format is 32 bits per channel - */ - kRGBA_float_GrPixelConfig, - kLast_GrPixelConfig = kRGBA_float_GrPixelConfig - }; - static const int kGrPixelConfigCnt = kLast_GrPixelConfig + 1; - - // Aliases for pixel configs that match skia's byte order. --#ifndef SK_CPU_LENDIAN -- #error "Skia gpu currently assumes little endian" --#endif -+ - #if SK_PMCOLOR_BYTE_ORDER(B,G,R,A) - static const GrPixelConfig kSkia8888_GrPixelConfig = kBGRA_8888_GrPixelConfig; - #elif SK_PMCOLOR_BYTE_ORDER(R,G,B,A) - static const GrPixelConfig kSkia8888_GrPixelConfig = kRGBA_8888_GrPixelConfig; - #else -- #error "SK_*32_SHIFT values must correspond to GL_BGRA or GL_RGBA format." -+ static const GrPixelConfig kSkia8888_GrPixelConfig = kBGRA_8888_GrPixelConfig; - #endif - - // Returns true if the pixel config is a GPU-specific compressed format - // representation. - static inline bool GrPixelConfigIsCompressed(GrPixelConfig config) { - switch (config) { - case kETC1_GrPixelConfig: - case kLATC_GrPixelConfig: diff --git a/mozilla-1073117-button-focus.patch b/mozilla-1073117-button-focus.patch deleted file mode 100644 index 10be353..0000000 --- a/mozilla-1073117-button-focus.patch +++ /dev/null @@ -1,78 +0,0 @@ -# HG changeset patch -# Parent ee674865d97716b0334559abb8eec54eb5c72cb0 -# User Martin Stransky -Bug 1073117 - Fixed Theme issues with GTK 3.14 - GtkButtons - use border style -property for focus rendering. Don't follow interior-focus which is always true in Gtk 3.14. -r=?karlt - -diff --git a/widget/gtk/gtk3drawing.c b/widget/gtk/gtk3drawing.c ---- a/widget/gtk/gtk3drawing.c -+++ b/widget/gtk/gtk3drawing.c -@@ -903,29 +903,18 @@ moz_gtk_button_paint(cairo_t *cr, GdkRec - GtkWidgetState* state, - GtkReliefStyle relief, GtkWidget* widget, - GtkTextDirection direction) - { - GtkStateFlags state_flags = GetStateFlagsFromGtkWidgetState(state); - GtkStyleContext* style = gtk_widget_get_style_context(widget); - gint x = rect->x, y=rect->y, width=rect->width, height=rect->height; - -- gboolean interior_focus; -- gint focus_width, focus_pad; -- -- moz_gtk_widget_get_focus(widget, &interior_focus, &focus_width, &focus_pad); - gtk_widget_set_direction(widget, direction); -- -- if (!interior_focus && state->focused) { -- x += focus_width + focus_pad; -- y += focus_width + focus_pad; -- width -= 2 * (focus_width + focus_pad); -- height -= 2 * (focus_width + focus_pad); -- } -- -+ - gtk_style_context_save(style); - gtk_style_context_set_state(style, state_flags); - - if (state->isDefault && relief == GTK_RELIEF_NORMAL) { - /* handle default borders both outside and inside the button */ - gint default_top, default_left, default_bottom, default_right; - moz_gtk_button_get_default_overflow(&default_top, &default_left, - &default_bottom, &default_right); -@@ -948,30 +937,22 @@ moz_gtk_button_paint(cairo_t *cr, GdkRec - /* the following line can trigger an assertion (Crux theme) - file ../../gdk/gdkwindow.c: line 1846 (gdk_window_clear_area): - assertion `GDK_IS_WINDOW (window)' failed */ - gtk_render_background(style, cr, x, y, width, height); - gtk_render_frame(style, cr, x, y, width, height); - } - - if (state->focused) { -- if (interior_focus) { -- GtkBorder border; -- gtk_style_context_get_border(style, state_flags, &border); -- x += border.left + focus_pad; -- y += border.top + focus_pad; -- width -= 2 * (border.left + focus_pad); -- height -= 2 * (border.top + focus_pad); -- } else { -- x -= focus_width + focus_pad; -- y -= focus_width + focus_pad; -- width += 2 * (focus_width + focus_pad); -- height += 2 * (focus_width + focus_pad); -- } -- -+ GtkBorder border; -+ gtk_style_context_get_border(style, state_flags, &border); -+ x += border.left; -+ y += border.top; -+ width -= (border.left + border.right); -+ height -= (border.top + border.bottom); - gtk_render_focus(style, cr, x, y, width, height); - } - gtk_style_context_restore(style); - return MOZ_GTK_SUCCESS; - } - - static gint - moz_gtk_toggle_paint(cairo_t *cr, GdkRectangle* rect, diff --git a/mozilla-1073117-focus.patch b/mozilla-1073117-focus.patch deleted file mode 100644 index a67f6e9..0000000 --- a/mozilla-1073117-focus.patch +++ /dev/null @@ -1,641 +0,0 @@ -# HG changeset patch -# User Martin Stransky -# Parent 0850966fdb761c309032575cbc6748a27d794983 -Bug 1073117 - Theme issues with GTK 3.14 - fix gtk button and entry size, r=?karlt -Inner borders and focus theming has been removed in Gtk 3.14 so we can't use them to calculate button size. -The size should be computed as border + padding. - - -diff --git a/widget/gtk/gtk2drawing.c b/widget/gtk/gtk2drawing.c ---- a/widget/gtk/gtk2drawing.c -+++ b/widget/gtk/gtk2drawing.c -@@ -826,17 +826,17 @@ moz_gtk_get_focus_outline_size(gint* foc - *focus_v_width = YTHICKNESS(gEntryWidget->style) + focus_width; - } else { - *focus_h_width = focus_width; - *focus_v_width = focus_width; - } - return MOZ_GTK_SUCCESS; - } - --gint -+static gint - moz_gtk_widget_get_focus(GtkWidget* widget, gboolean* interior_focus, - gint* focus_width, gint* focus_pad) - { - gtk_widget_style_get (widget, - "interior-focus", interior_focus, - "focus-line-width", focus_width, - "focus-padding", focus_pad, - NULL); -@@ -923,17 +923,17 @@ moz_gtk_splitter_get_metrics(gint orient - gtk_widget_style_get(gHPanedWidget, "handle_size", size, NULL); - } else { - ensure_vpaned_widget(); - gtk_widget_style_get(gVPanedWidget, "handle_size", size, NULL); - } - return MOZ_GTK_SUCCESS; - } - --gint -+static gint - moz_gtk_button_get_inner_border(GtkWidget* widget, GtkBorder* inner_border) - { - static const GtkBorder default_inner_border = { 1, 1, 1, 1 }; - GtkBorder *tmp_border; - - gtk_widget_style_get (widget, "inner-border", &tmp_border, NULL); - - if (tmp_border) { -diff --git a/widget/gtk/gtk3drawing.c b/widget/gtk/gtk3drawing.c ---- a/widget/gtk/gtk3drawing.c -+++ b/widget/gtk/gtk3drawing.c -@@ -756,48 +756,28 @@ moz_gtk_radio_get_metrics(gint* indicato - "indicator_spacing", indicator_spacing, - NULL); - - return MOZ_GTK_SUCCESS; - } - - gint - moz_gtk_get_focus_outline_size(gint* focus_h_width, gint* focus_v_width) --{ -- gboolean interior_focus; -- gint focus_width = 0; -+{ -+ GtkBorder border; -+ GtkBorder padding; -+ GtkStyleContext *style; - - ensure_entry_widget(); -- gtk_widget_style_get(gEntryWidget, -- "interior-focus", &interior_focus, -- "focus-line-width", &focus_width, -- NULL); -- if (interior_focus) { -- GtkBorder border; -- GtkStyleContext *style = gtk_widget_get_style_context(gEntryWidget); -- gtk_style_context_get_border(style, 0, &border); -- *focus_h_width = border.left + focus_width; -- *focus_v_width = border.top + focus_width; -- } else { -- *focus_h_width = focus_width; -- *focus_v_width = focus_width; -- } -- return MOZ_GTK_SUCCESS; --} -- --gint --moz_gtk_widget_get_focus(GtkWidget* widget, gboolean* interior_focus, -- gint* focus_width, gint* focus_pad) --{ -- gtk_widget_style_get (widget, -- "interior-focus", interior_focus, -- "focus-line-width", focus_width, -- "focus-padding", focus_pad, -- NULL); -- -+ style = gtk_widget_get_style_context(gEntryWidget); -+ -+ gtk_style_context_get_border(style, 0, &border); -+ gtk_style_context_get_padding(style, 0, &padding); -+ *focus_h_width = border.left + padding.left; -+ *focus_v_width = border.top + padding.top; - return MOZ_GTK_SUCCESS; - } - - gint - moz_gtk_menuitem_get_horizontal_padding(gint* horizontal_padding) - { - ensure_menu_item_widget(); - -@@ -875,34 +855,16 @@ moz_gtk_splitter_get_metrics(gint orient - gtk_widget_style_get(gHPanedWidget, "handle_size", size, NULL); - } else { - ensure_vpaned_widget(); - gtk_widget_style_get(gVPanedWidget, "handle_size", size, NULL); - } - return MOZ_GTK_SUCCESS; - } - --gint --moz_gtk_button_get_inner_border(GtkWidget* widget, GtkBorder* inner_border) --{ -- static const GtkBorder default_inner_border = { 1, 1, 1, 1 }; -- GtkBorder *tmp_border; -- -- gtk_widget_style_get (widget, "inner-border", &tmp_border, NULL); -- -- if (tmp_border) { -- *inner_border = *tmp_border; -- gtk_border_free(tmp_border); -- } -- else -- *inner_border = default_inner_border; -- -- return MOZ_GTK_SUCCESS; --} -- - static gint - moz_gtk_button_paint(cairo_t *cr, GdkRectangle* rect, - GtkWidgetState* state, - GtkReliefStyle relief, GtkWidget* widget, - GtkTextDirection direction) - { - GtkStateFlags state_flags = GetStateFlagsFromGtkWidgetState(state); - GtkStyleContext* style = gtk_widget_get_style_context(widget); -@@ -1032,43 +994,33 @@ moz_gtk_toggle_paint(cairo_t *cr, GdkRec - } - - static gint - calculate_button_inner_rect(GtkWidget* button, GdkRectangle* rect, - GdkRectangle* inner_rect, - GtkTextDirection direction, - gboolean ignore_focus) - { -- GtkBorder inner_border; -- gboolean interior_focus; -- gint focus_width, focus_pad; - GtkStyleContext* style; - GtkBorder border; -+ GtkBorder padding = {0, 0, 0, 0}; - - style = gtk_widget_get_style_context(button); - - /* This mirrors gtkbutton's child positioning */ -- moz_gtk_button_get_inner_border(button, &inner_border); -- moz_gtk_widget_get_focus(button, &interior_focus, -- &focus_width, &focus_pad); -- -- if (ignore_focus) -- focus_width = focus_pad = 0; -- -- gtk_style_context_get_border(style, 0, &border); -- -- inner_rect->x = rect->x + border.left + focus_width + focus_pad; -- inner_rect->x += direction == GTK_TEXT_DIR_LTR ? -- inner_border.left : inner_border.right; -- inner_rect->y = rect->y + inner_border.top + border.top + -- focus_width + focus_pad; -- inner_rect->width = MAX(1, rect->width - inner_border.left - -- inner_border.right - (border.left + focus_pad + focus_width) * 2); -- inner_rect->height = MAX(1, rect->height - inner_border.top - -- inner_border.bottom - (border.top + focus_pad + focus_width) * 2); -+ gtk_style_context_get_border(style, 0, &border); -+ if (!ignore_focus) -+ gtk_style_context_get_padding(style, 0, &padding); -+ -+ inner_rect->x = rect->x + border.left + padding.left; -+ inner_rect->y = rect->y + padding.top + border.top; -+ inner_rect->width = MAX(1, rect->width - padding.left - -+ padding.right - border.left * 2); -+ inner_rect->height = MAX(1, rect->height - padding.top - -+ padding.bottom - border.top * 2); - - return MOZ_GTK_SUCCESS; - } - - - static gint - calculate_arrow_rect(GtkWidget* arrow, GdkRectangle* rect, - GdkRectangle* arrow_rect, GtkTextDirection direction) -@@ -1427,29 +1379,22 @@ moz_gtk_vpaned_paint(cairo_t *cr, GdkRec - // See gtk_entry_draw() for reference. - static gint - moz_gtk_entry_paint(cairo_t *cr, GdkRectangle* rect, - GtkWidgetState* state, - GtkWidget* widget, GtkTextDirection direction) - { - gint x = rect->x, y = rect->y, width = rect->width, height = rect->height; - GtkStyleContext* style; -- gboolean interior_focus; -- gint focus_width; - int draw_focus_outline_only = state->depressed; // NS_THEME_FOCUS_OUTLINE - - gtk_widget_set_direction(widget, direction); - - style = gtk_widget_get_style_context(widget); - -- gtk_widget_style_get(widget, -- "interior-focus", &interior_focus, -- "focus-line-width", &focus_width, -- NULL); -- - if (draw_focus_outline_only) { - // Inflate the given 'rect' with the focus outline size. - gint h, v; - moz_gtk_get_focus_outline_size(&h, &v); - rect->x -= h; - rect->width += 2 * h; - rect->y -= v; - rect->height += 2 * v; -@@ -1471,40 +1416,27 @@ moz_gtk_entry_paint(cairo_t *cr, GdkRect - /* Now paint the shadow and focus border. - * We do like in gtk_entry_draw_frame, we first draw the shadow, a tad - * smaller when focused if the focus is not interior, then the focus. */ - - if (state->focused && !state->disabled) { - /* This will get us the lit borders that focused textboxes enjoy on - * some themes. */ - gtk_style_context_set_state(style, GTK_STATE_FLAG_FOCUSED); -- if (!interior_focus) { -- /* Indent the border a little bit if we have exterior focus -- (this is what GTK does to draw native entries) */ -- x += focus_width; -- y += focus_width; -- width -= 2 * focus_width; -- height -= 2 * focus_width; -- } - } - - if (state->disabled) { - gtk_style_context_set_state(style, GTK_STATE_FLAG_INSENSITIVE); - } - - if (!draw_focus_outline_only) { - gtk_render_background(style, cr, x, y, width, height); - } - gtk_render_frame(style, cr, x, y, width, height); - -- if (state->focused && !state->disabled) { -- if (!interior_focus) { -- gtk_render_focus(style, cr, rect->x, rect->y, rect->width, rect->height); -- } -- } - gtk_style_context_restore(style); - - return MOZ_GTK_SUCCESS; - } - - static gint - moz_gtk_treeview_paint(cairo_t *cr, GdkRectangle* rect, - GtkWidgetState* state, -@@ -1799,56 +1731,48 @@ moz_gtk_combo_box_entry_button_paint(cai - static gint - moz_gtk_container_paint(cairo_t *cr, GdkRectangle* rect, - GtkWidgetState* state, - gboolean isradio, GtkTextDirection direction) - { - GtkStateFlags state_flags = GetStateFlagsFromGtkWidgetState(state); - GtkStyleContext* style; - GtkWidget *widget; -- gboolean interior_focus; -- gint focus_width, focus_pad; - - if (isradio) { - ensure_radiobutton_widget(); - widget = gRadiobuttonWidget; - } else { - ensure_checkbox_widget(); - widget = gCheckboxWidget; - } - gtk_widget_set_direction(widget, direction); - - style = gtk_widget_get_style_context(widget); - gtk_style_context_save(style); -- moz_gtk_widget_get_focus(widget, &interior_focus, &focus_width, &focus_pad); - gtk_style_context_set_state(style, state_flags); - - /* this is for drawing a prelight box */ - if (state_flags & GTK_STATE_FLAG_PRELIGHT) { - gtk_render_background(style, cr, - rect->x, rect->y, rect->width, rect->height); - } - -- if (state->focused && !interior_focus) { -- gtk_render_focus(style, cr, -- rect->x, rect->y, rect->width, rect->height); -- } - gtk_style_context_restore(style); - - return MOZ_GTK_SUCCESS; - } - - static gint - moz_gtk_toggle_label_paint(cairo_t *cr, GdkRectangle* rect, - GtkWidgetState* state, - gboolean isradio, GtkTextDirection direction) - { - GtkStyleContext *style; - GtkWidget *widget; -- gboolean interior_focus; - - if (!state->focused) - return MOZ_GTK_SUCCESS; - - if (isradio) { - ensure_radiobutton_widget(); - widget = gRadiobuttonWidget; - } else { -@@ -1859,20 +1783,16 @@ moz_gtk_toggle_label_paint(cairo_t *cr, - 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); - } - gtk_widget_set_direction(widget, direction); - -- gtk_widget_style_get(widget, "interior-focus", &interior_focus, NULL); -- if (!interior_focus) -- return MOZ_GTK_SUCCESS; -- - gtk_style_context_set_state(style, GetStateFlagsFromGtkWidgetState(state)); - gtk_render_focus(style, cr, - rect->x, rect->y, rect->width, rect->height); - gtk_style_context_restore(style); - - return MOZ_GTK_SUCCESS; - } - -@@ -2660,44 +2580,42 @@ moz_gtk_get_widget_border(GtkThemeWidget - { - GtkWidget* w; - GtkStyleContext* style; - *left = *top = *right = *bottom = 0; - - switch (widget) { - case MOZ_GTK_BUTTON: - { -- GtkBorder inner_border; -- gboolean interior_focus; -- gint focus_width, focus_pad; -- - ensure_button_widget(); -+ style = gtk_widget_get_style_context(gButtonWidget); -+ - *left = *top = *right = *bottom = gtk_container_get_border_width(GTK_CONTAINER(gButtonWidget)); - - /* Don't add this padding in HTML, otherwise the buttons will - become too big and stuff the layout. */ - if (!inhtml) { -- moz_gtk_widget_get_focus(gButtonWidget, &interior_focus, &focus_width, &focus_pad); -- moz_gtk_button_get_inner_border(gButtonWidget, &inner_border); -- *left += focus_width + focus_pad + inner_border.left; -- *right += focus_width + focus_pad + inner_border.right; -- *top += focus_width + focus_pad + inner_border.top; -- *bottom += focus_width + focus_pad + inner_border.bottom; -+ moz_gtk_add_style_padding(style, left, top, right, bottom); - } - -- moz_gtk_add_style_border(gtk_widget_get_style_context(gButtonWidget), -- left, top, right, bottom); -+ moz_gtk_add_style_border(style, left, top, right, bottom); - return MOZ_GTK_SUCCESS; - } - case MOZ_GTK_ENTRY: - { - ensure_entry_widget(); - style = gtk_widget_get_style_context(gEntryWidget); - moz_gtk_add_style_border(style, left, top, right, bottom); -- moz_gtk_add_style_padding(style, left, top, right, bottom); -+ -+ /* Use the document padding in HTML -+ and GTK style padding in XUL. */ -+ if (!inhtml) { -+ moz_gtk_add_style_padding(style, left, top, right, bottom); -+ } -+ - return MOZ_GTK_SUCCESS; - } - case MOZ_GTK_TREEVIEW: - { - ensure_scrolled_window_widget(); - style = gtk_widget_get_style_context(gScrolledWindowWidget); - gtk_style_context_save(style); - gtk_style_context_add_class(style, GTK_STYLE_CLASS_FRAME); -@@ -2707,33 +2625,25 @@ moz_gtk_get_widget_border(GtkThemeWidget - } - case MOZ_GTK_TREE_HEADER_CELL: - { - /* A Tree Header in GTK is just a different styled button - * It must be placed in a TreeView for getting the correct style - * assigned. - * That is why the following code is the same as for MOZ_GTK_BUTTON. - * */ -- -- GtkBorder inner_border; -- gboolean interior_focus; -- gint focus_width, focus_pad; -+ GtkStyleContext *style; - - ensure_tree_header_cell_widget(); - *left = *top = *right = *bottom = gtk_container_get_border_width(GTK_CONTAINER(gTreeHeaderCellWidget)); - -- moz_gtk_widget_get_focus(gTreeHeaderCellWidget, &interior_focus, &focus_width, &focus_pad); -- moz_gtk_button_get_inner_border(gTreeHeaderCellWidget, &inner_border); -- *left += focus_width + focus_pad + inner_border.left; -- *right += focus_width + focus_pad + inner_border.right; -- *top += focus_width + focus_pad + inner_border.top; -- *bottom += focus_width + focus_pad + inner_border.bottom; -- -- moz_gtk_add_style_border(gtk_widget_get_style_context(gTreeHeaderCellWidget), -- left, top, right, bottom); -+ style = gtk_widget_get_style_context(gTreeHeaderCellWidget); -+ -+ moz_gtk_add_style_border(style, left, top, right, bottom); -+ moz_gtk_add_style_padding(style, left, top, right, bottom); - return MOZ_GTK_SUCCESS; - } - case MOZ_GTK_TREE_HEADER_SORTARROW: - ensure_tree_header_cell_widget(); - w = gTreeHeaderSortArrowWidget; - break; - case MOZ_GTK_DROPDOWN_ENTRY: - ensure_combo_box_entry_widgets(); -@@ -2743,39 +2653,33 @@ moz_gtk_get_widget_border(GtkThemeWidget - ensure_combo_box_entry_widgets(); - w = gComboBoxEntryButtonWidget; - break; - case MOZ_GTK_DROPDOWN: - { - /* We need to account for the arrow on the dropdown, so text - * doesn't come too close to the arrow, or in some cases spill - * into the arrow. */ -- gboolean ignored_interior_focus, wide_separators; -- gint focus_width, focus_pad, separator_width; -+ gboolean wide_separators; -+ gint separator_width; - GtkRequisition arrow_req; - GtkBorder border; - - ensure_combo_box_widgets(); - -- *left = gtk_container_get_border_width(GTK_CONTAINER(gComboBoxButtonWidget)); -+ *left = *top = *right = *bottom = -+ gtk_container_get_border_width(GTK_CONTAINER(gComboBoxButtonWidget)); -+ -+ style = gtk_widget_get_style_context(gComboBoxButtonWidget); - - if (!inhtml) { -- moz_gtk_widget_get_focus(gComboBoxButtonWidget, -- &ignored_interior_focus, -- &focus_width, &focus_pad); -- *left += focus_width + focus_pad; -+ moz_gtk_add_style_padding(style, left, top, right, bottom); - } - -- style = gtk_widget_get_style_context(gComboBoxButtonWidget); -- gtk_style_context_get_border(style, 0, &border); -- -- *top = *left + border.top; -- *left += border.left; -- -- *right = *left; *bottom = *top; -+ moz_gtk_add_style_border(style, left, top, right, bottom); - - /* If there is no separator, don't try to count its width. */ - separator_width = 0; - if (gComboBoxSeparatorWidget) { - gtk_widget_style_get(gComboBoxSeparatorWidget, - "wide-separators", &wide_separators, - "separator-width", &separator_width, - NULL); -@@ -2817,70 +2721,33 @@ moz_gtk_get_widget_border(GtkThemeWidget - case MOZ_GTK_SCALE_VERTICAL: - ensure_scale_widget(); - w = gVScaleWidget; - break; - case MOZ_GTK_FRAME: - ensure_frame_widget(); - w = gFrameWidget; - break; -- case MOZ_GTK_CHECKBUTTON_LABEL: -- case MOZ_GTK_RADIOBUTTON_LABEL: -- { -- gboolean interior_focus; -- gint focus_width, focus_pad; -- -- /* If the focus is interior, then the label has a border of -- (focus_width + focus_pad). */ -- if (widget == MOZ_GTK_CHECKBUTTON_LABEL) { -- ensure_checkbox_widget(); -- moz_gtk_widget_get_focus(gCheckboxWidget, &interior_focus, -- &focus_width, &focus_pad); -- } -- else { -- ensure_radiobutton_widget(); -- moz_gtk_widget_get_focus(gRadiobuttonWidget, &interior_focus, -- &focus_width, &focus_pad); -- } -- -- if (interior_focus) -- *left = *top = *right = *bottom = (focus_width + focus_pad); -- -- return MOZ_GTK_SUCCESS; -- } -- - case MOZ_GTK_CHECKBUTTON_CONTAINER: - case MOZ_GTK_RADIOBUTTON_CONTAINER: - { -- gboolean interior_focus; -- gint focus_width, focus_pad; -- -- /* If the focus is _not_ interior, then the container has a border -- of (focus_width + focus_pad). */ - if (widget == MOZ_GTK_CHECKBUTTON_CONTAINER) { - ensure_checkbox_widget(); -- moz_gtk_widget_get_focus(gCheckboxWidget, &interior_focus, -- &focus_width, &focus_pad); - w = gCheckboxWidget; - } else { - ensure_radiobutton_widget(); -- moz_gtk_widget_get_focus(gRadiobuttonWidget, &interior_focus, -- &focus_width, &focus_pad); - w = gRadiobuttonWidget; - } -+ style = gtk_widget_get_style_context(w); - - *left = *top = *right = *bottom = gtk_container_get_border_width(GTK_CONTAINER(w)); -- -- if (!interior_focus) { -- *left += (focus_width + focus_pad); -- *right += (focus_width + focus_pad); -- *top += (focus_width + focus_pad); -- *bottom += (focus_width + focus_pad); -- } -- -+ moz_gtk_add_style_border(style, -+ left, top, right, bottom); -+ moz_gtk_add_style_padding(style, -+ left, top, right, bottom); - return MOZ_GTK_SUCCESS; - } - case MOZ_GTK_MENUPOPUP: - ensure_menu_popup_widget(); - w = gMenuPopupWidget; - break; - case MOZ_GTK_MENUITEM: - case MOZ_GTK_CHECKMENUITEM: -@@ -2897,16 +2764,18 @@ moz_gtk_get_widget_border(GtkThemeWidget - } - - *left = *top = *right = *bottom = gtk_container_get_border_width(GTK_CONTAINER(w)); - moz_gtk_add_style_padding(gtk_widget_get_style_context(w), - left, top, right, bottom); - return MOZ_GTK_SUCCESS; - } - /* These widgets have no borders, since they are not containers. */ -+ case MOZ_GTK_CHECKBUTTON_LABEL: -+ case MOZ_GTK_RADIOBUTTON_LABEL: - case MOZ_GTK_SPLITTER_HORIZONTAL: - case MOZ_GTK_SPLITTER_VERTICAL: - case MOZ_GTK_CHECKBUTTON: - case MOZ_GTK_RADIOBUTTON: - case MOZ_GTK_SCROLLBAR_BUTTON: - case MOZ_GTK_SCROLLBAR_TRACK_HORIZONTAL: - case MOZ_GTK_SCROLLBAR_TRACK_VERTICAL: - case MOZ_GTK_SCROLLBAR_THUMB_HORIZONTAL: -diff --git a/widget/gtk/gtkdrawing.h b/widget/gtk/gtkdrawing.h ---- a/widget/gtk/gtkdrawing.h -+++ b/widget/gtk/gtkdrawing.h -@@ -288,49 +288,26 @@ moz_gtk_checkbox_get_metrics(gint* indic - * indicator_spacing: [OUT] the spacing between the indicator and its - * container - * - * returns: MOZ_GTK_SUCCESS if there was no error, an error code otherwise - */ - gint - moz_gtk_radio_get_metrics(gint* indicator_size, gint* indicator_spacing); - --/** -- * Get the inner-border value for a GtkButton widget (button or tree header) -- * widget: [IN] the widget to get the border value for -- * inner_border: [OUT] the inner border -- * -- * returns: MOZ_GTK_SUCCESS if there was no error, an error code otherwise -- */ --gint --moz_gtk_button_get_inner_border(GtkWidget* widget, GtkBorder* inner_border); -- - /** Get the extra size for the focus ring for outline:auto. - * widget: [IN] the widget to get the focus metrics for - * focus_h_width: [OUT] the horizontal width - * focus_v_width: [OUT] the vertical width - * - * returns: MOZ_GTK_SUCCESS - */ - gint - moz_gtk_get_focus_outline_size(gint* focus_h_width, gint* focus_v_width); - --/** Get the focus metrics for a treeheadercell, button, checkbox, or radio button. -- * widget: [IN] the widget to get the focus metrics for -- * interior_focus: [OUT] whether the focus is drawn around the -- * label (TRUE) or around the whole container (FALSE) -- * focus_width: [OUT] the width of the focus line -- * focus_pad: [OUT] the padding between the focus line and children -- * -- * returns: MOZ_GTK_SUCCESS if there was no error, an error code otherwise -- */ --gint --moz_gtk_widget_get_focus(GtkWidget* widget, gboolean* interior_focus, -- gint* focus_width, gint* focus_pad); -- - /** Get the horizontal padding for the menuitem widget or checkmenuitem widget. - * horizontal_padding: [OUT] The left and right padding of the menuitem or checkmenuitem - * - * returns: MOZ_GTK_SUCCESS if there was no error, an error code otherwise - */ - gint - moz_gtk_menuitem_get_horizontal_padding(gint* horizontal_padding); - diff --git a/mozilla-1143686.patch b/mozilla-1143686.patch deleted file mode 100644 index cd10ec0..0000000 --- a/mozilla-1143686.patch +++ /dev/null @@ -1,53 +0,0 @@ -# HG changeset patch -# User Martin Stransky -# Parent 436686833af095ee3a44f933228ea04890162778 -Bug 1143686 - Gtk3 - render scrollbar thumb with margin, r=?karlt - -diff --git a/widget/gtk/gtk3drawing.c b/widget/gtk/gtk3drawing.c ---- a/widget/gtk/gtk3drawing.c -+++ b/widget/gtk/gtk3drawing.c -@@ -1225,34 +1225,40 @@ moz_gtk_scrollbar_thumb_paint(GtkThemeWi - cairo_t *cr, GdkRectangle* rect, - GtkWidgetState* state, - GtkTextDirection direction) - { - GtkStateFlags state_flags = GetStateFlagsFromGtkWidgetState(state); - GtkStyleContext* style; - GtkScrollbar *scrollbar; - GtkAdjustment *adj; -+ GtkBorder margin; - - ensure_scrollbar_widget(); - - if (widget == MOZ_GTK_SCROLLBAR_THUMB_HORIZONTAL) - scrollbar = GTK_SCROLLBAR(gHorizScrollbarWidget); - else - scrollbar = GTK_SCROLLBAR(gVertScrollbarWidget); - - gtk_widget_set_direction(GTK_WIDGET(scrollbar), direction); -- -+ - style = gtk_widget_get_style_context(GTK_WIDGET(scrollbar)); - gtk_style_context_save(style); -- -+ - gtk_style_context_add_class(style, GTK_STYLE_CLASS_SLIDER); - gtk_style_context_set_state(style, state_flags); - -- gtk_render_slider(style, cr, rect->x, rect->y, -- rect->width, rect->height, -+ gtk_style_context_get_margin (style, state_flags, &margin); -+ -+ gtk_render_slider(style, cr, -+ rect->x + margin.left, -+ rect->y + margin.top, -+ rect->width - margin.left - margin.right, -+ rect->height - margin.top - margin.bottom, - (widget == MOZ_GTK_SCROLLBAR_THUMB_HORIZONTAL) ? - GTK_ORIENTATION_HORIZONTAL : GTK_ORIENTATION_VERTICAL); - - gtk_style_context_restore(style); - - return MOZ_GTK_SUCCESS; - } - diff --git a/mozilla-1144643.patch b/mozilla-1144643.patch deleted file mode 100644 index 4973c33..0000000 --- a/mozilla-1144643.patch +++ /dev/null @@ -1,31 +0,0 @@ -# HG changeset patch -# User Martin Stransky -# Parent fe49971df272eeb2333d992dfc7a1928d261f0c9 -Bug 1144643 - Render tooltips as transparent on Gtk3, r=?karlt - -diff --git a/widget/gtk/nsNativeThemeGTK.cpp b/widget/gtk/nsNativeThemeGTK.cpp ---- a/widget/gtk/nsNativeThemeGTK.cpp -+++ b/widget/gtk/nsNativeThemeGTK.cpp -@@ -1523,15 +1523,21 @@ nsNativeThemeGTK::GetWidgetTransparency( - case NS_THEME_SCROLLBAR_TRACK_VERTICAL: - case NS_THEME_SCROLLBAR_TRACK_HORIZONTAL: - case NS_THEME_TOOLBAR: - case NS_THEME_MENUBAR: - #endif - case NS_THEME_MENUPOPUP: - case NS_THEME_WINDOW: - case NS_THEME_DIALOG: -- // Tooltips use gtk_paint_flat_box(). -+ return eOpaque; -+ // Tooltips use gtk_paint_flat_box() on Gtk2 -+ // but are shaped on Gtk3 - case NS_THEME_TOOLTIP: -+#if (MOZ_WIDGET_GTK == 2) - return eOpaque; -+#else -+ return eTransparent; -+#endif - } - - return eUnknownTransparency; - } diff --git a/sources b/sources index 86b82ab..d4a561a 100644 --- a/sources +++ b/sources @@ -1,2 +1,4 @@ 60466afbc7105d29dcd18f996c9c67e0 firefox-38.0.5.source.tar.bz2 7ea2618f34a9c6885599da8e9655a2c3 firefox-langpacks-38.0.5-20150603.tar.xz +5019e37dbaea582f01399be6cce334e2 firefox-39.0.source.tar.bz2 +eceaa0e99971d5f63314cc4387083e82 firefox-langpacks-39.0-20150623.tar.xz