diff options
author | Max Liebkies | 2018-03-28 13:57:38 +0200 |
---|---|---|
committer | Max Liebkies | 2018-03-28 13:57:38 +0200 |
commit | dd223841338549835354e9d764bf8caaf08a35ba (patch) | |
tree | aecab80f9d4820d24a052c40541768a4379a9f47 | |
parent | b19808e0e3f168ab0a984c7592cbbf84d0649b3e (diff) | |
download | aur-dd223841338549835354e9d764bf8caaf08a35ba.tar.gz |
Update to 59.0.2 (stable from [extra])
-rw-r--r-- | .SRCINFO | 55 | ||||
-rw-r--r-- | .gitignore | 5 | ||||
-rw-r--r-- | PKGBUILD | 229 | ||||
-rw-r--r-- | firefox-gtk3-20.patch | 1697 | ||||
-rw-r--r-- | firefox-install-dir.patch | 12 | ||||
-rw-r--r-- | firefox-symbolic.svg | 78 | ||||
-rw-r--r-- | firefox-wayland.patch | 325 | ||||
-rw-r--r-- | firefox.desktop | 375 | ||||
-rw-r--r-- | mozconfig | 31 | ||||
-rw-r--r-- | mozilla-1245076-1.patch | 49 | ||||
-rw-r--r-- | mozilla-1245076.patch | 23 | ||||
-rw-r--r-- | no-crmf.diff | 15 | ||||
-rw-r--r-- | no-libnotify.patch | 51 | ||||
-rwxr-xr-x | upload-symbol-archive | 24 | ||||
-rw-r--r-- | vendor.js | 9 |
15 files changed, 422 insertions, 2556 deletions
@@ -1,11 +1,8 @@ -# Generated by mksrcinfo v8 -# Thu Jun 23 20:14:55 UTC 2016 pkgbase = firefox-wayland - pkgdesc = Standalone web browser from mozilla.org with Wayland patches - pkgver = 47.0 - pkgrel = 3 - url = https://bugzilla.mozilla.org/show_bug.cgi?id=635134 - arch = i686 + pkgdesc = Standalone web browser from mozilla.org with Wayland support enabled + pkgver = 59.0.2 + pkgrel = 1 + url = https://www.mozilla.org/firefox/ arch = x86_64 license = MPL license = GPL @@ -18,54 +15,46 @@ pkgbase = firefox-wayland makedepends = mesa makedepends = imake makedepends = gconf - makedepends = libpulse makedepends = inetutils makedepends = xorg-server-xvfb makedepends = autoconf2.13 + makedepends = rust + makedepends = mercurial + makedepends = clang + makedepends = llvm + makedepends = jack + makedepends = gtk2 depends = gtk3 - depends = gtk2 depends = mozilla-common depends = libxt depends = startup-notification depends = mime-types depends = dbus-glib - depends = alsa-lib depends = ffmpeg - depends = libvpx - depends = libevent depends = nss depends = hunspell depends = sqlite depends = ttf-font + depends = libpulse + depends = libvpx depends = icu optdepends = networkmanager: Location detection via available WiFi networks - optdepends = upower: Battery API + optdepends = libnotify: Notification integration + optdepends = pulseaudio: Audio support + optdepends = speech-dispatcher: Text-to-Speech provides = firefox conflicts = firefox options = !emptydirs options = !makeflags - source = https://ftp.mozilla.org/pub/mozilla.org/firefox/releases/47.0/source/firefox-47.0.source.tar.xz - source = mozconfig + options = !strip + source = hg+https://hg.mozilla.org/mozilla-unified#tag=FIREFOX_59_0_2_RELEASE source = firefox.desktop - source = firefox-install-dir.patch - source = vendor.js source = firefox-symbolic.svg - source = firefox-gtk3-20.patch - source = mozilla-1245076.patch - source = mozilla-1245076-1.patch - source = no-libnotify.patch - source = firefox-wayland.patch - sha256sums = 51936fcf86c5f84e7fdd377d07658a02a1c99d2ebdc3c8aae01d70f947331d12 - sha256sums = ee8f508442147ad5afcd9c9e60d50d22659ad8c246d35ce8c97aa4463be3a9bc - sha256sums = c202e5e18da1eeddd2e1d81cb3436813f11e44585ca7357c4c5f1bddd4bec826 - sha256sums = d86e41d87363656ee62e12543e2f5181aadcff448e406ef3218e91865ae775cd - sha256sums = 4b50e9aec03432e21b44d18c4c97b2630bace606b033f7d556c9d3e3eb0f4fa4 - sha256sums = a2474b32b9b2d7e0fb53a4c89715507ad1c194bef77713d798fa39d507def9e9 - sha256sums = f1aaf36c2f059e027fc7384c0943ccd07c6e3d58721ec7a96d5d913a106717cc - sha256sums = 05574c7d0f259da161bcd0e2e8bc9a19401e620ff29439da935d349eebb60efa - sha256sums = 6e7cba25c52b246da183b8309e7b56208bd991d1a7adb40063c5702a6f3722ea - sha256sums = e4ebdd14096d177d264a7993dbd5df46463605ff45f783732c26d30b9caa53a7 - sha256sums = 011b6769ff9dc793013b3740bb72b96f2830764d5d67e20dcdab29a25d45f288 + source = no-crmf.diff + sha256sums = SKIP + sha256sums = 677e1bde4c6b3cff114345c211805c7c43085038ca0505718a11e96432e9811a + sha256sums = 9a1a572dc88014882d54ba2d3079a1cf5b28fa03c5976ed2cb763c93dabbd797 + sha256sums = 02000d185e647aa20ca336e595b4004bb29cdae9d8f317f90078bdcc7a36e873 pkgname = firefox-wayland diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..a385d1d1576f --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +*.xz +/pkg +/src +*.zip +mozilla-unified/ @@ -1,55 +1,40 @@ -# Maintainer: Jonas Heinrich <onny@project-insanity.org> -# Contributor: Jonas Heinrich <onny@project-insanity.org> -# Contributor: argymeg <argymeg at gmail dot com> +# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com> +# Contributor: Ionut Biru <ibiru@archlinux.org> +# Contributor: Jakub Schmidtke <sjakub@gmail.com> +# Contributor: Max Liebkies <mail@maxliebkies.de> pkgname=firefox-wayland -pkgver=47.0 -pkgrel=3 -pkgdesc="Standalone web browser from mozilla.org with Wayland patches" -arch=('i686' 'x86_64') -license=('MPL' 'GPL' 'LGPL') -url="https://bugzilla.mozilla.org/show_bug.cgi?id=635134" -depends=('gtk3' 'gtk2' 'mozilla-common' 'libxt' 'startup-notification' 'mime-types' - 'dbus-glib' 'alsa-lib' 'ffmpeg' 'libvpx' 'libevent' 'nss' 'hunspell' - 'sqlite' 'ttf-font' 'icu') -makedepends=('unzip' 'zip' 'diffutils' 'python2' 'yasm' 'mesa' 'imake' 'gconf' - 'libpulse' 'inetutils' 'xorg-server-xvfb' 'autoconf2.13') +pkgver=59.0.2 +pkgrel=1 +pkgdesc="Standalone web browser from mozilla.org with Wayland support enabled" +arch=(x86_64) +license=(MPL GPL LGPL) +url="https://www.mozilla.org/firefox/" +provides=('firefox') +conflicts=('firefox') +depends=(gtk3 mozilla-common libxt startup-notification mime-types dbus-glib ffmpeg + nss hunspell sqlite ttf-font libpulse libvpx icu) +makedepends=(unzip zip diffutils python2 yasm mesa imake gconf inetutils xorg-server-xvfb + autoconf2.13 rust mercurial clang llvm jack gtk2) optdepends=('networkmanager: Location detection via available WiFi networks' - 'upower: Battery API') -conflicts=("firefox") -provides=("firefox") -options=('!emptydirs' '!makeflags') -source=(https://ftp.mozilla.org/pub/mozilla.org/firefox/releases/$pkgver/source/firefox-$pkgver.source.tar.xz - mozconfig - firefox.desktop - firefox-install-dir.patch - vendor.js - firefox-symbolic.svg - firefox-gtk3-20.patch - mozilla-1245076.patch - mozilla-1245076-1.patch - no-libnotify.patch - firefox-wayland.patch) -sha256sums=('51936fcf86c5f84e7fdd377d07658a02a1c99d2ebdc3c8aae01d70f947331d12' - 'ee8f508442147ad5afcd9c9e60d50d22659ad8c246d35ce8c97aa4463be3a9bc' - 'c202e5e18da1eeddd2e1d81cb3436813f11e44585ca7357c4c5f1bddd4bec826' - 'd86e41d87363656ee62e12543e2f5181aadcff448e406ef3218e91865ae775cd' - '4b50e9aec03432e21b44d18c4c97b2630bace606b033f7d556c9d3e3eb0f4fa4' - 'a2474b32b9b2d7e0fb53a4c89715507ad1c194bef77713d798fa39d507def9e9' - 'f1aaf36c2f059e027fc7384c0943ccd07c6e3d58721ec7a96d5d913a106717cc' - '05574c7d0f259da161bcd0e2e8bc9a19401e620ff29439da935d349eebb60efa' - '6e7cba25c52b246da183b8309e7b56208bd991d1a7adb40063c5702a6f3722ea' - 'e4ebdd14096d177d264a7993dbd5df46463605ff45f783732c26d30b9caa53a7' - '011b6769ff9dc793013b3740bb72b96f2830764d5d67e20dcdab29a25d45f288') -validpgpkeys=('2B90598A745E992F315E22C58AB132963A06537A') + 'libnotify: Notification integration' + 'pulseaudio: Audio support' + 'speech-dispatcher: Text-to-Speech') +options=(!emptydirs !makeflags !strip) +_repo=https://hg.mozilla.org/mozilla-unified +source=("hg+$_repo#tag=FIREFOX_${pkgver//./_}_RELEASE" + firefox.desktop firefox-symbolic.svg + no-crmf.diff) +sha256sums=('SKIP' + '677e1bde4c6b3cff114345c211805c7c43085038ca0505718a11e96432e9811a' + '9a1a572dc88014882d54ba2d3079a1cf5b28fa03c5976ed2cb763c93dabbd797' + '02000d185e647aa20ca336e595b4004bb29cdae9d8f317f90078bdcc7a36e873') # Google API keys (see http://www.chromium.org/developers/how-tos/api-keys) # Note: These are for Arch Linux use ONLY. For your own distribution, please # get your own set of keys. Feel free to contact foutrelis@archlinux.org for # more information. _google_api_key=AIzaSyDwr302FpOSkGRpLlUpPThNTDPbXcIn_FM -_google_default_client_id=413772536636.apps.googleusercontent.com -_google_default_client_secret=0ZChLK6AxeA3Isu96MkwqDR4 # Mozilla API keys (see https://location.services.mozilla.com/api) # Note: These are for Arch Linux use ONLY. For your own distribution, please @@ -57,74 +42,119 @@ _google_default_client_secret=0ZChLK6AxeA3Isu96MkwqDR4 # more information. _mozilla_api_key=16674381-f021-49de-8622-3021c5942aff - prepare() { - cd firefox-$pkgver - - cp ../mozconfig .mozconfig - patch -Np1 -i ../firefox-install-dir.patch - - # https://bugzilla.mozilla.org/show_bug.cgi?id=1234158 - patch -Np1 -i ../firefox-gtk3-20.patch + mkdir -p path + ln -sf /usr/bin/python2 path/python - # GCC 6 - patch -Np1 -i ../mozilla-1245076.patch - patch -Np1 -i ../mozilla-1245076-1.patch + cd mozilla-unified - # Notifications with libnotify are broken - # https://bugzilla.mozilla.org/show_bug.cgi?id=1236150 - patch -Np1 -i ../no-libnotify.patch - - patch -Np1 -i ../firefox-wayland.patch + # https://bugzilla.mozilla.org/show_bug.cgi?id=1371991 + patch -Np1 -i ../no-crmf.diff echo -n "$_google_api_key" >google-api-key - echo "ac_add_options --with-google-api-keyfile=\"$PWD/google-api-key\"" >>.mozconfig - - echo -n "$_google_default_client_id $_google_default_client_secret" >google-oauth-api-key - echo "ac_add_options --with-google-oauth-api-keyfile=\"$PWD/google-oauth-api-key\"" >>.mozconfig - echo -n "$_mozilla_api_key" >mozilla-api-key - echo "ac_add_options --with-mozilla-api-keyfile=\"$PWD/mozilla-api-key\"" >>.mozconfig - mkdir "$srcdir/path" - ln -s /usr/bin/python2 "$srcdir/path/python" + cat >.mozconfig <<END +ac_add_options --enable-application=browser + +ac_add_options --prefix=/usr +ac_add_options --enable-release +ac_add_options --enable-gold +ac_add_options --enable-pie +ac_add_options --enable-optimize="-O2" +ac_add_options --enable-rust-simd + +# Branding +ac_add_options --enable-official-branding +ac_add_options --enable-update-channel=release +ac_add_options --with-distribution-id=org.archlinux +export MOZILLA_OFFICIAL=1 +export MOZ_TELEMETRY_REPORTING=1 +export MOZ_ADDON_SIGNING=1 +export MOZ_REQUIRE_SIGNING=1 + +# Keys +ac_add_options --with-google-api-keyfile=${PWD@Q}/google-api-key +ac_add_options --with-mozilla-api-keyfile=${PWD@Q}/mozilla-api-key + +# System libraries +ac_add_options --with-system-zlib +ac_add_options --with-system-bz2 +ac_add_options --with-system-icu +ac_add_options --with-system-jpeg +ac_add_options --with-system-libvpx +ac_add_options --with-system-nspr +ac_add_options --with-system-nss +ac_add_options --enable-system-hunspell +ac_add_options --enable-system-sqlite +ac_add_options --enable-system-ffi + +# Features +ac_add_options --enable-alsa +ac_add_options --enable-jack +ac_add_options --enable-startup-notification +ac_add_options --enable-crashreporter +ac_add_options --disable-updater + +# Wayland support +ac_add_options --enable-default-toolkit=cairo-gtk3-wayland +END } build() { - cd firefox-$pkgver + cd mozilla-unified # _FORTIFY_SOURCE causes configure failures CPPFLAGS+=" -O2" - # Hardening - LDFLAGS+=" -Wl,-z,now" - - # GCC 6 - CFLAGS+=" -fno-delete-null-pointer-checks -fno-lifetime-dse -fno-schedule-insns2" - CXXFLAGS+=" -fno-delete-null-pointer-checks -fno-lifetime-dse -fno-schedule-insns2" - export PATH="$srcdir/path:$PATH" + export MOZ_SOURCE_REPO="$_repo" # Do PGO - #xvfb-run -a -s "-extension GLX -screen 0 1280x1024x24" \ - # make -f client.mk build MOZ_PGO=1 - make -f client.mk build + #xvfb-run -a -n 95 -s "-extension GLX -screen 0 1280x1024x24" \ + # MOZ_PGO=1 ./mach build + ./mach build + ./mach buildsymbols } package() { - cd firefox-$pkgver - make -f client.mk DESTDIR="$pkgdir" INSTALL_SDK= install - - install -Dm644 ../vendor.js "$pkgdir/usr/lib/firefox/browser/defaults/preferences/vendor.js" - - for i in 16 22 24 32 48 256; do - install -Dm644 browser/branding/official/default$i.png \ - "$pkgdir/usr/share/icons/hicolor/${i}x${i}/apps/firefox.png" + cd mozilla-unified + DESTDIR="$pkgdir" ./mach install + find . -name '*crashreporter-symbols-full.zip' -exec cp -fvt "$startdir" {} + + + _vendorjs="$pkgdir/usr/lib/firefox/browser/defaults/preferences/vendor.js" + install -Dm644 /dev/stdin "$_vendorjs" <<END +// Use LANG environment variable to choose locale +pref("intl.locale.requested", ""); + +// Disable default browser checking. +pref("browser.shell.checkDefaultBrowser", false); + +// Don't disable our bundled extensions in the application directory +pref("extensions.autoDisableScopes", 11); +pref("extensions.shownSelectionUI", true); + +// Opt all of us into e10s, instead of just 50% +pref("browser.tabs.remote.autostart", true); +END + + _distini="$pkgdir/usr/lib/firefox/distribution/distribution.ini" + install -Dm644 /dev/stdin "$_distini" <<END +[Global] +id=archlinux +version=1.0 +about=Mozilla Firefox for Arch Linux + +[Preferences] +app.distributor=archlinux +app.distributor.channel=$pkgname +app.partner.archlinux=archlinux +END + + for i in 16 22 24 32 48 64 128 256; do + install -Dm644 browser/branding/official/default$i.png \ + "$pkgdir/usr/share/icons/hicolor/${i}x${i}/apps/firefox.png" done - install -Dm644 browser/branding/official/content/icon64.png \ - "$pkgdir/usr/share/icons/hicolor/64x64/apps/firefox.png" - install -Dm644 browser/branding/official/mozicon128.png \ - "$pkgdir/usr/share/icons/hicolor/128x128/apps/firefox.png" install -Dm644 browser/branding/official/content/about-logo.png \ "$pkgdir/usr/share/icons/hicolor/192x192/apps/firefox.png" install -Dm644 browser/branding/official/content/about-logo@2x.png \ @@ -132,15 +162,22 @@ package() { install -Dm644 ../firefox-symbolic.svg \ "$pkgdir/usr/share/icons/hicolor/symbolic/apps/firefox-symbolic.svg" - install -Dm644 ../firefox.desktop \ + install -Dm644 ../$pkgname.desktop \ "$pkgdir/usr/share/applications/firefox.desktop" # Use system-provided dictionaries - rm -rf "$pkgdir"/usr/lib/firefox/{dictionaries,hyphenation} - ln -s /usr/share/hunspell "$pkgdir/usr/lib/firefox/dictionaries" - ln -s /usr/share/hyphen "$pkgdir/usr/lib/firefox/hyphenation" + rm -r "$pkgdir/usr/lib/firefox/dictionaries" + ln -Ts /usr/share/hunspell "$pkgdir/usr/lib/firefox/dictionaries" + ln -Ts /usr/share/hyphen "$pkgdir/usr/lib/firefox/hyphenation" + + # Install a wrapper to avoid confusion about binary path + install -Dm755 /dev/stdin "$pkgdir/usr/bin/firefox" <<END +#!/bin/sh +exec /usr/lib/firefox/firefox "\$@" +END - # Replace duplicate binary with symlink + # Replace duplicate binary with wrapper # https://bugzilla.mozilla.org/show_bug.cgi?id=658850 - ln -sf firefox "$pkgdir/usr/lib/firefox/firefox-bin" + ln -srf "$pkgdir/usr/bin/firefox" \ + "$pkgdir/usr/lib/firefox/firefox-bin" } diff --git a/firefox-gtk3-20.patch b/firefox-gtk3-20.patch deleted file mode 100644 index 4aab6eff2db7..000000000000 --- a/firefox-gtk3-20.patch +++ /dev/null @@ -1,1697 +0,0 @@ -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> - -+#define MOZ_WIDGET_STYLES 4 -+ -+typedef struct { -+ GtkWidget* widget; -+ -+ union { -+ struct { -+ GtkStyleContext* style; -+ GtkStyleContext* styleSelection; -+ } entry; -+ -+ struct { -+ GtkStyleContext* style; -+ } button; -+ -+ struct { -+ GtkStyleContext* style; -+ GtkStyleContext* styleBackground; -+ } tooltip; -+ -+ struct { -+ GtkStyleContext* style; -+ GtkStyleContext* styleContents; -+ GtkStyleContext* styleTrough; -+ GtkStyleContext* styleSlider; -+ } scroll; -+ -+ struct { -+ GtkStyleContext* style; -+ GtkStyleContext* styleCheck; -+ GtkStyleContext* styleLabel; -+ } check; -+ -+ struct { -+ GtkStyleContext* style; -+ GtkStyleContext* styleTrough; -+ GtkStyleContext* styleProgress; -+ } progress; -+ -+ struct { -+ GtkStyleContext* style; -+ GtkStyleContext* styleEntry; -+ GtkStyleContext* styleButtonUp; -+ GtkStyleContext* styleButtonDown; -+ } spin; -+ -+ struct { -+ GtkStyleContext* style[MOZ_WIDGET_STYLES]; -+ } all; -+ }; -+} MozGtkWidget; -+ - static GtkWidget* gProtoWindow; - static GtkWidget* gProtoLayout; --static GtkWidget* gButtonWidget; -+static MozGtkWidget gButton; - static GtkWidget* gToggleButtonWidget; - static GtkWidget* gButtonArrowWidget; --static GtkWidget* gCheckboxWidget; --static GtkWidget* gRadiobuttonWidget; --static GtkWidget* gHorizScrollbarWidget; --static GtkWidget* gVertScrollbarWidget; --static GtkWidget* gSpinWidget; -+static MozGtkWidget gCheckbox; -+static MozGtkWidget gRadiobutton; -+static MozGtkWidget gVertScrollbar; -+static MozGtkWidget gHorizScrollbar; -+static MozGtkWidget gSpin; - static GtkWidget* gHScaleWidget; - static GtkWidget* gVScaleWidget; --static GtkWidget* gEntryWidget; -+static MozGtkWidget gEntry; - static GtkWidget* gComboBoxWidget; - static GtkWidget* gComboBoxButtonWidget; - static GtkWidget* gComboBoxArrowWidget; - static GtkWidget* gComboBoxSeparatorWidget; - static GtkWidget* gComboBoxEntryWidget; --static GtkWidget* gComboBoxEntryTextareaWidget; -+static MozGtkWidget gComboBoxEntryTextarea; - static GtkWidget* gComboBoxEntryButtonWidget; - static GtkWidget* gComboBoxEntryArrowWidget; - static GtkWidget* gHandleBoxWidget; - static GtkWidget* gToolbarWidget; - static GtkWidget* gFrameWidget; - static GtkWidget* gStatusbarWidget; --static GtkWidget* gProgressWidget; -+static MozGtkWidget gProgressBar; - static GtkWidget* gTabWidget; --static GtkWidget* gTooltipWidget; -+static MozGtkWidget gTooltip; - static GtkWidget* gMenuBarWidget; - static GtkWidget* gMenuBarItemWidget; - static GtkWidget* gMenuPopupWidget; -@@ -78,6 +130,37 @@ static gboolean is_initialized; - #define GTK_STATE_FLAG_CHECKED (1 << 11) - #endif - -+void moz_gtk_widget_free(MozGtkWidget *aMozWidget) -+{ -+ // This was removed as a child of gProtoWindow -+ if (aMozWidget->widget) { -+ aMozWidget->widget = NULL; -+ } -+ -+ for(int i = 0; i < MOZ_WIDGET_STYLES; i++) { -+ if (aMozWidget->all.style[i]) { -+ g_object_unref(aMozWidget->all.style[i]); -+ aMozWidget->all.style[i] = NULL; -+ } -+ } -+} -+ -+// TODO - weak dep!! (dlsym) -+#if GTK_CHECK_VERSION(3, 19, 2) -+#define moz_gtk_path_set_class_name gtk_widget_path_iter_set_object_name -+#else -+#define moz_gtk_path_set_class_name gtk_widget_path_iter_add_class -+#endif -+//gtk_widget_path_iter_get_state -+ -+static void -+moz_gtk_get_style_border(GtkStyleContext* style, GtkStateFlags state_flags, -+ GtkBorder *border); -+ -+static void -+moz_gtk_get_style_padding(GtkStyleContext* style, GtkStateFlags state_flags, -+ GtkBorder *padding); -+ - static GtkStateFlags - GetStateFlagsFromGtkWidgetState(GtkWidgetState* state) - { -@@ -97,6 +180,41 @@ GetStateFlagsFromGtkWidgetState(GtkWidge - return stateFlags; - } - -+GtkStyleContext * -+moz_gtk_style_create(GtkCssNode *node, GtkStyleContext *parent) -+{ -+ GtkWidgetPath *path; -+ GtkStyleContext *context; -+ -+ if (parent) -+ path = gtk_widget_path_copy (gtk_style_context_get_path (parent)); -+ else -+ path = gtk_widget_path_new (); -+ -+ gtk_widget_path_append_type (path, node->type); -+ if (node->name) -+ moz_gtk_path_set_class_name(path, -1, node->name); -+ if (node->class1) -+ gtk_widget_path_iter_add_class(path, -1, node->class1); -+ if (node->class2) -+ gtk_widget_path_iter_add_class(path, -1, node->class2); -+ -+ context = gtk_style_context_new (); -+ gtk_style_context_set_path (context, path); -+ gtk_style_context_set_parent (context, parent); -+ -+ if(!gtk_check_version(3, 14, 0)) { -+ /* Unfortunately, we have to explicitly set the state again here -+ * for it to take effect -+ */ -+ gtk_style_context_set_state (context, gtk_widget_path_iter_get_state (path, -1)); -+ } -+ -+ gtk_widget_path_unref (path); -+ -+ return context; -+} -+ - /* 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 +259,16 @@ setup_widget_prototype(GtkWidget* widget - static gint - ensure_button_widget() - { -- if (!gButtonWidget) { -- gButtonWidget = gtk_button_new_with_label("M"); -- setup_widget_prototype(gButtonWidget); -+ if (!gButton.widget) { -+ GtkCssNode path[] = { -+ { GTK_TYPE_BUTTON, "button", NULL, NULL } -+ }; -+ -+ gButton.widget = gtk_button_new_with_label("M"); -+ setup_widget_prototype(gButton.widget); -+ gtk_widget_show(gButton.widget); -+ -+ gButton.button.style = moz_gtk_style_create(&path[0], NULL); - } - return MOZ_GTK_SUCCESS; - } -@@ -195,9 +320,21 @@ ensure_button_arrow_widget() - static gint - ensure_checkbox_widget() - { -- if (!gCheckboxWidget) { -- gCheckboxWidget = gtk_check_button_new_with_label("M"); -- setup_widget_prototype(gCheckboxWidget); -+ if (!gCheckbox.widget) { -+ GtkCssNode path[] = { -+ { GTK_TYPE_TOGGLE_BUTTON, "checkbutton", NULL, NULL }, -+ { G_TYPE_NONE, "check", NULL, NULL }, -+ { G_TYPE_NONE, "label", NULL, NULL } -+ }; -+ -+ gCheckbox.widget = gtk_check_button_new_with_label("M"); -+ setup_widget_prototype(gCheckbox.widget); -+ -+ gCheckbox.check.style = moz_gtk_style_create(&path[0], NULL); -+ gCheckbox.check.styleCheck = moz_gtk_style_create(&path[1], -+ gCheckbox.check.style); -+ gCheckbox.check.styleLabel = moz_gtk_style_create(&path[2], -+ gCheckbox.check.style); - } - return MOZ_GTK_SUCCESS; - } -@@ -205,9 +342,21 @@ ensure_checkbox_widget() - static gint - ensure_radiobutton_widget() - { -- if (!gRadiobuttonWidget) { -- gRadiobuttonWidget = gtk_radio_button_new_with_label(NULL, "M"); -- setup_widget_prototype(gRadiobuttonWidget); -+ if (!gRadiobutton.widget) { -+ GtkCssNode path[] = { -+ { GTK_TYPE_TOGGLE_BUTTON, "radiobutton", NULL, NULL }, -+ { G_TYPE_NONE, "radio", NULL, NULL }, -+ { G_TYPE_NONE, "label", NULL, NULL } -+ }; -+ -+ gRadiobutton.widget = gtk_radio_button_new_with_label(NULL, "M"); -+ setup_widget_prototype(gRadiobutton.widget); -+ -+ gRadiobutton.check.style = moz_gtk_style_create(&path[0], NULL); -+ gRadiobutton.check.styleCheck = moz_gtk_style_create(&path[1], -+ gRadiobutton.check.style); -+ gRadiobutton.check.styleLabel = moz_gtk_style_create(&path[2], -+ gRadiobutton.check.style); - } - return MOZ_GTK_SUCCESS; - } -@@ -215,25 +364,62 @@ ensure_radiobutton_widget() - static gint - ensure_scrollbar_widget() - { -- if (!gVertScrollbarWidget) { -- gVertScrollbarWidget = gtk_scrollbar_new(GTK_ORIENTATION_VERTICAL, NULL); -- setup_widget_prototype(gVertScrollbarWidget); -- } -- if (!gHorizScrollbarWidget) { -- gHorizScrollbarWidget = gtk_scrollbar_new(GTK_ORIENTATION_HORIZONTAL, NULL); -- setup_widget_prototype(gHorizScrollbarWidget); -- } -+ if (!gVertScrollbar.widget && !gHorizScrollbar.widget) { -+ GtkCssNode path[] = { -+ { GTK_TYPE_SCROLLBAR, "scrollbar", "horizontal", "bottom"}, -+ { GTK_TYPE_SCROLLBAR, "scrollbar", "vertical", "right" }, -+ { G_TYPE_NONE, "contents", NULL, NULL }, -+ { G_TYPE_NONE, "trough", NULL, NULL }, -+ { G_TYPE_NONE, "slider", NULL, NULL } -+ }; -+ -+ gHorizScrollbar.widget = gtk_scrollbar_new(GTK_ORIENTATION_HORIZONTAL, NULL); -+ setup_widget_prototype(gHorizScrollbar.widget); -+ -+ gHorizScrollbar.scroll.style = moz_gtk_style_create(path, NULL); -+ gHorizScrollbar.scroll.styleContents = moz_gtk_style_create(path+2, -+ gHorizScrollbar.scroll.style); -+ gHorizScrollbar.scroll.styleTrough = moz_gtk_style_create(path+3, -+ gHorizScrollbar.scroll.styleContents); -+ gHorizScrollbar.scroll.styleSlider = moz_gtk_style_create(path+4, -+ gHorizScrollbar.scroll.styleTrough); -+ -+ gVertScrollbar.widget = gtk_scrollbar_new(GTK_ORIENTATION_VERTICAL, NULL); -+ setup_widget_prototype(gVertScrollbar.widget); -+ -+ gVertScrollbar.scroll.style = moz_gtk_style_create(path+1, NULL); -+ gVertScrollbar.scroll.styleContents = moz_gtk_style_create(path+2, -+ gVertScrollbar.scroll.style); -+ gVertScrollbar.scroll.styleTrough = moz_gtk_style_create(path+3, -+ gVertScrollbar.scroll.styleContents); -+ gVertScrollbar.scroll.styleSlider = moz_gtk_style_create(path+4, -+ gVertScrollbar.scroll.styleTrough); -+ -+ } - return MOZ_GTK_SUCCESS; - } - - static gint - ensure_spin_widget() - { -- if (!gSpinWidget) { -- gSpinWidget = gtk_spin_button_new(NULL, 1, 0); -- setup_widget_prototype(gSpinWidget); -- } -- return MOZ_GTK_SUCCESS; -+ if (!gSpin.widget) { -+ GtkCssNode path[] = { -+ { GTK_TYPE_SPIN_BUTTON, "spinbutton", "horizontal", NULL }, -+ { GTK_TYPE_SPIN_BUTTON, "spinbutton", "vertical", NULL }, -+ { GTK_TYPE_ENTRY, "entry", NULL, NULL }, -+ { G_TYPE_NONE, "button", "up", NULL }, -+ { G_TYPE_NONE, "button", "down", NULL } -+ }; -+ -+ gSpin.widget = gtk_spin_button_new(NULL, 1, 0); -+ setup_widget_prototype(gSpin.widget); -+ -+ gSpin.spin.style = moz_gtk_style_create(path, NULL); -+ gSpin.spin.styleButtonUp = moz_gtk_style_create(path+3, gSpin.spin.style); -+ gSpin.spin.styleButtonDown = moz_gtk_style_create(path+4, gSpin.spin.style); -+ gSpin.spin.styleEntry = moz_gtk_style_create(path+2, gSpin.spin.style); -+ } -+ return MOZ_GTK_SUCCESS; - } - - static gint -@@ -253,9 +439,19 @@ ensure_scale_widget() - static gint - ensure_entry_widget() - { -- if (!gEntryWidget) { -- gEntryWidget = gtk_entry_new(); -- setup_widget_prototype(gEntryWidget); -+ if (!gEntry.widget) { -+ GtkCssNode path[] = { -+ { GTK_TYPE_ENTRY, "entry", NULL, NULL }, -+ { G_TYPE_NONE, "selection", NULL, NULL } -+ }; -+ -+ gEntry.widget = gtk_entry_new(); -+ setup_widget_prototype(gEntry.widget); -+ gtk_widget_show(gEntry.widget); -+ -+ gEntry.entry.style = moz_gtk_style_create(&path[0], NULL); -+ gEntry.entry.styleSelection = moz_gtk_style_create(&path[1], -+ gEntry.entry.style); - } - return MOZ_GTK_SUCCESS; - } -@@ -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)) { -- gComboBoxEntryTextareaWidget = widget; -+ gComboBoxEntryTextarea.widget = widget; - g_object_add_weak_pointer(G_OBJECT(widget), -- (gpointer) &gComboBoxEntryTextareaWidget); -+ (gpointer) &gComboBoxEntryTextarea.widget); - } else - return; - gtk_widget_realize(widget); -@@ -411,7 +607,7 @@ ensure_combo_box_entry_widgets() - { - GtkWidget* buttonChild; - -- if (gComboBoxEntryTextareaWidget && -+ if (gComboBoxEntryTextarea.widget && - gComboBoxEntryButtonWidget && - gComboBoxEntryArrowWidget) - return MOZ_GTK_SUCCESS; -@@ -427,9 +623,9 @@ ensure_combo_box_entry_widgets() - moz_gtk_get_combo_box_entry_inner_widgets, - NULL); - -- if (!gComboBoxEntryTextareaWidget) { -+ if (!gComboBoxEntryTextarea.widget) { - ensure_entry_widget(); -- gComboBoxEntryTextareaWidget = gEntryWidget; -+ gComboBoxEntryTextarea.widget = gEntry.widget; - } - - if (gComboBoxEntryButtonWidget) { -@@ -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() - { -- if (!gProgressWidget) { -- gProgressWidget = gtk_progress_bar_new(); -- setup_widget_prototype(gProgressWidget); -+ if (!gProgressBar.widget) { -+ GtkCssNode path[] = { -+ { GTK_TYPE_LABEL, "progressbar", NULL, NULL }, -+ { G_TYPE_NONE, "trough", NULL, NULL }, -+ { G_TYPE_NONE, "progress", NULL, NULL }, -+ }; -+ -+ gProgressBar.widget = gtk_progress_bar_new(); -+ setup_widget_prototype(gProgressBar.widget); -+ -+ gProgressBar.progress.style = moz_gtk_style_create(&path[0], NULL); -+ gProgressBar.progress.styleTrough = moz_gtk_style_create(&path[1], -+ gProgressBar.progress.style); -+ gProgressBar.progress.styleProgress = moz_gtk_style_create(&path[2], -+ gProgressBar.progress.styleTrough); - } - return MOZ_GTK_SUCCESS; - } -@@ -638,6 +852,11 @@ static gint - ensure_check_menu_item_widget() - { - if (!gCheckMenuItemWidget) { -+ GtkCssNode path[] = { -+ { GTK_TYPE_CHECK_MENU_ITEM, "menuitem", NULL, NULL }, -+ { G_TYPE_NONE, "check", NULL, NULL } -+ }; -+ - ensure_menu_popup_widget(); - gCheckMenuItemWidget = gtk_check_menu_item_new_with_label("M"); - gtk_menu_shell_append(GTK_MENU_SHELL(gMenuPopupWidget), -@@ -752,7 +971,7 @@ moz_gtk_checkbox_get_metrics(gint* indic - { - ensure_checkbox_widget(); - -- gtk_widget_style_get (gCheckboxWidget, -+ gtk_widget_style_get (gCheckbox.widget, - "indicator_size", indicator_size, - "indicator_spacing", indicator_spacing, - NULL); -@@ -765,7 +984,7 @@ moz_gtk_radio_get_metrics(gint* indicato - { - ensure_radiobutton_widget(); - -- gtk_widget_style_get (gRadiobuttonWidget, -+ gtk_widget_style_get (gRadiobutton.widget, - "indicator_size", indicator_size, - "indicator_spacing", indicator_spacing, - NULL); -@@ -778,13 +997,13 @@ moz_gtk_get_focus_outline_size(gint* foc - { - GtkBorder border; - GtkBorder padding; -- GtkStyleContext *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 +1040,7 @@ moz_gtk_button_get_default_overflow(gint - GtkBorder* default_outside_border; - - ensure_button_widget(); -- gtk_widget_style_get(gButtonWidget, -+ gtk_widget_style_get(gButton.widget, - "default-outside-border", &default_outside_border, - NULL); - -@@ -844,7 +1063,7 @@ moz_gtk_button_get_default_border(gint* - GtkBorder* default_border; - - ensure_button_widget(); -- gtk_widget_style_get(gButtonWidget, -+ gtk_widget_style_get(gButton.widget, - "default-border", &default_border, - NULL); - -@@ -935,7 +1154,7 @@ moz_gtk_button_paint(cairo_t *cr, GdkRec - - if (state->focused) { - GtkBorder border; -- gtk_style_context_get_border(style, state_flags, &border); -+ moz_gtk_get_style_border(style, state_flags, &border); - x += border.left; - y += border.top; - width -= (border.left + border.right); -@@ -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; -- GtkWidget *w; -- GtkStyleContext *style; -+ MozGtkWidget *w; - - if (isradio) { - moz_gtk_radio_get_metrics(&indicator_size, &indicator_spacing); -- w = gRadiobuttonWidget; -+ w = &gRadiobutton; - } else { - moz_gtk_checkbox_get_metrics(&indicator_size, &indicator_spacing); -- w = gCheckboxWidget; -+ w = &gCheckbox; - } - - // XXX we should assert rect->height >= indicator_size too -@@ -983,11 +1201,9 @@ moz_gtk_toggle_paint(cairo_t *cr, GdkRec - focus_width = width + 2 * indicator_spacing; - focus_height = height + 2 * indicator_spacing; - -- style = gtk_widget_get_style_context(w); -- -- gtk_widget_set_sensitive(w, !state->disabled); -- gtk_widget_set_direction(w, direction); -- gtk_style_context_save(style); -+ gtk_widget_set_sensitive(w->widget, !state->disabled); -+ gtk_widget_set_direction(w->widget, direction); -+ gtk_style_context_save(w->check.styleCheck); - - if (selected) - state_flags |= checkbox_check_state; -@@ -995,13 +1211,15 @@ moz_gtk_toggle_paint(cairo_t *cr, GdkRec - if (inconsistent) - state_flags |= GTK_STATE_FLAG_INCONSISTENT; - -- gtk_style_context_set_state(style, state_flags); -+ gtk_style_context_set_state(w->check.styleCheck, state_flags); -+ -+ gtk_render_background(w->check.styleCheck, cr, x, y, width, height); -+ gtk_render_frame(w->check.styleCheck, cr, x, y, width, height); - - if (isradio) { -- gtk_style_context_add_class(style, GTK_STYLE_CLASS_RADIO); -- gtk_render_option(style, cr, x, y, width, height); -+ gtk_render_option(w->check.styleCheck, cr, x, y, width, height); - if (state->focused) { -- gtk_render_focus(style, cr, focus_x, focus_y, -+ gtk_render_focus(w->check.styleCheck, cr, focus_x, focus_y, - focus_width, focus_height); - } - } -@@ -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. - */ -- gtk_style_context_add_class(style, GTK_STYLE_CLASS_CHECK); -- gtk_toggle_button_set_inconsistent(GTK_TOGGLE_BUTTON(gCheckboxWidget), inconsistent); -- gtk_render_check(style, cr, x, y, width, height); -+ gtk_toggle_button_set_inconsistent(GTK_TOGGLE_BUTTON(w->widget), inconsistent); -+ gtk_render_check(w->check.styleCheck, cr, x, y, width, height); - if (state->focused) { -- gtk_render_focus(style, cr, -+ gtk_render_focus(w->check.styleCheck, cr, - focus_x, focus_y, focus_width, focus_height); - } - } -- gtk_style_context_restore(style); -+ gtk_style_context_restore(w->check.styleCheck); - - return MOZ_GTK_SUCCESS; - } -@@ -1035,8 +1252,8 @@ calculate_button_inner_rect(GtkWidget* b - style = gtk_widget_get_style_context(button); - - /* This mirrors gtkbutton's child positioning */ -- gtk_style_context_get_border(style, 0, &border); -- gtk_style_context_get_padding(style, 0, &padding); -+ 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); - - inner_rect->x = rect->x + border.left + padding.left; - inner_rect->y = rect->y + padding.top + border.top; -@@ -1099,9 +1316,9 @@ moz_gtk_scrollbar_button_paint(cairo_t * - ensure_scrollbar_widget(); - - if (flags & MOZ_GTK_STEPPER_VERTICAL) -- scrollbar = gVertScrollbarWidget; -+ scrollbar = gVertScrollbar.widget; - else -- scrollbar = gHorizScrollbarWidget; -+ scrollbar = gHorizScrollbar.widget; - - gtk_widget_set_direction(scrollbar, direction); - -@@ -1181,25 +1398,22 @@ moz_gtk_scrollbar_trough_paint(GtkThemeW - GtkTextDirection direction) - { - GtkStyleContext* style; -- GtkScrollbar *scrollbar; - - ensure_scrollbar_widget(); - -- if (widget == MOZ_GTK_SCROLLBAR_HORIZONTAL) -- scrollbar = GTK_SCROLLBAR(gHorizScrollbarWidget); -- else -- scrollbar = GTK_SCROLLBAR(gVertScrollbarWidget); -- -- gtk_widget_set_direction(GTK_WIDGET(scrollbar), direction); -- - if (flags & MOZ_GTK_TRACK_OPAQUE) { - style = gtk_widget_get_style_context(GTK_WIDGET(gProtoWindow)); - gtk_render_background(style, cr, rect->x, rect->y, rect->width, rect->height); - } - -- style = gtk_widget_get_style_context(GTK_WIDGET(scrollbar)); -- gtk_style_context_save(style); -- gtk_style_context_add_class(style, GTK_STYLE_CLASS_TROUGH); -+ if (widget == MOZ_GTK_SCROLLBAR_HORIZONTAL) { -+ gtk_widget_set_direction(GTK_WIDGET(gHorizScrollbar.widget), direction); -+ style = gHorizScrollbar.scroll.style; -+ } -+ else { -+ gtk_widget_set_direction(GTK_WIDGET(gVertScrollbar.widget), direction); -+ style = gVertScrollbar.scroll.style; -+ } - - 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 +1422,6 @@ moz_gtk_scrollbar_trough_paint(GtkThemeW - gtk_render_focus(style, cr, - rect->x, rect->y, rect->width, rect->height); - } -- gtk_style_context_restore(style); - return MOZ_GTK_SUCCESS; - } - -@@ -1220,24 +1433,20 @@ moz_gtk_scrollbar_thumb_paint(GtkThemeWi - { - GtkStateFlags state_flags = GetStateFlagsFromGtkWidgetState(state); - GtkStyleContext* style; -- GtkScrollbar *scrollbar; - 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); -+ if (widget == MOZ_GTK_SCROLLBAR_THUMB_HORIZONTAL) { -+ style = gHorizScrollbar.scroll.styleSlider; -+ gtk_widget_set_direction(GTK_WIDGET(gHorizScrollbar.widget), direction); -+ } -+ else { -+ style = gVertScrollbar.scroll.styleSlider; -+ gtk_widget_set_direction(GTK_WIDGET(gVertScrollbar.widget), direction); -+ } - -- gtk_style_context_add_class(style, GTK_STYLE_CLASS_SLIDER); - gtk_style_context_set_state(style, state_flags); -- - gtk_style_context_get_margin (style, state_flags, &margin); - - gtk_render_slider(style, cr, -@@ -1248,8 +1457,6 @@ moz_gtk_scrollbar_thumb_paint(GtkThemeWi - (widget == MOZ_GTK_SCROLLBAR_THUMB_HORIZONTAL) ? - GTK_ORIENTATION_HORIZONTAL : GTK_ORIENTATION_VERTICAL); - -- gtk_style_context_restore(style); -- - return MOZ_GTK_SUCCESS; - } - -@@ -1260,8 +1467,8 @@ moz_gtk_spin_paint(cairo_t *cr, GdkRecta - GtkStyleContext* style; - - ensure_spin_widget(); -- gtk_widget_set_direction(gSpinWidget, direction); -- style = gtk_widget_get_style_context(gSpinWidget); -+ gtk_widget_set_direction(gSpin.widget, direction); -+ style = gSpin.spin.style; - 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 +1487,10 @@ moz_gtk_spin_updown_paint(cairo_t *cr, G - GtkStyleContext* style; - - ensure_spin_widget(); -- style = gtk_widget_get_style_context(gSpinWidget); -+ style = gSpin.spin.style; - gtk_style_context_save(style); -- gtk_style_context_add_class(style, GTK_STYLE_CLASS_SPINBUTTON); - gtk_style_context_set_state(style, GetStateFlagsFromGtkWidgetState(state)); -- gtk_widget_set_direction(gSpinWidget, direction); -+ gtk_widget_set_direction(gSpin.widget, direction); - - 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 +1656,13 @@ moz_gtk_vpaned_paint(cairo_t *cr, GdkRec - static gint - moz_gtk_entry_paint(cairo_t *cr, GdkRectangle* rect, - GtkWidgetState* state, -- GtkWidget* widget, GtkTextDirection direction) -+ MozGtkWidget* w, GtkTextDirection direction) - { - gint x = rect->x, y = rect->y, width = rect->width, height = rect->height; -- GtkStyleContext* style; - int draw_focus_outline_only = state->depressed; // NS_THEME_FOCUS_OUTLINE -+ GtkStyleContext* style = w->entry.style; - -- gtk_widget_set_direction(widget, direction); -- -- style = gtk_widget_get_style_context(widget); -+ gtk_widget_set_direction(w->widget, direction); - - if (draw_focus_outline_only) { - // Inflate the given 'rect' with the focus outline size. -@@ -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 */ -- gtk_widget_set_sensitive(widget, !state->disabled); -+ gtk_widget_set_sensitive(w->widget, !state->disabled); - - gtk_style_context_save(style); -- gtk_style_context_add_class(style, GTK_STYLE_CLASS_ENTRY); - - /* Now paint the shadow and focus border. - * We do like in gtk_entry_draw_frame, we first draw the shadow, a tad -@@ -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); -- gtk_style_context_get_border(style, state_flags, &border); -+ moz_gtk_get_style_border(style, state_flags, &border); - xthickness = border.left; - ythickness = border.top; - -@@ -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); -- gtk_style_context_get_padding(style, state_flags, &padding); -+ moz_gtk_get_style_padding(style, state_flags, &padding); - arrow_rect.x -= padding.left; - } - else -@@ -1804,29 +2007,27 @@ moz_gtk_container_paint(cairo_t *cr, Gdk - gboolean isradio, GtkTextDirection direction) - { - GtkStateFlags state_flags = GetStateFlagsFromGtkWidgetState(state); -- GtkStyleContext* style; -- GtkWidget *widget; -+ MozGtkWidget *widget; - - if (isradio) { - ensure_radiobutton_widget(); -- widget = gRadiobuttonWidget; -+ widget = &gRadiobutton; - } else { - ensure_checkbox_widget(); -- widget = gCheckboxWidget; -+ widget = &gCheckbox; - } -- gtk_widget_set_direction(widget, direction); -+ gtk_widget_set_direction(widget->widget, direction); - -- style = gtk_widget_get_style_context(widget); -- gtk_style_context_save(style); -- gtk_style_context_set_state(style, state_flags); -+ gtk_style_context_save(widget->check.style); -+ gtk_style_context_set_state(widget->check.style, state_flags); - - /* this is for drawing a prelight box */ - if (state_flags & GTK_STATE_FLAG_PRELIGHT) { -- gtk_render_background(style, cr, -+ gtk_render_background(widget->check.style, cr, - rect->x, rect->y, rect->width, rect->height); - } - -- gtk_style_context_restore(style); -+ gtk_style_context_restore(widget->check.style); - - return MOZ_GTK_SUCCESS; - } -@@ -1836,32 +2037,26 @@ moz_gtk_toggle_label_paint(cairo_t *cr, - GtkWidgetState* state, - gboolean isradio, GtkTextDirection direction) - { -- GtkStyleContext *style; -- GtkWidget *widget; -+ MozGtkWidget *widget; - - if (!state->focused) - return MOZ_GTK_SUCCESS; - - if (isradio) { - ensure_radiobutton_widget(); -- widget = gRadiobuttonWidget; -+ widget = &gRadiobutton; - } else { - ensure_checkbox_widget(); -- widget = gCheckboxWidget; -- } -- 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); - -- gtk_style_context_set_state(style, GetStateFlagsFromGtkWidgetState(state)); -- gtk_render_focus(style, cr, -+ gtk_style_context_set_state(widget->check.styleLabel, -+ GetStateFlagsFromGtkWidgetState(state)); -+ gtk_render_focus(widget->check.styleLabel, cr, - rect->x, rect->y, rect->width, rect->height); -- gtk_style_context_restore(style); -+ gtk_style_context_restore(widget->check.styleLabel); - - return MOZ_GTK_SUCCESS; - } -@@ -1922,7 +2117,7 @@ moz_gtk_toolbar_separator_paint(cairo_t - rect->height * (end_fraction - start_fraction)); - } else { - GtkBorder padding; -- gtk_style_context_get_padding(style, 0, &padding); -+ gtk_style_context_get_padding(style, gtk_style_context_get_state(style), &padding); - - paint_width = padding.left; - if (paint_width > rect->width) -@@ -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) - { -- GtkStyleContext* style; -- - ensure_progress_widget(); -- gtk_widget_set_direction(gProgressWidget, direction); -+ gtk_widget_set_direction(gProgressBar.widget, direction); - -- style = gtk_widget_get_style_context(gProgressWidget); -- gtk_style_context_save(style); -- gtk_style_context_add_class(style, GTK_STYLE_CLASS_TROUGH); -- -- 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); -- gtk_style_context_restore(style); -+ gtk_render_background(gProgressBar.progress.styleTrough, cr, -+ rect->x, rect->y, rect->width, rect->height); -+ gtk_render_frame(gProgressBar.progress.styleTrough, cr, -+ rect->x, rect->y, rect->width, rect->height); - - return MOZ_GTK_SUCCESS; - } -@@ -2027,15 +2217,8 @@ moz_gtk_progress_chunk_paint(cairo_t *cr - GtkTextDirection direction, - GtkThemeWidgetType widget) - { -- GtkStyleContext* style; -- - ensure_progress_widget(); -- gtk_widget_set_direction(gProgressWidget, direction); -- -- style = gtk_widget_get_style_context(gProgressWidget); -- gtk_style_context_save(style); -- gtk_style_context_remove_class(style, GTK_STYLE_CLASS_TROUGH); -- gtk_style_context_add_class(style, GTK_STYLE_CLASS_PROGRESSBAR); -+ gtk_widget_set_direction(gProgressBar.widget, direction); - - if (widget == MOZ_GTK_PROGRESS_CHUNK_INDETERMINATE || - widget == MOZ_GTK_PROGRESS_CHUNK_VERTICAL_INDETERMINATE) { -@@ -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)) { -- 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); -+ gtk_render_background(gProgressBar.progress.styleProgress, cr, -+ rect->x, rect->y, rect->width, rect->height); -+ gtk_render_frame(gProgressBar.progress.styleProgress, cr, -+ rect->x, rect->y, rect->width, rect->height); - } else { -- gtk_render_activity(style, cr, rect->x, rect->y, rect->width, rect->height); -+ gtk_render_activity(gProgressBar.progress.styleProgress, cr, -+ rect->x, rect->y, rect->width, rect->height); - } -- gtk_style_context_restore(style); - - return MOZ_GTK_SUCCESS; - } -@@ -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); -- gtk_style_context_get_border(style, 0, &border); -+ gtk_style_context_get_border(style, gtk_style_context_get_state(style), &border); - - if (border.top < 2) - return 2; /* some themes don't set ythickness correctly */ -@@ -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); - -- gtk_style_context_get_padding(style, GetStateFlagsFromGtkWidgetState(state), &padding); -+ moz_gtk_get_style_padding(style, GetStateFlagsFromGtkWidgetState(state), &padding); - - focusRect.x += padding.left; - focusRect.width -= (padding.left + padding.right); -@@ -2408,7 +2593,7 @@ moz_gtk_tab_scroll_arrow_paint(cairo_t * - } - - static gint --moz_gtk_menu_bar_paint(cairo_t *cr, GdkRectangle* rect, -+moz_gtk_menu_bar_paint(cairo_t *cr, GdkRectangle* rect, GtkWidgetState* state, - GtkTextDirection direction) - { - GtkStyleContext* style; -@@ -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); -- gtk_style_context_get_padding(style, 0, &padding); -+ gtk_style_context_get_padding(style, gtk_style_context_get_state(style), &padding); - - x = rect->x + border_width; - y = rect->y + border_width; -@@ -2521,7 +2706,8 @@ moz_gtk_menu_item_paint(cairo_t *cr, Gdk - item_widget = gMenuItemWidget; - } - style = gtk_widget_get_style_context(item_widget); -- gtk_style_context_save(style); -+// TODO - FIX! -+// gtk_style_context_save(style); - - if (flags & MOZ_TOPLEVEL_MENU_ITEM) { - gtk_style_context_add_class(style, GTK_STYLE_CLASS_MENUBAR); -@@ -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); -- gtk_style_context_restore(style); -+// gtk_style_context_restore(style); - } - - return MOZ_GTK_SUCCESS; -@@ -2556,7 +2742,10 @@ moz_gtk_menu_arrow_paint(cairo_t *cr, Gd - - ensure_menu_item_widget(); - gtk_widget_set_direction(gMenuItemWidget, direction); -- -+/* -+ state_flags |= (direction == GTK_TEXT_DIR_LTR) ? GTK_STATE_FLAG_DIR_LTR : -+ GTK_STATE_FLAG_DIR_RTL; -+*/ - style = gtk_widget_get_style_context(gMenuItemWidget); - gtk_style_context_save(style); - gtk_style_context_add_class(style, GTK_STYLE_CLASS_MENUITEM); -@@ -2606,7 +2795,7 @@ moz_gtk_check_menu_item_paint(cairo_t *c - } - - gtk_style_context_set_state(style, state_flags); -- gtk_style_context_get_padding(style, state_flags, &padding); -+ moz_gtk_get_style_padding(style, state_flags, &padding); - - offset = gtk_container_get_border_width(GTK_CONTAINER(gCheckMenuItemWidget)) + - padding.left + 2; -@@ -2658,7 +2847,7 @@ moz_gtk_add_style_border(GtkStyleContext - { - GtkBorder border; - -- gtk_style_context_get_border(style, 0, &border); -+ gtk_style_context_get_border(style, gtk_style_context_get_state(style), &border); - - *left += border.left; - *right += border.right; -@@ -2667,12 +2856,22 @@ moz_gtk_add_style_border(GtkStyleContext - } - - static void -+moz_gtk_get_style_border(GtkStyleContext* style, GtkStateFlags state_flags, -+ GtkBorder *border) -+{ -+ gtk_style_context_save(style); -+ gtk_style_context_set_state(style, state_flags); -+ gtk_style_context_get_border(style, gtk_style_context_get_state(style), border); -+ gtk_style_context_restore(style); -+} -+ -+static void - moz_gtk_add_style_padding(GtkStyleContext* style, - gint* left, gint* top, gint* right, gint* bottom) - { - GtkBorder padding; - -- gtk_style_context_get_padding(style, 0, &padding); -+ gtk_style_context_get_padding(style, gtk_style_context_get_state(style), &padding); - - *left += padding.left; - *right += padding.right; -@@ -2680,6 +2879,16 @@ moz_gtk_add_style_padding(GtkStyleContex - *bottom += padding.bottom; - } - -+static void -+moz_gtk_get_style_padding(GtkStyleContext* style, GtkStateFlags state_flags, -+ GtkBorder *padding) -+{ -+ gtk_style_context_save(style); -+ gtk_style_context_set_state(style, state_flags); -+ gtk_style_context_get_padding(style, gtk_style_context_get_state(style), padding); -+ gtk_style_context_restore(style); -+} -+ - gint - moz_gtk_get_widget_border(GtkThemeWidgetType widget, gint* left, gint* top, - gint* right, gint* bottom, GtkTextDirection direction, -@@ -2694,37 +2903,35 @@ moz_gtk_get_widget_border(GtkThemeWidget - case MOZ_GTK_TOOLBAR_BUTTON: - { - ensure_button_widget(); -- style = gtk_widget_get_style_context(gButtonWidget); -- -- *left = *top = *right = *bottom = gtk_container_get_border_width(GTK_CONTAINER(gButtonWidget)); - -- if (widget == MOZ_GTK_TOOLBAR_BUTTON) { -- gtk_style_context_save(style); -- gtk_style_context_add_class(style, "image-button"); -- } -- -- moz_gtk_add_style_padding(style, left, top, right, bottom); -- -- if (widget == MOZ_GTK_TOOLBAR_BUTTON) -- gtk_style_context_restore(style); -+ *left = *top = *right = *bottom = gtk_container_get_border_width(GTK_CONTAINER(gButton.widget)); -+ moz_gtk_add_style_padding(gButton.button.style, left, top, right, bottom); - - // XXX: Subtract 1 pixel from the border to account for the added - // -moz-focus-inner border (Bug 1228281). - *left -= 1; *top -= 1; *right -= 1; *bottom -= 1; -- moz_gtk_add_style_border(style, left, top, right, bottom); -+ moz_gtk_add_style_border(gButton.button.style, left, top, right, bottom); -+ - return MOZ_GTK_SUCCESS; - } - case MOZ_GTK_ENTRY: - { - ensure_entry_widget(); -- style = gtk_widget_get_style_context(gEntryWidget); - - // XXX: Subtract 1 pixel from the padding to account for the default - // padding in forms.css. See bug 1187385. - *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; - } - 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(); -- w = gComboBoxEntryTextareaWidget; -+ w = gComboBoxEntryTextarea.widget; - break; - case MOZ_GTK_DROPDOWN_ARROW: - ensure_combo_box_entry_widgets(); -@@ -2795,7 +3002,7 @@ moz_gtk_get_widget_border(GtkThemeWidget - - if (!wide_separators) { - style = gtk_widget_get_style_context(gComboBoxSeparatorWidget); -- gtk_style_context_get_border(style, 0, &border); -+ gtk_style_context_get_border(style, gtk_style_context_get_state(style), &border); - separator_width = border.left; - } - } -@@ -2814,14 +3021,17 @@ moz_gtk_get_widget_border(GtkThemeWidget - w = gTabWidget; - break; - case MOZ_GTK_PROGRESSBAR: -- ensure_progress_widget(); -- w = gProgressWidget; -- break; -+ { -+ ensure_progress_widget(); -+ moz_gtk_add_style_border(gProgressBar.progress.styleTrough, -+ left, top, right, bottom); -+ return MOZ_GTK_SUCCESS; -+ } - case MOZ_GTK_SPINBUTTON_ENTRY: - case MOZ_GTK_SPINBUTTON_UP: - case MOZ_GTK_SPINBUTTON_DOWN: - ensure_spin_widget(); -- w = gSpinWidget; -+ w = gSpin.widget; - break; - case MOZ_GTK_SCALE_HORIZONTAL: - ensure_scale_widget(); -@@ -2840,12 +3050,13 @@ moz_gtk_get_widget_border(GtkThemeWidget - { - if (widget == MOZ_GTK_CHECKBUTTON_CONTAINER) { - ensure_checkbox_widget(); -- w = gCheckboxWidget; -+ w = gCheckbox.widget; -+ style = gCheckbox.check.styleCheck; - } else { - ensure_radiobutton_widget(); -- w = gRadiobuttonWidget; -+ w = gRadiobutton.widget; -+ style = gRadiobutton.check.styleCheck; - } -- style = gtk_widget_get_style_context(w); - - *left = *top = *right = *bottom = gtk_container_get_border_width(GTK_CONTAINER(w)); - moz_gtk_add_style_border(style, -@@ -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 -+moz_gtk_get_entry_height(gint* height) -+{ -+ GtkRequisition requisition; -+ ensure_entry_widget(); -+ -+ gtk_widget_get_preferred_size(gEntry.widget, NULL, &requisition); -+ *height = requisition.height; -+ -+ return MOZ_GTK_SUCCESS; -+} -+ -+ -+gint -+moz_gtk_get_button_height(gint* height) -+{ -+ GtkRequisition requisition; -+ ensure_entry_widget(); -+ -+ gtk_widget_get_preferred_size(gButton.widget, NULL, &requisition); -+ *height = requisition.height; -+ -+ return MOZ_GTK_SUCCESS; -+} -+ -+ -+gint - moz_gtk_get_tab_scroll_arrow_size(gint* width, gint* height) - { - gint arrow_size; -@@ -3030,7 +3266,7 @@ moz_gtk_get_toolbar_separator_width(gint - "separator-width", &separator_width, - NULL); - /* Just in case... */ -- gtk_style_context_get_border(style, 0, &border); -+ gtk_style_context_get_border(style, gtk_style_context_get_state(style), &border); - *size = MAX(*size, (wide_separators ? separator_width : border.left)); - return MOZ_GTK_SUCCESS; - } -@@ -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); -- gtk_style_context_get_padding(style, 0, &padding); -+ gtk_style_context_get_padding(style, gtk_style_context_get_state(style), &padding); - - gtk_style_context_save(style); - gtk_style_context_add_class(style, GTK_STYLE_CLASS_SEPARATOR); -@@ -3130,15 +3366,21 @@ moz_gtk_get_scrollbar_metrics(MozGtkScro - { - ensure_scrollbar_widget(); - -- gtk_widget_style_get (gHorizScrollbarWidget, -+ gtk_widget_style_get (gHorizScrollbar.widget, - "slider_width", &metrics->slider_width, - "trough_border", &metrics->trough_border, - "stepper_size", &metrics->stepper_size, - "stepper_spacing", &metrics->stepper_spacing, - NULL); - -- metrics->min_slider_size = -- gtk_range_get_min_slider_size(GTK_RANGE(gHorizScrollbarWidget)); -+ if (!gtk_check_version(3,19,7)) { -+ gtk_style_context_get(gVertScrollbar.scroll.styleSlider, -+ gtk_style_context_get_state(gVertScrollbar.scroll.styleSlider), -+ "min-height", &metrics->min_slider_size, NULL); -+ } else { -+ metrics->min_slider_size = -+ gtk_range_get_min_slider_size(GTK_RANGE(gVertScrollbar.widget)); -+ } - - return MOZ_GTK_SUCCESS; - } -@@ -3163,7 +3405,7 @@ moz_gtk_images_in_buttons() - GtkSettings* settings; - - ensure_button_widget(); -- settings = gtk_widget_get_settings(gButtonWidget); -+ settings = gtk_widget_get_settings(gButton.widget); - - g_object_get(settings, "gtk-button-images", &result, NULL); - return result; -@@ -3191,7 +3433,7 @@ moz_gtk_widget_paint(GtkThemeWidgetType - } - ensure_button_widget(); - return moz_gtk_button_paint(cr, rect, state, -- (GtkReliefStyle) flags, gButtonWidget, -+ (GtkReliefStyle) flags, gButton.widget, - direction); - break; - case MOZ_GTK_CHECKBUTTON: -@@ -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, -- gSpinWidget, direction); -+ &gSpin, direction); - break; - case MOZ_GTK_GRIPPER: - return moz_gtk_gripper_paint(cr, rect, state, -@@ -3268,7 +3510,7 @@ moz_gtk_widget_paint(GtkThemeWidgetType - case MOZ_GTK_ENTRY: - ensure_entry_widget(); - return moz_gtk_entry_paint(cr, rect, state, -- gEntryWidget, direction); -+ &gEntry, direction); - break; - case MOZ_GTK_DROPDOWN: - return moz_gtk_combo_box_paint(cr, rect, state, direction); -@@ -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, -- gComboBoxEntryTextareaWidget, direction); -+ &gComboBoxEntryTextarea, direction); - break; - case MOZ_GTK_CHECKBUTTON_CONTAINER: - case MOZ_GTK_RADIOBUTTON_CONTAINER: -@@ -3332,7 +3574,7 @@ moz_gtk_widget_paint(GtkThemeWidgetType - (GtkArrowType) flags, direction); - break; - case MOZ_GTK_MENUBAR: -- return moz_gtk_menu_bar_paint(cr, rect, direction); -+ return moz_gtk_menu_bar_paint(cr, rect, state, direction); - break; - case MOZ_GTK_MENUPOPUP: - return moz_gtk_menu_popup_paint(cr, rect, direction); -@@ -3383,7 +3625,7 @@ GtkWidget* moz_gtk_get_scrollbar_widget( - { - MOZ_ASSERT(is_initialized, "Forgot to call moz_gtk_init()"); - ensure_scrollbar_widget(); -- return gHorizScrollbarWidget; -+ return gVertScrollbar.widget; - } - - gboolean moz_gtk_has_scrollbar_buttons(void) -@@ -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(); -- gtk_widget_style_get (gHorizScrollbarWidget, -+ gtk_widget_style_get (gHorizScrollbar.widget, - "has-backward-stepper", &backward, - "has-forward-stepper", &forward, - "has-secondary-backward-stepper", &secondary_backward, -@@ -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; -- gButtonWidget = NULL; -+ -+ // MozWidgets -+ moz_gtk_widget_free(&gButton); - gToggleButtonWidget = NULL; - gButtonArrowWidget = NULL; -- gCheckboxWidget = NULL; -- gRadiobuttonWidget = NULL; -- gHorizScrollbarWidget = NULL; -- gVertScrollbarWidget = NULL; -- gSpinWidget = NULL; -+ moz_gtk_widget_free(&gCheckbox); -+ moz_gtk_widget_free(&gRadiobutton); -+ moz_gtk_widget_free(&gHorizScrollbar); -+ moz_gtk_widget_free(&gVertScrollbar); -+ moz_gtk_widget_free(&gSpin); - gHScaleWidget = NULL; - gVScaleWidget = NULL; -- gEntryWidget = NULL; -+ moz_gtk_widget_free(&gEntry); - gComboBoxWidget = NULL; - gComboBoxButtonWidget = NULL; - gComboBoxSeparatorWidget = NULL; -@@ -3433,14 +3677,13 @@ moz_gtk_shutdown() - gComboBoxEntryWidget = NULL; - gComboBoxEntryButtonWidget = NULL; - gComboBoxEntryArrowWidget = NULL; -- gComboBoxEntryTextareaWidget = NULL; -+ moz_gtk_widget_free(&gComboBoxEntryTextarea); - gHandleBoxWidget = NULL; - gToolbarWidget = NULL; - gStatusbarWidget = NULL; - gFrameWidget = NULL; -- gProgressWidget = NULL; -+ moz_gtk_widget_free(&gProgressBar); - gTabWidget = NULL; -- gTooltipWidget = NULL; - gMenuBarWidget = NULL; - 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; - -+typedef struct { -+ GType type; -+ const gchar *name; -+ const gchar *class1; -+ const gchar *class2; -+} GtkCssNode; -+ - /** flags for menuitems **/ - typedef enum { - /* menuitem is part of the menubar */ -@@ -396,6 +403,9 @@ void - moz_gtk_get_arrow_size(GtkThemeWidgetType widgetType, - gint* width, gint* height); - -+gint moz_gtk_get_entry_height(gint* height); -+gint moz_gtk_get_button_height(gint* height); -+ - /** - * Get the desired size of a toolbar separator - * size: [OUT] the desired width -@@ -466,6 +476,12 @@ gboolean moz_gtk_images_in_buttons(void) - */ - gboolean moz_gtk_has_scrollbar_buttons(void); - -+ -+GtkStyleContext * -+moz_gtk_style_create(GtkCssNode *node, GtkStyleContext *parent); -+ -+ -+ - #ifdef __cplusplus - } - #endif /* __cplusplus */ -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) - STUB(gtk_window_unmaximize) -+STUB(gtk_widget_get_preferred_height_and_baseline_for_width) -+STUB(gtk_entry_get_text_area) -+STUB(gtk_check_menu_item_get_type) -+STUB(gtk_spin_button_get_type) -+STUB(gtk_button_get_type) - #endif - - #ifdef GTK3_SYMBOLS -@@ -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) -+STUB(gtk_style_context_get_path) -+STUB(gtk_widget_path_copy) -+STUB(gtk_widget_path_iter_set_object_name) -+STUB(gtk_widget_path_iter_add_class) -+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.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 - gtk_style_context_get_border_color(mBackgroundStyle, -- GTK_STATE_FLAG_NORMAL, &gdk_color); -+ gtk_style_context_get_state(mBackgroundStyle), -+ &gdk_color); - aColor = GDK_RGBA_TO_NS_RGBA(gdk_color); - break; - case eColorID_inactiveborder: - // inactive window border -+ gtk_style_context_save(mBackgroundStyle); -+ gtk_style_context_set_state(mBackgroundStyle, GTK_STATE_FLAG_INSENSITIVE); - gtk_style_context_get_border_color(mBackgroundStyle, -- GTK_STATE_FLAG_INSENSITIVE, -+ gtk_style_context_get_state(mBackgroundStyle), - &gdk_color); -+ gtk_style_context_restore(mBackgroundStyle); - aColor = GDK_RGBA_TO_NS_RGBA(gdk_color); - break; - case eColorID_graytext: // disabled text in windows, menus, etc. -@@ -369,9 +373,12 @@ nsLookAndFeel::NativeGetColor(ColorID aI - break; - case eColorID_inactivecaption: - // inactive window caption -+ gtk_style_context_save(mBackgroundStyle); -+ gtk_style_context_set_state(mBackgroundStyle, GTK_STATE_FLAG_INSENSITIVE); - gtk_style_context_get_background_color(mBackgroundStyle, -- GTK_STATE_FLAG_INSENSITIVE, -+ gtk_style_context_get_state(mBackgroundStyle), - &gdk_color); -+ gtk_style_context_restore(mBackgroundStyle); - aColor = GDK_RGBA_TO_NS_RGBA(gdk_color); - break; - #endif -@@ -497,13 +504,17 @@ nsLookAndFeel::NativeGetColor(ColorID aI - case eColorID__moz_buttondefault: - // default button border color - gtk_style_context_get_border_color(mButtonStyle, -- GTK_STATE_FLAG_NORMAL, &gdk_color); -+ gtk_style_context_get_state(mButtonStyle), -+ &gdk_color); - aColor = GDK_RGBA_TO_NS_RGBA(gdk_color); - break; - case eColorID__moz_buttonhoverface: -+ gtk_style_context_save(mButtonStyle); -+ gtk_style_context_set_state(mButtonStyle, GTK_STATE_FLAG_PRELIGHT); - gtk_style_context_get_background_color(mButtonStyle, -- GTK_STATE_FLAG_PRELIGHT, -+ gtk_style_context_get_state(mButtonStyle), - &gdk_color); -+ gtk_style_context_restore(mButtonStyle); - aColor = GDK_RGBA_TO_NS_RGBA(gdk_color); - break; - case eColorID__moz_buttonhovertext: -@@ -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); -- 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); - sMozScrollbar = GDK_RGBA_TO_NS_RGBA(color); - g_object_unref(style); - - // Window colors - style = create_context(path); -- 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); - sMozWindowBackground = 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); - sMozWindowText = GDK_RGBA_TO_NS_RGBA(color); -- gtk_style_context_restore(style); -+ g_object_unref(style); - - // tooltip foreground and background -- 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); -- sInfoText = GDK_RGBA_TO_NS_RGBA(color); - g_object_unref(style); - - // 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); -- gtk_style_context_get_color(style, GTK_STATE_FLAG_NORMAL, &color); -+ gtk_style_context_get_color(style, gtk_style_context_get_state(style), &color); - sMenuText = GDK_RGBA_TO_NS_RGBA(color); -- gtk_style_context_get_color(style, GTK_STATE_FLAG_INSENSITIVE, &color); -+ gtk_style_context_save(style); -+ gtk_style_context_set_state(style, GTK_STATE_FLAG_INSENSITIVE); -+ gtk_style_context_get_color(style, gtk_style_context_get_state(style), &color); - sMenuTextInactive = GDK_RGBA_TO_NS_RGBA(color); -+ gtk_style_context_restore(style); - - style = gtk_widget_get_style_context(menu); -- 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); - sMenuBackground = GDK_RGBA_TO_NS_RGBA(color); - - style = gtk_widget_get_style_context(menuitem); -- gtk_style_context_get_background_color(style, GTK_STATE_FLAG_PRELIGHT, &color); -+ gtk_style_context_save(style); -+ gtk_style_context_set_state(style, GTK_STATE_FLAG_PRELIGHT); -+ gtk_style_context_get_background_color(style, gtk_style_context_get_state(style), &color); - sMenuHover = GDK_RGBA_TO_NS_RGBA(color); -- gtk_style_context_get_color(style, GTK_STATE_FLAG_PRELIGHT, &color); -+ gtk_style_context_get_color(style, gtk_style_context_get_state(style), &color); - sMenuHoverText = GDK_RGBA_TO_NS_RGBA(color); -+ gtk_style_context_restore(style); - - g_object_unref(menu); - #endif -@@ -1266,44 +1290,54 @@ nsLookAndFeel::Init() - GDK_COLOR_TO_NS_RGB(style->dark[GTK_STATE_NORMAL]); - } - #else -+ GtkCssNode labelPath[] = { -+ { GTK_TYPE_LABEL, "label", "view", NULL }, -+ { G_TYPE_NONE, "selection", NULL, NULL } -+ }; -+ -+ GtkStyleContext *styleLabel; -+ GtkStyleContext *styleSelection; -+ GtkBorder padding; -+ - // Text colors -- style = gtk_widget_get_style_context(textView); -- gtk_style_context_save(style); -- gtk_style_context_add_class(style, GTK_STYLE_CLASS_VIEW); -- gtk_style_context_get_background_color(style, GTK_STATE_FLAG_NORMAL, &color); -+ styleLabel = moz_gtk_style_create(labelPath, NULL); -+ styleSelection = moz_gtk_style_create(labelPath+1, styleLabel); -+ -+ gtk_style_context_get_background_color(styleLabel, gtk_style_context_get_state(styleLabel), &color); - sMozFieldBackground = GDK_RGBA_TO_NS_RGBA(color); -- gtk_style_context_get_color(style, GTK_STATE_FLAG_NORMAL, &color); -+ gtk_style_context_get_color(styleLabel, gtk_style_context_get_state(styleLabel), &color); - sMozFieldText = GDK_RGBA_TO_NS_RGBA(color); - - // Selected text and background -- gtk_style_context_get_background_color(style, -- static_cast<GtkStateFlags>(GTK_STATE_FLAG_FOCUSED|GTK_STATE_FLAG_SELECTED), -- &color); -+ gtk_style_context_get_background_color(styleSelection, gtk_style_context_get_state(styleSelection), &color); - sTextSelectedBackground = GDK_RGBA_TO_NS_RGBA(color); -- gtk_style_context_get_color(style, -- static_cast<GtkStateFlags>(GTK_STATE_FLAG_FOCUSED|GTK_STATE_FLAG_SELECTED), -- &color); -+ gtk_style_context_get_color(styleSelection, gtk_style_context_get_state(styleSelection), &color); - sTextSelectedText = GDK_RGBA_TO_NS_RGBA(color); -- gtk_style_context_restore(style); - - // Button text, background, border - style = gtk_widget_get_style_context(label); -- gtk_style_context_get_color(style, GTK_STATE_FLAG_NORMAL, &color); -+ gtk_style_context_get_color(style, gtk_style_context_get_state(style), &color); - sButtonText = GDK_RGBA_TO_NS_RGBA(color); -- gtk_style_context_get_color(style, GTK_STATE_FLAG_PRELIGHT, &color); -+ gtk_style_context_save(style); -+ gtk_style_context_set_state(style, GTK_STATE_FLAG_PRELIGHT); -+ gtk_style_context_get_color(style, gtk_style_context_get_state(style), &color); - sButtonHoverText = GDK_RGBA_TO_NS_RGBA(color); -+ gtk_style_context_restore(style); - - // Combobox text color - style = gtk_widget_get_style_context(comboboxLabel); -- gtk_style_context_get_color(style, GTK_STATE_FLAG_NORMAL, &color); -+ gtk_style_context_get_color(style, gtk_style_context_get_state(style), &color); - sComboBoxText = 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); -+ gtk_style_context_get_color(style, gtk_style_context_get_state(style), &color); - sMenuBarText = GDK_RGBA_TO_NS_RGBA(color); -- gtk_style_context_get_color(style, GTK_STATE_FLAG_PRELIGHT, &color); -+ gtk_style_context_save(style); -+ gtk_style_context_set_state(style, GTK_STATE_FLAG_PRELIGHT); -+ gtk_style_context_get_color(style, gtk_style_context_get_state(style), &color); - sMenuBarHoverText = GDK_RGBA_TO_NS_RGBA(color); -+ gtk_style_context_restore(style); - - // GTK's guide to fancy odd row background colors: - // 1) Check if a theme explicitly defines an odd row color -@@ -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); -- 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); - sOddCellBackground = GDK_RGBA_TO_NS_RGBA(color); - gtk_style_context_restore(style); - -@@ -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); -+ gtk_style_context_save(style); - gtk_style_context_add_class(style, GTK_STYLE_CLASS_INFO); -- gtk_style_context_get_color(style, GTK_STATE_FLAG_NORMAL, &color); -+ gtk_style_context_get_color(style, gtk_style_context_get_state(style), &color); - sInfoBarText = GDK_RGBA_TO_NS_RGBA(color); -+ gtk_style_context_restore(style); - #endif - // Some themes have a unified menu bar, and support window dragging on it - gboolean supports_menubar_drag = FALSE; -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: - case NS_THEME_RADIO_LABEL: -- case NS_THEME_BUTTON: -- case NS_THEME_DROPDOWN: -- case NS_THEME_TOOLBAR_BUTTON: - case NS_THEME_TREEVIEW_HEADER_CELL: - { - if (aWidgetType == NS_THEME_DROPDOWN) { -@@ -1588,6 +1585,21 @@ nsNativeThemeGTK::GetMinimumWidgetSize(n - aResult->height += border.top + border.bottom; - } - break; -+ case NS_THEME_BUTTON: -+ case NS_THEME_DROPDOWN: -+ case NS_THEME_TOOLBAR_BUTTON: -+ { -+ moz_gtk_get_button_height(&aResult->height); -+ } -+ break; -+ case NS_THEME_FOCUS_OUTLINE: -+ case NS_THEME_NUMBER_INPUT: -+ case NS_THEME_TEXTFIELD: -+ case NS_THEME_TEXTFIELD_MULTILINE: -+ { -+ moz_gtk_get_entry_height(&aResult->height); -+ } -+ break; - case NS_THEME_TOOLBAR_SEPARATOR: - { - gint separator_width; diff --git a/firefox-install-dir.patch b/firefox-install-dir.patch deleted file mode 100644 index 51fe4ba0a855..000000000000 --- a/firefox-install-dir.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up firefox-29.0/mozilla-release/config/baseconfig.mk.orig firefox-29.0/mozilla-release/config/baseconfig.mk ---- mozilla-release/config/baseconfig.mk.orig 2014-04-22 15:38:52.948165295 +0200 -+++ mozilla-release/config/baseconfig.mk 2014-04-22 15:42:20.387481673 +0200 -@@ -4,7 +4,7 @@ - # whether a normal build is happening or whether the check is running. - includedir := $(includedir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) - idldir = $(datadir)/idl/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) --installdir = $(libdir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) -+installdir = $(libdir)/$(MOZ_APP_NAME) - sdkdir = $(libdir)/$(MOZ_APP_NAME)-devel-$(MOZ_APP_VERSION) - ifndef TOP_DIST - TOP_DIST = dist diff --git a/firefox-symbolic.svg b/firefox-symbolic.svg index 7a2c73e455d4..2078eea40b69 100644 --- a/firefox-symbolic.svg +++ b/firefox-symbolic.svg @@ -1,30 +1,64 @@ -<?xml version='1.0' encoding='UTF-8' standalone='no'?> -<!-- Created with Inkscape (http://www.inkscape.org/) --> - -<svg xmlns:cc='http://creativecommons.org/ns#' xmlns:dc='http://purl.org/dc/elements/1.1/' sodipodi:docname='firefox-symbolic.svg' height='16' id='svg7384' xmlns:inkscape='http://www.inkscape.org/namespaces/inkscape' xmlns:osb='http://www.openswatchbook.org/uri/2009/osb' xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns:sodipodi='http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd' xmlns:svg='http://www.w3.org/2000/svg' version='1.1' inkscape:version='0.91 r13725' width='16' xmlns='http://www.w3.org/2000/svg'> - <metadata id='metadata90'> +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + width="16" + height="16" + viewBox="0 0 16 16" + version="1.1" + id="svg3758" + sodipodi:docname="firefox-symbolic-quantum.svg" + inkscape:version="0.92.2 5c3e80d, 2017-08-06"> + <metadata + id="metadata3764"> <rdf:RDF> - <cc:Work rdf:about=''> + <cc:Work + rdf:about=""> <dc:format>image/svg+xml</dc:format> - <dc:type rdf:resource='http://purl.org/dc/dcmitype/StillImage'/> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> <dc:title>Gnome Symbolic Icon Theme</dc:title> </cc:Work> </rdf:RDF> </metadata> - <sodipodi:namedview inkscape:bbox-paths='true' bordercolor='#666666' borderopacity='1' inkscape:current-layer='layer9' inkscape:cx='-10.975734' inkscape:cy='233.73843' gridtolerance='10' inkscape:guide-bbox='true' guidetolerance='10' id='namedview88' inkscape:object-nodes='false' inkscape:object-paths='false' objecttolerance='10' pagecolor='#555753' inkscape:pageopacity='1' inkscape:pageshadow='2' showborder='false' showgrid='false' showguides='true' inkscape:snap-bbox='true' inkscape:snap-bbox-midpoints='false' inkscape:snap-global='true' inkscape:snap-grids='true' inkscape:snap-nodes='true' inkscape:snap-others='false' inkscape:snap-to-guides='true' inkscape:window-height='1403' inkscape:window-maximized='1' inkscape:window-width='2560' inkscape:window-x='2560' inkscape:window-y='0' inkscape:zoom='1'> - <inkscape:grid empspacing='2' enabled='true' id='grid4866' originx='-222.00001' originy='-381.99852' snapvisiblegridlinesonly='true' spacingx='1px' spacingy='1px' type='xygrid' visible='true'/> + <defs + id="defs3762" /> + <sodipodi:namedview + pagecolor="#555753" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="1" + inkscape:pageshadow="2" + inkscape:window-width="1591" + inkscape:window-height="909" + id="namedview3760" + showgrid="false" + showborder="false" + inkscape:snap-global="false" + inkscape:zoom="1" + inkscape:cx="3.8851213" + inkscape:cy="12.517918" + inkscape:window-x="143" + inkscape:window-y="60" + inkscape:window-maximized="0" + inkscape:current-layer="svg3758"> + <inkscape:grid + type="xygrid" + id="grid3768" /> </sodipodi:namedview> - <title id='title9167'>Gnome Symbolic Icon Theme</title> - <defs id='defs7386'> - <linearGradient id='linearGradient7212' osb:paint='solid'> - <stop id='stop7214' offset='0' style='stop-color:#000000;stop-opacity:1;'/> - </linearGradient> - </defs> - <g inkscape:groupmode='layer' id='layer9' inkscape:label='apps' style='display:inline' transform='translate(-463.00021,164.99852)'> - - <path inkscape:connector-curvature='0' d='M 469.05437,-154.9679 Z' id='path17747' style='fill:none;stroke:#000000;stroke-width:0.99851286px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1'/> - <path inkscape:connector-curvature='0' d='M 469.08553,-154.9054 Z' id='path17749' style='fill:none;stroke:#000000;stroke-width:0.99851286px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1'/> - <path inkscape:connector-curvature='0' d='m 473.0627,-162.9375 c -0.41568,-0.0182 -0.62813,0.0274 -0.625,0.0312 0.006,0.008 1.72988,0.32697 2.03125,0.75 0,0 -0.71915,0.007 -1.4375,0.21875 -0.0325,0.01 2.64053,0.33122 3.1875,3.0625 0,0 -0.29354,-0.64386 -0.65625,-0.75 0.23852,0.74134 0.16466,2.17583 -0.0625,2.875 -0.0292,0.0899 -0.0525,-0.38762 -0.5,-0.59375 0.14332,1.04923 -0.006,2.6978 -0.71875,3.15625 -0.0555,0.0357 0.43942,-1.64894 0.0937,-1 -2.06368,3.2325 -4.50486,1.31102 -5.5,0.625 0.79871,0.19996 1.80035,0.0704 2.125,-0.15625 0.49572,-0.34615 0.79916,-0.59107 1.0625,-0.53125 0.26322,0.0601 0.42318,-0.22934 0.21875,-0.46875 -0.20466,-0.23989 -0.70268,-0.55471 -1.375,-0.375 -0.47415,0.12687 -1.04057,0.54268 -1.9375,0 -0.7652,-0.46319 -0.67076,-0.69942 -0.67076,-0.93907 0,-0.23977 0.21387,-0.59107 0.59375,-0.53125 0.0851,0.0134 0.15074,0.009 0.1875,0 0.18483,0.0422 0.35743,0.0964 0.53125,0.1875 0.008,-0.2241 -0.0292,-0.87345 -0.15625,-1.23012 0.0106,0.004 0.0289,0.011 0.0312,0 0.0384,-0.17687 1.05477,-0.18386 1.37388,-0.59643 0.20404,-0.26362 0.14073,-0.79683 0.14073,-0.79683 l -1,0 c -0.52354,0.002 -0.97244,-0.75086 -1.01451,-0.85669 0.11444,-0.62597 0.48612,-0.83952 1.01451,-1.14331 -0.39748,-0.003 -0.18871,0 -1,0 -0.52875,0 -0.84718,0.36158 -1.01451,0.54956 -0.70058,-0.16587 -1.38144,-0.25227 -1.86049,-0.0609 -0.22125,-0.22941 -0.39604,-0.80055 -0.42188,-1.48863 0,0 -1.20486,0.73864 -1.07812,2.55113 -0.002,0.14904 -0.0499,0.21348 -0.0625,0.3125 -0.13061,0.22845 -0.1553,0.40492 -0.125,0.375 -0.0656,0.13627 -0.15391,0.28402 -0.21875,0.46875 -0.0149,0.0362 -0.0495,0.0463 -0.0625,0.0937 -0.009,0.0322 0.002,0.0638 0,0.0937 -0.11512,0.36099 -0.21516,0.98244 -0.3125,1.54262 0,0 0.12424,-0.51425 0.3125,-0.88637 -0.15639,0.54353 -0.26211,1.54974 -0.1875,2.73012 0,0 0.015,-0.20429 0.0625,-0.5 0.0465,0.80102 0.25925,1.72737 0.84375,2.75 1.46152,2.5575 3.89248,3.68885 6.4375,3.46875 0.44516,-0.0296 0.89639,-0.10834 1.34375,-0.21875 5.92923,-1.46449 5.28125,-8.78118 5.28125,-8.78118 l -0.15625,1.09375 c 0,0 -0.24147,-1.99977 -0.53125,-2.75 -0.44412,-1.14957 -0.62372,-1.15791 -0.625,-1.15625 0.29743,0.77226 0.21875,1.1875 0.21875,1.1875 0,0 -0.51279,-1.43939 -1.90625,-1.90625 -0.82515,-0.27632 -1.45932,-0.38807 -1.875,-0.40625 z' id='path159-6' sodipodi:nodetypes='sccccccccccsccccscccccscccccccccccccccccccccccccccs' style='fill:#bebebe;fill-opacity:1;stroke:none'/> - <path inkscape:connector-curvature='0' d='m 470.87695,-164.01953 c -0.83043,0.0139 -1.67042,0.17659 -2.48047,0.5 l -0.46289,0.18359 c 0.66083,0.79767 1.84339,0.43951 1.84339,0.43951 2.50802,-0.52344 5.12427,0.6034 6.44177,2.89252 1.49591,2.59908 0.85463,5.89258 -1.50586,7.74219 -2.36049,1.84961 -5.71108,1.68349 -7.87695,-0.39062 -2.16588,-2.07412 -2.47623,-5.41522 -0.73047,-7.85352 l 0.29101,-0.40625 -0.81445,-0.58203 -0.29101,0.40625 c -2.03104,2.83673 -1.66628,6.74516 0.85351,9.1582 2.5198,2.41305 6.43934,2.60693 9.18555,0.45508 2.74621,-2.15185 3.49621,-6.00355 1.75586,-9.02734 -1.30527,-2.26785 -3.7177,-3.55935 -6.20899,-3.51758 z' id='path22109' sodipodi:nodetypes='ccccsssccccsssc' style='color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;baseline-shift:baseline;text-anchor:start;white-space:normal;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#bebebe;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.99999994;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;paint-order:normal;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate'/> - </g> + <title + id="title3754">Gnome Symbolic Icon Theme</title> + <path + d="m 15.054715,6.9884649 v 0 c -0.02034,-0.133652 -0.04071,-0.2122775 -0.04071,-0.2122775 0,0 -0.05225,0.060583 -0.138743,0.1748124 A 4.9808937,4.9808937 0 0 0 14.703694,6.0103229 6.4034781,6.4034781 0 0 0 14.270352,4.895288 4.6469845,4.6469845 0 0 0 13.87447,4.2163686 Q 13.793063,4.0947376 13.708437,3.9805045 C 13.444828,3.5499376 13.142365,3.2867867 12.792269,2.7891599 A 3.6101075,3.6101075 0 0 1 12.333953,1.5474054 5.0151173,5.0151173 0 0 0 12.113814,2.3599798 C 11.754468,1.997397 11.441832,1.7397963 11.253142,1.5640539 10.322171,0.69459485 10.430396,0.24367816 10.430396,0.24367816 v 0 c 0,0 -1.7389294,1.94102274 -0.9855522,3.96297904 a 3.8848199,3.8848199 0 0 0 1.2949452,1.726432 c 0.728868,0.6012222 1.513693,1.0743371 1.927612,2.2832561 A 3.8741829,3.8741829 0 0 0 11.21337,6.6823034 3.5023502,3.5023502 0 0 1 11.490854,8.0697401 3.2946971,3.2946971 0 0 1 7.4621982,11.27934 3.0343219,3.0343219 0 0 1 6.6459244,11.001852 3.3219834,3.3219834 0 0 1 5.667782,10.09771 l -0.00463,-0.0078 0.058274,0.02125 a 3.0061106,3.0061106 0 0 0 0.4162344,0.111409 2.6028293,2.6028293 0 0 0 1.6570605,-0.195631 C 8.3154732,9.7379218 8.6308831,9.5237932 8.8866339,9.6084266 h 0.0046 c 0.24974,0.079514 0.446755,-0.1628244 0.2682391,-0.4162632 A 1.3596868,1.3596868 0 0 0 7.8423564,8.6778985 C 7.3211426,8.7537416 6.8434027,9.1241907 6.1603222,8.7653097 a 1.4470953,1.4470953 0 0 1 -0.128107,-0.075371 c -0.04625,-0.026369 0.146605,0.040234 0.1017455,0.010233 A 3.3899676,3.3899676 0 0 1 5.7047808,8.4439577 c -0.010172,-0.00822 0.103133,0.032367 0.092497,0.024039 A 1.6561356,1.6561356 0 0 1 5.3495968,8.015168 0.80517516,0.80517516 0 0 1 5.3190728,7.2964766 0.63405807,0.63405807 0 0 1 5.5965603,7.0356384 c 0.088333,0.043485 0.1429059,0.076305 0.1429059,0.076305 0,0 -0.040235,-0.073997 -0.061972,-0.1128365 0.00786,-0.0027 0.014794,0 0.022662,-0.00513 0.077233,0.033293 0.248351,0.1202544 0.3385341,0.1734358 A 0.46987818,0.46987818 0 0 1 6.19362,7.3061637 c 0,0 0.030994,-0.015351 0.0079,-0.079998 A 0.41623066,0.41623066 0 0 0 6.0414753,7.0300927 h 0.0074 a 1.3596868,1.3596868 0 0 1 0.1970213,0.1225561 0.96149289,0.96149289 0 0 0 0.078625,-0.416232 0.54479973,0.54479973 0 0 0 -0.031914,-0.2312396 c -0.024511,-0.046254 0.013876,-0.064746 0.056885,-0.016135 A 0.45137905,0.45137905 0 0 0 6.3129456,6.378979 v -0.00372 0 c 0,0 0.024511,-0.031916 0.035615,-0.043486 A 0.66134433,0.66134433 0 0 1 6.4484481,6.2503678 4.6122987,4.6122987 0 0 1 7.1259793,5.9048971 C 7.3174429,5.8211545 7.4760733,5.7573477 7.5084475,5.7388339 a 1.0637007,1.0637007 0 0 0 0.1355052,-0.1040612 0.91015778,0.91015778 0 0 0 0.3052354,-0.5272274 0.73996569,0.73996569 0 0 0 0.0079,-0.082324 v -0.023118 -0.013967 0 -0.00552 0 -0.00611 0 C 7.9293085,4.872475 7.749868,4.7943251 6.8119611,4.7064478 A 0.81997449,0.81997449 0 0 1 6.1413599,4.0776254 v 0.0042 c -0.013416,0.034225 -0.025431,0.068909 -0.037456,0.1040572 0.012025,-0.034685 0.024051,-0.069373 0.037456,-0.1040572 v -0.00742 A 2.3762148,2.3762148 0 0 1 7.0598423,2.9339361 c 0.024051,-0.019416 -0.096192,0.00512 -0.072152,-0.014798 A 2.3845397,2.3845397 0 0 1 7.2328039,2.8155414 C 7.2748921,2.7979724 7.0524371,2.7128704 6.8558842,2.7336774 a 1.0174527,1.0174527 0 0 0 -0.3496338,0.082324 c 0.046253,-0.039773 0.1849968,-0.092498 0.1521605,-0.092498 a 2.2499581,2.2499581 0 0 0 -0.713142,0.2696255 0.14521828,0.14521828 0 0 1 0.01387,-0.064747 1.1099484,1.1099484 0 0 0 -0.4458297,0.3440843 0.58966016,0.58966016 0 0 0 0.00462,-0.080469 1.3300881,1.3300881 0 0 0 -0.2187525,0.2053404 l -0.00417,0.00321 A 2.9066776,2.9066776 0 0 0 3.6684873,3.2618132 l -0.00463,-0.0042 h 0.00554 A 1.3610743,1.3610743 0 0 1 3.3803631,2.9339159 l -0.0074,0.0018 -0.00877,-0.010174 C 3.3285694,2.8728322 3.2920343,2.813172 3.2545731,2.7465739 3.2277502,2.7003291 3.2004619,2.646216 3.1731756,2.5902563 c 0,-0.00372 -0.00416,-0.00513 -0.006,-0.00552 -0.0111,0 -0.01896,0.05133 -0.028212,0.037927 v -0.0028 A 1.9923577,1.9923577 0 0 1 3.0080744,1.8396896 l -0.0074,0.00372 A 0.87130958,0.87130958 0 0 0 2.6704677,2.2753541 c -0.028212,0.063362 -0.046248,0.098047 -0.064746,0.1327329 0,0.0028 0,-0.00461 0,-0.016194 0.00416,-0.031916 0.018037,-0.097585 0.014799,-0.092497 -0.00323,0.00513 -0.00553,0.00882 -0.00877,0.013415 A 0.80147532,0.80147532 0 0 0 2.4956586,2.4848515 1.0891367,1.0891367 0 0 0 2.4262868,2.661518 c -0.00276,0.00973 0,-0.00832 0,-0.029599 0,-0.02127 0.00416,-0.059199 0,-0.051331 L 2.4161148,2.600475 A 4.3935464,4.3935464 0 0 0 2.0461275,4.0040946 1.3976101,1.3976101 0 0 0 2.031791,4.252909 v 0.00742 A 3.0653076,3.0653076 0 0 0 1.6539417,4.7690529 7.2174403,7.2174403 0 0 0 0.85524217,6.725337 4.7871157,4.7871157 0 0 1 1.2830334,5.9756593 6.9371784,6.9371784 0 0 0 0.79974461,8.5192901 6.582457,6.582457 0 0 1 1.0078598,7.7659142 6.3854411,6.3854411 0 0 0 1.585032,10.755373 6.9542899,6.9542899 0 0 0 4.3372422,13.87618 v 0 a 6.0196208,6.0196208 0 0 0 1.6038754,0.768639 c 0.07492,0.02728 0.1507676,0.0541 0.2284646,0.08 -0.024511,-0.0096 -0.04625,-0.02034 -0.070761,-0.03098 A 7.2609132,7.2609132 0 0 0 8.179966,15 c 2.494615,0 3.318287,-0.949928 3.394136,-1.044738 v 0 A 1.2625664,1.2625664 0 0 0 11.8687,13.559386 v 0 q 0.07216,-0.02958 0.145679,-0.06335 l 0.03097,-0.01397 0.05597,-0.02635 a 5.2315572,5.2315572 0 0 0 1.053064,-0.659489 2.5436321,2.5436321 0 0 0 0.98184,-1.433687 v 0 a 0.89628343,0.89628343 0 0 0 0.01343,-0.660421 q 0.03838,-0.0606 0.0791,-0.129501 A 5.8762526,5.8762526 0 0 0 15.1107,7.7140393 v -0.0027 c 0,-0.027291 0,-0.054583 0,-0.081863 A 3.5754215,3.5754215 0 0 0 15.05473,6.9884887 Z" + id="path3756" + inkscape:connector-curvature="0" + style="fill:#bebebe;fill-opacity:1;stroke-width:0.46247858" /> </svg> diff --git a/firefox-wayland.patch b/firefox-wayland.patch deleted file mode 100644 index 157fa3d60a88..000000000000 --- a/firefox-wayland.patch +++ /dev/null @@ -1,325 +0,0 @@ -diff --git a/gfx/gl/GLContextProviderGLX.cpp b/gfx/gl/GLContextProviderGLX.cpp ---- a/gfx/gl/GLContextProviderGLX.cpp -+++ b/gfx/gl/GLContextProviderGLX.cpp -@@ -177,16 +177,18 @@ GLXLibrary::EnsureInitialized() - - if (!GLLibraryLoader::LoadSymbols(mOGLLibrary, &symbols[0])) { - NS_WARNING("Couldn't find required entry point in OpenGL shared library"); - return false; - } - - Display *display = DefaultXDisplay(); - int screen = DefaultScreen(display); -+ -+ return false; - - if (!xQueryVersion(display, &mGLXMajorVersion, &mGLXMinorVersion)) { - mGLXMajorVersion = 0; - mGLXMinorVersion = 0; - return false; - } - - if (!GLXVersionCheck(1, 1)) -diff --git a/widget/gtk/nsWindow.cpp b/widget/gtk/nsWindow.cpp ---- a/widget/gtk/nsWindow.cpp -+++ b/widget/gtk/nsWindow.cpp -@@ -129,6 +129,7 @@ - #include "nsWindow.h" - - #include <dlfcn.h> -+#include <sys/time.h> - - #include "mozilla/layers/APZCTreeManager.h" - -@@ -282,47 +283,55 @@ TimeConverter() { - return sTimeConverterSingleton; - } - - namespace mozilla { - - class CurrentX11TimeGetter - { - public: -- explicit CurrentX11TimeGetter(GdkWindow* aWindow) -+ explicit CurrentX11TimeGetter(GdkWindow* aWindow, bool aIsX11Display) - : mWindow(aWindow) -+ , mIsX11Display(aIsX11Display) - , mAsyncUpdateStart() - { - } - - guint32 GetCurrentTime() const - { -- return gdk_x11_get_server_time(mWindow); -+ if (mIsX11Display) { -+ return gdk_x11_get_server_time(mWindow); -+ } else { -+ return g_get_monotonic_time()/1000; -+ } - } - - void GetTimeAsyncForPossibleBackwardsSkew(const TimeStamp& aNow) - { - // Check for in-flight request -- if (!mAsyncUpdateStart.IsNull()) { -+ if (!mIsX11Display || !mAsyncUpdateStart.IsNull()) { - return; - } - mAsyncUpdateStart = aNow; - - Display* xDisplay = GDK_WINDOW_XDISPLAY(mWindow); - Window xWindow = GDK_WINDOW_XID(mWindow); - unsigned char c = 'a'; - Atom timeStampPropAtom = TimeStampPropAtom(); - XChangeProperty(xDisplay, xWindow, timeStampPropAtom, - timeStampPropAtom, 8, PropModeReplace, &c, 1); - XFlush(xDisplay); - } - - gboolean PropertyNotifyHandler(GtkWidget* aWidget, - GdkEventProperty* aEvent) - { -+ if (!mIsX11Display) -+ return FALSE; -+ - if (aEvent->atom != - gdk_x11_xatom_to_atom(TimeStampPropAtom())) { - return FALSE; - } - - guint32 eventTime = aEvent->time; - TimeStamp lowerBound = mAsyncUpdateStart; - -@@ -335,16 +344,17 @@ private: - static Atom TimeStampPropAtom() { - return gdk_x11_get_xatom_by_name_for_display( - gdk_display_get_default(), "GDK_TIMESTAMP_PROP"); - } - - // This is safe because this class is stored as a member of mWindow and - // won't outlive it. - GdkWindow* mWindow; -+ bool mIsX11Display; - TimeStamp mAsyncUpdateStart; - }; - - } // namespace mozilla - - static NS_DEFINE_IID(kCDragServiceCID, NS_DRAGSERVICE_CID); - - // The window from which the focus manager asks us to dispatch key events. -@@ -422,16 +432,17 @@ nsWindow::nsWindow() - mIsShown = false; - mNeedsShow = false; - mEnabled = true; - mCreated = false; - #if GTK_CHECK_VERSION(3,4,0) - mHandleTouchEvent = false; - #endif - mIsDragPopup = false; -+ mIsX11Display = GDK_IS_X11_DISPLAY(gdk_display_get_default()); - - mContainer = nullptr; - mGdkWindow = nullptr; - mShell = nullptr; - mPluginNativeWindow = nullptr; - mHasMappedToplevel = false; - mIsFullyObscured = false; - mRetryPointerGrab = false; -@@ -1382,16 +1393,20 @@ SetUserTimeAndStartupIDForActivatedWindo - /* static */ guint32 - nsWindow::GetLastUserInputTime() - { - // gdk_x11_display_get_user_time tracks button and key presses, - // DESKTOP_STARTUP_ID used to start the app, drop events from external - // drags, WM_DELETE_WINDOW delete events, but not usually mouse motion nor - // button and key releases. Therefore use the most recent of - // gdk_x11_display_get_user_time and the last time that we have seen. -+ GdkDisplay *display = gdk_display_get_default(); -+ if (!GDK_IS_X11_DISPLAY(display)) -+ return sLastUserInputTime; -+ - guint32 timestamp = - gdk_x11_display_get_user_time(gdk_display_get_default()); - if (sLastUserInputTime != GDK_CURRENT_TIME && - TimestampIsNewerThan(sLastUserInputTime, timestamp)) { - return sLastUserInputTime; - } - - return timestamp; -@@ -1532,17 +1547,17 @@ nsWindow::GetClientBounds(LayoutDeviceIn - return NS_OK; - } - - void - nsWindow::UpdateClientOffset() - { - PROFILER_LABEL("nsWindow", "UpdateClientOffset", js::ProfileEntry::Category::GRAPHICS); - -- if (!mIsTopLevel || !mShell || !mGdkWindow || -+ if (!mIsTopLevel || !mShell || !mGdkWindow || !mIsX11Display || - gtk_window_get_window_type(GTK_WINDOW(mShell)) == GTK_WINDOW_POPUP) { - mClientOffset = nsIntPoint(0, 0); - return; - } - - GdkAtom cardinal_atom = gdk_x11_xatom_to_atom(XA_CARDINAL); - - GdkAtom type_returned; -@@ -1963,19 +1978,18 @@ nsWindow::HasPendingInputEvent() - // This sucks, but gtk/gdk has no way to answer the question we want while - // excluding paint events, and there's no X API that will let us peek - // without blocking or removing. To prevent event reordering, peek - // anything except expose events. Reordering expose and others should be - // ok, hopefully. - bool haveEvent = false; - #ifdef MOZ_X11 - XEvent ev; -- GdkDisplay* gdkDisplay = gdk_display_get_default(); -- if (GDK_IS_X11_DISPLAY(gdkDisplay)) { -- Display *display = GDK_DISPLAY_XDISPLAY(gdkDisplay); -+ if (mIsX11Display) { -+ Display *display = GDK_DISPLAY_XDISPLAY(gdk_display_get_default()); - haveEvent = - XCheckMaskEvent(display, - KeyPressMask | KeyReleaseMask | ButtonPressMask | - ButtonReleaseMask | EnterWindowMask | LeaveWindowMask | - PointerMotionMask | PointerMotionHintMask | - Button1MotionMask | Button2MotionMask | - Button3MotionMask | Button4MotionMask | - Button5MotionMask | ButtonMotionMask | KeymapStateMask | -@@ -2609,18 +2623,17 @@ nsWindow::OnMotionNotifyEvent(GdkEventMo - { - // see if we can compress this event - // XXXldb Why skip every other motion event when we have multiple, - // but not more than that? - bool synthEvent = false; - #ifdef MOZ_X11 - XEvent xevent; - -- bool isX11Display = GDK_IS_X11_DISPLAY(gdk_display_get_default()); -- if (isX11Display) { -+ if (mIsX11Display) { - while (XPending (GDK_WINDOW_XDISPLAY(aEvent->window))) { - XEvent peeked; - XPeekEvent (GDK_WINDOW_XDISPLAY(aEvent->window), &peeked); - if (peeked.xany.window != gdk_x11_window_get_xid(aEvent->window) - || peeked.type != MotionNotify) - break; - - synthEvent = true; -@@ -3040,7 +3053,8 @@ - nsWindow::GetCurrentTimeGetter() { - MOZ_ASSERT(mGdkWindow, "Expected mGdkWindow to be set"); - if (MOZ_UNLIKELY(!mCurrentTimeGetter)) { -- mCurrentTimeGetter = new CurrentX11TimeGetter(mGdkWindow); -+ //mCurrentTimeGetter = MakeUnique<CurrentX11TimeGetter>(mGdkWindow, mIsX11Display); -+ mCurrentTimeGetter = new CurrentX11TimeGetter(mGdkWindow,mIsX11Display); - } - return mCurrentTimeGetter; - } -@@ -3923,17 +3936,18 @@ nsWindow::Create(nsIWidget* aParent, - // Visibility events are sent to the owning widget of the relevant - // window but do not propagate to parent widgets so connect on - // mShell (if it exists) as well as mContainer. - g_signal_connect(widgets[i], "visibility-notify-event", - G_CALLBACK(visibility_notify_event_cb), nullptr); - // Similarly double buffering is controlled by the window's owning - // widget. Disable double buffering for painting directly to the - // X Window. -- gtk_widget_set_double_buffered(widgets[i], FALSE); -+ if (mIsX11Display) -+ gtk_widget_set_double_buffered(widgets[i], FALSE); - } - - // We create input contexts for all containers, except for - // toplevel popup windows - if (mWindowType != eWindowType_popup) { - mIMContext = new IMContextWrapper(this); - } - } else if (!mIMContext) { -@@ -3986,17 +4000,17 @@ nsWindow::Create(nsIWidget* aParent, - mGdkWindow, gdk_window_get_parent(mGdkWindow))); - } - - // resize so that everything is set to the right dimensions - if (!mIsTopLevel) - Resize(mBounds.x, mBounds.y, mBounds.width, mBounds.height, false); - - #ifdef MOZ_X11 -- if (mGdkWindow) { -+ if (mIsX11Display && mGdkWindow) { - mXDisplay = GDK_WINDOW_XDISPLAY(mGdkWindow); - mXWindow = gdk_x11_window_get_xid(mGdkWindow); - - GdkVisual* gdkVisual = gdk_window_get_visual(mGdkWindow); - mXVisual = gdk_x11_visual_get_xvisual(gdkVisual); - mXDepth = gdk_visual_get_depth(gdkVisual); - } - #endif -@@ -4034,17 +4048,17 @@ nsWindow::SetWindowClass(const nsAString - } - res_name[0] = toupper(res_name[0]); - if (!role) role = res_name; - - gdk_window_set_role(mGdkWindow, role); - - #ifdef MOZ_X11 - GdkDisplay *display = gdk_display_get_default(); -- if (GDK_IS_X11_DISPLAY(display)) { -+ if (mIsX11Display) { - XClassHint *class_hint = XAllocClassHint(); - if (!class_hint) { - free(res_name); - return NS_ERROR_OUT_OF_MEMORY; - } - class_hint->res_name = res_name; - class_hint->res_class = const_cast<char*>(res_class); - -diff --git a/widget/gtk/nsWindow.h b/widget/gtk/nsWindow.h ---- a/widget/gtk/nsWindow.h -+++ b/widget/gtk/nsWindow.h -@@ -402,16 +402,18 @@ protected: - // has the native window for this been created yet? - bool mCreated; - #if GTK_CHECK_VERSION(3,4,0) - // whether we handle touch event - bool mHandleTouchEvent; - #endif - // true if this is a drag and drop feedback popup - bool mIsDragPopup; -+ // Can we access X? -+ bool mIsX11Display; - - private: - void DestroyChildWindows(); - GtkWidget *GetToplevelWidget(); - nsWindow *GetContainerWindow(); - void SetUrgencyHint(GtkWidget *top_window, bool state); - void *SetupPluginPort(void); - void SetDefaultIcon(void); -diff --git a/widget/nsShmImage.cpp b/widget/nsShmImage.cpp ---- a/widget/nsShmImage.cpp -+++ b/widget/nsShmImage.cpp -@@ -124,16 +124,21 @@ bool - nsShmImage::InitExtension() - { - if (gShmInitialized) { - return gShmAvailable; - } - - gShmInitialized = true; - -+ if (!GDK_IS_X11_DISPLAY(mDisplay)) { -+ gShmAvailable = false; -+ return false; -+ } -+ - if (!XShmQueryExtension(mDisplay)) { - gShmAvailable = false; - return false; - } - - int major, minor; - Bool pixmaps; - if (!XShmQueryVersion(mDisplay, &major, &minor, &pixmaps)) { diff --git a/firefox.desktop b/firefox.desktop index 084f126a0430..3e7accf05bbe 100644 --- a/firefox.desktop +++ b/firefox.desktop @@ -1,12 +1,14 @@ [Desktop Entry] +Version=1.0 Name=Firefox GenericName=Web Browser -GenericName[ar]=متصفح ويب +GenericName[ar]=متصفح وِب GenericName[ast]=Restolador Web GenericName[bn]=ওয়েব ব্রাউজার GenericName[ca]=Navegador web GenericName[cs]=Webový prohlížeč GenericName[da]=Webbrowser +GenericName[de]=Webbrowser GenericName[el]=Περιηγητής διαδικτύου GenericName[es]=Navegador web GenericName[et]=Veebibrauser @@ -17,7 +19,7 @@ GenericName[gl]=Navegador Web GenericName[he]=דפדפן אינטרנט GenericName[hr]=Web preglednik GenericName[hu]=Webböngésző -GenericName[it]=Browser web +GenericName[it]=Browser Web GenericName[ja]=ウェブ・ブラウザ GenericName[ko]=웹 브라우저 GenericName[ku]=Geroka torê @@ -40,11 +42,11 @@ GenericName[uk]=Веб-браузер GenericName[vi]=Trình duyệt Web GenericName[zh_CN]=网络浏览器 GenericName[zh_TW]=網路瀏覽器 -Comment=Browse the World Wide Web -Comment[ar]=تصفح الشبكة العنكبوتية العالمية +Comment=Browse the Web +Comment[ar]=تصفح الوِب Comment[ast]=Restola pela Rede Comment[bn]=ইন্টারনেট ব্রাউজ করুন -Comment[ca]=Navegueu per la web +Comment[ca]=Navegueu per el web Comment[cs]=Prohlížení stránek World Wide Webu Comment[da]=Surf på internettet Comment[de]=Im Internet surfen @@ -81,211 +83,152 @@ Comment[uk]=Перегляд сторінок Інтернету Comment[vi]=Để duyệt các trang web Comment[zh_CN]=浏览互联网 Comment[zh_TW]=瀏覽網際網路 -Exec=firefox %u +Exec=/usr/lib/firefox/firefox %u +Icon=firefox Terminal=false Type=Application -Icon=firefox -Categories=Network;WebBrowser; -MimeType=text/html;text/xml;application/xhtml+xml;application/vnd.mozilla.xul+xml;text/mml;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/ftp; +MimeType=text/html;text/xml;application/xhtml+xml;application/vnd.mozilla.xul+xml;text/mml;x-scheme-handler/http;x-scheme-handler/https; StartupNotify=true -Actions=NewTab;NewWindow;NewPrivateWindow; - -[Desktop Action NewTab] -Name=Open new tab -Name[ach]=Yab dirica matidi manyen -Name[af]=Open nuwe oortjie -Name[an]=Ubrir una pestanya nueva -Name[ar]=افتح لسانًا جديدًا -Name[as]=নতুন টেব খোলক -Name[ast]=Abrir llingüeta nueva -Name[az]=Yeni vərəq aç -Name[be]=Адкрыць новую ўстаўку -Name[bg]=Отваряне на нов подпрозорец -Name[bn_BD]=নতুন ট্যাব খুলুন -Name[bn_IN]=নতুন ট্যাব খুলুন -Name[br]=Digeriñ un ivinell nevez -Name[bs]=Otvori novi tab -Name[ca]=Obre una pestanya nova -Name[cs]=Otevřít nový panel -Name[cy]=Agor tab newydd -Name[da]=Åbn nyt faneblad -Name[de]=Neuen Tab öffnen -Name[dsb]=Nowy rejtark wócyniś -Name[el]=Άνοιγμα νέας καρτέλας -Name[eo]=Malfermi novan langeton -Name[es_AR]=Abrir nueva pestaña -Name[es_CL]=Abrir nueva pestaña -Name[es_ES]=Abrir pestaña nueva -Name[es_MX]=Abrir una pestaña nueva -Name[et]=Ava uus kaart -Name[eu]=Ireki fitxa berria -Name[ff]=Uddit tabbere hesere -Name[fi]=Avaa uusi välilehti -Name[fr]=Ouvrir un nouvel onglet -Name[fy_NL]=Iepenje nij ljepblêd -Name[ga_IE]=Oscail i gcluaisín nua -Name[gd]=Fosgail taba ùr -Name[gl]=Abrir unha nova lapela -Name[gu_IN]=નવી ટૅબને ખોલો -Name[he]=פתיחת לשונית חדשה -Name[hi_IN]=नया टैब खोलें -Name[hr]=Otvori novu karticu -Name[hsb]=Nowy rajtark wočinić -Name[hu]=Új lap megnyitása -Name[hy_AM]=Բացել նոր ներդիր -Name[id]=Buka tab baru -Name[is]=Opna nýjan flipa -Name[it]=Apri nuova scheda -Name[ja]=新しいタブ -Name[kk]=Жаңа бетті ашу -Name[kn]=ಹೊಸ ಹಾಳೆಯನ್ನು ತೆರೆ -Name[ko]=새 탭 열기 -Name[lij]=Àrvi nêuvo féuggio -Name[lt]=Atverti naują kortelę -Name[mai]=नव टैब खोलू -Name[mk]=Отвори ново јазиче -Name[ml]=പുതിയ റ്റാബ് തുറക്കുക -Name[mr]=नवीन टॅब उघडा -Name[ms]=Buka tab baru -Name[nb_NO]=Åpne ny fane -Name[nl]=Nieuw tabblad openen -Name[nn_NO]=Opna ny fane -Name[or]=ନୂତନ ଟ୍ୟାବ ଖୋଲନ୍ତୁ -Name[pa_IN]=ਨਵੀਂ ਟੈਬ ਖੋਲ੍ਹੋ -Name[pl]=Otwórz nową kartę -Name[pt_BR]=Nova aba -Name[pt_PT]=Abrir novo separador -Name[rm]=Avrir in nov tab -Name[ro]=Deschide o filă nouă -Name[ru]=Открыть новую вкладку -Name[si]=නව ටැබය විවෘත කරන්න -Name[sk]=Otvoriť novú kartu -Name[sl]=Odpri nov zavihek -Name[son]=Nor loku taaga feeri -Name[sq]=Hap skedë të re -Name[sr]=Отвори нови језичак -Name[sv_SE]=Öppna ny flik -Name[ta]=புதிய கீற்றைத் திற -Name[te]=కొత్త టాబ్ తెరువుము -Name[th]=เปิดแท็บใหม่ -Name[tr]=Yeni sekme aç -Name[uk]=Відкрити нову вкладку -Name[uz]=Yangi ichki oyna ochish -Name[vi]=Mở thẻ mới -Name[xh]=Vula ithebhu entsha -Name[zh_CN]=打开新标签页 -Name[zh_TW]=開啟新分頁 -Exec=firefox -new-tab about:newtab +StartupWMClass=Firefox +Categories=Network;WebBrowser; +Keywords=web;browser;internet; +Actions=new-window;new-private-window; -[Desktop Action NewWindow] -Name=Open new window -Name[ach]=Yab dirica manyen -Name[af]=Open nuwe venster -Name[an]=Ubrir una nueva finestra -Name[ar]=افتح نافذة جديدة -Name[as]=নতুন উইন্ডো খোলক -Name[ast]=Abrir ventana nueva -Name[az]=Yeni pəncərə aç -Name[be]=Адкрыць новае акно -Name[bg]=Отваряне на нов прозорец -Name[bn_BD]=নতুন উইন্ডো খুলুন -Name[bn_IN]=নতুন উইন্ডো খুলুন -Name[br]=Digeriñ ur prenestr nevez -Name[bs]=Otvori novi prozor -Name[ca]=Obre una finestra nova -Name[cs]=Otevřít nové okno -Name[cy]=Agor ffenestr newydd -Name[da]=Åbn nyt vindue -Name[de]=Neues Fenster öffnen -Name[dsb]=Nowe wokno wócyniś -Name[el]=Άνοιγμα νέου παραθύρου -Name[eo]=Malfermi novan fenestron -Name[es_AR]=Abrir nueva ventana -Name[es_CL]=Abrir nueva ventana -Name[es_ES]=Abrir nueva ventana -Name[es_MX]=Abrir nueva ventana -Name[et]=Ava uus aken -Name[eu]=Ireki leiho berria -Name[ff]=Uddit henorde hesere -Name[fi]=Avaa uusi ikkuna -Name[fr]=Ouvrir une nouvelle fenêtre -Name[fy_NL]=Iepenje nij finster -Name[ga_IE]=Oscail fuinneog nua -Name[gd]=Fosgail uinneag ùr -Name[gl]=Abrir unha nova xanela -Name[gu_IN]=નવી વિન્ડોને ખોલો -Name[he]=פתח חלון חדש -Name[hi_IN]=नई विंडो खोलें -Name[hr]=Otvori novi prozor -Name[hsb]=Nowe wokno wočinić -Name[hu]=Új ablak megnyitása -Name[hy_AM]=Բացել նոր պատուհան -Name[id]=Buka jendela baru -Name[is]=Opna nýjan glugga -Name[it]=Apri nuova finestra +[Desktop Action new-window] +Name=New Window +Name[ach]=Dirica manyen +Name[af]=Nuwe venster +Name[an]=Nueva finestra +Name[ar]=نافذة جديدة +Name[as]=নতুন উইন্ডো +Name[ast]=Ventana nueva +Name[az]=Yeni Pəncərə +Name[be]=Новае акно +Name[bg]=Нов прозорец +Name[bn_BD]=নতুন উইন্ডো (N) +Name[bn_IN]=নতুন উইন্ডো +Name[br]=Prenestr nevez +Name[brx]=गोदान उइन्ड'(N) +Name[bs]=Novi prozor +Name[ca]=Finestra nova +Name[cak]=K'ak'a' tzuwäch +Name[cs]=Nové okno +Name[cy]=Ffenestr Newydd +Name[da]=Nyt vindue +Name[de]=Neues Fenster +Name[dsb]=Nowe wokno +Name[el]=Νέο παράθυρο +Name[en_GB]=New Window +Name[en_US]=New Window +Name[en_ZA]=New Window +Name[eo]=Nova fenestro +Name[es_AR]=Nueva ventana +Name[es_CL]=Nueva ventana +Name[es_ES]=Nueva ventana +Name[es_MX]=Nueva ventana +Name[et]=Uus aken +Name[eu]=Leiho berria +Name[fa]=پنجره جدید +Name[ff]=Henorde Hesere +Name[fi]=Uusi ikkuna +Name[fr]=Nouvelle fenêtre +Name[fy_NL]=Nij finster +Name[ga_IE]=Fuinneog Nua +Name[gd]=Uinneag ùr +Name[gl]=Nova xanela +Name[gn]=Ovetã pyahu +Name[gu_IN]=નવી વિન્ડો +Name[he]=חלון חדש +Name[hi_IN]=नया विंडो +Name[hr]=Novi prozor +Name[hsb]=Nowe wokno +Name[hu]=Új ablak +Name[hy_AM]=Նոր Պատուհան +Name[id]=Jendela Baru +Name[is]=Nýr gluggi +Name[it]=Nuova finestra Name[ja]=新しいウィンドウ -Name[kk]=Жаңа терезені ашу -Name[kn]=ಹೊಸ ವಿಂಡೊವನ್ನು ತೆರೆ -Name[ko]=새 창 열기 -Name[lij]=Àrvi nêuvo barcón -Name[lt]=Atverti naują langą -Name[mai]=नई विंडो खोलू -Name[mk]=Отвори нов прозорец -Name[ml]=പുതിയ ജാലകം തുറക്കുക -Name[mr]=नवीन पटल उघडा -Name[ms]=Buka tetingkap baru -Name[nb_NO]=Åpne nytt vindu -Name[nl]=Een nieuw venster openen -Name[nn_NO]=Opna nytt vindauge -Name[or]=ନୂତନ ୱିଣ୍ଡୋ ଖୋଲନ୍ତୁ -Name[pa_IN]=ਨਵੀਂ ਵਿੰਡੋ ਖੋਲ੍ਹੋ -Name[pl]=Otwórz nowe okno +Name[ja_JP-mac]=新規ウインドウ +Name[ka]=ახალი ფანჯარა +Name[kk]=Жаңа терезе +Name[km]=បង្អួចថ្មី +Name[kn]=ಹೊಸ ಕಿಟಕಿ +Name[ko]=새 창 +Name[kok]=नवें जनेल +Name[ks]=نئئ وِنڈو +Name[lij]=Neuvo barcon +Name[lo]=ຫນ້າຕ່າງໃຫມ່ +Name[lt]=Naujas langas +Name[ltg]=Jauns lūgs +Name[lv]=Jauns logs +Name[mai]=नव विंडो +Name[mk]=Нов прозорец +Name[ml]=പുതിയ ജാലകം +Name[mr]=नवीन पटल +Name[ms]=Tetingkap Baru +Name[my]=ဝင်းဒိုးအသစ် +Name[nb_NO]=Nytt vindu +Name[ne_NP]=नयाँ सञ्झ्याल +Name[nl]=Nieuw venster +Name[nn_NO]=Nytt vindauge +Name[or]=ନୂତନ ୱିଣ୍ଡୋ +Name[pa_IN]=ਨਵੀਂ ਵਿੰਡੋ +Name[pl]=Nowe okno Name[pt_BR]=Nova janela -Name[pt_PT]=Abrir nova janela -Name[rm]=Avrir ina nova fanestra -Name[ro]=Deschide o nouă fereastră -Name[ru]=Открыть новое окно -Name[si]=නව කවුළුවක් විවෘත කරන්න -Name[sk]=Otvoriť nové okno -Name[sl]=Odpri novo okno -Name[son]=Zanfun taaga feeri -Name[sq]=Hap dritare të re -Name[sr]=Отвори нови прозор -Name[sv_SE]=Öppna nytt fönster -Name[ta]=புதிய சாளரத்தை திற -Name[te]=కొత్త విండో తెరువుము -Name[th]=เปิดหน้าต่างใหม่ -Name[tr]=Yeni pencere aç -Name[uk]=Відкрити нове вікно -Name[uz]=Yangi oyna ochish -Name[vi]=Mở cửa sổ mới -Name[xh]=Vula iwindow entsha -Name[zh_CN]=打开新窗口 -Name[zh_TW]=開啟新視窗 -Exec=firefox -new-window +Name[pt_PT]=Nova janela +Name[rm]=Nova fanestra +Name[ro]=Fereastră nouă +Name[ru]=Новое окно +Name[sat]=नावा विंडो (N) +Name[si]=නව කවුළුවක් +Name[sk]=Nové okno +Name[sl]=Novo okno +Name[son]=Zanfun taaga +Name[sq]=Dritare e Re +Name[sr]=Нови прозор +Name[sv_SE]=Nytt fönster +Name[ta]=புதிய சாளரம் +Name[te]=కొత్త విండో +Name[th]=หน้าต่างใหม่ +Name[tr]=Yeni pencere +Name[tsz]=Eraatarakua jimpani +Name[uk]=Нове вікно +Name[ur]=نیا دریچہ +Name[uz]=Yangi oyna +Name[vi]=Cửa sổ mới +Name[wo]=Palanteer bu bees +Name[xh]=Ifestile entsha +Name[zh_CN]=新建窗口 +Name[zh_TW]=開新視窗 +Exec=/usr/lib/firefox/firefox --new-window %u -[Desktop Action NewPrivateWindow] -Name=New private window +[Desktop Action new-private-window] +Name=New Private Window Name[ach]=Dirica manyen me mung Name[af]=Nuwe privaatvenster -Name[an]=Nueva finestra de navegación privada +Name[an]=Nueva finestra privada Name[ar]=نافذة خاصة جديدة Name[as]=নতুন ব্যক্তিগত উইন্ডো Name[ast]=Ventana privada nueva -Name[az]=Yeni məxfi pəncərə +Name[az]=Yeni Məxfi Pəncərə Name[be]=Новае акно адасаблення Name[bg]=Нов прозорец за поверително сърфиране Name[bn_BD]=নতুন ব্যক্তিগত উইন্ডো -Name[bn_IN]=নতুন ব্যাক্তিগত উইন্ডো +Name[bn_IN]=নতুন ব্যক্তিগত উইন্ডো Name[br]=Prenestr merdeiñ prevez nevez +Name[brx]=गोदान प्राइभेट उइन्ड' Name[bs]=Novi privatni prozor Name[ca]=Finestra privada nova +Name[cak]=K'ak'a' ichinan tzuwäch Name[cs]=Nové anonymní okno -Name[cy]=Ffenestr breifat newydd +Name[cy]=Ffenestr Breifat Newydd Name[da]=Nyt privat vindue -Name[de]=Neues privates Fenster öffnen +Name[de]=Neues privates Fenster Name[dsb]=Nowe priwatne wokno Name[el]=Νέο παράθυρο ιδιωτικής περιήγησης +Name[en_GB]=New Private Window +Name[en_US]=New Private Window +Name[en_ZA]=New Private Window Name[eo]=Nova privata fenestro Name[es_AR]=Nueva ventana privada Name[es_CL]=Nueva ventana privada @@ -293,60 +236,76 @@ Name[es_ES]=Nueva ventana privada Name[es_MX]=Nueva ventana privada Name[et]=Uus privaatne aken Name[eu]=Leiho pribatu berria -Name[ff]=Henorde suturo hesere +Name[fa]=پنجره ناشناس جدید +Name[ff]=Henorde Suturo Hesere Name[fi]=Uusi yksityinen ikkuna Name[fr]=Nouvelle fenêtre de navigation privée Name[fy_NL]=Nij priveefinster -Name[ga_IE]=Fuinneog nua phríobháideach +Name[ga_IE]=Fuinneog Nua Phríobháideach Name[gd]=Uinneag phrìobhaideach ùr Name[gl]=Nova xanela privada +Name[gn]=Ovetã ñemi pyahu Name[gu_IN]=નવી ખાનગી વિન્ડો Name[he]=חלון פרטי חדש -Name[hi_IN]=नया निजी विंडो +Name[hi_IN]=नयी निजी विंडो Name[hr]=Novi privatni prozor Name[hsb]=Nowe priwatne wokno Name[hu]=Új privát ablak -Name[hy_AM]=Գաղտնի դիտարկում -Name[id]=Jendela mode pribadi baru -Name[is]=Nýr einkagluggi +Name[hy_AM]=Սկսել Գաղտնի դիտարկում +Name[id]=Jendela Mode Pribadi Baru +Name[is]=Nýr huliðsgluggi Name[it]=Nuova finestra anonima Name[ja]=新しいプライベートウィンドウ +Name[ja_JP-mac]=新規プライベートウインドウ +Name[ka]=ახალი პირადი ფანჯარა Name[kk]=Жаңа жекелік терезе +Name[km]=បង្អួចឯកជនថ្មី Name[kn]=ಹೊಸ ಖಾಸಗಿ ಕಿಟಕಿ -Name[ko]=새 사생활 보호 창 +Name[ko]=새 사생활 보호 모드 +Name[kok]=नवो खाजगी विंडो +Name[ks]=نْو پرایوٹ وینڈو Name[lij]=Nêuvo barcón privòu -Name[lt]=Atverti privačiojo naršymo langą -Name[mai]=नव निज विंडो -Name[mk]=Нов прозорец за приватно сурфање +Name[lo]=ເປີດຫນ້າຕ່າງສວນຕົວຂື້ນມາໃຫມ່ +Name[lt]=Naujas privataus naršymo langas +Name[ltg]=Jauns privatais lūgs +Name[lv]=Jauns privātais logs +Name[mai]=नया निज विंडो (W) +Name[mk]=Нов приватен прозорец Name[ml]=പുതിയ സ്വകാര്യ ജാലകം Name[mr]=नवीन वैयक्तिक पटल -Name[ms]=Tetingkap peribadi baharu +Name[ms]=Tetingkap Persendirian Baharu +Name[my]=New Private Window Name[nb_NO]=Nytt privat vindu +Name[ne_NP]=नयाँ निजी सञ्झ्याल Name[nl]=Nieuw privévenster Name[nn_NO]=Nytt privat vindauge Name[or]=ନୂତନ ବ୍ୟକ୍ତିଗତ ୱିଣ୍ଡୋ Name[pa_IN]=ਨਵੀਂ ਪ੍ਰਾਈਵੇਟ ਵਿੰਡੋ -Name[pl]=Nowe okno w trybie prywatnym +Name[pl]=Nowe okno prywatne Name[pt_BR]=Nova janela privativa Name[pt_PT]=Nova janela privada Name[rm]=Nova fanestra privata -Name[ro]=Fereastră fără urme nouă +Name[ro]=Fereastră privată nouă Name[ru]=Новое приватное окно -Name[si]=නව පුද්ගලික කවුළුව +Name[sat]=नावा निजेराक् विंडो (W ) +Name[si]=නව පුද්ගලික කවුළුව (W) Name[sk]=Nové okno v režime Súkromné prehliadanie Name[sl]=Novo zasebno okno Name[son]=Sutura zanfun taaga -Name[sq]=Dritare e re private -Name[sr]=Нови приватни прозор +Name[sq]=Dritare e Re Private +Name[sr]=Нови приватан прозор Name[sv_SE]=Nytt privat fönster Name[ta]=புதிய தனிப்பட்ட சாளரம் Name[te]=కొత్త ఆంతరంగిక విండో -Name[th]=หน้าต่างท่องเว็บแบบส่วนตัวใหม่ +Name[th]=หน้าต่างส่วนตัวใหม่ Name[tr]=Yeni gizli pencere -Name[uk]=Нове приватне вікно -Name[uz]=Yangi shaxsiy oyna +Name[tsz]=Juchiiti eraatarakua jimpani +Name[uk]=Приватне вікно +Name[ur]=نیا نجی دریچہ +Name[uz]=Yangi maxfiy oyna Name[vi]=Cửa sổ riêng tư mới +Name[wo]=Panlanteeru biir bu bees Name[xh]=Ifestile yangasese entsha Name[zh_CN]=新建隐私浏览窗口 Name[zh_TW]=新增隱私視窗 -Exec=firefox -private-window +Exec=/usr/lib/firefox/firefox --private-window %u diff --git a/mozconfig b/mozconfig deleted file mode 100644 index 48e5e9881b76..000000000000 --- a/mozconfig +++ /dev/null @@ -1,31 +0,0 @@ -. $topsrcdir/browser/config/mozconfig - -ac_add_options --prefix=/usr -ac_add_options --enable-release -ac_add_options --enable-gold -ac_add_options --enable-pie - -ac_add_options --enable-official-branding - -# System libraries -ac_add_options --with-system-nspr -ac_add_options --with-system-nss -ac_add_options --with-system-icu -ac_add_options --with-system-jpeg -ac_add_options --with-system-zlib -ac_add_options --with-system-bz2 -ac_add_options --with-system-libevent -ac_add_options --with-system-libvpx -ac_add_options --enable-system-hunspell -ac_add_options --enable-system-sqlite -ac_add_options --enable-system-ffi -ac_add_options --enable-system-pixman - -# Features -ac_add_options --enable-startup-notification -ac_add_options --disable-updater -ac_add_options --disable-crashreporter - -STRIP_FLAGS="--strip-debug" - -# vim:set ft=sh: diff --git a/mozilla-1245076-1.patch b/mozilla-1245076-1.patch deleted file mode 100644 index dfc52c2cf7c4..000000000000 --- a/mozilla-1245076-1.patch +++ /dev/null @@ -1,49 +0,0 @@ -diff --git a/config/gcc-stl-wrapper.template.h b/config/gcc-stl-wrapper.template.h ---- a/config/gcc-stl-wrapper.template.h -+++ b/config/gcc-stl-wrapper.template.h -@@ -12,33 +12,39 @@ - // compiling ObjC. - #if defined(__EXCEPTIONS) && __EXCEPTIONS && !(__OBJC__ && __GNUC__ && XP_IOS) - # error "STL code can only be used with -fno-exceptions" - #endif - - // Silence "warning: #include_next is a GCC extension" - #pragma GCC system_header - -+#ifndef moz_dont_include_mozalloc_for_cstdlib -+# define moz_dont_include_mozalloc_for_cstdlib -+#endif -+#ifndef moz_dont_include_mozalloc_for_${HEADER} - // mozalloc.h wants <new>; break the cycle by always explicitly - // including <new> here. NB: this is a tad sneaky. Sez the gcc docs: - // - // `#include_next' does not distinguish between <file> and "file" - // inclusion, nor does it check that the file you specify has the - // same name as the current file. It simply looks for the file - // named, starting with the directory in the search path after the - // one where the current file was found. --#include_next <new> -+# include_next <new> - - // See if we're in code that can use mozalloc. NB: this duplicates - // code in nscore.h because nscore.h pulls in prtypes.h, and chromium - // can't build with that being included before base/basictypes.h. --#if !defined(XPCOM_GLUE) && !defined(NS_NO_XPCOM) && !defined(MOZ_NO_MOZALLOC) --# include "mozilla/mozalloc.h" --#else --# error "STL code can only be used with infallible ::operator new()" -+# if !defined(XPCOM_GLUE) && !defined(NS_NO_XPCOM) && !defined(MOZ_NO_MOZALLOC) -+# include "mozilla/mozalloc.h" -+# else -+# error "STL code can only be used with infallible ::operator new()" -+# endif -+ - #endif - - #if defined(DEBUG) && !defined(_GLIBCXX_DEBUG) - // Enable checked iterators and other goodies - // - // FIXME/bug 551254: gcc's debug STL implementation requires -frtti. - // Figure out how to resolve this with -fno-rtti. Maybe build with - // -frtti in DEBUG builds? - diff --git a/mozilla-1245076.patch b/mozilla-1245076.patch deleted file mode 100644 index c3f06f19aae2..000000000000 --- a/mozilla-1245076.patch +++ /dev/null @@ -1,23 +0,0 @@ -diff --git a/gfx/graphite2/src/Collider.cpp b/gfx/graphite2/src/Collider.cpp ---- a/gfx/graphite2/src/Collider.cpp -+++ b/gfx/graphite2/src/Collider.cpp -@@ -21,17 +21,17 @@ - - Alternatively, the contents of this file may be used under the terms of the - Mozilla Public License (http://mozilla.org/MPL) or the GNU General Public - License, as published by the Free Software Foundation, either version 2 - of the License or (at your option) any later version. - */ - #include <algorithm> - #include <limits> --#include <math.h> -+#include <cmath> - #include <string> - #include <functional> - #include "inc/Collider.h" - #include "inc/Segment.h" - #include "inc/Slot.h" - #include "inc/GlyphCache.h" - #include "inc/Sparse.h" - - diff --git a/no-crmf.diff b/no-crmf.diff new file mode 100644 index 000000000000..682ba3fc0fd2 --- /dev/null +++ b/no-crmf.diff @@ -0,0 +1,15 @@ +diff --git i/old-configure.in w/old-configure.in +index 12170a47568f..dbbaa0bc9194 100644 +--- i/old-configure.in ++++ w/old-configure.in +@@ -1808,9 +1808,7 @@ if test -n "$_USE_SYSTEM_NSS"; then + AM_PATH_NSS(3.35, [MOZ_SYSTEM_NSS=1], [AC_MSG_ERROR([you don't have NSS installed or your version is too old])]) + fi + +-if test -n "$MOZ_SYSTEM_NSS"; then +- NSS_LIBS="$NSS_LIBS -lcrmf" +-else ++if test -z "$MOZ_SYSTEM_NSS"; then + NSS_CFLAGS="-I${DIST}/include/nss" + case "${OS_ARCH}" in + # Only few platforms have been tested with GYP diff --git a/no-libnotify.patch b/no-libnotify.patch deleted file mode 100644 index 8d584574364d..000000000000 --- a/no-libnotify.patch +++ /dev/null @@ -1,51 +0,0 @@ -diff --git i/toolkit/system/gnome/moz.build w/toolkit/system/gnome/moz.build -index 0ecde07..206d6eb 100644 ---- i/toolkit/system/gnome/moz.build -+++ w/toolkit/system/gnome/moz.build -@@ -5,9 +5,7 @@ - # file, You can obtain one at http://mozilla.org/MPL/2.0/. - - SOURCES += [ -- 'nsAlertsIconListener.cpp', - 'nsGnomeModule.cpp', -- 'nsSystemAlertsService.cpp', - ] - - if CONFIG['MOZ_ENABLE_GCONF']: -diff --git i/toolkit/system/gnome/nsGnomeModule.cpp w/toolkit/system/gnome/nsGnomeModule.cpp -index 6ecebcc..2f193a3 100644 ---- i/toolkit/system/gnome/nsGnomeModule.cpp -+++ w/toolkit/system/gnome/nsGnomeModule.cpp -@@ -20,8 +20,6 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsGIOService) - NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsGSettingsService, Init) - NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsPackageKitService, Init) - #endif --#include "nsSystemAlertsService.h" --NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsSystemAlertsService, Init) - - #ifdef MOZ_ENABLE_GCONF - NS_DEFINE_NAMED_CID(NS_GCONFSERVICE_CID); -@@ -31,7 +29,6 @@ NS_DEFINE_NAMED_CID(NS_GIOSERVICE_CID); - NS_DEFINE_NAMED_CID(NS_GSETTINGSSERVICE_CID); - NS_DEFINE_NAMED_CID(NS_PACKAGEKITSERVICE_CID); - #endif --NS_DEFINE_NAMED_CID(NS_SYSTEMALERTSSERVICE_CID); - - static const mozilla::Module::CIDEntry kGnomeCIDs[] = { - #ifdef MOZ_ENABLE_GCONF -@@ -42,7 +39,6 @@ static const mozilla::Module::CIDEntry kGnomeCIDs[] = { - { &kNS_GSETTINGSSERVICE_CID, false, nullptr, nsGSettingsServiceConstructor }, - { &kNS_PACKAGEKITSERVICE_CID, false, nullptr, nsPackageKitServiceConstructor }, - #endif -- { &kNS_SYSTEMALERTSSERVICE_CID, false, nullptr, nsSystemAlertsServiceConstructor }, - { nullptr } - }; - -@@ -55,7 +51,6 @@ static const mozilla::Module::ContractIDEntry kGnomeContracts[] = { - { NS_GSETTINGSSERVICE_CONTRACTID, &kNS_GSETTINGSSERVICE_CID }, - { NS_PACKAGEKITSERVICE_CONTRACTID, &kNS_PACKAGEKITSERVICE_CID }, - #endif -- { NS_SYSTEMALERTSERVICE_CONTRACTID, &kNS_SYSTEMALERTSSERVICE_CID }, - { nullptr } - }; - diff --git a/upload-symbol-archive b/upload-symbol-archive new file mode 100755 index 000000000000..5b61750d2e9d --- /dev/null +++ b/upload-symbol-archive @@ -0,0 +1,24 @@ +#!/bin/bash -e + +die() { + echo >&2 "$@" + exit 1 +} + +(( $# >= 2 )) || die "Usage: $0 TOKEN-FILE SYMBOL-ARCHIVE..." +token="$1" +shift + +[[ -f $token && -s $token ]] || die "Invalid TOKEN-FILE ${token@Q}" + +for zip; do + [[ $(file -Ebi "$zip") == application/zip* ]] || die "Invalid SYMBOL-ARCHIVE ${zip@Q}" +done + +for zip; do + echo >&2 "Uploading ${zip@Q} ..." + curl -X POST -H "Auth-Token: $(<"$token")" -F "${zip##*/}=@$zip" \ + --retry 4 --retry-connrefused --connect-timeout 120 \ + https://symbols.mozilla.org/upload/ + echo +done diff --git a/vendor.js b/vendor.js deleted file mode 100644 index d8d606bc15d7..000000000000 --- a/vendor.js +++ /dev/null @@ -1,9 +0,0 @@ -// Use LANG environment variable to choose locale -pref("intl.locale.matchOS", true); - -// Disable default browser checking. -pref("browser.shell.checkDefaultBrowser", false); - -// Don't disable our bundled extensions in the application directory -pref("extensions.autoDisableScopes", 11); -pref("extensions.shownSelectionUI", true); |