summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjörn Bidar2018-10-23 02:45:39 +0200
committerBjörn Bidar2018-10-23 19:12:46 +0200
commitbb5397c04d431f0ba2af3cd2b8637704ee66f11f (patch)
treed5797ceb0db81cec8b75dab6df32bae0bf99836a
parent690b60295a8c5023ad1f90805a93c691119fb1b4 (diff)
downloadaur-bb5397c04d431f0ba2af3cd2b8637704ee66f11f.tar.gz
upkg
- update unity-menubar.patch from ubuntu - update firefox-kde patches from OpenSuse - add Node.js to makedepends (see https://bugzilla.mozilla.org/1471028 for details) - add cbindgen to makedepends - update system graphite2 patch-set for 63.0 - update system harfbuzz patch-set for 63.0 - remove gentoo firefox patch archive - remove old python2 workaround for webrtc - remove old libpng workaround for tab loading icon - remove unneeded setting of LDFLAGS in build() (sync with arch)
-rw-r--r--.SRCINFO34
-rw-r--r--2000_system_harfbuzz_support.patch249
-rw-r--r--2001_system_graphite2_support.patch225
-rw-r--r--PKGBUILD63
-rw-r--r--firefox-fixed-loading-icon.pngbin12184 -> 0 bytes
-rw-r--r--unity-menubar.patch592
6 files changed, 589 insertions, 574 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 5f35057378e7..ee29f0a7b91a 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,9 +1,9 @@
# Generated by mksrcinfo v8
-# Sun Oct 7 02:55:29 UTC 2018
+# Tue Oct 23 03:26:56 UTC 2018
pkgbase = firefox-kde-opensuse
pkgdesc = Standalone web browser from mozilla.org with OpenSUSE patch, integrate better with KDE
- pkgver = 62.0.3
- pkgrel = 2
+ pkgver = 63.0
+ pkgrel = 1
url = https://build.opensuse.org/package/show/mozilla:Factory/MozillaFirefox
arch = i686
arch = x86_64
@@ -27,6 +27,8 @@ pkgbase = firefox-kde-opensuse
makedepends = llvm
makedepends = clang
makedepends = gtk2
+ makedepends = nodejs
+ makedepends = cbindgen
makedepends = gcc7
depends = mozilla-common
depends = libxt
@@ -47,39 +49,39 @@ pkgbase = firefox-kde-opensuse
depends = gtk3
optdepends = networkmanager: Location detection via available WiFi networks
optdepends = speech-dispatcher: Text-to-Speech
- provides = firefox=62.0.3
+ provides = firefox=63.0
conflicts = firefox
options = !emptydirs
options = debug
options = strip
- source = hg+https://hg.mozilla.org/mozilla-unified#tag=FIREFOX_62_0_3_RELEASE
+ source = hg+https://hg.mozilla.org/mozilla-unified#tag=FIREFOX_63_0_BUILD2
source = mozconfig
source = firefox.desktop
source = vendor.js
source = kde.js
- source = firefox-fixed-loading-icon.png
- source = firefox-branded-icons-18f97bd2c2bf.patch::http://www.rosenauer.org/hg/mozilla/raw-file/18f97bd2c2bf/firefox-branded-icons.patch
- source = firefox-kde-18f97bd2c2bf.patch::http://www.rosenauer.org/hg/mozilla/raw-file/18f97bd2c2bf/firefox-kde.patch
- source = mozilla-kde-18f97bd2c2bf.patch::http://www.rosenauer.org/hg/mozilla/raw-file/18f97bd2c2bf/mozilla-kde.patch
- source = mozilla-nongnome-proxies-18f97bd2c2bf.patch::http://www.rosenauer.org/hg/mozilla/raw-file/18f97bd2c2bf/mozilla-nongnome-proxies.patch
+ source = firefox-branded-icons-4b99400f6d17.patch::http://www.rosenauer.org/hg/mozilla/raw-file/4b99400f6d17/firefox-branded-icons.patch
+ source = firefox-kde-4b99400f6d17.patch::http://www.rosenauer.org/hg/mozilla/raw-file/4b99400f6d17/firefox-kde.patch
+ source = mozilla-kde-4b99400f6d17.patch::http://www.rosenauer.org/hg/mozilla/raw-file/4b99400f6d17/mozilla-kde.patch
+ source = mozilla-nongnome-proxies-4b99400f6d17.patch::http://www.rosenauer.org/hg/mozilla/raw-file/4b99400f6d17/mozilla-nongnome-proxies.patch
source = unity-menubar.patch
source = add_missing_pgo_rule.patch
source = pgo_fix_missing_kdejs.patch
- source = https://dev.gentoo.org/~anarchy/mozilla/patchsets/firefox-62.0-patches-01.tar.xz
+ source = 2001_system_graphite2_support.patch
+ source = 2000_system_harfbuzz_support.patch
md5sums = SKIP
md5sums = 49c2d3dc354e18ab12c8c4e6f7d68d6b
md5sums = 14e0f6237a79b85e60256f4808163160
md5sums = 5cee310a9040ccc5abcf29742b84aeb8
md5sums = 05bb69d25fb3572c618e3adf1ee7b670
- md5sums = 6e335a517c68488941340ee1c23f97b0
md5sums = d7ce23a18da21c05cd756766e177834f
- md5sums = 35a4fac33f4f3abd0d059e7ee9858617
- md5sums = 008ee1ff02326a12879ec8856864971e
+ md5sums = c3ecdeebb20d59753c6081d2d469900a
+ md5sums = a21ba1d5b1ed9dc4c7b497f53d50626a
md5sums = 0661e259fe57df87fca791f4aeb78da0
- md5sums = 379c447c7d7c9988738737f92abaf5ee
+ md5sums = e2164985cd64b6267041a64eda90c272
md5sums = fe24f5ea463013bb7f1c12d12dce41b2
md5sums = 3fa8bd22d97248de529780f5797178af
- md5sums = 9f098bf9bf478a36ba00694bb7722fc2
+ md5sums = f31a90ed4c0b0c15346ea5098765771f
+ md5sums = a85ca9c88f49184c8b0feae206f0ba0c
pkgname = firefox-kde-opensuse
diff --git a/2000_system_harfbuzz_support.patch b/2000_system_harfbuzz_support.patch
new file mode 100644
index 000000000000..a9a5e967f2c5
--- /dev/null
+++ b/2000_system_harfbuzz_support.patch
@@ -0,0 +1,249 @@
+From: Jan Beich <jbeich@FreeBSD.org>
+
+Add ability to use system-harfbuzz instead of bundled.
+
+https://bugzilla.mozilla.org/show_bug.cgi?id=847568
+
+diff --git a/config/system-headers.mozbuild b/config/system-headers.mozbuild
+--- a/config/system-headers.mozbuild
++++ b/config/system-headers.mozbuild
+@@ -1228,16 +1228,23 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'andr
+ 'utils/TypeHelpers.h',
+ 'utils/Unicode.h',
+ 'utils/Vector.h',
+ 'utils/VectorImpl.h',
+ 'vr/gvr/capi/include/gvr_controller.h',
+ 'vr/gvr/capi/include/gvr.h',
+ ]
+
++if CONFIG['MOZ_SYSTEM_HARFBUZZ']:
++ system_headers += [
++ 'harfbuzz/hb-glib.h',
++ 'harfbuzz/hb-ot.h',
++ 'harfbuzz/hb.h',
++ ]
++
+ if CONFIG['MOZ_JACK']:
+ system_headers += [
+ 'jack/jack.h',
+ 'jack/statistics.h',
+ ]
+
+ if CONFIG['MOZ_SYSTEM_JPEG']:
+ system_headers += [
+diff --git a/dom/base/moz.build b/dom/base/moz.build
+--- a/dom/base/moz.build
++++ b/dom/base/moz.build
+@@ -477,16 +477,19 @@ include('/ipc/chromium/chromium-config.m
+ FINAL_LIBRARY = 'xul'
+
+ if CONFIG['MOZ_BUILD_APP'] in ['browser', 'mobile/android', 'xulrunner']:
+ DEFINES['HAVE_SIDEBAR'] = True
+
+ if CONFIG['MOZ_X11']:
+ CXXFLAGS += CONFIG['TK_CFLAGS']
+
++if CONFIG['MOZ_SYSTEM_HARFBUZZ']:
++ CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS']
++
+ GENERATED_FILES += [
+ 'PropertyUseCounterMap.inc',
+ 'UseCounterList.h',
+ ]
+
+ countermap = GENERATED_FILES['PropertyUseCounterMap.inc']
+ countermap.script = 'gen-usecounters.py:property_map'
+ countermap.inputs = ['UseCounters.conf']
+diff --git a/gfx/harfbuzz/README-mozilla b/gfx/harfbuzz/README-mozilla
+--- a/gfx/harfbuzz/README-mozilla
++++ b/gfx/harfbuzz/README-mozilla
+@@ -15,3 +15,8 @@
+
+ If the collection of source files changes, manual updates to moz.build may be
+ needed as we don't use the upstream makefiles.
++
++The in-tree copy may be omitted during build by --with-system-harfbuzz.
++Make sure to keep pkg-config version check within toolkit/moz.configure in sync
++with checkout version or increment latest tag by one if it's not based
++on upstream release.
+
+diff --git a/gfx/moz.build b/gfx/moz.build
+--- a/gfx/moz.build
++++ b/gfx/moz.build
+@@ -5,26 +5,28 @@
+ # file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+ with Files('**'):
+ BUG_COMPONENT = ('Core', 'Graphics')
+
+ if CONFIG['MOZ_TREE_CAIRO']:
+ DIRS += ['cairo']
+
++if not CONFIG['MOZ_SYSTEM_HARFBUZZ']:
++ DIRS += ['harfbuzz/src']
++
+ DIRS += [
+ '2d',
+ 'ycbcr',
+ 'angle',
+ 'src',
+ 'qcms',
+ 'gl',
+ 'layers',
+ 'graphite2/src',
+- 'harfbuzz/src',
+ 'ots/src',
+ 'thebes',
+ 'ipc',
+ 'vr',
+ 'config',
+ 'webrender_bindings',
+ ]
+
+diff --git a/gfx/skia/generate_mozbuild.py b/gfx/skia/generate_mozbuild.py
+--- a/gfx/skia/generate_mozbuild.py
++++ b/gfx/skia/generate_mozbuild.py
+@@ -143,16 +143,19 @@ if CONFIG['CC_TYPE'] == 'gcc':
+ if CONFIG['CC_TYPE'] in ('clang', 'clang-cl'):
+ CXXFLAGS += [
+ '-Wno-implicit-fallthrough',
+ '-Wno-inconsistent-missing-override',
+ '-Wno-macro-redefined',
+ '-Wno-unused-private-field',
+ ]
+
++if CONFIG['MOZ_SYSTEM_HARFBUZZ']:
++ CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS']
++
+ if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk3', 'android'):
+ CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS']
+ CXXFLAGS += CONFIG['CAIRO_FT_CFLAGS']
+
+ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gtk3':
+ CXXFLAGS += CONFIG['MOZ_PANGO_CFLAGS']
+
+ if CONFIG['MOZ_ENABLE_SKIA_PDF_SFNTLY']:
+diff --git a/gfx/skia/moz.build b/gfx/skia/moz.build
+--- a/gfx/skia/moz.build
++++ b/gfx/skia/moz.build
+@@ -817,16 +817,19 @@ if CONFIG['CC_TYPE'] == 'gcc':
+ if CONFIG['CC_TYPE'] in ('clang', 'clang-cl'):
+ CXXFLAGS += [
+ '-Wno-implicit-fallthrough',
+ '-Wno-inconsistent-missing-override',
+ '-Wno-macro-redefined',
+ '-Wno-unused-private-field',
+ ]
+
++if CONFIG['MOZ_SYSTEM_HARFBUZZ']:
++ CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS']
++
+ if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk3', 'android'):
+ CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS']
+ CXXFLAGS += CONFIG['CAIRO_FT_CFLAGS']
+
+ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gtk3':
+ CXXFLAGS += CONFIG['MOZ_PANGO_CFLAGS']
+
+ if CONFIG['MOZ_ENABLE_SKIA_PDF_SFNTLY']:
+diff --git a/gfx/thebes/moz.build b/gfx/thebes/moz.build
+--- a/gfx/thebes/moz.build
++++ b/gfx/thebes/moz.build
+@@ -290,6 +290,9 @@
+
+ DEFINES['GRAPHITE2_STATIC'] = True
+
++if CONFIG['MOZ_SYSTEM_HARFBUZZ']:
++ CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS']
++
+ if CONFIG['CC_TYPE'] == 'clang':
+ # Suppress warnings from Skia header files.
+ SOURCES['gfxPlatform.cpp'].flags += ['-Wno-implicit-fallthrough']
+diff --git a/intl/unicharutil/util/moz.build b/intl/unicharutil/util/moz.build
+--- a/intl/unicharutil/util/moz.build
++++ b/intl/unicharutil/util/moz.build
+@@ -20,9 +20,12 @@ UNIFIED_SOURCES += [
+ 'ICUUtils.cpp',
+ 'IrishCasing.cpp',
+ 'nsBidiUtils.cpp',
+ 'nsSpecialCasingData.cpp',
+ 'nsUnicharUtils.cpp',
+ 'nsUnicodeProperties.cpp',
+ ]
+
++if CONFIG['MOZ_SYSTEM_HARFBUZZ']:
++ CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS']
++
+ FINAL_LIBRARY = 'xul'
+diff --git a/netwerk/dns/moz.build b/netwerk/dns/moz.build
+--- a/netwerk/dns/moz.build
++++ b/netwerk/dns/moz.build
+@@ -67,12 +67,15 @@ etld_data = GENERATED_FILES['etld_data.i
+ etld_data.script = 'prepare_tlds.py'
+ etld_data.inputs = ['effective_tld_names.dat']
+
+ # need to include etld_data.inc
+ LOCAL_INCLUDES += [
+ '/netwerk/base',
+ ]
+
++if CONFIG['MOZ_SYSTEM_HARFBUZZ']:
++ CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS']
++
+ USE_LIBS += ['icu']
+
+ if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
+ CXXFLAGS += ['-Wno-error=shadow']
+diff --git a/toolkit/library/moz.build b/toolkit/library/moz.build
+--- a/toolkit/library/moz.build
++++ b/toolkit/library/moz.build
+@@ -233,16 +233,19 @@ if CONFIG['SERVO_TARGET_DIR']:
+ OS_LIBS += ['-L%s' % CONFIG['SERVO_TARGET_DIR'], '-lgeckoservo']
+
+ if CONFIG['MOZ_SYSTEM_JPEG']:
+ OS_LIBS += CONFIG['MOZ_JPEG_LIBS']
+
+ if CONFIG['MOZ_SYSTEM_PNG']:
+ OS_LIBS += CONFIG['MOZ_PNG_LIBS']
+
++if CONFIG['MOZ_SYSTEM_HARFBUZZ']:
++ OS_LIBS += CONFIG['MOZ_HARFBUZZ_LIBS']
++
+ if CONFIG['MOZ_SYSTEM_LIBEVENT']:
+ OS_LIBS += CONFIG['MOZ_LIBEVENT_LIBS']
+
+ if CONFIG['MOZ_SYSTEM_LIBVPX']:
+ OS_LIBS += CONFIG['MOZ_LIBVPX_LIBS']
+
+ if not CONFIG['MOZ_TREE_PIXMAN']:
+ OS_LIBS += CONFIG['MOZ_PIXMAN_LIBS']
+diff --git a/toolkit/moz.configure b/toolkit/moz.configure
+--- a/toolkit/moz.configure
++++ b/toolkit/moz.configure
+@@ -331,16 +331,26 @@ def freetype2_combined_info(fontconfig_i
+ return namespace(
+ cflags=freetype2_info.cflags + fontconfig_info.cflags,
+ libs=freetype2_info.libs + fontconfig_info.libs,
+ )
+
+ add_old_configure_assignment('_HAVE_FREETYPE2',
+ depends_if(freetype2_info)(lambda _: True))
+
++# HarfBuzz
++# ==============================================================
++option('--with-system-harfbuzz',
++ help="Use system harfbuzz (located with pkgconfig)")
++
++system_harfbuzz = pkg_check_modules('MOZ_HARFBUZZ', 'harfbuzz >= 1.4.2',
++ when='--with-system-harfbuzz')
++
++set_config('MOZ_SYSTEM_HARFBUZZ', depends_if(system_harfbuzz)(lambda _: True))
++
+ # Apple platform decoder support
+ # ==============================================================
+ @depends(toolkit)
+ def applemedia(toolkit):
+ if toolkit in ('cocoa', 'uikit'):
+ return True
+
+ set_config('MOZ_APPLEMEDIA', applemedia)
diff --git a/2001_system_graphite2_support.patch b/2001_system_graphite2_support.patch
new file mode 100644
index 000000000000..e37cafea7bbf
--- /dev/null
+++ b/2001_system_graphite2_support.patch
@@ -0,0 +1,225 @@
+From: Jan Beich <jbeich@FreeBSD.org>
+
+Allow building against system-wide graphite2.
+
+https://bugzilla.mozilla.org/show_bug.cgi?id=847568
+
+diff --git a/config/system-headers.mozbuild b/config/system-headers.mozbuild
+--- a/config/system-headers.mozbuild
++++ b/config/system-headers.mozbuild
+@@ -1235,16 +1235,22 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'andr
+
+ if CONFIG['MOZ_SYSTEM_HARFBUZZ']:
+ system_headers += [
+ 'harfbuzz/hb-glib.h',
+ 'harfbuzz/hb-ot.h',
+ 'harfbuzz/hb.h',
+ ]
+
++if CONFIG['MOZ_SYSTEM_GRAPHITE2']:
++ system_headers += [
++ 'graphite2/Font.h',
++ 'graphite2/Segment.h',
++ ]
++
+ if CONFIG['MOZ_JACK']:
+ system_headers += [
+ 'jack/jack.h',
+ 'jack/statistics.h',
+ ]
+
+ if CONFIG['MOZ_SYSTEM_JPEG']:
+ system_headers += [
+diff --git a/gfx/graphite2/moz-gr-update.sh b/gfx/graphite2/moz-gr-update.sh
+--- a/gfx/graphite2/moz-gr-update.sh
++++ b/gfx/graphite2/moz-gr-update.sh
+@@ -1,11 +1,12 @@
+ #!/bin/bash
+
+ # Script used to update the Graphite2 library in the mozilla source tree
++# and bump version for --with-system-graphite2
+
+ # This script lives in gfx/graphite2, along with the library source,
+ # but must be run from the top level of the mozilla-central tree.
+
+ # Run as
+ #
+ # ./gfx/graphite2/moz-gr-update.sh RELEASE
+ #
+@@ -32,22 +33,26 @@ echo "This directory contains the Graphi
+ echo "$TARBALL" >> gfx/graphite2/README.mozilla
+ echo ""
+ echo "See" $0 "for update procedure." >> gfx/graphite2/README.mozilla
+
+ # fix up includes because of bug 721839 (cstdio) and bug 803066 (Windows.h)
+ #find gfx/graphite2/ -name "*.cpp" -exec perl -p -i -e "s/<cstdio>/<stdio.h>/;s/Windows.h/windows.h/;" {} \;
+ #find gfx/graphite2/ -name "*.h" -exec perl -p -i -e "s/<cstdio>/<stdio.h>/;s/Windows.h/windows.h/;" {} \;
+
++# chase version for --with-system-graphite2
++perl -p -i -e "s/[0-9]+\,[0-9]+\,[0-9]+/$RELEASE/ and tr/./,/ \
++ if /GR2_VERSION_REQUIRE/" old-configure.in
++
+ # summarize what's been touched
+ echo Updated to $RELEASE.
+ echo Here is what changed in the gfx/graphite2 directory:
+ echo
+
+-hg stat gfx/graphite2
++hg stat old-configure.in gfx/graphite2
+
+ echo
+ echo If gfx/graphite2/src/files.mk has changed, please make corresponding
+ echo changes to gfx/graphite2/src/moz.build
+ echo
+
+ echo
+ echo Now use hg commands to create a patch for the mozilla tree.
+diff --git a/gfx/moz.build b/gfx/moz.build
+--- a/gfx/moz.build
++++ b/gfx/moz.build
+@@ -5,28 +5,30 @@
+ # file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+ with Files('**'):
+ BUG_COMPONENT = ('Core', 'Graphics')
+
+ if CONFIG['MOZ_TREE_CAIRO']:
+ DIRS += ['cairo']
+
++if not CONFIG['MOZ_SYSTEM_GRAPHITE2']:
++ DIRS += ['graphite2/src' ]
++
+ if not CONFIG['MOZ_SYSTEM_HARFBUZZ']:
+ DIRS += ['harfbuzz/src']
+
+ DIRS += [
+ '2d',
+ 'ycbcr',
+ 'angle',
+ 'src',
+ 'qcms',
+ 'gl',
+ 'layers',
+- 'graphite2/src',
+ 'ots/src',
+ 'thebes',
+ 'ipc',
+ 'vr',
+ 'config',
+ 'webrender_bindings',
+ ]
+
+diff --git a/gfx/thebes/moz.build b/gfx/thebes/moz.build
+--- a/gfx/thebes/moz.build
++++ b/gfx/thebes/moz.build
+@@ -288,7 +288,10 @@
+
+ LOCAL_INCLUDES += CONFIG['SKIA_INCLUDES']
+
+-DEFINES['GRAPHITE2_STATIC'] = True
++if CONFIG['MOZ_SYSTEM_GRAPHITE2']:
++ CXXFLAGS += CONFIG['MOZ_GRAPHITE2_CFLAGS']
++else:
++ DEFINES['GRAPHITE2_STATIC'] = True
+
+ if CONFIG['CC_TYPE'] == 'clang':
+ # Suppress warnings from Skia header files.
+
+diff --git a/old-configure.in b/old-configure.in
+--- a/old-configure.in
++++ b/old-configure.in
+@@ -3857,16 +3857,37 @@ if test "$USE_FC_FREETYPE"; then
+ CPPFLAGS="$CPPFLAGS $FT2_CFLAGS $XCFLAGS"
+ MOZ_CHECK_HEADERS([fontconfig/fcfreetype.h], ,
+ [AC_MSG_ERROR(Can't find header fontconfig/fcfreetype.h.)], [#include <fontconfig/fontconfig.h>])
+ CPPFLAGS="$_SAVE_CPPFLAGS"
+ fi
+ fi
+
+ dnl ========================================================
++dnl Check for graphite2
++dnl ========================================================
++if test -n "$MOZ_SYSTEM_GRAPHITE2"; then
++ dnl graphite2.pc has bogus version, check manually
++ _SAVE_CFLAGS=$CFLAGS
++ CFLAGS="$CFLAGS $MOZ_GRAPHITE2_CFLAGS"
++ AC_TRY_COMPILE([ #include <graphite2/Font.h>
++ #define GR2_VERSION_REQUIRE(major,minor,bugfix) \
++ ( GR2_VERSION_MAJOR * 10000 + GR2_VERSION_MINOR \
++ * 100 + GR2_VERSION_BUGFIX >= \
++ (major) * 10000 + (minor) * 100 + (bugfix) )
++ ], [
++ #if !GR2_VERSION_REQUIRE(1,3,8)
++ #error "Insufficient graphite2 version."
++ #endif
++ ], [],
++ [AC_MSG_ERROR([--with-system-graphite2 requested but no working libgraphite2 found])])
++ CFLAGS=$_SAVE_CFLAGS
++fi
++
++dnl ========================================================
+ dnl Check if we need the 32-bit Linux SSE2 error dialog
+ dnl ========================================================
+
+ AC_SUBST(MOZ_LINUX_32_SSE2_STARTUP_ERROR)
+
+ dnl ========================================================
+ dnl Check for pixman and cairo
+ dnl ========================================================
+diff --git a/toolkit/library/moz.build b/toolkit/library/moz.build
+--- a/toolkit/library/moz.build
++++ b/toolkit/library/moz.build
+@@ -236,16 +236,19 @@ if CONFIG['MOZ_SYSTEM_JPEG']:
+ OS_LIBS += CONFIG['MOZ_JPEG_LIBS']
+
+ if CONFIG['MOZ_SYSTEM_PNG']:
+ OS_LIBS += CONFIG['MOZ_PNG_LIBS']
+
+ if CONFIG['MOZ_SYSTEM_HARFBUZZ']:
+ OS_LIBS += CONFIG['MOZ_HARFBUZZ_LIBS']
+
++if CONFIG['MOZ_SYSTEM_GRAPHITE2']:
++ OS_LIBS += CONFIG['MOZ_GRAPHITE2_LIBS']
++
+ if CONFIG['MOZ_SYSTEM_LIBEVENT']:
+ OS_LIBS += CONFIG['MOZ_LIBEVENT_LIBS']
+
+ if CONFIG['MOZ_SYSTEM_LIBVPX']:
+ OS_LIBS += CONFIG['MOZ_LIBVPX_LIBS']
+
+ if not CONFIG['MOZ_TREE_PIXMAN']:
+ OS_LIBS += CONFIG['MOZ_PIXMAN_LIBS']
+diff --git a/toolkit/moz.configure b/toolkit/moz.configure
+--- a/toolkit/moz.configure
++++ b/toolkit/moz.configure
+@@ -331,16 +331,30 @@ def freetype2_combined_info(fontconfig_i
+ return namespace(
+ cflags=freetype2_info.cflags + fontconfig_info.cflags,
+ libs=freetype2_info.libs + fontconfig_info.libs,
+ )
+
+ add_old_configure_assignment('_HAVE_FREETYPE2',
+ depends_if(freetype2_info)(lambda _: True))
+
++# Graphite2
++# ==============================================================
++option('--with-system-graphite2',
++ help="Use system graphite2 (located with pkgconfig)")
++
++@depends('--with-system-graphite2')
++def check_for_graphite2(value):
++ return bool(value)
++
++system_graphite2 = pkg_check_modules('MOZ_GRAPHITE2', 'graphite2',
++ when=check_for_graphite2)
++
++set_config('MOZ_SYSTEM_GRAPHITE2', depends_if(system_graphite2)(lambda _: True))
++
+ # HarfBuzz
+ # ==============================================================
+ option('--with-system-harfbuzz',
+ help="Use system harfbuzz (located with pkgconfig)")
+
+ system_harfbuzz = pkg_check_modules('MOZ_HARFBUZZ', 'harfbuzz >= 1.4.2',
+ when='--with-system-harfbuzz')
+
diff --git a/PKGBUILD b/PKGBUILD
index c6db59425283..fb38f7cacc1f 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -9,7 +9,7 @@
_gtk3_wayland=false
# try to build with PGO
-# currently broken
+# currently needs gcc7
_pgo=true
# globalmenu
@@ -20,8 +20,8 @@ _pgo=true
_pkgname=firefox
pkgname=$_pkgname-kde-opensuse
-pkgver=62.0.3
-pkgrel=2
+pkgver=63.0
+pkgrel=1
pkgdesc="Standalone web browser from mozilla.org with OpenSUSE patch, integrate better with KDE"
arch=('i686' 'x86_64')
license=('MPL' 'GPL' 'LGPL')
@@ -34,7 +34,7 @@ depends=('mozilla-common' 'libxt' 'startup-notification' 'mime-types'
makedepends=('unzip' 'zip' 'diffutils' 'python' 'yasm' 'mesa' 'imake'
'xorg-server-xvfb' 'libpulse' 'inetutils' 'autoconf2.13' 'rust'
'cargo' 'mercurial' 'llvm' 'clang'
- 'gtk2')
+ 'gtk2' 'nodejs' 'cbindgen')
if [[ -n $_pgo ]] ; then
makedepends+=('gcc7')
fi
@@ -42,16 +42,15 @@ optdepends=('networkmanager: Location detection via available WiFi networks'
'speech-dispatcher: Text-to-Speech')
provides=("firefox=${pkgver}")
conflicts=('firefox')
-_patchrev=18f97bd2c2bf
+_patchrev=4b99400f6d17
options=('!emptydirs' 'debug' 'strip')
_patchurl=http://www.rosenauer.org/hg/mozilla/raw-file/$_patchrev
-_repo=https://hg.mozilla.org/mozilla-unified
-source=("hg+$_repo#tag=FIREFOX_${pkgver//./_}_RELEASE"
+_repo=https://hg.mozilla.org/mozilla-unified #_RELEASE
+source=("hg+$_repo#tag=FIREFOX_${pkgver//./_}_BUILD2"
mozconfig
firefox.desktop
vendor.js
kde.js
- firefox-fixed-loading-icon.png
# Firefox patchset
firefox-branded-icons-$_patchrev.patch::$_patchurl/firefox-branded-icons.patch
firefox-kde-$_patchrev.patch::$_patchurl/firefox-kde.patch
@@ -61,7 +60,8 @@ source=("hg+$_repo#tag=FIREFOX_${pkgver//./_}_RELEASE"
unity-menubar.patch
add_missing_pgo_rule.patch
pgo_fix_missing_kdejs.patch
- https://dev.gentoo.org/~anarchy/mozilla/patchsets/firefox-62.0-patches-01.tar.xz
+ 2001_system_graphite2_support.patch
+ 2000_system_harfbuzz_support.patch
)
@@ -91,8 +91,6 @@ prepare() {
>> .mozconfig
fi
-
-
echo -n "$_google_api_key" >google-api-key
echo "ac_add_options --with-google-api-keyfile=\"$PWD/google-api-key\"" >>.mozconfig
@@ -118,43 +116,14 @@ prepare() {
# add missing file Makefile for pgo builds
patch -Np1 -i "$srcdir"/pgo_fix_missing_kdejs.patch
- # https://bugzilla.mozilla.org/show_bug.cgi?id=1435212
- #patch -Np1 -i ../0001-Bug-1435212-Add-support-for-FFmpeg-4.0.-r-bryce.patch
-
- # gentoo patches
- for file in "$srcdir"/firefox/*.patch ; do
- case $file in
- *gentoo*) : ;;
- *ffmpeg*) : ;;
- *)
- patch -Np1 -i "$file"
- ;;
- esac
- done
-
- # WebRTC build tries to execute "python" and expects Python 2
- mkdir -p "$srcdir/path"
- ln -sf /usr/bin/python2 "$srcdir/path/python"
-
- # Fix tab loading icon (flickers with libpng 1.6)
- # https://bugzilla.mozilla.org/show_bug.cgi?id=841734
- # TODO: Remove this; Firefox 34 might use CSS animations for the loading icon
- # https://bugzilla.mozilla.org/show_bug.cgi?id=759252
- cp "$srcdir/firefox-fixed-loading-icon.png" \
- browser/themes/linux/tabbrowser/loading.png
-
+ patch -Np1 -i "$srcdir"/2000_system_harfbuzz_support.patch
+ patch -Np1 -i "$srcdir"/2001_system_graphite2_support.patch
}
build() {
#export CXXFLAGS="${CFLAGS}"
cd mozilla-unified
export MOZ_SOURCE_REPO="$_repo"
-
-
- # Hardening
- LDFLAGS+=" -Wl,-z,now"
-
-
if [[ -n $_lowmem || $CARCH == i686 ]]; then
LDFLAGS+=" -Xlinker --no-keep-memory"
@@ -237,12 +206,12 @@ md5sums=('SKIP'
'14e0f6237a79b85e60256f4808163160'
'5cee310a9040ccc5abcf29742b84aeb8'
'05bb69d25fb3572c618e3adf1ee7b670'
- '6e335a517c68488941340ee1c23f97b0'
'd7ce23a18da21c05cd756766e177834f'
- '35a4fac33f4f3abd0d059e7ee9858617'
- '008ee1ff02326a12879ec8856864971e'
+ 'c3ecdeebb20d59753c6081d2d469900a'
+ 'a21ba1d5b1ed9dc4c7b497f53d50626a'
'0661e259fe57df87fca791f4aeb78da0'
- '379c447c7d7c9988738737f92abaf5ee'
+ 'e2164985cd64b6267041a64eda90c272'
'fe24f5ea463013bb7f1c12d12dce41b2'
'3fa8bd22d97248de529780f5797178af'
- '9f098bf9bf478a36ba00694bb7722fc2')
+ 'f31a90ed4c0b0c15346ea5098765771f'
+ 'a85ca9c88f49184c8b0feae206f0ba0c')
diff --git a/firefox-fixed-loading-icon.png b/firefox-fixed-loading-icon.png
deleted file mode 100644
index 55f25e591ff5..000000000000
--- a/firefox-fixed-loading-icon.png
+++ /dev/null
Binary files differ
diff --git a/unity-menubar.patch b/unity-menubar.patch
index 915433fa17c6..77b3f0ee0990 100644
--- a/unity-menubar.patch
+++ b/unity-menubar.patch
@@ -1,11 +1,6 @@
-diff --git a/browser/base/content/browser-menubar.inc b/browser/base/content/browser-menubar.inc
--- a/browser/base/content/browser-menubar.inc
+++ b/browser/base/content/browser-menubar.inc
-@@ -1,16 +1,20 @@
- # -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- # This Source Code Form is subject to the terms of the Mozilla Public
- # License, v. 2.0. If a copy of the MPL was not distributed with this
- # file, You can obtain one at http://mozilla.org/MPL/2.0/.
+@@ -5,7 +5,11 @@
<menubar id="main-menubar"
onpopupshowing="if (event.target.parentNode.parentNode == this &amp;&amp;
@@ -17,22 +12,11 @@ diff --git a/browser/base/content/browser-menubar.inc b/browser/base/content/bro
this.setAttribute('openedwithkey',
event.target.parentNode.openedWithKey);">
<menu id="file-menu" label="&fileMenu.label;"
- accesskey="&fileMenu.accesskey;">
- <menupopup id="menu_FilePopup"
- onpopupshowing="updateFileMenuUserContextUIVisibility('menu_newUserContext');">
- <menuitem id="menu_newNavigatorTab"
- label="&tabCmd.label;"
-diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
-@@ -5701,21 +5701,27 @@ function onViewToolbarsPopupShowing(aEve
- if (deadItem.hasAttribute("toolbarId"))
- popup.removeChild(deadItem);
- }
-
- var firstMenuItem = aInsertPoint || popup.firstChild;
+@@ -5620,11 +5620,17 @@ function onViewToolbarsPopupShowing(aEve
- let toolbarNodes = gNavToolbox.childNodes;
+ let toolbarNodes = gNavToolbox.children;
+ let shellShowingMenubar = document.documentElement.getAttribute("shellshowingmenubar") == "true";
+
@@ -45,23 +29,12 @@ diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js
+ continue;
+ }
+
- let menuItem = document.createElement("menuitem");
+ let menuItem = document.createXULElement("menuitem");
let hidingAttribute = toolbar.getAttribute("type") == "menubar" ?
"autohide" : "collapsed";
- menuItem.setAttribute("id", "toggle_" + toolbar.id);
- menuItem.setAttribute("toolbarId", toolbar.id);
- menuItem.setAttribute("type", "checkbox");
- menuItem.setAttribute("label", toolbar.getAttribute("toolbarname"));
- menuItem.setAttribute("checked", toolbar.getAttribute(hidingAttribute) != "true");
-diff --git a/browser/components/places/content/places.xul b/browser/components/places/content/places.xul
--- a/browser/components/places/content/places.xul
+++ b/browser/components/places/content/places.xul
-@@ -181,17 +181,17 @@
- command="OrganizerCommand:Forward"
- tooltiptext="&forwardButton.tooltip;"
- disabled="true"/>
-
- #ifdef XP_MACOSX
+@@ -170,7 +170,7 @@
<toolbarbutton type="menu" class="tabbable"
onpopupshowing="document.getElementById('placeContent').focus()"
#else
@@ -70,41 +43,9 @@ diff --git a/browser/components/places/content/places.xul b/browser/components/p
<menu accesskey="&organize.accesskey;" class="menu-iconic"
#endif
id="organizeButton" label="&organize.label;"
- tooltiptext="&organize.tooltip;">
- <menupopup id="organizeButtonPopup">
- <menuitem id="newbookmark"
- command="placesCmd_new:bookmark"
- label="&cmd.new_bookmark.label;"
-diff --git a/dom/xul/XULPopupElement.cpp b/dom/xul/XULPopupElement.cpp
--- a/dom/xul/XULPopupElement.cpp
+++ b/dom/xul/XULPopupElement.cpp
-@@ -14,16 +14,20 @@
- #include "nsView.h"
- #include "mozilla/AppUnits.h"
- #include "mozilla/dom/DOMRect.h"
- #include "mozilla/dom/Element.h"
- #include "mozilla/dom/Event.h"
- #include "mozilla/dom/XULPopupElement.h"
- #include "mozilla/dom/XULPopupElementBinding.h"
-
-+#ifdef MOZ_WIDGET_GTK
-+#include "nsNativeMenuAtoms.h"
-+#endif
-+
- namespace mozilla {
- namespace dom {
-
- nsXULElement*
- NS_NewXULPopupElement(already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo)
- {
- return new XULPopupElement(aNodeInfo);
- }
-@@ -189,16 +193,20 @@ XULPopupElement::SetAutoPosition(bool aS
- }
-
- void
- XULPopupElement::GetState(nsString& aState)
- {
+@@ -193,6 +193,10 @@ XULPopupElement::GetState(nsString& aSta
// set this here in case there's no frame for the popup
aState.AssignLiteral("closed");
@@ -115,42 +56,21 @@ diff --git a/dom/xul/XULPopupElement.cpp b/dom/xul/XULPopupElement.cpp
nsMenuPopupFrame *menuPopupFrame = do_QueryFrame(GetPrimaryFrame());
if (menuPopupFrame) {
switch (menuPopupFrame->PopupState()) {
- case ePopupShown:
- aState.AssignLiteral("open");
- break;
- case ePopupShowing:
- case ePopupPositioning:
-@@ -212,16 +220,21 @@ XULPopupElement::GetState(nsString& aSta
- break;
- case ePopupClosed:
- break;
- default:
- NS_NOTREACHED("Bad popup state");
+@@ -216,6 +220,11 @@ XULPopupElement::GetState(nsString& aSta
break;
}
}
+#ifdef MOZ_WIDGET_GTK
-+ else if (GetAttr(kNameSpaceID_None, nsNativeMenuAtoms::_moz_nativemenupopupstate, nativeState)) {
-+ aState = nativeState;
++ else if (GetAttr(kNameSpaceID_None, nsGkAtoms::_moz_nativemenupopupstate, nativeState)) {
++ aState = nativeState;
+ }
+#endif
}
nsINode*
- XULPopupElement::GetTriggerNode() const
- {
- nsMenuPopupFrame *menuPopupFrame = do_QueryFrame(GetPrimaryFrame());
- return nsMenuPopupFrame::GetTriggerContent(menuPopupFrame);
- }
-diff --git a/dom/xul/moz.build b/dom/xul/moz.build
--- a/dom/xul/moz.build
+++ b/dom/xul/moz.build
-@@ -59,12 +59,17 @@ LOCAL_INCLUDES += [
- '/dom/xbl',
- '/dom/xml',
- '/layout/base',
- '/layout/generic',
- '/layout/style',
+@@ -65,6 +65,11 @@ LOCAL_INCLUDES += [
'/layout/xul',
]
@@ -162,16 +82,9 @@ diff --git a/dom/xul/moz.build b/dom/xul/moz.build
FINAL_LIBRARY = 'xul'
if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
- CXXFLAGS += ['-Wno-error=shadow']
-diff --git a/layout/build/moz.build b/layout/build/moz.build
--- a/layout/build/moz.build
+++ b/layout/build/moz.build
-@@ -65,16 +65,20 @@ elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'co
- LOCAL_INCLUDES += [
- '/dom/system/mac',
- ]
- elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android':
- LOCAL_INCLUDES += [
+@@ -70,6 +70,10 @@ elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'an
'/dom/system',
'/dom/system/android',
]
@@ -182,64 +95,9 @@ diff --git a/layout/build/moz.build b/layout/build/moz.build
if CONFIG['MOZ_WEBSPEECH']:
LOCAL_INCLUDES += [
- '/dom/media/webspeech/recognition',
- '/dom/media/webspeech/synth',
- ]
-
- FINAL_LIBRARY = 'xul'
-diff --git a/layout/build/nsLayoutStatics.cpp b/layout/build/nsLayoutStatics.cpp
---- a/layout/build/nsLayoutStatics.cpp
-+++ b/layout/build/nsLayoutStatics.cpp
-@@ -108,16 +108,20 @@
- #include "mozilla/StaticPresData.h"
- #include "mozilla/dom/WebIDLGlobalNameHash.h"
- #include "mozilla/dom/ipc/IPCBlobInputStreamStorage.h"
- #include "mozilla/dom/U2FTokenManager.h"
- #include "mozilla/dom/PointerEventHandler.h"
- #include "mozilla/dom/BlobURLProtocolHandler.h"
- #include "nsThreadManager.h"
-
-+#ifdef MOZ_WIDGET_GTK
-+#include "nsNativeMenuAtoms.h"
-+#endif
-+
- using namespace mozilla;
- using namespace mozilla::net;
- using namespace mozilla::dom;
- using namespace mozilla::dom::ipc;
-
- nsrefcnt nsLayoutStatics::sLayoutStaticRefcnt = 0;
-
- nsresult
-@@ -136,16 +140,19 @@ nsLayoutStatics::Initialize()
-
- // Register static atoms. Note that nsGkAtoms must be initialized earlier
- // than here, so it's done in NS_InitAtomTable() instead.
- nsCSSAnonBoxes::RegisterStaticAtoms();
- nsCSSPseudoElements::RegisterStaticAtoms();
- nsCSSKeywords::AddRefTable();
- nsCSSProps::AddRefTable();
- nsColorNames::AddRefTable();
-+#ifdef MOZ_WIDGET_GTK
-+ nsNativeMenuAtoms::RegisterAtoms();
-+#endif
-
- NS_SetStaticAtomsDone();
-
- StartupJSEnvironment();
- nsJSContext::EnsureStatics();
-
- nsGlobalWindowInner::Init();
- nsGlobalWindowOuter::Init();
-diff --git a/modules/libpref/init/all.js b/modules/libpref/init/all.js
--- a/modules/libpref/init/all.js
+++ b/modules/libpref/init/all.js
-@@ -262,16 +262,19 @@ pref("dom.script_loader.bytecode_cache.s
- pref("dom.script_loader.binast_encoding.enabled", false);
- #endif
-
- // Fastback caching - if this pref is negative, then we calculate the number
- // of content viewers to cache based on the amount of available memory.
+@@ -280,6 +280,9 @@ pref("dom.window.event.enabled", false);
pref("browser.sessionhistory.max_total_viewers", -1);
pref("ui.use_native_colors", true);
@@ -249,20 +107,9 @@ diff --git a/modules/libpref/init/all.js b/modules/libpref/init/all.js
pref("ui.click_hold_context_menus", false);
// Pop up context menu on mouseup instead of mousedown, if that's the OS default.
- // Note: ignored on Windows (context menus always use mouseup)
- pref("ui.context_menus.after_mouseup", false);
- // Duration of timeout of incremental search in menus (ms). 0 means infinite.
- pref("ui.menu.incremental_search.timeout", 1000);
- // If true, all popups won't hide automatically on blur
-diff --git a/toolkit/content/xul.css b/toolkit/content/xul.css
--- a/toolkit/content/xul.css
+++ b/toolkit/content/xul.css
-@@ -297,16 +297,28 @@ toolbar[type="menubar"][autohide="true"]
- toolbar[type="menubar"][autohide="true"][inactive="true"]:not([customizing="true"]) {
- min-height: 0 !important;
- height: 0 !important;
- -moz-appearance: none !important;
- border-style: none !important;
+@@ -287,6 +287,18 @@ toolbar[type="menubar"][autohide="true"]
}
%endif
@@ -281,16 +128,9 @@ diff --git a/toolkit/content/xul.css b/toolkit/content/xul.css
toolbarspring {
-moz-box-flex: 1000;
}
-
- /********* menu ***********/
-
- menubar > menu {
- -moz-binding: url("chrome://global/content/bindings/menu.xml#menu-menubar");
-diff --git a/widget/gtk/moz.build b/widget/gtk/moz.build
-index d0edc29..a2fec84 100644
--- a/widget/gtk/moz.build
+++ b/widget/gtk/moz.build
-@@ -39,10 +39,18 @@ UNIFIED_SOURCES += [
+@@ -39,10 +39,17 @@ UNIFIED_SOURCES += [
'nsAppShell.cpp',
'nsBidiKeyboard.cpp',
'nsColorPicker.cpp',
@@ -304,30 +144,27 @@ index d0edc29..a2fec84 100644
+ 'nsMenuItem.cpp',
+ 'nsMenuObject.cpp',
+ 'nsMenuSeparator.cpp',
-+ 'nsNativeMenuAtoms.cpp',
+ 'nsNativeMenuDocListener.cpp',
'nsNativeThemeGTK.cpp',
'nsSound.cpp',
'nsToolkit.cpp',
-@@ -55,6 +63,8 @@ UNIFIED_SOURCES += [
+@@ -55,6 +62,8 @@ UNIFIED_SOURCES += [
]
-
+
SOURCES += [
+ 'nsMenu.cpp', # conflicts with X11 headers
+ 'nsNativeMenuService.cpp',
'nsWindow.cpp', # conflicts with X11 headers
]
-
-@@ -125,6 +135,7 @@ FINAL_LIBRARY = 'xul'
-
+
+@@ -126,6 +135,7 @@ FINAL_LIBRARY = 'xul'
LOCAL_INCLUDES += [
+ '/layout/base',
'/layout/generic',
+ '/layout/style',
'/layout/xul',
'/other-licenses/atk-1.0',
- '/toolkit/xre',
-diff --git a/widget/gtk/nsDbusmenu.cpp b/widget/gtk/nsDbusmenu.cpp
-new file mode 100644
+ '/widget',
--- /dev/null
+++ b/widget/gtk/nsDbusmenu.cpp
@@ -0,0 +1,63 @@
@@ -394,8 +231,6 @@ new file mode 100644
+
+ return NS_OK;
+}
-diff --git a/widget/gtk/nsDbusmenu.h b/widget/gtk/nsDbusmenu.h
-new file mode 100644
--- /dev/null
+++ b/widget/gtk/nsDbusmenu.h
@@ -0,0 +1,101 @@
@@ -500,11 +335,9 @@ new file mode 100644
+#define dbusmenu_menuitem_property_set_shortcut nsDbusmenuFunctions::s_dbusmenu_menuitem_property_set_shortcut
+
+#endif /* __nsDbusmenu_h__ */
-diff --git a/widget/gtk/nsMenu.cpp b/widget/gtk/nsMenu.cpp
-new file mode 100644
--- /dev/null
+++ b/widget/gtk/nsMenu.cpp
-@@ -0,0 +1,849 @@
+@@ -0,0 +1,848 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* vim:expandtab:shiftwidth=4:tabstop=4:
+ */
@@ -541,7 +374,6 @@ new file mode 100644
+#include "nsXBLBinding.h"
+#include "nsXBLService.h"
+
-+#include "nsNativeMenuAtoms.h"
+#include "nsNativeMenuDocListener.h"
+
+#include <glib-object.h>
@@ -690,11 +522,11 @@ new file mode 100644
+
+ if (state.IsEmpty()) {
+ mPopupContent->AsElement()->UnsetAttr(
-+ kNameSpaceID_None, nsNativeMenuAtoms::_moz_nativemenupopupstate,
++ kNameSpaceID_None, nsGkAtoms::_moz_nativemenupopupstate,
+ false);
+ } else {
+ mPopupContent->AsElement()->SetAttr(
-+ kNameSpaceID_None, nsNativeMenuAtoms::_moz_nativemenupopupstate,
++ kNameSpaceID_None, nsGkAtoms::_moz_nativemenupopupstate,
+ state, false);
+ }
+}
@@ -1354,8 +1186,6 @@ new file mode 100644
+ true);
+}
+
-diff --git a/widget/gtk/nsMenu.h b/widget/gtk/nsMenu.h
-new file mode 100644
--- /dev/null
+++ b/widget/gtk/nsMenu.h
@@ -0,0 +1,123 @@
@@ -1482,11 +1312,9 @@ new file mode 100644
+};
+
+#endif /* __nsMenu_h__ */
-diff --git a/widget/gtk/nsMenuBar.cpp b/widget/gtk/nsMenuBar.cpp
-new file mode 100644
--- /dev/null
+++ b/widget/gtk/nsMenuBar.cpp
-@@ -0,0 +1,551 @@
+@@ -0,0 +1,550 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* vim:expandtab:shiftwidth=4:tabstop=4:
+ */
@@ -1512,7 +1340,6 @@ new file mode 100644
+#include "nsUnicharUtils.h"
+
+#include "nsMenu.h"
-+#include "nsNativeMenuAtoms.h"
+#include "nsNativeMenuService.h"
+
+#include <gdk/gdk.h>
@@ -1685,13 +1512,13 @@ new file mode 100644
+ mDocument = do_QueryInterface(ContentNode()->OwnerDoc());
+
+ mAccessKey = Preferences::GetInt("ui.key.menuAccessKey");
-+ if (mAccessKey == dom::KeyboardEventBinding::DOM_VK_SHIFT) {
++ if (mAccessKey == dom::KeyboardEvent_Binding::DOM_VK_SHIFT) {
+ mAccessKeyMask = eModifierShift;
-+ } else if (mAccessKey == dom::KeyboardEventBinding::DOM_VK_CONTROL) {
++ } else if (mAccessKey == dom::KeyboardEvent_Binding::DOM_VK_CONTROL) {
+ mAccessKeyMask = eModifierCtrl;
-+ } else if (mAccessKey == dom::KeyboardEventBinding::DOM_VK_ALT) {
++ } else if (mAccessKey == dom::KeyboardEvent_Binding::DOM_VK_ALT) {
+ mAccessKeyMask = eModifierAlt;
-+ } else if (mAccessKey == dom::KeyboardEventBinding::DOM_VK_META) {
++ } else if (mAccessKey == dom::KeyboardEvent_Binding::DOM_VK_META) {
+ mAccessKeyMask = eModifierMeta;
+ } else {
+ mAccessKeyMask = eModifierAlt;
@@ -1741,7 +1568,7 @@ new file mode 100644
+nsMenuBar::SetShellShowingMenuBar(bool aShowing)
+{
+ ContentNode()->OwnerDoc()->GetRootElement()->SetAttr(
-+ kNameSpaceID_None, nsNativeMenuAtoms::shellshowingmenubar,
++ kNameSpaceID_None, nsGkAtoms::shellshowingmenubar,
+ aShowing ? NS_LITERAL_STRING("true") : NS_LITERAL_STRING("false"),
+ true);
+}
@@ -1750,7 +1577,7 @@ new file mode 100644
+nsMenuBar::Focus()
+{
+ ContentNode()->AsElement()->SetAttr(kNameSpaceID_None,
-+ nsNativeMenuAtoms::openedwithkey,
++ nsGkAtoms::openedwithkey,
+ NS_LITERAL_STRING("false"), true);
+}
+
@@ -1828,7 +1655,7 @@ new file mode 100644
+ }
+
+ ContentNode()->AsElement()->SetAttr(kNameSpaceID_None,
-+ nsNativeMenuAtoms::openedwithkey,
++ nsGkAtoms::openedwithkey,
+ NS_LITERAL_STRING("true"), true);
+ static_cast<nsMenu *>(found)->OpenMenu();
+
@@ -2014,7 +1841,7 @@ new file mode 100644
+
+ // Clear this. Not sure if we really need to though
+ ContentNode()->AsElement()->SetAttr(kNameSpaceID_None,
-+ nsNativeMenuAtoms::openedwithkey,
++ nsGkAtoms::openedwithkey,
+ NS_LITERAL_STRING("false"), true);
+
+ DocListener()->Start();
@@ -2038,8 +1865,6 @@ new file mode 100644
+ DocListener()->Stop();
+ DisconnectDocumentEventListeners();
+}
-diff --git a/widget/gtk/nsMenuBar.h b/widget/gtk/nsMenuBar.h
-new file mode 100644
--- /dev/null
+++ b/widget/gtk/nsMenuBar.h
@@ -0,0 +1,111 @@
@@ -2154,8 +1979,6 @@ new file mode 100644
+};
+
+#endif /* __nsMenuBar_h__ */
-diff --git a/widget/gtk/nsMenuContainer.cpp b/widget/gtk/nsMenuContainer.cpp
-new file mode 100644
--- /dev/null
+++ b/widget/gtk/nsMenuContainer.cpp
@@ -0,0 +1,171 @@
@@ -2330,8 +2153,6 @@ new file mode 100644
+
+ return aContent;
+}
-diff --git a/widget/gtk/nsMenuContainer.h b/widget/gtk/nsMenuContainer.h
-new file mode 100644
--- /dev/null
+++ b/widget/gtk/nsMenuContainer.h
@@ -0,0 +1,70 @@
@@ -2405,8 +2226,6 @@ new file mode 100644
+};
+
+#endif /* __nsMenuContainer_h__ */
-diff --git a/widget/gtk/nsMenuItem.cpp b/widget/gtk/nsMenuItem.cpp
-new file mode 100644
--- /dev/null
+++ b/widget/gtk/nsMenuItem.cpp
@@ -0,0 +1,767 @@
@@ -2914,9 +2733,9 @@ new file mode 100644
+ modifier |= GDK_CONTROL_MASK;
+ } else if (nsCRT::strcmp(token, "accel") == 0) {
+ int32_t accel = Preferences::GetInt("ui.key.accelKey");
-+ if (accel == dom::KeyboardEventBinding::DOM_VK_META) {
++ if (accel == dom::KeyboardEvent_Binding::DOM_VK_META) {
+ modifier |= GDK_META_MASK;
-+ } else if (accel == dom::KeyboardEventBinding::DOM_VK_ALT) {
++ } else if (accel == dom::KeyboardEvent_Binding::DOM_VK_ALT) {
+ modifier |= GDK_MOD1_MASK;
+ } else {
+ modifier |= GDK_CONTROL_MASK;
@@ -3177,8 +2996,6 @@ new file mode 100644
+{
+ return eType_MenuItem;
+}
-diff --git a/widget/gtk/nsMenuItem.h b/widget/gtk/nsMenuItem.h
-new file mode 100644
--- /dev/null
+++ b/widget/gtk/nsMenuItem.h
@@ -0,0 +1,80 @@
@@ -3262,11 +3079,9 @@ new file mode 100644
+};
+
+#endif /* __nsMenuItem_h__ */
-diff --git a/widget/gtk/nsMenuObject.cpp b/widget/gtk/nsMenuObject.cpp
-new file mode 100644
--- /dev/null
+++ b/widget/gtk/nsMenuObject.cpp
-@@ -0,0 +1,664 @@
+@@ -0,0 +1,663 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* vim:expandtab:shiftwidth=4:tabstop=4:
+ */
@@ -3305,7 +3120,6 @@ new file mode 100644
+#include "nsUnicharUtils.h"
+
+#include "nsMenuContainer.h"
-+#include "nsNativeMenuAtoms.h"
+#include "nsNativeMenuDocListener.h"
+
+#include <gdk/gdk.h>
@@ -3804,7 +3618,7 @@ new file mode 100644
+ }
+
+ for (uint32_t i = 0; i < classes->GetAtomCount(); ++i) {
-+ if (classes->AtomAt(i) == nsNativeMenuAtoms::menuitem_with_favicon) {
++ if (classes->AtomAt(i) == nsGkAtoms::menuitem_with_favicon) {
+ return true;
+ }
+ }
@@ -3931,8 +3745,6 @@ new file mode 100644
+ weak = weak->mPrev;
+ }
+}
-diff --git a/widget/gtk/nsMenuObject.h b/widget/gtk/nsMenuObject.h
-new file mode 100644
--- /dev/null
+++ b/widget/gtk/nsMenuObject.h
@@ -0,0 +1,172 @@
@@ -4108,8 +3920,6 @@ new file mode 100644
+};
+
+#endif /* __nsMenuObject_h__ */
-diff --git a/widget/gtk/nsMenuSeparator.cpp b/widget/gtk/nsMenuSeparator.cpp
-new file mode 100644
--- /dev/null
+++ b/widget/gtk/nsMenuSeparator.cpp
@@ -0,0 +1,85 @@
@@ -4198,8 +4008,6 @@ new file mode 100644
+{
+ return eType_MenuItem;
+}
-diff --git a/widget/gtk/nsMenuSeparator.h b/widget/gtk/nsMenuSeparator.h
-new file mode 100644
--- /dev/null
+++ b/widget/gtk/nsMenuSeparator.h
@@ -0,0 +1,37 @@
@@ -4240,148 +4048,6 @@ new file mode 100644
+};
+
+#endif /* __nsMenuSeparator_h__ */
-diff --git a/widget/gtk/nsNativeMenuAtomList.h b/widget/gtk/nsNativeMenuAtomList.h
-new file mode 100644
---- /dev/null
-+++ b/widget/gtk/nsNativeMenuAtomList.h
-@@ -0,0 +1,12 @@
-+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-+/* vim:expandtab:shiftwidth=4:tabstop=4:
-+ */
-+/* This Source Code Form is subject to the terms of the Mozilla Public
-+ * License, v. 2.0. If a copy of the MPL was not distributed with this
-+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-+
-+WIDGET_ATOM2(menuitem_with_favicon, "menuitem-with-favicon")
-+WIDGET_ATOM2(_moz_menubarkeeplocal, "_moz-menubarkeeplocal")
-+WIDGET_ATOM2(_moz_nativemenupopupstate, "_moz-nativemenupopupstate")
-+WIDGET_ATOM(openedwithkey)
-+WIDGET_ATOM(shellshowingmenubar)
-diff --git a/widget/gtk/nsNativeMenuAtoms.cpp b/widget/gtk/nsNativeMenuAtoms.cpp
-new file mode 100644
---- /dev/null
-+++ b/widget/gtk/nsNativeMenuAtoms.cpp
-@@ -0,0 +1,52 @@
-+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-+/* vim:expandtab:shiftwidth=4:tabstop=4:
-+ */
-+/* This Source Code Form is subject to the terms of the Mozilla Public
-+ * License, v. 2.0. If a copy of the MPL was not distributed with this
-+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-+
-+#include "nsAtom.h"
-+#include "nsStaticAtom.h"
-+
-+#include "nsNativeMenuAtoms.h"
-+
-+
-+namespace mozilla {
-+namespace widget {
-+namespace detail {
-+
-+static constexpr NativeMenuAtoms gNativeMenuAtoms = {
-+ #define WIDGET_ATOM(name_) NS_STATIC_ATOM_INIT_STRING(#name_)
-+ #define WIDGET_ATOM2(name_, value_) NS_STATIC_ATOM_INIT_STRING(value_)
-+ #include "nsNativeMenuAtomList.h"
-+ #undef WIDGET_ATOM
-+ #undef WIDGET_ATOM2
-+
-+ {
-+ #define WIDGET_ATOM(name_) NS_STATIC_ATOM_INIT_ATOM(nsStaticAtom, NativeMenuAtoms, name_, #name_)
-+ #define WIDGET_ATOM2(name_, value_) NS_STATIC_ATOM_INIT_ATOM(nsStaticAtom, NativeMenuAtoms, name_, value_)
-+ #include "nsNativeMenuAtomList.h"
-+ #undef WIDGET_ATOM
-+ #undef WIDGET_ATOM2
-+ }
-+};
-+
-+}
-+}
-+}
-+
-+using namespace mozilla;
-+
-+const nsStaticAtom* const nsNativeMenuAtoms::sAtoms = widget::detail::gNativeMenuAtoms.mAtoms;
-+
-+#define WIDGET_ATOM(name_) NS_STATIC_ATOM_DEFN_PTR(nsStaticAtom, widget::detail::NativeMenuAtoms, widget::detail::gNativeMenuAtoms, nsNativeMenuAtoms, name_)
-+#define WIDGET_ATOM2(name_, value_) NS_STATIC_ATOM_DEFN_PTR(nsStaticAtom, widget::detail::NativeMenuAtoms, widget::detail::gNativeMenuAtoms, nsNativeMenuAtoms, name_)
-+#include "nsNativeMenuAtomList.h"
-+#undef WIDGET_ATOM
-+#undef WIDGET_ATOM2
-+
-+/* static */ void
-+nsNativeMenuAtoms::RegisterAtoms()
-+{
-+ NS_RegisterStaticAtoms(sAtoms, sAtomsLen);
-+}
-diff --git a/widget/gtk/nsNativeMenuAtoms.h b/widget/gtk/nsNativeMenuAtoms.h
-new file mode 100644
---- /dev/null
-+++ b/widget/gtk/nsNativeMenuAtoms.h
-@@ -0,0 +1,61 @@
-+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-+/* vim:expandtab:shiftwidth=4:tabstop=4:
-+ */
-+/* This Source Code Form is subject to the terms of the Mozilla Public
-+ * License, v. 2.0. If a copy of the MPL was not distributed with this
-+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-+
-+#ifndef __nsNativeMenuAtoms_h__
-+#define __nsNativeMenuAtoms_h__
-+
-+class nsAtom;
-+
-+namespace mozilla {
-+namespace widget {
-+namespace detail {
-+
-+struct NativeMenuAtoms
-+{
-+ #define WIDGET_ATOM(name_) NS_STATIC_ATOM_DECL_STRING(name_, #name_)
-+ #define WIDGET_ATOM2(name_, value_) NS_STATIC_ATOM_DECL_STRING(name_, value_)
-+ #include "nsNativeMenuAtomList.h"
-+ #undef WIDGET_ATOM
-+ #undef WIDGET_ATOM2
-+
-+ enum class Atoms {
-+ #define WIDGET_ATOM(name_) NS_STATIC_ATOM_ENUM(name_)
-+ #define WIDGET_ATOM2(name_, value_) NS_STATIC_ATOM_ENUM(name_)
-+ #include "nsNativeMenuAtomList.h"
-+ #undef WIDGET_ATOM
-+ #undef WIDGET_ATOM2
-+ AtomsCount
-+ };
-+
-+ const nsStaticAtom mAtoms[static_cast<size_t>(Atoms::AtomsCount)];
-+};
-+
-+}
-+}
-+}
-+
-+class nsNativeMenuAtoms
-+{
-+private:
-+ static const nsStaticAtom* const sAtoms;
-+
-+ static constexpr size_t sAtomsLen =
-+ static_cast<size_t>(mozilla::widget::detail::NativeMenuAtoms::Atoms::AtomsCount);
-+
-+public:
-+ nsNativeMenuAtoms() = delete;
-+
-+ static void RegisterAtoms();
-+
-+ #define WIDGET_ATOM(name_) NS_STATIC_ATOM_DECL_PTR(nsStaticAtom, name_)
-+ #define WIDGET_ATOM2(name_, value_) NS_STATIC_ATOM_DECL_PTR(nsStaticAtom, name_)
-+ #include "nsNativeMenuAtomList.h"
-+ #undef WIDGET_ATOM
-+ #undef WIDGET_ATOM2
-+};
-+
-+#endif /* __nsNativeMenuAtoms_h__ */
-diff --git a/widget/gtk/nsNativeMenuDocListener.cpp b/widget/gtk/nsNativeMenuDocListener.cpp
-new file mode 100644
--- /dev/null
+++ b/widget/gtk/nsNativeMenuDocListener.cpp
@@ -0,0 +1,350 @@
@@ -4618,7 +4284,7 @@ new file mode 100644
+ DoContentRemoved(m->mTarget, m->mChild);
+ break;
+ default:
-+ NS_NOTREACHED("Invalid type");
++ MOZ_ASSERT_UNREACHABLE("Invalid type");
+ }
+
+ mPendingMutations.RemoveElementAt(0);
@@ -4735,8 +4401,6 @@ new file mode 100644
+ CancelFlush(this);
+ mPendingMutations.Clear();
+}
-diff --git a/widget/gtk/nsNativeMenuDocListener.h b/widget/gtk/nsNativeMenuDocListener.h
-new file mode 100644
--- /dev/null
+++ b/widget/gtk/nsNativeMenuDocListener.h
@@ -0,0 +1,152 @@
@@ -4892,11 +4556,9 @@ new file mode 100644
+};
+
+#endif /* __nsNativeMenuDocListener_h__ */
-diff --git a/widget/gtk/nsNativeMenuService.cpp b/widget/gtk/nsNativeMenuService.cpp
-new file mode 100644
--- /dev/null
+++ b/widget/gtk/nsNativeMenuService.cpp
-@@ -0,0 +1,508 @@
+@@ -0,0 +1,507 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* vim:expandtab:shiftwidth=4:tabstop=4:
+ */
@@ -4920,7 +4582,6 @@ new file mode 100644
+
+#include "nsDbusmenu.h"
+#include "nsMenuBar.h"
-+#include "nsNativeMenuAtoms.h"
+#include "nsNativeMenuDocListener.h"
+
+#include <glib-object.h>
@@ -5335,7 +4996,7 @@ new file mode 100644
+ NS_ENSURE_ARG(aMenuBarNode);
+
+ if (aMenuBarNode->AttrValueIs(kNameSpaceID_None,
-+ nsNativeMenuAtoms::_moz_menubarkeeplocal,
++ nsGkAtoms::_moz_menubarkeeplocal,
+ nsGkAtoms::_true,
+ eCaseMatters)) {
+ return NS_OK;
@@ -5405,8 +5066,6 @@ new file mode 100644
+ g_object_unref(cancellable);
+ }
+}
-diff --git a/widget/gtk/nsNativeMenuService.h b/widget/gtk/nsNativeMenuService.h
-new file mode 100644
--- /dev/null
+++ b/widget/gtk/nsNativeMenuService.h
@@ -0,0 +1,84 @@
@@ -5494,15 +5153,9 @@ new file mode 100644
+};
+
+#endif /* __nsNativeMenuService_h__ */
-diff --git a/widget/gtk/nsWidgetFactory.cpp b/widget/gtk/nsWidgetFactory.cpp
--- a/widget/gtk/nsWidgetFactory.cpp
+++ b/widget/gtk/nsWidgetFactory.cpp
-@@ -44,16 +44,18 @@
- #include "nsImageToPixbuf.h"
- #include "nsPrintDialogGTK.h"
-
- #if defined(MOZ_X11)
- #include "nsIdleServiceGTK.h"
+@@ -49,6 +49,8 @@
#include "GfxInfoX11.h"
#endif
@@ -5511,17 +5164,7 @@ diff --git a/widget/gtk/nsWidgetFactory.cpp b/widget/gtk/nsWidgetFactory.cpp
#include "nsNativeThemeGTK.h"
#include "HeadlessThemeGTK.h"
- #include "nsIComponentRegistrar.h"
- #include "nsComponentManagerUtils.h"
- #include "mozilla/gfx/2D.h"
- #include "mozilla/widget/ScreenManager.h"
- #include <gtk/gtk.h>
-@@ -112,16 +114,19 @@ nsNativeThemeGTKConstructor(nsISupports
- namespace mozilla {
- namespace widget {
- // This constructor should really be shared with all platforms.
- NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(GfxInfo, Init)
- }
+@@ -116,6 +118,9 @@ NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(GfxI
}
#endif
@@ -5531,17 +5174,7 @@ diff --git a/widget/gtk/nsWidgetFactory.cpp b/widget/gtk/nsWidgetFactory.cpp
#ifdef NS_PRINTING
NS_GENERIC_FACTORY_CONSTRUCTOR(nsDeviceContextSpecGTK)
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsPrintSettingsServiceGTK, Init)
- NS_GENERIC_FACTORY_CONSTRUCTOR(nsPrinterEnumeratorGTK)
- NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsPrintSession, Init)
- NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsPrintDialogServiceGTK, Init)
- #endif
-
-@@ -225,16 +230,17 @@ NS_DEFINE_NAMED_CID(NS_PRINTSESSION_CID)
- NS_DEFINE_NAMED_CID(NS_DEVICE_CONTEXT_SPEC_CID);
- NS_DEFINE_NAMED_CID(NS_PRINTDIALOGSERVICE_CID);
- #endif
- NS_DEFINE_NAMED_CID(NS_IMAGE_TO_PIXBUF_CID);
- #if defined(MOZ_X11)
+@@ -227,6 +232,7 @@ NS_DEFINE_NAMED_CID(NS_IMAGE_TO_PIXBUF_C
NS_DEFINE_NAMED_CID(NS_IDLE_SERVICE_CID);
NS_DEFINE_NAMED_CID(NS_GFXINFO_CID);
#endif
@@ -5549,35 +5182,15 @@ diff --git a/widget/gtk/nsWidgetFactory.cpp b/widget/gtk/nsWidgetFactory.cpp
static const mozilla::Module::CIDEntry kWidgetCIDs[] = {
- { &kNS_WINDOW_CID, false, nullptr, nsWindowConstructor },
- { &kNS_CHILD_CID, false, nullptr, nsWindowConstructor },
- { &kNS_APPSHELL_CID, false, nullptr, nsAppShellConstructor, Module::ALLOW_IN_GPU_PROCESS },
- { &kNS_COLORPICKER_CID, false, nullptr, nsColorPickerConstructor, Module::MAIN_PROCESS_ONLY },
- { &kNS_FILEPICKER_CID, false, nullptr, nsFilePickerConstructor, Module::MAIN_PROCESS_ONLY },
-@@ -261,16 +267,17 @@ static const mozilla::Module::CIDEntry k
- { &kNS_DEVICE_CONTEXT_SPEC_CID, false, nullptr, nsDeviceContextSpecGTKConstructor },
- { &kNS_PRINTDIALOGSERVICE_CID, false, nullptr, nsPrintDialogServiceGTKConstructor },
- #endif
- { &kNS_IMAGE_TO_PIXBUF_CID, false, nullptr, nsImageToPixbufConstructor },
- #if defined(MOZ_X11)
+@@ -261,6 +267,7 @@ static const mozilla::Module::CIDEntry k
{ &kNS_IDLE_SERVICE_CID, false, nullptr, nsIdleServiceGTKConstructor },
{ &kNS_GFXINFO_CID, false, nullptr, mozilla::widget::GfxInfoConstructor },
#endif
-+ { &kNS_NATIVEMENUSERVICE_CID, true, NULL, nsNativeMenuServiceConstructor },
++ { &kNS_NATIVEMENUSERVICE_CID, true, nullptr, nsNativeMenuServiceConstructor },
{ nullptr }
};
- static const mozilla::Module::ContractIDEntry kWidgetContracts[] = {
- { "@mozilla.org/widget/window/gtk;1", &kNS_WINDOW_CID },
- { "@mozilla.org/widgets/child_window/gtk;1", &kNS_CHILD_CID },
- { "@mozilla.org/widget/appshell/gtk;1", &kNS_APPSHELL_CID, Module::ALLOW_IN_GPU_PROCESS },
- { "@mozilla.org/colorpicker;1", &kNS_COLORPICKER_CID, Module::MAIN_PROCESS_ONLY },
-@@ -299,16 +306,17 @@ static const mozilla::Module::ContractID
- { "@mozilla.org/gfx/devicecontextspec;1", &kNS_DEVICE_CONTEXT_SPEC_CID },
- { NS_PRINTDIALOGSERVICE_CONTRACTID, &kNS_PRINTDIALOGSERVICE_CID },
- #endif
- { "@mozilla.org/widget/image-to-gdk-pixbuf;1", &kNS_IMAGE_TO_PIXBUF_CID },
- #if defined(MOZ_X11)
+@@ -297,6 +304,7 @@ static const mozilla::Module::ContractID
{ "@mozilla.org/widget/idleservice;1", &kNS_IDLE_SERVICE_CID },
{ "@mozilla.org/gfx/info;1", &kNS_GFXINFO_CID },
#endif
@@ -5585,20 +5198,9 @@ diff --git a/widget/gtk/nsWidgetFactory.cpp b/widget/gtk/nsWidgetFactory.cpp
{ nullptr }
};
- static void
- nsWidgetGtk2ModuleDtor()
- {
- // Shutdown all XP level widget classes.
- WidgetUtils::Shutdown();
-diff --git a/widget/gtk/nsWindow.cpp b/widget/gtk/nsWindow.cpp
--- a/widget/gtk/nsWindow.cpp
+++ b/widget/gtk/nsWindow.cpp
-@@ -63,16 +63,17 @@
-
- #ifdef MOZ_ENABLE_STARTUP_NOTIFICATION
- #define SN_API_NOT_YET_FROZEN
- #include <startup-notification-1.0/libsn/sn.h>
- #endif
+@@ -68,6 +68,7 @@
#include "mozilla/Assertions.h"
#include "mozilla/Likely.h"
@@ -5606,17 +5208,7 @@ diff --git a/widget/gtk/nsWindow.cpp b/widget/gtk/nsWindow.cpp
#include "mozilla/Preferences.h"
#include "nsIPrefService.h"
#include "nsIGConfService.h"
- #include "nsIServiceManager.h"
- #include "nsGfxCIID.h"
- #include "nsGtkUtils.h"
- #include "nsIObserverService.h"
- #include "mozilla/layers/LayersTypes.h"
-@@ -5246,16 +5247,21 @@ nsWindow::SetWindowDecoration(nsBorderSt
- }
-
- void
- nsWindow::HideWindowChrome(bool aShouldHide)
- {
+@@ -5258,6 +5259,11 @@ nsWindow::HideWindowChrome(bool aShouldH
SetWindowDecoration(aShouldHide ? eBorderStyle_none : mBorderStyle);
}
@@ -5628,20 +5220,9 @@ diff --git a/widget/gtk/nsWindow.cpp b/widget/gtk/nsWindow.cpp
bool
nsWindow::CheckForRollup(gdouble aMouseX, gdouble aMouseY,
bool aIsWheel, bool aAlwaysRollup)
- {
- nsIRollupListener* rollupListener = GetActiveRollupListener();
- nsCOMPtr<nsIWidget> rollupWidget;
- if (rollupListener) {
- rollupWidget = rollupListener->GetRollupWidget();
-diff --git a/widget/gtk/nsWindow.h b/widget/gtk/nsWindow.h
--- a/widget/gtk/nsWindow.h
+++ b/widget/gtk/nsWindow.h
-@@ -35,16 +35,18 @@
- #ifdef ACCESSIBILITY
- #include "mozilla/a11y/Accessible.h"
- #endif
- #include "mozilla/EventForwards.h"
- #include "mozilla/TouchEvents.h"
+@@ -40,6 +40,8 @@
#include "IMContextWrapper.h"
@@ -5650,17 +5231,7 @@ diff --git a/widget/gtk/nsWindow.h b/widget/gtk/nsWindow.h
#undef LOG
#ifdef MOZ_LOGGING
- #include "mozilla/Logging.h"
- #include "nsTArray.h"
- #include "Units.h"
-
- extern mozilla::LazyLogModule gWidgetLog;
-@@ -173,16 +175,18 @@ public:
- uint16_t aDuration,
- nsISupports* aData,
- nsIRunnable* aCallback) override;
- virtual already_AddRefed<nsIScreen> GetWidgetScreen() override;
- virtual nsresult MakeFullScreen(bool aFullScreen,
+@@ -178,6 +180,8 @@ public:
nsIScreen* aTargetScreen = nullptr) override;
virtual void HideWindowChrome(bool aShouldHide) override;
@@ -5669,17 +5240,7 @@ diff --git a/widget/gtk/nsWindow.h b/widget/gtk/nsWindow.h
/**
* GetLastUserInputTime returns a timestamp for the most recent user input
* event. This is intended for pointer grab requests (including drags).
- */
- static guint32 GetLastUserInputTime();
-
- // utility method, -1 if no change should be made, otherwise returns a
- // value that can be passed to gdk_window_set_decorations
-@@ -646,11 +650,13 @@ private:
- * all windows in a hierarchy. If the children are released after the top
- * level window is released, the children still have a valid pointer,
- * however, IME doesn't work at that time.
- */
- RefPtr<mozilla::widget::IMContextWrapper> mIMContext;
+@@ -656,6 +660,8 @@ private:
mozilla::UniquePtr<mozilla::CurrentX11TimeGetter> mCurrentTimeGetter;
static CSDSupportLevel sCSDSupportLevel;
@@ -5688,15 +5249,9 @@ diff --git a/widget/gtk/nsWindow.h b/widget/gtk/nsWindow.h
};
#endif /* __nsWindow_h__ */
-diff --git a/widget/moz.build b/widget/moz.build
--- a/widget/moz.build
+++ b/widget/moz.build
-@@ -60,19 +60,19 @@ elif toolkit == 'cocoa':
- XPIDL_SOURCES += [
- 'nsIMacDockSupport.idl',
- 'nsIMacSharingService.idl',
- 'nsIMacWebAppUtils.idl',
- 'nsIStandaloneNativeMenu.idl',
+@@ -65,9 +65,9 @@ elif toolkit == 'cocoa':
'nsISystemStatusBar.idl',
'nsITaskbarProgress.idl',
]
@@ -5709,20 +5264,9 @@ diff --git a/widget/moz.build b/widget/moz.build
TEST_DIRS += ['tests']
- DIRS += ['headless']
-
- # Don't build the DSO under the 'build' directory as windows does.
- #
- # The DSOs get built in the toolkit dir itself. Do this so that
-diff --git a/xpfe/appshell/nsWebShellWindow.cpp b/xpfe/appshell/nsWebShellWindow.cpp
--- a/xpfe/appshell/nsWebShellWindow.cpp
+++ b/xpfe/appshell/nsWebShellWindow.cpp
-@@ -61,17 +61,17 @@
- #include "mozilla/DebugOnly.h"
- #include "mozilla/EventDispatcher.h"
- #include "mozilla/MouseEvents.h"
-
- #include "nsPIWindowRoot.h"
+@@ -66,7 +66,7 @@
#include "gfxPlatform.h"
@@ -5731,8 +5275,34 @@ diff --git a/xpfe/appshell/nsWebShellWindow.cpp b/xpfe/appshell/nsWebShellWindow
#include "nsINativeMenuService.h"
#define USE_NATIVE_MENUS
#endif
+--- /dev/null
++++ b/xpcom/ds/NativeMenuAtoms.py
+@@ -0,0 +1,9 @@
++from Atom import Atom
++
++NATIVE_MENU_ATOMS = [
++ Atom("menuitem_with_favicon", "menuitem-with-favicon"),
++ Atom("_moz_menubarkeeplocal", "_moz-menubarkeeplocal"),
++ Atom("_moz_nativemenupopupstate", "_moz-nativemenupopupstate"),
++ Atom("openedwithkey", "openedwithkey"),
++ Atom("shellshowingmenubar", "shellshowingmenubar"),
++]
+--- a/xpcom/ds/StaticAtoms.py
++++ b/xpcom/ds/StaticAtoms.py
+@@ -7,6 +7,7 @@
+ from Atom import Atom, InheritingAnonBoxAtom, NonInheritingAnonBoxAtom
+ from Atom import PseudoElementAtom
+ from HTMLAtoms import HTML_PARSER_ATOMS
++from NativeMenuAtoms import NATIVE_MENU_ATOMS
+ import sys
+
+ # Static atom definitions, used to generate nsGkAtomList.h.
+@@ -2304,7 +2305,7 @@ STATIC_ATOMS = [
+ InheritingAnonBoxAtom("AnonBox_mozSVGOuterSVGAnonChild", ":-moz-svg-outer-svg-anon-child"),
+ InheritingAnonBoxAtom("AnonBox_mozSVGForeignContent", ":-moz-svg-foreign-content"),
+ InheritingAnonBoxAtom("AnonBox_mozSVGText", ":-moz-svg-text"),
+-] + HTML_PARSER_ATOMS
++] + HTML_PARSER_ATOMS + NATIVE_MENU_ATOMS
- using namespace mozilla;
- using namespace mozilla::dom;
- /* Define Class IDs */
+ def verify():