diff --git a/audio/ardour/Makefile b/audio/ardour/Makefile index ede2f5d1fef..b28dc0b0d32 100644 --- a/audio/ardour/Makefile +++ b/audio/ardour/Makefile @@ -3,7 +3,7 @@ PORTNAME= ardour PORTVERSION= 2.8.16 -PORTREVISION= 11 +PORTREVISION= 12 CATEGORIES= audio MASTER_SITES= http://freebsd.nsu.ru/distfiles/ diff --git a/audio/gqradio/Makefile b/audio/gqradio/Makefile index 36c5572e777..a4284edb1be 100644 --- a/audio/gqradio/Makefile +++ b/audio/gqradio/Makefile @@ -3,7 +3,7 @@ PORTNAME= gqradio PORTVERSION= 1.9.2 -PORTREVISION= 12 +PORTREVISION= 13 CATEGORIES= audio MASTER_SITES= SF/gqmpeg/${PORTNAME}/${PORTVERSION} diff --git a/audio/lmms/Makefile b/audio/lmms/Makefile index ba0406ba5e1..8ac20fc16b8 100644 --- a/audio/lmms/Makefile +++ b/audio/lmms/Makefile @@ -2,9 +2,8 @@ # $FreeBSD$ PORTNAME= lmms -PORTVERSION= 1.1.3 DISTVERSIONPREFIX= v -PORTREVISION= 3 +DISTVERSION= 1.2.0-rc7 PORTEPOCH= 2 CATEGORIES= audio @@ -12,6 +11,7 @@ MAINTAINER= rodrigo@FreeBSD.org COMMENT= All-in-one sequencer, drum machine, sampler, and more LICENSE= GPLv2 +LICENSE_FILE= ${WRKSRC}/LICENSE.txt BUILD_DEPENDS= ${LOCALBASE}/include/ladspa.h:audio/ladspa LIB_DEPENDS= libFLAC.so:audio/flac \ @@ -22,66 +22,50 @@ LIB_DEPENDS= libFLAC.so:audio/flac \ libogg.so:audio/libogg \ libfftw3.so:math/fftw3 \ libfftw3f.so:math/fftw3-float \ - libsamplerate.so:audio/libsamplerate \ libfltk.so:x11-toolkits/fltk RUN_DEPENDS= ${LOCALBASE}/share/ladspa/rdf/caps.rdf:audio/caps-plugins \ ${LOCALBASE}/lib/ladspa/cmt.so:audio/cmt \ ${LOCALBASE}/share/ladspa/rdf/swh-plugins.rdf:audio/swhplugins \ ${LOCALBASE}/share/ladspa/rdf/tap-plugins.rdf:audio/tap-plugins -OPTIONS_DEFINE= OSS JACK PULSEAUDIO PORTAUDIO SDL -OPTIONS_DEFAULT=OSS - -USE_LDCONFIG= yes -USE_XORG= x11 xext xft ice sm -USE_QT= corelib gui xml moc_build uic_build rcc_build \ - qmake_build +USES= cmake:outsource desktop-file-utils localbase:ldflags pkgconfig \ + qt:4 shared-mime-info USE_GITHUB= yes GH_ACCOUNT= LMMS -USES= cmake desktop-file-utils dos2unix pkgconfig qt:4 shared-mime-info -CMAKE_ARGS= -DWANT_ALSA:BOOL=OFF \ - -DWANT_CALF:BOOL=OFF \ - -DWANT_CAPS:BOOL=OFF \ - -DWANT_CMT:BOOL=OFF \ - -DWANT_SWH:BOOL=OFF \ - -DWANT_STK:BOOL=OFF \ - -DWANT_TAP:BOOL=OFF \ - -DWANT_VST:BOOL=OFF \ - -DHAVE_STRTOLL=ON +GH_TUPLE= rampantpixels:rpmalloc:1.3.1:rpmalloc/src/3rdparty/rpmalloc/rpmalloc +USE_LDCONFIG= yes +USE_QT= corelib gui linguisttools xml moc_build uic_build rcc_build qmake_build +USE_XORG= x11 xext xft ice sm -DOS2UNIX_FILES= CMakeLists.txt +CMAKE_OFF= WANT_ALSA WANT_CALF WANT_CAPS WANT_CMT WANT_SWH WANT_STK \ + WANT_TAP WANT_VST +INSTALLS_ICONS= yes +OPTIONS_DEFINE= OSS JACK PULSEAUDIO PORTAUDIO SDL SNDIO +OPTIONS_DEFAULT= OSS + +JACK_CMAKE_BOOL= WANT_JACK JACK_LIB_DEPENDS= libjack.so:audio/jack -JACK_CMAKE_OFF= -DWANT_JACK:BOOL=OFF +PULSEAUDIO_CMAKE_BOOL= WANT_PULSEAUDIO PULSEAUDIO_LIB_DEPENDS= libpulse.so:audio/pulseaudio -PULSEAUDIO_CMAKE_OFF= -DWANT_PULSEAUDIO:BOOL=OFF +PORTAUDIO_CMAKE_BOOL= WANT_PORTAUDIO PORTAUDIO_LIB_DEPENDS= libportaudio.so:audio/portaudio -PORTAUDIO_CMAKE_OFF= -DWANT_PORTAUDIO:BOOL=OFF +SDL_CMAKE_OFF= WANT_SDL SDL_USE= SDL=sdl -SDL_CMAKE_OFF= -DWANT_SDL:BOOL=OFF + +SNDIO_CMAKE_BOOL= WANT_SNDIO +SNDIO_LIB_DEPENDS= libsndio.so:audio/sndio post-patch: -.for file in data/lmms.desktop - @${REINPLACE_CMD} -e \ - '/^Icon/s|=.*$$|=lmms|g ; \ - /^Exec/s|=.*$$|=lmms|g ; \ - /^Categories/s|$$|;|g ; \ - /^MimeType/s|$$|;|g' ${WRKSRC}/${file} -.endfor -.for filename in data/lmms src/core/config_mgr.cpp - @${REINPLACE_CMD} -e \ - 's|/usr|${PREFIX}|g' ${WRKSRC}/${filename} -.endfor -.for filename in src/core/ladspa_manager.cpp - @${REINPLACE_CMD} -e \ - '/\/usr\/lib/d ; \ - s|/usr/local|${PREFIX}|g' ${WRKSRC}/${filename} -.endfor + @${REINPLACE_CMD} 's|/usr|${LOCALBASE}|g' ${WRKSRC}/src/core/ConfigManager.cpp + @${REINPLACE_CMD} 's|/usr/local|${LOCALBASE}|g' \ + ${WRKSRC}/src/core/LadspaManager.cpp @${REINPLACE_CMD} -e 's/lib64/lib/' \ ${WRKSRC}/cmake/modules/DetectMachine.cmake + @${REINPLACE_CMD} 's,share/man/,man/,g' ${WRKSRC}/src/CMakeLists.txt post-patch-OSS-off: @${REINPLACE_CMD} \ @@ -90,9 +74,7 @@ post-patch-OSS-off: ${WRKSRC}/CMakeLists.txt post-install: - @${LN} -sf ${DATADIR}/themes/default/icon.png \ + @${RLN} ${STAGEDIR}${DATADIR}/themes/default/icon.png \ ${STAGEDIR}${PREFIX}/share/pixmaps/lmms.png - # make it setuid-root to be able to set realtime priority - # (root privileges are dropped in the main routine) .include diff --git a/audio/lmms/distinfo b/audio/lmms/distinfo index 2192467b306..4452ccf517f 100644 --- a/audio/lmms/distinfo +++ b/audio/lmms/distinfo @@ -1,3 +1,5 @@ -TIMESTAMP = 1500880879 -SHA256 (LMMS-lmms-v1.1.3_GH0.tar.gz) = 59338e7b90e02fe18db73114aefe479c0e6d1e0e366185d71ea5c1a1e0f9e6bc -SIZE (LMMS-lmms-v1.1.3_GH0.tar.gz) = 16843533 +TIMESTAMP = 1537885096 +SHA256 (LMMS-lmms-v1.2.0-rc7_GH0.tar.gz) = 2efba2eda8ec3030ff6d446fd7bbe2245b38472f60c622b9e41053b1981fd592 +SIZE (LMMS-lmms-v1.2.0-rc7_GH0.tar.gz) = 16120037 +SHA256 (rampantpixels-rpmalloc-1.3.1_GH0.tar.gz) = 9bc0013a0bf8c01540821e84fef0cef067f1d857a01ceceac36f83bd6fedc106 +SIZE (rampantpixels-rpmalloc-1.3.1_GH0.tar.gz) = 63517 diff --git a/audio/lmms/files/patch-CMakeLists.txt b/audio/lmms/files/patch-CMakeLists.txt deleted file mode 100644 index 171163c1d05..00000000000 --- a/audio/lmms/files/patch-CMakeLists.txt +++ /dev/null @@ -1,30 +0,0 @@ ---- CMakeLists.txt.orig 2016-07-26 15:14:45 UTC -+++ CMakeLists.txt -@@ -325,6 +325,7 @@ ENDIF(LMMS_BUILD_WIN32) - - # check for libsamplerate - PKG_CHECK_MODULES(SAMPLERATE REQUIRED samplerate>=0.1.8) -+link_directories(${SAMPLERATE_LIBRARY_DIRS}) - - - CONFIGURE_FILE("${CMAKE_SOURCE_DIR}/lmmsconfig.h.in" "${CMAKE_BINARY_DIR}/lmmsconfig.h") -@@ -333,10 +334,7 @@ CONFIGURE_FILE("${CMAKE_SOURCE_DIR}/lmms - CONFIGURE_FILE("${CMAKE_SOURCE_DIR}/plugins/zynaddsubfx/zynaddsubfx.rc.in" "${CMAKE_BINARY_DIR}/plugins/zynaddsubfx/zynaddsubfx.rc") - - # set compiler flags --SET(WERROR_FLAGS "-Wall -Werror=unused-function -Wno-sign-compare -Wno-strict-overflow") --IF(NOT LMMS_BUILD_APPLE) -- SET(WERROR_FLAGS "${WERROR_FLAGS} -Werror") --ENDIF() -+SET(WERROR_FLAGS "-Wall -Wno-sign-compare -Wno-strict-overflow") - - # Due to a regression in gcc-4.8.X, we need to disable array-bounds check - IF (CMAKE_COMPILER_IS_GNUCXX AND ((CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL "4.8.0") OR (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER "4.8.0"))) -@@ -639,6 +637,7 @@ MESSAGE( - "running cmake again!\n" - "-----------------------------------------------------------------\n" - "\n\n") -+message(STATUS "using link directories: ${FFTW3F_LIBRARY_DIRS} ${AUDIO_LIBRARY_DIRS} ${ZLIB_LIBRARY_DIRS} ${FFTW_LIBRARY_DIRS} ${MXML_LIBRARY_DIRS} ${FLTK_LIBRARY_DIRS}") - - INCLUDE(InstallRequiredSystemLibraries) - SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "LMMS - easy music production for everyone!") diff --git a/audio/lmms/files/patch-include_debug.h b/audio/lmms/files/patch-include_debug.h deleted file mode 100644 index 1cdc7e6e775..00000000000 --- a/audio/lmms/files/patch-include_debug.h +++ /dev/null @@ -1,14 +0,0 @@ ---- include/debug.h.orig 2015-03-08 02:47:14 UTC -+++ include/debug.h -@@ -30,10 +30,10 @@ - - // set whether debug-stuff (like messages on the console, asserts and other - // additional range-checkings) should be compiled -- - #ifdef LMMS_DEBUG - #include - #else -+ #undef assert - #define assert(x) ((void)(x)) - #endif - #include diff --git a/audio/lmms/files/patch-include_lmms__math.h b/audio/lmms/files/patch-include_lmms__math.h deleted file mode 100644 index 1e7b7dbbdf9..00000000000 --- a/audio/lmms/files/patch-include_lmms__math.h +++ /dev/null @@ -1,27 +0,0 @@ ---- include/lmms_math.h.orig 2015-03-08 02:47:14 UTC -+++ include/lmms_math.h -@@ -26,15 +26,14 @@ - #ifndef LMMS_MATH_H - #define LMMS_MATH_H - -+#include - #include - #include "lmms_constants.h" - #include "lmmsconfig.h" - #include - --#include - using namespace std; - --#if defined (LMMS_BUILD_WIN32) || defined (LMMS_BUILD_APPLE) - #ifndef isnanf - #define isnanf(x) isnan(x) - #endif -@@ -53,7 +52,6 @@ using namespace std; - #ifndef exp10f - #define exp10f(x) powf( 10, x ) - #endif --#endif - - #ifdef __INTEL_COMPILER - diff --git a/audio/lmms/files/patch-plugins_Amplifier_CMakeLists.txt b/audio/lmms/files/patch-plugins_Amplifier_CMakeLists.txt deleted file mode 100644 index 6b0d00c64c2..00000000000 --- a/audio/lmms/files/patch-plugins_Amplifier_CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ ---- plugins/Amplifier/CMakeLists.txt.orig 2015-03-08 02:47:14 UTC -+++ plugins/Amplifier/CMakeLists.txt -@@ -1,3 +1,6 @@ - INCLUDE(BuildPlugin) - - BUILD_PLUGIN(amplifier Amplifier.cpp AmplifierControls.cpp AmplifierControlDialog.cpp MOCFILES AmplifierControls.h AmplifierControlDialog.h EMBEDDED_RESOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.png") -+ -+include_directories(${SAMPLERATE_INCLUDE_DIRS}) -+link_directories(${SAMPLERATE_LIBRARY_DIRS}) diff --git a/audio/lmms/files/patch-plugins_BassBooster_CMakeLists.txt b/audio/lmms/files/patch-plugins_BassBooster_CMakeLists.txt deleted file mode 100644 index 670ab4104b7..00000000000 --- a/audio/lmms/files/patch-plugins_BassBooster_CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ ---- plugins/BassBooster/CMakeLists.txt.orig 2015-03-08 02:47:14 UTC -+++ plugins/BassBooster/CMakeLists.txt -@@ -1,3 +1,6 @@ - INCLUDE(BuildPlugin) - - BUILD_PLUGIN(bassbooster BassBooster.cpp BassBoosterControls.cpp BassBoosterControlDialog.cpp MOCFILES BassBoosterControls.h BassBoosterControlDialog.h EMBEDDED_RESOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.png") -+ -+include_directories(${SAMPLERATE_INCLUDE_DIRS}) -+link_directories(${SAMPLERATE_LIBRARY_DIRS}) diff --git a/audio/lmms/files/patch-plugins_DualFilter_CMakeLists.txt b/audio/lmms/files/patch-plugins_DualFilter_CMakeLists.txt deleted file mode 100644 index 6518ce41c2b..00000000000 --- a/audio/lmms/files/patch-plugins_DualFilter_CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ ---- plugins/DualFilter/CMakeLists.txt.orig 2015-03-08 02:47:14 UTC -+++ plugins/DualFilter/CMakeLists.txt -@@ -1,3 +1,6 @@ - INCLUDE(BuildPlugin) - - BUILD_PLUGIN(dualfilter DualFilter.cpp DualFilterControls.cpp DualFilterControlDialog.cpp MOCFILES DualFilterControls.h DualFilterControlDialog.h EMBEDDED_RESOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.png") -+ -+include_directories(${SAMPLERATE_INCLUDE_DIRS}) -+link_directories(${SAMPLERATE_LIBRARY_DIRS}) diff --git a/audio/lmms/files/patch-plugins_HydrogenImport_CMakeLists.txt b/audio/lmms/files/patch-plugins_HydrogenImport_CMakeLists.txt deleted file mode 100644 index d7fbf910ee2..00000000000 --- a/audio/lmms/files/patch-plugins_HydrogenImport_CMakeLists.txt +++ /dev/null @@ -1,8 +0,0 @@ ---- plugins/HydrogenImport/CMakeLists.txt.orig 2015-03-08 02:47:14 UTC -+++ plugins/HydrogenImport/CMakeLists.txt -@@ -2,3 +2,5 @@ INCLUDE(BuildPlugin) - - BUILD_PLUGIN(hydrogenimport HydrogenImport.cpp HydrogenImport.h local_file_mgr.cpp LocalFileMng.h) - -+include_directories(${SAMPLERATE_INCLUDE_DIRS}) -+link_directories(${SAMPLERATE_LIBRARY_DIRS}) diff --git a/audio/lmms/files/patch-plugins_LadspaEffect_CMakeLists.txt b/audio/lmms/files/patch-plugins_LadspaEffect_CMakeLists.txt deleted file mode 100644 index 46836cb8c13..00000000000 --- a/audio/lmms/files/patch-plugins_LadspaEffect_CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ ---- plugins/LadspaEffect/CMakeLists.txt.orig 2015-03-08 02:47:14 UTC -+++ plugins/LadspaEffect/CMakeLists.txt -@@ -24,3 +24,6 @@ INCLUDE(BuildPlugin) - BUILD_PLUGIN(ladspaeffect LadspaEffect.cpp LadspaControls.cpp LadspaControlDialog.cpp LadspaSubPluginFeatures.cpp LadspaEffect.h LadspaControls.h LadspaControlDialog.h LadspaSubPluginFeatures.h MOCFILES LadspaEffect.h LadspaControls.h LadspaControlDialog.h EMBEDDED_RESOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.png") - - -+ -+include_directories(${SAMPLERATE_INCLUDE_DIRS}) -+link_directories(${SAMPLERATE_LIBRARY_DIRS}) diff --git a/audio/lmms/files/patch-plugins_MidiImport_CMakeLists.txt b/audio/lmms/files/patch-plugins_MidiImport_CMakeLists.txt deleted file mode 100644 index 64e6052f472..00000000000 --- a/audio/lmms/files/patch-plugins_MidiImport_CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ ---- plugins/MidiImport/CMakeLists.txt.orig 2015-03-08 02:47:14 UTC -+++ plugins/MidiImport/CMakeLists.txt -@@ -6,3 +6,6 @@ BUILD_PLUGIN(midiimport MidiImport.cpp M - portsmf/mfmidi.cpp portsmf/mfmidi.h portsmf/strparse.cpp - portsmf/strparse.h portsmf/algrd_internal.h portsmf/algsmfrd_internal.h - portsmf/trace.h MOCFILES MidiImport.h) -+ -+include_directories(${SAMPLERATE_INCLUDE_DIRS}) -+link_directories(${SAMPLERATE_LIBRARY_DIRS}) diff --git a/audio/lmms/files/patch-plugins_MidiImport_portsmf_allegro.h b/audio/lmms/files/patch-plugins_MidiImport_portsmf_allegro.h deleted file mode 100644 index c774a2143a0..00000000000 --- a/audio/lmms/files/patch-plugins_MidiImport_portsmf_allegro.h +++ /dev/null @@ -1,10 +0,0 @@ ---- plugins/MidiImport/portsmf/allegro.h.orig 2015-03-08 02:47:14 UTC -+++ plugins/MidiImport/portsmf/allegro.h -@@ -904,6 +904,7 @@ public: - void insert_silence(double t, double len); - Alg_track_ptr copy_track(int track_num, double t, double len, bool all); - Alg_seq *copy(double start, double len, bool all); -+ using Alg_track::paste; - void paste(double start, Alg_seq *seq); - virtual void clear(double t, double len, bool all); - virtual void merge(double t, Alg_event_list_ptr seq); diff --git a/audio/lmms/files/patch-plugins_audio__file__processor_CMakeLists.txt b/audio/lmms/files/patch-plugins_audio__file__processor_CMakeLists.txt deleted file mode 100644 index 8e2b4a81031..00000000000 --- a/audio/lmms/files/patch-plugins_audio__file__processor_CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ ---- plugins/audio_file_processor/CMakeLists.txt.orig 2015-03-08 02:47:14 UTC -+++ plugins/audio_file_processor/CMakeLists.txt -@@ -1,3 +1,6 @@ - INCLUDE(BuildPlugin) - - BUILD_PLUGIN(audiofileprocessor audio_file_processor.cpp audio_file_processor.h MOCFILES audio_file_processor.h EMBEDDED_RESOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.png") -+ -+include_directories(${SAMPLERATE_INCLUDE_DIRS}) -+link_directories(${SAMPLERATE_LIBRARY_DIRS}) diff --git a/audio/lmms/files/patch-plugins_bit__invader_CMakeLists.txt b/audio/lmms/files/patch-plugins_bit__invader_CMakeLists.txt deleted file mode 100644 index 1a0b892defe..00000000000 --- a/audio/lmms/files/patch-plugins_bit__invader_CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ ---- plugins/bit_invader/CMakeLists.txt.orig 2015-03-08 02:47:14 UTC -+++ plugins/bit_invader/CMakeLists.txt -@@ -1,3 +1,6 @@ - INCLUDE(BuildPlugin) - - BUILD_PLUGIN(bitinvader bit_invader.cpp bit_invader.h MOCFILES bit_invader.h EMBEDDED_RESOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.png") -+ -+include_directories(${SAMPLERATE_INCLUDE_DIRS}) -+link_directories(${SAMPLERATE_LIBRARY_DIRS}) diff --git a/audio/lmms/files/patch-plugins_delay_CMakeLists.txt b/audio/lmms/files/patch-plugins_delay_CMakeLists.txt deleted file mode 100644 index 3ad4bb6da47..00000000000 --- a/audio/lmms/files/patch-plugins_delay_CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ ---- plugins/delay/CMakeLists.txt.orig 2015-03-08 02:47:14 UTC -+++ plugins/delay/CMakeLists.txt -@@ -1,3 +1,6 @@ - INCLUDE(BuildPlugin) - - BUILD_PLUGIN(delay delayeffect.cpp delaycontrols.cpp delaycontrolsdialog.cpp lfo.cpp stereodelay.cpp MOCFILES delaycontrols.h EMBEDDED_RESOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.png") -+ -+include_directories(${SAMPLERATE_INCLUDE_DIRS}) -+link_directories(${SAMPLERATE_LIBRARY_DIRS}) diff --git a/audio/lmms/files/patch-plugins_dynamics__processor_CMakeLists.txt b/audio/lmms/files/patch-plugins_dynamics__processor_CMakeLists.txt deleted file mode 100644 index 6d31b8c8e32..00000000000 --- a/audio/lmms/files/patch-plugins_dynamics__processor_CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ ---- plugins/dynamics_processor/CMakeLists.txt.orig 2015-03-08 02:47:14 UTC -+++ plugins/dynamics_processor/CMakeLists.txt -@@ -1,3 +1,6 @@ - INCLUDE(BuildPlugin) - - BUILD_PLUGIN(dynamicsprocessor dynamics_processor.cpp dynamics_processor_controls.cpp dynamics_processor_control_dialog.cpp MOCFILES dynamics_processor_controls.h dynamics_processor_control_dialog.h EMBEDDED_RESOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.png") -+ -+include_directories(${SAMPLERATE_INCLUDE_DIRS}) -+link_directories(${SAMPLERATE_LIBRARY_DIRS}) diff --git a/audio/lmms/files/patch-plugins_flp__import_CMakeLists.txt b/audio/lmms/files/patch-plugins_flp__import_CMakeLists.txt deleted file mode 100644 index 880d72af3ed..00000000000 --- a/audio/lmms/files/patch-plugins_flp__import_CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ ---- plugins/flp_import/CMakeLists.txt.orig 2015-03-08 02:47:14 UTC -+++ plugins/flp_import/CMakeLists.txt -@@ -3,3 +3,6 @@ INCLUDE(BuildPlugin) - INCLUDE_DIRECTORIES(unrtf) - - BUILD_PLUGIN(flpimport FlpImport.cpp unrtf.cpp FlpImport.h) -+ -+include_directories(${SAMPLERATE_INCLUDE_DIRS}) -+link_directories(${SAMPLERATE_LIBRARY_DIRS}) diff --git a/audio/lmms/files/patch-plugins_kicker_CMakeLists.txt b/audio/lmms/files/patch-plugins_kicker_CMakeLists.txt deleted file mode 100644 index 61e85e85284..00000000000 --- a/audio/lmms/files/patch-plugins_kicker_CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ ---- plugins/kicker/CMakeLists.txt.orig 2015-03-08 02:47:14 UTC -+++ plugins/kicker/CMakeLists.txt -@@ -1,3 +1,6 @@ - INCLUDE(BuildPlugin) - - BUILD_PLUGIN(kicker kicker.cpp kicker.h MOCFILES kicker.h EMBEDDED_RESOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.png") -+ -+include_directories(${SAMPLERATE_INCLUDE_DIRS}) -+link_directories(${SAMPLERATE_LIBRARY_DIRS}) diff --git a/audio/lmms/files/patch-plugins_ladspa__browser_CMakeLists.txt b/audio/lmms/files/patch-plugins_ladspa__browser_CMakeLists.txt deleted file mode 100644 index ca2e0643112..00000000000 --- a/audio/lmms/files/patch-plugins_ladspa__browser_CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ ---- plugins/ladspa_browser/CMakeLists.txt.orig 2015-03-08 02:47:14 UTC -+++ plugins/ladspa_browser/CMakeLists.txt -@@ -1,3 +1,6 @@ - INCLUDE(BuildPlugin) - - BUILD_PLUGIN(ladspabrowser ladspa_browser.cpp ladspa_browser.h ladspa_description.cpp ladspa_description.h ladspa_port_dialog.cpp ladspa_port_dialog.h MOCFILES ladspa_browser.h ladspa_description.h ladspa_port_dialog.h EMBEDDED_RESOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.png") -+ -+include_directories(${SAMPLERATE_INCLUDE_DIRS}) -+link_directories(${SAMPLERATE_LIBRARY_DIRS}) diff --git a/audio/lmms/files/patch-plugins_lb302_CMakeLists.txt b/audio/lmms/files/patch-plugins_lb302_CMakeLists.txt deleted file mode 100644 index a7333ecbc2f..00000000000 --- a/audio/lmms/files/patch-plugins_lb302_CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ ---- plugins/lb302/CMakeLists.txt.orig 2015-03-08 02:47:14 UTC -+++ plugins/lb302/CMakeLists.txt -@@ -1,3 +1,6 @@ - INCLUDE(BuildPlugin) - - BUILD_PLUGIN(lb302 lb302.cpp lb302.h MOCFILES lb302.h EMBEDDED_RESOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.png") -+ -+include_directories(${SAMPLERATE_INCLUDE_DIRS}) -+link_directories(${SAMPLERATE_LIBRARY_DIRS}) diff --git a/audio/lmms/files/patch-plugins_monstro_CMakeLists.txt b/audio/lmms/files/patch-plugins_monstro_CMakeLists.txt deleted file mode 100644 index 0488a3dafde..00000000000 --- a/audio/lmms/files/patch-plugins_monstro_CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ ---- plugins/monstro/CMakeLists.txt.orig 2015-03-08 02:47:14 UTC -+++ plugins/monstro/CMakeLists.txt -@@ -1,3 +1,6 @@ - INCLUDE(BuildPlugin) - - BUILD_PLUGIN(monstro Monstro.cpp Monstro.h MOCFILES Monstro.h EMBEDDED_RESOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.png") -+ -+include_directories(${SAMPLERATE_INCLUDE_DIRS}) -+link_directories(${SAMPLERATE_LIBRARY_DIRS}) diff --git a/audio/lmms/files/patch-plugins_nes_CMakeLists.txt b/audio/lmms/files/patch-plugins_nes_CMakeLists.txt deleted file mode 100644 index 5099c483de9..00000000000 --- a/audio/lmms/files/patch-plugins_nes_CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ ---- plugins/nes/CMakeLists.txt.orig 2015-03-08 02:47:14 UTC -+++ plugins/nes/CMakeLists.txt -@@ -1,3 +1,6 @@ - INCLUDE(BuildPlugin) - - BUILD_PLUGIN(nes Nes.cpp Nes.h MOCFILES Nes.h EMBEDDED_RESOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.png") -+ -+include_directories(${SAMPLERATE_INCLUDE_DIRS}) -+link_directories(${SAMPLERATE_LIBRARY_DIRS}) diff --git a/audio/lmms/files/patch-plugins_opl2_CMakeLists.txt b/audio/lmms/files/patch-plugins_opl2_CMakeLists.txt deleted file mode 100644 index 5d184ca10ed..00000000000 --- a/audio/lmms/files/patch-plugins_opl2_CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ ---- plugins/opl2/CMakeLists.txt.orig 2015-03-08 02:47:14 UTC -+++ plugins/opl2/CMakeLists.txt -@@ -1,3 +1,6 @@ - INCLUDE(BuildPlugin) - - BUILD_PLUGIN(OPL2 opl2instrument.cpp opl2instrument.h opl.h fmopl.c fmopl.h temuopl.cpp temuopl.h MOCFILES opl2instrument.h EMBEDDED_RESOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.png") -+ -+include_directories(${SAMPLERATE_INCLUDE_DIRS}) -+link_directories(${SAMPLERATE_LIBRARY_DIRS}) diff --git a/audio/lmms/files/patch-plugins_organic_CMakeLists.txt b/audio/lmms/files/patch-plugins_organic_CMakeLists.txt deleted file mode 100644 index 8cfd66d6928..00000000000 --- a/audio/lmms/files/patch-plugins_organic_CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ ---- plugins/organic/CMakeLists.txt.orig 2015-03-08 02:47:14 UTC -+++ plugins/organic/CMakeLists.txt -@@ -1,3 +1,6 @@ - INCLUDE(BuildPlugin) - - BUILD_PLUGIN(organic organic.cpp organic.h MOCFILES organic.h EMBEDDED_RESOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.png") -+ -+include_directories(${SAMPLERATE_INCLUDE_DIRS}) -+link_directories(${SAMPLERATE_LIBRARY_DIRS}) diff --git a/audio/lmms/files/patch-plugins_organic_organic.cpp b/audio/lmms/files/patch-plugins_organic_organic.cpp deleted file mode 100644 index 056c3bc16ca..00000000000 --- a/audio/lmms/files/patch-plugins_organic_organic.cpp +++ /dev/null @@ -1,12 +0,0 @@ ---- plugins/organic/organic.cpp.orig 2015-03-08 02:47:14 UTC -+++ plugins/organic/organic.cpp -@@ -41,6 +41,9 @@ - - #include "embed.cpp" - -+#if __FreeBSD_version <= 704100 || (__FreeBSD_version >= 800000 && __FreeBSD_version < 802502) || (__FreeBSD_version >= 900000 && __FreeBSD_version < 900027) -+#define log2f(x) (logf(x) / logf(2)) -+#endif - - - diff --git a/audio/lmms/files/patch-plugins_papu_CMakeLists.txt b/audio/lmms/files/patch-plugins_papu_CMakeLists.txt deleted file mode 100644 index d622285d8e9..00000000000 --- a/audio/lmms/files/patch-plugins_papu_CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ ---- plugins/papu/CMakeLists.txt.orig 2015-03-08 02:47:14 UTC -+++ plugins/papu/CMakeLists.txt -@@ -1,3 +1,6 @@ - INCLUDE(BuildPlugin) - - BUILD_PLUGIN(papu papu_instrument.cpp papu_instrument.h Basic_Gb_Apu.cpp Basic_Gb_Apu.h gb_apu/Gb_Oscs.cpp gb_apu/Gb_Apu.h gb_apu/Blip_Buffer.cpp gb_apu/Gb_Apu.cpp gb_apu/Gb_Oscs.h gb_apu/blargg_common.h gb_apu/Blip_Buffer.h gb_apu/Multi_Buffer.cpp gb_apu/blargg_source.h gb_apu/Blip_Synth.h gb_apu/Multi_Buffer.h MOCFILES papu_instrument.h EMBEDDED_RESOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.png") -+ -+include_directories(${SAMPLERATE_INCLUDE_DIRS}) -+link_directories(${SAMPLERATE_LIBRARY_DIRS}) diff --git a/audio/lmms/files/patch-plugins_patman_CMakeLists.txt b/audio/lmms/files/patch-plugins_patman_CMakeLists.txt deleted file mode 100644 index 7826663dd9c..00000000000 --- a/audio/lmms/files/patch-plugins_patman_CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ ---- plugins/patman/CMakeLists.txt.orig 2015-03-08 02:47:14 UTC -+++ plugins/patman/CMakeLists.txt -@@ -1,3 +1,6 @@ - INCLUDE(BuildPlugin) - - BUILD_PLUGIN(patman patman.cpp patman.h MOCFILES patman.h EMBEDDED_RESOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.png") -+ -+include_directories(${SAMPLERATE_INCLUDE_DIRS}) -+link_directories(${SAMPLERATE_LIBRARY_DIRS}) diff --git a/audio/lmms/files/patch-plugins_peak__controller__effect_CMakeLists.txt b/audio/lmms/files/patch-plugins_peak__controller__effect_CMakeLists.txt deleted file mode 100644 index a1c413b376e..00000000000 --- a/audio/lmms/files/patch-plugins_peak__controller__effect_CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ ---- plugins/peak_controller_effect/CMakeLists.txt.orig 2015-03-08 02:47:14 UTC -+++ plugins/peak_controller_effect/CMakeLists.txt -@@ -1,3 +1,6 @@ - INCLUDE(BuildPlugin) - - BUILD_PLUGIN(peakcontrollereffect peak_controller_effect.cpp peak_controller_effect_controls.cpp peak_controller_effect_control_dialog.cpp peak_controller_effect.h peak_controller_effect_controls.h peak_controller_effect_control_dialog.h MOCFILES peak_controller_effect_controls.h peak_controller_effect_control_dialog.h EMBEDDED_RESOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.png") -+ -+include_directories(${SAMPLERATE_INCLUDE_DIRS}) -+link_directories(${SAMPLERATE_LIBRARY_DIRS}) diff --git a/audio/lmms/files/patch-plugins_sf2__player_sf2__player.cpp b/audio/lmms/files/patch-plugins_sf2__player_sf2__player.cpp deleted file mode 100644 index 757cb2ddfee..00000000000 --- a/audio/lmms/files/patch-plugins_sf2__player_sf2__player.cpp +++ /dev/null @@ -1,13 +0,0 @@ ---- plugins/sf2_player/sf2_player.cpp.orig 2015-03-08 02:47:14 UTC -+++ plugins/sf2_player/sf2_player.cpp -@@ -23,6 +23,10 @@ - * - */ - -+#include -+#if __FreeBSD_version <= 704100 || (__FreeBSD_version >= 800000 && __FreeBSD_version < 802502) || (__FreeBSD_version >= 900000 && __FreeBSD_version < 900027) -+ #define log2(x) ( log (x) * (1./M_LN2) ) -+#endif - #include - #include - #include diff --git a/audio/lmms/files/patch-plugins_sfxr_CMakeLists.txt b/audio/lmms/files/patch-plugins_sfxr_CMakeLists.txt deleted file mode 100644 index b18b690c8dc..00000000000 --- a/audio/lmms/files/patch-plugins_sfxr_CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ ---- plugins/sfxr/CMakeLists.txt.orig 2015-03-08 02:47:14 UTC -+++ plugins/sfxr/CMakeLists.txt -@@ -1,3 +1,6 @@ - INCLUDE(BuildPlugin) - - BUILD_PLUGIN(sfxr sfxr.cpp sfxr.h MOCFILES sfxr.h EMBEDDED_RESOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.png") -+ -+include_directories(${SAMPLERATE_INCLUDE_DIRS}) -+link_directories(${SAMPLERATE_LIBRARY_DIRS}) diff --git a/audio/lmms/files/patch-plugins_sid_CMakeLists.txt b/audio/lmms/files/patch-plugins_sid_CMakeLists.txt deleted file mode 100644 index edadc94bf58..00000000000 --- a/audio/lmms/files/patch-plugins_sid_CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ ---- plugins/sid/CMakeLists.txt.orig 2015-03-08 02:47:14 UTC -+++ plugins/sid/CMakeLists.txt -@@ -2,4 +2,5 @@ INCLUDE(BuildPlugin) - - BUILD_PLUGIN(sid sid_instrument.cpp sid_instrument.h envelope.h extfilt.h filter.h pot.h siddefs.h sid.h spline.h voice.h wave.h envelope.cc extfilt.cc filter.cc pot.cc sid.cc version.cc voice.cc wave6581_PS_.cc wave6581_PST.cc wave6581_P_T.cc wave6581__ST.cc wave8580_PS_.cc wave8580_PST.cc wave8580_P_T.cc wave8580__ST.cc wave.cc MOCFILES sid_instrument.h EMBEDDED_RESOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.png") - -- -+include_directories(${SAMPLERATE_INCLUDE_DIRS}) -+link_directories(${SAMPLERATE_LIBRARY_DIRS}) diff --git a/audio/lmms/files/patch-plugins_stereo__enhancer_CMakeLists.txt b/audio/lmms/files/patch-plugins_stereo__enhancer_CMakeLists.txt deleted file mode 100644 index 369375a7a1f..00000000000 --- a/audio/lmms/files/patch-plugins_stereo__enhancer_CMakeLists.txt +++ /dev/null @@ -1,8 +0,0 @@ ---- plugins/stereo_enhancer/CMakeLists.txt.orig 2015-03-08 02:47:14 UTC -+++ plugins/stereo_enhancer/CMakeLists.txt -@@ -2,3 +2,5 @@ INCLUDE(BuildPlugin) - - BUILD_PLUGIN(stereoenhancer stereo_enhancer.cpp stereoenhancer_controls.cpp stereoenhancer_control_dialog.cpp stereo_enhancer.h stereoenhancer_controls.h stereoenhancer_control_dialog.h MOCFILES stereoenhancer_controls.h stereoenhancer_control_dialog.h EMBEDDED_RESOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.png") - -+include_directories(${SAMPLERATE_INCLUDE_DIRS}) -+link_directories(${SAMPLERATE_LIBRARY_DIRS}) diff --git a/audio/lmms/files/patch-plugins_stereo__matrix_CMakeLists.txt b/audio/lmms/files/patch-plugins_stereo__matrix_CMakeLists.txt deleted file mode 100644 index b847bde235d..00000000000 --- a/audio/lmms/files/patch-plugins_stereo__matrix_CMakeLists.txt +++ /dev/null @@ -1,8 +0,0 @@ ---- plugins/stereo_matrix/CMakeLists.txt.orig 2015-03-08 02:47:14 UTC -+++ plugins/stereo_matrix/CMakeLists.txt -@@ -2,3 +2,5 @@ INCLUDE(BuildPlugin) - - BUILD_PLUGIN(stereomatrix stereo_matrix.cpp stereomatrix_controls.cpp stereomatrix_control_dialog.cpp stereo_matrix.h stereomatrix_controls.h stereomatrix_control_dialog.h MOCFILES stereomatrix_controls.h stereomatrix_control_dialog.h EMBEDDED_RESOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.png") - -+include_directories(${SAMPLERATE_INCLUDE_DIRS}) -+link_directories(${SAMPLERATE_LIBRARY_DIRS}) diff --git a/audio/lmms/files/patch-plugins_triple__oscillator_CMakeLists.txt b/audio/lmms/files/patch-plugins_triple__oscillator_CMakeLists.txt deleted file mode 100644 index dfa276859a9..00000000000 --- a/audio/lmms/files/patch-plugins_triple__oscillator_CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ ---- plugins/triple_oscillator/CMakeLists.txt.orig 2015-03-08 02:47:14 UTC -+++ plugins/triple_oscillator/CMakeLists.txt -@@ -1,3 +1,6 @@ - INCLUDE(BuildPlugin) - - BUILD_PLUGIN(tripleoscillator TripleOscillator.cpp TripleOscillator.h MOCFILES TripleOscillator.h EMBEDDED_RESOURCES ${CMAKE_CURRENT_SOURCE_DIR}/*.png) -+ -+include_directories(${SAMPLERATE_INCLUDE_DIRS}) -+link_directories(${SAMPLERATE_LIBRARY_DIRS}) diff --git a/audio/lmms/files/patch-plugins_vibed_CMakeLists.txt b/audio/lmms/files/patch-plugins_vibed_CMakeLists.txt deleted file mode 100644 index 2265d5b0462..00000000000 --- a/audio/lmms/files/patch-plugins_vibed_CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ ---- plugins/vibed/CMakeLists.txt.orig 2015-03-08 02:47:14 UTC -+++ plugins/vibed/CMakeLists.txt -@@ -1,3 +1,6 @@ - INCLUDE(BuildPlugin) - - BUILD_PLUGIN(vibedstrings vibed.cpp nine_button_selector.cpp string_container.cpp vibrating_string.cpp vibed.h nine_button_selector.h string_container.h vibrating_string.h MOCFILES vibed.h nine_button_selector.h EMBEDDED_RESOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.png") -+ -+include_directories(${SAMPLERATE_INCLUDE_DIRS}) -+link_directories(${SAMPLERATE_LIBRARY_DIRS}) diff --git a/audio/lmms/files/patch-plugins_watsyn_CMakeLists.txt b/audio/lmms/files/patch-plugins_watsyn_CMakeLists.txt deleted file mode 100644 index cfb5507c25e..00000000000 --- a/audio/lmms/files/patch-plugins_watsyn_CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ ---- plugins/watsyn/CMakeLists.txt.orig 2015-03-08 02:47:14 UTC -+++ plugins/watsyn/CMakeLists.txt -@@ -3,3 +3,6 @@ INCLUDE(BuildPlugin) - LINK_DIRECTORIES(${SAMPLERATE_LIBRARY_DIRS}) - LINK_LIBRARIES(${SAMPLERATE_LIBRARIES}) - BUILD_PLUGIN(watsyn Watsyn.cpp Watsyn.h MOCFILES Watsyn.h EMBEDDED_RESOURCES ${CMAKE_CURRENT_SOURCE_DIR}/*.png) -+ -+include_directories(${SAMPLERATE_INCLUDE_DIRS}) -+link_directories(${SAMPLERATE_LIBRARY_DIRS}) diff --git a/audio/lmms/files/patch-plugins_waveshaper_CMakeLists.txt b/audio/lmms/files/patch-plugins_waveshaper_CMakeLists.txt deleted file mode 100644 index 0442853f535..00000000000 --- a/audio/lmms/files/patch-plugins_waveshaper_CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ ---- plugins/waveshaper/CMakeLists.txt.orig 2015-03-08 02:47:14 UTC -+++ plugins/waveshaper/CMakeLists.txt -@@ -1,3 +1,6 @@ - INCLUDE(BuildPlugin) - - BUILD_PLUGIN(waveshaper waveshaper.cpp waveshaper_controls.cpp waveshaper_control_dialog.cpp MOCFILES waveshaper_controls.h waveshaper_control_dialog.h EMBEDDED_RESOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.png") -+ -+include_directories(${SAMPLERATE_INCLUDE_DIRS}) -+link_directories(${SAMPLERATE_LIBRARY_DIRS}) diff --git a/audio/lmms/files/patch-plugins_zynaddsubfx_CMakeLists.txt b/audio/lmms/files/patch-plugins_zynaddsubfx_CMakeLists.txt deleted file mode 100644 index ad8427bb025..00000000000 --- a/audio/lmms/files/patch-plugins_zynaddsubfx_CMakeLists.txt +++ /dev/null @@ -1,22 +0,0 @@ ---- plugins/zynaddsubfx/CMakeLists.txt.orig 2015-03-08 02:47:14 UTC -+++ plugins/zynaddsubfx/CMakeLists.txt -@@ -49,6 +49,7 @@ INCLUDE_DIRECTORIES("${FLTK_INCLUDE_DIR} - "${CMAKE_BINARY_DIR}") - - include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/zynaddsubfx/src/UI) -+link_directories(${FFTW3F_LIBRARY_DIRS}) - - ADD_DEFINITIONS(-DPLUGINVERSION) # removes exit confirmation dialogs etc. in MasterUI.fl - add_subdirectory(zynaddsubfx/src/Nio) -@@ -137,11 +138,6 @@ IF(LMMS_BUILD_WIN32) - TARGET_LINK_LIBRARIES(RemoteZynAddSubFx ${QT_LIBRARIES}) - ENDIF(LMMS_BUILD_WIN32) - --# FLTK needs X --IF(LMMS_BUILD_LINUX) -- TARGET_LINK_LIBRARIES(RemoteZynAddSubFx -ldl) --ENDIF(LMMS_BUILD_LINUX) -- - - IF(LMMS_BUILD_WIN32) - ADD_CUSTOM_COMMAND(TARGET ZynAddSubFxCore POST_BUILD COMMAND "${STRIP}" "\"${CMAKE_CURRENT_BINARY_DIR}/libZynAddSubFxCore.dll\"") diff --git a/audio/lmms/files/patch-src_3rdparty_rpmalloc_rpmalloc_rpmalloc_rpmalloc.c b/audio/lmms/files/patch-src_3rdparty_rpmalloc_rpmalloc_rpmalloc_rpmalloc.c new file mode 100644 index 00000000000..36e7570ec89 --- /dev/null +++ b/audio/lmms/files/patch-src_3rdparty_rpmalloc_rpmalloc_rpmalloc_rpmalloc.c @@ -0,0 +1,11 @@ +--- src/3rdparty/rpmalloc/rpmalloc/rpmalloc/rpmalloc.c.orig 2018-07-14 14:17:12 UTC ++++ src/3rdparty/rpmalloc/rpmalloc/rpmalloc/rpmalloc.c +@@ -1627,6 +1627,8 @@ _memory_map_os(size_t size, size_t* offset) { + #else + # if defined(__APPLE__) + void* ptr = mmap(0, size + padding, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS | MAP_UNINITIALIZED, (_memory_huge_pages ? VM_FLAGS_SUPERPAGE_SIZE_2MB : -1), 0); ++# elif defined(__FreeBSD__) ++ void* ptr = mmap(0, size + padding, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS | MAP_UNINITIALIZED, -1, 0); + # else + void* ptr = mmap(0, size + padding, PROT_READ | PROT_WRITE, (_memory_huge_pages ? MAP_HUGETLB : 0) | MAP_PRIVATE | MAP_ANONYMOUS | MAP_UNINITIALIZED, -1, 0); + # endif diff --git a/audio/lmms/files/patch-src_core_main.cpp b/audio/lmms/files/patch-src_core_main.cpp deleted file mode 100644 index eeb8f2d0389..00000000000 --- a/audio/lmms/files/patch-src_core_main.cpp +++ /dev/null @@ -1,11 +0,0 @@ ---- src/core/main.cpp.orig 2018-07-02 13:15:50 UTC -+++ src/core/main.cpp -@@ -156,7 +156,7 @@ int main( int argc, char * * argv ) - "License as published by the Free Software Foundation; either\n" - "version 2 of the License, or (at your option) any later version.\n\n" - "Try \"%s --help\" for more information.\n\n", LMMS_VERSION, -- PLATFORM, MACHINE, QT_VERSION_STR, GCC_VERSION, -+ PLATFORM, MACHINE, QT_VERSION_STR, __VERSION__, - argv[0] ); - - return( EXIT_SUCCESS ); diff --git a/audio/lmms/files/patch-src_gui_about__dialog.cpp b/audio/lmms/files/patch-src_gui_about__dialog.cpp deleted file mode 100644 index c817395895f..00000000000 --- a/audio/lmms/files/patch-src_gui_about__dialog.cpp +++ /dev/null @@ -1,11 +0,0 @@ ---- src/gui/about_dialog.cpp.orig 2018-07-02 13:46:00 UTC -+++ src/gui/about_dialog.cpp -@@ -46,7 +46,7 @@ aboutDialog::aboutDialog() : - arg( PLATFORM ). - arg( MACHINE ). - arg( QT_VERSION_STR ). -- arg( GCC_VERSION ) ); -+ arg( __VERSION__ ) ); - - authorLabel->setPlainText( embed::getText( "AUTHORS" ) ); - diff --git a/audio/lmms/pkg-plist b/audio/lmms/pkg-plist index 34e8d90cbba..8c582e47736 100644 --- a/audio/lmms/pkg-plist +++ b/audio/lmms/pkg-plist @@ -1,8 +1,14 @@ bin/lmms +include/lmms/AboutDialog.h +include/lmms/ActionGroup.h +include/lmms/AtomicInt.h include/lmms/AudioAlsa.h +include/lmms/AudioAlsaSetupWidget.h include/lmms/AudioDevice.h +include/lmms/AudioDeviceSetupWidget.h include/lmms/AudioDummy.h include/lmms/AudioFileDevice.h +include/lmms/AudioFileMP3.h include/lmms/AudioFileOgg.h include/lmms/AudioFileWave.h include/lmms/AudioJack.h @@ -12,15 +18,29 @@ include/lmms/AudioPortAudio.h include/lmms/AudioPulseAudio.h include/lmms/AudioSampleRecorder.h include/lmms/AudioSdl.h +include/lmms/AudioSndio.h +include/lmms/AudioSoundIo.h +include/lmms/AudioWeakJack.h +include/lmms/AutomatableButton.h include/lmms/AutomatableModel.h include/lmms/AutomatableModelView.h +include/lmms/AutomatableSlider.h include/lmms/AutomationEditor.h include/lmms/AutomationPattern.h include/lmms/AutomationPatternView.h include/lmms/AutomationTrack.h +include/lmms/BBEditor.h +include/lmms/BBTrack.h +include/lmms/BBTrackContainer.h include/lmms/BandLimitedWave.h +include/lmms/BasicFilters.h +include/lmms/BufferManager.h +include/lmms/CPULoadWidget.h +include/lmms/CaptionMenu.h include/lmms/Clipboard.h +include/lmms/ComboBox.h include/lmms/ComboBoxModel.h +include/lmms/ConfigManager.h include/lmms/Controller.h include/lmms/ControllerConnection.h include/lmms/ControllerConnectionDialog.h @@ -28,11 +48,14 @@ include/lmms/ControllerDialog.h include/lmms/ControllerRackView.h include/lmms/ControllerView.h include/lmms/DataFile.h +include/lmms/Delay.h include/lmms/DetuningHelper.h +include/lmms/DrumSynth.h include/lmms/DspEffectLibrary.h include/lmms/DummyEffect.h include/lmms/DummyInstrument.h include/lmms/DummyPlugin.h +include/lmms/Editor.h include/lmms/Effect.h include/lmms/EffectChain.h include/lmms/EffectControlDialog.h @@ -40,13 +63,21 @@ include/lmms/EffectControls.h include/lmms/EffectRackView.h include/lmms/EffectSelectDialog.h include/lmms/EffectView.h +include/lmms/Engine.h include/lmms/EnvelopeAndLfoParameters.h include/lmms/EnvelopeAndLfoView.h +include/lmms/ExportFilter.h +include/lmms/ExportProjectDialog.h +include/lmms/FadeButton.h +include/lmms/Fader.h include/lmms/FileBrowser.h include/lmms/FileDialog.h include/lmms/FxLine.h include/lmms/FxMixer.h include/lmms/FxMixerView.h +include/lmms/Graph.h +include/lmms/GroupBox.h +include/lmms/GuiApplication.h include/lmms/ImportFilter.h include/lmms/InlineAutomation.h include/lmms/Instrument.h @@ -58,31 +89,46 @@ include/lmms/InstrumentSoundShaping.h include/lmms/InstrumentSoundShapingView.h include/lmms/InstrumentTrack.h include/lmms/InstrumentView.h +include/lmms/IoHelper.h include/lmms/JournallingObject.h +include/lmms/Knob.h +include/lmms/Ladspa2LMMS.h include/lmms/LadspaBase.h include/lmms/LadspaControl.h include/lmms/LadspaControlView.h +include/lmms/LadspaManager.h include/lmms/LcdSpinBox.h include/lmms/LcdWidget.h +include/lmms/LedCheckbox.h +include/lmms/LeftRightNav.h include/lmms/LfoController.h include/lmms/LmmsPalette.h include/lmms/LmmsStyle.h +include/lmms/LocaleHelper.h +include/lmms/LocklessAllocator.h +include/lmms/LocklessList.h +include/lmms/MainApplication.h include/lmms/MainWindow.h include/lmms/MemoryHelper.h +include/lmms/MemoryManager.h include/lmms/MeterDialog.h include/lmms/MeterModel.h include/lmms/MicroTimer.h include/lmms/Midi.h include/lmms/MidiAlsaRaw.h include/lmms/MidiAlsaSeq.h +include/lmms/MidiApple.h include/lmms/MidiClient.h include/lmms/MidiController.h include/lmms/MidiDummy.h include/lmms/MidiEvent.h include/lmms/MidiEventProcessor.h +include/lmms/MidiJack.h include/lmms/MidiOss.h include/lmms/MidiPort.h include/lmms/MidiPortMenu.h +include/lmms/MidiSetupWidget.h +include/lmms/MidiSndio.h include/lmms/MidiTime.h include/lmms/MidiWinMM.h include/lmms/MixHelpers.h @@ -91,112 +137,97 @@ include/lmms/MixerProfiler.h include/lmms/MixerWorkerThread.h include/lmms/Model.h include/lmms/ModelView.h +include/lmms/NStateButton.h +include/lmms/Note.h include/lmms/NotePlayHandle.h include/lmms/Oscillator.h +include/lmms/OutputSettings.h include/lmms/Pattern.h include/lmms/PeakController.h include/lmms/Piano.h include/lmms/PianoRoll.h include/lmms/PianoView.h include/lmms/Pitch.h +include/lmms/PixmapButton.h include/lmms/PlayHandle.h include/lmms/Plugin.h +include/lmms/PluginBrowser.h +include/lmms/PluginFactory.h include/lmms/PluginView.h include/lmms/PresetPreviewPlayHandle.h include/lmms/ProjectJournal.h +include/lmms/ProjectNotes.h include/lmms/ProjectRenderer.h +include/lmms/ProjectVersion.h include/lmms/RemotePlugin.h +include/lmms/RenameDialog.h +include/lmms/RenderManager.h +include/lmms/RingBuffer.h include/lmms/RmsHelper.h +include/lmms/RowTableView.h +include/lmms/Rubberband.h include/lmms/SampleBuffer.h include/lmms/SamplePlayHandle.h include/lmms/SampleRecordHandle.h include/lmms/SampleTrack.h include/lmms/SendButtonIndicator.h include/lmms/SerializingObject.h +include/lmms/SetupDialog.h include/lmms/SideBar.h include/lmms/SideBarWidget.h +include/lmms/Song.h include/lmms/SongEditor.h +include/lmms/StringPairDrag.h +include/lmms/SubWindow.h include/lmms/SweepOscillator.h +include/lmms/TabBar.h +include/lmms/TabButton.h +include/lmms/TabWidget.h include/lmms/TempoSyncKnob.h include/lmms/TempoSyncKnobModel.h +include/lmms/TextFloat.h include/lmms/ThreadableJob.h include/lmms/TimeDisplayWidget.h +include/lmms/TimeLineWidget.h +include/lmms/ToolButton.h include/lmms/ToolPlugin.h include/lmms/ToolPluginView.h +include/lmms/ToolTip.h +include/lmms/Track.h include/lmms/TrackContainer.h include/lmms/TrackContainerView.h +include/lmms/TrackLabelButton.h +include/lmms/TrackRenameLineEdit.h +include/lmms/ValueBuffer.h include/lmms/VersionedSaveDialog.h +include/lmms/VisualizationWidget.h include/lmms/VstSyncController.h include/lmms/VstSyncData.h -include/lmms/about_dialog.h include/lmms/aeffectx.h -include/lmms/atomic_int.h -include/lmms/automatable_button.h -include/lmms/automatable_slider.h include/lmms/base64.h -include/lmms/basic_filters.h -include/lmms/bb_editor.h -include/lmms/bb_track.h -include/lmms/bb_track_container.h -include/lmms/caption_menu.h -include/lmms/combobox.h -include/lmms/config_mgr.h -include/lmms/cpuload_widget.h include/lmms/custom_events.h include/lmms/debug.h -include/lmms/drumsynth.h +include/lmms/denormals.h include/lmms/embed.cpp include/lmms/embed.h include/lmms/endian_handling.h -include/lmms/engine.h include/lmms/export.h -include/lmms/export_project_dialog.h -include/lmms/fade_button.h -include/lmms/fader.h include/lmms/fft_helpers.h include/lmms/fifo_buffer.h -include/lmms/graph.h -include/lmms/group_box.h include/lmms/gui_templates.h include/lmms/interpolation.h -include/lmms/knob.h include/lmms/ladspa.h -include/lmms/ladspa_2_lmms.h -include/lmms/ladspa_manager.h -include/lmms/led_checkbox.h include/lmms/lmms_basics.h include/lmms/lmms_constants.h include/lmms/lmms_math.h include/lmms/lmmsconfig.h include/lmms/lmmsversion.h -include/lmms/note.h -include/lmms/nstate_button.h include/lmms/panning.h include/lmms/panning_constants.h -include/lmms/pixmap_button.h -include/lmms/plugin_browser.h -include/lmms/project_notes.h -include/lmms/project_version.h -include/lmms/rename_dialog.h -include/lmms/rubberband.h -include/lmms/setup_dialog.h include/lmms/shared_object.h -include/lmms/song.h -include/lmms/string_pair_drag.h -include/lmms/tab_bar.h -include/lmms/tab_button.h -include/lmms/tab_widget.h include/lmms/templates.h -include/lmms/text_float.h -include/lmms/timeline.h -include/lmms/tool_button.h -include/lmms/tooltip.h -include/lmms/track.h -include/lmms/track_label_button.h -include/lmms/transformable_auto_model.h include/lmms/update_event.h include/lmms/versioninfo.h -include/lmms/visualization_widget.h include/lmms/volume.h lib/lmms/RemoteZynAddSubFx lib/lmms/libOPL2.so @@ -204,23 +235,29 @@ lib/lmms/libZynAddSubFxCore.so lib/lmms/libamplifier.so lib/lmms/libaudiofileprocessor.so lib/lmms/libbassbooster.so +lib/lmms/libbitcrush.so lib/lmms/libbitinvader.so +lib/lmms/libcrossovereq.so lib/lmms/libdelay.so lib/lmms/libdualfilter.so lib/lmms/libdynamicsprocessor.so -lib/lmms/libflpimport.so +lib/lmms/libeq.so +lib/lmms/libflanger.so lib/lmms/libhydrogenimport.so lib/lmms/libkicker.so lib/lmms/libladspabrowser.so lib/lmms/libladspaeffect.so lib/lmms/liblb302.so +lib/lmms/libmidiexport.so lib/lmms/libmidiimport.so lib/lmms/libmonstro.so +lib/lmms/libmultitapecho.so lib/lmms/libnes.so lib/lmms/liborganic.so lib/lmms/libpapu.so lib/lmms/libpatman.so lib/lmms/libpeakcontrollereffect.so +lib/lmms/libreverbsc.so lib/lmms/libsf2player.so lib/lmms/libsfxr.so lib/lmms/libsid.so @@ -232,10 +269,39 @@ lib/lmms/libvibedstrings.so lib/lmms/libwatsyn.so lib/lmms/libwaveshaper.so lib/lmms/libzynaddsubfx.so +man/man1/lmms.1.gz share/applications/lmms.desktop +share/icons/hicolor/128x128/apps/lmms.png +share/icons/hicolor/128x128/mimetypes/application-x-lmms-project.png +share/icons/hicolor/128x128@2/apps/lmms.png +share/icons/hicolor/128x128@2/mimetypes/application-x-lmms-project.png +share/icons/hicolor/16x16/apps/lmms.png +share/icons/hicolor/16x16/mimetypes/application-x-lmms-project.png +share/icons/hicolor/16x16@2/apps/lmms.png +share/icons/hicolor/16x16@2/mimetypes/application-x-lmms-project.png +share/icons/hicolor/24x24/apps/lmms.png +share/icons/hicolor/24x24/mimetypes/application-x-lmms-project.png +share/icons/hicolor/24x24@2/apps/lmms.png +share/icons/hicolor/24x24@2/mimetypes/application-x-lmms-project.png +share/icons/hicolor/32x32/apps/lmms.png +share/icons/hicolor/32x32/mimetypes/application-x-lmms-project.png +share/icons/hicolor/32x32@2/apps/lmms.png +share/icons/hicolor/32x32@2/mimetypes/application-x-lmms-project.png +share/icons/hicolor/48x48/apps/lmms.png +share/icons/hicolor/48x48/mimetypes/application-x-lmms-project.png +share/icons/hicolor/48x48@2/apps/lmms.png +share/icons/hicolor/48x48@2/mimetypes/application-x-lmms-project.png +share/icons/hicolor/64x64/apps/lmms.png +share/icons/hicolor/64x64/mimetypes/application-x-lmms-project.png +share/icons/hicolor/64x64@2/apps/lmms.png +share/icons/hicolor/64x64@2/mimetypes/application-x-lmms-project.png +share/icons/hicolor/scalable/apps/lmms.svg +share/icons/hicolor/scalable/mimetypes/application-x-lmms-project.svg %%DATADIR%%/backgrounds/lmms_tile.png %%DATADIR%%/backgrounds/newbg.png %%DATADIR%%/backgrounds/vinnie.png +%%DATADIR%%/locale/ar.qm +%%DATADIR%%/locale/bs.qm %%DATADIR%%/locale/ca.qm %%DATADIR%%/locale/cs.qm %%DATADIR%%/locale/de.qm @@ -244,6 +310,7 @@ share/applications/lmms.desktop %%DATADIR%%/locale/fa.qm %%DATADIR%%/locale/fr.qm %%DATADIR%%/locale/gl.qm +%%DATADIR%%/locale/hu_HU.qm %%DATADIR%%/locale/it.qm %%DATADIR%%/locale/ja.qm %%DATADIR%%/locale/ko.qm @@ -251,8 +318,12 @@ share/applications/lmms.desktop %%DATADIR%%/locale/pl.qm %%DATADIR%%/locale/pt.qm %%DATADIR%%/locale/ru.qm +%%DATADIR%%/locale/sl.qm +%%DATADIR%%/locale/sr.qm %%DATADIR%%/locale/sv.qm -%%DATADIR%%/locale/zh.qm +%%DATADIR%%/locale/uk.qm +%%DATADIR%%/locale/zh_CN.qm +%%DATADIR%%/locale/zh_TW.qm %%DATADIR%%/presets/AudioFileProcessor/Bass-Mania.xpf %%DATADIR%%/presets/AudioFileProcessor/Erazor.xpf %%DATADIR%%/presets/AudioFileProcessor/Fat-Reversed-Kick.xpf @@ -1043,10 +1114,6 @@ share/applications/lmms.desktop %%DATADIR%%/presets/ZynAddSubFX/Rhodes/0065-Steel Rhodes.xiz %%DATADIR%%/presets/ZynAddSubFX/Rhodes/0067-RhodesPad1.xiz %%DATADIR%%/presets/ZynAddSubFX/Rhodes/0068-RhodesPad2.xiz -%%DATADIR%%/presets/ZynAddSubFX/Splited/0001-Strings and Reed1.xiz -%%DATADIR%%/presets/ZynAddSubFX/Splited/0002-Strings and Reed2.xiz -%%DATADIR%%/presets/ZynAddSubFX/Splited/0003-Strings and Flute.xiz -%%DATADIR%%/presets/ZynAddSubFX/Splited/0033-Choir and Reed.xiz %%DATADIR%%/presets/ZynAddSubFX/Splitted/0001-Strings and Reed1.xiz %%DATADIR%%/presets/ZynAddSubFX/Splitted/0002-Strings and Reed2.xiz %%DATADIR%%/presets/ZynAddSubFX/Splitted/0003-Strings and Flute.xiz @@ -1364,52 +1431,53 @@ share/applications/lmms.desktop %%DATADIR%%/presets/ZynAddSubFX/the_mysterious_bank_4/0036-organ_not_distorted.xiz %%DATADIR%%/presets/ZynAddSubFX/the_mysterious_bank_4/0037-old_organ.xiz %%DATADIR%%/presets/ZynAddSubFX/the_mysterious_bank_4/0039-jazz_guitar.xiz -%%DATADIR%%/projects/CoolSongs/Alf42red-Mauiwowi.mmpz -%%DATADIR%%/projects/CoolSongs/CapDan/CapDan-TwilightArea-OriginalByAlf42red.mmpz -%%DATADIR%%/projects/CoolSongs/CapDan/CapDan-ZeroSumGame-OriginalByZakarra.mmpz -%%DATADIR%%/projects/CoolSongs/Farbro-Tectonic.mmpz -%%DATADIR%%/projects/CoolSongs/Greippi-ardudar.mmpz -%%DATADIR%%/projects/CoolSongs/Impulslogik-Zen.mmpz -%%DATADIR%%/projects/CoolSongs/Momo64-esp.mmpz -%%DATADIR%%/projects/CoolSongs/Namitryus-K-Project.mmpz -%%DATADIR%%/projects/CoolSongs/Oglsdl-Dr8v2.mmpz -%%DATADIR%%/projects/CoolSongs/Popsip-Electric Dancer.mmpz -%%DATADIR%%/projects/CoolSongs/Root84-Initialize.mmpz -%%DATADIR%%/projects/CoolSongs/Saber-FinalStep.mmpz -%%DATADIR%%/projects/CoolSongs/Settel-InnerRecreation.mmpz -%%DATADIR%%/projects/CoolSongs/Skiessi/Skiessi-Onion.mmpz -%%DATADIR%%/projects/CoolSongs/Skiessi/Skiessi-RandomProjectNumber14253.mmpz -%%DATADIR%%/projects/CoolSongs/Skiessi/Skiessi-TurningPoint.mmpz -%%DATADIR%%/projects/CoolSongs/Socceroos-Progress.mmpz -%%DATADIR%%/projects/CoolSongs/StrictProduction-DearJonDoe.mmp -%%DATADIR%%/projects/CoolSongs/TameAnderson-MakeMe.mmpz -%%DATADIR%%/projects/CoolSongs/Thaledric-Armageddon.mmpz -%%DATADIR%%/projects/CoolSongs/TobyDox-Psycho.mmpz -%%DATADIR%%/projects/CoolSongs/Zakarra/Zakarra-59_Degrees.mmpz -%%DATADIR%%/projects/CoolSongs/Zakarra/Zakarra-MainstreamMemory.mmpz -%%DATADIR%%/projects/CoolSongs/Zakarra/Zakarra-OneDay.mmpz -%%DATADIR%%/projects/CoolSongs/unfa-Spoken.mmpz -%%DATADIR%%/projects/Demos/AngryLlama-NewFangled.mmpz -%%DATADIR%%/projects/Demos/Ashore.mmpz -%%DATADIR%%/projects/Demos/CapDan-ReggaeTry.mmpz -%%DATADIR%%/projects/Demos/CapDan-ReggaetonTry.mmpz -%%DATADIR%%/projects/Demos/DnB.mmpz -%%DATADIR%%/projects/Demos/EsoXLB-CPU.mmpz -%%DATADIR%%/projects/Demos/Oglsdl-PpTrip.mmpz -%%DATADIR%%/projects/Demos/Shovon-ProgressiveHousePluckDemo.mmpz -%%DATADIR%%/projects/Demos/Skiessi-C64.mmpz -%%DATADIR%%/projects/Demos/Thomasso-AxeFromThe80s.mmpz -%%DATADIR%%/projects/Shorties/Crunk(Demo).mmp -%%DATADIR%%/projects/Shorties/Greshz-CoolSnip.mmpz -%%DATADIR%%/projects/Shorties/Root84-TrancyLoop.mmpz -%%DATADIR%%/projects/Shorties/Skiessi-222.mmpz -%%DATADIR%%/projects/Shorties/Surrender-Main.mmpz -%%DATADIR%%/projects/Shorties/sv-DnB-Startup.mmpz -%%DATADIR%%/projects/Shorties/sv-Trance-Startup.mmpz +%%DATADIR%%/projects/demos/Alf42red-Mauiwowi.mmpz +%%DATADIR%%/projects/demos/AngryLlama-NewFangled.mmpz +%%DATADIR%%/projects/demos/Ashore.mmpz +%%DATADIR%%/projects/demos/CapDan/CapDan-ReggaeTry.mmpz +%%DATADIR%%/projects/demos/CapDan/CapDan-ReggaetonTry.mmpz +%%DATADIR%%/projects/demos/CapDan/CapDan-TwilightArea-OriginalByAlf42red.mmpz +%%DATADIR%%/projects/demos/CapDan/CapDan-ZeroSumGame-OriginalByZakarra.mmpz +%%DATADIR%%/projects/demos/DnB.mmpz +%%DATADIR%%/projects/demos/EsoXLB-CPU.mmpz +%%DATADIR%%/projects/demos/Farbro-Tectonic.mmpz +%%DATADIR%%/projects/demos/Greippi - Krem Kaakkuja (Second Flight Remix).mmpz +%%DATADIR%%/projects/demos/Impulslogik-Zen.mmpz +%%DATADIR%%/projects/demos/Jousboxx-BuzzerBeater.mmpz +%%DATADIR%%/projects/demos/Momo64-esp.mmpz +%%DATADIR%%/projects/demos/Namitryus-K-Project.mmpz +%%DATADIR%%/projects/demos/Oglsdl-Dr8v2.mmpz +%%DATADIR%%/projects/demos/Oglsdl-PpTrip.mmpz +%%DATADIR%%/projects/demos/Popsip-Electric Dancer.mmpz +%%DATADIR%%/projects/demos/Root84-Initialize.mmpz +%%DATADIR%%/projects/demos/Saber-FinalStep.mmpz +%%DATADIR%%/projects/demos/Settel-InnerRecreation.mmpz +%%DATADIR%%/projects/demos/Shovon-ProgressiveHousePluckDemo.mmpz +%%DATADIR%%/projects/demos/Skiessi/Skiessi-C64.mmpz +%%DATADIR%%/projects/demos/Skiessi/Skiessi-Onion.mmpz +%%DATADIR%%/projects/demos/Skiessi/Skiessi-RandomProjectNumber14253.mmpz +%%DATADIR%%/projects/demos/Skiessi/Skiessi-TurningPoint.mmpz +%%DATADIR%%/projects/demos/Socceroos-Progress.mmpz +%%DATADIR%%/projects/demos/StrictProduction-DearJonDoe.mmp +%%DATADIR%%/projects/demos/TameAnderson-MakeMe.mmpz +%%DATADIR%%/projects/demos/Thaledric-Armageddon.mmpz +%%DATADIR%%/projects/demos/Thomasso-AxeFromThe80s.mmpz +%%DATADIR%%/projects/demos/TobyDox-Psycho.mmpz +%%DATADIR%%/projects/demos/unfa-Spoken.mmpz +%%DATADIR%%/projects/shorties/Crunk(Demo).mmp +%%DATADIR%%/projects/shorties/DirtyLove.mmpz +%%DATADIR%%/projects/shorties/Greshz-CoolSnip.mmpz +%%DATADIR%%/projects/shorties/Root84-TrancyLoop.mmpz +%%DATADIR%%/projects/shorties/Skiessi-222.mmpz +%%DATADIR%%/projects/shorties/Surrender-Main.mmpz +%%DATADIR%%/projects/shorties/sv-DnB-Startup.mmpz +%%DATADIR%%/projects/shorties/sv-Trance-Startup.mmpz %%DATADIR%%/projects/templates/AcousticDrumset.mpt %%DATADIR%%/projects/templates/CR8000.mpt %%DATADIR%%/projects/templates/ClubMix.mpt +%%DATADIR%%/projects/templates/Empty.mpt %%DATADIR%%/projects/templates/TR808.mpt +%%DATADIR%%/projects/templates/default.mpt %%DATADIR%%/projects/tutorials/editing_note_volumes.mmp %%DATADIR%%/samples/basses/bass01.ogg %%DATADIR%%/samples/basses/bass_acid01.ogg @@ -1426,16 +1494,16 @@ share/applications/lmms.desktop %%DATADIR%%/samples/basses/synth_acid01.ogg %%DATADIR%%/samples/basses/synth_acid02.ogg %%DATADIR%%/samples/basses/techno_synth01.ogg -%%DATADIR%%/samples/bassloopes/briff01.ogg -%%DATADIR%%/samples/bassloopes/rave_bass01.ogg -%%DATADIR%%/samples/bassloopes/rave_bass02.ogg -%%DATADIR%%/samples/bassloopes/tb303_01.ogg -%%DATADIR%%/samples/bassloopes/techno_bass01.ogg -%%DATADIR%%/samples/bassloopes/techno_bass02.ogg -%%DATADIR%%/samples/bassloopes/techno_synth01.ogg -%%DATADIR%%/samples/bassloopes/techno_synth02.ogg -%%DATADIR%%/samples/bassloopes/techno_synth03.ogg -%%DATADIR%%/samples/bassloopes/techno_synth04.ogg +%%DATADIR%%/samples/bassloops/briff01.ogg +%%DATADIR%%/samples/bassloops/rave_bass01.ogg +%%DATADIR%%/samples/bassloops/rave_bass02.ogg +%%DATADIR%%/samples/bassloops/tb303_01.ogg +%%DATADIR%%/samples/bassloops/techno_bass01.ogg +%%DATADIR%%/samples/bassloops/techno_bass02.ogg +%%DATADIR%%/samples/bassloops/techno_synth01.ogg +%%DATADIR%%/samples/bassloops/techno_synth02.ogg +%%DATADIR%%/samples/bassloops/techno_synth03.ogg +%%DATADIR%%/samples/bassloops/techno_synth04.ogg %%DATADIR%%/samples/beats/909beat01.ogg %%DATADIR%%/samples/beats/break01.ogg %%DATADIR%%/samples/beats/break02.ogg @@ -2333,6 +2401,7 @@ share/applications/lmms.desktop %%DATADIR%%/samples/misc/hit02.ogg %%DATADIR%%/samples/misc/metalish_dong01.ogg %%DATADIR%%/samples/misc/metronome01.ogg +%%DATADIR%%/samples/misc/metronome02.ogg %%DATADIR%%/samples/misc/raving_crowd01.ogg %%DATADIR%%/samples/misc/snaph01.ogg %%DATADIR%%/samples/misc/undefined01.ogg @@ -2414,9 +2483,251 @@ share/applications/lmms.desktop %%DATADIR%%/samples/waveforms/w2_sawsine.flac %%DATADIR%%/samples/waveforms/w2_sharp.flac %%DATADIR%%/samples/waveforms/w2_w-wave.flac +%%DATADIR%%/themes/classic/add.png +%%DATADIR%%/themes/classic/add_automation.png +%%DATADIR%%/themes/classic/add_bb_track.png +%%DATADIR%%/themes/classic/add_folder.png +%%DATADIR%%/themes/classic/add_sample_track.png +%%DATADIR%%/themes/classic/analysis.png +%%DATADIR%%/themes/classic/apply-selected.png +%%DATADIR%%/themes/classic/apply.png +%%DATADIR%%/themes/classic/arp_down.png +%%DATADIR%%/themes/classic/arp_free.png +%%DATADIR%%/themes/classic/arp_random.png +%%DATADIR%%/themes/classic/arp_sort.png +%%DATADIR%%/themes/classic/arp_sync.png +%%DATADIR%%/themes/classic/arp_up.png +%%DATADIR%%/themes/classic/arp_up_and_down.png +%%DATADIR%%/themes/classic/automation.png +%%DATADIR%%/themes/classic/automation_track.png +%%DATADIR%%/themes/classic/autoscroll_off.png +%%DATADIR%%/themes/classic/autoscroll_on.png +%%DATADIR%%/themes/classic/back_to_start.png +%%DATADIR%%/themes/classic/back_to_zero.png +%%DATADIR%%/themes/classic/background_artwork.png +%%DATADIR%%/themes/classic/bb_track.png +%%DATADIR%%/themes/classic/bb_track_btn.png +%%DATADIR%%/themes/classic/black_key.png +%%DATADIR%%/themes/classic/black_key_pressed.png +%%DATADIR%%/themes/classic/cancel.png +%%DATADIR%%/themes/classic/chord.png +%%DATADIR%%/themes/classic/clock.png +%%DATADIR%%/themes/classic/close.png +%%DATADIR%%/themes/classic/colorize.png +%%DATADIR%%/themes/classic/combobox_arrow.png +%%DATADIR%%/themes/classic/combobox_arrow_selected.png +%%DATADIR%%/themes/classic/combobox_bg.png +%%DATADIR%%/themes/classic/computer.png +%%DATADIR%%/themes/classic/controller.png +%%DATADIR%%/themes/classic/cpuload_bg.png +%%DATADIR%%/themes/classic/cpuload_leds.png +%%DATADIR%%/themes/classic/dont_know.png +%%DATADIR%%/themes/classic/drum.png +%%DATADIR%%/themes/classic/edit_copy.png +%%DATADIR%%/themes/classic/edit_cut.png +%%DATADIR%%/themes/classic/edit_draw.png +%%DATADIR%%/themes/classic/edit_erase.png +%%DATADIR%%/themes/classic/edit_move.png +%%DATADIR%%/themes/classic/edit_paste.png +%%DATADIR%%/themes/classic/edit_redo.png +%%DATADIR%%/themes/classic/edit_rename.png +%%DATADIR%%/themes/classic/edit_select.png +%%DATADIR%%/themes/classic/edit_undo.png +%%DATADIR%%/themes/classic/effect_plugin.png +%%DATADIR%%/themes/classic/envelope_graph.png +%%DATADIR%%/themes/classic/error.png +%%DATADIR%%/themes/classic/exit.png +%%DATADIR%%/themes/classic/exp_wave_active.png +%%DATADIR%%/themes/classic/exp_wave_inactive.png +%%DATADIR%%/themes/classic/factory_files.png +%%DATADIR%%/themes/classic/fader_background.png +%%DATADIR%%/themes/classic/fader_knob.png +%%DATADIR%%/themes/classic/fader_leds.png +%%DATADIR%%/themes/classic/filter_2lp.png +%%DATADIR%%/themes/classic/filter_ap.png +%%DATADIR%%/themes/classic/filter_bp.png +%%DATADIR%%/themes/classic/filter_hp.png +%%DATADIR%%/themes/classic/filter_lp.png +%%DATADIR%%/themes/classic/filter_notch.png +%%DATADIR%%/themes/classic/flip_x.png +%%DATADIR%%/themes/classic/flip_y.png +%%DATADIR%%/themes/classic/folder.png +%%DATADIR%%/themes/classic/folder_locked.png +%%DATADIR%%/themes/classic/folder_opened.png +%%DATADIR%%/themes/classic/freeze.png +%%DATADIR%%/themes/classic/frozen.png +%%DATADIR%%/themes/classic/fx_mixer.png +%%DATADIR%%/themes/classic/hand.png +%%DATADIR%%/themes/classic/help.png +%%DATADIR%%/themes/classic/hint.png +%%DATADIR%%/themes/classic/home.png +%%DATADIR%%/themes/classic/hq_mode.png +%%DATADIR%%/themes/classic/icon.png +%%DATADIR%%/themes/classic/icon_small.png +%%DATADIR%%/themes/classic/instrument_track.png +%%DATADIR%%/themes/classic/keep_stop_position.png +%%DATADIR%%/themes/classic/knob01.png +%%DATADIR%%/themes/classic/knob02.png +%%DATADIR%%/themes/classic/knob03.png +%%DATADIR%%/themes/classic/knob05.png +%%DATADIR%%/themes/classic/lcd_19green.png +%%DATADIR%%/themes/classic/lcd_19red.png +%%DATADIR%%/themes/classic/lcd_21pink.png +%%DATADIR%%/themes/classic/led_green.png +%%DATADIR%%/themes/classic/led_off.png +%%DATADIR%%/themes/classic/led_red.png +%%DATADIR%%/themes/classic/led_yellow.png +%%DATADIR%%/themes/classic/lfo_controller_artwork.png +%%DATADIR%%/themes/classic/lfo_d100_active.png +%%DATADIR%%/themes/classic/lfo_d100_inactive.png +%%DATADIR%%/themes/classic/lfo_graph.png +%%DATADIR%%/themes/classic/lfo_x100_active.png +%%DATADIR%%/themes/classic/lfo_x100_inactive.png +%%DATADIR%%/themes/classic/lfo_x1_active.png +%%DATADIR%%/themes/classic/lfo_x1_inactive.png +%%DATADIR%%/themes/classic/loop_points_off.png +%%DATADIR%%/themes/classic/loop_points_on.png +%%DATADIR%%/themes/classic/main_slider.png +%%DATADIR%%/themes/classic/master_pitch.png +%%DATADIR%%/themes/classic/master_volume.png +%%DATADIR%%/themes/classic/maximize.png +%%DATADIR%%/themes/classic/metronome.png +%%DATADIR%%/themes/classic/midi_file.png +%%DATADIR%%/themes/classic/mixer_send_off.png +%%DATADIR%%/themes/classic/mixer_send_on.png +%%DATADIR%%/themes/classic/moog_saw_wave_active.png +%%DATADIR%%/themes/classic/moog_saw_wave_inactive.png +%%DATADIR%%/themes/classic/muted.png +%%DATADIR%%/themes/classic/new_channel.png +%%DATADIR%%/themes/classic/note.png +%%DATADIR%%/themes/classic/note_double_whole.png +%%DATADIR%%/themes/classic/note_eighth.png +%%DATADIR%%/themes/classic/note_half.png +%%DATADIR%%/themes/classic/note_none.png +%%DATADIR%%/themes/classic/note_quarter.png +%%DATADIR%%/themes/classic/note_sixteenth.png +%%DATADIR%%/themes/classic/note_thirtysecond.png +%%DATADIR%%/themes/classic/note_tripleteighth.png +%%DATADIR%%/themes/classic/note_triplethalf.png +%%DATADIR%%/themes/classic/note_tripletquarter.png +%%DATADIR%%/themes/classic/note_tripletsixteenth.png +%%DATADIR%%/themes/classic/note_tripletthirtysecond.png +%%DATADIR%%/themes/classic/note_whole.png +%%DATADIR%%/themes/classic/output_graph.png +%%DATADIR%%/themes/classic/pat_rec.png +%%DATADIR%%/themes/classic/pause.png +%%DATADIR%%/themes/classic/piano.png +%%DATADIR%%/themes/classic/play.png +%%DATADIR%%/themes/classic/playpos_marker.png +%%DATADIR%%/themes/classic/plugins.png +%%DATADIR%%/themes/classic/ports.png +%%DATADIR%%/themes/classic/pr_black_key.png +%%DATADIR%%/themes/classic/pr_black_key_pressed.png +%%DATADIR%%/themes/classic/pr_white_key_big.png +%%DATADIR%%/themes/classic/pr_white_key_big_pressed.png +%%DATADIR%%/themes/classic/pr_white_key_small.png +%%DATADIR%%/themes/classic/pr_white_key_small_pressed.png +%%DATADIR%%/themes/classic/preset_file.png +%%DATADIR%%/themes/classic/progression_cubic_hermite.png +%%DATADIR%%/themes/classic/progression_discrete.png +%%DATADIR%%/themes/classic/progression_linear.png +%%DATADIR%%/themes/classic/project_export.png +%%DATADIR%%/themes/classic/project_file.png +%%DATADIR%%/themes/classic/project_import.png +%%DATADIR%%/themes/classic/project_new.png +%%DATADIR%%/themes/classic/project_new_from_template.png +%%DATADIR%%/themes/classic/project_notes.png +%%DATADIR%%/themes/classic/project_open.png +%%DATADIR%%/themes/classic/project_open_down.png +%%DATADIR%%/themes/classic/project_open_recent.png +%%DATADIR%%/themes/classic/project_save.png +%%DATADIR%%/themes/classic/project_saveas.png +%%DATADIR%%/themes/classic/quantize.png +%%DATADIR%%/themes/classic/random_wave_active.png +%%DATADIR%%/themes/classic/random_wave_inactive.png +%%DATADIR%%/themes/classic/receive_bg_arrow.png +%%DATADIR%%/themes/classic/record.png +%%DATADIR%%/themes/classic/record_accompany.png +%%DATADIR%%/themes/classic/reload.png +%%DATADIR%%/themes/classic/restore.png +%%DATADIR%%/themes/classic/round_square_wave_active.png +%%DATADIR%%/themes/classic/round_square_wave_inactive.png +%%DATADIR%%/themes/classic/sample_file.png +%%DATADIR%%/themes/classic/sample_track.png +%%DATADIR%%/themes/classic/saw_wave_active.png +%%DATADIR%%/themes/classic/saw_wave_inactive.png +%%DATADIR%%/themes/classic/sbarrow_down.png +%%DATADIR%%/themes/classic/sbarrow_down_d.png +%%DATADIR%%/themes/classic/sbarrow_left.png +%%DATADIR%%/themes/classic/sbarrow_left_d.png +%%DATADIR%%/themes/classic/sbarrow_right.png +%%DATADIR%%/themes/classic/sbarrow_right_d.png +%%DATADIR%%/themes/classic/sbarrow_up.png +%%DATADIR%%/themes/classic/sbarrow_up_d.png +%%DATADIR%%/themes/classic/scale.png +%%DATADIR%%/themes/classic/send_bg_arrow.png +%%DATADIR%%/themes/classic/setup_audio.png +%%DATADIR%%/themes/classic/setup_directories.png +%%DATADIR%%/themes/classic/setup_general.png +%%DATADIR%%/themes/classic/setup_midi.png +%%DATADIR%%/themes/classic/setup_performance.png +%%DATADIR%%/themes/classic/sin_wave_active.png +%%DATADIR%%/themes/classic/sin_wave_inactive.png +%%DATADIR%%/themes/classic/songeditor.png +%%DATADIR%%/themes/classic/soundfont_file.png +%%DATADIR%%/themes/classic/splash.png +%%DATADIR%%/themes/classic/square_wave_active.png +%%DATADIR%%/themes/classic/square_wave_inactive.png +%%DATADIR%%/themes/classic/step_btn_add.png +%%DATADIR%%/themes/classic/step_btn_duplicate.png +%%DATADIR%%/themes/classic/step_btn_off.png +%%DATADIR%%/themes/classic/step_btn_off_light.png +%%DATADIR%%/themes/classic/step_btn_on_0.png +%%DATADIR%%/themes/classic/step_btn_on_200.png +%%DATADIR%%/themes/classic/step_btn_remove.png +%%DATADIR%%/themes/classic/stepper-down-press.png +%%DATADIR%%/themes/classic/stepper-down.png +%%DATADIR%%/themes/classic/stepper-left-press.png +%%DATADIR%%/themes/classic/stepper-left.png +%%DATADIR%%/themes/classic/stepper-right-press.png +%%DATADIR%%/themes/classic/stepper-right.png +%%DATADIR%%/themes/classic/stepper-up-press.png +%%DATADIR%%/themes/classic/stepper-up.png +%%DATADIR%%/themes/classic/stop.png +%%DATADIR%%/themes/classic/style.css +%%DATADIR%%/themes/classic/tempo_sync.png +%%DATADIR%%/themes/classic/text_block.png +%%DATADIR%%/themes/classic/text_bold.png +%%DATADIR%%/themes/classic/text_center.png +%%DATADIR%%/themes/classic/text_italic.png +%%DATADIR%%/themes/classic/text_left.png +%%DATADIR%%/themes/classic/text_right.png +%%DATADIR%%/themes/classic/text_under.png +%%DATADIR%%/themes/classic/track_op_grip.png +%%DATADIR%%/themes/classic/trackop.png +%%DATADIR%%/themes/classic/trackop_c.png +%%DATADIR%%/themes/classic/trackop_h.png +%%DATADIR%%/themes/classic/triangle_wave_active.png +%%DATADIR%%/themes/classic/triangle_wave_inactive.png +%%DATADIR%%/themes/classic/uhoh.png +%%DATADIR%%/themes/classic/unavailable_sound.png +%%DATADIR%%/themes/classic/unfreeze.png +%%DATADIR%%/themes/classic/unknown_file.png +%%DATADIR%%/themes/classic/usr_wave_active.png +%%DATADIR%%/themes/classic/usr_wave_inactive.png +%%DATADIR%%/themes/classic/vst_plugin_file.png +%%DATADIR%%/themes/classic/whatsthis.png +%%DATADIR%%/themes/classic/white_key.png +%%DATADIR%%/themes/classic/white_key_pressed.png +%%DATADIR%%/themes/classic/white_noise_wave_active.png +%%DATADIR%%/themes/classic/white_noise_wave_inactive.png +%%DATADIR%%/themes/classic/zoom.png +%%DATADIR%%/themes/classic/zoom_x.png +%%DATADIR%%/themes/classic/zoom_y.png %%DATADIR%%/themes/default/add.png %%DATADIR%%/themes/default/add_automation.png %%DATADIR%%/themes/default/add_bb_track.png +%%DATADIR%%/themes/default/add_folder.png %%DATADIR%%/themes/default/add_sample_track.png %%DATADIR%%/themes/default/analysis.png %%DATADIR%%/themes/default/apply-selected.png @@ -2434,7 +2745,6 @@ share/applications/lmms.desktop %%DATADIR%%/themes/default/autoscroll_on.png %%DATADIR%%/themes/default/back_to_start.png %%DATADIR%%/themes/default/back_to_zero.png -%%DATADIR%%/themes/default/background_artwork.png %%DATADIR%%/themes/default/bb_track.png %%DATADIR%%/themes/default/bb_track_btn.png %%DATADIR%%/themes/default/black_key.png @@ -2442,17 +2752,18 @@ share/applications/lmms.desktop %%DATADIR%%/themes/default/cancel.png %%DATADIR%%/themes/default/chord.png %%DATADIR%%/themes/default/clock.png +%%DATADIR%%/themes/default/close.png +%%DATADIR%%/themes/default/closed_branch.png %%DATADIR%%/themes/default/colorize.png %%DATADIR%%/themes/default/combobox_arrow.png %%DATADIR%%/themes/default/combobox_arrow_selected.png %%DATADIR%%/themes/default/combobox_bg.png %%DATADIR%%/themes/default/computer.png %%DATADIR%%/themes/default/controller.png -%%DATADIR%%/themes/default/controller_bg.png %%DATADIR%%/themes/default/cpuload_bg.png %%DATADIR%%/themes/default/cpuload_leds.png +%%DATADIR%%/themes/default/discard.png %%DATADIR%%/themes/default/dont_know.png -%%DATADIR%%/themes/default/drum.png %%DATADIR%%/themes/default/edit_copy.png %%DATADIR%%/themes/default/edit_cut.png %%DATADIR%%/themes/default/edit_draw.png @@ -2464,6 +2775,7 @@ share/applications/lmms.desktop %%DATADIR%%/themes/default/edit_select.png %%DATADIR%%/themes/default/edit_undo.png %%DATADIR%%/themes/default/effect_plugin.png +%%DATADIR%%/themes/default/env_lfo_tab.png %%DATADIR%%/themes/default/envelope_graph.png %%DATADIR%%/themes/default/error.png %%DATADIR%%/themes/default/exit.png @@ -2473,34 +2785,39 @@ share/applications/lmms.desktop %%DATADIR%%/themes/default/fader_background.png %%DATADIR%%/themes/default/fader_knob.png %%DATADIR%%/themes/default/fader_leds.png +%%DATADIR%%/themes/default/file.png %%DATADIR%%/themes/default/filter_2lp.png %%DATADIR%%/themes/default/filter_ap.png %%DATADIR%%/themes/default/filter_bp.png %%DATADIR%%/themes/default/filter_hp.png %%DATADIR%%/themes/default/filter_lp.png %%DATADIR%%/themes/default/filter_notch.png +%%DATADIR%%/themes/default/flip_x.png +%%DATADIR%%/themes/default/flip_y.png %%DATADIR%%/themes/default/folder.png %%DATADIR%%/themes/default/folder_locked.png %%DATADIR%%/themes/default/folder_opened.png -%%DATADIR%%/themes/default/freeze.png -%%DATADIR%%/themes/default/frozen.png +%%DATADIR%%/themes/default/func_tab.png %%DATADIR%%/themes/default/fx_mixer.png +%%DATADIR%%/themes/default/fx_tab.png %%DATADIR%%/themes/default/hand.png %%DATADIR%%/themes/default/help.png %%DATADIR%%/themes/default/hint.png %%DATADIR%%/themes/default/home.png %%DATADIR%%/themes/default/hq_mode.png %%DATADIR%%/themes/default/icon.png +%%DATADIR%%/themes/default/icon_small.png +%%DATADIR%%/themes/default/ignore.png %%DATADIR%%/themes/default/instrument_track.png %%DATADIR%%/themes/default/keep_stop_position.png %%DATADIR%%/themes/default/knob01.png %%DATADIR%%/themes/default/knob02.png %%DATADIR%%/themes/default/knob03.png -%%DATADIR%%/themes/default/knob04.png %%DATADIR%%/themes/default/knob05.png %%DATADIR%%/themes/default/lcd_19green.png %%DATADIR%%/themes/default/lcd_19red.png %%DATADIR%%/themes/default/lcd_21pink.png +%%DATADIR%%/themes/default/led_blue.png %%DATADIR%%/themes/default/led_green.png %%DATADIR%%/themes/default/led_off.png %%DATADIR%%/themes/default/led_red.png @@ -2513,15 +2830,17 @@ share/applications/lmms.desktop %%DATADIR%%/themes/default/lfo_x100_inactive.png %%DATADIR%%/themes/default/lfo_x1_active.png %%DATADIR%%/themes/default/lfo_x1_inactive.png -%%DATADIR%%/themes/default/loop_point_b.png -%%DATADIR%%/themes/default/loop_point_e.png +%%DATADIR%%/themes/default/loop_point.png %%DATADIR%%/themes/default/loop_points_off.png %%DATADIR%%/themes/default/loop_points_on.png %%DATADIR%%/themes/default/main_slider.png -%%DATADIR%%/themes/default/main_toolbar_bg.png %%DATADIR%%/themes/default/master_pitch.png %%DATADIR%%/themes/default/master_volume.png +%%DATADIR%%/themes/default/maximize.png +%%DATADIR%%/themes/default/metronome.png %%DATADIR%%/themes/default/midi_file.png +%%DATADIR%%/themes/default/midi_tab.png +%%DATADIR%%/themes/default/misc_tab.png %%DATADIR%%/themes/default/mixer_send_off.png %%DATADIR%%/themes/default/mixer_send_on.png %%DATADIR%%/themes/default/moog_saw_wave_active.png @@ -2530,6 +2849,7 @@ share/applications/lmms.desktop %%DATADIR%%/themes/default/new_channel.png %%DATADIR%%/themes/default/note.png %%DATADIR%%/themes/default/note_double_whole.png +%%DATADIR%%/themes/default/note_eight.png %%DATADIR%%/themes/default/note_eighth.png %%DATADIR%%/themes/default/note_half.png %%DATADIR%%/themes/default/note_none.png @@ -2542,12 +2862,14 @@ share/applications/lmms.desktop %%DATADIR%%/themes/default/note_tripletsixteenth.png %%DATADIR%%/themes/default/note_tripletthirtysecond.png %%DATADIR%%/themes/default/note_whole.png +%%DATADIR%%/themes/default/open_branch.png %%DATADIR%%/themes/default/output_graph.png %%DATADIR%%/themes/default/pat_rec.png %%DATADIR%%/themes/default/pause.png %%DATADIR%%/themes/default/piano.png %%DATADIR%%/themes/default/play.png %%DATADIR%%/themes/default/playpos_marker.png +%%DATADIR%%/themes/default/plugin_tab.png %%DATADIR%%/themes/default/plugins.png %%DATADIR%%/themes/default/ports.png %%DATADIR%%/themes/default/pr_black_key.png @@ -2567,7 +2889,6 @@ share/applications/lmms.desktop %%DATADIR%%/themes/default/project_new_from_template.png %%DATADIR%%/themes/default/project_notes.png %%DATADIR%%/themes/default/project_open.png -%%DATADIR%%/themes/default/project_open_down.png %%DATADIR%%/themes/default/project_open_recent.png %%DATADIR%%/themes/default/project_save.png %%DATADIR%%/themes/default/project_saveas.png @@ -2577,7 +2898,9 @@ share/applications/lmms.desktop %%DATADIR%%/themes/default/receive_bg_arrow.png %%DATADIR%%/themes/default/record.png %%DATADIR%%/themes/default/record_accompany.png +%%DATADIR%%/themes/default/recover.png %%DATADIR%%/themes/default/reload.png +%%DATADIR%%/themes/default/restore.png %%DATADIR%%/themes/default/round_square_wave_active.png %%DATADIR%%/themes/default/round_square_wave_inactive.png %%DATADIR%%/themes/default/sample_file.png @@ -2599,6 +2922,8 @@ share/applications/lmms.desktop %%DATADIR%%/themes/default/setup_general.png %%DATADIR%%/themes/default/setup_midi.png %%DATADIR%%/themes/default/setup_performance.png +%%DATADIR%%/themes/default/shadow_c.png +%%DATADIR%%/themes/default/shadow_p.png %%DATADIR%%/themes/default/sin_wave_active.png %%DATADIR%%/themes/default/sin_wave_inactive.png %%DATADIR%%/themes/default/songeditor.png @@ -2607,11 +2932,11 @@ share/applications/lmms.desktop %%DATADIR%%/themes/default/square_wave_active.png %%DATADIR%%/themes/default/square_wave_inactive.png %%DATADIR%%/themes/default/step_btn_add.png +%%DATADIR%%/themes/default/step_btn_duplicate.png %%DATADIR%%/themes/default/step_btn_off.png %%DATADIR%%/themes/default/step_btn_off_light.png -%%DATADIR%%/themes/default/step_btn_on.png -%%DATADIR%%/themes/default/step_btn_on_100.png -%%DATADIR%%/themes/default/step_btn_on_yellow.png +%%DATADIR%%/themes/default/step_btn_on_0.png +%%DATADIR%%/themes/default/step_btn_on_200.png %%DATADIR%%/themes/default/step_btn_remove.png %%DATADIR%%/themes/default/stepper-down-press.png %%DATADIR%%/themes/default/stepper-down.png @@ -2631,11 +2956,10 @@ share/applications/lmms.desktop %%DATADIR%%/themes/default/text_left.png %%DATADIR%%/themes/default/text_right.png %%DATADIR%%/themes/default/text_under.png -%%DATADIR%%/themes/default/timeline.png %%DATADIR%%/themes/default/toolbar_bg.png %%DATADIR%%/themes/default/track_op_grip.png -%%DATADIR%%/themes/default/track_op_menu.png -%%DATADIR%%/themes/default/track_op_menu_active.png +%%DATADIR%%/themes/default/track_shadow_c.png +%%DATADIR%%/themes/default/track_shadow_p.png %%DATADIR%%/themes/default/trackop.png %%DATADIR%%/themes/default/trackop_c.png %%DATADIR%%/themes/default/trackop_h.png @@ -2643,7 +2967,6 @@ share/applications/lmms.desktop %%DATADIR%%/themes/default/triangle_wave_inactive.png %%DATADIR%%/themes/default/uhoh.png %%DATADIR%%/themes/default/unavailable_sound.png -%%DATADIR%%/themes/default/unfreeze.png %%DATADIR%%/themes/default/unknown_file.png %%DATADIR%%/themes/default/usr_wave_active.png %%DATADIR%%/themes/default/usr_wave_inactive.png @@ -2660,7 +2983,5 @@ share/applications/lmms.desktop %%DATADIR%%/wavetables/saw.bin %%DATADIR%%/wavetables/sqr.bin %%DATADIR%%/wavetables/tri.bin -share/man/man1/lmms.1.gz -share/menu/lmms share/mime/packages/lmms.xml share/pixmaps/lmms.png diff --git a/audio/picard-plugins/Makefile b/audio/picard-plugins/Makefile index fe3becd21d7..c1dd8213fd7 100644 --- a/audio/picard-plugins/Makefile +++ b/audio/picard-plugins/Makefile @@ -1,7 +1,7 @@ # $FreeBSD$ PORTNAME= picard-plugins -PORTVERSION= 2.0.20180816 +PORTVERSION= 2.0.20180917 CATEGORIES= audio python MAINTAINER= jhale@FreeBSD.org @@ -15,7 +15,7 @@ USE_PYTHON= noflavors USE_GITHUB= yes GH_ACCOUNT= metabrainz -GH_TAGNAME= a0a367f +GH_TAGNAME= 8968e91 PORTSCOUT= limit:^2\. @@ -42,11 +42,6 @@ MP3_RUN_DEPENDS= mp3gain:audio/mp3gain VORBIS_RUN_DEPENDS= vorbisgain:audio/vorbisgain WAVPACK_RUN_DEPENDS= wvgain:audio/wavpack -post-patch: -# The plugins lastfm, lastfmplus, and no_release have not been ported -# upstream to the 2.x version of Picard and do no load - @(cd ${WRKSRC}/plugins; ${RM} -r lastfm lastfmplus no_release) - do-build: # Plugins that include a separate UI (those with an __init__.py) must # be installed into their own subdirectories under PLUGINSDIR. Plugins diff --git a/audio/picard-plugins/distinfo b/audio/picard-plugins/distinfo index a5aa4821df3..d9ecb1e12e0 100644 --- a/audio/picard-plugins/distinfo +++ b/audio/picard-plugins/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1535503693 -SHA256 (metabrainz-picard-plugins-2.0.20180816-a0a367f_GH0.tar.gz) = 3611c421d36b2adc8f68e218f7846315992afe84c2a1a3a46b542838dc86d65f -SIZE (metabrainz-picard-plugins-2.0.20180816-a0a367f_GH0.tar.gz) = 135533 +TIMESTAMP = 1538100672 +SHA256 (metabrainz-picard-plugins-2.0.20180917-8968e91_GH0.tar.gz) = 6c72df4cd8b9cceef9f6e5688b059267917cafb20d121c2a18c81fb770c338f1 +SIZE (metabrainz-picard-plugins-2.0.20180917-8968e91_GH0.tar.gz) = 113141 diff --git a/audio/picard-plugins/pkg-plist b/audio/picard-plugins/pkg-plist index 141e176a7cb..3cab0881f5c 100644 --- a/audio/picard-plugins/pkg-plist +++ b/audio/picard-plugins/pkg-plist @@ -28,6 +28,8 @@ %%PYTHON_SITELIBDIR%%/picard/plugins/__pycache__/keep.cpython-%%PYTHON_SUFFIX%%.pyc %%PYTHON_SITELIBDIR%%/picard/plugins/__pycache__/loadasnat.cpython-%%PYTHON_SUFFIX%%.%%PYTHON_PYOEXTENSION%% %%PYTHON_SITELIBDIR%%/picard/plugins/__pycache__/loadasnat.cpython-%%PYTHON_SUFFIX%%.pyc +%%PYTHON_SITELIBDIR%%/picard/plugins/__pycache__/no_release.cpython-%%PYTHON_SUFFIX%%.%%PYTHON_PYOEXTENSION%% +%%PYTHON_SITELIBDIR%%/picard/plugins/__pycache__/no_release.cpython-%%PYTHON_SUFFIX%%.pyc %%PYTHON_SITELIBDIR%%/picard/plugins/__pycache__/non_ascii_equivalents.cpython-%%PYTHON_SUFFIX%%.%%PYTHON_PYOEXTENSION%% %%PYTHON_SITELIBDIR%%/picard/plugins/__pycache__/non_ascii_equivalents.cpython-%%PYTHON_SUFFIX%%.pyc %%PYTHON_SITELIBDIR%%/picard/plugins/__pycache__/padded.cpython-%%PYTHON_SUFFIX%%.%%PYTHON_PYOEXTENSION%% @@ -44,6 +46,8 @@ %%PYTHON_SITELIBDIR%%/picard/plugins/__pycache__/reorder_sides.cpython-%%PYTHON_SUFFIX%%.pyc %%PYTHON_SITELIBDIR%%/picard/plugins/__pycache__/save_and_rewrite_header.cpython-%%PYTHON_SUFFIX%%.%%PYTHON_PYOEXTENSION%% %%PYTHON_SITELIBDIR%%/picard/plugins/__pycache__/save_and_rewrite_header.cpython-%%PYTHON_SUFFIX%%.pyc +%%PYTHON_SITELIBDIR%%/picard/plugins/__pycache__/smart_title_case.cpython-%%PYTHON_SUFFIX%%.%%PYTHON_PYOEXTENSION%% +%%PYTHON_SITELIBDIR%%/picard/plugins/__pycache__/smart_title_case.cpython-%%PYTHON_SUFFIX%%.pyc %%PYTHON_SITELIBDIR%%/picard/plugins/__pycache__/sort_multivalue_tags.cpython-%%PYTHON_SUFFIX%%.%%PYTHON_PYOEXTENSION%% %%PYTHON_SITELIBDIR%%/picard/plugins/__pycache__/sort_multivalue_tags.cpython-%%PYTHON_SUFFIX%%.pyc %%PYTHON_SITELIBDIR%%/picard/plugins/__pycache__/soundtrack.cpython-%%PYTHON_SUFFIX%%.%%PYTHON_PYOEXTENSION%% @@ -88,6 +92,13 @@ %%PYTHON_SITELIBDIR%%/picard/plugins/featartistsintitles.py %%PYTHON_SITELIBDIR%%/picard/plugins/fix_tracknums.py %%PYTHON_SITELIBDIR%%/picard/plugins/keep.py +%%PYTHON_SITELIBDIR%%/picard/plugins/lastfm/__init__.py +%%PYTHON_SITELIBDIR%%/picard/plugins/lastfm/__pycache__/__init__.cpython-%%PYTHON_SUFFIX%%.%%PYTHON_PYOEXTENSION%% +%%PYTHON_SITELIBDIR%%/picard/plugins/lastfm/__pycache__/__init__.cpython-%%PYTHON_SUFFIX%%.pyc +%%PYTHON_SITELIBDIR%%/picard/plugins/lastfm/__pycache__/ui_options_lastfm.cpython-%%PYTHON_SUFFIX%%.%%PYTHON_PYOEXTENSION%% +%%PYTHON_SITELIBDIR%%/picard/plugins/lastfm/__pycache__/ui_options_lastfm.cpython-%%PYTHON_SUFFIX%%.pyc +%%PYTHON_SITELIBDIR%%/picard/plugins/lastfm/options_lastfm.ui +%%PYTHON_SITELIBDIR%%/picard/plugins/lastfm/ui_options_lastfm.py %%PYTHON_SITELIBDIR%%/picard/plugins/loadasnat.py %%PYTHON_SITELIBDIR%%/picard/plugins/moodbars/__init__.py %%PYTHON_SITELIBDIR%%/picard/plugins/moodbars/__pycache__/__init__.cpython-%%PYTHON_SUFFIX%%.%%PYTHON_PYOEXTENSION%% @@ -112,6 +123,7 @@ %%PYTHON_SITELIBDIR%%/picard/plugins/musixmatch/musixmatch/track.py %%PYTHON_SITELIBDIR%%/picard/plugins/musixmatch/musixmatch/util.py %%PYTHON_SITELIBDIR%%/picard/plugins/musixmatch/ui_options_musixmatch.py +%%PYTHON_SITELIBDIR%%/picard/plugins/no_release.py %%PYTHON_SITELIBDIR%%/picard/plugins/non_ascii_equivalents.py %%PYTHON_SITELIBDIR%%/picard/plugins/padded.py %%PYTHON_SITELIBDIR%%/picard/plugins/papercdcase.py @@ -127,6 +139,7 @@ %%PYTHON_SITELIBDIR%%/picard/plugins/replaygain/options_replaygain.ui %%PYTHON_SITELIBDIR%%/picard/plugins/replaygain/ui_options_replaygain.py %%PYTHON_SITELIBDIR%%/picard/plugins/save_and_rewrite_header.py +%%PYTHON_SITELIBDIR%%/picard/plugins/smart_title_case.py %%PYTHON_SITELIBDIR%%/picard/plugins/sort_multivalue_tags.py %%PYTHON_SITELIBDIR%%/picard/plugins/soundtrack.py %%PYTHON_SITELIBDIR%%/picard/plugins/standardise_feat.py diff --git a/audio/rhvoice/Makefile b/audio/rhvoice/Makefile index c0aa2aa2b31..732016cc393 100644 --- a/audio/rhvoice/Makefile +++ b/audio/rhvoice/Makefile @@ -14,7 +14,7 @@ LICENSE_COMB= multi LICENSE_FILE_LGPL21+ = ${WRKSRC}/licenses/lgpl-2.1.txt LICENSE_FILE_GPLv3+ = ${WRKSRC}/licenses/gpl-3.0.txt -USES= pkgconfig scons +USES= compiler:c++0x pkgconfig scons USE_GITHUB= yes GH_ACCOUNT= Olga-Yakovleva USE_LDCONFIG= yes @@ -28,13 +28,13 @@ AO_LIB_DEPENDS= libao.so:audio/libao PORTAUDIO_LIB_DEPENDS= libportaudio.so:audio/portaudio post-patch-PULSEAUDIO-off: - ${REINPLACE_CMD} 's|conf.CheckPKG("libpulse-simple")|False and &|' ${WRKSRC}/SConstruct + @${REINPLACE_CMD} 's|conf.CheckPKG("libpulse-simple")|False and &|' ${WRKSRC}/SConstruct post-patch-AO-off: - ${REINPLACE_CMD} 's|conf.CheckPKG("ao")|False and &|' ${WRKSRC}/SConstruct + @${REINPLACE_CMD} 's|conf.CheckPKG("ao")|False and &|' ${WRKSRC}/SConstruct post-patch-PORTAUDIO-off: - ${REINPLACE_CMD} 's|conf.CheckPKG("portaudio-2.0")|False and &|' ${WRKSRC}/SConstruct + @${REINPLACE_CMD} 's|conf.CheckPKG("portaudio-2.0")|False and &|' ${WRKSRC}/SConstruct post-install: ${MV} ${STAGEDIR}${ETCDIR}/${PORTNAME}.conf ${STAGEDIR}${ETCDIR}/${PORTNAME}.conf.sample diff --git a/audio/rhythmbox/Makefile b/audio/rhythmbox/Makefile index 6b447a5593c..0036650f27f 100644 --- a/audio/rhythmbox/Makefile +++ b/audio/rhythmbox/Makefile @@ -3,7 +3,7 @@ PORTNAME= rhythmbox PORTVERSION= 3.4.2 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= audio gnome MASTER_SITES= GNOME DIST_SUBDIR= gnome3 diff --git a/biology/iolib/Makefile b/biology/iolib/Makefile index b3b11ec6186..2401f29c16d 100644 --- a/biology/iolib/Makefile +++ b/biology/iolib/Makefile @@ -3,7 +3,7 @@ PORTNAME= io_lib DISTVERSIONPREFIX= ${PORTNAME}- -DISTVERSION= 1-14-9 +DISTVERSION= 1-14-10 CATEGORIES= biology MAINTAINER= danilo@FreeBSD.org @@ -17,10 +17,11 @@ BROKEN_powerpc64= fails to compile: bgzip.c: error: invalid operands to binary & LIB_DEPENDS= libcurl.so:ftp/curl +USES= autoreconf gmake libtool + USE_GITHUB= yes GH_ACCOUNT= jkbonfield -USES= autoreconf gmake libtool GNU_CONFIGURE= yes USE_LDCONFIG= yes INSTALL_TARGET= install-strip diff --git a/biology/iolib/distinfo b/biology/iolib/distinfo index 53fe3e75edc..e6cd8974208 100644 --- a/biology/iolib/distinfo +++ b/biology/iolib/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1488270338 -SHA256 (jkbonfield-io_lib-io_lib-1-14-9_GH0.tar.gz) = 077044d525e9dd76f94ee83b0ab19cd655b08348cc81bbdaa84e39c622280a4a -SIZE (jkbonfield-io_lib-io_lib-1-14-9_GH0.tar.gz) = 1396092 +TIMESTAMP = 1538157628 +SHA256 (jkbonfield-io_lib-io_lib-1-14-10_GH0.tar.gz) = 4bd576e52bb7e6be6c2efe42db2764b713c8b61b44a025ad0567dba052b6db1c +SIZE (jkbonfield-io_lib-io_lib-1-14-10_GH0.tar.gz) = 3391479 diff --git a/biology/iolib/pkg-plist b/biology/iolib/pkg-plist index 9a02ed48c5e..ba22771956d 100644 --- a/biology/iolib/pkg-plist +++ b/biology/iolib/pkg-plist @@ -87,8 +87,8 @@ include/io_lib/zfio.h include/io_lib/ztr.h lib/libstaden-read.a lib/libstaden-read.so -lib/libstaden-read.so.11 -lib/libstaden-read.so.11.1.0 +lib/libstaden-read.so.13 +lib/libstaden-read.so.13.0.0 man/man1/scramble.1.gz man/man1/srf2fasta.1.gz man/man1/srf2fastq.1.gz diff --git a/biology/p5-Bio-SCF/Makefile b/biology/p5-Bio-SCF/Makefile index c84f76752ca..7582862189d 100644 --- a/biology/p5-Bio-SCF/Makefile +++ b/biology/p5-Bio-SCF/Makefile @@ -3,7 +3,7 @@ PORTNAME= Bio-SCF PORTVERSION= 1.03 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= biology perl5 MASTER_SITES= CPAN PKGNAMEPREFIX= p5- diff --git a/comms/lirc/Makefile b/comms/lirc/Makefile index 1585a1414cd..801f2537c4d 100644 --- a/comms/lirc/Makefile +++ b/comms/lirc/Makefile @@ -3,7 +3,7 @@ PORTNAME= lirc PORTVERSION= 0.9.0 -PORTREVISION= 8 +PORTREVISION= 9 PORTEPOCH= 1 CATEGORIES= comms MASTER_SITES= SF/${PORTNAME}/LIRC/${PORTVERSION} diff --git a/comms/qsstv/Makefile b/comms/qsstv/Makefile index 977e78f5fa3..79a8fa05fdb 100644 --- a/comms/qsstv/Makefile +++ b/comms/qsstv/Makefile @@ -2,6 +2,7 @@ PORTNAME= qsstv PORTVERSION= 9.2.6 +PORTREVISION= 1 CATEGORIES= comms hamradio MASTER_SITES= http://users.telenet.be/on4qz/qsstv/downloads/ \ LOCAL/db diff --git a/databases/puppetdb-cli/Makefile b/databases/puppetdb-cli/Makefile index d41a51bfcce..3bcd2aa637e 100644 --- a/databases/puppetdb-cli/Makefile +++ b/databases/puppetdb-cli/Makefile @@ -2,6 +2,7 @@ PORTNAME= puppetdb-cli PORTVERSION= 1.2.4 +PORTREVISION= 1 CATEGORIES= databases MAINTAINER= puppet@FreeBSD.org diff --git a/deskutils/gcalcli/Makefile b/deskutils/gcalcli/Makefile index 9b08bf9d261..6373a0f568b 100644 --- a/deskutils/gcalcli/Makefile +++ b/deskutils/gcalcli/Makefile @@ -2,9 +2,8 @@ # $FreeBSD$ PORTNAME= gcalcli -PORTVERSION= 3.2 +PORTVERSION= 3.4.0 DISTVERSIONPREFIX= v -PORTREVISION= 3 CATEGORIES= deskutils python MAINTAINER= ports@thelanman.net @@ -16,7 +15,8 @@ RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}dateutil>=0:devel/py-dateutil@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}gdata>=0:devel/py-gdata@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}google-api-python-client>=0:www/py-google-api-python-client@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}httplib2>=0:www/py-httplib2@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}python-gflags>=0:devel/py-python-gflags@${PY_FLAVOR} + ${PYTHON_PKGNAMEPREFIX}python-gflags>=0:devel/py-python-gflags@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}oauth2client>0:security/py-oauth2client@${PY_FLAVOR} USES= python:-2.7 shebangfix USE_GITHUB= yes @@ -41,6 +41,10 @@ NO_ARCH= yes PORTDOCS= README.md gcalcli_?.png PLIST_FILES= bin/gcalcli +pre-install: + @${REINPLACE_CMD} -e '197s|run|run_flow|' \ + -e '676s|run|run_flow|' ${WRKSRC}/gcalcli + do-install: ${MKDIR} ${STAGEDIR}${PREFIX}/bin ${INSTALL_SCRIPT} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin diff --git a/deskutils/gcalcli/distinfo b/deskutils/gcalcli/distinfo index 5f0f016dea2..0a0bccd6e79 100644 --- a/deskutils/gcalcli/distinfo +++ b/deskutils/gcalcli/distinfo @@ -1,2 +1,3 @@ -SHA256 (insanum-gcalcli-v3.2_GH0.tar.gz) = 9b3465be8e64c291ffe4582f8cb779a7025c700e6a83aae74722d87a3b88d55a -SIZE (insanum-gcalcli-v3.2_GH0.tar.gz) = 1672457 +TIMESTAMP = 1534035958 +SHA256 (insanum-gcalcli-v3.4.0_GH0.tar.gz) = 1297f7082b4d33ac6d5ea3edfc11bdd329b8a6f28926aeda412806d45b7afdd1 +SIZE (insanum-gcalcli-v3.4.0_GH0.tar.gz) = 1675456 diff --git a/deskutils/gcalcli/files/patch-gcalcli b/deskutils/gcalcli/files/patch-gcalcli deleted file mode 100644 index 46f21639c19..00000000000 --- a/deskutils/gcalcli/files/patch-gcalcli +++ /dev/null @@ -1,33 +0,0 @@ -# ERROR: Missing module - cannot import name run (revisit #204) -# https://github.com/insanum/gcalcli/issues/229 - ---- gcalcli.orig 2014-12-17 01:50:24 UTC -+++ gcalcli -@@ -185,7 +185,8 @@ try: - from apiclient.discovery import build - from oauth2client.file import Storage - from oauth2client.client import OAuth2WebServerFlow -- from oauth2client.tools import run -+ from oauth2client.tools import run_flow -+ from oauth2client.tools import argparser - except ImportError as e: - print "ERROR: Missing module - %s" % e.args[0] - sys.exit(1) -@@ -627,14 +628,15 @@ class gcalcli: - credentials = storage.get() - - if credentials is None or credentials.invalid: -- credentials = run( -+ args, unknown = argparser.parse_known_args(sys.argv) -+ credentials = run_flow( - OAuth2WebServerFlow( - client_id=self.client_id, - client_secret=self.client_secret, - scope=['https://www.googleapis.com/auth/calendar', - 'https://www.googleapis.com/auth/urlshortener'], - user_agent=__program__+'/'+__version__), -- storage) -+ storage, args) - - self.authHttp = credentials.authorize(httplib2.Http()) - diff --git a/devel/bingrep/Makefile b/devel/bingrep/Makefile index a7ddab6f3fa..fbd65cc6c62 100644 --- a/devel/bingrep/Makefile +++ b/devel/bingrep/Makefile @@ -2,7 +2,7 @@ PORTNAME= bingrep PORTVERSION= g20171111 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= devel MAINTAINER= ports@FreeBSD.org diff --git a/devel/codequery/Makefile b/devel/codequery/Makefile index 2220ba4c39d..6d9c297588f 100644 --- a/devel/codequery/Makefile +++ b/devel/codequery/Makefile @@ -2,8 +2,7 @@ # $FreeBSD$ PORTNAME= codequery -PORTVERSION= 0.21.0 -PORTREVISION= 1 +PORTVERSION= 0.21.1 DISTVERSIONPREFIX= v CATEGORIES= devel diff --git a/devel/codequery/distinfo b/devel/codequery/distinfo index e35d2697e5b..2727e7b7372 100644 --- a/devel/codequery/distinfo +++ b/devel/codequery/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1501261182 -SHA256 (ruben2020-codequery-v0.21.0_GH0.tar.gz) = 9af232e0d3bb10e5defbc222a9e422f4580dd5766cfc7f921d38baa18675f98d -SIZE (ruben2020-codequery-v0.21.0_GH0.tar.gz) = 2423769 +TIMESTAMP = 1537282795 +SHA256 (ruben2020-codequery-v0.21.1_GH0.tar.gz) = c20050dc6963472c7cb7ed4621c7187e24089fa458eb68748ef9d2aae53d991f +SIZE (ruben2020-codequery-v0.21.1_GH0.tar.gz) = 2424086 diff --git a/devel/efl/Makefile b/devel/efl/Makefile index 1ffaa88b560..b86080dc12e 100644 --- a/devel/efl/Makefile +++ b/devel/efl/Makefile @@ -3,7 +3,7 @@ PORTNAME= efl DISTVERSION= 1.20.7 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= devel enlightenment MASTER_SITES= http://download.enlightenment.org/rel/libs/${PORTNAME}/ DIST_SUBDIR= enlightenment diff --git a/devel/evemu/Makefile b/devel/evemu/Makefile index 1b87a4d659c..7e0cab4f575 100644 --- a/devel/evemu/Makefile +++ b/devel/evemu/Makefile @@ -3,7 +3,7 @@ PORTNAME= evemu PORTVERSION= 2.6.0 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= devel MASTER_SITES= http://www.freedesktop.org/software/${PORTNAME}/ diff --git a/devel/git-modes/Makefile b/devel/git-modes/Makefile index 6e469cf585b..7d7542a0464 100644 --- a/devel/git-modes/Makefile +++ b/devel/git-modes/Makefile @@ -2,8 +2,7 @@ # $FreeBSD$ PORTNAME= git-modes -DISTVERSION= 1.2.7 -PORTREVISION= 1 +DISTVERSION= 1.2.8 PORTEPOCH= 1 CATEGORIES= devel elisp PKGNAMESUFFIX= ${EMACS_PKGNAMESUFFIX} diff --git a/devel/git-modes/distinfo b/devel/git-modes/distinfo index 0f19cf9debc..f8eeb4ccb31 100644 --- a/devel/git-modes/distinfo +++ b/devel/git-modes/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1521835411 -SHA256 (magit-git-modes-1.2.7_GH0.tar.gz) = dd62c2dec1b877729fee53a0b68b1502c4647761150419b0b4dafb0e3438f4d7 -SIZE (magit-git-modes-1.2.7_GH0.tar.gz) = 18140 +TIMESTAMP = 1534449545 +SHA256 (magit-git-modes-1.2.8_GH0.tar.gz) = 38ecf7b3fceee0bb2771f6d4e5ff153f2889498cb82952c0a30403eb91718940 +SIZE (magit-git-modes-1.2.8_GH0.tar.gz) = 18131 diff --git a/devel/libevdev/Makefile b/devel/libevdev/Makefile index 1342dfad8fa..ebc32ba0df1 100644 --- a/devel/libevdev/Makefile +++ b/devel/libevdev/Makefile @@ -2,6 +2,7 @@ PORTNAME= libevdev PORTVERSION= 1.4.4 +PORTREVISION= 1 CATEGORIES= devel MASTER_SITES= http://freedesktop.org/software/${PORTNAME}/ diff --git a/devel/libmtdev/Makefile b/devel/libmtdev/Makefile index 6028ee34d46..96c1310edef 100644 --- a/devel/libmtdev/Makefile +++ b/devel/libmtdev/Makefile @@ -2,6 +2,7 @@ PORTNAME= mtdev PORTVERSION= 1.1.5 +PORTREVISION= 1 CATEGORIES= devel MASTER_SITES= http://bitmath.org/code/${PORTNAME}/ PKGNAMEPREFIX= lib diff --git a/devel/libudev-devd/Makefile b/devel/libudev-devd/Makefile index c65aa3a543e..6bb510d99be 100644 --- a/devel/libudev-devd/Makefile +++ b/devel/libudev-devd/Makefile @@ -2,6 +2,7 @@ PORTNAME= libudev-devd PORTVERSION= 0.3 +PORTREVISION= 1 CATEGORIES= devel MAINTAINER= x11@FreeBSD.org diff --git a/devel/p5-DateTime-Format-DateParse/Makefile b/devel/p5-DateTime-Format-DateParse/Makefile index a64ad027769..0aa372424a3 100644 --- a/devel/p5-DateTime-Format-DateParse/Makefile +++ b/devel/p5-DateTime-Format-DateParse/Makefile @@ -11,11 +11,16 @@ PKGNAMEPREFIX= p5- MAINTAINER= svysh.fbsd@gmail.com COMMENT= This module is a compatibility wrapper around Date::Parse +LICENSE= ART10 GPLv1+ +LICENSE_COMB= dual +LICENSE_FILE= ${WRKSRC}/LICENSE + BUILD_DEPENDS= p5-DateTime>=0:devel/p5-DateTime \ p5-TimeDate>=0:devel/p5-TimeDate RUN_DEPENDS:= ${BUILD_DEPENDS} USES= perl5 USE_PERL5= modbuild +NO_ARCH= yes .include diff --git a/devel/pijul/Makefile b/devel/pijul/Makefile index 23c7e93935d..b50b42a7bfc 100644 --- a/devel/pijul/Makefile +++ b/devel/pijul/Makefile @@ -3,7 +3,7 @@ PORTNAME= pijul PORTVERSION= 0.10.0 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= devel MASTER_SITES= https://pijul.org/releases/ DISTFILES= ${DISTNAME}${EXTRACT_SUFX} diff --git a/devel/ptlib/Makefile b/devel/ptlib/Makefile index ecab9196cf8..936b03da50a 100644 --- a/devel/ptlib/Makefile +++ b/devel/ptlib/Makefile @@ -3,7 +3,7 @@ PORTNAME= ptlib PORTVERSION= 2.10.11 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= devel MASTER_SITES= GNOME diff --git a/devel/py-evdev/Makefile b/devel/py-evdev/Makefile index d7e4a49c4d4..92c8f5887dc 100644 --- a/devel/py-evdev/Makefile +++ b/devel/py-evdev/Makefile @@ -2,6 +2,7 @@ PORTNAME= evdev PORTVERSION= 0.5.0 +PORTREVISION= 1 CATEGORIES= devel python MASTER_SITES= CHEESESHOP PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} diff --git a/devel/racer/Makefile b/devel/racer/Makefile index 77796cb9d60..f674a32dc66 100644 --- a/devel/racer/Makefile +++ b/devel/racer/Makefile @@ -4,6 +4,7 @@ PORTNAME= racer DISTVERSIONPREFIX= v DISTVERSION= 2.1.5 +PORTREVISION= 1 CATEGORIES= devel MAINTAINER= beyert@cs.ucr.edu diff --git a/devel/racerd/Makefile b/devel/racerd/Makefile index 506c7125ff2..f1c6d95b90f 100644 --- a/devel/racerd/Makefile +++ b/devel/racerd/Makefile @@ -4,8 +4,8 @@ PORTNAME= racerd DISTVERSIONPREFIX= v DISTVERSION= 0.1.1-56 -PORTREVISION= 1 DISTVERSIONSUFFIX= -g29cd4c6 +PORTREVISION= 2 CATEGORIES= devel MAINTAINER= ultima@FreeBSD.org diff --git a/devel/rust-bindgen/Makefile b/devel/rust-bindgen/Makefile index 57cb87ba254..1a2283f2e0a 100644 --- a/devel/rust-bindgen/Makefile +++ b/devel/rust-bindgen/Makefile @@ -3,6 +3,7 @@ PORTNAME= rust-bindgen DISTVERSIONPREFIX= v DISTVERSION= 0.40.0 +PORTREVISION= 1 CATEGORIES= devel MAINTAINER= gecko@FreeBSD.org diff --git a/devel/rust-cbindgen/Makefile b/devel/rust-cbindgen/Makefile index f6f7fa4ba22..0981ca11075 100644 --- a/devel/rust-cbindgen/Makefile +++ b/devel/rust-cbindgen/Makefile @@ -3,6 +3,7 @@ PORTNAME= cbindgen DISTVERSIONPREFIX= v DISTVERSION= 0.6.3 +PORTREVISION= 1 CATEGORIES= devel PKGNAMEPREFIX= rust- diff --git a/devel/tokei/Makefile b/devel/tokei/Makefile index 4c697948d6e..ec0cbd19d3f 100644 --- a/devel/tokei/Makefile +++ b/devel/tokei/Makefile @@ -3,6 +3,7 @@ PORTNAME= tokei DISTVERSIONPREFIX= v DISTVERSION= 8.0.1 +PORTREVISION= 1 CATEGORIES= devel MAINTAINER= tobik@FreeBSD.org diff --git a/dns/doh-proxy/Makefile b/dns/doh-proxy/Makefile index 5cc18f6089b..d8f3226e4a4 100644 --- a/dns/doh-proxy/Makefile +++ b/dns/doh-proxy/Makefile @@ -3,6 +3,7 @@ PORTNAME= doh-proxy DISTVERSION= 0.1.10 +PORTREVISION= 1 CATEGORIES= dns MAINTAINER= mat@FreeBSD.org diff --git a/editors/teco/Makefile b/editors/teco/Makefile index c82c8a0f541..69eb8de869d 100644 --- a/editors/teco/Makefile +++ b/editors/teco/Makefile @@ -3,25 +3,33 @@ PORTNAME= teco PORTVERSION= 0398 +PORTREVISION= 1 CATEGORIES= editors MASTER_SITES= http://almy.us/files/ DISTNAME= tecoclinux${PORTVERSION} -MAINTAINER= ports@FreeBSD.org +MAINTAINER= bob@eager.cx COMMENT= Powerful and compact editor with nongraphical user interface +LICENSE= BSD3CLAUSE + +CFLAGS+= -Wno-pointer-sign -Wno-expansion-to-defined -Wno-int-to-pointer-cast MAKEFILE= makefile + WRKSRC= ${WRKDIR}/tecoc${PORTVERSION} BUILD_WRKSRC= ${WRKSRC}/src ALL_TARGET= # empty -DOCSFILES= src/readme.1st src/readme.lnx src/changes.txt src/aaout.txt \ - src/problems.txt src/video.txt doc/teco.doc doc/wchart.txt +SUB_FILES= teco.1 OPTIONS_DEFINE= DOCS +DOCSFILES= src/readme.1st src/readme.lnx src/changes.txt src/aaout.txt \ + src/problems.txt src/video.txt doc/teco.doc doc/wchart.txt + do-install: ${INSTALL_PROGRAM} ${WRKSRC}/src/tecoc ${STAGEDIR}${PREFIX}/bin + ${INSTALL_MAN} ${WRKDIR}/teco.1 ${STAGEDIR}${PREFIX}/man/man1 @${MKDIR} ${STAGEDIR}${DATADIR} ${INSTALL_DATA} ${WRKSRC}/lib/* ${STAGEDIR}${DATADIR} diff --git a/editors/teco/files/patch-makefile b/editors/teco/files/patch-src_makefile similarity index 86% rename from editors/teco/files/patch-makefile rename to editors/teco/files/patch-src_makefile index 82e791bad6e..153a027cd83 100644 --- a/editors/teco/files/patch-makefile +++ b/editors/teco/files/patch-src_makefile @@ -1,5 +1,5 @@ ---- src/makefile.orig Fri May 21 18:26:06 2004 -+++ src/makefile Tue Feb 15 03:20:32 2005 +--- src/makefile.orig 2004-05-21 14:26:06 UTC ++++ src/makefile @@ -23,11 +23,11 @@ # COMPILE.c macro so it doesn't stick in the -target option, which gcc # doesn't understand. @@ -15,7 +15,7 @@ ############################################################################# -@@ -56,7 +56,7 @@ +@@ -56,7 +56,7 @@ tecoc: tecoc.o ${OBJECTS} tecoc.o: tecoc.c zport.h tecoc.h deferr.h dchars.h chmacs.h clpars.h: genclp clpars.tec diff --git a/editors/teco/files/patch-src_skpcmd.c b/editors/teco/files/patch-src_skpcmd.c new file mode 100644 index 00000000000..add5070b7bd --- /dev/null +++ b/editors/teco/files/patch-src_skpcmd.c @@ -0,0 +1,92 @@ +--- src/skpcmd.c.orig 1991-07-12 04:21:24 UTC ++++ src/skpcmd.c +@@ -84,13 +84,17 @@ static DEFAULT SkpCtU() /* skip control + BOOLEAN TTrace; /* temp: holds trace flag */ + + if (CBfPtr == CStEnd) ++ { + if (MStTop < 0) /* if not in a macro */ + { + ErrUTC(); /* unterminated command */ + return FAILURE; + } + else ++ { + return SUCCESS; ++ } ++ } + ++CBfPtr; + TTrace = TraceM; /* save trace mode flag */ + TraceM = FALSE; /* keep FindES from tracing */ +@@ -145,13 +149,17 @@ static DEFAULT SkpDqu() /* skip a " (do + { + DBGFEN(3,"SkpDqu",NULL); + if (CBfPtr == CStEnd) /* if end of command string */ ++ { + if (MStTop < 0) /* if not in a macro */ + { + ErrUTC(); /* unterminated command */ + return FAILURE; + } + else ++ { + return SUCCESS; ++ } ++ } + ++CBfPtr; + switch (To_Upper(*CBfPtr)) { + case 'A': +@@ -232,13 +240,17 @@ static DEFAULT SkpSkp() /* */ + static DEFAULT SkpF() /* skip one of the F commands */ + { + if (CBfPtr == CStEnd) ++ { + if (MStTop < 0) /* if not in a macro */ + { + ErrUTC(); /* unterminated command */ + return FAILURE; + } + else ++ { + return SUCCESS; ++ } ++ } + ++CBfPtr; + + switch (To_Upper(*CBfPtr)) { +@@ -320,13 +332,17 @@ static DEFAULT SkpCrt() /* skip a ^ (ca + WORD CDummy; + + if (CBfPtr == CStEnd) /* if end of command string */ ++ { + if (MStTop < 0) /* if macro stack empty */ + { + ErrUTC(); /* unterminated command */ + return FAILURE; + } + else ++ { + return SUCCESS; ++ } ++ } + ++CBfPtr; + if ((*CBfPtr >= 'A') && (*CBfPtr <= '_')) + CDummy = *CBfPtr - 'A'; +@@ -360,13 +376,17 @@ static DEFAULT SkpE() /* skip one of t + /* Y */ SkpSkp, /* Z */ SkpSkp + }; + if (CBfPtr == CStEnd) ++ { + if (MStTop < 0) /* if not in a macro */ + { + ErrUTC(); /* unterminated command */ + return FAILURE; + } + else ++ { + return SUCCESS; ++ } ++ } + + ++CBfPtr; + TmpChr = To_Upper(*CBfPtr); diff --git a/editors/teco/files/patch-zlinux b/editors/teco/files/patch-src_zlinux.c similarity index 86% rename from editors/teco/files/patch-zlinux rename to editors/teco/files/patch-src_zlinux.c index 14d8f2b01dc..98f362d2ae9 100644 --- a/editors/teco/files/patch-zlinux +++ b/editors/teco/files/patch-src_zlinux.c @@ -1,5 +1,5 @@ ---- src/zlinux.c.orig Tue Feb 15 20:15:29 2005 -+++ src/zlinux.c Tue Feb 15 20:22:42 2005 +--- src/zlinux.c.orig 2004-05-21 20:59:29 UTC ++++ src/zlinux.c @@ -10,7 +10,6 @@ #include /* needed before sys/param.h is included */ @@ -8,7 +8,7 @@ #include /* to catch ^C and ^Z signals */ #include /* define stdin */ #include /* strncpy(), strlen(), etc. */ -@@ -50,8 +49,6 @@ +@@ -50,8 +49,6 @@ char *tgetstr(); /* get str value of a static int vernum(); /* see bottom of this file */ @@ -17,7 +17,7 @@ static int SupGotCtC = 0; static glob_t pglob; -@@ -1057,9 +1054,9 @@ +@@ -1057,9 +1054,9 @@ char *argv[]; * execute imbedded command line-parsing macro directly from clpars[] */ diff --git a/editors/teco/files/teco.1.in b/editors/teco/files/teco.1.in new file mode 100644 index 00000000000..1df2c4a0a8e --- /dev/null +++ b/editors/teco/files/teco.1.in @@ -0,0 +1,506 @@ +.Dd September 05, 2018 +.Os +.Dt TECO 1 CON +.Sh NAME +.Nm teco +.Nd The grand old text editor +.Sh SYNOPSIS +.Cm tecoc +.Cm make +.Op Fl noini +.Op Fl nomemory +.Ar file +.br +.Cm tecoc +.Cm teco +.Op Fl inspect +.Op Fl nocreate +.Op Fl noini +.Op Fl nomemory +.Op Fl nopage +.Op Fl norename +.Op Sy +nnn +.Ar file +.br +.Cm tecoc +.Cm mung +.Op Fl noini +.Ar file +.Sh DESCRIPTION +This description section is sufficiently long that it has been split into a number of subsections. +.Ss Command names +.Nm +is actually invoked by the command +.Sy tecoc . +It takes a first argument of +.Cm make , +.Cm teco , +or +.Cm mung +to control its operating mode. In the +.Fx +version, the base name of the invoking command is tested to provide this +first argument. For ease of use, it is recommended that aliases are set +up. The recommended (and usual) mappings are: +.Bl -tag -width inspect +.It Sy Make +to +.Sy tecoc make +(note the uppercase first letter to avoid confusion with +.Xr make 1 ) +.It Sy teco +to +.Sy tecoc teco +.It Sy mung +to +.Sy tecoc mung +.It Sy inspect +to +.Sy tecoc teco -inspect +.El +.Pp +These mappings are assumed in the +.Sx Options +and +.Sx Command invocations +sections below. +.Ss Options +Options may be abbreviated; for each option, the part shown in brackets can be omitted. +The following options are available for the +.Nm +command: +.Bl -tag -width nocreate +.It Fl in[spect] +read the file only, don't create an output file. +.It Fl noc[reate] +if the file doesn't exist, don't create it. +.It Fl noi[ni] +don't execute the initialisation file. This is valid for +.Sy Make +or +.Sy mung +as well. +.It Fl nom[emory] +don't remember the filename (see +.Sx Filename memory +below). This is valid for +.Sy Make +also. +.It Fl nop[age] +don't separate input into pages. Instead, treat form feeds as normal characters. +.It Fl nor[ename] +don't rename files, but copy them to keep references correct +.It Sy +nnn +where +.Ar nnn +is any number of digits. Go to line number +.Ar nnn +and set +.Fl nopage . +.El +.Ss Command invocations +.Pp +There are a number of different ways of starting +.Nm . +.Bl -tag +.It Sy Make Ar file +starts +.Nm +to create +.Ar file . +.br +This is equivalent to +.Li EWfile$$ +.It Sy teco Ar file +starts +.Nm +to edit +.Ar file . +.br +This is equivalent to +.Li EBfile$Y$$ +.It Sy teco Ar file2=file1 +starts +.Nm +to edit +.Ar file1 , +writing to +.Ar file2. +.br +This is equivalent to +.Li ERfile1$EWfile2$Y$$ +.It Sy teco +starts +.Nm +to edit the last edited file. +By default, the name of that file is saved in a file named +.Pa tecoN.tmp +in the current directory, where +.Em N +is the process ID of the parent process to +.Nm . +This can be overridden, as described in +.Sx Filename memory +below. +.It Sy mung Ar file args +starts +.Nm +to execute +.Ar file. +.br +This is equivalent to +.Li I$JEIfile$$ +.br +Instead of +.Sy mung , +the command +.Sy teco Ar @file args +can be used. +.El +.Pp +.Ss Key Bindings +The keys mentioned in the +.Pa teco.doc +file are somewhat confusing. This should help: +.Bl -tag -width +.It Li +The +.Li Esc +echoes as +.Li $ , +however the +.Pa teco.doc +file shows it as +.Li ` . +.It Li +Type as +.Li Control-H ; +this isn't the +.Li Backspace +key. +.It Li +The +.Li Backspace +key; this isn't the +.Li Delete +key. +.It Li +The +.Li Enter +key. +.It Li +Type as +.Li Control-J . +.El +.Pp +Note that the assignments for +.Li +and +.Li +shown here are +swapped. +.Li +can be +.Li Backspace +and +.Li +can be +.Li Control-H +by +clearing +.Li ET&2048 , +e.g. +.Li 2048,0ET +.Ss Initialisation file +.Nm +.Em mungs +(executes as +.Nm +commands) the file +.Pa TECO.INI +(yes, in uppercase) in the +current directory before processing the command line. Initialisation +can be done instead by defining an environment variable named +.Ev TEC_INIT . +The value is either the list of +.Nm +commands to execute, or a +.Li $ +followed by the pathname of the initialisation file. This allows a +single, centrally located initialisation file. Remember that the +.Li $ +must be escaped with a backslash character. +.Pp +The initialisation file can be used to make initial settings. It can +return a value, but the value setting is somewhat obscure. +.Pp +For example, the following will both cause successful searches to +auto-display in all +.Nm +sessions. +.Pp +.Bl -tag -compact -offset indent -width Examplex(bash)x +.It Example (csh): +.Li setenv +.Ev TEC_INIT +1es +.It Example (bash): +.Li TEC_INIT=1es +.br +.Li export TEC_INIT +.El +.Pp +The following will each cause the file +.Pa ~/.tecrc +to be used as the initialisation file. +.Bl -tag -compact -offset indent -width Examplex(bash)x +.It Example (csh): +.Li setenv TEC_INIT \e$~/.tecrc +.It Example (bash): +.Li TEC_INIT=\e$~/.tecrc +.br +.Li export TEC_INIT +.El +.Ss Filename memory +.Nm +tries to remember the last file that it edited, +so that after a file has been edited once, it can be re-edited without +the file name having to be repeated on the command line. +.Nm +implements this by writing and reading a file that contains +the name of the last file edited. By default, the file name is +.Pa tecoN.tmp +in the current directory, where +.Em N +is the process ID of the parent process to +.Nm . +.Pp +To change the location of the memory file, +define the environment variable +.Ev TEC_MEMORY +to be +.Li $ +followed by the +pathname of the file to be designated as the memory file. +Remember that the +.Li $ +must be escaped with a backslash character. +.Pp +The following examples will cause the name of the last +file edited to be stored in the file +.Pa teco.mem +in the home directory. +.Pp +.Bl -tag -compact -offset indent -width Examplex(bash)x +.It Example (csh): +.Li setenv TEC_MEMORY \e$~/teco.mem +.It Example (bash): +.Li TEC_MEMORY=\e$~/teco.mem +.br +.Li export TEC_MEMORY +.El +.Pp +.Ss Library directory +The environment variable +.Ev TEC_LIBRARY +can be set to be a directory path (including the final +.Pa / Ns ); +the path must be preceded by a +.Li $ +character. This allows the +.Li EI +command to fetch +.Nm +commands from this directory if the file is not found in the +current directory. Remember that the +.Li $ +must be escaped with a backslash character. +.Pp +.Bl -tag -compact -offset indent -width Examplex(bash)x +.It Example (csh): +.Li setenv TEC_LIBRARY \e$%%PREFIX%%/lib/ +.It Example (bash): +.Li TEC_LIBRARY=\e$/usr/%%PREFIX%%/lib/ +.br +.Li export TEC_LIBRARY +.El +.Pp +This will cause the directory +.Pa %%PREFIX%%/lib +to be searched for +.Nm teco +command files. +.Ss Implemented flags +There are a number of flags that can be set inside +.Nm , +using the +.Li ED +and +.Li ET +mode control commands. To add functionality, +.Nm +is also sensitive to bits in an extra mode control +flag, +.Li EZ . +Bits in the +.Li EZ +mode control command are +used in different ways by different operating systems; only those +relevant to +.Fx +are described here. +.Pp +.Bl -tag -compact -offset indent -width ETx32768 +.It Li ED&1 +Allow the caret +.Li ^ +character in string searches. +.It Li ED&2 +Allow yank and _ unconditionally. +.It Li ED&16 +Failed searches preserve dot. +.It Li ED&64 +Move dot by one after each match in multiple occurrence searches. +.El +.Pp +.Bl -tag -compact -offset indent -width ETx32768 +.It Li ET&1 +Type out in image mode. +.It Li ET&2 +Use scope for delete and +.Li Control-U +(default=1) +.It Li ET&4 +Accept lowercase input (default=1). +.It Li ET&8 +.Li Control-T +reads without echo. +.It Li ET&32 +.Li Control-T +reads with no wait. +.It Li ET&128 +.Em mung +mode (abort on error); cleared by +.Li * +prompt. +.It Li ET&2048 +Swap backspace and delete. +.It Li ET&4096 +We are using 8 bit characters (default=1). +.It Li ET&32768 +Trap +.Li Control-C . +.El +.Pp +.Bl -tag -compact -offset indent -width ET&32768 +.It Li EZ&128 +If set, don't stop on form feeds when reading. If clear, a form +feed in the input stream stops the read (the standard +.Nm +style). +This bit is off by default. +.It Li EZ&256 +If set, use UNIX-style newline terminators. This means when files +are read in, carriage-returns are not added to the end of lines, +and when the user types the RETURN key, only a newline is entered +into the command line (usually a carriage-return/line-feed pair is +entered). Old macros (and old +.Nm +users) may get confused if this +bit is set. +.It Li EZ&16384 +Normally, the backup file name is created by replacing the file extension +with +.Pa .bak +- +.Pa foo.c +becomes +.Pa foo.bak ; +however, if this bit is set then the backup file name is created by simply +adding +.Pa .bak +to the name - +.Pa foo.c +becomes +.Pa foo.c.bak . +This choice is overridden by +.Li EZ&1 = 0 . +.El +.Sh ENVIRONMENT +The following environment variables are used by +.Nm : +.Bl -tag -width TECO_LIBRARY +.It Ev TECO_INIT +The value of this variable can be either a +.Nm +command string, or the name of a file containing +.Nm +commands. The filename must be preceded by a +.Li $ +character. Remember that the +.Li $ +must be escaped with a backslash character. +See also +.Sx Initialisation file Ns No . +.It Ev TECO_LIBRARY +The value of this variable should be a path to the directory +that contains files of +.Nm +commands, to be accessed using +.Li XX . +The pathname should include the trailing +.Li / Ns No . +Remember that the +.Li $ +must be escaped with a backslash character. +See also +.Sx Library directory Ns No . +.It Ev TECO_MEMORY +The value of this variable should be the name of a file +To be used for remembereing the name of the last file +edited by +.Nm . +The filename must be preceded by a +.Li $ +character. Remember that the +.Li $ +must be escaped with a backslash character. +See also +.Sx Filename memory Ns No . +.El +.Sh FILES +.Bl -tag +.It Pa %%DATADIR%%/* +Miscellaneous +.Nm +macros and commands. +.It Pa %%DOCSDIR%%/teco.doc +The +.Nm +manual (if installed). +.It Pa %%DOCSDIR%%/wchart.txt +Summary of +.Nm +keystrokes (if installed). +.El +.Sh EXIT STATUS +.Ex -std +.Sh SEE ALSO +A variety of documentation files may be installed in +.Pa %%DOCSDIR%% . +Apart from the ones mentioned in the +.Sx FILES +section, they are of limited use, because they refer to +slightly different versions of +.Nm . +.Pp +There are also many online resources. +.Sh AUTHORS +.An "Pete Siemsen" Aq siemsen@usc.edu . +.br +.An "Tom Almy" Aq tomalmy@aracnet.com . +.br +FreeBSD port and manual page maintained by +.An "Bob Eager" Aq bob@eager.cx . +.Sh BUGS +There is no video mode. diff --git a/editors/teco/pkg-descr b/editors/teco/pkg-descr index 74b7cc22487..687c2c9b54e 100644 --- a/editors/teco/pkg-descr +++ b/editors/teco/pkg-descr @@ -1,8 +1,8 @@ -TECO is the grand old text editor. It is powerful and compact precursor -to EMACS and has a completely nongraphical user interface. It is very fast -(probably the fastes editor in the world) and have a macro language. TECO +TECO is the grand old text editor. It is a powerful and compact precursor +to EMACS, and has a completely nongraphical user interface. It is very fast +(probably the fastest editor in the world) and has a macro language. TECO was written by Dan Murphy (http://www.opost.com/dlm) at Digital Equipment Corporation in 1962. This is based on Pete Siemsen's TECOC implementation, -and comes with a copy of the originals DECUS TECO documentation. +and comes with a copy of the original's DECUS TECO documentation. WWW: http://almy.us/teco.html diff --git a/editors/teco/pkg-message b/editors/teco/pkg-message index 05fc6fc295a..40f740319f8 100644 --- a/editors/teco/pkg-message +++ b/editors/teco/pkg-message @@ -1,13 +1,37 @@ -============================================================================= +Powerful and compact editor with nongraphical user interface - Teco takes a first argument of mung, teco or make to control its -operating mode. Also the name of the executable is tested to provide this -first argument. The mapping is: - teco - tecoc teco - Make - tecoc make - mung - tecoc mung - inspect - tecoc teco -inspect +The FreeBSD port implements pretty well all that the Linux version does. -You can create symlinks for this to work. +There is now a manual page; note carefully that the name of the +executable file is 'tecoc', and that it takes a first argument +specifying how it is to run. The manual page has many more details. -============================================================================= +Most users will want to set up aliases for using the program; this is +not done by the port to avoid unnecessary namespace pollution. There is +also the issue that the conventional command for creating a new file +with teco is 'make' - it is suggested that a capitalised version, +'Make', is used instead. However, users can choose any name they like. + +An example set of aliases for csh might be: + + alias Make 'tecoc make' + alias teco 'tecoc teco' + alias mung 'tecoc mung' + alias inspect 'tecoc teco -inspect' + +For bash, they might be: + + alias Make='tecoc make' + alias teco='tecoc teco' + alias mung='tecoc mung' + alias inspect='tecoc teco -inspect' + + +If the port is built with the DOCS option set to ON, then documentation +will be installed into %%DOCSDIR%%. This will include +a large teco manual named 'teco.doc', and a quick reference 'wall chart' +named 'wchart.txt'. Other documents located there are outdated and/or +inconsistent, and thus of limited use. + +Before starting to use tecoc, see the sections "DESCRIPTION/Command +names" and "SEE ALSO" in the manual page. diff --git a/editors/teco/pkg-plist b/editors/teco/pkg-plist index 977c27878c2..7deaa706d76 100644 --- a/editors/teco/pkg-plist +++ b/editors/teco/pkg-plist @@ -1,4 +1,5 @@ bin/tecoc +man/man1/teco.1.gz %%DATADIR%%/upcase.tec %%DATADIR%%/change.tes %%DATADIR%%/date.tes diff --git a/editors/xi-core/Makefile b/editors/xi-core/Makefile index 30ca41a8079..efeb74862bd 100644 --- a/editors/xi-core/Makefile +++ b/editors/xi-core/Makefile @@ -3,7 +3,7 @@ PORTNAME= xi-core PORTVERSION= g20170612 DISTVERSIONPREFIX= v -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= editors MAINTAINER= ports@FreeBSD.org diff --git a/emulators/citra/Makefile b/emulators/citra/Makefile index 1fac751e745..92644893992 100644 --- a/emulators/citra/Makefile +++ b/emulators/citra/Makefile @@ -1,7 +1,7 @@ # $FreeBSD$ PORTNAME= citra -PORTVERSION= s20180925 +PORTVERSION= s20180927 PORTREVISION?= 0 CATEGORIES= emulators @@ -23,7 +23,7 @@ BUILD_DEPENDS= boost-libs>=1.66:devel/boost-libs USE_GITHUB= yes GH_ACCOUNT= citra-emu -GH_TAGNAME= a96f0f516 +GH_TAGNAME= 7c97e8df6 GH_TUPLE= citra-emu:ext-libressl-portable:7d01cb0:libressl/externals/libressl \ citra-emu:ext-soundtouch:060181e:soundtouch/externals/soundtouch \ MerryMage:dynarmic:r1-873-g68ca03e:dynarmic/externals/dynarmic \ diff --git a/emulators/citra/distinfo b/emulators/citra/distinfo index 9a4ead128e6..ee1291a026b 100644 --- a/emulators/citra/distinfo +++ b/emulators/citra/distinfo @@ -1,6 +1,6 @@ -TIMESTAMP = 1537931380 -SHA256 (citra-emu-citra-s20180925-a96f0f516_GH0.tar.gz) = 4c8c42d658aa193f35fb6eaa11b68d3f929abb7235c689b00822d5bc24437c0f -SIZE (citra-emu-citra-s20180925-a96f0f516_GH0.tar.gz) = 4194473 +TIMESTAMP = 1538057377 +SHA256 (citra-emu-citra-s20180927-7c97e8df6_GH0.tar.gz) = 95bac74454b21550f59a26b007568d7a99e1530126e05eb05d93dc3b5f908c6d +SIZE (citra-emu-citra-s20180927-7c97e8df6_GH0.tar.gz) = 4484531 SHA256 (citra-emu-ext-libressl-portable-7d01cb0_GH0.tar.gz) = f3fc8c9d4991b05ca1e1c8f5907ecd3ffd9724a8dccf328087b4784cda5c7db3 SIZE (citra-emu-ext-libressl-portable-7d01cb0_GH0.tar.gz) = 1762942 SHA256 (citra-emu-ext-soundtouch-060181e_GH0.tar.gz) = a593ab188e4feaeef8376c27b554cc413986efc777c195e44c6d3d223de9a63c diff --git a/emulators/rpcs3/Makefile b/emulators/rpcs3/Makefile index 0bf28c1aff4..3f72395c07e 100644 --- a/emulators/rpcs3/Makefile +++ b/emulators/rpcs3/Makefile @@ -2,8 +2,8 @@ PORTNAME= rpcs3 DISTVERSIONPREFIX= v -DISTVERSION= 0.0.5-934 -DISTVERSIONSUFFIX= -gbdf85ed90 +DISTVERSION= 0.0.5-945 +DISTVERSIONSUFFIX= -gda6ce80f4 CATEGORIES= emulators PATCH_SITES= https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/commit/ diff --git a/emulators/rpcs3/distinfo b/emulators/rpcs3/distinfo index 445027e511b..311f08be758 100644 --- a/emulators/rpcs3/distinfo +++ b/emulators/rpcs3/distinfo @@ -1,6 +1,6 @@ -TIMESTAMP = 1537980110 -SHA256 (RPCS3-rpcs3-v0.0.5-934-gbdf85ed90_GH0.tar.gz) = 2df05c999b5c1e1d6b530d5831edfbf6b251b93260fcefa7d2ead1d0b86e6b63 -SIZE (RPCS3-rpcs3-v0.0.5-934-gbdf85ed90_GH0.tar.gz) = 5003938 +TIMESTAMP = 1538080633 +SHA256 (RPCS3-rpcs3-v0.0.5-945-gda6ce80f4_GH0.tar.gz) = e1e49e0f81632b91895a62a1af8dee4c149b33f564a5fe492014aa55e1c313d6 +SIZE (RPCS3-rpcs3-v0.0.5-945-gda6ce80f4_GH0.tar.gz) = 5005463 SHA256 (RPCS3-hidapi-hidapi-0.8.0-rc1-26-g4c27501_GH0.tar.gz) = 4f58ba2a51136cc6af0f1d833688b55f78468c4f5429a4bf9b38bb51c9d212b1 SIZE (RPCS3-hidapi-hidapi-0.8.0-rc1-26-g4c27501_GH0.tar.gz) = 105372 SHA256 (RPCS3-llvm-be9f7bfe2068_GH0.tar.gz) = 6fc805799e0853505ce786882e5856d018130fcca37206e7ef5fcef6b72937d3 diff --git a/emulators/wine-devel/Makefile b/emulators/wine-devel/Makefile index 02124e3eb72..9d2824981db 100644 --- a/emulators/wine-devel/Makefile +++ b/emulators/wine-devel/Makefile @@ -2,7 +2,8 @@ # $FreeBSD$ PORTNAME= wine -DISTVERSION= 3.16 +DISTVERSION= 3.17 +PORTREVISION= 1 PORTEPOCH= 1 CATEGORIES= emulators MASTER_SITES= SF/${PORTNAME}/Source \ diff --git a/emulators/wine-devel/distinfo b/emulators/wine-devel/distinfo index ce6571a997b..7753d49afe7 100644 --- a/emulators/wine-devel/distinfo +++ b/emulators/wine-devel/distinfo @@ -1,5 +1,3 @@ -TIMESTAMP = 1537566755 -SHA256 (wine-3.16.tar.xz) = ad43bcf8f790c70a4d72e93c5bb818ed0d004c6a1fc6341d5d8fc7ab02a1a53c -SIZE (wine-3.16.tar.xz) = 21432308 -SHA256 (v3.16.tar.gz) = b7955b90e4cb415179a5a44f0511455ab4c0adc273753167a92f5d6a49a684aa -SIZE (v3.16.tar.gz) = 9928264 +TIMESTAMP = 1538170108 +SHA256 (wine-3.17.tar.xz) = 4cede2e1de426af2430abee84afd77379a1f4f05c3ec9cd4280110de54fccc21 +SIZE (wine-3.17.tar.xz) = 21457736 diff --git a/emulators/wine-devel/pkg-plist b/emulators/wine-devel/pkg-plist index 0ddd0757117..800f3d7743f 100644 --- a/emulators/wine-devel/pkg-plist +++ b/emulators/wine-devel/pkg-plist @@ -206,6 +206,8 @@ include/wine/windows/d3d11_3.h include/wine/windows/d3d11_3.idl include/wine/windows/d3d11_4.h include/wine/windows/d3d11_4.idl +include/wine/windows/d3d11on12.h +include/wine/windows/d3d11on12.idl include/wine/windows/d3d11sdklayers.h include/wine/windows/d3d11sdklayers.idl include/wine/windows/d3d11shader.h diff --git a/emulators/wine/Makefile b/emulators/wine/Makefile index 6e5e8c45011..d55ee602cf0 100644 --- a/emulators/wine/Makefile +++ b/emulators/wine/Makefile @@ -3,6 +3,7 @@ PORTNAME= wine DISTVERSION= 3.0.3 +PORTREVISION= 1 PORTEPOCH= 1 CATEGORIES= emulators MASTER_SITES= SF/${PORTNAME}/Source \ diff --git a/games/genact/Makefile b/games/genact/Makefile index 817aee514c5..a1a9fdeab54 100644 --- a/games/genact/Makefile +++ b/games/genact/Makefile @@ -2,6 +2,7 @@ PORTNAME= genact DISTVERSION= 0.6.0 +PORTREVISION= 1 CATEGORIES= games MAINTAINER= 0mp@FreeBSD.org diff --git a/games/py-mnemosyne/Makefile b/games/py-mnemosyne/Makefile index 5a5b4fd22bd..08391cf6507 100644 --- a/games/py-mnemosyne/Makefile +++ b/games/py-mnemosyne/Makefile @@ -2,7 +2,7 @@ # $FreeBSD$ PORTNAME= mnemosyne -PORTVERSION= 2.6 +PORTVERSION= 2.6.1 PORTEPOCH= 1 CATEGORIES= games python MASTER_SITES= SF/mnemosyne-proj/${PORTNAME}/${PORTNAME}-${DISTVERSION} diff --git a/games/py-mnemosyne/distinfo b/games/py-mnemosyne/distinfo index ae96d399542..61f76634a69 100644 --- a/games/py-mnemosyne/distinfo +++ b/games/py-mnemosyne/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1529233511 -SHA256 (Mnemosyne-2.6.tar.gz) = e4e90cda5490dabe28a7c06a38c73e45f09f782f7b2eef59797ab955a62eeb2c -SIZE (Mnemosyne-2.6.tar.gz) = 1271314 +TIMESTAMP = 1534014366 +SHA256 (Mnemosyne-2.6.1.tar.gz) = 6331241bc7caf26fed2e4d32c3c18da33116389b67af621da679a950f08c9c75 +SIZE (Mnemosyne-2.6.1.tar.gz) = 1269280 diff --git a/games/retroarch/Makefile b/games/retroarch/Makefile index 94e0e594aa1..2dde5030219 100644 --- a/games/retroarch/Makefile +++ b/games/retroarch/Makefile @@ -4,7 +4,7 @@ PORTNAME= RetroArch PORTVERSION= 1.3.6 DISTVERSIONPREFIX= v -PORTREVISION= 11 +PORTREVISION= 12 CATEGORIES= games MAINTAINER= yuri@FreeBSD.org diff --git a/graphics/gegl/Makefile b/graphics/gegl/Makefile index 1e64f82cd95..e8cea978cc6 100644 --- a/graphics/gegl/Makefile +++ b/graphics/gegl/Makefile @@ -3,7 +3,7 @@ PORTNAME= gegl PORTVERSION= 0.2.0 -PORTREVISION= 24 +PORTREVISION= 25 CATEGORIES= graphics MASTER_SITES= GIMP diff --git a/graphics/gegl3/Makefile b/graphics/gegl3/Makefile index 4b87d3a7532..b069ae26cbf 100644 --- a/graphics/gegl3/Makefile +++ b/graphics/gegl3/Makefile @@ -3,7 +3,7 @@ PORTNAME= gegl PORTVERSION= 0.3.34 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= graphics MASTER_SITES= GIMP PKGNAMESUFFIX= 3 diff --git a/graphics/opencv/Makefile b/graphics/opencv/Makefile index 1299ced86c9..06c8518ac7c 100644 --- a/graphics/opencv/Makefile +++ b/graphics/opencv/Makefile @@ -3,7 +3,7 @@ PORTNAME= opencv PORTVERSION= 3.4.1 -PORTREVISION= 5 +PORTREVISION= 6 CATEGORIES= graphics MAINTAINER= ports@FreeBSD.org diff --git a/graphics/sane-backends/Makefile b/graphics/sane-backends/Makefile index 1a26455feb8..6faeddc6138 100644 --- a/graphics/sane-backends/Makefile +++ b/graphics/sane-backends/Makefile @@ -3,7 +3,7 @@ PORTNAME= sane-backends PORTVERSION= 1.0.27 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= graphics MASTER_SITES= https://alioth.debian.org/frs/download.php/file/4146/ \ http://fossies.org/linux/misc/ diff --git a/graphics/zbar/Makefile b/graphics/zbar/Makefile index 2512f808c9d..ca603afb38f 100644 --- a/graphics/zbar/Makefile +++ b/graphics/zbar/Makefile @@ -3,7 +3,7 @@ PORTNAME= zbar PORTVERSION= 0.10 -PORTREVISION= 13 +PORTREVISION= 14 CATEGORIES= graphics MASTER_SITES= SF diff --git a/lang/gcc6-devel/Makefile b/lang/gcc6-devel/Makefile index 614ad386203..6f5edffce9b 100644 --- a/lang/gcc6-devel/Makefile +++ b/lang/gcc6-devel/Makefile @@ -2,7 +2,7 @@ # $FreeBSD$ PORTNAME= gcc -PORTVERSION= 6.4.1.s20180919 +PORTVERSION= 6.4.1.s20180926 CATEGORIES= lang java MASTER_SITES= GCC/snapshots/${DIST_VERSION} PKGNAMESUFFIX= ${SUFFIX}-devel diff --git a/lang/gcc6-devel/distinfo b/lang/gcc6-devel/distinfo index 29074808d17..3f7c46f1019 100644 --- a/lang/gcc6-devel/distinfo +++ b/lang/gcc6-devel/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1537598845 -SHA256 (gcc-6-20180919.tar.xz) = c99f8feca1889e9556366efe4478d05ea8b8bf07af74bf3a3e7fd55f275e8876 -SIZE (gcc-6-20180919.tar.xz) = 72686052 +TIMESTAMP = 1538172728 +SHA256 (gcc-6-20180926.tar.xz) = e1150e20ef0e6c2ad1f1fc78c6cb81124c3bd3c9b62d1521d55c90c570c51484 +SIZE (gcc-6-20180926.tar.xz) = 72685528 diff --git a/lang/gcc7-devel/Makefile b/lang/gcc7-devel/Makefile index 33ea4f6ec40..807be84c256 100644 --- a/lang/gcc7-devel/Makefile +++ b/lang/gcc7-devel/Makefile @@ -2,7 +2,7 @@ # $FreeBSD$ PORTNAME= gcc -PORTVERSION= 7.3.1.s20180920 +PORTVERSION= 7.3.1.s20180927 CATEGORIES= lang MASTER_SITES= GCC/snapshots/${DIST_VERSION} PKGNAMESUFFIX= ${SUFFIX}-devel diff --git a/lang/gcc7-devel/distinfo b/lang/gcc7-devel/distinfo index 9685298e814..465103e9ad2 100644 --- a/lang/gcc7-devel/distinfo +++ b/lang/gcc7-devel/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1537566888 -SHA256 (gcc-7-20180920.tar.xz) = 357cf017bc7fc84a9d7cf4a3393e9fcc20628d820d82a6441462a0da52256c49 -SIZE (gcc-7-20180920.tar.xz) = 59297524 +TIMESTAMP = 1538170254 +SHA256 (gcc-7-20180927.tar.xz) = 5cfeb7288afa6f3bb753c2e049789ed95744a63c4dcb1946ccbc32ab1830cb7f +SIZE (gcc-7-20180927.tar.xz) = 59295408 diff --git a/lang/rust/Makefile b/lang/rust/Makefile index e060d7350c9..11c312432f2 100644 --- a/lang/rust/Makefile +++ b/lang/rust/Makefile @@ -2,8 +2,8 @@ # $FreeBSD$ PORTNAME= rust -PORTVERSION?= 1.29.0 -PORTREVISION?= 1 +PORTVERSION?= 1.29.1 +PORTREVISION?= 0 CATEGORIES= lang MASTER_SITES= http://static.rust-lang.org/dist/:src \ LOCAL/dumbbell/rust:rust_bootstrap \ diff --git a/lang/rust/distinfo b/lang/rust/distinfo index a754b6bb5d9..92d038cd8f1 100644 --- a/lang/rust/distinfo +++ b/lang/rust/distinfo @@ -1,6 +1,6 @@ -TIMESTAMP = 1536871544 -SHA256 (rust/rustc-1.29.0-src.tar.xz) = 3943da98fb478a336ede7404e42ff76ef6ba4fc2b82012cfccd6b9fc4bd2c191 -SIZE (rust/rustc-1.29.0-src.tar.xz) = 61938668 +TIMESTAMP = 1537469647 +SHA256 (rust/rustc-1.29.1-src.tar.xz) = 4d0d64c60561ea8acc01b866f48e42c906b60215c43ff7d7b088ee21bdcd813e +SIZE (rust/rustc-1.29.1-src.tar.xz) = 61937676 SHA256 (rust/2018-08-02/rustc-1.28.0-x86_64-unknown-freebsd.tar.gz) = 5eeaa17844f87e59aab821dc98dd15a920df0d1d7da3ef5808d2c586331c92a7 SIZE (rust/2018-08-02/rustc-1.28.0-x86_64-unknown-freebsd.tar.gz) = 65434056 SHA256 (rust/2018-08-02/rust-std-1.28.0-x86_64-unknown-freebsd.tar.gz) = 1fabaf71d21c1cdcddfb564950152ef862b519a175f7ee88d7e22bab31c4733e diff --git a/mail/thunderbird/Makefile b/mail/thunderbird/Makefile index 3243f09a6cf..039ecaa299c 100644 --- a/mail/thunderbird/Makefile +++ b/mail/thunderbird/Makefile @@ -3,6 +3,7 @@ PORTNAME= thunderbird DISTVERSION= 60.1.0 +PORTREVISION= 2 CATEGORIES= mail news net-im ipv6 MASTER_SITES= MOZILLA/${PORTNAME}/releases/${DISTVERSION}/source \ MOZILLA/${PORTNAME}/candidates/${DISTVERSION}-candidates/build1/source diff --git a/math/R-cran-sm/Makefile b/math/R-cran-sm/Makefile index 62981d4f22f..56f6f4227a4 100644 --- a/math/R-cran-sm/Makefile +++ b/math/R-cran-sm/Makefile @@ -2,7 +2,7 @@ # $FreeBSD$ PORTNAME= sm -DISTVERSION= 2.2-5.5 +DISTVERSION= 2.2-5.6 CATEGORIES= math DISTNAME= ${PORTNAME}_${DISTVERSION} diff --git a/math/R-cran-sm/distinfo b/math/R-cran-sm/distinfo index 4f7995f2d4b..f01c0e22b30 100644 --- a/math/R-cran-sm/distinfo +++ b/math/R-cran-sm/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1526381778 -SHA256 (sm_2.2-5.5.tar.gz) = 43e212a14c364b98b10018b56fe0a619ccffe4bde1294e6c45b3eafe7caf82e7 -SIZE (sm_2.2-5.5.tar.gz) = 256346 +TIMESTAMP = 1538137012 +SHA256 (sm_2.2-5.6.tar.gz) = b890cd7ebe8ed711ab4a3792c204c4ecbe9e6ca1fd5bbc3925eba5833a839c30 +SIZE (sm_2.2-5.6.tar.gz) = 256355 diff --git a/math/ccmath/Makefile b/math/ccmath/Makefile index bc8596e475b..7ffac4a8cba 100644 --- a/math/ccmath/Makefile +++ b/math/ccmath/Makefile @@ -3,7 +3,7 @@ PORTNAME= ccmath PORTVERSION= 2.2.1 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= math MASTER_SITES= SUNSITE/libs @@ -12,9 +12,8 @@ COMMENT= Mathematics library with many different functions LICENSE= LGPL20 -BROKEN_aarch64= fails to link: can't create dynamic relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol: bias in readonly segment; recompile object files with -fPIC - USE_LDCONFIG= yes +PLIST_FILES= include/ccmath.h lib/libccm.a lib/libccm.so lib/libccm.so.1 PORTDOCS= * SRC_DIRS= cfit complex fft geom intg matrix roots sfunc simu sort statf \ @@ -24,9 +23,7 @@ OPTIONS_DEFINE= DOCS .include -.if ${ARCH} == "amd64" COPT= -fPIC -.endif post-extract: @${CP} ${WRKSRC}/matrix/supp/solv.c ${WRKSRC}/matrix diff --git a/math/ccmath/pkg-plist b/math/ccmath/pkg-plist deleted file mode 100644 index e6388eb8c19..00000000000 --- a/math/ccmath/pkg-plist +++ /dev/null @@ -1,4 +0,0 @@ -include/ccmath.h -lib/libccm.a -lib/libccm.so -lib/libccm.so.1 diff --git a/misc/osinfo-db/Makefile b/misc/osinfo-db/Makefile index a376456b1e1..6614c913570 100644 --- a/misc/osinfo-db/Makefile +++ b/misc/osinfo-db/Makefile @@ -2,7 +2,7 @@ # $FreeBSD$ PORTNAME= osinfo-db -PORTVERSION= 20180903 +PORTVERSION= 20180920 CATEGORIES= misc MASTER_SITES= https://releases.pagure.org/libosinfo/ diff --git a/misc/osinfo-db/distinfo b/misc/osinfo-db/distinfo index cdf9ffd2029..e8759652b56 100644 --- a/misc/osinfo-db/distinfo +++ b/misc/osinfo-db/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1536760781 -SHA256 (osinfo-db-20180903.tar.xz) = c9d7f24be5a16238aa46f7168aacd87697acfae0b9b8905a266d8025acc77d76 -SIZE (osinfo-db-20180903.tar.xz) = 74184 +TIMESTAMP = 1537590455 +SHA256 (osinfo-db-20180920.tar.xz) = 4cc5670f44a9a31fe5272b96350800dbad0783c0838048279b6b88f282fb4ba6 +SIZE (osinfo-db-20180920.tar.xz) = 76820 diff --git a/misc/osinfo-db/pkg-plist b/misc/osinfo-db/pkg-plist index 1cda9e5a6e8..cf52fa4dec5 100644 --- a/misc/osinfo-db/pkg-plist +++ b/misc/osinfo-db/pkg-plist @@ -100,6 +100,13 @@ share/osinfo/os/centos.org/centos-6.7.xml share/osinfo/os/centos.org/centos-6.8.xml share/osinfo/os/centos.org/centos-6.9.xml share/osinfo/os/centos.org/centos-7.0.xml +share/osinfo/os/cirros-cloud.net/cirros-0.3.0.xml +share/osinfo/os/cirros-cloud.net/cirros-0.3.1.xml +share/osinfo/os/cirros-cloud.net/cirros-0.3.2.xml +share/osinfo/os/cirros-cloud.net/cirros-0.3.3.xml +share/osinfo/os/cirros-cloud.net/cirros-0.3.4.xml +share/osinfo/os/cirros-cloud.net/cirros-0.3.5.xml +share/osinfo/os/cirros-cloud.net/cirros-0.4.0.xml share/osinfo/os/debian.org/debian-1.1.xml share/osinfo/os/debian.org/debian-1.2.xml share/osinfo/os/debian.org/debian-1.3.xml @@ -266,6 +273,11 @@ share/osinfo/os/gnome.org/gnome-3.8.xml share/osinfo/os/gnome.org/gnome-continuous-3.10.xml share/osinfo/os/gnome.org/gnome-continuous-3.12.xml share/osinfo/os/gnome.org/gnome-continuous-3.14.xml +share/osinfo/os/haiku-os.org/haiku-nightly.xml +share/osinfo/os/haiku-os.org/haiku-r1alpha1.xml +share/osinfo/os/haiku-os.org/haiku-r1alpha2.xml +share/osinfo/os/haiku-os.org/haiku-r1alpha3.xml +share/osinfo/os/haiku-os.org/haiku-r1alpha4.1.xml share/osinfo/os/mageia.org/mageia-1.xml share/osinfo/os/mageia.org/mageia-2.xml share/osinfo/os/mageia.org/mageia-3.xml @@ -453,6 +465,8 @@ share/osinfo/os/redhat.com/rhel-7.5.xml share/osinfo/os/redhat.com/rhel-atomic-7.0.xml share/osinfo/os/redhat.com/rhel-atomic-7.1.xml share/osinfo/os/redhat.com/rhel-atomic-7.2.xml +share/osinfo/os/redhat.com/rhel-atomic-7.3.xml +share/osinfo/os/redhat.com/rhel-atomic-7.4.xml share/osinfo/os/redhat.com/rhl-1.0.xml share/osinfo/os/redhat.com/rhl-1.1.xml share/osinfo/os/redhat.com/rhl-2.0.xml @@ -508,6 +522,7 @@ share/osinfo/os/suse.com/sles-12.3.xml share/osinfo/os/suse.com/sles-12.xml share/osinfo/os/suse.com/sles-9.xml share/osinfo/os/system76.com/popos-17.10.xml +share/osinfo/os/system76.com/popos-18.04.xml share/osinfo/os/ubuntu.com/ubuntu-10.04.xml share/osinfo/os/ubuntu.com/ubuntu-10.10.xml share/osinfo/os/ubuntu.com/ubuntu-11.04.xml @@ -525,6 +540,7 @@ share/osinfo/os/ubuntu.com/ubuntu-16.10.xml share/osinfo/os/ubuntu.com/ubuntu-17.04.xml share/osinfo/os/ubuntu.com/ubuntu-17.10.xml share/osinfo/os/ubuntu.com/ubuntu-18.04.xml +share/osinfo/os/ubuntu.com/ubuntu-18.10.xml share/osinfo/os/ubuntu.com/ubuntu-4.10.xml share/osinfo/os/ubuntu.com/ubuntu-5.04.xml share/osinfo/os/ubuntu.com/ubuntu-5.10.xml diff --git a/multimedia/Makefile b/multimedia/Makefile index d83f93921a1..2d49ba9b7e6 100644 --- a/multimedia/Makefile +++ b/multimedia/Makefile @@ -454,6 +454,7 @@ SUBDIR += vid.stab SUBDIR += vlc SUBDIR += vlc-qt4 + SUBDIR += vlc3 SUBDIR += vtkmpeg2encode SUBDIR += w_scan SUBDIR += webcamd diff --git a/multimedia/camserv/Makefile b/multimedia/camserv/Makefile index d993d9fc7fc..e75ef2bfbe6 100644 --- a/multimedia/camserv/Makefile +++ b/multimedia/camserv/Makefile @@ -3,7 +3,7 @@ PORTNAME= camserv PORTVERSION= 0.5.1 -PORTREVISION= 19 +PORTREVISION= 20 PORTEPOCH= 1 CATEGORIES= multimedia MASTER_SITES= SF/cserv/${PORTNAME}/${PORTVERSION} diff --git a/multimedia/cheese/Makefile b/multimedia/cheese/Makefile index 30c17c725e1..85b6a634e8f 100644 --- a/multimedia/cheese/Makefile +++ b/multimedia/cheese/Makefile @@ -3,7 +3,7 @@ PORTNAME= cheese PORTVERSION= 3.18.1 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= multimedia gnome MASTER_SITES= GNOME DIST_SUBDIR= gnome3 diff --git a/multimedia/cx88/Makefile b/multimedia/cx88/Makefile index caadc91ecce..505c1b5bfee 100644 --- a/multimedia/cx88/Makefile +++ b/multimedia/cx88/Makefile @@ -3,7 +3,7 @@ PORTNAME= cx88 PORTVERSION= 1.5.2 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= multimedia MASTER_SITES= ftp://corona.homeunix.net/ports/cx88/ diff --git a/multimedia/ffmpeg/Makefile b/multimedia/ffmpeg/Makefile index 5d1571bcf67..e0f103908ec 100644 --- a/multimedia/ffmpeg/Makefile +++ b/multimedia/ffmpeg/Makefile @@ -3,7 +3,7 @@ PORTNAME= ffmpeg PORTVERSION= 4.0.2 -PORTREVISION= 3 +PORTREVISION= 4 PORTEPOCH= 1 CATEGORIES= multimedia audio ipv6 net MASTER_SITES= https://ffmpeg.org/releases/ diff --git a/multimedia/gmerlin-avdecoder/Makefile b/multimedia/gmerlin-avdecoder/Makefile index e705aca53ba..5147cbc2c30 100644 --- a/multimedia/gmerlin-avdecoder/Makefile +++ b/multimedia/gmerlin-avdecoder/Makefile @@ -3,7 +3,7 @@ PORTNAME= gmerlin-avdecoder PORTVERSION= 1.2.0 -PORTREVISION= 22 +PORTREVISION= 23 CATEGORIES= multimedia MASTER_SITES= SF/gmerlin/${PORTNAME}/${PORTVERSION} diff --git a/multimedia/gstreamer-plugins/Makefile b/multimedia/gstreamer-plugins/Makefile index f53d6255628..ad26b0ce39f 100644 --- a/multimedia/gstreamer-plugins/Makefile +++ b/multimedia/gstreamer-plugins/Makefile @@ -6,7 +6,7 @@ PORTNAME= gstreamer PORTVERSION?= ${BASE_PORTVERSION} # When chasing a shared library for a plug-in bump the PORTREVISION in the # plug-in port instead, like ${category}/gstreamer-plugin-${PLUGIN}. -PORTREVISION?= 10 +PORTREVISION?= 11 PORTEPOCH= 3 CATEGORIES?= multimedia audio MASTER_SITES= http://gstreamer.freedesktop.org/src/gst-plugins-base/:base \ diff --git a/multimedia/gstreamer1-plugins/Makefile b/multimedia/gstreamer1-plugins/Makefile index a017db08999..5844e7f5eb1 100644 --- a/multimedia/gstreamer1-plugins/Makefile +++ b/multimedia/gstreamer1-plugins/Makefile @@ -5,7 +5,7 @@ PORTNAME= gstreamer PORTVERSION?= ${BASE_PORTVERSION} # When chasing a shared library for a plug-in bump the PORTREVISION in the # plug-in port instead, like ${category}/gstreamer1-plugin-${PLUGIN}. -PORTREVISION?= 1 +PORTREVISION?= 2 CATEGORIES?= multimedia audio MASTER_SITES= http://gstreamer.freedesktop.org/src/gst-plugins-base/:base \ http://gstreamer.freedesktop.org/src/gst-plugins-bad/:bad \ diff --git a/multimedia/kaffeine/Makefile b/multimedia/kaffeine/Makefile index bfea99467b6..746a084abd5 100644 --- a/multimedia/kaffeine/Makefile +++ b/multimedia/kaffeine/Makefile @@ -3,7 +3,7 @@ PORTNAME= kaffeine PORTVERSION= 1.3.1 -PORTREVISION= 6 +PORTREVISION= 7 CATEGORIES= multimedia kde MASTER_SITES= SF/kaffeine/current diff --git a/multimedia/kdenlive-kde4/Makefile b/multimedia/kdenlive-kde4/Makefile index ad748038c4a..9f3df24ee14 100644 --- a/multimedia/kdenlive-kde4/Makefile +++ b/multimedia/kdenlive-kde4/Makefile @@ -2,7 +2,7 @@ PORTNAME= kdenlive PORTVERSION= 0.9.10 -PORTREVISION= 11 +PORTREVISION= 12 CATEGORIES= multimedia kde MASTER_SITES= KDE/stable/${PORTNAME}/${PORTVERSION}/src/ PKGNAMESUFFIX= -kde4 diff --git a/multimedia/kdenlive/Makefile b/multimedia/kdenlive/Makefile index bca3c2bfbdf..f9af0e2d165 100644 --- a/multimedia/kdenlive/Makefile +++ b/multimedia/kdenlive/Makefile @@ -2,6 +2,7 @@ PORTNAME= kdenlive DISTVERSION= ${KDE_APPLICATIONS_VERSION} +PORTREVISION= 1 CATEGORIES= multimedia kde kde-applications MAINTAINER= kde@FreeBSD.org diff --git a/multimedia/kodi-devel/Makefile b/multimedia/kodi-devel/Makefile index 3efb8c93212..f0db2f3363b 100644 --- a/multimedia/kodi-devel/Makefile +++ b/multimedia/kodi-devel/Makefile @@ -3,7 +3,7 @@ PORTNAME= kodi CATEGORIES= multimedia DISTVERSION= 18.0.g201809092101 -PORTREVISION= 1 +PORTREVISION= 2 PKGNAMESUFFIX?= -devel MAINTAINER= tobik@FreeBSD.org diff --git a/multimedia/libav/Makefile b/multimedia/libav/Makefile index 5a59af0e472..6658880f66f 100644 --- a/multimedia/libav/Makefile +++ b/multimedia/libav/Makefile @@ -2,7 +2,7 @@ PORTNAME= libav PORTVERSION= 12.1 -PORTREVISION= 7 +PORTREVISION= 8 CATEGORIES= multimedia audio ipv6 net MASTER_SITES= http://libav.org/releases/ diff --git a/multimedia/libv4l/Makefile b/multimedia/libv4l/Makefile index 3bd67956159..cefdbe6a449 100644 --- a/multimedia/libv4l/Makefile +++ b/multimedia/libv4l/Makefile @@ -4,7 +4,7 @@ PORTNAME?= libv4l PORTVERSION= 1.6.3 -PORTREVISION?= 2 +PORTREVISION?= 4 CATEGORIES= multimedia MASTER_SITES= http://linuxtv.org/downloads/v4l-utils/:master \ LOCAL/kwm:local diff --git a/multimedia/libv4l/files/patch-contrib_freebsd_include_linux_videodev2.h b/multimedia/libv4l/files/patch-contrib_freebsd_include_linux_videodev2.h new file mode 100644 index 00000000000..3ed8ccb394b --- /dev/null +++ b/multimedia/libv4l/files/patch-contrib_freebsd_include_linux_videodev2.h @@ -0,0 +1,662 @@ +--- contrib/freebsd/include/linux/videodev2.h.orig 2015-05-06 19:24:59 UTC ++++ contrib/freebsd/include/linux/videodev2.h +@@ -46,7 +46,7 @@ + * All kernel-specific stuff were moved to media/v4l2-dev.h, so + * no #if __KERNEL tests are allowed here + * +- * See http://linuxtv.org for more info ++ * See https://linuxtv.org for more info + * + * Author: Bill Dirks + * Justin Schoeman +@@ -170,13 +170,12 @@ enum v4l2_buf_type { + V4L2_BUF_TYPE_VBI_OUTPUT = 5, + V4L2_BUF_TYPE_SLICED_VBI_CAPTURE = 6, + V4L2_BUF_TYPE_SLICED_VBI_OUTPUT = 7, +-#if 1 +- /* Experimental */ + V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY = 8, +-#endif + V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE = 9, + V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE = 10, + V4L2_BUF_TYPE_SDR_CAPTURE = 11, ++ V4L2_BUF_TYPE_SDR_OUTPUT = 12, ++ V4L2_BUF_TYPE_META_CAPTURE = 13, + /* Deprecated, do not use */ + V4L2_BUF_TYPE_PRIVATE = 0x80, + }; +@@ -191,16 +190,20 @@ enum v4l2_buf_type { + || (type) == V4L2_BUF_TYPE_VIDEO_OVERLAY \ + || (type) == V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY \ + || (type) == V4L2_BUF_TYPE_VBI_OUTPUT \ +- || (type) == V4L2_BUF_TYPE_SLICED_VBI_OUTPUT) ++ || (type) == V4L2_BUF_TYPE_SLICED_VBI_OUTPUT \ ++ || (type) == V4L2_BUF_TYPE_SDR_OUTPUT) + + enum v4l2_tuner_type { + V4L2_TUNER_RADIO = 1, + V4L2_TUNER_ANALOG_TV = 2, + V4L2_TUNER_DIGITAL_TV = 3, +- V4L2_TUNER_ADC = 4, ++ V4L2_TUNER_SDR = 4, + V4L2_TUNER_RF = 5, + }; + ++/* Deprecated, do not use */ ++#define V4L2_TUNER_ADC V4L2_TUNER_SDR ++ + enum v4l2_memory { + V4L2_MEMORY_MMAP = 1, + V4L2_MEMORY_USERPTR = 2, +@@ -210,32 +213,206 @@ enum v4l2_memory { + + /* see also http://vektor.theorem.ca/graphics/ycbcr/ */ + enum v4l2_colorspace { +- /* ITU-R 601 -- broadcast NTSC/PAL */ ++ /* ++ * Default colorspace, i.e. let the driver figure it out. ++ * Can only be used with video capture. ++ */ ++ V4L2_COLORSPACE_DEFAULT = 0, ++ ++ /* SMPTE 170M: used for broadcast NTSC/PAL SDTV */ + V4L2_COLORSPACE_SMPTE170M = 1, + +- /* 1125-Line (US) HDTV */ ++ /* Obsolete pre-1998 SMPTE 240M HDTV standard, superseded by Rec 709 */ + V4L2_COLORSPACE_SMPTE240M = 2, + +- /* HD and modern captures. */ ++ /* Rec.709: used for HDTV */ + V4L2_COLORSPACE_REC709 = 3, + +- /* broken BT878 extents (601, luma range 16-253 instead of 16-235) */ ++ /* ++ * Deprecated, do not use. No driver will ever return this. This was ++ * based on a misunderstanding of the bt878 datasheet. ++ */ + V4L2_COLORSPACE_BT878 = 4, + +- /* These should be useful. Assume 601 extents. */ ++ /* ++ * NTSC 1953 colorspace. This only makes sense when dealing with ++ * really, really old NTSC recordings. Superseded by SMPTE 170M. ++ */ + V4L2_COLORSPACE_470_SYSTEM_M = 5, ++ ++ /* ++ * EBU Tech 3213 PAL/SECAM colorspace. This only makes sense when ++ * dealing with really old PAL/SECAM recordings. Superseded by ++ * SMPTE 170M. ++ */ + V4L2_COLORSPACE_470_SYSTEM_BG = 6, + +- /* I know there will be cameras that send this. So, this is +- * unspecified chromaticities and full 0-255 on each of the +- * Y'CbCr components ++ /* ++ * Effectively shorthand for V4L2_COLORSPACE_SRGB, V4L2_YCBCR_ENC_601 ++ * and V4L2_QUANTIZATION_FULL_RANGE. To be used for (Motion-)JPEG. + */ + V4L2_COLORSPACE_JPEG = 7, + +- /* For RGB colourspaces, this is probably a good start. */ ++ /* For RGB colorspaces such as produces by most webcams. */ + V4L2_COLORSPACE_SRGB = 8, ++ ++ /* AdobeRGB colorspace */ ++ V4L2_COLORSPACE_ADOBERGB = 9, ++ ++ /* BT.2020 colorspace, used for UHDTV. */ ++ V4L2_COLORSPACE_BT2020 = 10, ++ ++ /* Raw colorspace: for RAW unprocessed images */ ++ V4L2_COLORSPACE_RAW = 11, ++ ++ /* DCI-P3 colorspace, used by cinema projectors */ ++ V4L2_COLORSPACE_DCI_P3 = 12, + }; + ++/* ++ * Determine how COLORSPACE_DEFAULT should map to a proper colorspace. ++ * This depends on whether this is a SDTV image (use SMPTE 170M), an ++ * HDTV image (use Rec. 709), or something else (use sRGB). ++ */ ++#define V4L2_MAP_COLORSPACE_DEFAULT(is_sdtv, is_hdtv) \ ++ ((is_sdtv) ? V4L2_COLORSPACE_SMPTE170M : \ ++ ((is_hdtv) ? V4L2_COLORSPACE_REC709 : V4L2_COLORSPACE_SRGB)) ++ ++enum v4l2_xfer_func { ++ /* ++ * Mapping of V4L2_XFER_FUNC_DEFAULT to actual transfer functions ++ * for the various colorspaces: ++ * ++ * V4L2_COLORSPACE_SMPTE170M, V4L2_COLORSPACE_470_SYSTEM_M, ++ * V4L2_COLORSPACE_470_SYSTEM_BG, V4L2_COLORSPACE_REC709 and ++ * V4L2_COLORSPACE_BT2020: V4L2_XFER_FUNC_709 ++ * ++ * V4L2_COLORSPACE_SRGB, V4L2_COLORSPACE_JPEG: V4L2_XFER_FUNC_SRGB ++ * ++ * V4L2_COLORSPACE_ADOBERGB: V4L2_XFER_FUNC_ADOBERGB ++ * ++ * V4L2_COLORSPACE_SMPTE240M: V4L2_XFER_FUNC_SMPTE240M ++ * ++ * V4L2_COLORSPACE_RAW: V4L2_XFER_FUNC_NONE ++ * ++ * V4L2_COLORSPACE_DCI_P3: V4L2_XFER_FUNC_DCI_P3 ++ */ ++ V4L2_XFER_FUNC_DEFAULT = 0, ++ V4L2_XFER_FUNC_709 = 1, ++ V4L2_XFER_FUNC_SRGB = 2, ++ V4L2_XFER_FUNC_ADOBERGB = 3, ++ V4L2_XFER_FUNC_SMPTE240M = 4, ++ V4L2_XFER_FUNC_NONE = 5, ++ V4L2_XFER_FUNC_DCI_P3 = 6, ++ V4L2_XFER_FUNC_SMPTE2084 = 7, ++}; ++ ++/* ++ * Determine how XFER_FUNC_DEFAULT should map to a proper transfer function. ++ * This depends on the colorspace. ++ */ ++#define V4L2_MAP_XFER_FUNC_DEFAULT(colsp) \ ++ ((colsp) == V4L2_COLORSPACE_ADOBERGB ? V4L2_XFER_FUNC_ADOBERGB : \ ++ ((colsp) == V4L2_COLORSPACE_SMPTE240M ? V4L2_XFER_FUNC_SMPTE240M : \ ++ ((colsp) == V4L2_COLORSPACE_DCI_P3 ? V4L2_XFER_FUNC_DCI_P3 : \ ++ ((colsp) == V4L2_COLORSPACE_RAW ? V4L2_XFER_FUNC_NONE : \ ++ ((colsp) == V4L2_COLORSPACE_SRGB || (colsp) == V4L2_COLORSPACE_JPEG ? \ ++ V4L2_XFER_FUNC_SRGB : V4L2_XFER_FUNC_709))))) ++ ++enum v4l2_ycbcr_encoding { ++ /* ++ * Mapping of V4L2_YCBCR_ENC_DEFAULT to actual encodings for the ++ * various colorspaces: ++ * ++ * V4L2_COLORSPACE_SMPTE170M, V4L2_COLORSPACE_470_SYSTEM_M, ++ * V4L2_COLORSPACE_470_SYSTEM_BG, V4L2_COLORSPACE_SRGB, ++ * V4L2_COLORSPACE_ADOBERGB and V4L2_COLORSPACE_JPEG: V4L2_YCBCR_ENC_601 ++ * ++ * V4L2_COLORSPACE_REC709 and V4L2_COLORSPACE_DCI_P3: V4L2_YCBCR_ENC_709 ++ * ++ * V4L2_COLORSPACE_BT2020: V4L2_YCBCR_ENC_BT2020 ++ * ++ * V4L2_COLORSPACE_SMPTE240M: V4L2_YCBCR_ENC_SMPTE240M ++ */ ++ V4L2_YCBCR_ENC_DEFAULT = 0, ++ ++ /* ITU-R 601 -- SDTV */ ++ V4L2_YCBCR_ENC_601 = 1, ++ ++ /* Rec. 709 -- HDTV */ ++ V4L2_YCBCR_ENC_709 = 2, ++ ++ /* ITU-R 601/EN 61966-2-4 Extended Gamut -- SDTV */ ++ V4L2_YCBCR_ENC_XV601 = 3, ++ ++ /* Rec. 709/EN 61966-2-4 Extended Gamut -- HDTV */ ++ V4L2_YCBCR_ENC_XV709 = 4, ++ ++#ifndef __KERNEL__ ++ /* ++ * sYCC (Y'CbCr encoding of sRGB), identical to ENC_601. It was added ++ * originally due to a misunderstanding of the sYCC standard. It should ++ * not be used, instead use V4L2_YCBCR_ENC_601. ++ */ ++ V4L2_YCBCR_ENC_SYCC = 5, ++#endif ++ ++ /* BT.2020 Non-constant Luminance Y'CbCr */ ++ V4L2_YCBCR_ENC_BT2020 = 6, ++ ++ /* BT.2020 Constant Luminance Y'CbcCrc */ ++ V4L2_YCBCR_ENC_BT2020_CONST_LUM = 7, ++ ++ /* SMPTE 240M -- Obsolete HDTV */ ++ V4L2_YCBCR_ENC_SMPTE240M = 8, ++}; ++ ++/* ++ * enum v4l2_hsv_encoding values should not collide with the ones from ++ * enum v4l2_ycbcr_encoding. ++ */ ++enum v4l2_hsv_encoding { ++ ++ /* Hue mapped to 0 - 179 */ ++ V4L2_HSV_ENC_180 = 128, ++ ++ /* Hue mapped to 0-255 */ ++ V4L2_HSV_ENC_256 = 129, ++}; ++ ++/* ++ * Determine how YCBCR_ENC_DEFAULT should map to a proper Y'CbCr encoding. ++ * This depends on the colorspace. ++ */ ++#define V4L2_MAP_YCBCR_ENC_DEFAULT(colsp) \ ++ (((colsp) == V4L2_COLORSPACE_REC709 || \ ++ (colsp) == V4L2_COLORSPACE_DCI_P3) ? V4L2_YCBCR_ENC_709 : \ ++ ((colsp) == V4L2_COLORSPACE_BT2020 ? V4L2_YCBCR_ENC_BT2020 : \ ++ ((colsp) == V4L2_COLORSPACE_SMPTE240M ? V4L2_YCBCR_ENC_SMPTE240M : \ ++ V4L2_YCBCR_ENC_601))) ++ ++enum v4l2_quantization { ++ /* ++ * The default for R'G'B' quantization is always full range, except ++ * for the BT2020 colorspace. For Y'CbCr the quantization is always ++ * limited range, except for COLORSPACE_JPEG: this is full range. ++ */ ++ V4L2_QUANTIZATION_DEFAULT = 0, ++ V4L2_QUANTIZATION_FULL_RANGE = 1, ++ V4L2_QUANTIZATION_LIM_RANGE = 2, ++}; ++ ++/* ++ * Determine how QUANTIZATION_DEFAULT should map to a proper quantization. ++ * This depends on whether the image is RGB or not, the colorspace and the ++ * Y'CbCr encoding. ++ */ ++#define V4L2_MAP_QUANTIZATION_DEFAULT(is_rgb_or_hsv, colsp, ycbcr_enc) \ ++ (((is_rgb_or_hsv) && (colsp) == V4L2_COLORSPACE_BT2020) ? \ ++ V4L2_QUANTIZATION_LIM_RANGE : \ ++ (((is_rgb_or_hsv) || (colsp) == V4L2_COLORSPACE_JPEG) ? \ ++ V4L2_QUANTIZATION_FULL_RANGE : V4L2_QUANTIZATION_LIM_RANGE)) ++ + enum v4l2_priority { + V4L2_PRIORITY_UNSET = 0, /* not initialized */ + V4L2_PRIORITY_BACKGROUND = 1, +@@ -306,11 +483,15 @@ struct v4l2_capability { + + #define V4L2_CAP_SDR_CAPTURE 0x00100000 /* Is a SDR capture device */ + #define V4L2_CAP_EXT_PIX_FORMAT 0x00200000 /* Supports the extended pixel format */ ++#define V4L2_CAP_SDR_OUTPUT 0x00400000 /* Is a SDR output device */ ++#define V4L2_CAP_META_CAPTURE 0x00800000 /* Is a metadata capture device */ + + #define V4L2_CAP_READWRITE 0x01000000 /* read/write systemcalls */ + #define V4L2_CAP_ASYNCIO 0x02000000 /* async I/O */ + #define V4L2_CAP_STREAMING 0x04000000 /* streaming I/O ioctls */ + ++#define V4L2_CAP_TOUCH 0x10000000 /* Is a touch device */ ++ + #define V4L2_CAP_DEVICE_CAPS 0x80000000 /* sets device capabilities field */ + + /* +@@ -326,6 +507,12 @@ struct v4l2_pix_format { + uint32_t colorspace; /* enum v4l2_colorspace */ + uint32_t priv; /* private data, depends on pixelformat */ + uint32_t flags; /* format flags (V4L2_PIX_FMT_FLAG_*) */ ++ union { ++ uint32_t ycbcr_enc; ++ uint32_t hsv_enc; ++ }; ++ uint32_t quantization; ++ uint32_t xfer_func; + }; + + /* Pixel format FOURCC depth Description */ +@@ -360,6 +547,7 @@ struct v4l2_pix_format { + #define V4L2_PIX_FMT_Y10 v4l2_fourcc('Y', '1', '0', ' ') /* 10 Greyscale */ + #define V4L2_PIX_FMT_Y12 v4l2_fourcc('Y', '1', '2', ' ') /* 12 Greyscale */ + #define V4L2_PIX_FMT_Y16 v4l2_fourcc('Y', '1', '6', ' ') /* 16 Greyscale */ ++#define V4L2_PIX_FMT_Y16_BE v4l2_fourcc_be('Y', '1', '6', ' ') /* 16 Greyscale BE */ + + /* Grey bit-packed formats */ + #define V4L2_PIX_FMT_Y10BPACK v4l2_fourcc('Y', '1', '0', 'B') /* 10 Greyscale bit-packed */ +@@ -371,22 +559,16 @@ struct v4l2_pix_format { + #define V4L2_PIX_FMT_UV8 v4l2_fourcc('U', 'V', '8', ' ') /* 8 UV 4:4 */ + + /* Luminance+Chrominance formats */ +-#define V4L2_PIX_FMT_YVU410 v4l2_fourcc('Y', 'V', 'U', '9') /* 9 YVU 4:1:0 */ +-#define V4L2_PIX_FMT_YVU420 v4l2_fourcc('Y', 'V', '1', '2') /* 12 YVU 4:2:0 */ + #define V4L2_PIX_FMT_YUYV v4l2_fourcc('Y', 'U', 'Y', 'V') /* 16 YUV 4:2:2 */ + #define V4L2_PIX_FMT_YYUV v4l2_fourcc('Y', 'Y', 'U', 'V') /* 16 YUV 4:2:2 */ + #define V4L2_PIX_FMT_YVYU v4l2_fourcc('Y', 'V', 'Y', 'U') /* 16 YVU 4:2:2 */ + #define V4L2_PIX_FMT_UYVY v4l2_fourcc('U', 'Y', 'V', 'Y') /* 16 YUV 4:2:2 */ + #define V4L2_PIX_FMT_VYUY v4l2_fourcc('V', 'Y', 'U', 'Y') /* 16 YUV 4:2:2 */ +-#define V4L2_PIX_FMT_YUV422P v4l2_fourcc('4', '2', '2', 'P') /* 16 YVU422 planar */ +-#define V4L2_PIX_FMT_YUV411P v4l2_fourcc('4', '1', '1', 'P') /* 16 YVU411 planar */ + #define V4L2_PIX_FMT_Y41P v4l2_fourcc('Y', '4', '1', 'P') /* 12 YUV 4:1:1 */ + #define V4L2_PIX_FMT_YUV444 v4l2_fourcc('Y', '4', '4', '4') /* 16 xxxxyyyy uuuuvvvv */ + #define V4L2_PIX_FMT_YUV555 v4l2_fourcc('Y', 'U', 'V', 'O') /* 16 YUV-5-5-5 */ + #define V4L2_PIX_FMT_YUV565 v4l2_fourcc('Y', 'U', 'V', 'P') /* 16 YUV-5-6-5 */ + #define V4L2_PIX_FMT_YUV32 v4l2_fourcc('Y', 'U', 'V', '4') /* 32 YUV-8-8-8-8 */ +-#define V4L2_PIX_FMT_YUV410 v4l2_fourcc('Y', 'U', 'V', '9') /* 9 YUV 4:1:0 */ +-#define V4L2_PIX_FMT_YUV420 v4l2_fourcc('Y', 'U', '1', '2') /* 12 YUV 4:2:0 */ + #define V4L2_PIX_FMT_HI240 v4l2_fourcc('H', 'I', '2', '4') /* 8 8-bit color */ + #define V4L2_PIX_FMT_HM12 v4l2_fourcc('H', 'M', '1', '2') /* 8 YUV 4:2:0 16x16 macroblocks */ + #define V4L2_PIX_FMT_M420 v4l2_fourcc('M', '4', '2', '0') /* 12 YUV 4:2:0 2 lines y, 1 line uv interleaved */ +@@ -407,9 +589,21 @@ struct v4l2_pix_format { + #define V4L2_PIX_FMT_NV12MT v4l2_fourcc('T', 'M', '1', '2') /* 12 Y/CbCr 4:2:0 64x32 macroblocks */ + #define V4L2_PIX_FMT_NV12MT_16X16 v4l2_fourcc('V', 'M', '1', '2') /* 12 Y/CbCr 4:2:0 16x16 macroblocks */ + ++/* three planes - Y Cb, Cr */ ++#define V4L2_PIX_FMT_YUV410 v4l2_fourcc('Y', 'U', 'V', '9') /* 9 YUV 4:1:0 */ ++#define V4L2_PIX_FMT_YVU410 v4l2_fourcc('Y', 'V', 'U', '9') /* 9 YVU 4:1:0 */ ++#define V4L2_PIX_FMT_YUV411P v4l2_fourcc('4', '1', '1', 'P') /* 12 YVU411 planar */ ++#define V4L2_PIX_FMT_YUV420 v4l2_fourcc('Y', 'U', '1', '2') /* 12 YUV 4:2:0 */ ++#define V4L2_PIX_FMT_YVU420 v4l2_fourcc('Y', 'V', '1', '2') /* 12 YVU 4:2:0 */ ++#define V4L2_PIX_FMT_YUV422P v4l2_fourcc('4', '2', '2', 'P') /* 16 YVU422 planar */ ++ + /* three non contiguous planes - Y, Cb, Cr */ + #define V4L2_PIX_FMT_YUV420M v4l2_fourcc('Y', 'M', '1', '2') /* 12 YUV420 planar */ + #define V4L2_PIX_FMT_YVU420M v4l2_fourcc('Y', 'M', '2', '1') /* 12 YVU420 planar */ ++#define V4L2_PIX_FMT_YUV422M v4l2_fourcc('Y', 'M', '1', '6') /* 16 YUV422 planar */ ++#define V4L2_PIX_FMT_YVU422M v4l2_fourcc('Y', 'M', '6', '1') /* 16 YVU422 planar */ ++#define V4L2_PIX_FMT_YUV444M v4l2_fourcc('Y', 'M', '2', '4') /* 24 YUV444 planar */ ++#define V4L2_PIX_FMT_YVU444M v4l2_fourcc('Y', 'M', '4', '2') /* 24 YVU444 planar */ + + /* Bayer formats - see http://www.siliconimaging.com/RGB%20Bayer.htm */ + #define V4L2_PIX_FMT_SBGGR8 v4l2_fourcc('B', 'A', '8', '1') /* 8 BGBG.. GRGR.. */ +@@ -420,10 +614,11 @@ struct v4l2_pix_format { + #define V4L2_PIX_FMT_SGBRG10 v4l2_fourcc('G', 'B', '1', '0') /* 10 GBGB.. RGRG.. */ + #define V4L2_PIX_FMT_SGRBG10 v4l2_fourcc('B', 'A', '1', '0') /* 10 GRGR.. BGBG.. */ + #define V4L2_PIX_FMT_SRGGB10 v4l2_fourcc('R', 'G', '1', '0') /* 10 RGRG.. GBGB.. */ +-#define V4L2_PIX_FMT_SBGGR12 v4l2_fourcc('B', 'G', '1', '2') /* 12 BGBG.. GRGR.. */ +-#define V4L2_PIX_FMT_SGBRG12 v4l2_fourcc('G', 'B', '1', '2') /* 12 GBGB.. RGRG.. */ +-#define V4L2_PIX_FMT_SGRBG12 v4l2_fourcc('B', 'A', '1', '2') /* 12 GRGR.. BGBG.. */ +-#define V4L2_PIX_FMT_SRGGB12 v4l2_fourcc('R', 'G', '1', '2') /* 12 RGRG.. GBGB.. */ ++ /* 10bit raw bayer packed, 5 bytes for every 4 pixels */ ++#define V4L2_PIX_FMT_SBGGR10P v4l2_fourcc('p', 'B', 'A', 'A') ++#define V4L2_PIX_FMT_SGBRG10P v4l2_fourcc('p', 'G', 'A', 'A') ++#define V4L2_PIX_FMT_SGRBG10P v4l2_fourcc('p', 'g', 'A', 'A') ++#define V4L2_PIX_FMT_SRGGB10P v4l2_fourcc('p', 'R', 'A', 'A') + /* 10bit raw bayer a-law compressed to 8 bits */ + #define V4L2_PIX_FMT_SBGGR10ALAW8 v4l2_fourcc('a', 'B', 'A', '8') + #define V4L2_PIX_FMT_SGBRG10ALAW8 v4l2_fourcc('a', 'G', 'A', '8') +@@ -434,11 +629,23 @@ struct v4l2_pix_format { + #define V4L2_PIX_FMT_SGBRG10DPCM8 v4l2_fourcc('b', 'G', 'A', '8') + #define V4L2_PIX_FMT_SGRBG10DPCM8 v4l2_fourcc('B', 'D', '1', '0') + #define V4L2_PIX_FMT_SRGGB10DPCM8 v4l2_fourcc('b', 'R', 'A', '8') +- /* +- * 10bit raw bayer, expanded to 16 bits +- * xxxxrrrrrrrrrrxxxxgggggggggg xxxxggggggggggxxxxbbbbbbbbbb... +- */ ++#define V4L2_PIX_FMT_SBGGR12 v4l2_fourcc('B', 'G', '1', '2') /* 12 BGBG.. GRGR.. */ ++#define V4L2_PIX_FMT_SGBRG12 v4l2_fourcc('G', 'B', '1', '2') /* 12 GBGB.. RGRG.. */ ++#define V4L2_PIX_FMT_SGRBG12 v4l2_fourcc('B', 'A', '1', '2') /* 12 GRGR.. BGBG.. */ ++#define V4L2_PIX_FMT_SRGGB12 v4l2_fourcc('R', 'G', '1', '2') /* 12 RGRG.. GBGB.. */ ++ /* 12bit raw bayer packed, 6 bytes for every 4 pixels */ ++#define V4L2_PIX_FMT_SBGGR12P v4l2_fourcc('p', 'B', 'C', 'C') ++#define V4L2_PIX_FMT_SGBRG12P v4l2_fourcc('p', 'G', 'C', 'C') ++#define V4L2_PIX_FMT_SGRBG12P v4l2_fourcc('p', 'g', 'C', 'C') ++#define V4L2_PIX_FMT_SRGGB12P v4l2_fourcc('p', 'R', 'C', 'C') + #define V4L2_PIX_FMT_SBGGR16 v4l2_fourcc('B', 'Y', 'R', '2') /* 16 BGBG.. GRGR.. */ ++#define V4L2_PIX_FMT_SGBRG16 v4l2_fourcc('G', 'B', '1', '6') /* 16 GBGB.. RGRG.. */ ++#define V4L2_PIX_FMT_SGRBG16 v4l2_fourcc('G', 'R', '1', '6') /* 16 GRGR.. BGBG.. */ ++#define V4L2_PIX_FMT_SRGGB16 v4l2_fourcc('R', 'G', '1', '6') /* 16 RGRG.. GBGB.. */ ++ ++/* HSV formats */ ++#define V4L2_PIX_FMT_HSV24 v4l2_fourcc('H', 'S', 'V', '3') ++#define V4L2_PIX_FMT_HSV32 v4l2_fourcc('H', 'S', 'V', '4') + + /* compressed formats */ + #define V4L2_PIX_FMT_MJPEG v4l2_fourcc('M', 'J', 'P', 'G') /* Motion-JPEG */ +@@ -456,6 +663,8 @@ struct v4l2_pix_format { + #define V4L2_PIX_FMT_VC1_ANNEX_G v4l2_fourcc('V', 'C', '1', 'G') /* SMPTE 421M Annex G compliant stream */ + #define V4L2_PIX_FMT_VC1_ANNEX_L v4l2_fourcc('V', 'C', '1', 'L') /* SMPTE 421M Annex L compliant stream */ + #define V4L2_PIX_FMT_VP8 v4l2_fourcc('V', 'P', '8', '0') /* VP8 */ ++#define V4L2_PIX_FMT_VP9 v4l2_fourcc('V', 'P', '9', '0') /* VP9 */ ++#define V4L2_PIX_FMT_HEVC v4l2_fourcc('H', 'E', 'V', 'C') /* HEVC aka H.265 */ + + /* Vendor-specific formats */ + #define V4L2_PIX_FMT_CPIA1 v4l2_fourcc('C', 'P', 'I', 'A') /* cpia1 YUV */ +@@ -484,6 +693,17 @@ struct v4l2_pix_format { + #define V4L2_PIX_FMT_JPGL v4l2_fourcc('J', 'P', 'G', 'L') /* JPEG-Lite */ + #define V4L2_PIX_FMT_SE401 v4l2_fourcc('S', '4', '0', '1') /* se401 janggu compressed rgb */ + #define V4L2_PIX_FMT_S5C_UYVY_JPG v4l2_fourcc('S', '5', 'C', 'I') /* S5C73M3 interleaved UYVY/JPEG */ ++#define V4L2_PIX_FMT_Y8I v4l2_fourcc('Y', '8', 'I', ' ') /* Greyscale 8-bit L/R interleaved */ ++#define V4L2_PIX_FMT_Y12I v4l2_fourcc('Y', '1', '2', 'I') /* Greyscale 12-bit L/R interleaved */ ++#define V4L2_PIX_FMT_Z16 v4l2_fourcc('Z', '1', '6', ' ') /* Depth data 16-bit */ ++#define V4L2_PIX_FMT_MT21C v4l2_fourcc('M', 'T', '2', '1') /* Mediatek compressed block mode */ ++#define V4L2_PIX_FMT_INZI v4l2_fourcc('I', 'N', 'Z', 'I') /* Intel Planar Greyscale 10-bit and Depth 16-bit */ ++ ++/* 10bit raw bayer packed, 32 bytes for every 25 pixels, last LSB 6 bits unused */ ++#define V4L2_PIX_FMT_IPU3_SBGGR10 v4l2_fourcc('i', 'p', '3', 'b') /* IPU3 packed 10-bit BGGR bayer */ ++#define V4L2_PIX_FMT_IPU3_SGBRG10 v4l2_fourcc('i', 'p', '3', 'g') /* IPU3 packed 10-bit GBRG bayer */ ++#define V4L2_PIX_FMT_IPU3_SGRBG10 v4l2_fourcc('i', 'p', '3', 'G') /* IPU3 packed 10-bit GRBG bayer */ ++#define V4L2_PIX_FMT_IPU3_SRGGB10 v4l2_fourcc('i', 'p', '3', 'r') /* IPU3 packed 10-bit RGGB bayer */ + + /* SDR formats - used only for Software Defined Radio devices */ + #define V4L2_SDR_FMT_CU8 v4l2_fourcc('C', 'U', '0', '8') /* IQ u8 */ +@@ -491,6 +711,20 @@ struct v4l2_pix_format { + #define V4L2_SDR_FMT_CS8 v4l2_fourcc('C', 'S', '0', '8') /* complex s8 */ + #define V4L2_SDR_FMT_CS14LE v4l2_fourcc('C', 'S', '1', '4') /* complex s14le */ + #define V4L2_SDR_FMT_RU12LE v4l2_fourcc('R', 'U', '1', '2') /* real u12le */ ++#define V4L2_SDR_FMT_PCU16BE v4l2_fourcc('P', 'C', '1', '6') /* planar complex u16be */ ++#define V4L2_SDR_FMT_PCU18BE v4l2_fourcc('P', 'C', '1', '8') /* planar complex u18be */ ++#define V4L2_SDR_FMT_PCU20BE v4l2_fourcc('P', 'C', '2', '0') /* planar complex u20be */ ++ ++/* Touch formats - used for Touch devices */ ++#define V4L2_TCH_FMT_DELTA_TD16 v4l2_fourcc('T', 'D', '1', '6') /* 16-bit signed deltas */ ++#define V4L2_TCH_FMT_DELTA_TD08 v4l2_fourcc('T', 'D', '0', '8') /* 8-bit signed deltas */ ++#define V4L2_TCH_FMT_TU16 v4l2_fourcc('T', 'U', '1', '6') /* 16-bit unsigned touch data */ ++#define V4L2_TCH_FMT_TU08 v4l2_fourcc('T', 'U', '0', '8') /* 8-bit unsigned touch data */ ++ ++/* Meta-data formats */ ++#define V4L2_META_FMT_VSP1_HGO v4l2_fourcc('V', 'S', 'P', 'H') /* R-Car VSP1 1-D Histogram */ ++#define V4L2_META_FMT_VSP1_HGT v4l2_fourcc('V', 'S', 'P', 'T') /* R-Car VSP1 2-D Histogram */ ++#define V4L2_META_FMT_UVC v4l2_fourcc('U', 'V', 'C', 'H') /* UVC Payload Header metadata */ + + /* priv field value to indicates that subsequent fields are valid. */ + #define V4L2_PIX_FMT_PRIV_MAGIC 0xfeedcafe +@@ -513,8 +747,7 @@ struct v4l2_fmtdesc { + #define V4L2_FMT_FLAG_COMPRESSED 0x0001 + #define V4L2_FMT_FLAG_EMULATED 0x0002 + +-#if 1 +- /* Experimental Frame Size and frame rate enumeration */ ++ /* Frame Size and frame rate enumeration */ + /* + * F R A M E S I Z E E N U M E R A T I O N + */ +@@ -580,7 +813,6 @@ struct v4l2_frmivalenum { + + uint32_t reserved[2]; /* Reserved space for future use */ + }; +-#endif + + /* + * T I M E C O D E +@@ -765,6 +997,8 @@ struct v4l2_buffer { + #define V4L2_BUF_FLAG_TSTAMP_SRC_MASK 0x00070000 + #define V4L2_BUF_FLAG_TSTAMP_SRC_EOF 0x00000000 + #define V4L2_BUF_FLAG_TSTAMP_SRC_SOE 0x00010000 ++/* mem2mem encoder/decoder */ ++#define V4L2_BUF_FLAG_LAST 0x00100000 + + /** + * struct v4l2_exportbuffer - export of video buffer as DMABUF file descriptor +@@ -1073,6 +1307,9 @@ struct v4l2_standard { + * (aka field 2) of interlaced field formats + * @standards: Standards the timing belongs to + * @flags: Flags ++ * @picture_aspect: The picture aspect ratio (hor/vert). ++ * @cea861_vic: VIC code as per the CEA-861 standard. ++ * @hdmi_vic: VIC code as per the HDMI standard. + * @reserved: Reserved fields, must be zeroed. + * + * A note regarding vertical interlaced timings: height refers to the total +@@ -1102,7 +1339,10 @@ struct v4l2_bt_timings { + uint32_t il_vbackporch; + uint32_t standards; + uint32_t flags; +- uint32_t reserved[14]; ++ struct v4l2_fract picture_aspect; ++ uint8_t cea861_vic; ++ uint8_t hdmi_vic; ++ uint8_t reserved[46]; + } __attribute__ ((packed)); + + /* Interlaced or progressive format */ +@@ -1118,6 +1358,7 @@ struct v4l2_bt_timings { + #define V4L2_DV_BT_STD_DMT (1 << 1) /* VESA Discrete Monitor Timings */ + #define V4L2_DV_BT_STD_CVT (1 << 2) /* VESA Coordinated Video Timings */ + #define V4L2_DV_BT_STD_GTF (1 << 3) /* VESA Generalized Timings Formula */ ++#define V4L2_DV_BT_STD_SDI (1 << 4) /* SDI Timings */ + + /* Flags */ + +@@ -1143,6 +1384,36 @@ struct v4l2_bt_timings { + exactly the same number of half-lines. Whether half-lines can be detected + or used depends on the hardware. */ + #define V4L2_DV_FL_HALF_LINE (1 << 3) ++/* ++ * If set, then this is a Consumer Electronics (CE) video format. Such formats ++ * differ from other formats (commonly called IT formats) in that if RGB ++ * encoding is used then by default the RGB values use limited range (i.e. ++ * use the range 16-235) as opposed to 0-255. All formats defined in CEA-861 ++ * except for the 640x480 format are CE formats. ++ */ ++#define V4L2_DV_FL_IS_CE_VIDEO (1 << 4) ++/* Some formats like SMPTE-125M have an interlaced signal with a odd ++ * total height. For these formats, if this flag is set, the first ++ * field has the extra line. If not, it is the second field. ++ */ ++#define V4L2_DV_FL_FIRST_FIELD_EXTRA_LINE (1 << 5) ++/* ++ * If set, then the picture_aspect field is valid. Otherwise assume that the ++ * pixels are square, so the picture aspect ratio is the same as the width to ++ * height ratio. ++ */ ++#define V4L2_DV_FL_HAS_PICTURE_ASPECT (1 << 6) ++/* ++ * If set, then the cea861_vic field is valid and contains the Video ++ * Identification Code as per the CEA-861 standard. ++ */ ++#define V4L2_DV_FL_HAS_CEA861_VIC (1 << 7) ++/* ++ * If set, then the hdmi_vic field is valid and contains the Video ++ * Identification Code as per the HDMI standard (HDMI Vendor Specific ++ * InfoFrame). ++ */ ++#define V4L2_DV_FL_HAS_HDMI_VIC (1 << 8) + + /* A few useful defines to calculate the total blanking and frame sizes */ + #define V4L2_DV_BT_BLANKING_WIDTH(bt) \ +@@ -1252,6 +1523,7 @@ struct v4l2_input { + /* Values for the 'type' field */ + #define V4L2_INPUT_TYPE_TUNER 1 + #define V4L2_INPUT_TYPE_CAMERA 2 ++#define V4L2_INPUT_TYPE_TOUCH 3 + + /* field 'status' - general */ + #define V4L2_IN_ST_NO_POWER 0x00000001 /* Attached device is off */ +@@ -1266,6 +1538,8 @@ struct v4l2_input { + /* field 'status' - analog */ + #define V4L2_IN_ST_NO_H_LOCK 0x00000100 /* No horizontal sync lock */ + #define V4L2_IN_ST_COLOR_KILL 0x00000200 /* Color killer is active */ ++#define V4L2_IN_ST_NO_V_LOCK 0x00000400 /* No vertical sync lock */ ++#define V4L2_IN_ST_NO_STD_LOCK 0x00000800 /* No standard format lock */ + + /* field 'status' - digital */ + #define V4L2_IN_ST_NO_SYNC 0x00010000 /* No synchronization lock */ +@@ -1281,6 +1555,7 @@ struct v4l2_input { + #define V4L2_IN_CAP_DV_TIMINGS 0x00000002 /* Supports S_DV_TIMINGS */ + #define V4L2_IN_CAP_CUSTOM_TIMINGS V4L2_IN_CAP_DV_TIMINGS /* For compatibility */ + #define V4L2_IN_CAP_STD 0x00000004 /* Supports S_STD */ ++#define V4L2_IN_CAP_NATIVE_SIZE 0x00000008 /* Supports setting native size */ + + /* + * V I D E O O U T P U T S +@@ -1340,6 +1615,8 @@ struct v4l2_ext_controls { + #define V4L2_CTRL_ID2CLASS(id) ((id) & 0x0fff0000UL) + #define V4L2_CTRL_DRIVER_PRIV(id) (((id) & 0xffff) >= 0x1000) + #define V4L2_CTRL_MAX_DIMS (4) ++#define V4L2_CTRL_WHICH_CUR_VAL 0 ++#define V4L2_CTRL_WHICH_DEF_VAL 0x0f000000 + + enum v4l2_ctrl_type { + V4L2_CTRL_TYPE_INTEGER = 1, +@@ -1410,6 +1687,8 @@ struct v4l2_querymenu { + #define V4L2_CTRL_FLAG_WRITE_ONLY 0x0040 + #define V4L2_CTRL_FLAG_VOLATILE 0x0080 + #define V4L2_CTRL_FLAG_HAS_PAYLOAD 0x0100 ++#define V4L2_CTRL_FLAG_EXECUTE_ON_WRITE 0x0200 ++#define V4L2_CTRL_FLAG_MODIFY_LAYOUT 0x0400 + + /* Query flags, to be ORed with the control ID */ + #define V4L2_CTRL_FLAG_NEXT_CTRL 0x80000000 +@@ -1562,8 +1841,6 @@ struct v4l2_audioout { + + /* + * M P E G S E R V I C E S +- * +- * NOTE: EXPERIMENTAL API + */ + #if 1 + #define V4L2_ENC_IDX_FRAME_I (0) +@@ -1809,6 +2086,9 @@ struct v4l2_plane_pix_format { + * @plane_fmt: per-plane information + * @num_planes: number of planes for this format + * @flags: format flags (V4L2_PIX_FMT_FLAG_*) ++ * @ycbcr_enc: enum v4l2_ycbcr_encoding, Y'CbCr encoding ++ * @quantization: enum v4l2_quantization, colorspace quantization ++ * @xfer_func: enum v4l2_xfer_func, colorspace transfer function + */ + struct v4l2_pix_format_mplane { + uint32_t width; +@@ -1820,7 +2100,13 @@ struct v4l2_pix_format_mplane { + struct v4l2_plane_pix_format plane_fmt[VIDEO_MAX_PLANES]; + uint8_t num_planes; + uint8_t flags; +- uint8_t reserved[10]; ++ union { ++ uint8_t ycbcr_enc; ++ uint8_t hsv_enc; ++ }; ++ uint8_t quantization; ++ uint8_t xfer_func; ++ uint8_t reserved[7]; + } __attribute__ ((packed)); + + /** +@@ -2094,45 +2380,32 @@ struct v4l2_create_buffers { + #define VIDIOC_DBG_G_REGISTER _IOWR('V', 80, struct v4l2_dbg_register) + + #define VIDIOC_S_HW_FREQ_SEEK _IOW('V', 82, struct v4l2_hw_freq_seek) +- + #define VIDIOC_S_DV_TIMINGS _IOWR('V', 87, struct v4l2_dv_timings) + #define VIDIOC_G_DV_TIMINGS _IOWR('V', 88, struct v4l2_dv_timings) + #define VIDIOC_DQEVENT _IOR('V', 89, struct v4l2_event) + #define VIDIOC_SUBSCRIBE_EVENT _IOW('V', 90, struct v4l2_event_subscription) + #define VIDIOC_UNSUBSCRIBE_EVENT _IOW('V', 91, struct v4l2_event_subscription) +- +-/* Experimental, the below two ioctls may change over the next couple of kernel +- versions */ + #define VIDIOC_CREATE_BUFS _IOWR('V', 92, struct v4l2_create_buffers) + #define VIDIOC_PREPARE_BUF _IOWR('V', 93, struct v4l2_buffer) +- +-/* Experimental selection API */ + #define VIDIOC_G_SELECTION _IOWR('V', 94, struct v4l2_selection) + #define VIDIOC_S_SELECTION _IOWR('V', 95, struct v4l2_selection) +- +-/* Experimental, these two ioctls may change over the next couple of kernel +- versions. */ + #define VIDIOC_DECODER_CMD _IOWR('V', 96, struct v4l2_decoder_cmd) + #define VIDIOC_TRY_DECODER_CMD _IOWR('V', 97, struct v4l2_decoder_cmd) +- +-/* Experimental, these three ioctls may change over the next couple of kernel +- versions. */ + #define VIDIOC_ENUM_DV_TIMINGS _IOWR('V', 98, struct v4l2_enum_dv_timings) + #define VIDIOC_QUERY_DV_TIMINGS _IOR('V', 99, struct v4l2_dv_timings) + #define VIDIOC_DV_TIMINGS_CAP _IOWR('V', 100, struct v4l2_dv_timings_cap) +- +-/* Experimental, this ioctl may change over the next couple of kernel +- versions. */ + #define VIDIOC_ENUM_FREQ_BANDS _IOWR('V', 101, struct v4l2_frequency_band) + +-/* Experimental, meant for debugging, testing and internal use. +- Never use these in applications! */ ++/* ++ * Experimental, meant for debugging, testing and internal use. ++ * Never use this in applications! ++ */ + #define VIDIOC_DBG_G_CHIP_INFO _IOWR('V', 102, struct v4l2_dbg_chip_info) + + #define VIDIOC_QUERY_EXT_CTRL _IOWR('V', 103, struct v4l2_query_ext_ctrl) + + /* Reminder: when adding new ioctls please add support for them to +- drivers/media/video/v4l2-compat-ioctl32.c as well! */ ++ drivers/media/v4l2-core/v4l2-compat-ioctl32.c as well! */ + + #define BASE_VIDIOC_PRIVATE 192 /* 192-255 are private */ + diff --git a/multimedia/libva-intel-driver/Makefile b/multimedia/libva-intel-driver/Makefile index 36c829aa884..a1bbc4de84d 100644 --- a/multimedia/libva-intel-driver/Makefile +++ b/multimedia/libva-intel-driver/Makefile @@ -3,7 +3,7 @@ PORTNAME= libva-intel-driver PORTVERSION= 2.2.0 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= multimedia MAINTAINER= madpilot@FreeBSD.org diff --git a/multimedia/libva/Makefile b/multimedia/libva/Makefile index 563708be39c..73d4f6a6134 100644 --- a/multimedia/libva/Makefile +++ b/multimedia/libva/Makefile @@ -2,7 +2,7 @@ PORTNAME= libva PORTVERSION= 2.2.0 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= multimedia MAINTAINER= madpilot@FreeBSD.org diff --git a/multimedia/libxine/Makefile b/multimedia/libxine/Makefile index de3072c9b48..8c4e69bf8f8 100644 --- a/multimedia/libxine/Makefile +++ b/multimedia/libxine/Makefile @@ -3,7 +3,7 @@ PORTNAME= xine PORTVERSION= 1.2.9 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= multimedia ipv6 MASTER_SITES= SF/${PORTNAME}/${PORTNAME}-lib/${PORTVERSION} PKGNAMEPREFIX= lib diff --git a/multimedia/lives/Makefile b/multimedia/lives/Makefile index f2ff2593d11..8f8b900f86a 100644 --- a/multimedia/lives/Makefile +++ b/multimedia/lives/Makefile @@ -3,7 +3,7 @@ PORTNAME= lives PORTVERSION= 2.8.7 -PORTREVISION= 5 +PORTREVISION= 6 CATEGORIES= multimedia MASTER_SITES= http://lives-video.com/releases/ DISTNAME= LiVES-${PORTVERSION} diff --git a/multimedia/mjpegtools/Makefile b/multimedia/mjpegtools/Makefile index 6c98ab067f5..38062ecfbfa 100644 --- a/multimedia/mjpegtools/Makefile +++ b/multimedia/mjpegtools/Makefile @@ -3,7 +3,7 @@ PORTNAME= mjpegtools PORTVERSION= 2.1.0 -PORTREVISION= 10 +PORTREVISION= 11 CATEGORIES= multimedia MASTER_SITES= SF/${PORTNAME:S/tools//}/${PORTNAME}/${PORTVERSION} diff --git a/multimedia/mjpg-streamer/Makefile b/multimedia/mjpg-streamer/Makefile index ba912448c31..66d94a95e72 100644 --- a/multimedia/mjpg-streamer/Makefile +++ b/multimedia/mjpg-streamer/Makefile @@ -3,7 +3,7 @@ PORTNAME= mjpg-streamer PORTVERSION= r63 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= multimedia net MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/Sourcecode diff --git a/multimedia/mkvtoolnix/Makefile b/multimedia/mkvtoolnix/Makefile index dc0ad60080c..dbce8deb069 100644 --- a/multimedia/mkvtoolnix/Makefile +++ b/multimedia/mkvtoolnix/Makefile @@ -2,7 +2,7 @@ # $FreeBSD$ PORTNAME= mkvtoolnix -PORTVERSION= 26.0.0 +PORTVERSION= 27.0.0 CATEGORIES= multimedia audio MASTER_SITES= http://www.bunkus.org/videotools/mkvtoolnix/sources/ \ https://mkvtoolnix.download/sources/ diff --git a/multimedia/mkvtoolnix/distinfo b/multimedia/mkvtoolnix/distinfo index 3d5670605b3..b647bb1550f 100644 --- a/multimedia/mkvtoolnix/distinfo +++ b/multimedia/mkvtoolnix/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1535572127 -SHA256 (mkvtoolnix-26.0.0.tar.xz) = d51e63c356f9f0c92cc0b01ff6e78253954c74186be6ef4c40c5690d18fda7e0 -SIZE (mkvtoolnix-26.0.0.tar.xz) = 4802044 +TIMESTAMP = 1538158226 +SHA256 (mkvtoolnix-27.0.0.tar.xz) = 2f45bb2d26a230b78d16c7c5fddbd0d62339f04a04b5738026d4783435e4e8c2 +SIZE (mkvtoolnix-27.0.0.tar.xz) = 4811204 diff --git a/multimedia/motion/Makefile b/multimedia/motion/Makefile index e9b747b48d4..d45f54c05b5 100644 --- a/multimedia/motion/Makefile +++ b/multimedia/motion/Makefile @@ -4,7 +4,7 @@ PORTNAME= motion PORTVERSION= 4.0.1 DISTVERSIONPREFIX= release- -PORTREVISION= 7 +PORTREVISION= 8 CATEGORIES= multimedia MAINTAINER= ports@FreeBSD.org diff --git a/multimedia/mplayer/Makefile b/multimedia/mplayer/Makefile index 9aa2b1f97b0..17a56abbd97 100644 --- a/multimedia/mplayer/Makefile +++ b/multimedia/mplayer/Makefile @@ -3,6 +3,7 @@ PORTNAME= mplayer PORTVERSION= ${MPLAYER_PORT_VERSION}.${MPLAYER_SNAPSHOT_DATE:S/-//g} +PORTREVISION= 1 CATEGORIES= multimedia audio MAINTAINER= riggs@FreeBSD.org diff --git a/multimedia/mpv/Makefile b/multimedia/mpv/Makefile index 84b46e77052..e13d773365b 100644 --- a/multimedia/mpv/Makefile +++ b/multimedia/mpv/Makefile @@ -4,7 +4,7 @@ PORTNAME= mpv PORTVERSION= 0.29.0 DISTVERSIONPREFIX= v -PORTREVISION= 5 +PORTREVISION= 6 PORTEPOCH= 1 CATEGORIES= multimedia audio MASTER_SITES= https://waf.io/:waf diff --git a/multimedia/mythtv/Makefile b/multimedia/mythtv/Makefile index 8139e5e9ebf..4e1fca68221 100644 --- a/multimedia/mythtv/Makefile +++ b/multimedia/mythtv/Makefile @@ -4,7 +4,7 @@ PORTNAME= mythtv DISTVERSIONPREFIX= v DISTVERSION= 29.1 -PORTREVISION?= 1 +PORTREVISION?= 2 PORTEPOCH= 1 CATEGORIES= multimedia diff --git a/multimedia/obs-studio/Makefile b/multimedia/obs-studio/Makefile index dc0f4f56f4a..055294b8768 100644 --- a/multimedia/obs-studio/Makefile +++ b/multimedia/obs-studio/Makefile @@ -2,6 +2,7 @@ PORTNAME= obs-studio DISTVERSION= 22.0.3 +PORTREVISION= 1 PORTSREVISION= 2 CATEGORIES= multimedia diff --git a/multimedia/pwcview/Makefile b/multimedia/pwcview/Makefile index 287623b4c97..c7d8b4086a3 100644 --- a/multimedia/pwcview/Makefile +++ b/multimedia/pwcview/Makefile @@ -3,7 +3,7 @@ PORTNAME= pwcview PORTVERSION= 1.4.1 -PORTREVISION= 6 +PORTREVISION= 7 CATEGORIES= multimedia MASTER_SITES= http://raaf.atspace.org/ \ http://www.selasky.org/hans_petter/video4bsd/releases/ \ diff --git a/multimedia/qt4-mobility/Makefile b/multimedia/qt4-mobility/Makefile index 56dcfd0711c..0fe65a77c14 100644 --- a/multimedia/qt4-mobility/Makefile +++ b/multimedia/qt4-mobility/Makefile @@ -3,7 +3,7 @@ PORTNAME= mobility PORTVERSION= 1.2.2 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= multimedia MASTER_SITES= http://dev.gentoo.org/~pesa/distfiles/ \ LOCAL/vg diff --git a/multimedia/qt5-multimedia/Makefile b/multimedia/qt5-multimedia/Makefile index dcd5867f34e..c998623cf50 100644 --- a/multimedia/qt5-multimedia/Makefile +++ b/multimedia/qt5-multimedia/Makefile @@ -2,6 +2,7 @@ PORTNAME= multimedia DISTVERSION= ${QT5_VERSION} +PORTREVISION= 1 CATEGORIES= multimedia PKGNAMEPREFIX= qt5- diff --git a/multimedia/spook/Makefile b/multimedia/spook/Makefile index 101a4876936..ef669b97901 100644 --- a/multimedia/spook/Makefile +++ b/multimedia/spook/Makefile @@ -3,7 +3,7 @@ PORTNAME= spook PORTVERSION= 20050207 -PORTREVISION= 4 +PORTREVISION= 5 CATEGORIES= multimedia MASTER_SITES= http://www.litech.org/spook/dist/ diff --git a/multimedia/szap-s2/Makefile b/multimedia/szap-s2/Makefile index 9a60395fb89..5bbab131d67 100644 --- a/multimedia/szap-s2/Makefile +++ b/multimedia/szap-s2/Makefile @@ -3,6 +3,7 @@ PORTNAME= szap_s2 PORTVERSION= 20100129s +PORTREVISION= 1 CATEGORIES= multimedia MASTER_SITES= LOCAL/nox diff --git a/multimedia/transcode/Makefile b/multimedia/transcode/Makefile index 5db55b7b982..8c0efc96bdc 100644 --- a/multimedia/transcode/Makefile +++ b/multimedia/transcode/Makefile @@ -3,7 +3,7 @@ PORTNAME= transcode PORTVERSION= 1.1.7 -PORTREVISION= 35 +PORTREVISION= 36 CATEGORIES= multimedia MASTER_SITES= https://bitbucket.org/france/transcode-tcforge/downloads/ diff --git a/multimedia/v4l_compat/Makefile b/multimedia/v4l_compat/Makefile index e3bc38cfead..ab76057d753 100644 --- a/multimedia/v4l_compat/Makefile +++ b/multimedia/v4l_compat/Makefile @@ -1,7 +1,7 @@ # $FreeBSD$ PORTNAME= v4l_compat -PORTREVISION= 1 +PORTREVISION= 2 COMMENT= Video4Linux IOCTL header files diff --git a/multimedia/vdr/Makefile b/multimedia/vdr/Makefile index 8a8cef5957a..a28f627f1af 100644 --- a/multimedia/vdr/Makefile +++ b/multimedia/vdr/Makefile @@ -3,7 +3,7 @@ PORTNAME= vdr PORTVERSION= 1.7.29 -PORTREVISION= 12 +PORTREVISION= 13 CATEGORIES= multimedia MASTER_SITES= ftp://ftp.tvdr.de/vdr/Developer/ DIST_SUBDIR= vdr diff --git a/multimedia/vlc-qt4/Makefile b/multimedia/vlc-qt4/Makefile index daeb0590d45..48deca49d1b 100644 --- a/multimedia/vlc-qt4/Makefile +++ b/multimedia/vlc-qt4/Makefile @@ -8,7 +8,8 @@ PKGNAMESUFFIX= -qt4 OPTIONS_SLAVE= QT4 OPTIONS_EXCLUDE= QT5 -CONFLICTS= vlc-[0-9]* +CONFLICTS= vlc-[0-9]* \ + vlc3-* BROKEN_powerpc64= fails to compile: modules/plugins.dat: Segmentation fault (core dumped) diff --git a/multimedia/vlc/Makefile b/multimedia/vlc/Makefile index 8f700fc448b..69daecada6d 100644 --- a/multimedia/vlc/Makefile +++ b/multimedia/vlc/Makefile @@ -3,7 +3,7 @@ PORTNAME= vlc DISTVERSION= 2.2.8 -PORTREVISION= 11 +PORTREVISION= 13 PORTEPOCH= 4 CATEGORIES= multimedia audio ipv6 net www MASTER_SITES= http://download.videolan.org/pub/videolan/${PORTNAME}/${DISTVERSION:S/a$//}/ \ @@ -15,6 +15,9 @@ COMMENT?= Qt based multimedia player and streaming server LICENSE= GPLv2 +DEPRECATED= vlc 2.x and vlc-qt4 is EOL upstream +EXPIRATION_DATE= 2018-12-31 + LIB_DEPENDS= libgcrypt.so:security/libgcrypt \ libdvbpsi.so:multimedia/libdvbpsi \ libfontconfig.so:x11-fonts/fontconfig \ @@ -36,7 +39,8 @@ USE_GNOME= libxml2 USE_LDCONFIG= yes INSTALL_TARGET= install-strip -CONFLICTS?= vlc-qt4-* +CONFLICTS?= vlc-qt4-* \ + vlc3-* GNU_CONFIGURE= yes CONFIGURE_ARGS= --enable-avcodec --enable-avformat --enable-dvbpsi \ diff --git a/multimedia/vlc3/Makefile b/multimedia/vlc3/Makefile new file mode 100644 index 00000000000..14afbeaac0a --- /dev/null +++ b/multimedia/vlc3/Makefile @@ -0,0 +1,369 @@ +# Created by: Brian Somers +# $FreeBSD$ + +PORTNAME= vlc +DISTVERSION= 3.0.4 +PORTEPOCH= 4 +CATEGORIES= multimedia audio ipv6 net www +MASTER_SITES= http://download.videolan.org/pub/videolan/${PORTNAME}/${DISTVERSION:S/a$//}/ \ + http://ftp.snt.utwente.nl/pub/software/videolan/${PORTNAME}/${DISTVERSION:S/a$//}/ \ + ftp://ftp.crans.org/pub/videolan/${PORTNAME}/${DISTVERSION:S/a$//}/ +PKGNAMESUFFIX= ${PORTVERSION:R:R} + +MAINTAINER= multimedia@FreeBSD.org +COMMENT= Qt based multimedia player and streaming server + +LICENSE= GPLv2 + +LIB_DEPENDS= libgcrypt.so:security/libgcrypt \ + libdvbpsi.so:multimedia/libdvbpsi \ + libfontconfig.so:x11-fonts/fontconfig \ + libfreetype.so:print/freetype2 \ + libidn.so:dns/libidn \ + libmatroska.so:multimedia/libmatroska +BUILD_DEPENDS= ffmpeg>=3.4.1,1:multimedia/ffmpeg \ + yasm:devel/yasm +RUN_DEPENDS= ffmpeg>=3.4.1,1:multimedia/ffmpeg + +USES= compiler:c++11-lib desktop-file-utils gmake gnome iconv libtool \ + pathfix pkgconfig tar:xz + +# VLC git (post 2.2.4) requires C++11 support and passes the appropriate flag +# to the compiler. Until the port is updated, we explicitly pass -std=c++11 to +# the compiler because Qt 5.7+ requires C++11 support, and FreeBSD 10's clang +# does not default to C++11 mode. +USE_CXXSTD= c++11 + +USE_GNOME= libxml2 +USE_LDCONFIG= yes +INSTALL_TARGET= install-strip + +CONFLICTS?= vlc-qt4-* \ + vlc-[0-9]* + +GNU_CONFIGURE= yes +CONFIGURE_ARGS= --enable-avcodec --enable-avformat --enable-dvbpsi \ + --enable-fontconfig --enable-freetype --enable-libgcrypt \ + --enable-libxml2 --enable-oss --enable-postproc \ + --enable-swscale --enable-vlc \ + --disable-alsa --disable-archive --disable-chromaprint --disable-crystalhd \ + --disable-dc1394 --disable-decklink --disable-dsm \ + --disable-dv1394 --disable-fdkaac \ + --disable-gles2 --disable-kai --disable-kva \ + --disable-vnc --disable-opencv --disable-projectm \ + --disable-secret --disable-soxr --disable-telx \ + --disable-tiger --disable-tremor --disable-udev \ + --disable-update-check --disable-vsxu \ + --disable-wasapi --disable-x26410b \ + --with-kde-solid=${PREFIX}/share/apps/solid/actions \ + ac_cv_search_pthread_rwlock_init=-pthread +.if defined(WITH_DEBUG) +CONFIGURE_ARGS+=--enable-debug +.endif +CPPFLAGS+= -I${LOCALBASE}/include +CFLAGS_i386= -fomit-frame-pointer +LIBS+= -L${LOCALBASE}/lib + +OPTIONS_DEFINE= A52 AALIB ASS AVAHI CACA CHROMECAST DBUS DCA DOCS DVDREAD \ + DVDNAV FAAD FLAC FLUID FREERDP FRIBIDI GME GNUTLS \ + GOOM HARFBUZZ JACK KATE LIBBLURAY LIBRSVG2 LIBSSH2 LIRC \ + LIVEMEDIA LUA MAD MODPLUG MPEG2 MTP MUSEPACK \ + NCURSES NFS NLS NOTIFY OGG OPTIMIZED_CFLAGS OPUS PNG PULSEAUDIO \ + QT5 REALRTSP RUNROOT SAMPLERATE SIDPLAY SCHROEDINGER \ + SDL SHOUTCAST SKINS SMB SNDIO STREAM SPEEX TAGLIB THEORA \ + TWOLAME UPNP V4L VAAPI VCD VDPAU VPX VORBIS WAYLAND X11 X264 X265 ZVBI +OPTIONS_DEFAULT=A52 AVAHI DBUS DCA DVDREAD DVDNAV FAAD FLAC GNUTLS \ + LIVEMEDIA LUA MAD MPEG2 OGG OPTIMIZED_CFLAGS \ + OPUS PNG QT5 SAMPLERATE STREAM SPEEX TAGLIB THEORA TWOLAME \ + V4L VAAPI VCD VDPAU VORBIS X11 +OPTIONS_SUB= yes + +ASS_DESC= ASS/SSA subtitle rendering +CHROMECAST_DESC=Streaming to Chromecast devices +DVDREAD_DESC= DVD Playback support +DVDNAV_DESC= DVD menu navigation +FLUID_DESC= Fluidsynth MIDI support +FREERDP_DESC= RDP support +GME_DESC= Game Music Emu (libgme) support +GOOM_DESC= Goom visualisation plugin +HARFBUZZ_DESC= OpenType text shaping engine +KATE_DESC= Kate codec support +LIBSSH2_DESC= SCP/SFTP support via libssh2 +REALRTSP_DESC= Real RTSP access module +RUNROOT_DESC= Enable running as root +SIDPLAY_DESC= C64 sid demux support +SKINS_DESC= Skins interface module +STREAM_DESC= stream output +TAGLIB_DESC= ID3 tag and Ogg comment support +VCD_DESC= Audio/Video CD support +ZVBI_DESC= VBI decoding support + +A52_CONFIGURE_ENABLE= a52 +A52_CONFIGURE_ON= --with-a52=${LOCALBASE} +A52_LIB_DEPENDS= liba52.so:audio/liba52 + +AALIB_LIB_DEPENDS= libaa.so:graphics/aalib +AALIB_CONFIGURE_ENABLE= aa + +ASS_LIB_DEPENDS= libass.so:multimedia/libass +ASS_CONFIGURE_ENABLE= libass + +AVAHI_LIB_DEPENDS= libavahi-common.so:net/avahi-app +AVAHI_CONFIGURE_ENABLE= avahi + +CACA_LIB_DEPENDS= libcaca.so:graphics/libcaca +CACA_CONFIGURE_ENABLE= caca + +CHROMECAST_LIB_DEPENDS= libprotobuf-lite.so:devel/protobuf +CHROMECASE_CONFIGURE_ENABLE= chromecast + +DBUS_LIB_DEPENDS= libdbus-1.so:devel/dbus +DBUS_CONFIGURE_ENABLE= dbus + +DCA_LIB_DEPENDS= libdca.so:multimedia/libdca +DCA_CONFIGURE_ENABLE= dca + +DVDREAD_LIB_DEPENDS= libdvdread.so:multimedia/libdvdread +DVDREAD_CONFIGURE_ENABLE= dvdread + +DVDNAV_LIB_DEPENDS= libdvdnav.so:multimedia/libdvdnav +DVDNAV_CONFIGURE_ENABLE=dvdnav + +FAAD_LIB_DEPENDS= libfaad.so:audio/faad +FAAD_CONFIGURE_ENABLE= faad +FAAD_CONFIGURE_ENV= CPPFLAGS_faad="-I${LOCALBASE}/include" \ + LIBS_faad="-L${LOCALBASE}/lib" + +FLAC_LIB_DEPENDS= libFLAC.so:audio/flac +FLAC_CONFIGURE_ENABLE= flac + +FLUID_LIB_DEPENDS= libfluidsynth.so:audio/fluidsynth +FLUID_CONFIGURE_ENABLE= fluidsynth + +FREERDP_LIB_DEPENDS= libfreerdp2.so:net/freerdp +FREERDP_CONFIGURE_ENABLE= freerdp +FREERDP_CONFIGURE_ENV= FREERDP_CFLAGS="-I${LOCALBASE}/include/freerdp2 \ + -I${LOCALBASE}/include/winpr2" \ + FREERDP_LIBS="-L${LOCALBASE}/lib" + +FRIBIDI_LIB_DEPENDS= libfribidi.so:converters/fribidi +FRIBIDI_CONFIGURE_ENABLE= fribidi + +GME_LIB_DEPENDS= libgme.so:audio/libgme +GME_CONFIGURE_ENABLE= gme +GME_CONFIGURE_ENV= LIBS_gme="-L${LOCALBASE}/lib -lgme" + +GNUTLS_LIB_DEPENDS= libgnutls.so:security/gnutls +GNUTLS_CONFIGURE_ENABLE=gnutls + +GOOM_LIB_DEPENDS= libgoom2.so:graphics/goom +GOOM_CONFIGURE_ENABLE= goom + +HARFBUZZ_LIB_DEPENDS= libharfbuzz.so:print/harfbuzz +HARFBUZZ_CONFIGURE_ENABLE= harfbuzz + +JACK_LIB_DEPENDS= libjack.so:audio/jack +JACK_CONFIGURE_ENABLE= jack + +KATE_LIB_DEPENDS= libkate.so:multimedia/libkate +KATE_CONFIGURE_ENABLE= kate + +LIBBLURAY_LIB_DEPENDS= libbluray.so:multimedia/libbluray +LIBBLURAY_CONFIGURE_ENABLE= bluray + +LIBRSVG2_USE= GNOME=librsvg2 +LIBRSVG2_CONFIGURE_ENABLE= svg + +LIBSSH2_LIB_DEPENDS= libssh2.so:security/libssh2 +LIBSSH2_CONFIGURE_ENABLE= sftp + +LIRC_LIB_DEPENDS= liblirc_client.so:comms/lirc +LIRC_CONFIGURE_ENABLE= lirc +LIRC_CONFIGURE_ENV= LIBS_lirc="-L${LOCALBASE}/lib -llirc_client" + +LIVEMEDIA_LIB_DEPENDS= libliveMedia.so:net/liveMedia +LIVEMEDIA_CONFIGURE_ENABLE= live555 +LIVEMEDIA_CONFIGURE_ENV= \ + LIVE555_CFLAGS="-I${LOCALBASE}/include/liveMedia \ + -I${LOCALBASE}/include/UsageEnvironment \ + -I${LOCALBASE}/include/groupsock \ + -I${LOCALBASE}/include/BasicUsageEnvironment" \ + LIVE555_LIBS="-L${LOCALBASE}/lib -lliveMedia \ + -lgroupsock -lBasicUsageEnvironment \ + -lUsageEnvironment" + +LUA_USES= lua +LUA_CONFIGURE_ENABLE= lua +LUA_CONFIGURE_ON= LUAC=${LUAC_CMD} LUA_CFLAGS="-I${LUA_INCDIR}" \ + LUA_LIBS="-L${LUA_LIBDIR} -llua-${LUA_VER}" + +MAD_LIB_DEPENDS= libmad.so:audio/libmad +MAD_CONFIGURE_ENABLE= mad +MAD_CONFIGURE_ON= --with-mad=${LOCALBASE} + +MODPLUG_LIB_DEPENDS= libmodplug.so:audio/libmodplug +MODPLUG_CONFIGURE_ENABLE= mod + +MPEG2_LIB_DEPENDS= libmpeg2.so:multimedia/libmpeg2 +MPEG2_CONFIGURE_ENABLE= libmpeg2 + +MTP_LIB_DEPENDS= libmtp.so:multimedia/libmtp +MTP_CONFIGURE_ENABLE= mtp + +MUSEPACK_LIB_DEPENDS= libmpcdec.so:audio/musepack +MUSEPACK_CONFIGURE_ENABLE= mpc +MUSEPACK_CONFIGURE_ENV= LIBS_mpc="-L${LOCALBASE}/lib -lmpcdec" + +NCURSES_USES= ncurses +NCURSES_CONFIGURE_ENV= NCURSES_CFLAGS="-I${NCURSESINC}" \ + NCURSES_LIBS="-L${NCURSESLIB} -lncursesw" +NCURSES_CONFIGURE_ENABLE= ncurses + +NFS_LIB_DEPENDS= libnfs.so:net/libnfs +NFS_CONFIGURE_ENABLE= nfs + +NLS_USES= gettext +NLS_CONFIGURE_ENABLE= nls + +NOTIFY_LIB_DEPENDS= libnotify.so:devel/libnotify +NOTIFY_USE= GNOME=gtk30 +NOTIFY_CONFIGURE_ENABLE=notify + +OGG_LIB_DEPENDS= libogg.so:audio/libogg +OGG_CONFIGURE_ENABLE= ogg + +OPTIMIZED_CFLAGS_CONFIGURE_ENABLE= optimizations + +OPUS_LIB_DEPENDS= libopus.so:audio/opus +OPUS_CONFIGURE_ENABLE= opus + +PNG_LIB_DEPENDS= libpng.so:graphics/png +PNG_CONFIGURE_ENABLE= png + +PULSEAUDIO_LIB_DEPENDS= libpulse.so:audio/pulseaudio +PULSEAUDIO_CONFIGURE_ENABLE= pulse + +QT5_USES= qt:5 +QT5_USE= QT=gui,core,svg,widgets,x11extras,buildtools_build +QT5_CONFIGURE_ENABLE= qt +QT5_IMPLIES= X11 + +REALRTSP_CONFIGURE_ENABLE= realrtsp + +RUNROOT_CONFIGURE_ENABLE= run-as-root + +SAMPLERATE_LIB_DEPENDS= libsamplerate.so:audio/libsamplerate +SAMPLERATE_CONFIGURE_ENABLE= samplerate + +SCHROEDINGER_LIB_DEPENDS= libschroedinger-1.0.so:multimedia/schroedinger +SCHROEDINGER_CONFIGURE_ENABLE= schroedinger + +SDL_USE= SDL=image +SDL_CONFIGURE_ENABLE= sdl-image + +SIDPLAY_LIB_DEPENDS= libsidplay2.so:audio/libsidplay2 +SIDPLAY_LDFLAGS= -L${LOCALBASE}/lib/sidplay/builders +SIDPLAY_CONFIGURE_ENABLE= sid +CONFIGURE_ARGS+= --disable-sid + +SKINS_USE= XORG=xext,xinerama,xpm +SKINS_LIB_DEPENDS= libminizip.so:archivers/minizip \ + libtar.so:devel/libtar +SKINS_CONFIGURE_ENABLE= skins2 libtar +SKINS_IMPLIES= QT5 + +SHOUTCAST_LIB_DEPENDS= libshout.so:audio/libshout +SHOUTCAST_CONFIGURE_ENABLE= shout + +SNDIO_LIB_DEPENDS= libsndio.so:audio/sndio +SNDIO_CONFIGURE_ENABLE= sndio + +SMB_USES= samba:lib +SMB_CONFIGURE_ENABLE= smbclient + +STREAM_CONFIGURE_ENABLE=sout + +SPEEX_LIB_DEPENDS= libspeex.so:audio/speex +SPEEX_CONFIGURE_ENABLE= speex + +TAGLIB_LIB_DEPENDS= libtag.so:audio/taglib +TAGLIB_CONFIGURE_ENABLE=taglib + +THEORA_LIB_DEPENDS= libtheora.so:multimedia/libtheora +THEORA_CONFIGURE_ENABLE=theora + +TWOLAME_LIB_DEPENDS= libtwolame.so:audio/twolame +TWOLAME_CONFIGURE_ENABLE= twolame + +UPNP_LIB_DEPENDS= libupnp.so:devel/upnp +UPNP_CONFIGURE_ENABLE= upnp + +V4L_BUILD_DEPENDS= v4l_compat>=0:multimedia/v4l_compat +V4L_LIB_DEPENDS= libv4l2.so:multimedia/libv4l +V4L_CONFIGURE_ENABLE= v4l2 + +VAAPI_LIB_DEPENDS= libva.so:multimedia/libva +VAAPI_CONFIGURE_ENABLE= libva + +VCD_LIB_DEPENDS= libcddb.so:audio/libcddb +VCD_CONFIGURE_ENABLE= vcd libcddb + +VDPAU_LIB_DEPENDS= libvdpau.so:multimedia/libvdpau +VDPAU_CONFIGURE_ENABLE= vdpau +VDPAU_IMPLIES= X11 + +VPX_LIB_DEPENDS= libvpx.so:multimedia/libvpx +VPX_CONFIGURE_ENABLE= vpx + +VORBIS_LIB_DEPENDS= libvorbis.so:audio/libvorbis +VORBIS_CONFIGURE_ENABLE=vorbis + +WAYLAND_BUILD_DEPENDS= wayland-protocols>=0:graphics/wayland-protocols +WAYLAND_LIB_DEPENDS= libwayland-client.so:graphics/wayland +WAYLAND_CONFIGURE_ENABLE= wayland + +X11_USE= GL=gl XORG=xcb,xorgproto +X11_USES= gl +X11_LIB_DEPENDS= libxcb-keysyms.so:x11/xcb-util-keysyms +X11_CONFIGURE_ENABLE= xcb xvideo +X11_CONFIGURE_WITH= x + +X264_LIB_DEPENDS= libx264.so:multimedia/libx264 +X264_CONFIGURE_ENABLE= x264 + +X265_LIB_DEPENDS= libx265.so:multimedia/x265 +X265_CONFIGURE_ENABLE= x265 + +ZVBI_LIB_DEPENDS= libzvbi.so:devel/libzvbi +ZVBI_CONFIGURE_ENABLE= zvbi + +PORTDATA= * +PORTDOCS= * + +WITH_CDROM_DEVICE?=/dev/cd0 +WITH_DVD_DEVICE?=/dev/cd0 + +.include + +.if ${PORT_OPTIONS:MX11} +INSTALLS_ICONS= yes +.endif + +post-patch: + @${REINPLACE_CMD} \ + -e '\|LIBS|s|-lrt||' \ + -e 's|LIBS="-llirc_client|LIBS="$$LIBS_lirc|' \ + ${WRKSRC}/configure + @${REINPLACE_CMD} -e 's|/dev/cdrom|${WITH_CDROM_DEVICE}|g' \ + -e 's|/dev/dvd|${WITH_DVD_DEVICE}|g' \ + ${WRKSRC}/src/libvlc-module.c + @${RM} -r ${WRKSRC}/modules/access/v4l2/linux +# XXX FreeBSD doesn't have strerror_l() - use the android version of error.c + @${CP} ${WRKSRC}/src/android/error.c ${WRKSRC}/src/posix + +post-install: + @(cd ${STAGEDIR}${PREFIX} && ${FIND} -s lib/vlc -not -name '*.la' \ + -type f -o -type l >> ${TMPPLIST}) + @${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/vlc/plugins/*/*.so + +.include diff --git a/multimedia/vlc3/distinfo b/multimedia/vlc3/distinfo new file mode 100644 index 00000000000..bff64dc07c6 --- /dev/null +++ b/multimedia/vlc3/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1537685449 +SHA256 (vlc-3.0.4.tar.xz) = 01f3db3790714038c01f5e23c709e31ecd6f1c046ac93d19e1dde38b3fc05a9e +SIZE (vlc-3.0.4.tar.xz) = 24934112 diff --git a/multimedia/vlc3/files/patch-configure b/multimedia/vlc3/files/patch-configure new file mode 100644 index 00000000000..3a6c3a7a1a4 --- /dev/null +++ b/multimedia/vlc3/files/patch-configure @@ -0,0 +1,30 @@ +--- configure.orig 2018-02-26 14:47:53 UTC ++++ configure +@@ -9027,9 +9027,6 @@ case "${host_os}" in + ;; + freebsd*) + SYS=freebsd +- CFLAGS="${CFLAGS} -pthread" +- CPPFLAGS="${CPPFLAGS} -I/usr/local/include" +- LDFLAGS="${LDFLAGS} -L/usr/local/lib" + ac_cv_ld_z_defs=no + ;; + openbsd*) +@@ -25572,7 +25569,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ + _Thread_local int foo = 0; + int main() {} + _ACEOF +-if ac_fn_c_try_compile "$LINENO"; then : ++if ac_fn_c_try_link "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 + $as_echo "ok" >&6; } +@@ -27072,7 +27069,7 @@ main () + return 0; + } + _ACEOF +-if ac_fn_c_try_compile "$LINENO"; then : ++if ac_fn_c_try_link "$LINENO"; then : + + ac_cv_c_visibility_hidden=yes + diff --git a/multimedia/vlc3/files/patch-git_a8953ba b/multimedia/vlc3/files/patch-git_a8953ba new file mode 100644 index 00000000000..d57ec0c0c87 --- /dev/null +++ b/multimedia/vlc3/files/patch-git_a8953ba @@ -0,0 +1,204 @@ +commit a8953ba707cca1f2de372ca24513296bcfcdaaa8 +Author: Ilkka Ollakka +Date: Sat Mar 24 13:23:33 2018 +0200 + + x264: drop <148 build support and fix 10bit support + + Drop old #if as 148 is not that recent anymore. + + fixes #19581 +--- + modules/codec/x264.c | 65 ++++++++-------------------------------------------- + 1 file changed, 10 insertions(+), 55 deletions(-) + +diff --git modules/codec/x264.c modules/codec/x264.c +index be5d0006de..96a4b08524 100644 +--- modules/codec/x264.c ++++ modules/codec/x264.c +@@ -83,13 +83,7 @@ static void x264_log( void *, int i_level, const char *psz, va_list ); + "I-frames, but do not start a new GOP." ) + + #define OPENGOP_TEXT N_("Use recovery points to close GOPs") +-#if X264_BUILD < 115 +-#define OPENGOP_LONGTEXT N_("none: use closed GOPs only\n"\ +- "normal: use standard open GOPs\n" \ +- "bluray: use Blu-ray compatible open GOPs" ) +-#else + #define OPENGOP_LONGTEXT N_("use open GOP, for bluray compatibility use also bluray-compat option") +-#endif + + #define BLURAY_TEXT N_("Enable compatibility hacks for Blu-ray support") + #define BLURAY_LONGTEXT N_("Enable hacks for Blu-ray support, this doesn't enforce every aspect of Blu-ray compatibility\n" \ +@@ -471,16 +465,10 @@ vlc_module_begin () + add_integer( SOUT_CFG_PREFIX "min-keyint", 25, MIN_KEYINT_TEXT, + MIN_KEYINT_LONGTEXT, true ) + +-#if X264_BUILD >= 102 && X264_BUILD <= 114 +- add_string( SOUT_CFG_PREFIX "opengop", "none", OPENGOP_TEXT, +- OPENGOP_LONGTEXT, true ) +- change_string_list( x264_open_gop_names, x264_open_gop_names ) +-#elif X264_BUILD > 114 + add_bool( SOUT_CFG_PREFIX "opengop", false, OPENGOP_TEXT, + OPENGOP_LONGTEXT, true ) + add_bool( SOUT_CFG_PREFIX "bluray-compat", false, BLURAY_TEXT, + BLURAY_LONGTEXT, true ) +-#endif + + add_integer( SOUT_CFG_PREFIX "scenecut", 40, SCENE_TEXT, + SCENE_LONGTEXT, true ) +@@ -500,13 +488,8 @@ vlc_module_begin () + B_BIAS_LONGTEXT, true ) + change_integer_range( -100, 100 ) + +-#if X264_BUILD >= 87 + add_string( SOUT_CFG_PREFIX "bpyramid", "normal", BPYRAMID_TEXT, + BPYRAMID_LONGTEXT, true ) +-#else +- add_string( SOUT_CFG_PREFIX "bpyramid", "none", BPYRAMID_TEXT, +- BPYRAMID_LONGTEXT, true ) +-#endif + change_string_list( bpyramid_list, bpyramid_list ) + + add_bool( SOUT_CFG_PREFIX "cabac", true, CABAC_TEXT, CABAC_LONGTEXT, +@@ -543,22 +526,18 @@ vlc_module_begin () + add_bool( SOUT_CFG_PREFIX "interlaced", false, INTERLACED_TEXT, INTERLACED_LONGTEXT, + true ) + +-#if X264_BUILD >= 111 + add_integer( SOUT_CFG_PREFIX "frame-packing", -1, FRAMEPACKING_TEXT, FRAMEPACKING_LONGTEXT, true ) + change_integer_list( framepacking_list, framepacking_list_text ) + change_integer_range( -1, 6) +-#endif + + add_integer( SOUT_CFG_PREFIX "slices", 0, SLICE_COUNT, SLICE_COUNT_LONGTEXT, true ) + add_integer( SOUT_CFG_PREFIX "slice-max-size", 0, SLICE_MAX_SIZE, SLICE_MAX_SIZE_LONGTEXT, true ) + add_integer( SOUT_CFG_PREFIX "slice-max-mbs", 0, SLICE_MAX_MBS, SLICE_MAX_MBS_LONGTEXT, true ) + +-#if X264_BUILD >= 89 + add_string( SOUT_CFG_PREFIX "hrd", "none", HRD_TEXT, HRD_TEXT, true ) + vlc_config_set (VLC_CONFIG_LIST, + (sizeof(x264_nal_hrd_names) / sizeof (char*)) - 1, + x264_nal_hrd_names, x264_nal_hrd_names); +-#endif + + + /* Ratecontrol */ +@@ -843,20 +822,14 @@ static int Open ( vlc_object_t *p_this ) + fullrange |= p_enc->fmt_in.video.b_color_range_full; + p_enc->fmt_in.i_codec = fullrange ? VLC_CODEC_J420 : VLC_CODEC_I420; + p_sys->i_colorspace = X264_CSP_I420; +-#if X264_BUILD >= 118 + char *psz_profile = var_GetString( p_enc, SOUT_CFG_PREFIX "profile" ); +- if( psz_profile ) +- { +- const int mask = x264_bit_depth > 8 ? X264_CSP_HIGH_DEPTH : 0; +- +- + # ifdef MODULE_NAME_IS_x26410b +- if( mask == 0) +- { +- msg_Err( p_enc, "Only high bit depth encoding supported, bit depth:%d", x264_bit_depth); +- return VLC_EGENERIC; +- } ++ const int mask = X264_CSP_HIGH_DEPTH; ++# else ++ const int mask = 0; + # endif ++ if( psz_profile ) ++ { + + if( !strcmp( psz_profile, "high10" ) ) + { +@@ -879,7 +852,6 @@ static int Open ( vlc_object_t *p_this ) + msg_Err( p_enc, "Only high-profiles and 10-bit are supported"); + return VLC_EGENERIC; + } +- + # endif + } + # ifdef MODULE_NAME_IS_x26410b +@@ -890,7 +862,6 @@ static int Open ( vlc_object_t *p_this ) + } + # endif + free( psz_profile ); +-#endif //X264_BUILD + + p_enc->pf_encode_video = Encode; + p_enc->pf_encode_audio = NULL; +@@ -913,6 +884,10 @@ static int Open ( vlc_object_t *p_this ) + #else + x264_param_default( &p_sys->param ); + x264_param_default_preset( &p_sys->param, psz_preset, psz_tune ); ++# if X264_BUILD > 152 ++ if( mask ) ++ p_sys->param.i_bitdepth = 10; ++# endif + #endif + free( psz_preset ); + free( psz_tune ); +@@ -1045,10 +1020,8 @@ static int Open ( vlc_object_t *p_this ) + if( fabs( var_GetFloat( p_enc, SOUT_CFG_PREFIX "aq-strength" ) - 1.0) > 0.005 ) + p_sys->param.rc.f_aq_strength = var_GetFloat( p_enc, SOUT_CFG_PREFIX "aq-strength" ); + +-#if X264_BUILD >= 111 + if( var_GetInteger( p_enc, SOUT_CFG_PREFIX "frame-packing" ) > -1 ) + p_sys->param.i_frame_packing = var_GetInteger( p_enc, SOUT_CFG_PREFIX "frame-packing" ); +-#endif + + if( var_GetBool( p_enc, SOUT_CFG_PREFIX "verbose" ) ) + p_sys->param.i_log_level = X264_LOG_DEBUG; +@@ -1064,26 +1037,14 @@ static int Open ( vlc_object_t *p_this ) + + i_val = var_GetInteger( p_enc, SOUT_CFG_PREFIX "keyint" ); + if( i_val > 0 && i_val != 250 ) p_sys->param.i_keyint_max = i_val; +-#if X264_BUILD >= 102 + if( i_val == -1 ) p_sys->param.i_keyint_max = X264_KEYINT_MAX_INFINITE; +-#endif + + i_val = var_GetInteger( p_enc, SOUT_CFG_PREFIX "min-keyint" ); + if( i_val > 0 && i_val != 25 ) p_sys->param.i_keyint_min = i_val; + +-#if X264_BUILD >= 102 && X264_BUILD <= 114 +- psz_val = var_GetString( p_enc, SOUT_CFG_PREFIX "opengop" ); +- if( !strcmp( psz_val, "none" ) ) +- p_sys->param.i_open_gop = X264_OPEN_GOP_NONE; +- else if( !strcmp( psz_val, "normal" ) ) +- p_sys->param.i_open_gop = X264_OPEN_GOP_NORMAL; +- else if( !strcmp( psz_val, "bluray" ) ) +- p_sys->param.i_open_gop = X264_OPEN_GOP_BLURAY; +- free( psz_val ); +-#elif X264_BUILD >= 115 + p_sys->param.b_open_gop = var_GetBool( p_enc, SOUT_CFG_PREFIX "opengop" ); + p_sys->param.b_bluray_compat = var_GetBool( p_enc, SOUT_CFG_PREFIX "bluray-compat" ); +-#endif ++ + i_val = var_GetInteger( p_enc, SOUT_CFG_PREFIX "bframes" ); + if( i_val >= 0 && i_val <= 16 && i_val != 3 ) + p_sys->param.i_bframe = i_val; +@@ -1121,14 +1082,12 @@ static int Open ( vlc_object_t *p_this ) + if( i_val >= 1 && i_val != 7 ) + p_sys->param.analyse.i_subpel_refine = i_val; + +-#if X264_BUILD >= 89 + psz_val = var_GetString( p_enc, SOUT_CFG_PREFIX "hrd"); + if( !strcmp( psz_val, "vbr" ) ) + p_sys->param.i_nal_hrd = X264_NAL_HRD_VBR; + else if( !strcmp( psz_val, "cbr" ) ) + p_sys->param.i_nal_hrd = X264_NAL_HRD_CBR; + free( psz_val ); +-#endif + + //TODO: psz_val == NULL ? + psz_val = var_GetString( p_enc, SOUT_CFG_PREFIX "me" ); +@@ -1486,11 +1445,7 @@ static block_t *Encode( encoder_t *p_enc, picture_t *p_pict ) + int i_nal=0, i_out=0, i=0; + + /* init pic */ +-#if X264_BUILD >= 98 + x264_picture_init( &pic ); +-#else +- memset( &pic, 0, sizeof( x264_picture_t ) ); +-#endif + if( likely(p_pict) ) { + pic.i_pts = p_pict->date; + pic.img.i_csp = p_sys->i_colorspace; diff --git a/multimedia/vlc3/files/patch-modules-lua-vlc.h b/multimedia/vlc3/files/patch-modules-lua-vlc.h new file mode 100644 index 00000000000..e18c589594c --- /dev/null +++ b/multimedia/vlc3/files/patch-modules-lua-vlc.h @@ -0,0 +1,10 @@ +--- modules/lua/vlc.h.orig 2015-07-11 03:08:07.625881252 +0000 ++++ modules/lua/vlc.h 2015-07-11 03:08:25.711881262 +0000 +@@ -38,6 +38,7 @@ + #include + #include + ++#define LUA_COMPAT_APIINTCASTS + #define LUA_COMPAT_MODULE + #include /* Low level lua C API */ + #include /* Higher level C API */ diff --git a/multimedia/vlc3/files/patch-modules_access_rdp.c b/multimedia/vlc3/files/patch-modules_access_rdp.c new file mode 100644 index 00000000000..3f56335f8db --- /dev/null +++ b/multimedia/vlc3/files/patch-modules_access_rdp.c @@ -0,0 +1,118 @@ +--- modules/access/rdp.c.orig 2016-07-22 12:10:45 UTC ++++ modules/access/rdp.c +@@ -45,18 +45,6 @@ + # include + #endif + +-#if !defined(FREERDP_VERSION_MAJOR) || \ +- (defined(FREERDP_VERSION_MAJOR) && !(FREERDP_VERSION_MAJOR > 1 || (FREERDP_VERSION_MAJOR == 1 && FREERDP_VERSION_MINOR >= 1))) +-# define SoftwareGdi sw_gdi +-# define Fullscreen fullscreen +-# define ServerHostname hostname +-# define Username username +-# define Password password +-# define ServerPort port +-# define EncryptionMethods encryption +-# define ContextSize context_size +-#endif +- + #include + #ifdef HAVE_POLL + # include +@@ -140,6 +128,7 @@ static void desktopResizeHandler( rdpCon + vlcrdp_context_t * p_vlccontext = (vlcrdp_context_t *) p_context; + demux_sys_t *p_sys = p_vlccontext->p_demux->p_sys; + rdpGdi *p_gdi = p_context->gdi; ++ unsigned bytesPerPixel; + + if ( p_sys->es ) + { +@@ -149,17 +138,21 @@ static void desktopResizeHandler( rdpCon + + /* Now init and fill es format */ + vlc_fourcc_t i_chroma; +- switch( p_gdi->bytesPerPixel ) ++ switch( p_gdi->dstFormat ) + { + default: +- case 16: ++ msg_Dbg( p_vlccontext->p_demux, "unhandled dstFormat %x bpp", p_gdi->dstFormat ); ++ case PIXEL_FORMAT_BGR16: + i_chroma = VLC_CODEC_RGB16; ++ bytesPerPixel = 16; + break; +- case 24: ++ case PIXEL_FORMAT_BGR24: + i_chroma = VLC_CODEC_RGB24; ++ bytesPerPixel = 24; + break; +- case 32: ++ case PIXEL_FORMAT_BGRA32: + i_chroma = VLC_CODEC_RGB32; ++ bytesPerPixel = 32; + break; + } + es_format_t fmt; +@@ -172,7 +165,7 @@ static void desktopResizeHandler( rdpCon + fmt.video.i_height = p_gdi->height; + fmt.video.i_frame_rate_base = 1000; + fmt.video.i_frame_rate = 1000 * p_sys->f_fps; +- p_sys->i_framebuffersize = p_gdi->width * p_gdi->height * p_gdi->bytesPerPixel; ++ p_sys->i_framebuffersize = p_gdi->width * p_gdi->height * bytesPerPixel; + + if ( p_sys->p_block ) + p_sys->p_block = block_Realloc( p_sys->p_block, 0, p_sys->i_framebuffersize ); +@@ -233,28 +226,19 @@ static bool postConnectHandler( freerdp + vlcrdp_context_t * p_vlccontext = (vlcrdp_context_t *) p_instance->context; + + msg_Dbg( p_vlccontext->p_demux, "connected to desktop %dx%d (%d bpp)", +-#if defined(FREERDP_VERSION_MAJOR) && (FREERDP_VERSION_MAJOR > 1 || (FREERDP_VERSION_MAJOR == 1 && FREERDP_VERSION_MINOR >= 1)) + p_instance->settings->DesktopWidth, + p_instance->settings->DesktopHeight, + p_instance->settings->ColorDepth +-#else +- p_instance->settings->width, +- p_instance->settings->height, +- p_instance->settings->color_depth +-#endif + ); + + p_instance->update->DesktopResize = desktopResizeHandler; + p_instance->update->BeginPaint = beginPaintHandler; + p_instance->update->EndPaint = endPaintHandler; + +- gdi_init( p_instance, +- CLRBUF_16BPP | +-#if defined(FREERDP_VERSION_MAJOR) && defined(FREERDP_VERSION_MINOR) && \ +- !(FREERDP_VERSION_MAJOR > 1 || (FREERDP_VERSION_MAJOR == 1 && FREERDP_VERSION_MINOR >= 2)) +- CLRBUF_24BPP | +-#endif +- CLRBUF_32BPP, NULL ); ++ if ( p_instance->settings->ColorDepth > 16 ) ++ gdi_init( p_instance, PIXEL_FORMAT_XRGB32); ++ else ++ gdi_init( p_instance, PIXEL_FORMAT_RGB16); + + desktopResizeHandler( p_instance->context ); + return true; +@@ -428,10 +412,6 @@ static int Open( vlc_object_t *p_this ) + if ( p_sys->f_fps <= 0 ) p_sys->f_fps = 1.0; + p_sys->i_frame_interval = 1000000 / p_sys->f_fps; + +-#if FREERDP_VERSION_MAJOR == 1 && FREERDP_VERSION_MINOR < 2 +- freerdp_channels_global_init(); +-#endif +- + p_sys->p_instance = freerdp_new(); + if ( !p_sys->p_instance ) + { +@@ -506,9 +486,6 @@ static void Close( vlc_object_t *p_this + + freerdp_disconnect( p_sys->p_instance ); + freerdp_free( p_sys->p_instance ); +-#if FREERDP_VERSION_MAJOR == 1 && FREERDP_VERSION_MINOR < 2 +- freerdp_channels_global_uninit(); +-#endif + + if ( p_sys->p_block ) + block_Release( p_sys->p_block ); diff --git a/multimedia/vlc3/files/patch-share_Makefile.in b/multimedia/vlc3/files/patch-share_Makefile.in new file mode 100644 index 00000000000..b0297f5f608 --- /dev/null +++ b/multimedia/vlc3/files/patch-share_Makefile.in @@ -0,0 +1,11 @@ +--- share/Makefile.in.orig 2017-04-06 14:40:37 UTC ++++ share/Makefile.in +@@ -1700,7 +1700,7 @@ skins2/default.vlt: $(skins2_default_vlt + $(AM_V_at)rm -f -- skins2/default.vlt.tmp + $(AM_V_GEN)GZIP=--no-name \ + tar cvvzf skins2/default.vlt.tmp \ +- --owner=root --group=root --directory="$(srcdir)/skins2" \ ++ --directory="$(srcdir)/skins2" \ + default/ + $(AM_V_at)mv -f -- skins2/default.vlt.tmp skins2/default.vlt + diff --git a/multimedia/vlc3/files/patch-src-network-udp.c b/multimedia/vlc3/files/patch-src-network-udp.c new file mode 100644 index 00000000000..22f0c77b727 --- /dev/null +++ b/multimedia/vlc3/files/patch-src-network-udp.c @@ -0,0 +1,11 @@ +--- src/network/udp.c.orig 2018-01-17 13:29:46 UTC ++++ src/network/udp.c +@@ -315,7 +315,7 @@ net_SourceSubscribe (vlc_object_t *obj, + { + /* MCAST_JOIN_SOURCE_GROUP was introduced to OS X in v10.7, but it doesn't work, + * so ignore it to use the same code path as on 10.5 or 10.6 */ +-#if defined (MCAST_JOIN_SOURCE_GROUP) && !defined (__APPLE__) ++#if defined (MCAST_JOIN_SOURCE_GROUP) && !defined (__APPLE__) && !defined (__FreeBSD__) + /* Family-agnostic Source-Specific Multicast join */ + int level; + struct group_source_req gsr; diff --git a/multimedia/vlc3/pkg-descr b/multimedia/vlc3/pkg-descr new file mode 100644 index 00000000000..cef0b706607 --- /dev/null +++ b/multimedia/vlc3/pkg-descr @@ -0,0 +1,8 @@ +VLC media player is a highly portable multimedia player for various +audio and video formats (MPEG-1, MPEG-2, MPEG-4, DivX, mp3, ogg, and +more) as well as DVD's, VCD's, and various streaming protocols. It +can also be used as a server to stream in unicast or multicast in +IPv4 or IPv6 on a high-bandwidth network. VLC also has the ability +to transcode media on-the-fly for streaming or saving to disk. + +WWW: https://www.videolan.org diff --git a/multimedia/vlc3/pkg-plist b/multimedia/vlc3/pkg-plist new file mode 100644 index 00000000000..d937a49abf2 --- /dev/null +++ b/multimedia/vlc3/pkg-plist @@ -0,0 +1,230 @@ +bin/cvlc +%%NCURSES%%bin/nvlc +%%QT5%%bin/qvlc +bin/rvlc +%%SKINS%%bin/svlc +bin/vlc +bin/vlc-wrapper +include/vlc/deprecated.h +include/vlc/libvlc.h +include/vlc/libvlc_dialog.h +include/vlc/libvlc_events.h +include/vlc/libvlc_media.h +include/vlc/libvlc_media_discoverer.h +include/vlc/libvlc_media_library.h +include/vlc/libvlc_media_list.h +include/vlc/libvlc_media_list_player.h +include/vlc/libvlc_media_player.h +include/vlc/libvlc_renderer_discoverer.h +include/vlc/libvlc_version.h +include/vlc/libvlc_vlm.h +include/vlc/plugins/vlc_about.h +include/vlc/plugins/vlc_access.h +include/vlc/plugins/vlc_actions.h +include/vlc/plugins/vlc_addons.h +include/vlc/plugins/vlc_aout.h +include/vlc/plugins/vlc_aout_volume.h +include/vlc/plugins/vlc_arrays.h +include/vlc/plugins/vlc_atomic.h +include/vlc/plugins/vlc_avcodec.h +include/vlc/plugins/vlc_bits.h +include/vlc/plugins/vlc_block.h +include/vlc/plugins/vlc_block_helper.h +include/vlc/plugins/vlc_boxes.h +include/vlc/plugins/vlc_charset.h +include/vlc/plugins/vlc_codec.h +include/vlc/plugins/vlc_common.h +include/vlc/plugins/vlc_config.h +include/vlc/plugins/vlc_config_cat.h +include/vlc/plugins/vlc_configuration.h +include/vlc/plugins/vlc_cpu.h +include/vlc/plugins/vlc_demux.h +include/vlc/plugins/vlc_dialog.h +include/vlc/plugins/vlc_epg.h +include/vlc/plugins/vlc_es.h +include/vlc/plugins/vlc_es_out.h +include/vlc/plugins/vlc_events.h +include/vlc/plugins/vlc_filter.h +include/vlc/plugins/vlc_fingerprinter.h +include/vlc/plugins/vlc_fourcc.h +include/vlc/plugins/vlc_fs.h +include/vlc/plugins/vlc_gcrypt.h +include/vlc/plugins/vlc_http.h +include/vlc/plugins/vlc_httpd.h +include/vlc/plugins/vlc_image.h +include/vlc/plugins/vlc_inhibit.h +include/vlc/plugins/vlc_input.h +include/vlc/plugins/vlc_input_item.h +include/vlc/plugins/vlc_interface.h +include/vlc/plugins/vlc_interrupt.h +include/vlc/plugins/vlc_keystore.h +include/vlc/plugins/vlc_main.h +include/vlc/plugins/vlc_md5.h +include/vlc/plugins/vlc_media_library.h +include/vlc/plugins/vlc_memstream.h +include/vlc/plugins/vlc_messages.h +include/vlc/plugins/vlc_meta.h +include/vlc/plugins/vlc_meta_fetcher.h +include/vlc/plugins/vlc_mime.h +include/vlc/plugins/vlc_modules.h +include/vlc/plugins/vlc_mouse.h +include/vlc/plugins/vlc_mtime.h +include/vlc/plugins/vlc_network.h +include/vlc/plugins/vlc_objects.h +include/vlc/plugins/vlc_opengl.h +include/vlc/plugins/vlc_picture.h +include/vlc/plugins/vlc_picture_fifo.h +include/vlc/plugins/vlc_picture_pool.h +include/vlc/plugins/vlc_playlist.h +include/vlc/plugins/vlc_plugin.h +include/vlc/plugins/vlc_probe.h +include/vlc/plugins/vlc_rand.h +include/vlc/plugins/vlc_renderer_discovery.h +include/vlc/plugins/vlc_services_discovery.h +include/vlc/plugins/vlc_sout.h +include/vlc/plugins/vlc_spu.h +include/vlc/plugins/vlc_stream.h +include/vlc/plugins/vlc_stream_extractor.h +include/vlc/plugins/vlc_strings.h +include/vlc/plugins/vlc_subpicture.h +include/vlc/plugins/vlc_text_style.h +include/vlc/plugins/vlc_threads.h +include/vlc/plugins/vlc_timestamp_helper.h +include/vlc/plugins/vlc_tls.h +include/vlc/plugins/vlc_url.h +include/vlc/plugins/vlc_variables.h +include/vlc/plugins/vlc_video_splitter.h +include/vlc/plugins/vlc_viewpoint.h +include/vlc/plugins/vlc_vlm.h +include/vlc/plugins/vlc_vout.h +include/vlc/plugins/vlc_vout_display.h +include/vlc/plugins/vlc_vout_osd.h +include/vlc/plugins/vlc_vout_window.h +include/vlc/plugins/vlc_xlib.h +include/vlc/plugins/vlc_xml.h +include/vlc/vlc.h +lib/libvlc.so +lib/libvlc.so.5 +lib/libvlc.so.5.6.0 +lib/libvlccore.so +lib/libvlccore.so.9 +lib/libvlccore.so.9.0.0 +libdata/pkgconfig/libvlc.pc +libdata/pkgconfig/vlc-plugin.pc +man/man1/vlc-wrapper.1.gz +man/man1/vlc.1.gz +share/applications/vlc.desktop +share/icons/hicolor/128x128/apps/vlc-kb.png +share/icons/hicolor/128x128/apps/vlc-xmas.png +share/icons/hicolor/128x128/apps/vlc.png +share/icons/hicolor/16x16/apps/vlc.png +share/icons/hicolor/16x16/apps/vlc.xpm +share/icons/hicolor/256x256/apps/vlc.png +share/icons/hicolor/32x32/apps/vlc-xmas.xpm +share/icons/hicolor/32x32/apps/vlc.png +share/icons/hicolor/32x32/apps/vlc.xpm +share/icons/hicolor/48x48/apps/vlc-xmas.png +share/icons/hicolor/48x48/apps/vlc.png +share/apps/solid/actions/vlc-openbd.desktop +share/apps/solid/actions/vlc-opencda.desktop +share/apps/solid/actions/vlc-opendvd.desktop +share/apps/solid/actions/vlc-openvcd.desktop +%%NLS%%share/locale/ach/LC_MESSAGES/vlc.mo +%%NLS%%share/locale/af/LC_MESSAGES/vlc.mo +%%NLS%%share/locale/am/LC_MESSAGES/vlc.mo +%%NLS%%share/locale/an/LC_MESSAGES/vlc.mo +%%NLS%%share/locale/ar/LC_MESSAGES/vlc.mo +%%NLS%%share/locale/as_IN/LC_MESSAGES/vlc.mo +%%NLS%%share/locale/ast/LC_MESSAGES/vlc.mo +%%NLS%%share/locale/az/LC_MESSAGES/vlc.mo +%%NLS%%share/locale/be/LC_MESSAGES/vlc.mo +%%NLS%%share/locale/bg/LC_MESSAGES/vlc.mo +%%NLS%%share/locale/bn/LC_MESSAGES/vlc.mo +%%NLS%%share/locale/bn_IN/LC_MESSAGES/vlc.mo +%%NLS%%share/locale/br/LC_MESSAGES/vlc.mo +%%NLS%%share/locale/brx/LC_MESSAGES/vlc.mo +%%NLS%%share/locale/bs/LC_MESSAGES/vlc.mo +%%NLS%%share/locale/ca/LC_MESSAGES/vlc.mo +%%NLS%%share/locale/cgg/LC_MESSAGES/vlc.mo +%%NLS%%share/locale/ckb/LC_MESSAGES/vlc.mo +%%NLS%%share/locale/co/LC_MESSAGES/vlc.mo +%%NLS%%share/locale/cs/LC_MESSAGES/vlc.mo +%%NLS%%share/locale/cy/LC_MESSAGES/vlc.mo +%%NLS%%share/locale/da/LC_MESSAGES/vlc.mo +%%NLS%%share/locale/de/LC_MESSAGES/vlc.mo +%%NLS%%share/locale/el/LC_MESSAGES/vlc.mo +%%NLS%%share/locale/en_GB/LC_MESSAGES/vlc.mo +%%NLS%%share/locale/es/LC_MESSAGES/vlc.mo +%%NLS%%share/locale/et/LC_MESSAGES/vlc.mo +%%NLS%%share/locale/eu/LC_MESSAGES/vlc.mo +%%NLS%%share/locale/fa/LC_MESSAGES/vlc.mo +%%NLS%%share/locale/ff/LC_MESSAGES/vlc.mo +%%NLS%%share/locale/fi/LC_MESSAGES/vlc.mo +%%NLS%%share/locale/fr/LC_MESSAGES/vlc.mo +%%NLS%%share/locale/fur/LC_MESSAGES/vlc.mo +%%NLS%%share/locale/fy/LC_MESSAGES/vlc.mo +%%NLS%%share/locale/ga/LC_MESSAGES/vlc.mo +%%NLS%%share/locale/gd/LC_MESSAGES/vlc.mo +%%NLS%%share/locale/gl/LC_MESSAGES/vlc.mo +%%NLS%%share/locale/gu/LC_MESSAGES/vlc.mo +%%NLS%%share/locale/he/LC_MESSAGES/vlc.mo +%%NLS%%share/locale/hi/LC_MESSAGES/vlc.mo +%%NLS%%share/locale/hr/LC_MESSAGES/vlc.mo +%%NLS%%share/locale/hu/LC_MESSAGES/vlc.mo +%%NLS%%share/locale/hy/LC_MESSAGES/vlc.mo +%%NLS%%share/locale/ia/LC_MESSAGES/vlc.mo +%%NLS%%share/locale/id/LC_MESSAGES/vlc.mo +%%NLS%%share/locale/is/LC_MESSAGES/vlc.mo +%%NLS%%share/locale/it/LC_MESSAGES/vlc.mo +%%NLS%%share/locale/ja/LC_MESSAGES/vlc.mo +%%NLS%%share/locale/ka/LC_MESSAGES/vlc.mo +%%NLS%%share/locale/kk/LC_MESSAGES/vlc.mo +%%NLS%%share/locale/km/LC_MESSAGES/vlc.mo +%%NLS%%share/locale/kn/LC_MESSAGES/vlc.mo +%%NLS%%share/locale/ko/LC_MESSAGES/vlc.mo +%%NLS%%share/locale/ks_IN/LC_MESSAGES/vlc.mo +%%NLS%%share/locale/ky/LC_MESSAGES/vlc.mo +%%NLS%%share/locale/lg/LC_MESSAGES/vlc.mo +%%NLS%%share/locale/lt/LC_MESSAGES/vlc.mo +%%NLS%%share/locale/lv/LC_MESSAGES/vlc.mo +%%NLS%%share/locale/mai/LC_MESSAGES/vlc.mo +%%NLS%%share/locale/mk/LC_MESSAGES/vlc.mo +%%NLS%%share/locale/ml/LC_MESSAGES/vlc.mo +%%NLS%%share/locale/mn/LC_MESSAGES/vlc.mo +%%NLS%%share/locale/mr/LC_MESSAGES/vlc.mo +%%NLS%%share/locale/ms/LC_MESSAGES/vlc.mo +%%NLS%%share/locale/my/LC_MESSAGES/vlc.mo +%%NLS%%share/locale/nb/LC_MESSAGES/vlc.mo +%%NLS%%share/locale/ne/LC_MESSAGES/vlc.mo +%%NLS%%share/locale/nl/LC_MESSAGES/vlc.mo +%%NLS%%share/locale/nn/LC_MESSAGES/vlc.mo +%%NLS%%share/locale/oc/LC_MESSAGES/vlc.mo +%%NLS%%share/locale/or/LC_MESSAGES/vlc.mo +%%NLS%%share/locale/pa/LC_MESSAGES/vlc.mo +%%NLS%%share/locale/pl/LC_MESSAGES/vlc.mo +%%NLS%%share/locale/ps/LC_MESSAGES/vlc.mo +%%NLS%%share/locale/pt_BR/LC_MESSAGES/vlc.mo +%%NLS%%share/locale/pt_PT/LC_MESSAGES/vlc.mo +%%NLS%%share/locale/ro/LC_MESSAGES/vlc.mo +%%NLS%%share/locale/ru/LC_MESSAGES/vlc.mo +%%NLS%%share/locale/si/LC_MESSAGES/vlc.mo +%%NLS%%share/locale/sk/LC_MESSAGES/vlc.mo +%%NLS%%share/locale/sl/LC_MESSAGES/vlc.mo +%%NLS%%share/locale/sq/LC_MESSAGES/vlc.mo +%%NLS%%share/locale/sr/LC_MESSAGES/vlc.mo +%%NLS%%share/locale/sv/LC_MESSAGES/vlc.mo +%%NLS%%share/locale/ta/LC_MESSAGES/vlc.mo +%%NLS%%share/locale/te/LC_MESSAGES/vlc.mo +%%NLS%%share/locale/tet/LC_MESSAGES/vlc.mo +%%NLS%%share/locale/th/LC_MESSAGES/vlc.mo +%%NLS%%share/locale/tl/LC_MESSAGES/vlc.mo +%%NLS%%share/locale/tr/LC_MESSAGES/vlc.mo +%%NLS%%share/locale/ug/LC_MESSAGES/vlc.mo +%%NLS%%share/locale/uk/LC_MESSAGES/vlc.mo +%%NLS%%share/locale/uz/LC_MESSAGES/vlc.mo +%%NLS%%share/locale/vi/LC_MESSAGES/vlc.mo +%%NLS%%share/locale/wa/LC_MESSAGES/vlc.mo +%%NLS%%share/locale/zh_CN/LC_MESSAGES/vlc.mo +%%NLS%%share/locale/zh_TW/LC_MESSAGES/vlc.mo +%%NLS%%share/locale/zu/LC_MESSAGES/vlc.mo +share/metainfo/vlc.appdata.xml diff --git a/multimedia/w_scan/Makefile b/multimedia/w_scan/Makefile index 0e78968da38..0e8037b0bb4 100644 --- a/multimedia/w_scan/Makefile +++ b/multimedia/w_scan/Makefile @@ -3,6 +3,7 @@ PORTNAME= w_scan PORTVERSION= 20170107 +PORTREVISION= 1 CATEGORIES= multimedia MASTER_SITES= http://wirbel.htpc-forum.de/w_scan/ diff --git a/multimedia/webcamd/Makefile b/multimedia/webcamd/Makefile index 2bb030f7a00..a01e72dd890 100644 --- a/multimedia/webcamd/Makefile +++ b/multimedia/webcamd/Makefile @@ -3,6 +3,7 @@ PORTNAME= webcamd PORTVERSION= 4.17.0.3 +PORTREVISION= 1 CATEGORIES= multimedia MASTER_SITES= http://www.selasky.org/hans_petter/distfiles/ \ http://home.selasky.org:8192/distfiles/ diff --git a/multimedia/zoneminder-h264/Makefile b/multimedia/zoneminder-h264/Makefile index e385957dca4..5713601ac5c 100644 --- a/multimedia/zoneminder-h264/Makefile +++ b/multimedia/zoneminder-h264/Makefile @@ -2,7 +2,7 @@ PORTNAME= zoneminder-h264 PORTVERSION= 1.30.20170222 -PORTREVISION= 6 +PORTREVISION= 7 CATEGORIES= multimedia MAINTAINER= bsd@abinet.ru diff --git a/multimedia/zoneminder/Makefile b/multimedia/zoneminder/Makefile index 58e67c838c6..8a55730c962 100644 --- a/multimedia/zoneminder/Makefile +++ b/multimedia/zoneminder/Makefile @@ -2,7 +2,7 @@ PORTNAME= zoneminder PORTVERSION= 1.30.4 -PORTREVISION= 4 +PORTREVISION= 5 CATEGORIES= multimedia MAINTAINER= bsd@abinet.ru diff --git a/net-im/ekiga/Makefile b/net-im/ekiga/Makefile index 4b47cb05bc9..ec99c8fc0aa 100644 --- a/net-im/ekiga/Makefile +++ b/net-im/ekiga/Makefile @@ -4,7 +4,7 @@ PORTNAME= ekiga PORTVERSION= 4.0.1 -PORTREVISION= 19 +PORTREVISION= 20 CATEGORIES= net-im MASTER_SITES= GNOME DIST_SUBDIR= gnome3 diff --git a/net-im/kopete-kde4/Makefile b/net-im/kopete-kde4/Makefile index bd66b8fc031..3e461c0e272 100644 --- a/net-im/kopete-kde4/Makefile +++ b/net-im/kopete-kde4/Makefile @@ -2,7 +2,7 @@ PORTNAME= kopete PORTVERSION= ${KDE4_VERSION} -PORTREVISION= 10 +PORTREVISION= 11 CATEGORIES= net-im kde kde-kde4 MAINTAINER= kde@FreeBSD.org diff --git a/net-im/kopete/Makefile b/net-im/kopete/Makefile index 2f604b7fb42..9599d8be8f1 100644 --- a/net-im/kopete/Makefile +++ b/net-im/kopete/Makefile @@ -2,6 +2,7 @@ PORTNAME= kopete PORTVERSION= ${KDE_APPLICATIONS_VERSION} +PORTREVISION= 1 CATEGORIES= net-im kde kde-applications MAINTAINER= kde@FreeBSD.org diff --git a/net-im/qTox/Makefile b/net-im/qTox/Makefile index 2f6eaf12891..1cd6731e43a 100644 --- a/net-im/qTox/Makefile +++ b/net-im/qTox/Makefile @@ -4,7 +4,7 @@ PORTNAME= qTox DISTVERSIONPREFIX= v DISTVERSION= 1.16.3 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= net-im net-p2p MAINTAINER= yuri@FreeBSD.org diff --git a/net-im/uTox/Makefile b/net-im/uTox/Makefile index c8f0f763b6d..5f7d0918e25 100644 --- a/net-im/uTox/Makefile +++ b/net-im/uTox/Makefile @@ -3,7 +3,7 @@ PORTNAME= uTox DISTVERSION= 0.17.0 DISTVERSIONSUFFIX= -full -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= net-im net-p2p MASTER_SITES= https://github.com/uTox/uTox/releases/download/v${PORTVERSION}/ diff --git a/net/axa/Makefile b/net/axa/Makefile index 007f31d85c0..681306df1aa 100644 --- a/net/axa/Makefile +++ b/net/axa/Makefile @@ -1,8 +1,7 @@ # $FreeBSD$ PORTNAME= axa -PORTVERSION= 2.0.1 -PORTREVISION= 1 +PORTVERSION= 2.1.0 CATEGORIES= net dns MASTER_SITES= FARSIGHT LOCAL/truckman/farsight @@ -23,9 +22,10 @@ LIB_DEPENDS= libcheck.so:devel/check \ libyajl.so:devel/yajl RUN_DEPENDS= sie-nmsg>0:net/sie-nmsg -GNU_CONFIGURE= yes USES= autoreconf gmake libedit libtool pathfix pkgconfig shebangfix \ ssl + +GNU_CONFIGURE= yes CONFIGURE_SHELL= ${LOCALBASE}/bin/bash USE_LDCONFIG= yes SHEBANG_FILES= cert_tools/axa_link_certs.in diff --git a/net/axa/distinfo b/net/axa/distinfo index 18cb789cbcf..1aaf0b58b00 100644 --- a/net/axa/distinfo +++ b/net/axa/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1523653507 -SHA256 (axa-2.0.1.tar.gz) = d23d7bfb6e36953d7524a60b1929641c73db7fc55bbb4914ae213187e733dfbc -SIZE (axa-2.0.1.tar.gz) = 571257 +TIMESTAMP = 1538155875 +SHA256 (axa-2.1.0.tar.gz) = 80ab8b0272c8d41ee09e96c4eb5334197caffd33ba9f6e4433789d471945bfea +SIZE (axa-2.1.0.tar.gz) = 572634 diff --git a/net/freerdp/Makefile b/net/freerdp/Makefile index fe85d898960..06dfaf0ebe1 100644 --- a/net/freerdp/Makefile +++ b/net/freerdp/Makefile @@ -3,7 +3,7 @@ PORTNAME= freerdp DISTVERSION= 2.0.0-rc3 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= net comms ipv6 PATCH_SITES= https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/commit/ diff --git a/net/mediastreamer/Makefile b/net/mediastreamer/Makefile index bec3be3780f..97611cb50db 100644 --- a/net/mediastreamer/Makefile +++ b/net/mediastreamer/Makefile @@ -3,7 +3,7 @@ PORTNAME= mediastreamer PORTVERSION= 2.14.0 -PORTREVISION= 9 +PORTREVISION= 10 CATEGORIES= net MASTER_SITES= SAVANNAH/linphone/mediastreamer diff --git a/net/nuster/Makefile b/net/nuster/Makefile index 2e1eed5fa7c..3e261d374b6 100644 --- a/net/nuster/Makefile +++ b/net/nuster/Makefile @@ -2,7 +2,7 @@ # $FreeBSD$ PORTNAME= nuster -PORTVERSION= 1.8.8.3 +PORTVERSION= 2.0.2.18 DISTVERSIONPREFIX= v CATEGORIES= net www diff --git a/net/nuster/distinfo b/net/nuster/distinfo index 45b90877464..a11cc6d7ae7 100644 --- a/net/nuster/distinfo +++ b/net/nuster/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1529019057 -SHA256 (jiangwenyuan-nuster-v1.8.8.3_GH0.tar.gz) = d2fea00cb7668a704aefc506dce88885577c1bb81e002f9db624447643cf39c5 -SIZE (jiangwenyuan-nuster-v1.8.8.3_GH0.tar.gz) = 2101562 +TIMESTAMP = 1534485691 +SHA256 (jiangwenyuan-nuster-v2.0.2.18_GH0.tar.gz) = 1ccc5ebf9fda06d5aaf1c10dd62f24fb6b96f3b31f6eb99ad0a2a25b03e83ce3 +SIZE (jiangwenyuan-nuster-v2.0.2.18_GH0.tar.gz) = 2129545 diff --git a/net/nuster/files/patch-include-common-hathreads.h b/net/nuster/files/patch-include-common-hathreads.h index eddbc9a6e07..7c8dc57522b 100644 --- a/net/nuster/files/patch-include-common-hathreads.h +++ b/net/nuster/files/patch-include-common-hathreads.h @@ -1,6 +1,6 @@ ---- include/common/hathreads.h.orig 2018-02-17 18:17:22.219400000 +0000 -+++ include/common/hathreads.h 2018-02-17 18:18:44.598422000 +0000 -@@ -104,7 +104,7 @@ extern THREAD_LOCAL unsigned long tid_bit; /* The bit +--- include/common/hathreads.h.orig 2018-08-15 11:14:35 UTC ++++ include/common/hathreads.h +@@ -113,7 +113,7 @@ extern THREAD_LOCAL unsigned long tid_bi /* TODO: thread: For now, we rely on GCC builtins but it could be a good idea to * have a header file regrouping all functions dealing with threads. */ diff --git a/net/nuster/files/patch-include_nuster_http.h b/net/nuster/files/patch-include_nuster_http.h new file mode 100644 index 00000000000..adaebad5255 --- /dev/null +++ b/net/nuster/files/patch-include_nuster_http.h @@ -0,0 +1,10 @@ +--- include/nuster/http.h.orig 2018-08-17 06:04:08 UTC ++++ include/nuster/http.h +@@ -14,6 +14,7 @@ + #define _NUSTER_HTTP_H + + #include ++#include + + #include + #include diff --git a/net/quiterss/Makefile b/net/quiterss/Makefile index d94af927814..4019559449f 100644 --- a/net/quiterss/Makefile +++ b/net/quiterss/Makefile @@ -2,7 +2,7 @@ # $FreeBSD$ PORTNAME= quiterss -PORTVERSION= 0.18.11 +PORTVERSION= 0.18.12 CATEGORIES= net MASTER_SITES= http://quiterss.org/files/${PORTVERSION}/ DISTNAME= QuiteRSS-${PORTVERSION}-src diff --git a/net/quiterss/distinfo b/net/quiterss/distinfo index 6c6fb09dac6..1c392953b9d 100644 --- a/net/quiterss/distinfo +++ b/net/quiterss/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1527876014 -SHA256 (QuiteRSS-0.18.11-src.tar.gz) = 38bb84e036f35fcc0f58894e59bc11497905a98852ef845f167d8f5dd05f65df -SIZE (QuiteRSS-0.18.11-src.tar.gz) = 3573854 +TIMESTAMP = 1534447544 +SHA256 (QuiteRSS-0.18.12-src.tar.gz) = 553461bcf266e62fc91aa93f7f6bde2176785dccf9311ded6c651ffe5d68fe6f +SIZE (QuiteRSS-0.18.12-src.tar.gz) = 3595287 diff --git a/security/kr/Makefile b/security/kr/Makefile index 7b189297465..8cf4a022100 100644 --- a/security/kr/Makefile +++ b/security/kr/Makefile @@ -3,6 +3,7 @@ PORTNAME= kr PORTVERSION= 2.3.1 +PORTREVISION= 1 CATEGORIES= security MAINTAINER= feld@FreeBSD.org diff --git a/sysutils/exa/Makefile b/sysutils/exa/Makefile index 81fcbfb4444..c2d7c3f560f 100644 --- a/sysutils/exa/Makefile +++ b/sysutils/exa/Makefile @@ -3,7 +3,7 @@ PORTNAME= exa DISTVERSIONPREFIX= v DISTVERSION= 0.8.0 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= sysutils MAINTAINER= tobik@FreeBSD.org diff --git a/sysutils/fd/Makefile b/sysutils/fd/Makefile index 060b414b62a..60f0d36c32d 100644 --- a/sysutils/fd/Makefile +++ b/sysutils/fd/Makefile @@ -4,7 +4,7 @@ PORTNAME= fd DISTVERSIONPREFIX= v DISTVERSION= 7.0.0 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= sysutils PKGNAMESUFFIX= -find diff --git a/sysutils/flowgger/Makefile b/sysutils/flowgger/Makefile index af5d674f140..57cc10e212f 100644 --- a/sysutils/flowgger/Makefile +++ b/sysutils/flowgger/Makefile @@ -3,7 +3,7 @@ PORTNAME= flowgger DISTVERSION= 0.2.6-28 DISTVERSIONSUFFIX= -gab572a0 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= sysutils MAINTAINER= ports@FreeBSD.org diff --git a/sysutils/hal/Makefile b/sysutils/hal/Makefile index 2b41ffd760f..87c54cc3985 100644 --- a/sysutils/hal/Makefile +++ b/sysutils/hal/Makefile @@ -4,7 +4,7 @@ PORTNAME= hal DISTVERSION= 0.5.14 -PORTREVISION= 33 +PORTREVISION= 34 CATEGORIES= sysutils MASTER_SITES= http://hal.freedesktop.org/releases/ diff --git a/sysutils/kubectl/Makefile b/sysutils/kubectl/Makefile index d4674809c0a..f5db03f9abe 100644 --- a/sysutils/kubectl/Makefile +++ b/sysutils/kubectl/Makefile @@ -2,7 +2,7 @@ # $FreeBSD$ PORTNAME= kubectl -PORTVERSION= 1.11.3 +PORTVERSION= 1.12.0 DISTVERSIONPREFIX= v CATEGORIES= sysutils diff --git a/sysutils/kubectl/distinfo b/sysutils/kubectl/distinfo index c6343bd4f34..b44c4608892 100644 --- a/sysutils/kubectl/distinfo +++ b/sysutils/kubectl/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1536692220 -SHA256 (kubernetes-kubernetes-v1.11.3_GH0.tar.gz) = f97edcfb593d18843e124590ce066e2fac3cd90a94f39d34faba640cc3c4a1bb -SIZE (kubernetes-kubernetes-v1.11.3_GH0.tar.gz) = 24788666 +TIMESTAMP = 1538156024 +SHA256 (kubernetes-kubernetes-v1.12.0_GH0.tar.gz) = 2530c590a725fab549ac434602e81e6b5340c8642a5ddce73078bf7c2fc02f45 +SIZE (kubernetes-kubernetes-v1.12.0_GH0.tar.gz) = 27995428 diff --git a/sysutils/minikube/Makefile b/sysutils/minikube/Makefile index e58fc4af10e..16ad3f0658f 100644 --- a/sysutils/minikube/Makefile +++ b/sysutils/minikube/Makefile @@ -2,7 +2,7 @@ # $FreeBSD$ PORTNAME= minikube -PORTVERSION= 0.28.2 +PORTVERSION= 0.29.0 DISTVERSIONPREFIX= v CATEGORIES= sysutils @@ -22,20 +22,8 @@ GH_ACCOUNT= kubernetes GO_PKGNAME= k8s.io/${PORTNAME} GO_TARGET= ${GO_PKGNAME}/cmd/${PORTNAME} GO_BUILDFLAGS= -ldflags="-X k8s.io/minikube/pkg/version.version=v${PORTVERSION} \ - -X k8s.io/minikube/pkg/version.isoVersion=v0.28.1 \ - -X k8s.io/minikube/pkg/version.isoPath=minikube/iso \ - -X k8s.io/kubernetes/pkg/version.gitCommit=fc32d2f3698e36b93322a3465f63a14e9f0eaead \ - -X k8s.io/kubernetes/pkg/version.gitTreeState=clean \ - -X k8s.io/kubernetes/pkg/version.gitVersion=v1.10.0 \ - -X k8s.io/kubernetes/pkg/version.gitMajor=1 \ - -X k8s.io/kubernetes/pkg/version.gitMinor=10 \ - -X k8s.io/kubernetes/pkg/version.buildDate=$$(date +'%Y-%m-%dT%H:%M:%SZ') \ - -X k8s.io/client-go/pkg/version.gitCommit=fc32d2f3698e36b93322a3465f63a14e9f0eaead \ - -X k8s.io/client-go/pkg/version.gitTreeState=clean \ - -X k8s.io/client-go/pkg/version.gitVersion=v1.10.0 \ - -X k8s.io/client-go/pkg/version.gitMajor=1 \ - -X k8s.io/client-go/pkg/version.gitMinor=10 \ - -X k8s.io/client-go/pkg/version.buildDate=$$(date +'%Y-%m-%dT%H:%M:%SZ')" + -X k8s.io/minikube/pkg/version.isoVersion=v0.29.0 \ + -X k8s.io/minikube/pkg/version.isoPath=minikube/iso" PLIST_FILES= bin/${PORTNAME} diff --git a/sysutils/minikube/distinfo b/sysutils/minikube/distinfo index 4f6a404652a..0c02692fe84 100644 --- a/sysutils/minikube/distinfo +++ b/sysutils/minikube/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1533746370 -SHA256 (kubernetes-minikube-v0.28.2_GH0.tar.gz) = 78647d29901e878bf9d62a3baca74277d9dc80b4437225973710d43ab869913d -SIZE (kubernetes-minikube-v0.28.2_GH0.tar.gz) = 20077130 +TIMESTAMP = 1538117759 +SHA256 (kubernetes-minikube-v0.29.0_GH0.tar.gz) = 781fc7766372f81922c9d05d90aee96873a1522a1d00e983510ecd10256fc27f +SIZE (kubernetes-minikube-v0.29.0_GH0.tar.gz) = 9176207 diff --git a/sysutils/potnet/Makefile b/sysutils/potnet/Makefile index 22c99a1ffc2..0e6aa94e428 100644 --- a/sysutils/potnet/Makefile +++ b/sysutils/potnet/Makefile @@ -2,6 +2,7 @@ PORTNAME= potnet DISTVERSION= 0.1.1 +PORTREVISION= 1 CATEGORIES= sysutils MAINTAINER= pizzamig@FreeBSD.org diff --git a/textproc/bat/Makefile b/textproc/bat/Makefile index 9e7e005d2fb..486212ed4ba 100644 --- a/textproc/bat/Makefile +++ b/textproc/bat/Makefile @@ -3,6 +3,7 @@ PORTNAME= bat DISTVERSIONPREFIX= v DISTVERSION= 0.7.1 +PORTREVISION= 1 CATEGORIES= textproc MAINTAINER= pizzamig@FreeBSD.org diff --git a/textproc/ripgrep/Makefile b/textproc/ripgrep/Makefile index c83e5ea114d..aea133dbdf8 100644 --- a/textproc/ripgrep/Makefile +++ b/textproc/ripgrep/Makefile @@ -5,6 +5,7 @@ PORTNAME= ripgrep DISTVERSION= 0.9.0 +PORTREVISION= 1 CATEGORIES= textproc MAINTAINER= petteri.valkonen@iki.fi diff --git a/textproc/xsv-rs/Makefile b/textproc/xsv-rs/Makefile index 37eee696ae6..458b55dbba2 100644 --- a/textproc/xsv-rs/Makefile +++ b/textproc/xsv-rs/Makefile @@ -2,6 +2,7 @@ PORTNAME= xsv DISTVERSION= 0.13.0 +PORTREVISION= 1 CATEGORIES= textproc PKGNAMESUFFIX= -rs diff --git a/www/Makefile b/www/Makefile index 335d854b644..414b426e7b6 100644 --- a/www/Makefile +++ b/www/Makefile @@ -1617,6 +1617,7 @@ SUBDIR += py-django-tables2 SUBDIR += py-django-tagging SUBDIR += py-django-taggit + SUBDIR += py-django-taggit-serializer SUBDIR += py-django-tastypie SUBDIR += py-django-templatetag-sugar SUBDIR += py-django-timezone-field @@ -2442,7 +2443,6 @@ SUBDIR += w3mir SUBDIR += waccess SUBDIR += wadcomblog - SUBDIR += waterfox SUBDIR += web2ldap SUBDIR += webalizer SUBDIR += webbrowser diff --git a/www/firefox-esr/Makefile b/www/firefox-esr/Makefile index 9e0dae2801a..abb1b72f05e 100644 --- a/www/firefox-esr/Makefile +++ b/www/firefox-esr/Makefile @@ -3,6 +3,7 @@ PORTNAME= firefox DISTVERSION= 60.2.1 +PORTREVISION= 1 PORTEPOCH= 1 CATEGORIES= www ipv6 MASTER_SITES= MOZILLA/${PORTNAME}/releases/${DISTVERSION}esr/source \ diff --git a/www/firefox/Makefile b/www/firefox/Makefile index 4fdc117b00e..607f7bb3441 100644 --- a/www/firefox/Makefile +++ b/www/firefox/Makefile @@ -3,6 +3,7 @@ PORTNAME= firefox DISTVERSION= 62.0.2 +PORTREVISION= 1 PORTEPOCH= 1 CATEGORIES= www ipv6 MASTER_SITES= MOZILLA/${PORTNAME}/releases/${DISTVERSION}/source \ diff --git a/www/geckodriver/Makefile b/www/geckodriver/Makefile index fac4b12da77..d5e66a20ef1 100644 --- a/www/geckodriver/Makefile +++ b/www/geckodriver/Makefile @@ -3,6 +3,7 @@ PORTNAME= geckodriver DISTVERSIONPREFIX= v DISTVERSION= 0.21.0 +PORTREVISION= 1 CATEGORIES= www MAINTAINER= daniel@blodan.se diff --git a/www/py-django-taggit-serializer/Makefile b/www/py-django-taggit-serializer/Makefile new file mode 100644 index 00000000000..eb520f85660 --- /dev/null +++ b/www/py-django-taggit-serializer/Makefile @@ -0,0 +1,23 @@ +# $FreeBSD$ + +PORTNAME= django-taggit-serializer +DISTVERSION= 0.1.7 +CATEGORIES= www python +MASTER_SITES= CHEESESHOP +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= freebsd_ports@k-worx.org +COMMENT= Django Taggit serializer for the Django REST Framework + +LICENSE= BSD3CLAUSE +LICENSE_FILE= ${WRKSRC}/LICENSE + +RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}django-taggit>=0:www/py-django-taggit@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}six>=0:devel/py-six@${PY_FLAVOR} + +USES= python +USE_PYTHON= distutils autoplist + +NO_ARCH= yes + +.include diff --git a/www/py-django-taggit-serializer/distinfo b/www/py-django-taggit-serializer/distinfo new file mode 100644 index 00000000000..ea22dc02a34 --- /dev/null +++ b/www/py-django-taggit-serializer/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1533884090 +SHA256 (django-taggit-serializer-0.1.7.tar.gz) = f712eb2482079be452bcd1e82b18a820e26427c3ee1cef2b4fcd4d6b8b9f14d0 +SIZE (django-taggit-serializer-0.1.7.tar.gz) = 5589 diff --git a/www/py-django-taggit-serializer/pkg-descr b/www/py-django-taggit-serializer/pkg-descr new file mode 100644 index 00000000000..dfb52b90812 --- /dev/null +++ b/www/py-django-taggit-serializer/pkg-descr @@ -0,0 +1,6 @@ +This package makes it possible to serialize tags generated by the django-taggit +package. Because the tags in the django-taggit package need to be added into a +TaggableManager() one cannot use the usual Serializer that is retrieved from the +Django REST Framework. + +WWW: https://github.com/glemmaPaul/django-taggit-serializer diff --git a/www/seamonkey/Makefile b/www/seamonkey/Makefile index fe424b188a7..2accaaf1436 100644 --- a/www/seamonkey/Makefile +++ b/www/seamonkey/Makefile @@ -3,7 +3,7 @@ PORTNAME= seamonkey DISTVERSION= 2.49.4 -PORTREVISION= 10 +PORTREVISION= 12 MOZILLA_VER= 52 # above + 3 CATEGORIES?= www mail news editors irc ipv6 MASTER_SITES= MOZILLA/${PORTNAME}/releases/${DISTVERSION}/source \ diff --git a/www/waterfox/Makefile b/www/waterfox/Makefile deleted file mode 100644 index a4794a669a1..00000000000 --- a/www/waterfox/Makefile +++ /dev/null @@ -1,76 +0,0 @@ -# $FreeBSD$ - -PORTNAME= waterfox -DISTVERSION= 56.2.3 -CATEGORIES= www ipv6 - -MAINTAINER= jbeich@FreeBSD.org -COMMENT= Distilled fork of Firefox - -DEPRECATED= Temporary experiment -EXPIRATION_DATE=2018-09-27 - -BUILD_DEPENDS= nspr>=4.16:devel/nspr \ - nss>=3.32.1:security/nss \ - icu>=59.1,1:devel/icu \ - libevent>=2.1.8:devel/libevent \ - harfbuzz>=1.4.7:print/harfbuzz \ - graphite2>=1.3.10:graphics/graphite2 \ - png>=1.6.31:graphics/png \ - libvorbis>=1.3.5,3:audio/libvorbis \ - libvpx>=1.5.0:multimedia/libvpx \ - sqlite3>=3.19.3:databases/sqlite3 \ - ${PYTHON_PKGNAMEPREFIX}sqlite3>0:databases/py-sqlite3@${PY_FLAVOR} \ - v4l_compat>0:multimedia/v4l_compat \ - autoconf-2.13:devel/autoconf213 \ - yasm:devel/yasm \ - zip:archivers/zip -# soundtouch>=1.9.0:audio/soundtouch \ - -LIB_DEPENDS= libv4l2.so:multimedia/libv4l - -USE_GITHUB= yes -GH_ACCOUNT= MrAlex94 -GH_PROJECT= Waterfox - -USE_GECKO= gecko -MOZ_PKGCONFIG_FILES= # empty -USE_MOZILLA= -soundtouch -MOZILLA_NAME= Waterfox - -USE_GL= gl - -WATERFOX_ICON= ${MOZILLA}.png -WATERFOX_ICON_SRC= ${PREFIX}/lib/${MOZILLA}/browser/chrome/icons/default/default256.png -WATERFOX_DESKTOP= ${MOZSRC}/taskcluster/docker/firefox-snap/firefox.desktop -MOZ_OPTIONS= --enable-application=browser \ - --with-app-name=${MOZILLA} \ - --with-app-basename=${MOZILLA_NAME} \ - --with-distribution-id=org.${MOZILLA}project - -OPTIONS_DEFAULT= BUNDLED_CAIRO - -.include "${.CURDIR}/../../www/firefox/Makefile.options" - -# Inconsistent fallback order (libcubeb vs. audio_device) -SNDIO_PREVENTS= ${OPTIONS_MULTI_AUDIO:NSNDIO} - -post-patch: - @${REINPLACE_CMD} -e 's/%u/%U/' -e '/X-MultipleArgs/d' \ - -e 's/firefox/${MOZILLA}/' \ - -e 's/Firefox/${MOZILLA_NAME}/' \ - ${WATERFOX_DESKTOP} - @${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \ - ${WRKSRC}/browser/app/nsBrowserApp.cpp - -pre-configure: - (cd ${WRKSRC} && ${LOCALBASE}/bin/autoconf-2.13) - (cd ${WRKSRC}/js/src/ && ${LOCALBASE}/bin/autoconf-2.13) - -post-install: - ${INSTALL_DATA} ${WATERFOX_DESKTOP} \ - ${STAGEDIR}${PREFIX}/share/applications/${MOZILLA}.desktop - ${MKDIR} ${STAGEDIR}${PREFIX}/share/pixmaps - ${LN} -sf ${WATERFOX_ICON_SRC} ${STAGEDIR}${PREFIX}/share/pixmaps/${WATERFOX_ICON} - -.include diff --git a/www/waterfox/distinfo b/www/waterfox/distinfo deleted file mode 100644 index fc8b4ed55cf..00000000000 --- a/www/waterfox/distinfo +++ /dev/null @@ -1,3 +0,0 @@ -TIMESTAMP = 1536644593 -SHA256 (MrAlex94-Waterfox-56.2.3_GH0.tar.gz) = 6134501bf3325d3bcd9632405a46f1f1278988e57bf4ca88b61926eb49ef1465 -SIZE (MrAlex94-Waterfox-56.2.3_GH0.tar.gz) = 395126627 diff --git a/www/waterfox/files/patch-addon-search b/www/waterfox/files/patch-addon-search deleted file mode 100644 index a2fabaa456b..00000000000 --- a/www/waterfox/files/patch-addon-search +++ /dev/null @@ -1,70 +0,0 @@ -https://github.com/mozilla/addons/issues/708 -https://github.com/mozilla/addons-frontend/issues/4610 - -diff --git browser/app/profile/firefox.js browser/app/profile/firefox.js -index 75c2c5e435e35..4d8c09c02759b 100644 ---- browser/app/profile/firefox.js -+++ browser/app/profile/firefox.js -@@ -48,12 +48,12 @@ pref("extensions.webextOptionalPermissionPrompts", true); - sticky_pref("extensions.getAddons.cache.enabled", true); - pref("extensions.getAddons.showPane", false); - pref("extensions.getAddons.maxResults", 15); --pref("extensions.getAddons.get.url", "https://services.addons.mozilla.org/%LOCALE%/firefox/api/%API_VERSION%/search/guid:%IDS%?src=firefox&appOS=%OS%&appVersion=%VERSION%"); -+pref("extensions.getAddons.get.url", "https://services.addons.mozilla.org/%LOCALE%/firefox/api/%API_VERSION%/search/guid:%IDS%?src=firefox&appOS=Linux&appVersion=%VERSION%"); - pref("extensions.getAddons.getWithPerformance.url", ""); --pref("extensions.getAddons.search.browseURL", "https://addons.mozilla.org/%LOCALE%/firefox/search?q=%TERMS%&platform=%OS%&appver=%VERSION%"); --pref("extensions.getAddons.search.url", "https://services.addons.mozilla.org/%LOCALE%/firefox/api/%API_VERSION%/search/%TERMS%/all/%MAX_RESULTS%/%OS%/%VERSION%/%COMPATIBILITY_MODE%?src=firefox"); -+pref("extensions.getAddons.search.browseURL", "https://addons.mozilla.org/%LOCALE%/firefox/search?q=%TERMS%&platform=Linux&appver=%VERSION%"); -+pref("extensions.getAddons.search.url", "https://services.addons.mozilla.org/%LOCALE%/firefox/api/%API_VERSION%/search/%TERMS%/all/%MAX_RESULTS%/Linux/%VERSION%/%COMPATIBILITY_MODE%?src=firefox"); - pref("extensions.webservice.discoverURL", ""); --pref("extensions.getAddons.recommended.url", "https://services.addons.mozilla.org/%LOCALE%/%APP%/api/%API_VERSION%/list/recommended/all/%MAX_RESULTS%/%OS%/%VERSION%?src=firefox"); -+pref("extensions.getAddons.recommended.url", "https://services.addons.mozilla.org/%LOCALE%/%APP%/api/%API_VERSION%/list/recommended/all/%MAX_RESULTS%/Linux/%VERSION%?src=firefox"); - pref("extensions.getAddons.link.url", "https://addons.mozilla.org/%LOCALE%/firefox/"); - pref("extensions.getAddons.themes.browseURL", "https://addons.mozilla.org/%LOCALE%/firefox/themes/?src=firefox"); - -@@ -204,8 +204,8 @@ pref("app.update.service.enabled", true); - // .. etc .. - // - pref("extensions.update.enabled", true); --pref("extensions.update.url", "https://versioncheck.addons.mozilla.org/update/VersionCheck.php?reqVersion=%REQ_VERSION%&id=%ITEM_ID%&version=%ITEM_VERSION%&maxAppVersion=%ITEM_MAXAPPVERSION%&status=%ITEM_STATUS%&appID=%APP_ID%&appVersion=%APP_VERSION%&appOS=%APP_OS%&appABI=%APP_ABI%&locale=%APP_LOCALE%¤tAppVersion=%CURRENT_APP_VERSION%&updateType=%UPDATE_TYPE%&compatMode=%COMPATIBILITY_MODE%"); --pref("extensions.update.background.url", "https://versioncheck-bg.addons.mozilla.org/update/VersionCheck.php?reqVersion=%REQ_VERSION%&id=%ITEM_ID%&version=%ITEM_VERSION%&maxAppVersion=%ITEM_MAXAPPVERSION%&status=%ITEM_STATUS%&appID=%APP_ID%&appVersion=%APP_VERSION%&appOS=%APP_OS%&appABI=%APP_ABI%&locale=%APP_LOCALE%¤tAppVersion=%CURRENT_APP_VERSION%&updateType=%UPDATE_TYPE%&compatMode=%COMPATIBILITY_MODE%"); -+pref("extensions.update.url", "https://versioncheck.addons.mozilla.org/update/VersionCheck.php?reqVersion=%REQ_VERSION%&id=%ITEM_ID%&version=%ITEM_VERSION%&maxAppVersion=%ITEM_MAXAPPVERSION%&status=%ITEM_STATUS%&appID=%APP_ID%&appVersion=%APP_VERSION%&appOS=Linux&appABI=%APP_ABI%&locale=%APP_LOCALE%¤tAppVersion=%CURRENT_APP_VERSION%&updateType=%UPDATE_TYPE%&compatMode=%COMPATIBILITY_MODE%"); -+pref("extensions.update.background.url", "https://versioncheck-bg.addons.mozilla.org/update/VersionCheck.php?reqVersion=%REQ_VERSION%&id=%ITEM_ID%&version=%ITEM_VERSION%&maxAppVersion=%ITEM_MAXAPPVERSION%&status=%ITEM_STATUS%&appID=%APP_ID%&appVersion=%APP_VERSION%&appOS=Linux&appABI=%APP_ABI%&locale=%APP_LOCALE%¤tAppVersion=%CURRENT_APP_VERSION%&updateType=%UPDATE_TYPE%&compatMode=%COMPATIBILITY_MODE%"); - pref("extensions.update.interval", 86400); // Check for updates to Extensions and - // Themes every day - // Non-symmetric (not shared by extensions) extension-specific [update] preferences -diff --git toolkit/mozapps/extensions/internal/AddonRepository.jsm toolkit/mozapps/extensions/internal/AddonRepository.jsm -index f70fd8d7e3bd8..81e8cd7764fdf 100644 ---- toolkit/mozapps/extensions/internal/AddonRepository.jsm -+++ toolkit/mozapps/extensions/internal/AddonRepository.jsm -@@ -1179,7 +1179,7 @@ this.AddonRepository = { - let nodes = node.getElementsByTagName("os"); - addon.isPlatformCompatible = Array.some(nodes, function(aNode) { - let text = aNode.textContent.toLowerCase().trim(); -- return text == "all" || text == Services.appinfo.OS.toLowerCase(); -+ return text == "all" || text == "linux" || text == Services.appinfo.OS.toLowerCase(); - }); - break; - case "install": -@@ -1187,7 +1187,7 @@ this.AddonRepository = { - if (node.hasAttribute("os")) { - let os = node.getAttribute("os").trim().toLowerCase(); - // If the os is not ALL and not the current OS then ignore this xpi -- if (os != "all" && os != Services.appinfo.OS.toLowerCase()) -+ if (os != "all" && os != "linux" && os != Services.appinfo.OS.toLowerCase()) - break; - } - -diff --git toolkit/mozapps/extensions/internal/XPIProvider.jsm toolkit/mozapps/extensions/internal/XPIProvider.jsm -index f70fd8d7e3bd8..81e8cd7764fdf 100644 ---- toolkit/mozapps/extensions/internal/XPIProvider.jsm -+++ toolkit/mozapps/extensions/internal/XPIProvider.jsm -@@ -7186,7 +7186,7 @@ AddonInternal.prototype = { - // Something is causing errors in here - try { - for (let platform of this.targetPlatforms) { -- if (platform.os == Services.appinfo.OS) { -+ if (platform.os == "Linux" || platform.os == Services.appinfo.OS) { - if (platform.abi) { - needsABI = true; - if (platform.abi === abi) diff --git a/www/waterfox/files/patch-browser-app-nsBrowserApp.cpp b/www/waterfox/files/patch-browser-app-nsBrowserApp.cpp deleted file mode 100644 index 68cb778b95a..00000000000 --- a/www/waterfox/files/patch-browser-app-nsBrowserApp.cpp +++ /dev/null @@ -1,12 +0,0 @@ ---- browser/app/nsBrowserApp.cpp.orig 2016-09-19 16:19:28 UTC -+++ browser/app/nsBrowserApp.cpp -@@ -324,6 +324,9 @@ int main(int argc, char* argv[], char* e - { - mozilla::TimeStamp start = mozilla::TimeStamp::Now(); - -+ setenv("MOZ_GMP_PATH", "%%LOCALBASE%%/lib/browser_plugins/symlinks/gecko", 0); -+ setenv("MOZ_PLUGIN_PATH", "%%LOCALBASE%%/lib/browser_plugins/symlinks/gecko", 0); -+ - #ifdef HAS_DLL_BLOCKLIST - DllBlocklist_Initialize(); - diff --git a/www/waterfox/files/patch-bug1021761 b/www/waterfox/files/patch-bug1021761 deleted file mode 100644 index f0764a8c4b2..00000000000 --- a/www/waterfox/files/patch-bug1021761 +++ /dev/null @@ -1,1218 +0,0 @@ -diff --git build/moz.configure/old.configure build/moz.configure/old.configure -index cd6c37cf4c7c..e98dc7973a6a 100644 ---- build/moz.configure/old.configure -+++ build/moz.configure/old.configure -@@ -275,6 +275,7 @@ def old_configure_options(*options): - '--with-nspr-prefix', - '--with-nss-exec-prefix', - '--with-nss-prefix', -+ '--with-oss', - '--with-pthreads', - '--with-qemu-exe', - '--with-sixgill', -diff --git old-configure.in old-configure.in -index dff46614635e..dbbfdb76ab78 100644 ---- old-configure.in -+++ old-configure.in -@@ -3128,6 +3128,67 @@ AC_DEFINE(MOZ_WEBM_ENCODER) - AC_SUBST(MOZ_WEBM_ENCODER) - - dnl ================================== -+dnl = Check OSS availability -+dnl ================================== -+ -+dnl If using Linux, Solaris or BSDs, ensure that OSS is available -+case "$OS_TARGET" in -+Linux|SunOS|DragonFly|FreeBSD|NetBSD|GNU/kFreeBSD) -+ MOZ_OSS=1 -+ ;; -+esac -+ -+MOZ_ARG_WITH_STRING(oss, -+[ --with-oss[=PFX] Enable OpenSoundSystem support [installed at prefix PFX]], -+ OSSPREFIX=$withval) -+ -+if test -n "$OSSPREFIX"; then -+ if test "$OSSPREFIX" != "no"; then -+ MOZ_OSS=1 -+ else -+ MOZ_OSS= -+ fi -+fi -+ -+_SAVE_CFLAGS=$CFLAGS -+_SAVE_LIBS=$LIBS -+if test -n "$MOZ_OSS"; then -+ dnl Prefer 4Front implementation -+ AC_MSG_CHECKING([MOZ_OSS_CFLAGS]) -+ if test "$OSSPREFIX" != "yes"; then -+ oss_conf=${OSSPREFIX%/usr}/etc/oss.conf -+ if test -f "$oss_conf"; then -+ . "$oss_conf" -+ else -+ OSSLIBDIR=$OSSPREFIX/lib/oss -+ fi -+ if test -d "$OSSLIBDIR"; then -+ MOZ_OSS_CFLAGS="$MOZ_OSS_CFLAGS -I$OSSLIBDIR/include" -+ fi -+ fi -+ AC_MSG_RESULT([$MOZ_OSS_CFLAGS]) -+ -+ CFLAGS="$CFLAGS $MOZ_OSS_CFLAGS" -+ MOZ_CHECK_HEADERS(sys/soundcard.h soundcard.h) -+ -+ if test "$ac_cv_header_sys_soundcard_h" != "yes" -a \ -+ "$ac_cv_header_soundcard_h" != "yes"; then -+ AC_MSG_ERROR([Need OSS for Ogg, Wave or WebM decoding on $OS_TARGET. Disable with --without-oss.]) -+ fi -+ -+ dnl Assume NetBSD implementation over SunAudio -+ AC_CHECK_LIB(ossaudio, _oss_ioctl, -+ [AC_DEFINE_UNQUOTED(CUBEB_OSS_DEFAULT_OUTPUT, "/dev/sound") -+ MOZ_OSS_LIBS="$MOZ_OSS_LIBS -lossaudio"]) -+fi -+CFLAGS=$_SAVE_CFLAGS -+LIBS=$_SAVE_LIBS -+ -+AC_SUBST(MOZ_OSS) -+AC_SUBST_LIST(MOZ_OSS_CFLAGS) -+AC_SUBST_LIST(MOZ_OSS_LIBS) -+ -+dnl ================================== - dnl = Check alsa availability on Linux - dnl ================================== - -diff --git dom/media/CubebUtils.cpp dom/media/CubebUtils.cpp -index e10e07e06ade..1fd561bea113 100644 ---- dom/media/CubebUtils.cpp -+++ dom/media/CubebUtils.cpp -@@ -71,7 +71,8 @@ const char* AUDIOSTREAM_BACKEND_ID_STR[] = { - "sndio", - "opensl", - "audiotrack", -- "kai" -+ "kai", -+ "oss", - }; - /* Index for failures to create an audio stream the first time. */ - const int CUBEB_BACKEND_INIT_FAILURE_FIRST = -diff --git media/libcubeb/AUTHORS media/libcubeb/AUTHORS -index 0fde65baad34..f8663c43b475 100644 ---- media/libcubeb/AUTHORS -+++ media/libcubeb/AUTHORS -@@ -4,6 +4,7 @@ Michael Wu - Paul Adenot - David Richards - Sebastien Alaiwan -+Evgeniy Vodolazskiy - KO Myung-Hun - Haakon Sporsheim - Alex Chronopoulos -diff --git media/libcubeb/src/cubeb.c media/libcubeb/src/cubeb.c -index 57bcb4c13652..68be024f4a68 100644 ---- media/libcubeb/src/cubeb.c -+++ media/libcubeb/src/cubeb.c -@@ -54,6 +54,9 @@ int audiotrack_init(cubeb ** context, char const * context_name); - #if defined(USE_KAI) - int kai_init(cubeb ** context, char const * context_name); - #endif -+#if defined(USE_OSS) -+int oss_init(cubeb ** context, char const * context_name); -+#endif - - static int - validate_stream_params(cubeb_stream_params * input_stream_params, -@@ -155,6 +158,10 @@ cubeb_init(cubeb ** context, char const * context_name, char const * backend_nam - #if defined(USE_KAI) - init_oneshot = kai_init; - #endif -+ } else if (!strcmp(backend_name, "oss")) { -+#if defined(USE_OSS) -+ init_oneshot = oss_init; -+#endif - } else { - /* Already set */ - } -@@ -196,6 +203,9 @@ cubeb_init(cubeb ** context, char const * context_name, char const * backend_nam - #if defined(USE_KAI) - kai_init, - #endif -+#if defined(USE_OSS) -+ oss_init, -+#endif - }; - int i; - -diff --git media/libcubeb/src/cubeb_alsa.c media/libcubeb/src/cubeb_alsa.c -index 05ad27fef53b..3ea78e994f59 100644 ---- media/libcubeb/src/cubeb_alsa.c -+++ media/libcubeb/src/cubeb_alsa.c -@@ -12,6 +12,7 @@ - #include - #include - #include -+#include - #include - #include - #include -@@ -25,6 +26,52 @@ - - #define ALSA_PA_PLUGIN "ALSA <-> PulseAudio PCM I/O Plugin" - -+#ifdef DISABLE_LIBASOUND_DLOPEN -+#define WRAP(x) x -+#else -+#define WRAP(x) cubeb_##x -+#define MAKE_TYPEDEF(x) static typeof(x) * cubeb_##x -+MAKE_TYPEDEF(snd_config); -+MAKE_TYPEDEF(snd_config_add); -+MAKE_TYPEDEF(snd_config_copy); -+MAKE_TYPEDEF(snd_config_delete); -+MAKE_TYPEDEF(snd_config_get_id); -+MAKE_TYPEDEF(snd_config_get_string); -+MAKE_TYPEDEF(snd_config_imake_integer); -+MAKE_TYPEDEF(snd_config_search); -+MAKE_TYPEDEF(snd_config_search_definition); -+MAKE_TYPEDEF(snd_lib_error_set_handler); -+MAKE_TYPEDEF(snd_pcm_avail_update); -+MAKE_TYPEDEF(snd_pcm_close); -+MAKE_TYPEDEF(snd_pcm_delay); -+MAKE_TYPEDEF(snd_pcm_drain); -+MAKE_TYPEDEF(snd_pcm_frames_to_bytes); -+MAKE_TYPEDEF(snd_pcm_get_params); -+/* snd_pcm_hw_params_alloca is actually a macro */ -+/* MAKE_TYPEDEF(snd_pcm_hw_params_alloca); */ -+MAKE_TYPEDEF(snd_pcm_hw_params_sizeof); -+#define snd_pcm_hw_params_sizeof cubeb_snd_pcm_hw_params_sizeof -+MAKE_TYPEDEF(snd_pcm_hw_params_any); -+MAKE_TYPEDEF(snd_pcm_hw_params_get_channels_max); -+MAKE_TYPEDEF(snd_pcm_hw_params_get_rate); -+MAKE_TYPEDEF(snd_pcm_hw_params_set_rate_near); -+MAKE_TYPEDEF(snd_pcm_nonblock); -+MAKE_TYPEDEF(snd_pcm_open); -+MAKE_TYPEDEF(snd_pcm_open_lconf); -+MAKE_TYPEDEF(snd_pcm_pause); -+MAKE_TYPEDEF(snd_pcm_poll_descriptors); -+MAKE_TYPEDEF(snd_pcm_poll_descriptors_count); -+MAKE_TYPEDEF(snd_pcm_poll_descriptors_revents); -+MAKE_TYPEDEF(snd_pcm_readi); -+MAKE_TYPEDEF(snd_pcm_recover); -+MAKE_TYPEDEF(snd_pcm_set_params); -+MAKE_TYPEDEF(snd_pcm_start); -+MAKE_TYPEDEF(snd_pcm_state); -+MAKE_TYPEDEF(snd_pcm_writei); -+ -+#undef MAKE_TYPEDEF -+#endif -+ - /* ALSA is not thread-safe. snd_pcm_t instances are individually protected - by the owning cubeb_stream's mutex. snd_pcm_t creation and destruction - is not thread-safe until ALSA 1.0.24 (see alsa-lib.git commit 91c9c8f1), -@@ -65,6 +112,8 @@ struct cubeb { - workaround is not required. */ - snd_config_t * local_config; - int is_pa; -+ -+ void * libasound; - }; - - enum stream_state { -@@ -243,8 +292,8 @@ set_timeout(struct timeval * timeout, unsigned int ms) - static void - stream_buffer_decrement(cubeb_stream * stm, long count) - { -- char * bufremains = stm->buffer + snd_pcm_frames_to_bytes(stm->pcm, count); -- memmove(stm->buffer, bufremains, snd_pcm_frames_to_bytes(stm->pcm, stm->bufframes - count)); -+ char * bufremains = stm->buffer + WRAP(snd_pcm_frames_to_bytes)(stm->pcm, count); -+ memmove(stm->buffer, bufremains, WRAP(snd_pcm_frames_to_bytes)(stm->pcm, stm->bufframes - count)); - stm->bufframes -= count; - } - -@@ -276,9 +325,9 @@ alsa_process_stream(cubeb_stream * stm) - /* Call _poll_descriptors_revents() even if we don't use it - to let underlying plugins clear null events. Otherwise poll() - may wake up again and again, producing unnecessary CPU usage. */ -- snd_pcm_poll_descriptors_revents(stm->pcm, stm->fds, stm->nfds, &revents); -+ WRAP(snd_pcm_poll_descriptors_revents)(stm->pcm, stm->fds, stm->nfds, &revents); - -- avail = snd_pcm_avail_update(stm->pcm); -+ avail = WRAP(snd_pcm_avail_update)(stm->pcm); - - /* Got null event? Bail and wait for another wakeup. */ - if (avail == 0) { -@@ -301,7 +350,7 @@ alsa_process_stream(cubeb_stream * stm) - // TODO: should it be marked as DRAINING? - } - -- got = snd_pcm_readi(stm->pcm, stm->buffer+stm->bufframes, avail); -+ got = WRAP(snd_pcm_readi)(stm->pcm, stm->buffer+stm->bufframes, avail); - - if (got < 0) { - avail = got; // the error handler below will recover us -@@ -345,7 +394,7 @@ alsa_process_stream(cubeb_stream * stm) - (!stm->other_stream || stm->other_stream->bufframes > 0)) { - long got = avail - stm->bufframes; - void * other_buffer = stm->other_stream ? stm->other_stream->buffer : NULL; -- char * buftail = stm->buffer + snd_pcm_frames_to_bytes(stm->pcm, stm->bufframes); -+ char * buftail = stm->buffer + WRAP(snd_pcm_frames_to_bytes)(stm->pcm, stm->bufframes); - - /* Correct read size to the other stream available frames */ - if (stm->other_stream && got > (snd_pcm_sframes_t) stm->other_stream->bufframes) { -@@ -372,8 +421,8 @@ alsa_process_stream(cubeb_stream * stm) - long drain_frames = avail - stm->bufframes; - double drain_time = (double) drain_frames / stm->params.rate; - -- char * buftail = stm->buffer + snd_pcm_frames_to_bytes(stm->pcm, stm->bufframes); -- memset(buftail, 0, snd_pcm_frames_to_bytes(stm->pcm, drain_frames)); -+ char * buftail = stm->buffer + WRAP(snd_pcm_frames_to_bytes)(stm->pcm, stm->bufframes); -+ memset(buftail, 0, WRAP(snd_pcm_frames_to_bytes)(stm->pcm, drain_frames)); - stm->bufframes = avail; - - /* Mark as draining, unless we're waiting for capture */ -@@ -400,7 +449,7 @@ alsa_process_stream(cubeb_stream * stm) - } - } - -- wrote = snd_pcm_writei(stm->pcm, stm->buffer, avail); -+ wrote = WRAP(snd_pcm_writei)(stm->pcm, stm->buffer, avail); - if (wrote < 0) { - avail = wrote; // the error handler below will recover us - } else { -@@ -413,13 +462,13 @@ alsa_process_stream(cubeb_stream * stm) - - /* Got some error? Let's try to recover the stream. */ - if (avail < 0) { -- avail = snd_pcm_recover(stm->pcm, avail, 0); -+ avail = WRAP(snd_pcm_recover)(stm->pcm, avail, 0); - - /* Capture pcm must be started after initial setup/recover */ - if (avail >= 0 && - stm->stream_type == SND_PCM_STREAM_CAPTURE && -- snd_pcm_state(stm->pcm) == SND_PCM_STATE_PREPARED) { -- avail = snd_pcm_start(stm->pcm); -+ WRAP(snd_pcm_state)(stm->pcm) == SND_PCM_STATE_PREPARED) { -+ avail = WRAP(snd_pcm_start)(stm->pcm); - } - } - -@@ -535,26 +584,26 @@ get_slave_pcm_node(snd_config_t * lconf, snd_config_t * root_pcm) - - slave_def = NULL; - -- r = snd_config_search(root_pcm, "slave", &slave_pcm); -+ r = WRAP(snd_config_search)(root_pcm, "slave", &slave_pcm); - if (r < 0) { - return NULL; - } - -- r = snd_config_get_string(slave_pcm, &string); -+ r = WRAP(snd_config_get_string)(slave_pcm, &string); - if (r >= 0) { -- r = snd_config_search_definition(lconf, "pcm_slave", string, &slave_def); -+ r = WRAP(snd_config_search_definition)(lconf, "pcm_slave", string, &slave_def); - if (r < 0) { - return NULL; - } - } - - do { -- r = snd_config_search(slave_def ? slave_def : slave_pcm, "pcm", &pcm); -+ r = WRAP(snd_config_search)(slave_def ? slave_def : slave_pcm, "pcm", &pcm); - if (r < 0) { - break; - } - -- r = snd_config_get_string(slave_def ? slave_def : slave_pcm, &string); -+ r = WRAP(snd_config_get_string)(slave_def ? slave_def : slave_pcm, &string); - if (r < 0) { - break; - } -@@ -563,7 +612,7 @@ get_slave_pcm_node(snd_config_t * lconf, snd_config_t * root_pcm) - if (r < 0 || r > (int) sizeof(node_name)) { - break; - } -- r = snd_config_search(lconf, node_name, &pcm); -+ r = WRAP(snd_config_search)(lconf, node_name, &pcm); - if (r < 0) { - break; - } -@@ -572,7 +621,7 @@ get_slave_pcm_node(snd_config_t * lconf, snd_config_t * root_pcm) - } while (0); - - if (slave_def) { -- snd_config_delete(slave_def); -+ WRAP(snd_config_delete)(slave_def); - } - - return NULL; -@@ -595,22 +644,22 @@ init_local_config_with_workaround(char const * pcm_name) - - lconf = NULL; - -- if (snd_config == NULL) { -+ if (*WRAP(snd_config) == NULL) { - return NULL; - } - -- r = snd_config_copy(&lconf, snd_config); -+ r = WRAP(snd_config_copy)(&lconf, *WRAP(snd_config)); - if (r < 0) { - return NULL; - } - - do { -- r = snd_config_search_definition(lconf, "pcm", pcm_name, &pcm_node); -+ r = WRAP(snd_config_search_definition)(lconf, "pcm", pcm_name, &pcm_node); - if (r < 0) { - break; - } - -- r = snd_config_get_id(pcm_node, &string); -+ r = WRAP(snd_config_get_id)(pcm_node, &string); - if (r < 0) { - break; - } -@@ -619,7 +668,7 @@ init_local_config_with_workaround(char const * pcm_name) - if (r < 0 || r > (int) sizeof(node_name)) { - break; - } -- r = snd_config_search(lconf, node_name, &pcm_node); -+ r = WRAP(snd_config_search)(lconf, node_name, &pcm_node); - if (r < 0) { - break; - } -@@ -630,12 +679,12 @@ init_local_config_with_workaround(char const * pcm_name) - } - - /* Fetch the PCM node's type, and bail out if it's not the PulseAudio plugin. */ -- r = snd_config_search(pcm_node, "type", &node); -+ r = WRAP(snd_config_search)(pcm_node, "type", &node); - if (r < 0) { - break; - } - -- r = snd_config_get_string(node, &string); -+ r = WRAP(snd_config_get_string)(node, &string); - if (r < 0) { - break; - } -@@ -646,18 +695,18 @@ init_local_config_with_workaround(char const * pcm_name) - - /* Don't clobber an explicit existing handle_underrun value, set it only - if it doesn't already exist. */ -- r = snd_config_search(pcm_node, "handle_underrun", &node); -+ r = WRAP(snd_config_search)(pcm_node, "handle_underrun", &node); - if (r != -ENOENT) { - break; - } - - /* Disable pcm_pulse's asynchronous underrun handling. */ -- r = snd_config_imake_integer(&node, "handle_underrun", 0); -+ r = WRAP(snd_config_imake_integer)(&node, "handle_underrun", 0); - if (r < 0) { - break; - } - -- r = snd_config_add(pcm_node, node); -+ r = WRAP(snd_config_add)(pcm_node, node); - if (r < 0) { - break; - } -@@ -665,7 +714,7 @@ init_local_config_with_workaround(char const * pcm_name) - return lconf; - } while (0); - -- snd_config_delete(lconf); -+ WRAP(snd_config_delete)(lconf); - - return NULL; - } -@@ -677,9 +726,9 @@ alsa_locked_pcm_open(snd_pcm_t ** pcm, char const * pcm_name, snd_pcm_stream_t s - - pthread_mutex_lock(&cubeb_alsa_mutex); - if (local_config) { -- r = snd_pcm_open_lconf(pcm, pcm_name, stream, SND_PCM_NONBLOCK, local_config); -+ r = WRAP(snd_pcm_open_lconf)(pcm, pcm_name, stream, SND_PCM_NONBLOCK, local_config); - } else { -- r = snd_pcm_open(pcm, pcm_name, stream, SND_PCM_NONBLOCK); -+ r = WRAP(snd_pcm_open)(pcm, pcm_name, stream, SND_PCM_NONBLOCK); - } - pthread_mutex_unlock(&cubeb_alsa_mutex); - -@@ -692,7 +741,7 @@ alsa_locked_pcm_close(snd_pcm_t * pcm) - int r; - - pthread_mutex_lock(&cubeb_alsa_mutex); -- r = snd_pcm_close(pcm); -+ r = WRAP(snd_pcm_close)(pcm); - pthread_mutex_unlock(&cubeb_alsa_mutex); - - return r; -@@ -755,12 +804,65 @@ alsa_init(cubeb ** context, char const * context_name) - pthread_attr_t attr; - snd_pcm_t * dummy; - -+ void * libasound = NULL; -+ -+#ifndef DISABLE_LIBASOUND_DLOPEN -+ libasound = dlopen("libasound.so", RTLD_LAZY); -+ if (!libasound) { -+ return CUBEB_ERROR; -+ } -+ -+#define LOAD(x) do { \ -+ cubeb_##x = dlsym(libasound, #x); \ -+ if (!cubeb_##x) { \ -+ dlclose(libasound); \ -+ return CUBEB_ERROR; \ -+ } \ -+ } while(0) -+ -+ LOAD(snd_config); -+ LOAD(snd_config_add); -+ LOAD(snd_config_copy); -+ LOAD(snd_config_delete); -+ LOAD(snd_config_get_id); -+ LOAD(snd_config_get_string); -+ LOAD(snd_config_imake_integer); -+ LOAD(snd_config_search); -+ LOAD(snd_config_search_definition); -+ LOAD(snd_lib_error_set_handler); -+ LOAD(snd_pcm_avail_update); -+ LOAD(snd_pcm_close); -+ LOAD(snd_pcm_delay); -+ LOAD(snd_pcm_drain); -+ LOAD(snd_pcm_frames_to_bytes); -+ LOAD(snd_pcm_get_params); -+ /* snd_pcm_hw_params_alloca is actually a macro */ -+ /* LOAD(snd_pcm_hw_params_alloca); */ -+ LOAD(snd_pcm_hw_params_sizeof); -+ LOAD(snd_pcm_hw_params_any); -+ LOAD(snd_pcm_hw_params_get_channels_max); -+ LOAD(snd_pcm_hw_params_get_rate); -+ LOAD(snd_pcm_hw_params_set_rate_near); -+ LOAD(snd_pcm_nonblock); -+ LOAD(snd_pcm_open); -+ LOAD(snd_pcm_open_lconf); -+ LOAD(snd_pcm_pause); -+ LOAD(snd_pcm_poll_descriptors); -+ LOAD(snd_pcm_poll_descriptors_count); -+ LOAD(snd_pcm_poll_descriptors_revents); -+ LOAD(snd_pcm_recover); -+ LOAD(snd_pcm_set_params); -+ LOAD(snd_pcm_state); -+ LOAD(snd_pcm_writei); -+ -+#undef LOAD -+#endif - assert(context); - *context = NULL; - - pthread_mutex_lock(&cubeb_alsa_mutex); - if (!cubeb_alsa_error_handler_set) { -- snd_lib_error_set_handler(silent_error_handler); -+ WRAP(snd_lib_error_set_handler)(silent_error_handler); - cubeb_alsa_error_handler_set = 1; - } - pthread_mutex_unlock(&cubeb_alsa_mutex); -@@ -768,6 +870,8 @@ alsa_init(cubeb ** context, char const * context_name) - ctx = calloc(1, sizeof(*ctx)); - assert(ctx); - -+ ctx->libasound = libasound; -+ - ctx->ops = &alsa_ops; - - r = pthread_mutex_init(&ctx->mutex, NULL); -@@ -817,7 +921,7 @@ alsa_init(cubeb ** context, char const * context_name) - config fails with EINVAL, the PA PCM is too old for this workaround. */ - if (r == -EINVAL) { - pthread_mutex_lock(&cubeb_alsa_mutex); -- snd_config_delete(ctx->local_config); -+ WRAP(snd_config_delete)(ctx->local_config); - pthread_mutex_unlock(&cubeb_alsa_mutex); - ctx->local_config = NULL; - } else if (r >= 0) { -@@ -857,9 +961,13 @@ alsa_destroy(cubeb * ctx) - pthread_mutex_destroy(&ctx->mutex); - free(ctx->fds); - -+ if (ctx->libasound) { -+ dlclose(ctx->libasound); -+ } -+ - if (ctx->local_config) { - pthread_mutex_lock(&cubeb_alsa_mutex); -- snd_config_delete(ctx->local_config); -+ WRAP(snd_config_delete)(ctx->local_config); - pthread_mutex_unlock(&cubeb_alsa_mutex); - } - -@@ -939,7 +1047,7 @@ alsa_stream_init_single(cubeb * ctx, cubeb_stream ** stream, char const * stream - return CUBEB_ERROR; - } - -- r = snd_pcm_nonblock(stm->pcm, 1); -+ r = WRAP(snd_pcm_nonblock)(stm->pcm, 1); - assert(r == 0); - - latency_us = latency_frames * 1e6 / stm->params.rate; -@@ -952,7 +1060,7 @@ alsa_stream_init_single(cubeb * ctx, cubeb_stream ** stream, char const * stream - latency_us = latency_us < min_latency ? min_latency: latency_us; - } - -- r = snd_pcm_set_params(stm->pcm, format, SND_PCM_ACCESS_RW_INTERLEAVED, -+ r = WRAP(snd_pcm_set_params)(stm->pcm, format, SND_PCM_ACCESS_RW_INTERLEAVED, - stm->params.channels, stm->params.rate, 1, - latency_us); - if (r < 0) { -@@ -960,20 +1068,20 @@ alsa_stream_init_single(cubeb * ctx, cubeb_stream ** stream, char const * stream - return CUBEB_ERROR_INVALID_FORMAT; - } - -- r = snd_pcm_get_params(stm->pcm, &stm->buffer_size, &period_size); -+ r = WRAP(snd_pcm_get_params)(stm->pcm, &stm->buffer_size, &period_size); - assert(r == 0); - - /* Double internal buffer size to have enough space when waiting for the other side of duplex connection */ - stm->buffer_size *= 2; -- stm->buffer = calloc(1, snd_pcm_frames_to_bytes(stm->pcm, stm->buffer_size)); -+ stm->buffer = calloc(1, WRAP(snd_pcm_frames_to_bytes)(stm->pcm, stm->buffer_size)); - assert(stm->buffer); - -- stm->nfds = snd_pcm_poll_descriptors_count(stm->pcm); -+ stm->nfds = WRAP(snd_pcm_poll_descriptors_count)(stm->pcm); - assert(stm->nfds > 0); - - stm->saved_fds = calloc(stm->nfds, sizeof(struct pollfd)); - assert(stm->saved_fds); -- r = snd_pcm_poll_descriptors(stm->pcm, stm->saved_fds, stm->nfds); -+ r = WRAP(snd_pcm_poll_descriptors)(stm->pcm, stm->saved_fds, stm->nfds); - assert((nfds_t) r == stm->nfds); - - if (alsa_register_stream(ctx, stm) != 0) { -@@ -1048,7 +1156,7 @@ alsa_stream_destroy(cubeb_stream * stm) - pthread_mutex_lock(&stm->mutex); - if (stm->pcm) { - if (stm->state == DRAINING) { -- snd_pcm_drain(stm->pcm); -+ WRAP(snd_pcm_drain)(stm->pcm); - } - alsa_locked_pcm_close(stm->pcm); - stm->pcm = NULL; -@@ -1094,12 +1202,12 @@ alsa_get_max_channel_count(cubeb * ctx, uint32_t * max_channels) - - assert(stm); - -- r = snd_pcm_hw_params_any(stm->pcm, hw_params); -+ r = WRAP(snd_pcm_hw_params_any)(stm->pcm, hw_params); - if (r < 0) { - return CUBEB_ERROR; - } - -- r = snd_pcm_hw_params_get_channels_max(hw_params, max_channels); -+ r = WRAP(snd_pcm_hw_params_get_channels_max)(hw_params, max_channels); - if (r < 0) { - return CUBEB_ERROR; - } -@@ -1120,34 +1228,34 @@ alsa_get_preferred_sample_rate(cubeb * ctx, uint32_t * rate) { - - /* get a pcm, disabling resampling, so we get a rate the - * hardware/dmix/pulse/etc. supports. */ -- r = snd_pcm_open(&pcm, CUBEB_ALSA_PCM_NAME, SND_PCM_STREAM_PLAYBACK, SND_PCM_NO_AUTO_RESAMPLE); -+ r = WRAP(snd_pcm_open)(&pcm, CUBEB_ALSA_PCM_NAME, SND_PCM_STREAM_PLAYBACK, SND_PCM_NO_AUTO_RESAMPLE); - if (r < 0) { - return CUBEB_ERROR; - } - -- r = snd_pcm_hw_params_any(pcm, hw_params); -+ r = WRAP(snd_pcm_hw_params_any)(pcm, hw_params); - if (r < 0) { -- snd_pcm_close(pcm); -+ WRAP(snd_pcm_close)(pcm); - return CUBEB_ERROR; - } - -- r = snd_pcm_hw_params_get_rate(hw_params, rate, &dir); -+ r = WRAP(snd_pcm_hw_params_get_rate)(hw_params, rate, &dir); - if (r >= 0) { - /* There is a default rate: use it. */ -- snd_pcm_close(pcm); -+ WRAP(snd_pcm_close)(pcm); - return CUBEB_OK; - } - - /* Use a common rate, alsa may adjust it based on hw/etc. capabilities. */ - *rate = 44100; - -- r = snd_pcm_hw_params_set_rate_near(pcm, hw_params, rate, NULL); -+ r = WRAP(snd_pcm_hw_params_set_rate_near)(pcm, hw_params, rate, NULL); - if (r < 0) { -- snd_pcm_close(pcm); -+ WRAP(snd_pcm_close)(pcm); - return CUBEB_ERROR; - } - -- snd_pcm_close(pcm); -+ WRAP(snd_pcm_close)(pcm); - - return CUBEB_OK; - } -@@ -1180,10 +1288,10 @@ alsa_stream_start(cubeb_stream * stm) - pthread_mutex_lock(&stm->mutex); - /* Capture pcm must be started after initial setup/recover */ - if (stm->stream_type == SND_PCM_STREAM_CAPTURE && -- snd_pcm_state(stm->pcm) == SND_PCM_STATE_PREPARED) { -- snd_pcm_start(stm->pcm); -+ WRAP(snd_pcm_state)(stm->pcm) == SND_PCM_STATE_PREPARED) { -+ WRAP(snd_pcm_start)(stm->pcm); - } -- snd_pcm_pause(stm->pcm, 0); -+ WRAP(snd_pcm_pause)(stm->pcm, 0); - gettimeofday(&stm->last_activity, NULL); - pthread_mutex_unlock(&stm->mutex); - -@@ -1223,7 +1331,7 @@ alsa_stream_stop(cubeb_stream * stm) - pthread_mutex_unlock(&ctx->mutex); - - pthread_mutex_lock(&stm->mutex); -- snd_pcm_pause(stm->pcm, 1); -+ WRAP(snd_pcm_pause)(stm->pcm, 1); - pthread_mutex_unlock(&stm->mutex); - - return CUBEB_OK; -@@ -1239,8 +1347,8 @@ alsa_stream_get_position(cubeb_stream * stm, uint64_t * position) - pthread_mutex_lock(&stm->mutex); - - delay = -1; -- if (snd_pcm_state(stm->pcm) != SND_PCM_STATE_RUNNING || -- snd_pcm_delay(stm->pcm, &delay) != 0) { -+ if (WRAP(snd_pcm_state)(stm->pcm) != SND_PCM_STATE_RUNNING || -+ WRAP(snd_pcm_delay)(stm->pcm, &delay) != 0) { - *position = stm->last_position; - pthread_mutex_unlock(&stm->mutex); - return CUBEB_OK; -@@ -1265,7 +1373,7 @@ alsa_stream_get_latency(cubeb_stream * stm, uint32_t * latency) - snd_pcm_sframes_t delay; - /* This function returns the delay in frames until a frame written using - snd_pcm_writei is sent to the DAC. The DAC delay should be < 1ms anyways. */ -- if (snd_pcm_delay(stm->pcm, &delay)) { -+ if (WRAP(snd_pcm_delay)(stm->pcm, &delay)) { - return CUBEB_ERROR; - } - -diff --git media/libcubeb/src/cubeb_oss.c media/libcubeb/src/cubeb_oss.c -new file mode 100644 -index 000000000000..7b0b4f37dbe4 ---- /dev/null -+++ media/libcubeb/src/cubeb_oss.c -@@ -0,0 +1,445 @@ -+/* -+ * Copyright © 2014 Mozilla Foundation -+ * -+ * This program is made available under an ISC-style license. See the -+ * accompanying file LICENSE for details. -+ */ -+#if defined(HAVE_SYS_SOUNDCARD_H) -+#include -+#else -+#include -+#endif -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include "cubeb/cubeb.h" -+#include "cubeb-internal.h" -+ -+#ifndef CUBEB_OSS_DEFAULT_OUTPUT -+#define CUBEB_OSS_DEFAULT_OUTPUT "/dev/dsp" -+#endif -+ -+#define OSS_BUFFER_SIZE 1024 -+ -+struct cubeb { -+ struct cubeb_ops const * ops; -+}; -+ -+struct cubeb_stream { -+ cubeb * context; -+ -+ cubeb_data_callback data_callback; -+ cubeb_state_callback state_callback; -+ void * user_ptr; -+ float volume; -+ float panning; -+ -+ pthread_mutex_t state_mutex; -+ pthread_cond_t state_cond; -+ -+ int running; -+ int stopped; -+ int floating; -+ -+ /* These two vars are needed to support old versions of OSS */ -+ unsigned int position_bytes; -+ unsigned int last_position_bytes; -+ -+ uint64_t written_frags; /* The number of fragments written to /dev/dsp */ -+ uint64_t missed_frags; /* fragments output with stopped stream */ -+ -+ cubeb_stream_params params; -+ int fd; -+ pthread_t th; -+}; -+ -+static struct cubeb_ops const oss_ops; -+ -+int oss_init(cubeb ** context, char const * context_name) -+{ -+ cubeb* ctx = (cubeb*)malloc(sizeof(cubeb)); -+ ctx->ops = &oss_ops; -+ *context = ctx; -+ return CUBEB_OK; -+} -+ -+static void oss_destroy(cubeb *ctx) -+{ -+ free(ctx); -+} -+ -+static char const * oss_get_backend_id(cubeb * context) -+{ -+ static char oss_name[] = "oss"; -+ return oss_name; -+} -+ -+static int oss_get_max_channel_count(cubeb * ctx, uint32_t * max_channels) -+{ -+ *max_channels = 2; /* Let's support only stereo for now */ -+ return CUBEB_OK; -+} -+ -+static int oss_get_min_latency(cubeb * context, cubeb_stream_params params, -+ uint32_t * latency_frames) -+{ -+ (void)context; -+ /* 40ms is a big enough number to work ok */ -+ *latency_frames = 40 * params.rate / 1000; -+ return CUBEB_OK; -+} -+ -+static int oss_get_preferred_sample_rate(cubeb *context, uint32_t * rate) -+{ -+ /* 48000 seems a prefered choice for most audio devices -+ * and a good choice for OSS */ -+ *rate = 48000; -+ return CUBEB_OK; -+} -+ -+static void run_state_callback(cubeb_stream *stream, cubeb_state state) -+{ -+ if (stream->state_callback) { -+ stream->state_callback(stream, stream->user_ptr, state); -+ } -+} -+ -+static long run_data_callback(cubeb_stream *stream, void *buffer, long nframes) -+{ -+ long got = 0; -+ pthread_mutex_lock(&stream->state_mutex); -+ if (stream->data_callback && stream->running && !stream->stopped) { -+ pthread_mutex_unlock(&stream->state_mutex); -+ got = stream->data_callback(stream, stream->user_ptr, NULL, buffer, nframes); -+ } else { -+ pthread_mutex_unlock(&stream->state_mutex); -+ } -+ return got; -+} -+ -+static void apply_volume_int(int16_t* buffer, unsigned int n, -+ float volume, float panning) -+{ -+ float left = volume; -+ float right = volume; -+ unsigned int i; -+ int pan[2]; -+ if (panning<0) { -+ right *= (1+panning); -+ } else { -+ left *= (1-panning); -+ } -+ pan[0] = 128.0*left; -+ pan[1] = 128.0*right; -+ for(i=0; irunning) { -+ pthread_mutex_lock(&stream->state_mutex); -+ if (stream->stopped) { -+ pthread_mutex_unlock(&stream->state_mutex); -+ run_state_callback(stream, CUBEB_STATE_STOPPED); -+ pthread_mutex_lock(&stream->state_mutex); -+ while (stream->stopped) { -+ pthread_cond_wait(&stream->state_cond, &stream->state_mutex); -+ } -+ pthread_mutex_unlock(&stream->state_mutex); -+ run_state_callback(stream, CUBEB_STATE_STARTED); -+ continue; -+ } -+ pthread_mutex_unlock(&stream->state_mutex); -+ if (stream->floating) { -+ got = run_data_callback(stream, f_buffer, -+ OSS_BUFFER_SIZE/stream->params.channels); -+ apply_volume_float(f_buffer, got*stream->params.channels, -+ stream->volume, stream->panning); -+ for (i=0; i<((unsigned long)got)*stream->params.channels; i++) { -+ /* Clipping is prefered to overflow */ -+ if(f_buffer[i]>=1.0){ -+ f_buffer[i]=1.0; -+ } -+ if(f_buffer[i]<=-1.0){ -+ f_buffer[i]=-1.0; -+ } -+ /* One might think that multipling by 32767.0 is logical but results in clipping */ -+ buffer[i] = f_buffer[i]*32767.0; -+ } -+ } else { -+ got = run_data_callback(stream, buffer, -+ OSS_BUFFER_SIZE/stream->params.channels); -+ apply_volume_int(buffer, got*stream->params.channels, -+ stream->volume, stream->panning); -+ } -+ if (got<0) { -+ run_state_callback(stream, CUBEB_STATE_ERROR); -+ break; -+ } -+ if (!got) { -+ run_state_callback(stream, CUBEB_STATE_DRAINED); -+ } -+ if (got) { -+ size_t i = 0; -+ size_t s = got*stream->params.channels*sizeof(int16_t); -+ while (i < s) { -+ ssize_t n = write(stream->fd, ((char*)buffer) + i, s - i); -+ if (n<=0) { -+ run_state_callback(stream, CUBEB_STATE_ERROR); -+ break; -+ } -+ i+=n; -+ } -+ stream->written_frags+=got; -+ } -+ } -+ return NULL; -+} -+ -+static void oss_try_set_latency(cubeb_stream* stream, unsigned int latency) -+{ -+ unsigned int latency_bytes, n_frag; -+ int frag; -+ /* fragment size of 1024 is a good choice with good chances to be accepted */ -+ unsigned int frag_log=10; /* 2^frag_log = fragment size */ -+ latency_bytes = -+ latency*stream->params.rate*stream->params.channels*sizeof(uint16_t)/1000; -+ n_frag = latency_bytes>>frag_log; -+ frag = (n_frag<<16) | frag_log; -+ /* Even if this fails we wish to continue, not checking for errors */ -+ ioctl(stream->fd, SNDCTL_DSP_SETFRAGMENT, &frag); -+} -+ -+static int oss_stream_init(cubeb * context, cubeb_stream ** stm, -+ char const * stream_name, -+ cubeb_devid input_device, -+ cubeb_stream_params * input_stream_params, -+ cubeb_devid output_device, -+ cubeb_stream_params * output_stream_params, -+ unsigned int latency, -+ cubeb_data_callback data_callback, -+ cubeb_state_callback state_callback, void * user_ptr) -+{ -+ cubeb_stream* stream = (cubeb_stream*)malloc(sizeof(cubeb_stream)); -+ stream->context = context; -+ stream->data_callback = data_callback; -+ stream->state_callback = state_callback; -+ stream->user_ptr = user_ptr; -+ -+ assert(!input_stream_params && "not supported."); -+ if (input_device || output_device) { -+ /* Device selection not yet implemented. */ -+ return CUBEB_ERROR_DEVICE_UNAVAILABLE; -+ } -+ -+ if ((stream->fd = open(CUBEB_OSS_DEFAULT_OUTPUT, O_WRONLY)) == -1) { -+ free(stream); -+ return CUBEB_ERROR; -+ } -+#define SET(what, to) do { unsigned int i = to; \ -+ int j = ioctl(stream->fd, what, &i); \ -+ if (j == -1 || i != to) { \ -+ close(stream->fd); \ -+ free(stream); \ -+ return CUBEB_ERROR_INVALID_FORMAT; } } while (0) -+ -+ stream->params = *output_stream_params; -+ stream->volume = 1.0; -+ stream->panning = 0.0; -+ -+ oss_try_set_latency(stream, latency); -+ -+ stream->floating = 0; -+ SET(SNDCTL_DSP_CHANNELS, stream->params.channels); -+ SET(SNDCTL_DSP_SPEED, stream->params.rate); -+ switch (stream->params.format) { -+ case CUBEB_SAMPLE_S16LE: -+ SET(SNDCTL_DSP_SETFMT, AFMT_S16_LE); -+ break; -+ case CUBEB_SAMPLE_S16BE: -+ SET(SNDCTL_DSP_SETFMT, AFMT_S16_BE); -+ break; -+ case CUBEB_SAMPLE_FLOAT32LE: -+ SET(SNDCTL_DSP_SETFMT, AFMT_S16_NE); -+ stream->floating = 1; -+ break; -+ default: -+ close(stream->fd); -+ free(stream); -+ return CUBEB_ERROR; -+ } -+ -+ -+ pthread_mutex_init(&stream->state_mutex, NULL); -+ pthread_cond_init(&stream->state_cond, NULL); -+ -+ stream->running = 1; -+ stream->stopped = 1; -+ stream->position_bytes = 0; -+ stream->last_position_bytes = 0; -+ stream->written_frags = 0; -+ stream->missed_frags = 0; -+ -+ pthread_create(&stream->th, NULL, writer, (void*)stream); -+ -+ *stm = stream; -+ -+ return CUBEB_OK; -+} -+ -+static void oss_stream_destroy(cubeb_stream * stream) -+{ -+ pthread_mutex_lock(&stream->state_mutex); -+ -+ stream->running = 0; -+ stream->stopped = 0; -+ pthread_cond_signal(&stream->state_cond); -+ -+ pthread_mutex_unlock(&stream->state_mutex); -+ -+ pthread_join(stream->th, NULL); -+ -+ pthread_mutex_destroy(&stream->state_mutex); -+ pthread_cond_destroy(&stream->state_cond); -+ close(stream->fd); -+ free(stream); -+} -+ -+static int oss_stream_get_latency(cubeb_stream * stream, uint32_t * latency) -+{ -+ if (ioctl(stream->fd, SNDCTL_DSP_GETODELAY, latency)==-1) { -+ return CUBEB_ERROR; -+ } -+ /* Convert latency from bytes to frames */ -+ *latency /= stream->params.channels*sizeof(int16_t); -+ return CUBEB_OK; -+} -+ -+ -+static int oss_stream_current_optr(cubeb_stream * stream, uint64_t * position) -+{ -+ count_info ci; -+ /* Unfortunately, this ioctl is only available in OSS 4.x */ -+#ifdef SNDCTL_DSP_CURRENT_OPTR -+ oss_count_t count; -+ if (ioctl(stream->fd, SNDCTL_DSP_CURRENT_OPTR, &count) != -1) { -+ *position = count.samples;// + count.fifo_samples; -+ return CUBEB_OK; -+ } -+#endif -+ /* Fall back to this ioctl in case the previous one fails */ -+ if (ioctl(stream->fd, SNDCTL_DSP_GETOPTR, &ci) == -1) { -+ return CUBEB_ERROR; -+ } -+ /* ci.bytes is only 32 bit and will start to wrap after arithmetic overflow */ -+ stream->position_bytes += ci.bytes - stream->last_position_bytes; -+ stream->last_position_bytes = ci.bytes; -+ *position = stream->position_bytes/stream->params.channels/sizeof(int16_t); -+ return CUBEB_OK; -+} -+ -+static int oss_stream_get_position(cubeb_stream * stream, uint64_t * position) -+{ -+ if ( oss_stream_current_optr(stream, position) == CUBEB_OK ){ -+ *position -= stream->missed_frags; -+ return CUBEB_OK; -+ } -+ /* If no correct method to get position works we resort to this */ -+ *position = stream->written_frags; -+ return CUBEB_OK; -+} -+ -+ -+static int oss_stream_start(cubeb_stream * stream) -+{ -+ pthread_mutex_lock(&stream->state_mutex); -+ if (stream->stopped) { -+ uint64_t ptr; -+ oss_stream_current_optr(stream, &ptr); -+ stream->missed_frags = ptr - stream->written_frags; -+ stream->stopped = 0; -+ pthread_cond_signal(&stream->state_cond); -+ } -+ pthread_mutex_unlock(&stream->state_mutex); -+ return CUBEB_OK; -+} -+ -+static int oss_stream_stop(cubeb_stream * stream) -+{ -+ pthread_mutex_lock(&stream->state_mutex); -+ stream->stopped = 1; -+ pthread_mutex_unlock(&stream->state_mutex); -+ return CUBEB_OK; -+} -+ -+int oss_stream_set_panning(cubeb_stream * stream, float panning) -+{ -+ if (stream->params.channels == 2) { -+ stream->panning=panning; -+ } -+ return CUBEB_OK; -+} -+ -+int oss_stream_set_volume(cubeb_stream * stream, float volume) -+{ -+ stream->volume=volume; -+ return CUBEB_OK; -+} -+ -+static struct cubeb_ops const oss_ops = { -+ .init = oss_init, -+ .get_backend_id = oss_get_backend_id, -+ .get_max_channel_count = oss_get_max_channel_count, -+ .get_min_latency = oss_get_min_latency, -+ .get_preferred_sample_rate = oss_get_preferred_sample_rate, -+ .get_preferred_channel_layout = NULL, -+ .destroy = oss_destroy, -+ .enumerate_devices = NULL, -+ .stream_init = oss_stream_init, -+ .stream_destroy = oss_stream_destroy, -+ .stream_start = oss_stream_start, -+ .stream_stop = oss_stream_stop, -+ .stream_get_position = oss_stream_get_position, -+ .stream_get_latency = oss_stream_get_latency, -+ .stream_set_volume = oss_stream_set_volume, -+ .stream_set_panning = oss_stream_set_panning, -+ .stream_get_current_device = NULL, -+ .stream_device_destroy = NULL, -+ .stream_register_device_changed_callback = NULL, -+ .register_device_collection_changed = NULL -+}; -diff --git media/libcubeb/src/moz.build media/libcubeb/src/moz.build -index fc9c79198e30..57d039d5a0f2 100644 ---- media/libcubeb/src/moz.build -+++ media/libcubeb/src/moz.build -@@ -20,6 +20,12 @@ if CONFIG['MOZ_ALSA']: - ] - DEFINES['USE_ALSA'] = True - -+if CONFIG['MOZ_OSS']: -+ SOURCES += [ -+ 'cubeb_oss.c', -+ ] -+ DEFINES['USE_OSS'] = True -+ - if CONFIG['MOZ_PULSEAUDIO'] or CONFIG['MOZ_JACK']: - SOURCES += [ - 'cubeb_resampler.cpp', -@@ -92,6 +98,7 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk': - '%' + '%s/system/media/wilhelm/include' % CONFIG['ANDROID_SOURCE'], - ] - -+CFLAGS += CONFIG['MOZ_OSS_CFLAGS'] - CFLAGS += CONFIG['MOZ_ALSA_CFLAGS'] - CFLAGS += CONFIG['MOZ_PULSEAUDIO_CFLAGS'] - -diff --git media/libcubeb/gtest/moz.build media/libcubeb/gtest/moz.build -index e99968648554..efbbbf779e11 100644 ---- media/libcubeb/gtest/moz.build -+++ media/libcubeb/gtest/moz.build -@@ -71,7 +71,6 @@ elif CONFIG['OS_TARGET'] == 'OpenBSD': - 'sndio', - ] - else: -- OS_LIBS += CONFIG['MOZ_ALSA_LIBS'] - OS_LIBS += CONFIG['MOZ_PULSEAUDIO_LIBS'] - - if CONFIG['GNU_CXX']: -diff --git media/libcubeb/update.sh media/libcubeb/update.sh -index b139b8f497fd..d1f8a223c6d8 100755 ---- media/libcubeb/update.sh -+++ media/libcubeb/update.sh -@@ -20,6 +20,7 @@ cp $1/src/cubeb_log.h src - cp $1/src/cubeb_mixer.cpp src - cp $1/src/cubeb_mixer.h src - cp $1/src/cubeb_opensl.c src -+cp $1/src/cubeb_oss.c src - cp $1/src/cubeb_osx_run_loop.h src - cp $1/src/cubeb_panner.cpp src - cp $1/src/cubeb_panner.h src -diff --git toolkit/library/moz.build toolkit/library/moz.build -index a61c689c83c3..7764df6f8a6b 100644 ---- toolkit/library/moz.build -+++ toolkit/library/moz.build -@@ -242,8 +242,8 @@ if CONFIG['MOZ_SYSTEM_LIBVPX']: - if not CONFIG['MOZ_TREE_PIXMAN']: - OS_LIBS += CONFIG['MOZ_PIXMAN_LIBS'] - --if CONFIG['MOZ_ALSA']: -- OS_LIBS += CONFIG['MOZ_ALSA_LIBS'] -+if CONFIG['MOZ_OSS']: -+ OS_LIBS += CONFIG['MOZ_OSS_LIBS'] - - if CONFIG['HAVE_CLOCK_MONOTONIC']: - OS_LIBS += CONFIG['REALTIME_LIBS'] diff --git a/www/waterfox/files/patch-bug1036008 b/www/waterfox/files/patch-bug1036008 deleted file mode 100644 index 7f50b456c30..00000000000 --- a/www/waterfox/files/patch-bug1036008 +++ /dev/null @@ -1,523 +0,0 @@ -commit ed18f146242b -Author: Masayuki Nakano -Date: Fri Feb 16 15:54:07 2018 +0900 - - Bug 1036008 - Use alternative ASCII capable keyboard layout information to decide keyCode even if the key produces an ASCII punctuation character r=smaug - - Gecko decides keyCode from an ASCII character which is produced by the key - by itself or with Shift on active keyboard layout or alternative ASCII capable - keyboard layout if active keyboard layout isn't ASCII capable. However, we've - ignored alternative ASCII capable keyboard layout's character if both the - key itself and with Shift don't produce ASCII alphabet nor ASCII numeral, - i.e., ASCII punctuation characters are not used in alternative ASCII capable - keyboard layout because of avoiding mapping a keyCode value to 2 or more keys. - - However, setting 0 to keyCode value makes Firefox unusable with some web - applications which are aware of neither KeyboardEvent.key nor - KeyboardEvent.code. So, even if we map same keyCode value to a key, we should - avoid setting keyCode value to 0 as far as possible. - - This patch's approach is, we behave same keyCode value as the alternative ASCII - capable keyCode is selected when computed keyCode value of active keyboard - layout is 0. This means that we will make some language users whose keyboard - layout for their language is not ASCII capable can use global web services - which support US keyboard layout of Firefox since the new keyCode values - are mostly computed with US layout on Windows or actual alternative ASCII - capable keyboard layout on macOS and Linux. In other words, we cannot improve - compatibility with web applications which don't support Firefox by this patch - since our keyCode values are really different from Chrome's. So, unfortunately, - if we'd use exactly same keyCode computation as Chromium, we'd break - compatibility with existing web applications which are aware of Firefox since - it's necessary to check UA name or something before using keyCode values. - - Note that the most important difference between Windows and the others is, - such keyCode value is computed with alternative ASCII capable keyboard - layout on macOS and Linux but only on Windows, it's computed with OEM virtual - keycode. This means that only on Windows, the keyCode value may be different - from actual alternative ASCII capable keyboard layout's keyCode. - - MozReview-Commit-ID: As289r9wp6i - - --HG-- - extra : rebase_source : 66181403dbe8ca8dab893edc8f4eec1991d544d0 ---- - widget/TextEvents.h | 11 ++++++ - widget/WidgetEventImpl.cpp | 36 ++++++++++++++++++++ - widget/cocoa/TextInputHandler.mm | 43 ++++++++++++++---------- - widget/gtk/nsGtkKeyUtils.cpp | 64 ++++++++++++++++++++++++++--------- - widget/gtk/nsGtkKeyUtils.h | 10 ++++++ - widget/tests/test_keycodes.xul | 41 ++++++++++++----------- - widget/windows/KeyboardLayout.cpp | 70 ++++++++++++++++++++++++++++++++++++++- - 7 files changed, 223 insertions(+), 52 deletions(-) - -diff --git widget/TextEvents.h widget/TextEvents.h -index f1a67ecfdf3d..015331e8287d 100644 ---- widget/TextEvents.h -+++ widget/TextEvents.h -@@ -459,6 +459,17 @@ public: - GetDOMCodeName(mCodeNameIndex, aCodeName); - } - -+ /** -+ * GetFallbackKeyCodeOfPunctuationKey() returns a DOM keyCode value for -+ * aCodeNameIndex. This is keyCode value of the key when active keyboard -+ * layout is ANSI (US), JIS or ABNT keyboard layout (the latter 2 layouts -+ * are used only when ANSI doesn't have the key). The result is useful -+ * if the key doesn't produce ASCII character with active keyboard layout -+ * nor with alternative ASCII capable keyboard layout. -+ */ -+ static uint32_t -+ GetFallbackKeyCodeOfPunctuationKey(CodeNameIndex aCodeNameIndex); -+ - bool IsModifierKeyEvent() const - { - return GetModifierForKeyName(mKeyNameIndex) != MODIFIER_NONE; -diff --git widget/WidgetEventImpl.cpp widget/WidgetEventImpl.cpp -index 5415d9889be9..c379e7301b21 100644 ---- widget/WidgetEventImpl.cpp -+++ widget/WidgetEventImpl.cpp -@@ -1183,6 +1183,42 @@ WidgetKeyboardEvent::GetCodeNameIndex(const nsAString& aCodeValue) - return result; - } - -+/* static */ uint32_t -+WidgetKeyboardEvent::GetFallbackKeyCodeOfPunctuationKey( -+ CodeNameIndex aCodeNameIndex) -+{ -+ switch (aCodeNameIndex) { -+ case CODE_NAME_INDEX_Semicolon: // VK_OEM_1 on Windows -+ return nsIDOMKeyEvent::DOM_VK_SEMICOLON; -+ case CODE_NAME_INDEX_Equal: // VK_OEM_PLUS on Windows -+ return nsIDOMKeyEvent::DOM_VK_EQUALS; -+ case CODE_NAME_INDEX_Comma: // VK_OEM_COMMA on Windows -+ return nsIDOMKeyEvent::DOM_VK_COMMA; -+ case CODE_NAME_INDEX_Minus: // VK_OEM_MINUS on Windows -+ return nsIDOMKeyEvent::DOM_VK_HYPHEN_MINUS; -+ case CODE_NAME_INDEX_Period: // VK_OEM_PERIOD on Windows -+ return nsIDOMKeyEvent::DOM_VK_PERIOD; -+ case CODE_NAME_INDEX_Slash: // VK_OEM_2 on Windows -+ return nsIDOMKeyEvent::DOM_VK_SLASH; -+ case CODE_NAME_INDEX_Backquote: // VK_OEM_3 on Windows -+ return nsIDOMKeyEvent::DOM_VK_BACK_QUOTE; -+ case CODE_NAME_INDEX_BracketLeft: // VK_OEM_4 on Windows -+ return nsIDOMKeyEvent::DOM_VK_OPEN_BRACKET; -+ case CODE_NAME_INDEX_Backslash: // VK_OEM_5 on Windows -+ return nsIDOMKeyEvent::DOM_VK_BACK_SLASH; -+ case CODE_NAME_INDEX_BracketRight: // VK_OEM_6 on Windows -+ return nsIDOMKeyEvent::DOM_VK_CLOSE_BRACKET; -+ case CODE_NAME_INDEX_Quote: // VK_OEM_7 on Windows -+ return nsIDOMKeyEvent::DOM_VK_QUOTE; -+ case CODE_NAME_INDEX_IntlBackslash: // VK_OEM_5 on Windows (ABNT, etc) -+ case CODE_NAME_INDEX_IntlYen: // VK_OEM_5 on Windows (JIS) -+ case CODE_NAME_INDEX_IntlRo: // VK_OEM_102 on Windows -+ return nsIDOMKeyEvent::DOM_VK_BACK_SLASH; -+ default: -+ return 0; -+ } -+} -+ - /* static */ const char* - WidgetKeyboardEvent::GetCommandStr(Command aCommand) - { -diff --git widget/cocoa/TextInputHandler.mm widget/cocoa/TextInputHandler.mm -index 437d8222ab3b..106ef0e91f52 100644 ---- widget/cocoa/TextInputHandler.mm -+++ widget/cocoa/TextInputHandler.mm -@@ -1410,25 +1410,34 @@ TISInputSourceWrapper::ComputeGeckoKeyCode(UInt32 aNativeKeyCode, - return keyCode; - } - -- // If this is ASCII capable, give up to compute it. -- if (IsASCIICapable()) { -- return 0; -+ if (!IsASCIICapable()) { -+ // Retry with ASCII capable keyboard layout. -+ TISInputSourceWrapper currentKeyboardLayout; -+ currentKeyboardLayout.InitByCurrentASCIICapableKeyboardLayout(); -+ NS_ENSURE_TRUE(mInputSource != currentKeyboardLayout.mInputSource, 0); -+ keyCode = currentKeyboardLayout.ComputeGeckoKeyCode(aNativeKeyCode, aKbType, -+ aCmdIsPressed); -+ // We've returned 0 for long time if keyCode isn't for an alphabet keys or -+ // a numeric key even in alternative ASCII capable keyboard layout because -+ // we decided that we should avoid setting same keyCode value to 2 or -+ // more keys since active keyboard layout may have a key to input the -+ // punctuation with different key. However, setting keyCode to 0 makes -+ // some web applications which are aware of neither KeyboardEvent.key nor -+ // KeyboardEvent.code not work with Firefox when user selects non-ASCII -+ // capable keyboard layout such as Russian and Thai. So, if alternative -+ // ASCII capable keyboard layout has keyCode value for the key, we should -+ // use it. In other words, this behavior does that non-ASCII capable -+ // keyboard layout overrides some keys' keyCode value only if the key -+ // produces ASCII character by itself or with Shift key. -+ if (keyCode) { -+ return keyCode; -+ } - } - -- // Retry with ASCII capable keyboard layout. -- TISInputSourceWrapper currentKeyboardLayout; -- currentKeyboardLayout.InitByCurrentASCIICapableKeyboardLayout(); -- NS_ENSURE_TRUE(mInputSource != currentKeyboardLayout.mInputSource, 0); -- keyCode = currentKeyboardLayout.ComputeGeckoKeyCode(aNativeKeyCode, aKbType, -- aCmdIsPressed); -- -- // However, if keyCode isn't for an alphabet keys or a numeric key, we should -- // ignore it. For example, comma key of Thai layout is same as close-square- -- // bracket key of US layout and an unicode character key of Thai layout is -- // same as comma key of US layout. If we return NS_VK_COMMA for latter key, -- // web application developers cannot distinguish with the former key. -- return ((keyCode >= NS_VK_A && keyCode <= NS_VK_Z) || -- (keyCode >= NS_VK_0 && keyCode <= NS_VK_9)) ? keyCode : 0; -+ // Otherwise, let's decide keyCode value from the native virtual keycode -+ // value on major keyboard layout. -+ CodeNameIndex code = ComputeGeckoCodeNameIndex(aNativeKeyCode, aKbType); -+ return WidgetKeyboardEvent::GetFallbackKeyCodeOfPunctuationKey(code); - } - - // static -diff --git widget/gtk/nsGtkKeyUtils.cpp widget/gtk/nsGtkKeyUtils.cpp -index bda2c2920248..a336c1ad6c92 100644 ---- widget/gtk/nsGtkKeyUtils.cpp -+++ widget/gtk/nsGtkKeyUtils.cpp -@@ -795,7 +795,7 @@ KeymapWrapper::ComputeDOMKeyCode(const GdkEventKey* aGdkKeyEvent) - - // If the unmodified character is not an ASCII character, that means we - // couldn't find the hint. We should reset it. -- if (unmodifiedChar > 0x7F) { -+ if (!IsPrintableASCIICharacter(unmodifiedChar)) { - unmodifiedChar = 0; - } - -@@ -814,7 +814,7 @@ KeymapWrapper::ComputeDOMKeyCode(const GdkEventKey* aGdkKeyEvent) - - // If the shifted unmodified character isn't an ASCII character, we should - // discard it too. -- if (shiftedChar > 0x7F) { -+ if (!IsPrintableASCIICharacter(shiftedChar)) { - shiftedChar = 0; - } - -@@ -822,14 +822,12 @@ KeymapWrapper::ComputeDOMKeyCode(const GdkEventKey* aGdkKeyEvent) - // look for ASCII alphabet inputtable keyboard layout. If the key - // inputs an ASCII alphabet or an ASCII numeric, we should use it - // for deciding our keyCode. -- // Note that it's important not to use alternative keyboard layout for ASCII -- // alphabet inputabble keyboard layout because the keycode for the key with -- // alternative keyboard layout may conflict with another key on current -- // keyboard layout. -+ uint32_t unmodCharLatin = 0; -+ uint32_t shiftedCharLatin = 0; - if (!keymapWrapper->IsLatinGroup(aGdkKeyEvent->group)) { - gint minGroup = keymapWrapper->GetFirstLatinGroup(); - if (minGroup >= 0) { -- uint32_t unmodCharLatin = -+ unmodCharLatin = - keymapWrapper->GetCharCodeFor(aGdkKeyEvent, baseState, - minGroup); - if (IsBasicLatinLetterOrNumeral(unmodCharLatin)) { -@@ -837,7 +835,13 @@ KeymapWrapper::ComputeDOMKeyCode(const GdkEventKey* aGdkKeyEvent) - // an ASCII numeric, we should use it for the keyCode. - return WidgetUtils::ComputeKeyCodeFromChar(unmodCharLatin); - } -- uint32_t shiftedCharLatin = -+ // If the unmodified character in the alternative ASCII capable -+ // keyboard layout isn't an ASCII character, that means we couldn't -+ // find the hint. We should reset it. -+ if (!IsPrintableASCIICharacter(unmodCharLatin)) { -+ unmodCharLatin = 0; -+ } -+ shiftedCharLatin = - keymapWrapper->GetCharCodeFor(aGdkKeyEvent, shiftState, - minGroup); - if (IsBasicLatinLetterOrNumeral(shiftedCharLatin)) { -@@ -845,16 +849,46 @@ KeymapWrapper::ComputeDOMKeyCode(const GdkEventKey* aGdkKeyEvent) - // numeric, we should use it for the keyCode. - return WidgetUtils::ComputeKeyCodeFromChar(shiftedCharLatin); - } -+ // If the shifted unmodified character in the alternative ASCII -+ // capable keyboard layout isn't an ASCII character, we should -+ // discard it too. -+ if (!IsPrintableASCIICharacter(shiftedCharLatin)) { -+ shiftedCharLatin = 0; -+ } - } - } - -- // If unmodified character is in ASCII range, use it. Otherwise, use -- // shifted character. -- if (!unmodifiedChar && !shiftedChar) { -- return 0; -- } -- return WidgetUtils::ComputeKeyCodeFromChar( -- unmodifiedChar ? unmodifiedChar : shiftedChar); -+ // If the key itself or with Shift state on active keyboard layout produces -+ // an ASCII punctuation character, we should decide keyCode value with it. -+ if (unmodifiedChar || shiftedChar) { -+ return WidgetUtils::ComputeKeyCodeFromChar( -+ unmodifiedChar ? unmodifiedChar : shiftedChar); -+ } -+ -+ // If the key itself or with Shift state on alternative ASCII capable -+ // keyboard layout produces an ASCII punctuation character, we should -+ // decide keyCode value with it. Note that We've returned 0 for long -+ // time if keyCode isn't for an alphabet keys or a numeric key even in -+ // alternative ASCII capable keyboard layout because we decided that we -+ // should avoid setting same keyCode value to 2 or more keys since active -+ // keyboard layout may have a key to input the punctuation with different -+ // key. However, setting keyCode to 0 makes some web applications which -+ // are aware of neither KeyboardEvent.key nor KeyboardEvent.code not work -+ // with Firefox when user selects non-ASCII capable keyboard layout such -+ // as Russian and Thai. So, if alternative ASCII capable keyboard layout -+ // has keyCode value for the key, we should use it. In other words, this -+ // behavior means that non-ASCII capable keyboard layout overrides some -+ // keys' keyCode value only if the key produces ASCII character by itself -+ // or with Shift key. -+ if (unmodCharLatin || shiftedCharLatin) { -+ return WidgetUtils::ComputeKeyCodeFromChar( -+ unmodCharLatin ? unmodCharLatin : shiftedCharLatin); -+ } -+ -+ // Otherwise, let's decide keyCode value from the hardware_keycode -+ // value on major keyboard layout. -+ CodeNameIndex code = ComputeDOMCodeNameIndex(aGdkKeyEvent); -+ return WidgetKeyboardEvent::GetFallbackKeyCodeOfPunctuationKey(code); - } - - KeyNameIndex -diff --git widget/gtk/nsGtkKeyUtils.h widget/gtk/nsGtkKeyUtils.h -index 480d02322752..3dc8a4f6a936 100644 ---- widget/gtk/nsGtkKeyUtils.h -+++ widget/gtk/nsGtkKeyUtils.h -@@ -337,6 +337,16 @@ protected: - */ - static bool IsBasicLatinLetterOrNumeral(uint32_t aCharCode); - -+ /** -+ * IsPrintableASCIICharacter() checks whether the aCharCode is a printable -+ * ASCII character. I.e., returns false if aCharCode is a control -+ * character even in an ASCII character. -+ */ -+ static bool IsPrintableASCIICharacter(uint32_t aCharCode) -+ { -+ return aCharCode >= 0x20 && aCharCode <= 0x7E; -+ } -+ - /** - * GetGDKKeyvalWithoutModifier() returns the keyval for aGdkKeyEvent when - * ignoring the modifier state except NumLock. (NumLock is a key to change -diff --git widget/tests/test_keycodes.xul widget/tests/test_keycodes.xul -index 8a935e74a7f4..db789e8be367 100644 ---- widget/tests/test_keycodes.xul -+++ widget/tests/test_keycodes.xul -@@ -494,7 +494,7 @@ function* runKeyEventTests() - "a", "KeyA", nsIDOMKeyEvent.DOM_VK_A, "a", SHOULD_DELIVER_ALL, KeyboardEvent.DOM_KEY_LOCATION_STANDARD); - yield testKey({layout:KEYBOARD_LAYOUT_GERMAN, keyCode:MAC_VK_ANSI_LeftBracket, - modifiers: {}, chars:"\u00fc", unmodifiedChars:"\u00fc"}, -- "\u00fc", "BracketLeft", 0, "\u00fc", SHOULD_DELIVER_ALL, KeyboardEvent.DOM_KEY_LOCATION_STANDARD); -+ "\u00fc", "BracketLeft", nsIDOMKeyEvent.DOM_VK_OPEN_BRACKET, "\u00fc", SHOULD_DELIVER_ALL, KeyboardEvent.DOM_KEY_LOCATION_STANDARD); - yield testKey({layout:KEYBOARD_LAYOUT_GERMAN, keyCode:MAC_VK_ANSI_Minus, - modifiers: {}, chars:"\u00df", unmodifiedChars:"\u00df"}, - "\u00df", "Minus", nsIDOMKeyEvent.DOM_VK_QUESTION_MARK, "\u00df", SHOULD_DELIVER_ALL, KeyboardEvent.DOM_KEY_LOCATION_STANDARD); -@@ -2737,10 +2737,9 @@ function* runKeyEventTests() - yield testKey({layout:KEYBOARD_LAYOUT_THAI, keyCode:MAC_VK_ANSI_Quote, - modifiers:{}, chars:"\u0E07", unmodifiedChars:"\u0E07"}, - "\u0E07", "Quote", nsIDOMKeyEvent.DOM_VK_PERIOD, "\u0E07", SHOULD_DELIVER_ALL, KeyboardEvent.DOM_KEY_LOCATION_STANDARD); -- // keycode should be zero if the character of the key on the latest ASCII capable keyboard layout isn't for alphabet - yield testKey({layout:KEYBOARD_LAYOUT_THAI, keyCode:MAC_VK_ANSI_Period, - modifiers:{}, chars:"\u0E43", unmodifiedChars:"\u0E43"}, -- "\u0E43", "Period", 0, "\u0E43", SHOULD_DELIVER_ALL, KeyboardEvent.DOM_KEY_LOCATION_STANDARD); -+ "\u0E43", "Period", nsIDOMKeyEvent.DOM_VK_PERIOD, "\u0E43", SHOULD_DELIVER_ALL, KeyboardEvent.DOM_KEY_LOCATION_STANDARD); - // keycode should be DOM_VK_[0-9] if the key on the latest ASCII capable keyboard layout is for numeric - yield testKey({layout:KEYBOARD_LAYOUT_THAI, keyCode:MAC_VK_ANSI_1, - modifiers:{}, chars:"\u0E45", unmodifiedChars:"\u0E45"}, -@@ -4129,12 +4128,14 @@ function* runKeyEventTests() - "\u00E7", "Digit9", nsIDOMKeyEvent.DOM_VK_9, "\u00E7", SHOULD_DELIVER_ALL, KeyboardEvent.DOM_KEY_LOCATION_STANDARD); - - // OEM keys -+ // If the key doesn't cause ASCII character even with or without Shift key, keyCode value should be same as -+ // the key which causes the virtual keycode on ANSI keyboard layout. - yield testKey({layout:KEYBOARD_LAYOUT_FRENCH, keyCode:WIN_VK_OEM_7, - modifiers:{}, chars:"\u00B2"}, -- "\u00B2", "Backquote", 0, "\u00B2", SHOULD_DELIVER_ALL, KeyboardEvent.DOM_KEY_LOCATION_STANDARD); -+ "\u00B2", "Backquote", nsIDOMKeyEvent.DOM_VK_QUOTE, "\u00B2", SHOULD_DELIVER_ALL, KeyboardEvent.DOM_KEY_LOCATION_STANDARD); - yield testKey({layout:KEYBOARD_LAYOUT_FRENCH, keyCode:WIN_VK_OEM_7, - modifiers:{shiftKey:1}, chars:""}, -- "", "Backquote", 0, "", SHOULD_DELIVER_KEYDOWN_KEYUP, KeyboardEvent.DOM_KEY_LOCATION_STANDARD); -+ "", "Backquote", nsIDOMKeyEvent.DOM_VK_QUOTE, "", SHOULD_DELIVER_KEYDOWN_KEYUP, KeyboardEvent.DOM_KEY_LOCATION_STANDARD); - yield testKey({layout:KEYBOARD_LAYOUT_FRENCH, keyCode:WIN_VK_OEM_4, - modifiers:{}, chars:")"}, - ")", "Minus", nsIDOMKeyEvent.DOM_VK_CLOSE_PAREN, ")", SHOULD_DELIVER_ALL, KeyboardEvent.DOM_KEY_LOCATION_STANDARD); -@@ -4205,10 +4206,10 @@ function* runKeyEventTests() - // OEM keys with ShiftLock - yield testKey({layout:KEYBOARD_LAYOUT_FRENCH, keyCode:WIN_VK_OEM_7, - modifiers:{capsLockKey:1}, chars:"\u00B2"}, -- "\u00B2", "Backquote", 0, "\u00B2", SHOULD_DELIVER_ALL, KeyboardEvent.DOM_KEY_LOCATION_STANDARD); -+ "\u00B2", "Backquote", nsIDOMKeyEvent.DOM_VK_QUOTE, "\u00B2", SHOULD_DELIVER_ALL, KeyboardEvent.DOM_KEY_LOCATION_STANDARD); - yield testKey({layout:KEYBOARD_LAYOUT_FRENCH, keyCode:WIN_VK_OEM_7, - modifiers:{capsLockKey:1, shiftKey:1}, chars:""}, -- "", "Backquote", 0, "", SHOULD_DELIVER_KEYDOWN_KEYUP, KeyboardEvent.DOM_KEY_LOCATION_STANDARD); -+ "", "Backquote", nsIDOMKeyEvent.DOM_VK_QUOTE, "", SHOULD_DELIVER_KEYDOWN_KEYUP, KeyboardEvent.DOM_KEY_LOCATION_STANDARD); - yield testKey({layout:KEYBOARD_LAYOUT_FRENCH, keyCode:WIN_VK_OEM_4, - modifiers:{capsLockKey:1}, chars:"\u00B0"}, - "\u00B0", "Minus", nsIDOMKeyEvent.DOM_VK_CLOSE_PAREN, "\u00B0", SHOULD_DELIVER_ALL, KeyboardEvent.DOM_KEY_LOCATION_STANDARD); -@@ -4223,10 +4224,10 @@ function* runKeyEventTests() - "=", "Equal", nsIDOMKeyEvent.DOM_VK_EQUALS, "=", SHOULD_DELIVER_ALL, KeyboardEvent.DOM_KEY_LOCATION_STANDARD); - //yield testKey({layout:KEYBOARD_LAYOUT_FRENCH, keyCode:WIN_VK_OEM_6, - // modifiers:{capsLockKey:1}, chars:""}, -- // "Dead", "BracketLeft", 0, "", SHOULD_DELIVER_KEYDOWN_KEYUP, KeyboardEvent.DOM_KEY_LOCATION_STANDARD); // Dead-key -+ // "Dead", "BracketLeft", nsIDOMKeyEvent.DOM_VK_CLOSE_BRACKET, "", SHOULD_DELIVER_KEYDOWN_KEYUP, KeyboardEvent.DOM_KEY_LOCATION_STANDARD); // Dead-key - //yield testKey({layout:KEYBOARD_LAYOUT_FRENCH, keyCode:WIN_VK_OEM_6, - // modifiers:{capsLockKey:1, shiftKey:1}, chars:""}, -- // ["\u00A8\u00A8", "\u00A8", "\u00A8", "\u00A8"], "BracketLeft", 0, "", SHOULD_DELIVER_KEYDOWN_KEYUP, KeyboardEvent.DOM_KEY_LOCATION_STANDARD); // Dead-key -+ // ["\u00A8\u00A8", "\u00A8", "\u00A8", "\u00A8"], "BracketLeft", nsIDOMKeyEvent.DOM_VK_CLOSE_BRACKET, "", SHOULD_DELIVER_KEYDOWN_KEYUP, KeyboardEvent.DOM_KEY_LOCATION_STANDARD); // Dead-key - yield testKey({layout:KEYBOARD_LAYOUT_FRENCH, keyCode:WIN_VK_OEM_1, - modifiers:{capsLockKey:1}, chars:"\u00A3"}, - "\u00A3", "BracketRight", nsIDOMKeyEvent.DOM_VK_DOLLAR, "\u00A3", SHOULD_DELIVER_ALL, KeyboardEvent.DOM_KEY_LOCATION_STANDARD); -@@ -4496,56 +4497,56 @@ function* runKeyEventTests() - - yield testKey({layout:KEYBOARD_LAYOUT_SPANISH, keyCode:WIN_VK_OEM_7, - modifiers:{}, chars:""}, -- "Dead", "Quote", 0, "", SHOULD_DELIVER_KEYDOWN_KEYUP, KeyboardEvent.DOM_KEY_LOCATION_STANDARD); -+ "Dead", "Quote", nsIDOMKeyEvent.DOM_VK_QUOTE, "", SHOULD_DELIVER_KEYDOWN_KEYUP, KeyboardEvent.DOM_KEY_LOCATION_STANDARD); - yield testKey({layout:KEYBOARD_LAYOUT_SPANISH, keyCode:WIN_VK_OEM_7, - modifiers:{}, chars:"\u00B4\u00B4"}, -- ["\u00B4\u00B4", "\u00B4", "\u00B4", "\u00B4"], "Quote", 0, "\u00B4\u00B4", SHOULD_DELIVER_ALL, KeyboardEvent.DOM_KEY_LOCATION_STANDARD); -+ ["\u00B4\u00B4", "\u00B4", "\u00B4", "\u00B4"], "Quote", nsIDOMKeyEvent.DOM_VK_QUOTE, "\u00B4\u00B4", SHOULD_DELIVER_ALL, KeyboardEvent.DOM_KEY_LOCATION_STANDARD); - - yield testKey({layout:KEYBOARD_LAYOUT_SPANISH, keyCode:WIN_VK_OEM_7, - modifiers:{}, chars:""}, -- "Dead", "Quote", 0, "", SHOULD_DELIVER_KEYDOWN_KEYUP, KeyboardEvent.DOM_KEY_LOCATION_STANDARD); -+ "Dead", "Quote", nsIDOMKeyEvent.DOM_VK_QUOTE, "", SHOULD_DELIVER_KEYDOWN_KEYUP, KeyboardEvent.DOM_KEY_LOCATION_STANDARD); - yield testKey({layout:KEYBOARD_LAYOUT_SPANISH, keyCode:WIN_VK_A, - modifiers:{}, chars:"\u00E1"}, - ["\u00E1", "\u00E1", "a"], "KeyA", nsIDOMKeyEvent.DOM_VK_A, "\u00E1", SHOULD_DELIVER_ALL, KeyboardEvent.DOM_KEY_LOCATION_STANDARD); - - yield testKey({layout:KEYBOARD_LAYOUT_SPANISH, keyCode:WIN_VK_OEM_7, - modifiers:{}, chars:""}, -- "Dead", "Quote", 0, "", SHOULD_DELIVER_KEYDOWN_KEYUP, KeyboardEvent.DOM_KEY_LOCATION_STANDARD); -+ "Dead", "Quote", nsIDOMKeyEvent.DOM_VK_QUOTE, "", SHOULD_DELIVER_KEYDOWN_KEYUP, KeyboardEvent.DOM_KEY_LOCATION_STANDARD); - yield testKey({layout:KEYBOARD_LAYOUT_SPANISH, keyCode:WIN_VK_A, - modifiers:{shiftKey:1}, chars:"\u00C1"}, - ["\u00C1", "\u00C1", "A"], "KeyA", nsIDOMKeyEvent.DOM_VK_A, "\u00C1", SHOULD_DELIVER_ALL, KeyboardEvent.DOM_KEY_LOCATION_STANDARD); - - yield testKey({layout:KEYBOARD_LAYOUT_SPANISH, keyCode:WIN_VK_OEM_7, - modifiers:{}, chars:""}, -- "Dead", "Quote", 0, "", SHOULD_DELIVER_KEYDOWN_KEYUP, KeyboardEvent.DOM_KEY_LOCATION_STANDARD); -+ "Dead", "Quote", nsIDOMKeyEvent.DOM_VK_QUOTE, "", SHOULD_DELIVER_KEYDOWN_KEYUP, KeyboardEvent.DOM_KEY_LOCATION_STANDARD); - yield testKey({layout:KEYBOARD_LAYOUT_SPANISH, keyCode:WIN_VK_Q, - modifiers:{}, chars:"\u00B4q"}, - ["\u00B4q", "\u00B4", "q", "q"], "KeyQ", nsIDOMKeyEvent.DOM_VK_Q, "\u00B4q", SHOULD_DELIVER_ALL, KeyboardEvent.DOM_KEY_LOCATION_STANDARD); - - yield testKey({layout:KEYBOARD_LAYOUT_SPANISH, keyCode:WIN_VK_OEM_7, - modifiers:{shiftKey:1}, chars:""}, -- "Dead", "Quote", 0, "", SHOULD_DELIVER_KEYDOWN_KEYUP, KeyboardEvent.DOM_KEY_LOCATION_STANDARD); -+ "Dead", "Quote", nsIDOMKeyEvent.DOM_VK_QUOTE, "", SHOULD_DELIVER_KEYDOWN_KEYUP, KeyboardEvent.DOM_KEY_LOCATION_STANDARD); - yield testKey({layout:KEYBOARD_LAYOUT_SPANISH, keyCode:WIN_VK_OEM_7, - modifiers:{shiftKey:1}, chars:"\u00A8\u00A8"}, -- ["\u00A8\u00A8", "\u00A8", "\u00A8", "\u00A8"], "Quote", 0, "\u00A8\u00A8", SHOULD_DELIVER_ALL, KeyboardEvent.DOM_KEY_LOCATION_STANDARD); -+ ["\u00A8\u00A8", "\u00A8", "\u00A8", "\u00A8"], "Quote", nsIDOMKeyEvent.DOM_VK_QUOTE, "\u00A8\u00A8", SHOULD_DELIVER_ALL, KeyboardEvent.DOM_KEY_LOCATION_STANDARD); - - yield testKey({layout:KEYBOARD_LAYOUT_SPANISH, keyCode:WIN_VK_OEM_7, - modifiers:{shiftKey:1}, chars:""}, -- "Dead", "Quote", 0, "", SHOULD_DELIVER_KEYDOWN_KEYUP, KeyboardEvent.DOM_KEY_LOCATION_STANDARD); -+ "Dead", "Quote", nsIDOMKeyEvent.DOM_VK_QUOTE, "", SHOULD_DELIVER_KEYDOWN_KEYUP, KeyboardEvent.DOM_KEY_LOCATION_STANDARD); - yield testKey({layout:KEYBOARD_LAYOUT_SPANISH, keyCode:WIN_VK_A, - modifiers:{shiftKey:1}, chars:"\u00C4"}, - ["\u00C4", "\u00C4", "A"], "KeyA", nsIDOMKeyEvent.DOM_VK_A, "\u00C4", SHOULD_DELIVER_ALL, KeyboardEvent.DOM_KEY_LOCATION_STANDARD); - - yield testKey({layout:KEYBOARD_LAYOUT_SPANISH, keyCode:WIN_VK_OEM_7, - modifiers:{shiftKey:1}, chars:""}, -- "Dead", "Quote", 0, "", SHOULD_DELIVER_KEYDOWN_KEYUP, KeyboardEvent.DOM_KEY_LOCATION_STANDARD); -+ "Dead", "Quote", nsIDOMKeyEvent.DOM_VK_QUOTE, "", SHOULD_DELIVER_KEYDOWN_KEYUP, KeyboardEvent.DOM_KEY_LOCATION_STANDARD); - yield testKey({layout:KEYBOARD_LAYOUT_SPANISH, keyCode:WIN_VK_A, - modifiers:{}, chars:"\u00E4"}, - ["\u00E4", "\u00E4", "a"], "KeyA", nsIDOMKeyEvent.DOM_VK_A, "\u00E4", SHOULD_DELIVER_ALL, KeyboardEvent.DOM_KEY_LOCATION_STANDARD); - - yield testKey({layout:KEYBOARD_LAYOUT_SPANISH, keyCode:WIN_VK_OEM_7, - modifiers:{shiftKey:1}, chars:""}, -- "Dead", "Quote", 0, "", SHOULD_DELIVER_KEYDOWN_KEYUP, KeyboardEvent.DOM_KEY_LOCATION_STANDARD); -+ "Dead", "Quote", nsIDOMKeyEvent.DOM_VK_QUOTE, "", SHOULD_DELIVER_KEYDOWN_KEYUP, KeyboardEvent.DOM_KEY_LOCATION_STANDARD); - yield testKey({layout:KEYBOARD_LAYOUT_SPANISH, keyCode:WIN_VK_Q, - modifiers:{shiftKey:1}, chars:"\u00A8Q"}, - ["\u00A8Q", "\u00A8", "Q", "Q"], "KeyQ", nsIDOMKeyEvent.DOM_VK_Q, "\u00A8Q", SHOULD_DELIVER_ALL, KeyboardEvent.DOM_KEY_LOCATION_STANDARD); -diff --git widget/windows/KeyboardLayout.cpp widget/windows/KeyboardLayout.cpp -index e29c0b0655d9..947e914e4bef 100644 ---- widget/windows/KeyboardLayout.cpp -+++ widget/windows/KeyboardLayout.cpp -@@ -4721,7 +4721,75 @@ KeyboardLayout::ConvertNativeKeyCodeToDOMKeyCode(UINT aNativeKeyCode) const - uniChars = GetUniCharsAndModifiers(aNativeKeyCode, modKeyState); - if (uniChars.Length() != 1 || - uniChars.CharAt(0) < ' ' || uniChars.CharAt(0) > 0x7F) { -- return 0; -+ // In this case, we've returned 0 in this case for long time because -+ // we decided that we should avoid setting same keyCode value to 2 or -+ // more keys since active keyboard layout may have a key to input the -+ // punctuation with different key. However, setting keyCode to 0 -+ // makes some web applications which are aware of neither -+ // KeyboardEvent.key nor KeyboardEvent.code not work with Firefox -+ // when user selects non-ASCII capable keyboard layout such as -+ // Russian and Thai layout. So, let's decide keyCode value with -+ // major keyboard layout's key which causes the OEM keycode. -+ // Actually, this maps same keyCode value to 2 keys on Russian -+ // keyboard layout. "Period" key causes VK_OEM_PERIOD but inputs -+ // Yu of Cyrillic and "Slash" key causes VK_OEM_2 (same as US -+ // keyboard layout) but inputs "." (period of ASCII). Therefore, -+ // we return DOM_VK_PERIOD which is same as VK_OEM_PERIOD for -+ // "Period" key. On the other hand, we use same keyCode value for -+ // "Slash" key too because it inputs ".". -+ CodeNameIndex code; -+ switch (aNativeKeyCode) { -+ case VK_OEM_1: -+ code = CODE_NAME_INDEX_Semicolon; -+ break; -+ case VK_OEM_PLUS: -+ code = CODE_NAME_INDEX_Equal; -+ break; -+ case VK_OEM_COMMA: -+ code = CODE_NAME_INDEX_Comma; -+ break; -+ case VK_OEM_MINUS: -+ code = CODE_NAME_INDEX_Minus; -+ break; -+ case VK_OEM_PERIOD: -+ code = CODE_NAME_INDEX_Period; -+ break; -+ case VK_OEM_2: -+ code = CODE_NAME_INDEX_Slash; -+ break; -+ case VK_OEM_3: -+ code = CODE_NAME_INDEX_Backquote; -+ break; -+ case VK_OEM_4: -+ code = CODE_NAME_INDEX_BracketLeft; -+ break; -+ case VK_OEM_5: -+ code = CODE_NAME_INDEX_Backslash; -+ break; -+ case VK_OEM_6: -+ code = CODE_NAME_INDEX_BracketRight; -+ break; -+ case VK_OEM_7: -+ code = CODE_NAME_INDEX_Quote; -+ break; -+ case VK_OEM_8: -+ // Use keyCode value for "Backquote" key on UK keyboard layout. -+ code = CODE_NAME_INDEX_Backquote; -+ break; -+ case VK_OEM_102: -+ // Use keyCode value for "IntlBackslash" key. -+ code = CODE_NAME_INDEX_IntlBackslash; -+ break; -+ case VK_ABNT_C1: // "/" of ABNT. -+ // Use keyCode value for "IntlBackslash" key on ABNT keyboard -+ // layout. -+ code = CODE_NAME_INDEX_IntlBackslash; -+ break; -+ default: -+ MOZ_ASSERT_UNREACHABLE("Handle all OEM keycode values"); -+ return 0; -+ } -+ return WidgetKeyboardEvent::GetFallbackKeyCodeOfPunctuationKey(code); - } - } - return WidgetUtils::ComputeKeyCodeFromChar(uniChars.CharAt(0)); diff --git a/www/waterfox/files/patch-bug1134077 b/www/waterfox/files/patch-bug1134077 deleted file mode 100644 index ba8b29523d6..00000000000 --- a/www/waterfox/files/patch-bug1134077 +++ /dev/null @@ -1,65 +0,0 @@ -commit a67756af6ac4 -Author: decltype -Date: Fri Feb 2 18:39:37 2018 +0100 - - Bug 1134077 - X11: Set EWMH property to keep top-level nsWindows composited. r=karlt - - Some compositors such as GNOME mutter use heuristics to unredirect fullscreen - windows in an effort to reduce output latency. This works fine for applications - that take the proper steps to ensure all framebuffer updates happen in the - vblank interval. Since this is not currently the case for Firefox, bypassing - the compositor will lead to frame tearing. - - Set _NET_WM_BYPASS_COMPOSITOR to 2 to opt out of fullscreen unredirection. - - MozReview-Commit-ID: 1xW2VAnbiJw - - --HG-- - extra : rebase_source : 77c4ae490413057d8d9dadf9b155c86ddbbcb4b5 ---- - widget/gtk/mozgtk/mozgtk.c | 1 + - widget/gtk/nsWindow.cpp | 19 +++++++++++++++++++ - 2 files changed, 20 insertions(+) - -diff --git widget/gtk/mozgtk/mozgtk.c widget/gtk/mozgtk/mozgtk.c -index a182d9b278e7..023cd192d522 100644 ---- widget/gtk/mozgtk/mozgtk.c -+++ widget/gtk/mozgtk/mozgtk.c -@@ -52,6 +52,7 @@ STUB(gdk_keyval_to_unicode) - STUB(gdk_pango_context_get) - STUB(gdk_pointer_grab) - STUB(gdk_pointer_ungrab) -+STUB(gdk_property_change) - STUB(gdk_property_get) - STUB(gdk_screen_get_default) - STUB(gdk_screen_get_display) -diff --git widget/gtk/nsWindow.cpp widget/gtk/nsWindow.cpp -index 0e75cc8c5968..b59ac05dd3c4 100644 ---- widget/gtk/nsWindow.cpp -+++ widget/gtk/nsWindow.cpp -@@ -3803,6 +3803,25 @@ nsWindow::Create(nsIWidget* aParent, - cairo_region_destroy(region); - } - } -+ -+#ifdef MOZ_X11 -+ // Set window manager hint to keep fullscreen windows composited. -+ // -+ // If the window were to get unredirected, there could be visible -+ // tearing because Gecko does not align its framebuffer updates with -+ // vblank. -+ if (mIsX11Display) { -+ gulong value = 2; // Opt out of unredirection -+ GdkAtom cardinal_atom = gdk_x11_xatom_to_atom(XA_CARDINAL); -+ gdk_property_change(gtk_widget_get_window(mShell), -+ gdk_atom_intern("_NET_WM_BYPASS_COMPOSITOR", FALSE), -+ cardinal_atom, -+ 32, // format -+ GDK_PROP_MODE_REPLACE, -+ (guchar*)&value, -+ 1); -+ } -+#endif - } - break; - diff --git a/www/waterfox/files/patch-bug1144632 b/www/waterfox/files/patch-bug1144632 deleted file mode 100644 index fee10b5db31..00000000000 --- a/www/waterfox/files/patch-bug1144632 +++ /dev/null @@ -1,23 +0,0 @@ -Revert bug 1323303 to unbreak build on big-endian architectures. - -diff --git toolkit/moz.configure toolkit/moz.configure -index 67fcbc39d075..c117fd11a358 100644 ---- toolkit/moz.configure -+++ toolkit/moz.configure -@@ -1032,11 +1032,11 @@ add_old_configure_assignment('NECKO_PROTOCOLS', necko_protocols) - # ============================================================== - option('--disable-skia', help='Disable use of Skia') - --@depends('--disable-skia') --def skia(value): -- if not value: -- die('--disable-skia is not supported anymore') -- else: -+@depends('--disable-skia', target) -+def skia(value, target): -+ if value.origin == 'default' and target.endianness == 'big': -+ return None -+ if value: - return True - - set_config('MOZ_ENABLE_SKIA', skia) diff --git a/www/waterfox/files/patch-bug1186967 b/www/waterfox/files/patch-bug1186967 deleted file mode 100644 index 26d304fbd3e..00000000000 --- a/www/waterfox/files/patch-bug1186967 +++ /dev/null @@ -1,41 +0,0 @@ -commit 64bb4e051b50 -Author: Martin Stransky -Date: Tue Oct 17 09:50:18 2017 +0200 - - Bug 1186967 - ignore double-click on WM without _NET_WM_MOVERESIZE support, r=jhorak - - MozReview-Commit-ID: 2Vs6i5leero - - --HG-- - extra : rebase_source : d8f2bbaf9ef9b2025478f029a68ee7e87e07de79 ---- - widget/gtk/nsWindow.cpp | 16 ++++++++++++++++ - 1 file changed, 16 insertions(+) - -diff --git widget/gtk/nsWindow.cpp widget/gtk/nsWindow.cpp -index eb2f0e5e95cd..955327297ac9 100644 ---- widget/gtk/nsWindow.cpp -+++ widget/gtk/nsWindow.cpp -@@ -6444,6 +6444,22 @@ nsWindow::GetDragInfo(WidgetMouseEvent* aMouseEvent, - return false; - } - -+ if (mIsX11Display) { -+ // Workaround for https://bugzilla.gnome.org/show_bug.cgi?id=789054 -+ // To avoid crashes disable double-click on WM without _NET_WM_MOVERESIZE. -+ // See _should_perform_ewmh_drag() at gdkwindow-x11.c -+ GdkScreen* screen = gdk_window_get_screen(gdk_window); -+ GdkAtom atom = gdk_atom_intern("_NET_WM_MOVERESIZE", FALSE); -+ if (!gdk_x11_screen_supports_net_wm_hint(screen, atom)) { -+ static unsigned int lastTimeStamp = 0; -+ if (lastTimeStamp != aMouseEvent->mTime) { -+ lastTimeStamp = aMouseEvent->mTime; -+ } else { -+ return false; -+ } -+ } -+ } -+ - // FIXME: It would be nice to have the widget position at the time - // of the event, but it's relatively unlikely that the widget has - // moved since the mousedown. (On the other hand, it's quite likely diff --git a/www/waterfox/files/patch-bug1203273 b/www/waterfox/files/patch-bug1203273 deleted file mode 100644 index 31894b5bb01..00000000000 --- a/www/waterfox/files/patch-bug1203273 +++ /dev/null @@ -1,68 +0,0 @@ -commit 18bd60050c9c -Author: Jon Coppeard -Date: Tue Mar 20 10:19:37 2018 +0000 - - Bug 1203273 - Add a canary to check gray buffers are valid. r=sfink, a=RyanVM - - --HG-- - extra : source : b1dacff4b3744f303f04ad9f53c670608af8b17a ---- - js/src/gc/RootMarking.cpp | 23 ++++++++++++++++++++++- - 1 file changed, 22 insertions(+), 1 deletion(-) - -diff --git js/src/gc/RootMarking.cpp js/src/gc/RootMarking.cpp -index 384edb9fdd2a..a5c408b687b9 100644 ---- js/src/gc/RootMarking.cpp -+++ js/src/gc/RootMarking.cpp -@@ -460,6 +460,7 @@ class BufferGrayRootsTracer final : public JS::CallbackTracer - {} - - bool failed() const { return bufferingGrayRootsFailed; } -+ void setFailed() { bufferingGrayRootsFailed = true; } - - #ifdef DEBUG - TracerKind getTracerKind() const override { return TracerKind::GrayBuffering; } -@@ -477,6 +478,9 @@ js::IsBufferGrayRootsTracer(JSTracer* trc) - } - #endif - -+// A canary value used to check the gray buffer contents are valid. -+static Cell* const GrayBufferCanary = reinterpret_cast(0x47726179); // "Gray" -+ - void - js::gc::GCRuntime::bufferGrayRoots() - { -@@ -490,6 +494,12 @@ js::gc::GCRuntime::bufferGrayRoots() - if (JSTraceDataOp op = grayRootTracer.op) - (*op)(&grayBufferer, grayRootTracer.data); - -+ // Push a canary value onto the end of the list. -+ for (GCZonesIter zone(rt); !zone.done(); zone.next()) { -+ if (!zone->gcGrayRoots().empty() && !zone->gcGrayRoots().append(GrayBufferCanary)) -+ grayBufferer.setFailed(); -+ } -+ - // Propagate the failure flag from the marker to the runtime. - if (grayBufferer.failed()) { - grayBufferState = GrayBufferState::Failed; -@@ -531,8 +541,19 @@ GCRuntime::markBufferedGrayRoots(JS::Zone* zone) - MOZ_ASSERT(grayBufferState == GrayBufferState::Okay); - MOZ_ASSERT(zone->isGCMarkingGray() || zone->isGCCompacting()); - -- for (auto cell : zone->gcGrayRoots()) -+ auto& roots = zone->gcGrayRoots(); -+ if (roots.empty()) -+ return; -+ -+ // Check for and remove canary value. -+ MOZ_RELEASE_ASSERT(roots.length() > 1); -+ MOZ_RELEASE_ASSERT(roots.back() == GrayBufferCanary); -+ roots.popBack(); -+ -+ for (auto cell : zone->gcGrayRoots()) { -+ MOZ_ASSERT(IsCellPointerValid(cell)); - TraceManuallyBarrieredGenericPointerEdge(&marker, &cell, "buffered gray root"); -+ } - } - - void diff --git a/www/waterfox/files/patch-bug1231203 b/www/waterfox/files/patch-bug1231203 deleted file mode 100644 index 7ce1d4e7432..00000000000 --- a/www/waterfox/files/patch-bug1231203 +++ /dev/null @@ -1,203 +0,0 @@ -commit ef357e507dd1 -Author: David Keeler -Date: Thu Feb 8 17:16:03 2018 -0800 - - bug 1231203 - ensure OCSP responses to requests from private contexts aren't cached on disk r=jcj a=ritu - - MozReview-Commit-ID: 374f7hERLee - - --HG-- - extra : source : ee10aee44d26bf6eb3ddc5f54ddbbbb4fdeb4b0d ---- - security/manager/ssl/nsNSSCallbacks.cpp | 12 ++- - security/manager/ssl/tests/unit/head_psm.js | 8 +- - .../ssl/tests/unit/test_ocsp_private_caching.js | 112 +++++++++++++++++++++ - security/manager/ssl/tests/unit/xpcshell.ini | 2 + - 4 files changed, 130 insertions(+), 4 deletions(-) - -diff --git security/manager/ssl/nsNSSCallbacks.cpp security/manager/ssl/nsNSSCallbacks.cpp -index 7288a7f2c725..d3b973362ab1 100644 ---- security/manager/ssl/nsNSSCallbacks.cpp -+++ security/manager/ssl/nsNSSCallbacks.cpp -@@ -119,13 +119,19 @@ nsHTTPDownloadEvent::Run() - chan->SetLoadFlags(nsIRequest::LOAD_ANONYMOUS | - nsIChannel::LOAD_BYPASS_SERVICE_WORKER); - -- // For OCSP requests, only the first party domain aspect of origin attributes -- // is used. This means that OCSP requests are shared across different -- // containers. -+ // For OCSP requests, only the first party domain and private browsing id -+ // aspects of origin attributes are used. This means that: -+ // a) if first party isolation is enabled, OCSP requests will be isolated -+ // according to the first party domain of the original https request -+ // b) OCSP requests are shared across different containers as long as first -+ // party isolation is not enabled and none of the containers are in private -+ // browsing mode. - if (mRequestSession->mOriginAttributes != OriginAttributes()) { - OriginAttributes attrs; - attrs.mFirstPartyDomain = - mRequestSession->mOriginAttributes.mFirstPartyDomain; -+ attrs.mPrivateBrowsingId = -+ mRequestSession->mOriginAttributes.mPrivateBrowsingId; - - nsCOMPtr loadInfo = chan->GetLoadInfo(); - if (loadInfo) { -diff --git security/manager/ssl/tests/unit/head_psm.js security/manager/ssl/tests/unit/head_psm.js -index 6e0d41125549..51e2beb7ce1d 100644 ---- security/manager/ssl/tests/unit/head_psm.js -+++ security/manager/ssl/tests/unit/head_psm.js -@@ -609,9 +609,12 @@ function getFailingHttpServer(serverPort, serverIdentities) { - // by which HTTP method the server is expected to be queried. - // expectedResponseTypes is an optional array of OCSP response types to use (see - // GenerateOCSPResponse.cpp). -+// responseHeaderPairs is an optional array of HTTP header (name, value) pairs -+// to set in each response. - function startOCSPResponder(serverPort, identity, nssDBLocation, - expectedCertNames, expectedBasePaths, -- expectedMethods, expectedResponseTypes) { -+ expectedMethods, expectedResponseTypes, -+ responseHeaderPairs = []) { - let ocspResponseGenerationArgs = expectedCertNames.map( - function(expectedNick) { - let responseType = "good"; -@@ -640,6 +643,9 @@ function startOCSPResponder(serverPort, identity, nssDBLocation, - } - aResponse.setStatusLine(aRequest.httpVersion, 200, "OK"); - aResponse.setHeader("Content-Type", "application/ocsp-response"); -+ for (let headerPair of responseHeaderPairs) { -+ aResponse.setHeader(headerPair[0], headerPair[1]); -+ } - aResponse.write(ocspResponses.shift()); - }); - httpServer.identity.setPrimary("http", identity, serverPort); -diff --git security/manager/ssl/tests/unit/test_ocsp_private_caching.js security/manager/ssl/tests/unit/test_ocsp_private_caching.js -new file mode 100644 -index 000000000000..b61252eb6e6f ---- /dev/null -+++ security/manager/ssl/tests/unit/test_ocsp_private_caching.js -@@ -0,0 +1,112 @@ -+// -*- indent-tabs-mode: nil; js-indent-level: 2 -*- -+// 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/. -+ -+"use strict"; -+ -+// In which we connect to a host and encounter OCSP responses with the -+// Cache-Control header set, which Necko will normally cache. We need to ensure -+// that these responses aren't cached to disk when the original https request -+// was in a private context. -+ -+do_get_profile(); // must be called before getting nsIX509CertDB -+const certdb = Cc["@mozilla.org/security/x509certdb;1"] -+ .getService(Ci.nsIX509CertDB); -+ -+const SERVER_PORT = 8888; -+ -+function start_ocsp_responder(expectedCertNames, expectedPaths, -+ expectedMethods) { -+ return startOCSPResponder(SERVER_PORT, "www.example.com", -+ "test_ocsp_fetch_method", expectedCertNames, -+ expectedPaths, expectedMethods); -+} -+ -+function check_cert_err(cert_name, expected_error) { -+ let cert = constructCertFromFile("test_ocsp_fetch_method/" + cert_name + ".pem"); -+ return checkCertErrorGeneric(certdb, cert, expected_error, -+ certificateUsageSSLServer); -+} -+ -+function add_flush_cache() { -+ add_test(() => { -+ // This appears to either fire multiple times or fire once for every -+ // observer that has ever been passed to flush. To prevent multiple calls to -+ // run_next_test, keep track of if this observer has already called it. -+ let observed = false; -+ let observer = { observe: () => { -+ if (!observed) { -+ observed = true; -+ run_next_test(); -+ } -+ } -+ }; -+ Services.cache2.QueryInterface(Ci.nsICacheTesting).flush(observer); -+ }); -+} -+ -+function add_ocsp_necko_cache_test(loadContext, shouldFindEntry) { -+ // Pre-testcase cleanup/setup. -+ add_test(() => { -+ Services.cache2.clear(); -+ run_next_test(); -+ }); -+ add_flush_cache(); -+ -+ let responder; -+ add_test(() => { -+ clearOCSPCache(); -+ clearSessionCache(); -+ responder = startOCSPResponder(SERVER_PORT, "localhost", "ocsp_certs", -+ ["default-ee"], [], [], [], -+ [["Cache-Control", "max-age: 1000"]]); -+ run_next_test(); -+ }); -+ -+ // Prepare a connection that will cause an OCSP request. -+ add_connection_test("ocsp-stapling-none.example.com", PRErrorCodeSuccess, -+ null, null, null, loadContext.originAttributes); -+ -+ add_flush_cache(); -+ -+ // Traverse the cache and ensure the response made it into the cache with the -+ // appropriate properties (private or not private). -+ add_test(() => { -+ let foundEntry = false; -+ let visitor = { -+ onCacheStorageInfo() {}, -+ onCacheEntryInfo(aURI, aIdEnhance, aDataSize, aFetchCount, -+ aLastModifiedTime, aExpirationTime, aPinned, aInfo) { -+ Assert.equal(aURI.spec, "http://localhost:8888/", -+ "expected OCSP request URI should match"); -+ foundEntry = true; -+ }, -+ onCacheEntryVisitCompleted() { -+ Assert.equal(foundEntry, shouldFindEntry, -+ "should only find a cached entry if we're expecting one"); -+ run_next_test(); -+ }, -+ QueryInterface(iid) { -+ if (iid.equals(Ci.nsICacheStorageVisitor)) { -+ return this; -+ } -+ throw Cr.NS_ERROR_NO_INTERFACE; -+ }, -+ }; -+ Services.cache2.asyncVisitAllStorages(visitor, true); -+ }); -+ -+ // Clean up (stop the responder). -+ add_test(() => { -+ responder.stop(run_next_test); -+ }); -+} -+ -+function run_test() { -+ Services.prefs.setIntPref("security.OCSP.enabled", 1); -+ add_tls_server_setup("OCSPStaplingServer", "ocsp_certs"); -+ add_ocsp_necko_cache_test(Services.loadContextInfo.private, false); -+ add_ocsp_necko_cache_test(Services.loadContextInfo.default, true); -+ run_next_test(); -+} -diff --git security/manager/ssl/tests/unit/xpcshell.ini security/manager/ssl/tests/unit/xpcshell.ini -index b85c775514eb..4dbe59ac5e73 100644 ---- security/manager/ssl/tests/unit/xpcshell.ini -+++ security/manager/ssl/tests/unit/xpcshell.ini -@@ -121,6 +121,8 @@ run-sequentially = hardcoded ports - run-sequentially = hardcoded ports - [test_ocsp_must_staple.js] - run-sequentially = hardcoded ports -+[test_ocsp_private_caching.js] -+run-sequentially = hardcoded ports - [test_ocsp_no_hsts_upgrade.js] - run-sequentially = hardcoded ports - [test_ocsp_required.js] diff --git a/www/waterfox/files/patch-bug1246883 b/www/waterfox/files/patch-bug1246883 deleted file mode 100644 index b515debb9f2..00000000000 --- a/www/waterfox/files/patch-bug1246883 +++ /dev/null @@ -1,56 +0,0 @@ -commit b175b27efefd -Author: Mantaroh Yoshinaga -Date: Wed Dec 13 08:58:05 2017 +0900 - - Bug 1246883 - Load UA Stylesheet when printing the SVG document. r=jwatt, a=gchang - - Currently, Gecko load only minimal-xul.css if the document is the SVG[1]. - In the case of printing SVG document, gecko should load ua.css for using style - which related to print. - - This patch will load ua.css when printing the SVG document. - - [1] http://searchfox.org/mozilla-central/rev/67f38de2443e6b613d874fcf4d2cd1f2fc3d5e97/layout/base/nsDocumentViewer.cpp#2472 - - MozReview-Commit-ID: JtdaEvX8QTw - - --HG-- - extra : source : 727a90ad06e715b3a4457b2532e922d22a2469a2 ---- - layout/printing/nsPrintEngine.cpp | 9 +++++++++ - 1 file changed, 9 insertions(+) - -diff --git layout/printing/nsPrintEngine.cpp layout/printing/nsPrintEngine.cpp -index f8d8f1077ba5..3ac2211d159d 100644 ---- layout/printing/nsPrintEngine.cpp -+++ layout/printing/nsPrintEngine.cpp -@@ -75,6 +75,7 @@ static const char kPrintingPromptService[] = "@mozilla.org/embedcomp/printingpro - #include "nsISupportsUtils.h" - #include "nsIScriptContext.h" - #include "nsIDOMDocument.h" -+#include "nsIDocumentObserver.h" - #include "nsISelectionListener.h" - #include "nsISelectionPrivate.h" - #include "nsIDOMRange.h" -@@ -82,6 +83,7 @@ static const char kPrintingPromptService[] = "@mozilla.org/embedcomp/printingpro - #include "nsLayoutCID.h" - #include "nsContentUtils.h" - #include "nsIPresShell.h" -+#include "nsLayoutStylesheetCache.h" - #include "nsLayoutUtils.h" - #include "mozilla/Preferences.h" - -@@ -2267,6 +2269,13 @@ nsPrintEngine::ReflowPrintObject(const UniquePtr& aPO) - - StyleSetHandle styleSet = mDocViewerPrint->CreateStyleSet(aPO->mDocument); - -+ if (aPO->mDocument->IsSVGDocument()) { -+ // The SVG document only loads minimal-xul.css, so it doesn't apply other -+ // styles. We should add ua.css for applying style which related to print. -+ auto cache = nsLayoutStylesheetCache::For(aPO->mDocument->GetStyleBackendType()); -+ styleSet->PrependStyleSheet(SheetType::Agent, cache->UASheet()); -+ } -+ - aPO->mPresShell = aPO->mDocument->CreateShell(aPO->mPresContext, - aPO->mViewManager, styleSet); - if (!aPO->mPresShell) { diff --git a/www/waterfox/files/patch-bug1275062 b/www/waterfox/files/patch-bug1275062 deleted file mode 100644 index e9183ad9a67..00000000000 --- a/www/waterfox/files/patch-bug1275062 +++ /dev/null @@ -1,344 +0,0 @@ -commit 7b030826befa -Author: Andrea Marchesini -Date: Sat Jan 27 13:40:58 2018 +0100 - - Bug 1275062 - Introduce a size check of IPC messages for IndexedDB. r=asuth, a=lizzard - - --HG-- - extra : source : ca73f9471eded208cbf1206f22e0fe9f10550497 ---- - dom/indexedDB/ActorsParent.cpp | 78 +++++++++++++++++++++++++++------- - dom/indexedDB/IndexedDatabase.h | 4 ++ - dom/indexedDB/IndexedDatabaseInlines.h | 14 ++++++ - 3 files changed, 80 insertions(+), 16 deletions(-) - -diff --git dom/indexedDB/ActorsParent.cpp dom/indexedDB/ActorsParent.cpp -index b9eb1744b8b6..aef19c8379be 100644 ---- dom/indexedDB/ActorsParent.cpp -+++ dom/indexedDB/ActorsParent.cpp -@@ -8173,7 +8173,7 @@ protected: - - // Subclasses use this override to set the IPDL response value. - virtual void -- GetResponse(RequestResponse& aResponse) = 0; -+ GetResponse(RequestResponse& aResponse, size_t* aResponseSize) = 0; - - private: - nsresult -@@ -8237,7 +8237,7 @@ private: - DoDatabaseWork(DatabaseConnection* aConnection) override; - - void -- GetResponse(RequestResponse& aResponse) override; -+ GetResponse(RequestResponse& aResponse, size_t* aResponseSize) override; - - void - Cleanup() override; -@@ -8359,7 +8359,7 @@ private: - GetPreprocessParams(PreprocessParams& aParams) override; - - void -- GetResponse(RequestResponse& aResponse) override; -+ GetResponse(RequestResponse& aResponse, size_t* aResponseSize) override; - }; - - class ObjectStoreGetKeyRequestOp final -@@ -8385,7 +8385,7 @@ private: - DoDatabaseWork(DatabaseConnection* aConnection) override; - - void -- GetResponse(RequestResponse& aResponse) override; -+ GetResponse(RequestResponse& aResponse, size_t* aResponseSize) override; - }; - - class ObjectStoreDeleteRequestOp final -@@ -8407,9 +8407,10 @@ private: - DoDatabaseWork(DatabaseConnection* aConnection) override; - - void -- GetResponse(RequestResponse& aResponse) override -+ GetResponse(RequestResponse& aResponse, size_t* aResponseSize) override - { - aResponse = Move(mResponse); -+ *aResponseSize = 0; - } - }; - -@@ -8432,9 +8433,10 @@ private: - DoDatabaseWork(DatabaseConnection* aConnection) override; - - void -- GetResponse(RequestResponse& aResponse) override -+ GetResponse(RequestResponse& aResponse, size_t* aResponseSize) override - { - aResponse = Move(mResponse); -+ *aResponseSize = 0; - } - }; - -@@ -8459,9 +8461,10 @@ private: - DoDatabaseWork(DatabaseConnection* aConnection) override; - - void -- GetResponse(RequestResponse& aResponse) override -+ GetResponse(RequestResponse& aResponse, size_t* aResponseSize) override - { - aResponse = Move(mResponse); -+ *aResponseSize = sizeof(uint64_t); - } - }; - -@@ -8511,7 +8514,7 @@ private: - DoDatabaseWork(DatabaseConnection* aConnection) override; - - void -- GetResponse(RequestResponse& aResponse) override; -+ GetResponse(RequestResponse& aResponse, size_t* aResponseSize) override; - }; - - class IndexGetKeyRequestOp final -@@ -8536,7 +8539,7 @@ private: - DoDatabaseWork(DatabaseConnection* aConnection) override; - - void -- GetResponse(RequestResponse& aResponse) override; -+ GetResponse(RequestResponse& aResponse, size_t* aResponseSize) override; - }; - - class IndexCountRequestOp final -@@ -8561,9 +8564,10 @@ private: - DoDatabaseWork(DatabaseConnection* aConnection) override; - - void -- GetResponse(RequestResponse& aResponse) override -+ GetResponse(RequestResponse& aResponse, size_t* aResponseSize) override - { - aResponse = Move(mResponse); -+ *aResponseSize = sizeof(uint64_t); - } - }; - -@@ -25726,8 +25730,22 @@ NormalTransactionOp::SendSuccessResult() - AssertIsOnOwningThread(); - - if (!IsActorDestroyed()) { -+ static const size_t kMaxIDBMsgOverhead = 1024 * 1024 * 10; // 10MB -+ const uint32_t maximalSizeFromPref = -+ IndexedDatabaseManager::MaxSerializedMsgSize(); -+ MOZ_ASSERT(maximalSizeFromPref > kMaxIDBMsgOverhead); -+ const size_t kMaxMessageSize = maximalSizeFromPref - kMaxIDBMsgOverhead; -+ - RequestResponse response; -- GetResponse(response); -+ size_t responseSize = kMaxMessageSize; -+ GetResponse(response, &responseSize); -+ -+ if (responseSize >= kMaxMessageSize) { -+ nsPrintfCString("The serialized value is too large" -+ " (size=%zu bytes, max=%zu bytes).", -+ responseSize, kMaxMessageSize); -+ return NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR; -+ } - - MOZ_ASSERT(response.type() != RequestResponse::T__None); - -@@ -26387,14 +26405,17 @@ ObjectStoreAddOrPutRequestOp::DoDatabaseWork(DatabaseConnection* aConnection) - } - - void --ObjectStoreAddOrPutRequestOp::GetResponse(RequestResponse& aResponse) -+ObjectStoreAddOrPutRequestOp::GetResponse(RequestResponse& aResponse, -+ size_t* aResponseSize) - { - AssertIsOnOwningThread(); - - if (mOverwrite) { - aResponse = ObjectStorePutResponse(mResponse); -+ *aResponseSize = mResponse.GetBuffer().Length(); - } else { - aResponse = ObjectStoreAddResponse(mResponse); -+ *aResponseSize = mResponse.GetBuffer().Length(); - } - } - -@@ -26688,12 +26709,14 @@ ObjectStoreGetRequestOp::GetPreprocessParams(PreprocessParams& aParams) - } - - void --ObjectStoreGetRequestOp::GetResponse(RequestResponse& aResponse) -+ObjectStoreGetRequestOp::GetResponse(RequestResponse& aResponse, -+ size_t* aResponseSize) - { - MOZ_ASSERT_IF(mLimit, mResponse.Length() <= mLimit); - - if (mGetAll) { - aResponse = ObjectStoreGetAllResponse(); -+ *aResponseSize = 0; - - if (!mResponse.IsEmpty()) { - FallibleTArray fallibleCloneInfos; -@@ -26706,6 +26729,7 @@ ObjectStoreGetRequestOp::GetResponse(RequestResponse& aResponse) - for (uint32_t count = mResponse.Length(), index = 0; - index < count; - index++) { -+ *aResponseSize += mResponse[index].Size(); - nsresult rv = - ConvertResponse(mResponse[index], fallibleCloneInfos[index]); - if (NS_WARN_IF(NS_FAILED(rv))) { -@@ -26724,11 +26748,13 @@ ObjectStoreGetRequestOp::GetResponse(RequestResponse& aResponse) - } - - aResponse = ObjectStoreGetResponse(); -+ *aResponseSize = 0; - - if (!mResponse.IsEmpty()) { - SerializedStructuredCloneReadInfo& serializedInfo = - aResponse.get_ObjectStoreGetResponse().cloneInfo(); - -+ *aResponseSize += mResponse[0].Size(); - nsresult rv = ConvertResponse(mResponse[0], serializedInfo); - if (NS_WARN_IF(NS_FAILED(rv))) { - aResponse = rv; -@@ -26834,25 +26860,33 @@ ObjectStoreGetKeyRequestOp::DoDatabaseWork(DatabaseConnection* aConnection) - } - - void --ObjectStoreGetKeyRequestOp::GetResponse(RequestResponse& aResponse) -+ObjectStoreGetKeyRequestOp::GetResponse(RequestResponse& aResponse, -+ size_t* aResponseSize) - { - MOZ_ASSERT_IF(mLimit, mResponse.Length() <= mLimit); - - if (mGetAll) { - aResponse = ObjectStoreGetAllKeysResponse(); -+ *aResponseSize = 0; - - if (!mResponse.IsEmpty()) { - nsTArray& response = - aResponse.get_ObjectStoreGetAllKeysResponse().keys(); -+ - mResponse.SwapElements(response); -+ for (uint32_t i = 0; i < mResponse.Length(); ++i) { -+ *aResponseSize += mResponse[i].GetBuffer().Length(); -+ } - } - - return; - } - - aResponse = ObjectStoreGetKeyResponse(); -+ *aResponseSize = 0; - - if (!mResponse.IsEmpty()) { -+ *aResponseSize = mResponse[0].GetBuffer().Length(); - aResponse.get_ObjectStoreGetKeyResponse().key() = Move(mResponse[0]); - } - } -@@ -27284,12 +27318,14 @@ IndexGetRequestOp::DoDatabaseWork(DatabaseConnection* aConnection) - } - - void --IndexGetRequestOp::GetResponse(RequestResponse& aResponse) -+IndexGetRequestOp::GetResponse(RequestResponse& aResponse, -+ size_t* aResponseSize) - { - MOZ_ASSERT_IF(!mGetAll, mResponse.Length() <= 1); - - if (mGetAll) { - aResponse = IndexGetAllResponse(); -+ *aResponseSize = 0; - - if (!mResponse.IsEmpty()) { - FallibleTArray fallibleCloneInfos; -@@ -27303,6 +27339,7 @@ IndexGetRequestOp::GetResponse(RequestResponse& aResponse) - index < count; - index++) { - StructuredCloneReadInfo& info = mResponse[index]; -+ *aResponseSize += info.Size(); - - SerializedStructuredCloneReadInfo& serializedInfo = - fallibleCloneInfos[index]; -@@ -27335,9 +27372,11 @@ IndexGetRequestOp::GetResponse(RequestResponse& aResponse) - } - - aResponse = IndexGetResponse(); -+ *aResponseSize = 0; - - if (!mResponse.IsEmpty()) { - StructuredCloneReadInfo& info = mResponse[0]; -+ *aResponseSize += info.Size(); - - SerializedStructuredCloneReadInfo& serializedInfo = - aResponse.get_IndexGetResponse().cloneInfo(); -@@ -27467,23 +27506,30 @@ IndexGetKeyRequestOp::DoDatabaseWork(DatabaseConnection* aConnection) - } - - void --IndexGetKeyRequestOp::GetResponse(RequestResponse& aResponse) -+IndexGetKeyRequestOp::GetResponse(RequestResponse& aResponse, -+ size_t* aResponseSize) - { - MOZ_ASSERT_IF(!mGetAll, mResponse.Length() <= 1); - - if (mGetAll) { - aResponse = IndexGetAllKeysResponse(); -+ *aResponseSize = 0; - - if (!mResponse.IsEmpty()) { - mResponse.SwapElements(aResponse.get_IndexGetAllKeysResponse().keys()); -+ for (uint32_t i = 0; i < mResponse.Length(); ++i) { -+ *aResponseSize += mResponse[i].GetBuffer().Length(); -+ } - } - - return; - } - - aResponse = IndexGetKeyResponse(); -+ *aResponseSize = 0; - - if (!mResponse.IsEmpty()) { -+ *aResponseSize = mResponse[0].GetBuffer().Length(); - aResponse.get_IndexGetKeyResponse().key() = Move(mResponse[0]); - } - } -diff --git dom/indexedDB/IndexedDatabase.h dom/indexedDB/IndexedDatabase.h -index b0c4cb877a9c..9165758bcd62 100644 ---- dom/indexedDB/IndexedDatabase.h -+++ dom/indexedDB/IndexedDatabase.h -@@ -83,6 +83,10 @@ struct StructuredCloneReadInfo - // In IndexedDatabaseInlines.h - inline - MOZ_IMPLICIT StructuredCloneReadInfo(SerializedStructuredCloneReadInfo&& aOther); -+ -+ // In IndexedDatabaseInlines.h -+ inline -+ size_t Size() const; - }; - - } // namespace indexedDB -diff --git dom/indexedDB/IndexedDatabaseInlines.h dom/indexedDB/IndexedDatabaseInlines.h -index 830c2f11009d..48cc4f9b3ced 100644 ---- dom/indexedDB/IndexedDatabaseInlines.h -+++ dom/indexedDB/IndexedDatabaseInlines.h -@@ -99,6 +99,20 @@ StructuredCloneReadInfo::operator=(StructuredCloneReadInfo&& aCloneReadInfo) - return *this; - } - -+inline size_t -+StructuredCloneReadInfo::Size() const -+{ -+ size_t size = mData.Size(); -+ -+ for (uint32_t i = 0, count = mFiles.Length(); i < count; ++i) { -+ // We don't want to calculate the size of files and so on, because are mainly -+ // file descriptors. -+ size += sizeof(uint64_t); -+ } -+ -+ return size; -+} -+ - } // namespace indexedDB - } // namespace dom - } // namespace mozilla diff --git a/www/waterfox/files/patch-bug1288587 b/www/waterfox/files/patch-bug1288587 deleted file mode 100644 index e10ef8537a4..00000000000 --- a/www/waterfox/files/patch-bug1288587 +++ /dev/null @@ -1,67 +0,0 @@ -diff --git a/build/moz.configure/init.configure b/build/moz.configure/init.configure -index 855214a..1e91d51 100644 ---- build/moz.configure/init.configure -+++ build/moz.configure/init.configure -@@ -165,16 +165,17 @@ option(env='PYTHON', nargs=1, help='Python interpreter') - # ============================================================== - @depends('PYTHON', check_build_environment, mozconfig, '--help') - @imports('os') - @imports('sys') - @imports('subprocess') - @imports(_from='mozbuild.configure.util', _import='LineIO') - @imports(_from='mozbuild.virtualenv', _import='VirtualenvManager') - @imports(_from='mozbuild.virtualenv', _import='verify_python_version') -+@imports(_from='__builtin__', _import='KeyError') - @imports('distutils.sysconfig') - def virtualenv_python(env_python, build_env, mozconfig, help): - if help: - return - - python = env_python[0] if env_python else None - - # Ideally we'd rely on the mozconfig injection from mozconfig_options, -@@ -184,16 +185,22 @@ def virtualenv_python(env_python, build_env, mozconfig, help): - if 'PYTHON' in mozconfig['env']['added']: - python = mozconfig['env']['added']['PYTHON'] - elif 'PYTHON' in mozconfig['env']['modified']: - python = mozconfig['env']['modified']['PYTHON'][1] - elif 'PYTHON' in mozconfig['vars']['added']: - python = mozconfig['vars']['added']['PYTHON'] - elif 'PYTHON' in mozconfig['vars']['modified']: - python = mozconfig['vars']['modified']['PYTHON'][1] -+ for i in ('env', 'vars'): -+ for j in ('added', 'modified'): -+ try: -+ del mozconfig[i][j]['PYTHON'] -+ except KeyError: -+ pass - - with LineIO(lambda l: log.error(l)) as out: - verify_python_version(out) - topsrcdir, topobjdir = build_env.topsrcdir, build_env.topobjdir - if topobjdir.endswith('/js/src'): - topobjdir = topobjdir[:-7] - - with LineIO(lambda l: log.info(l)) as out: -@@ -219,17 +226,20 @@ def virtualenv_python(env_python, build_env, mozconfig, help): - log.info('Creating Python environment') - manager.build(python) - - python = normsep(manager.python_path) - - if python != normsep(sys.executable): - log.info('Reexecuting in the virtualenv') - if env_python: -- del os.environ['PYTHON'] -+ try: -+ del os.environ['PYTHON'] -+ except KeyError: -+ pass - # One would prefer to use os.execl, but that's completely borked on - # Windows. - sys.exit(subprocess.call([python] + sys.argv)) - - # We are now in the virtualenv - if not distutils.sysconfig.get_python_lib(): - die('Could not determine python site packages directory') - diff --git a/www/waterfox/files/patch-bug1321069 b/www/waterfox/files/patch-bug1321069 deleted file mode 100644 index 646e530562d..00000000000 --- a/www/waterfox/files/patch-bug1321069 +++ /dev/null @@ -1,100 +0,0 @@ -commit a09c25bcc3b4 -Author: Kartikaya Gupta -Date: Wed May 30 09:49:23 2018 -0400 - - Bug 1321069 - Redirect the end event of a long-tap sequence back to the content window. r=karlt, a=RyanVM - - In the case of a long-tap touch sequence, a new popup window (the - contextmenu) is spawned while the sequence is ongoing. The touch-end of - the sequence ends up getting delivered to the popup window, instead of - the original content window, and that causes the touch-handling - machinery state in the content window to get out of sync with reality. - This patch detects this scenario and redirects the touch events on the - popup window back to the original content window. - - MozReview-Commit-ID: L2vvKLlogRA - - --HG-- - extra : source : 27a160b7025ffaadd7cc1ce326ce8729c2b180a0 ---- - widget/gtk/nsWindow.cpp | 36 +++++++++++++++++++++++++++++++++++- - widget/gtk/nsWindow.h | 3 +++ - 2 files changed, 38 insertions(+), 1 deletion(-) - -diff --git widget/gtk/nsWindow.cpp widget/gtk/nsWindow.cpp -index 54ec8615051f1..18d0ccac4dbd6 100644 ---- widget/gtk/nsWindow.cpp -+++ widget/gtk/nsWindow.cpp -@@ -3455,11 +3455,41 @@ nsWindow::OnDragDataReceivedEvent(GtkWidget *aWidget, - aSelectionData, aInfo, aTime); - } - -+nsWindow* -+nsWindow::GetTransientForWindowIfPopup() -+{ -+ if (mWindowType != eWindowType_popup) { -+ return nullptr; -+ } -+ GtkWindow* toplevel = gtk_window_get_transient_for(GTK_WINDOW(mShell)); -+ if (toplevel) { -+ return get_window_for_gtk_widget(GTK_WIDGET(toplevel)); -+ } -+ return nullptr; -+} -+ -+bool -+nsWindow::IsHandlingTouchSequence(GdkEventSequence* aSequence) -+{ -+ return mHandleTouchEvent && mTouches.Contains(aSequence); -+} -+ - #if GTK_CHECK_VERSION(3,4,0) - gboolean - nsWindow::OnTouchEvent(GdkEventTouch* aEvent) - { - if (!mHandleTouchEvent) { -+ // If a popup window was spawned (e.g. as the result of a long-press) -+ // and touch events got diverted to that window within a touch sequence, -+ // ensure the touch event gets sent to the original window instead. We -+ // keep the checks here very conservative so that we only redirect -+ // events in this specific scenario. -+ nsWindow* targetWindow = GetTransientForWindowIfPopup(); -+ if (targetWindow && -+ targetWindow->IsHandlingTouchSequence(aEvent->sequence)) { -+ return targetWindow->OnTouchEvent(aEvent); -+ } -+ - return FALSE; - } - -@@ -4780,12 +4810,16 @@ nsWindow::GrabPointer(guint32 aTime) - return; - - gint retval; -+ // Note that we need GDK_TOUCH_MASK below to work around a GDK/X11 bug that -+ // causes touch events that would normally be received by this client on -+ // other windows to be discarded during the grab. - retval = gdk_pointer_grab(mGdkWindow, TRUE, - (GdkEventMask)(GDK_BUTTON_PRESS_MASK | - GDK_BUTTON_RELEASE_MASK | - GDK_ENTER_NOTIFY_MASK | - GDK_LEAVE_NOTIFY_MASK | -- GDK_POINTER_MOTION_MASK), -+ GDK_POINTER_MOTION_MASK | -+ GDK_TOUCH_MASK), - (GdkWindow *)nullptr, nullptr, aTime); - - if (retval == GDK_GRAB_NOT_VIEWABLE) { -diff --git widget/gtk/nsWindow.h widget/gtk/nsWindow.h -index c28c1749c76dc..33e8c4db7c1c0 100644 ---- widget/gtk/nsWindow.h -+++ widget/gtk/nsWindow.h -@@ -434,6 +434,8 @@ private: - nsIWidgetListener* GetListener(); - bool IsComposited() const; - -+ nsWindow* GetTransientForWindowIfPopup(); -+ bool IsHandlingTouchSequence(GdkEventSequence* aSequence); - - GtkWidget *mShell; - MozContainer *mContainer; diff --git a/www/waterfox/files/patch-bug1321960 b/www/waterfox/files/patch-bug1321960 deleted file mode 100644 index 410894bfbad..00000000000 --- a/www/waterfox/files/patch-bug1321960 +++ /dev/null @@ -1,134 +0,0 @@ -commit 8721b8f42bc0 -Author: Alexander Surkov -Date: Tue Sep 26 16:25:12 2017 -0400 - - Bug 1321960 - Rename nsIPresShell::mSuppressInterruptibleReflows to mWasLastReflowInterrupted to reflect better its purpose. r=dholbert, a=sledru - - --HG-- - extra : source : c65fce03b9e0a1a7591668f727b846675cffa44a ---- - layout/base/PresShell.cpp | 8 ++++---- - layout/base/nsIPresShell.h | 18 +++++++++++++++++- - layout/base/nsRefreshDriver.cpp | 2 +- - 3 files changed, 22 insertions(+), 6 deletions(-) - -diff --git layout/base/PresShell.cpp layout/base/PresShell.cpp -index 4ca35ffe1466..a1660ac30de7 100644 ---- layout/base/PresShell.cpp -+++ layout/base/PresShell.cpp -@@ -762,7 +762,7 @@ nsIPresShell::nsIPresShell() - , mFrozen(false) - , mIsFirstPaint(false) - , mObservesMutationsForPrint(false) -- , mSuppressInterruptibleReflows(false) -+ , mWasLastReflowInterrupted(false) - , mScrollPositionClampingScrollPortSizeSet(false) - , mNeedLayoutFlush(true) - , mNeedStyleFlush(true) -@@ -4197,7 +4197,7 @@ PresShell::DoFlushPendingNotifications(mozilla::ChangesToFlush aFlush) - // worry about them. They can't be triggered during reflow, so we should - // be good. - -- if (flushType >= (mSuppressInterruptibleReflows -+ if (flushType >= (SuppressInterruptibleReflows() - ? FlushType::Layout - : FlushType::InterruptibleLayout) && - !mIsDestroying) { -@@ -4232,7 +4232,7 @@ PresShell::DoFlushPendingNotifications(mozilla::ChangesToFlush aFlush) - if (!didLayoutFlush && flushType >= FlushType::InterruptibleLayout && - !mIsDestroying) { - // We suppressed this flush either due to it not being safe to flush, -- // or due to mSuppressInterruptibleReflows. Either way, the -+ // or due to SuppressInterruptibleReflows(). Either way, the - // mNeedLayoutFlush flag needs to be re-set. - SetNeedLayoutFlush(); - } -@@ -9484,7 +9484,7 @@ PresShell::DoReflow(nsIFrame* target, bool aInterruptible) - // Any FlushPendingNotifications with interruptible reflows - // should be suppressed now. We don't want to do extra reflow work - // before our reflow event happens. -- mSuppressInterruptibleReflows = true; -+ mWasLastReflowInterrupted = true; - MaybeScheduleReflow(); - } - -diff --git layout/base/nsIPresShell.h layout/base/nsIPresShell.h -index 9f65bad1b4d7..885bc0bc699a 100644 ---- layout/base/nsIPresShell.h -+++ layout/base/nsIPresShell.h -@@ -1581,6 +1581,21 @@ public: - mFontSizeInflationEnabledIsDirty = true; - } - -+ /** -+ * Return true if the most recent interruptible reflow was interrupted. -+ */ -+ bool IsReflowInterrupted() const { -+ return mWasLastReflowInterrupted; -+ } -+ -+ /** -+ * Return true if the the interruptible reflows have to be suppressed. -+ * This may happen only if if the most recent reflow was interrupted. -+ */ -+ bool SuppressInterruptibleReflows() const { -+ return mWasLastReflowInterrupted; -+ } -+ - ////////////////////////////////////////////////////////////////////////////// - // Approximate frame visibility tracking public API. - ////////////////////////////////////////////////////////////////////////////// -@@ -1794,7 +1809,8 @@ protected: - bool mIsFirstPaint : 1; - bool mObservesMutationsForPrint : 1; - -- bool mSuppressInterruptibleReflows : 1; -+ // Whether the most recent interruptible reflow was actually interrupted: -+ bool mWasLastReflowInterrupted : 1; - bool mScrollPositionClampingScrollPortSizeSet : 1; - - // True if a layout flush might not be a no-op -diff --git layout/base/nsRefreshDriver.cpp layout/base/nsRefreshDriver.cpp -index 4dbe56952ccf..4ca4783561c6 100644 ---- layout/base/nsRefreshDriver.cpp -+++ layout/base/nsRefreshDriver.cpp -@@ -1949,7 +1949,7 @@ nsRefreshDriver::Tick(int64_t aNowEpoch, TimeStamp aNowTime) - - nsCOMPtr shellKungFuDeathGrip(shell); - shell->mObservingLayoutFlushes = false; -- shell->mSuppressInterruptibleReflows = false; -+ shell->mWasLastReflowInterrupted = false; - FlushType flushType = HasPendingAnimations(shell) - ? FlushType::Layout - : FlushType::InterruptibleLayout; -commit 5ee10fd6f2e4 -Author: Alexander Surkov -Date: Tue Sep 26 16:27:02 2017 -0400 - - Bug 1321960 - Let an interrupted reflow finish before processing a11y. r=eeejay, f=dholbert, a=sledru - - --HG-- - extra : source : c845865489652eadaa3f9a12736c1db56c0e6f12 ---- - accessible/base/NotificationController.cpp | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -diff --git accessible/base/NotificationController.cpp accessible/base/NotificationController.cpp -index d08500458221..8263c7b54d83 100644 ---- accessible/base/NotificationController.cpp -+++ accessible/base/NotificationController.cpp -@@ -601,9 +601,13 @@ NotificationController::WillRefresh(mozilla::TimeStamp aTime) - if (!mDocument) - return; - -+ // Wait until an update, we have started, or an interruptible reflow is -+ // finished. - if (mObservingState == eRefreshProcessing || -- mObservingState == eRefreshProcessingForUpdate) -+ mObservingState == eRefreshProcessingForUpdate || -+ mPresShell->IsReflowInterrupted()) { - return; -+ } - - // Any generic notifications should be queued if we're processing content - // insertions or generic notifications. diff --git a/www/waterfox/files/patch-bug1324042 b/www/waterfox/files/patch-bug1324042 deleted file mode 100644 index d9edf5e153b..00000000000 --- a/www/waterfox/files/patch-bug1324042 +++ /dev/null @@ -1,33 +0,0 @@ -commit ac0f7d653b1e -Author: Daniel Holbert -Date: Sat Feb 10 08:46:49 2018 -0800 - - Bug 1324042: Fix trimmedOffsets arithmetic in GetRenderedText(). r=mats a=abillings - - MozReview-Commit-ID: H4ngU8Juyln - - --HG-- - extra : source : fbf54020043bd09c162530907b2a1091a10f4f92 ---- - layout/generic/nsTextFrame.cpp | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -diff --git layout/generic/nsTextFrame.cpp layout/generic/nsTextFrame.cpp -index 42891e960eea..f8b49e4d07cf 100644 ---- layout/generic/nsTextFrame.cpp -+++ layout/generic/nsTextFrame.cpp -@@ -10116,9 +10116,13 @@ nsTextFrame::GetRenderedText(uint32_t aStartOffset, - startOffset = aStartOffset; - endOffset = std::min(INT32_MAX, aEndOffset); - } -+ -+ // If startOffset and/or endOffset are inside of trimmedOffsets' range, -+ // then clamp the edges of trimmedOffsets accordingly. -+ int32_t origTrimmedOffsetsEnd = trimmedOffsets.GetEnd(); - trimmedOffsets.mStart = std::max(trimmedOffsets.mStart, - startOffset); -- trimmedOffsets.mLength = std::min(trimmedOffsets.GetEnd(), -+ trimmedOffsets.mLength = std::min(origTrimmedOffsetsEnd, - endOffset) - trimmedOffsets.mStart; - if (trimmedOffsets.mLength <= 0) { - offsetInRenderedString = nextOffsetInRenderedString; diff --git a/www/waterfox/files/patch-bug1325888 b/www/waterfox/files/patch-bug1325888 deleted file mode 100644 index 39cff975859..00000000000 --- a/www/waterfox/files/patch-bug1325888 +++ /dev/null @@ -1,39 +0,0 @@ -commit fb631be6ce75 -Author: DimiL -Date: Wed Nov 1 08:40:00 2017 +0800 - - Bug 1325888 - Clear cached completion result when close safebrowsing database. r=francois - - Safebrowsing testcase will close and then re-open database to simulate firefox restart. - This bug happened when DB service already has a previously cached completion result and then - re-open database. In this scenario, if testcase triggers another the same completion request, - we won't cache it because we thought we have it already (See nsUrlClassifierDBServiceWorker::CacheCompletion). - - This causes a testcase assertion when testcase expects the completion - result should be stored in LookupCache. - - MozReview-Commit-ID: 8o57jHv92OH - - --HG-- - extra : rebase_source : 90861060437d6cef860b85dd669d76e74ceec660 ---- - toolkit/components/url-classifier/nsUrlClassifierDBService.cpp | 6 ++++++ - 1 file changed, 6 insertions(+) - -diff --git toolkit/components/url-classifier/nsUrlClassifierDBService.cpp toolkit/components/url-classifier/nsUrlClassifierDBService.cpp -index e1a1be065aaf..a108812a1792 100644 ---- toolkit/components/url-classifier/nsUrlClassifierDBService.cpp -+++ toolkit/components/url-classifier/nsUrlClassifierDBService.cpp -@@ -812,6 +812,12 @@ nsUrlClassifierDBServiceWorker::CloseDb() - mClassifier = nullptr; - } - -+ // Clear last completion result when close db so we will still cache completion -+ // result next time we re-open it. -+ if (mLastResults) { -+ mLastResults->Clear(); -+ } -+ - LOG(("urlclassifier db closed\n")); - - return NS_OK; diff --git a/www/waterfox/files/patch-bug1331209 b/www/waterfox/files/patch-bug1331209 deleted file mode 100644 index e210d467a5e..00000000000 --- a/www/waterfox/files/patch-bug1331209 +++ /dev/null @@ -1,571 +0,0 @@ -commit b7088851d6e8 -Author: Jan Varga -Date: Sat Nov 4 23:13:20 2017 +0100 - - Bug 1331209 - Part 2: Fix incorrect FailOnNonOwningThread() calls; r=asuth ---- - dom/asmjscache/AsmJSCache.cpp | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git dom/asmjscache/AsmJSCache.cpp dom/asmjscache/AsmJSCache.cpp -index 227bf80f2ac4..ec1e3531fb4f 100644 ---- dom/asmjscache/AsmJSCache.cpp -+++ dom/asmjscache/AsmJSCache.cpp -@@ -560,13 +560,13 @@ private: - // If shutdown just started, the QuotaManager may have been deleted. - QuotaManager* qm = QuotaManager::Get(); - if (!qm) { -- FailOnNonOwningThread(); -+ Fail(); - return; - } - - nsresult rv = qm->IOThread()->Dispatch(this, NS_DISPATCH_NORMAL); - if (NS_FAILED(rv)) { -- FailOnNonOwningThread(); -+ Fail(); - return; - } - } - -commit ea39dafe977a -Author: Jan Varga -Date: Sat Nov 4 23:13:41 2017 +0100 - - Bug 1331209 - Part 3: Allow sending of the __delete__ message in one direction only; r=asuth ---- - dom/asmjscache/AsmJSCache.cpp | 141 +++++++++++++++++++++++------------ - dom/asmjscache/PAsmJSCacheEntry.ipdl | 20 ++++- - 2 files changed, 111 insertions(+), 50 deletions(-) - -diff --git dom/asmjscache/AsmJSCache.cpp dom/asmjscache/AsmJSCache.cpp -index ec1e3531fb4f..2216149cd762 100644 ---- dom/asmjscache/AsmJSCache.cpp -+++ dom/asmjscache/AsmJSCache.cpp -@@ -445,7 +445,6 @@ public: - mWriteParams(aWriteParams), - mState(eInitial), - mResult(JS::AsmJSCache_InternalError), -- mDeleteReceived(false), - mActorDestroyed(false), - mOpened(false) - { -@@ -493,12 +492,17 @@ private: - { - AssertIsOnOwningThread(); - MOZ_ASSERT(mState == eOpened); -+ MOZ_ASSERT(mResult == JS::AsmJSCache_Success); - - mState = eFinished; - - MOZ_ASSERT(mOpened); - - FinishOnOwningThread(); -+ -+ if (!mActorDestroyed) { -+ Unused << Send__delete__(this, mResult); -+ } - } - - // This method is called upon any failure that prevents the eventual opening -@@ -508,6 +512,7 @@ private: - { - AssertIsOnOwningThread(); - MOZ_ASSERT(mState != eFinished); -+ MOZ_ASSERT(mResult != JS::AsmJSCache_Success); - - mState = eFinished; - -@@ -515,7 +520,7 @@ private: - - FinishOnOwningThread(); - -- if (!mDeleteReceived && !mActorDestroyed) { -+ if (!mActorDestroyed) { - Unused << Send__delete__(this, mResult); - } - } -@@ -579,26 +584,6 @@ private: - DirectoryLockFailed() override; - - // IPDL methods. -- mozilla::ipc::IPCResult -- Recv__delete__(const JS::AsmJSCacheResult& aResult) override -- { -- AssertIsOnOwningThread(); -- MOZ_ASSERT(mState != eFinished); -- MOZ_ASSERT(!mDeleteReceived); -- -- mDeleteReceived = true; -- -- if (mOpened) { -- Close(); -- } else { -- Fail(); -- } -- -- MOZ_ASSERT(mState == eFinished); -- -- return IPC_OK(); -- } -- - void - ActorDestroy(ActorDestroyReason why) override - { -@@ -624,17 +609,59 @@ private: - } - - mozilla::ipc::IPCResult -- RecvSelectCacheFileToRead(const uint32_t& aModuleIndex) override -+ RecvSelectCacheFileToRead(const OpenMetadataForReadResponse& aResponse) -+ override - { - AssertIsOnOwningThread(); - MOZ_ASSERT(mState == eWaitingToOpenCacheFileForRead); - MOZ_ASSERT(mOpenMode == eOpenForRead); -+ MOZ_ASSERT(!mOpened); -+ -+ switch (aResponse.type()) { -+ case OpenMetadataForReadResponse::TAsmJSCacheResult: { -+ MOZ_ASSERT(aResponse.get_AsmJSCacheResult() != JS::AsmJSCache_Success); -+ -+ mResult = aResponse.get_AsmJSCacheResult(); -+ -+ // This ParentRunnable can only be held alive by the IPDL. Fail() -+ // clears that last reference. So we need to add a self reference here. -+ RefPtr kungFuDeathGrip = this; -+ -+ Fail(); -+ -+ break; -+ } -+ -+ case OpenMetadataForReadResponse::Tuint32_t: -+ // A cache entry has been selected to open. -+ mModuleIndex = aResponse.get_uint32_t(); -+ -+ mState = eReadyToOpenCacheFileForRead; -+ -+ DispatchToIOThread(); -+ -+ break; - -- // A cache entry has been selected to open. -+ default: -+ MOZ_CRASH("Should never get here!"); -+ } -+ -+ return IPC_OK(); -+ } -+ -+ mozilla::ipc::IPCResult -+ RecvClose() override -+ { -+ AssertIsOnOwningThread(); -+ MOZ_ASSERT(mState == eOpened); - -- mModuleIndex = aModuleIndex; -- mState = eReadyToOpenCacheFileForRead; -- DispatchToIOThread(); -+ // This ParentRunnable can only be held alive by the IPDL. Close() clears -+ // that last reference. So we need to add a self reference here. -+ RefPtr kungFuDeathGrip = this; -+ -+ Close(); -+ -+ MOZ_ASSERT(mState == eFinished); - - return IPC_OK(); - } -@@ -675,7 +702,6 @@ private: - State mState; - JS::AsmJSCacheResult mResult; - -- bool mDeleteReceived; - bool mActorDestroyed; - bool mOpened; - }; -@@ -1021,10 +1047,6 @@ ParentRunnable::Run() - - mState = eOpened; - -- // The entry is now open. -- MOZ_ASSERT(!mOpened); -- mOpened = true; -- - FileDescriptor::PlatformHandleType handle = - FileDescriptor::PlatformHandleType(PR_FileDesc2NativeHandle(mFileDesc)); - if (!SendOnOpenCacheFile(mFileSize, FileDescriptor(handle))) { -@@ -1032,6 +1054,12 @@ ParentRunnable::Run() - return NS_OK; - } - -+ // The entry is now open. -+ MOZ_ASSERT(!mOpened); -+ mOpened = true; -+ -+ mResult = JS::AsmJSCache_Success; -+ - return NS_OK; - } - -@@ -1291,15 +1319,16 @@ private: - MOZ_ASSERT(mState == eOpening); - - uint32_t moduleIndex; -- if (!FindHashMatch(aMetadata, mReadParams, &moduleIndex)) { -- Fail(JS::AsmJSCache_InternalError); -- Send__delete__(this, JS::AsmJSCache_InternalError); -- return IPC_OK(); -+ bool ok; -+ if (FindHashMatch(aMetadata, mReadParams, &moduleIndex)) { -+ ok = SendSelectCacheFileToRead(moduleIndex); -+ } else { -+ ok = SendSelectCacheFileToRead(JS::AsmJSCache_InternalError); - } -- -- if (!SendSelectCacheFileToRead(moduleIndex)) { -+ if (!ok) { - return IPC_FAIL_NO_REASON(this); - } -+ - return IPC_OK(); - } - -@@ -1327,9 +1356,20 @@ private: - Recv__delete__(const JS::AsmJSCacheResult& aResult) override - { - MOZ_ASSERT(NS_IsMainThread()); -- MOZ_ASSERT(mState == eOpening); -+ MOZ_ASSERT(mState == eOpening || mState == eFinishing); -+ MOZ_ASSERT_IF(mState == eOpening, aResult != JS::AsmJSCache_Success); -+ MOZ_ASSERT_IF(mState == eFinishing, aResult == JS::AsmJSCache_Success); - -- Fail(aResult); -+ if (mState == eOpening) { -+ Fail(aResult); -+ } else { -+ // Match the AddRef in BlockUntilOpen(). The IPDL still holds an -+ // outstanding ref which will keep 'this' alive until ActorDestroy() -+ // is executed. -+ Release(); -+ -+ mState = eFinished; -+ } - return IPC_OK(); - } - -@@ -1395,6 +1435,7 @@ private: - eOpening, // Waiting for the parent process to respond - eOpened, // Parent process opened the entry and sent it back - eClosing, // Waiting to be dispatched to the main thread to Send__delete__ -+ eFinishing, // Waiting for the parent process to close - eFinished // Terminal state - }; - State mState; -@@ -1454,28 +1495,32 @@ ChildRunnable::Run() - - // Per FileDescriptorHolder::Finish()'s comment, call before - // releasing the directory lock (which happens in the parent upon receipt -- // of the Send__delete__ message). -+ // of the Close message). - FileDescriptorHolder::Finish(); - - MOZ_ASSERT(mOpened); - mOpened = false; - -- // Match the AddRef in BlockUntilOpen(). The main thread event loop still -- // holds an outstanding ref which will keep 'this' alive until returning to -- // the event loop. -- Release(); -+ if (mActorDestroyed) { -+ // Match the AddRef in BlockUntilOpen(). The main thread event loop -+ // still holds an outstanding ref which will keep 'this' alive until -+ // returning to the event loop. -+ Release(); - -- if (!mActorDestroyed) { -- Unused << Send__delete__(this, JS::AsmJSCache_Success); -+ mState = eFinished; -+ } else { -+ Unused << SendClose(); -+ -+ mState = eFinishing; - } - -- mState = eFinished; - return NS_OK; - } - - case eBackgroundChildPending: - case eOpening: - case eOpened: -+ case eFinishing: - case eFinished: { - MOZ_MAKE_COMPILER_ASSUME_IS_UNREACHABLE("Shouldn't Run() in this state"); - } -diff --git dom/asmjscache/PAsmJSCacheEntry.ipdl dom/asmjscache/PAsmJSCacheEntry.ipdl -index d16c9284ff9d..bb88a25b5615 100644 ---- dom/asmjscache/PAsmJSCacheEntry.ipdl -+++ dom/asmjscache/PAsmJSCacheEntry.ipdl -@@ -11,6 +11,12 @@ namespace mozilla { - namespace dom { - namespace asmjscache { - -+union OpenMetadataForReadResponse -+{ -+ AsmJSCacheResult; -+ uint32_t; -+}; -+ - protocol PAsmJSCacheEntry - { - manager PBackground; -@@ -21,14 +27,24 @@ protocol PAsmJSCacheEntry - child: - async OnOpenMetadataForRead(Metadata metadata); - parent: -- async SelectCacheFileToRead(uint32_t moduleIndex); -+ async SelectCacheFileToRead(OpenMetadataForReadResponse response); - - child: - // Once the cache file has been opened, the child is notified and sent an - // open file descriptor. - async OnOpenCacheFile(int64_t fileSize, FileDescriptor fileDesc); - --both: -+parent: -+ // When the child process is done with the cache entry, the parent process -+ // is notified (via Close). -+ async Close(); -+ -+child: -+ // When there's an error during the opening phase, the child process is -+ // notified (via __delete__) and sent an error result. -+ // When the parent process receives the Close message, it closes the cache -+ // entry on the parent side and the child is notified (via __delete__). -+ // The protocol is destroyed in both cases. - async __delete__(AsmJSCacheResult result); - }; - - -commit 04d80fd8932a -Author: Jan Varga -Date: Sat Nov 4 23:13:51 2017 +0100 - - Bug 1331209 - Part 4: Prevent the state machine from continuing if QM is shutting down or the actor has been destroyed; r=asuth ---- - dom/asmjscache/AsmJSCache.cpp | 97 +++++++++++++++++++++++++++++++++++++------ - 1 file changed, 84 insertions(+), 13 deletions(-) - -diff --git dom/asmjscache/AsmJSCache.cpp dom/asmjscache/AsmJSCache.cpp -index 2216149cd762..7c96bc71ac0a 100644 ---- dom/asmjscache/AsmJSCache.cpp -+++ dom/asmjscache/AsmJSCache.cpp -@@ -443,6 +443,7 @@ public: - mPrincipalInfo(aPrincipalInfo), - mOpenMode(aOpenMode), - mWriteParams(aWriteParams), -+ mOperationMayProceed(true), - mState(eInitial), - mResult(JS::AsmJSCache_InternalError), - mActorDestroyed(false), -@@ -485,6 +486,22 @@ private: - MOZ_ASSERT(!IsOnOwningThread()); - } - -+ bool -+ IsActorDestroyed() const -+ { -+ AssertIsOnOwningThread(); -+ -+ return mActorDestroyed; -+ } -+ -+ // May be called on any thread, but you should call IsActorDestroyed() if -+ // you know you're on the background thread because it is slightly faster. -+ bool -+ OperationMayProceed() const -+ { -+ return mOperationMayProceed; -+ } -+ - // This method is called on the owning thread when the JS engine is finished - // reading/writing the cache entry. - void -@@ -497,6 +514,7 @@ private: - mState = eFinished; - - MOZ_ASSERT(mOpened); -+ mOpened = false; - - FinishOnOwningThread(); - -@@ -562,13 +580,15 @@ private: - { - AssertIsOnOwningThread(); - -- // If shutdown just started, the QuotaManager may have been deleted. -- QuotaManager* qm = QuotaManager::Get(); -- if (!qm) { -+ if (NS_WARN_IF(Client::IsShuttingDownOnBackgroundThread()) || -+ IsActorDestroyed()) { - Fail(); - return; - } - -+ QuotaManager* qm = QuotaManager::Get(); -+ MOZ_ASSERT(qm); -+ - nsresult rv = qm->IOThread()->Dispatch(this, NS_DISPATCH_NORMAL); - if (NS_FAILED(rv)) { - Fail(); -@@ -589,23 +609,30 @@ private: - { - AssertIsOnOwningThread(); - MOZ_ASSERT(!mActorDestroyed); -+ MOZ_ASSERT(mOperationMayProceed); - - mActorDestroyed = true; -+ mOperationMayProceed = false; - -- // Assume ActorDestroy can happen at any time, so probe the current state to -- // determine what needs to happen. -- -- if (mState == eFinished) { -- return; -- } -+ // Assume ActorDestroy can happen at any time, so we can't probe the -+ // current state since mState can be modified on any thread (only one -+ // thread at a time based on the state machine). -+ // However we can use mOpened which is only touched on the owning thread. -+ // If mOpened is true, we can also modify mState since we are guaranteed -+ // that there are no pending runnables which would probe mState to decide -+ // what code needs to run (there shouldn't be any running runnables on -+ // other threads either). - - if (mOpened) { - Close(); -- } else { -- Fail(); -+ -+ MOZ_ASSERT(mState == eFinished); - } - -- MOZ_ASSERT(mState == eFinished); -+ // We don't have to call Fail() if mOpened is not true since it means that -+ // either nothing has been initialized yet, so nothing to cleanup or there -+ // are pending runnables that will detect that the actor has been destroyed -+ // and call Fail(). - } - - mozilla::ipc::IPCResult -@@ -617,6 +644,11 @@ private: - MOZ_ASSERT(mOpenMode == eOpenForRead); - MOZ_ASSERT(!mOpened); - -+ if (NS_WARN_IF(Client::IsShuttingDownOnBackgroundThread())) { -+ Fail(); -+ return IPC_OK(); -+ } -+ - switch (aResponse.type()) { - case OpenMetadataForReadResponse::TAsmJSCacheResult: { - MOZ_ASSERT(aResponse.get_AsmJSCacheResult() != JS::AsmJSCache_Success); -@@ -682,6 +714,8 @@ private: - nsCOMPtr mMetadataFile; - Metadata mMetadata; - -+ Atomic mOperationMayProceed; -+ - // State initialized during eWaitingToOpenCacheFileForRead - unsigned mModuleIndex; - -@@ -942,6 +976,12 @@ ParentRunnable::Run() - case eInitial: { - MOZ_ASSERT(NS_IsMainThread()); - -+ if (NS_WARN_IF(Client::IsShuttingDownOnNonBackgroundThread()) || -+ !OperationMayProceed()) { -+ FailOnNonOwningThread(); -+ return NS_OK; -+ } -+ - rv = InitOnMainThread(); - if (NS_FAILED(rv)) { - FailOnNonOwningThread(); -@@ -957,7 +997,8 @@ ParentRunnable::Run() - case eWaitingToFinishInit: { - AssertIsOnOwningThread(); - -- if (QuotaManager::IsShuttingDown()) { -+ if (NS_WARN_IF(Client::IsShuttingDownOnBackgroundThread()) || -+ IsActorDestroyed()) { - Fail(); - return NS_OK; - } -@@ -976,6 +1017,12 @@ ParentRunnable::Run() - case eWaitingToOpenDirectory: { - AssertIsOnOwningThread(); - -+ if (NS_WARN_IF(Client::IsShuttingDownOnBackgroundThread()) || -+ IsActorDestroyed()) { -+ Fail(); -+ return NS_OK; -+ } -+ - if (NS_WARN_IF(!QuotaManager::Get())) { - Fail(); - return NS_OK; -@@ -988,6 +1035,12 @@ ParentRunnable::Run() - case eReadyToReadMetadata: { - AssertIsOnIOThread(); - -+ if (NS_WARN_IF(Client::IsShuttingDownOnNonBackgroundThread()) || -+ !OperationMayProceed()) { -+ FailOnNonOwningThread(); -+ return NS_OK; -+ } -+ - rv = ReadMetadata(); - if (NS_FAILED(rv)) { - FailOnNonOwningThread(); -@@ -1016,6 +1069,12 @@ ParentRunnable::Run() - AssertIsOnOwningThread(); - MOZ_ASSERT(mOpenMode == eOpenForRead); - -+ if (NS_WARN_IF(Client::IsShuttingDownOnBackgroundThread()) || -+ IsActorDestroyed()) { -+ Fail(); -+ return NS_OK; -+ } -+ - mState = eWaitingToOpenCacheFileForRead; - - // Metadata is now open. -@@ -1031,6 +1090,12 @@ ParentRunnable::Run() - AssertIsOnIOThread(); - MOZ_ASSERT(mOpenMode == eOpenForRead); - -+ if (NS_WARN_IF(Client::IsShuttingDownOnNonBackgroundThread()) || -+ !OperationMayProceed()) { -+ FailOnNonOwningThread(); -+ return NS_OK; -+ } -+ - rv = OpenCacheFileForRead(); - if (NS_FAILED(rv)) { - FailOnNonOwningThread(); -@@ -1045,6 +1110,12 @@ ParentRunnable::Run() - case eSendingCacheFile: { - AssertIsOnOwningThread(); - -+ if (NS_WARN_IF(Client::IsShuttingDownOnBackgroundThread()) || -+ IsActorDestroyed()) { -+ Fail(); -+ return NS_OK; -+ } -+ - mState = eOpened; - - FileDescriptor::PlatformHandleType handle = diff --git a/www/waterfox/files/patch-bug1334465 b/www/waterfox/files/patch-bug1334465 deleted file mode 100644 index 9a5220b1347..00000000000 --- a/www/waterfox/files/patch-bug1334465 +++ /dev/null @@ -1,62 +0,0 @@ -commit 646f99465e4f -Author: Valentin Gosu -Date: Fri Feb 9 13:20:04 2018 +0100 - - Bug 1334465 - Make HttpChannelParent::mIPCClosed atomic r=bagder a=ritu - - MozReview-Commit-ID: 6irCJMAjzjW - - --HG-- - extra : source : bd315ae86709c3459a3dbf0778022ff3b1908723 ---- - netwerk/protocol/http/HttpChannelParent.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git netwerk/protocol/http/HttpChannelParent.h netwerk/protocol/http/HttpChannelParent.h -index 572d7f177d7a..ef4dbd84f792 100644 ---- netwerk/protocol/http/HttpChannelParent.h -+++ netwerk/protocol/http/HttpChannelParent.h -@@ -264,7 +264,7 @@ private: - RefPtr mChannel; - nsCOMPtr mCacheEntry; - nsCOMPtr mAssociatedContentSecurity; -- bool mIPCClosed; // PHttpChannel actor has been Closed() -+ Atomic mIPCClosed; // PHttpChannel actor has been Closed() - - nsCOMPtr mRedirectChannel; - nsCOMPtr mRedirectCallback; -commit a87603550115 -Author: Valentin Gosu -Date: Sun Feb 11 03:51:09 2018 +0100 - - Bug 1334465 - Set mIPCClosed to true before calling SendDeleteSelf in order to avoid race r=bagder a=ritu - - In the previous code, a race condition could cause us to call SendSetPriority() after calling SendDeleteSelf. - - For example: - T1: SendDeleteSelf() - T2: if (!mIPCClosed) SendSetPriority() - T1: mIPCClosed = true - - MozReview-Commit-ID: 3XOwCaphb2o - - --HG-- - extra : source : 4ebdab0e332892378558817e30d0138c95199ce5 ---- - netwerk/protocol/http/HttpChannelParent.cpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git netwerk/protocol/http/HttpChannelParent.cpp netwerk/protocol/http/HttpChannelParent.cpp -index 064c5659e9ed..8ee13c2b5fbd 100644 ---- netwerk/protocol/http/HttpChannelParent.cpp -+++ netwerk/protocol/http/HttpChannelParent.cpp -@@ -2262,8 +2262,8 @@ HttpChannelParent::UpdateAndSerializeSecurityInfo(nsACString& aSerializedSecurit - bool - HttpChannelParent::DoSendDeleteSelf() - { -- bool rv = SendDeleteSelf(); - mIPCClosed = true; -+ bool rv = SendDeleteSelf(); - - CleanupBackgroundChannel(); - diff --git a/www/waterfox/files/patch-bug1334981 b/www/waterfox/files/patch-bug1334981 deleted file mode 100644 index 4c778d4adbf..00000000000 --- a/www/waterfox/files/patch-bug1334981 +++ /dev/null @@ -1,29 +0,0 @@ -commit 57a68dc342dd -Author: Henrik Skupin -Date: Thu Jun 7 15:48:48 2018 +0200 - - Bug 1334981 - Backed out changeset d6ca24ba3673 for regression caused by bug 887718. r=enndeakin, a=RyanVM - - MozReview-Commit-ID: 9hIcRVRseO1 - - --HG-- - extra : source : 1f16a2ff45ab492025e42afb8122f4d52cb24c0b ---- - dom/base/nsFocusManager.cpp | 4 +--- - 1 file changed, 1 insertion(+), 3 deletions(-) - -diff --git dom/base/nsFocusManager.cpp dom/base/nsFocusManager.cpp -index 864c76402cb12..c5758cfabd523 100644 ---- dom/base/nsFocusManager.cpp -+++ dom/base/nsFocusManager.cpp -@@ -742,9 +742,7 @@ nsFocusManager::WindowRaised(mozIDOMWindowProxy* aWindow) - return NS_ERROR_FAILURE; - } - -- if (!sTestMode) { -- baseWindow->SetVisibility(true); -- } -+ baseWindow->SetVisibility(true); - } - - // If this is a parent or single process window, send the activate event. diff --git a/www/waterfox/files/patch-bug1338764 b/www/waterfox/files/patch-bug1338764 deleted file mode 100644 index fcedb824ff6..00000000000 --- a/www/waterfox/files/patch-bug1338764 +++ /dev/null @@ -1,120 +0,0 @@ -commit 0e98738d78b9 -Author: Xidorn Quan -Date: Mon Jul 17 15:10:50 2017 +1000 - - Bug 1338764 part 1 - Use const rather than enum for context flags of nsStyleSVG. r=manishearth - - MozReview-Commit-ID: KzORnfVXgLJ - - --HG-- - extra : rebase_source : 365842d6e6fda4b35a5932272773a3d88bfc04c6 ---- - layout/style/nsStyleStruct.h | 22 +++++++++++++--------- - 1 file changed, 13 insertions(+), 9 deletions(-) - -diff --git layout/style/nsStyleStruct.h layout/style/nsStyleStruct.h -index 59833e37f3bb..eccc02380f7e 100644 ---- layout/style/nsStyleStruct.h -+++ layout/style/nsStyleStruct.h -@@ -3603,15 +3603,19 @@ private: - // Flags to represent the use of context-fill and context-stroke - // for fill-opacity or stroke-opacity, and context-value for stroke-dasharray, - // stroke-dashoffset and stroke-width. -- enum { -- FILL_OPACITY_SOURCE_MASK = 0x03, // fill-opacity: context-{fill,stroke} -- STROKE_OPACITY_SOURCE_MASK = 0x0C, // stroke-opacity: context-{fill,stroke} -- STROKE_DASHARRAY_CONTEXT = 0x10, // stroke-dasharray: context-value -- STROKE_DASHOFFSET_CONTEXT = 0x20, // stroke-dashoffset: context-value -- STROKE_WIDTH_CONTEXT = 0x40, // stroke-width: context-value -- FILL_OPACITY_SOURCE_SHIFT = 0, -- STROKE_OPACITY_SOURCE_SHIFT = 2, -- }; -+ -+ // fill-opacity: context-{fill,stroke} -+ static const uint8_t FILL_OPACITY_SOURCE_MASK = 0x03; -+ // stroke-opacity: context-{fill,stroke} -+ static const uint8_t STROKE_OPACITY_SOURCE_MASK = 0x0C; -+ // stroke-dasharray: context-value -+ static const uint8_t STROKE_DASHARRAY_CONTEXT = 0x10; -+ // stroke-dashoffset: context-value -+ static const uint8_t STROKE_DASHOFFSET_CONTEXT = 0x20; -+ // stroke-width: context-value -+ static const uint8_t STROKE_WIDTH_CONTEXT = 0x40; -+ static const uint8_t FILL_OPACITY_SOURCE_SHIFT = 0; -+ static const uint8_t STROKE_OPACITY_SOURCE_SHIFT = 2; - - uint8_t mContextFlags; // [inherited] - }; - -commit 63d6f06939ee -Author: Xidorn Quan -Date: Tue Aug 1 16:05:04 2017 +1000 - - Bug 1338764 part 2 - Add context-{fill,stroke}-opacity support to {fill,stroke}-opacity. r=manishearth - - MozReview-Commit-ID: HzUHmZb8ICl - - --HG-- - extra : rebase_source : b8746c4d9d4cfc3abe6645f583dc08d0f7c75341 ---- - layout/style/ServoBindings.toml | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git layout/style/ServoBindings.toml layout/style/ServoBindings.toml -index 5e09c24eb0e3..6d8e979fdc1f 100644 ---- layout/style/ServoBindings.toml -+++ layout/style/ServoBindings.toml -@@ -232,6 +232,7 @@ whitelist-types = [ - "nsStylePadding", - "nsStylePosition", - "nsStyleSVG", -+ "nsStyleSVGOpacitySource", - "nsStyleSVGPaint", - "nsStyleSVGReset", - "nsStyleTable", -@@ -458,6 +459,7 @@ structs-types = [ - "nsStylePosition", - "nsStyleQuoteValues", - "nsStyleSVG", -+ "nsStyleSVGOpacitySource", - "nsStyleSVGPaint", - "nsStyleSVGReset", - "nsStyleTable", - -commit 03e036aff26d -Author: Xidorn Quan -Date: Tue Aug 1 16:38:27 2017 +1000 - - Bug 1338764 part 3 - Update test expectations. r=manishearth - - MozReview-Commit-ID: HzN5WP210G7 - - --HG-- - extra : rebase_source : c3585958cb5159a242515a80f226e43f506319d8 ---- - layout/style/test/stylo-failures.md | 8 -------- - 1 file changed, 8 deletions(-) - -diff --git layout/style/test/stylo-failures.md layout/style/test/stylo-failures.md -index 0509269b1334..d69fa898d9be 100644 ---- layout/style/test/stylo-failures.md -+++ layout/style/test/stylo-failures.md -@@ -34,10 +34,6 @@ to mochitest command. - * Animation support: - * SMIL Animation - * test_restyles_in_smil_animation.html [2] --* Unsupported values -- * SVG-in-OpenType values not supported servo/servo#15211 bug 1338764 -- * test_value_storage.html `context-` [7] -- * test_bug798843_pref.html [3] - * Incorrect serialization - * place-{content,items,self} shorthands bug 1363971 - * test_align_shorthand_serialization.html [6] -@@ -58,7 +54,3 @@ to mochitest command. - ## Unknown / Unsure - - ## Ignore -- --* Ignore for now since should be mostly identical to test_value_storage.html -- * test_value_cloning.html [*] -- * test_value_computation.html [*] diff --git a/www/waterfox/files/patch-bug1340039 b/www/waterfox/files/patch-bug1340039 deleted file mode 100644 index 2f601b7db23..00000000000 --- a/www/waterfox/files/patch-bug1340039 +++ /dev/null @@ -1,232 +0,0 @@ -commit 753d522440f6 -Author: Hector Zhao -Date: Wed Mar 14 16:44:36 2018 +0800 - - Bug 1340039 - Set contentPolicyType when copying image, and pass it between processes. r=smaug, a=jcristau - - MozReview-Commit-ID: CJj1a1Lj699 - - --HG-- - extra : source : 445ec9da938f984a6fe2fe163c7f3d7be4710a77 ---- - dom/base/nsContentUtils.cpp | 2 ++ - dom/base/nsContentUtils.h | 1 + - dom/base/nsCopySupport.cpp | 1 + - dom/events/EventStateManager.cpp | 5 ++++- - dom/ipc/ContentParent.cpp | 2 ++ - dom/ipc/ContentParent.h | 1 + - dom/ipc/PBrowser.ipdl | 3 ++- - dom/ipc/PContent.ipdl | 1 + - dom/ipc/TabChild.cpp | 4 +++- - dom/ipc/TabChild.h | 3 ++- - dom/ipc/TabParent.cpp | 6 ++++-- - dom/ipc/TabParent.h | 3 ++- - widget/nsClipboardProxy.cpp | 5 ++++- - 13 files changed, 29 insertions(+), 8 deletions(-) - -diff --git dom/base/nsContentUtils.cpp dom/base/nsContentUtils.cpp -index fe773465faba..63e1ac06bf2d 100644 ---- dom/base/nsContentUtils.cpp -+++ dom/base/nsContentUtils.cpp -@@ -7986,6 +7986,7 @@ nsresult - nsContentUtils::IPCTransferableToTransferable(const IPCDataTransfer& aDataTransfer, - const bool& aIsPrivateData, - nsIPrincipal* aRequestingPrincipal, -+ const nsContentPolicyType& aContentPolicyType, - nsITransferable* aTransferable, - mozilla::dom::nsIContentParent* aContentParent, - mozilla::dom::TabChild* aTabChild) -@@ -8051,6 +8052,7 @@ nsContentUtils::IPCTransferableToTransferable(const IPCDataTransfer& aDataTransf - - aTransferable->SetIsPrivateData(aIsPrivateData); - aTransferable->SetRequestingPrincipal(aRequestingPrincipal); -+ aTransferable->SetContentPolicyType(aContentPolicyType); - return NS_OK; - } - -diff --git dom/base/nsContentUtils.h dom/base/nsContentUtils.h -index 356d3841b9e9..9ef79a569ea3 100644 ---- dom/base/nsContentUtils.h -+++ dom/base/nsContentUtils.h -@@ -2845,6 +2845,7 @@ public: - static nsresult IPCTransferableToTransferable(const mozilla::dom::IPCDataTransfer& aDataTransfer, - const bool& aIsPrivateData, - nsIPrincipal* aRequestingPrincipal, -+ const nsContentPolicyType& aContentPolicyType, - nsITransferable* aTransferable, - mozilla::dom::nsIContentParent* aContentParent, - mozilla::dom::TabChild* aTabChild); -diff --git dom/base/nsCopySupport.cpp dom/base/nsCopySupport.cpp -index 0f680c21c126..5e2d4065b3b7 100644 ---- dom/base/nsCopySupport.cpp -+++ dom/base/nsCopySupport.cpp -@@ -680,6 +680,7 @@ static nsresult AppendImagePromise(nsITransferable* aTransferable, - NS_ENSURE_SUCCESS(rv, rv); - - aTransferable->SetRequestingPrincipal(node->NodePrincipal()); -+ aTransferable->SetContentPolicyType(nsIContentPolicy::TYPE_INTERNAL_IMAGE); - - // add the dataless file promise flavor - return aTransferable->AddDataFlavor(kFilePromiseMime); -diff --git dom/events/EventStateManager.cpp dom/events/EventStateManager.cpp -index 4423e3aecc5e..bdc1bb6e50c9 100644 ---- dom/events/EventStateManager.cpp -+++ dom/events/EventStateManager.cpp -@@ -5469,8 +5469,11 @@ EventStateManager::DoContentCommandEvent(WidgetContentCommandEvent* aEvent) - transferable->GetIsPrivateData(&isPrivateData); - nsCOMPtr requestingPrincipal; - transferable->GetRequestingPrincipal(getter_AddRefs(requestingPrincipal)); -+ nsContentPolicyType contentPolicyType = nsIContentPolicy::TYPE_OTHER; -+ transferable->GetContentPolicyType(&contentPolicyType); - remote->SendPasteTransferable(ipcDataTransfer, isPrivateData, -- IPC::Principal(requestingPrincipal)); -+ IPC::Principal(requestingPrincipal), -+ contentPolicyType); - rv = NS_OK; - } else { - nsCOMPtr commandController = do_QueryInterface(controller); -diff --git dom/ipc/ContentParent.cpp dom/ipc/ContentParent.cpp -index e27f3eedc1b1..3c3d2fbc3735 100644 ---- dom/ipc/ContentParent.cpp -+++ dom/ipc/ContentParent.cpp -@@ -2605,6 +2605,7 @@ mozilla::ipc::IPCResult - ContentParent::RecvSetClipboard(const IPCDataTransfer& aDataTransfer, - const bool& aIsPrivateData, - const IPC::Principal& aRequestingPrincipal, -+ const uint32_t& aContentPolicyType, - const int32_t& aWhichClipboard) - { - nsresult rv; -@@ -2619,6 +2620,7 @@ ContentParent::RecvSetClipboard(const IPCDataTransfer& aDataTransfer, - rv = nsContentUtils::IPCTransferableToTransferable(aDataTransfer, - aIsPrivateData, - aRequestingPrincipal, -+ aContentPolicyType, - trans, this, nullptr); - NS_ENSURE_SUCCESS(rv, IPC_OK()); - -diff --git dom/ipc/ContentParent.h dom/ipc/ContentParent.h -index 1977cfbfd651..a1311bd39403 100644 ---- dom/ipc/ContentParent.h -+++ dom/ipc/ContentParent.h -@@ -976,6 +976,7 @@ private: - virtual mozilla::ipc::IPCResult RecvSetClipboard(const IPCDataTransfer& aDataTransfer, - const bool& aIsPrivateData, - const IPC::Principal& aRequestingPrincipal, -+ const uint32_t& aContentPolicyType, - const int32_t& aWhichClipboard) override; - - virtual mozilla::ipc::IPCResult RecvGetClipboard(nsTArray&& aTypes, -diff --git dom/ipc/PBrowser.ipdl dom/ipc/PBrowser.ipdl -index 3a7b21271fec..b1cf9efbe964 100644 ---- dom/ipc/PBrowser.ipdl -+++ dom/ipc/PBrowser.ipdl -@@ -720,7 +720,8 @@ child: - */ - async PasteTransferable(IPCDataTransfer aDataTransfer, - bool aIsPrivateData, -- Principal aRequestingPrincipal); -+ Principal aRequestingPrincipal, -+ uint32_t aContentPolicyType); - - /** - * Activate event forwarding from client to parent. -diff --git dom/ipc/PContent.ipdl dom/ipc/PContent.ipdl -index 7e33b2920cbe..4ab9da3cc105 100644 ---- dom/ipc/PContent.ipdl -+++ dom/ipc/PContent.ipdl -@@ -837,6 +837,7 @@ parent: - async SetClipboard(IPCDataTransfer aDataTransfer, - bool aIsPrivateData, - Principal aRequestingPrincipal, -+ uint32_t aContentPolicyType, - int32_t aWhichClipboard); - - // Given a list of supported types, returns the clipboard data for the -diff --git dom/ipc/TabChild.cpp dom/ipc/TabChild.cpp -index 50725636d280..72df59ea98c0 100644 ---- dom/ipc/TabChild.cpp -+++ dom/ipc/TabChild.cpp -@@ -2164,7 +2164,8 @@ TabChild::RecvNormalPrioritySelectionEvent(const WidgetSelectionEvent& aEvent) - mozilla::ipc::IPCResult - TabChild::RecvPasteTransferable(const IPCDataTransfer& aDataTransfer, - const bool& aIsPrivateData, -- const IPC::Principal& aRequestingPrincipal) -+ const IPC::Principal& aRequestingPrincipal, -+ const uint32_t& aContentPolicyType) - { - nsresult rv; - nsCOMPtr trans = -@@ -2175,6 +2176,7 @@ TabChild::RecvPasteTransferable(const IPCDataTransfer& aDataTransfer, - rv = nsContentUtils::IPCTransferableToTransferable(aDataTransfer, - aIsPrivateData, - aRequestingPrincipal, -+ aContentPolicyType, - trans, nullptr, this); - NS_ENSURE_SUCCESS(rv, IPC_OK()); - -diff --git dom/ipc/TabChild.h dom/ipc/TabChild.h -index f18906568c1c..48bd8e9eb86e 100644 ---- dom/ipc/TabChild.h -+++ dom/ipc/TabChild.h -@@ -454,7 +454,8 @@ public: - virtual mozilla::ipc::IPCResult - RecvPasteTransferable(const IPCDataTransfer& aDataTransfer, - const bool& aIsPrivateData, -- const IPC::Principal& aRequestingPrincipal) override; -+ const IPC::Principal& aRequestingPrincipal, -+ const uint32_t& aContentPolicyType) override; - - virtual mozilla::ipc::IPCResult - RecvActivateFrameEvent(const nsString& aType, const bool& aCapture) override; -diff --git dom/ipc/TabParent.cpp dom/ipc/TabParent.cpp -index d4e3d11ea2e9..ae43c24e8891 100644 ---- dom/ipc/TabParent.cpp -+++ dom/ipc/TabParent.cpp -@@ -2312,11 +2312,13 @@ TabParent::SendSelectionEvent(WidgetSelectionEvent& aEvent) - bool - TabParent::SendPasteTransferable(const IPCDataTransfer& aDataTransfer, - const bool& aIsPrivateData, -- const IPC::Principal& aRequestingPrincipal) -+ const IPC::Principal& aRequestingPrincipal, -+ const uint32_t& aContentPolicyType) - { - return PBrowserParent::SendPasteTransferable(aDataTransfer, - aIsPrivateData, -- aRequestingPrincipal); -+ aRequestingPrincipal, -+ aContentPolicyType); - } - - /*static*/ TabParent* -diff --git dom/ipc/TabParent.h dom/ipc/TabParent.h -index c31827499403..e3c2601ce0b4 100644 ---- dom/ipc/TabParent.h -+++ dom/ipc/TabParent.h -@@ -497,7 +497,8 @@ public: - - bool SendPasteTransferable(const IPCDataTransfer& aDataTransfer, - const bool& aIsPrivateData, -- const IPC::Principal& aRequestingPrincipal); -+ const IPC::Principal& aRequestingPrincipal, -+ const uint32_t& aContentPolicyType); - - static TabParent* GetFrom(nsFrameLoader* aFrameLoader); - -diff --git widget/nsClipboardProxy.cpp widget/nsClipboardProxy.cpp -index f7d863475b13..4fb90721c0b6 100644 ---- widget/nsClipboardProxy.cpp -+++ widget/nsClipboardProxy.cpp -@@ -37,8 +37,11 @@ nsClipboardProxy::SetData(nsITransferable *aTransferable, - aTransferable->GetIsPrivateData(&isPrivateData); - nsCOMPtr requestingPrincipal; - aTransferable->GetRequestingPrincipal(getter_AddRefs(requestingPrincipal)); -+ nsContentPolicyType contentPolicyType = nsIContentPolicy::TYPE_OTHER; -+ aTransferable->GetContentPolicyType(&contentPolicyType); - child->SendSetClipboard(ipcDataTransfer, isPrivateData, -- IPC::Principal(requestingPrincipal), aWhichClipboard); -+ IPC::Principal(requestingPrincipal), -+ contentPolicyType, aWhichClipboard); - - return NS_OK; - } diff --git a/www/waterfox/files/patch-bug1343147 b/www/waterfox/files/patch-bug1343147 deleted file mode 100644 index a548c655e4d..00000000000 --- a/www/waterfox/files/patch-bug1343147 +++ /dev/null @@ -1,117 +0,0 @@ -commit e215b167b9b9 -Author: cku -Date: Tue Oct 3 11:29:19 2017 +0800 - - Bug 1343147 - Do not double applying transform vector of the root frame in a glyph mask into the target context. r=mstange, a=ritu - - When we generate the glyph mask for a transformed frame in - GenerateAndPushTextMask, the transform vector had been applied into aContext[1], - so we should find a way to prevent applying the vector again when painting the - glyph mask. - - In bug 1299715, I tried to prevent double apply at [2], it caused two problems: - 1. We only skip generating nsDisplayTransform, but we may still create a - nsDisplayPerspactive bellow. Since the parent of a nsDisplayPerspective must be - a nsDisplayTransform, which have been ignored, so we hit this assertion. - 2. We skip all transform for all frames while painting the glyph mask, which is - not correct. We should only skip double applying transform vector of the root - frame. - - This patch fixes both of these issues: - a. We will still create a nsDisplayTransform for the root frame if need. But - the transform matrix we apply into the target context will be an identity - matrix, so we fix #1 above. - b. In #a, we change the transform matrix to an identity matrix only for the root - frame of the glyph mask, so we fix #2. - - [1] - https://hg.mozilla.org/mozilla-central/file/59e5ec5729db/layout/painting/nsDisplayList.cpp#l752 - [2] - https://hg.mozilla.org/mozilla-central/file/ce2c129f0a87/layout/generic/nsFrame.cpp#l2806 - - MozReview-Commit-ID: 973lkQQxLB6 - - --HG-- - extra : source : 84451d723686bc47b81c44ed2ddf6c61f3e35915 ---- - layout/generic/nsFrame.cpp | 13 +++++-------- - layout/painting/nsDisplayList.cpp | 9 ++++++++- - 2 files changed, 13 insertions(+), 9 deletions(-) - -diff --git layout/generic/nsFrame.cpp layout/generic/nsFrame.cpp -index 37f2e2801220..dbfd61b7e142 100644 ---- layout/generic/nsFrame.cpp -+++ layout/generic/nsFrame.cpp -@@ -2803,14 +2803,11 @@ nsIFrame::BuildDisplayListForStackingContext(nsDisplayListBuilder* aBuilder, - buildingDisplayList.SetReferenceFrameAndCurrentOffset(outerReferenceFrame, - GetOffsetToCrossDoc(outerReferenceFrame)); - -- if (!aBuilder->IsForGenerateGlyphMask() && -- !aBuilder->IsForPaintingSelectionBG()) { -- nsDisplayTransform *transformItem = -- new (aBuilder) nsDisplayTransform(aBuilder, this, -- &resultList, dirtyRect, 0, -- allowAsyncAnimation); -- resultList.AppendNewToTop(transformItem); -- } -+ nsDisplayTransform *transformItem = -+ new (aBuilder) nsDisplayTransform(aBuilder, this, -+ &resultList, dirtyRect, 0, -+ allowAsyncAnimation); -+ resultList.AppendNewToTop(transformItem); - - if (hasPerspective) { - if (clipCapturedBy == ContainerItemType::ePerspective) { -diff --git layout/painting/nsDisplayList.cpp layout/painting/nsDisplayList.cpp -index 801e1ea2fb4d..6477bda52f01 100644 ---- layout/painting/nsDisplayList.cpp -+++ layout/painting/nsDisplayList.cpp -@@ -7976,11 +7976,18 @@ already_AddRefed nsDisplayTransform::BuildLayer(nsDisplayListBuilder *aBu - LayerManager *aManager, - const ContainerLayerParameters& aContainerParameters) - { -+ // While generating a glyph mask, the transform vector of the root frame had -+ // been applied into the target context, so stop applying it again here. -+ const bool shouldSkipTransform = -+ (aBuilder->RootReferenceFrame() == mFrame) && -+ (aBuilder->IsForGenerateGlyphMask() || aBuilder->IsForPaintingSelectionBG()); -+ - /* For frames without transform, it would not be removed for - * backface hidden here. But, it would be removed by the init - * function of nsDisplayTransform. - */ -- const Matrix4x4& newTransformMatrix = GetTransformForRendering(); -+ const Matrix4x4 newTransformMatrix = -+ shouldSkipTransform ? Matrix4x4(): GetTransformForRendering(); - - uint32_t flags = FrameLayerBuilder::CONTAINER_ALLOW_PULL_BACKGROUND_COLOR; - RefPtr container = aManager->GetLayerBuilder()-> -diff --git dom/svg/crashtests/1343147.svg dom/svg/crashtests/1343147.svg -new file mode 100644 -index 000000000000..d9c2611ca822 ---- /dev/null -+++ dom/svg/crashtests/1343147.svg -@@ -0,0 +1,13 @@ -+ -+ -+ hello -+ -diff --git dom/svg/crashtests/crashtests.list dom/svg/crashtests/crashtests.list -index 1727a206ec4f..57ab320161e2 100644 ---- dom/svg/crashtests/crashtests.list -+++ dom/svg/crashtests/crashtests.list -@@ -90,4 +90,5 @@ load 1329849-5.svg - load 1329849-6.svg - load 1329093-1.html - load 1329093-2.html -+load 1343147.svg - load 1402798.html diff --git a/www/waterfox/files/patch-bug1345058 b/www/waterfox/files/patch-bug1345058 deleted file mode 100644 index 02874af1505..00000000000 --- a/www/waterfox/files/patch-bug1345058 +++ /dev/null @@ -1,620 +0,0 @@ -commit 1f57fdb85d3d -Author: Thomas Nguyen -Date: Mon Aug 14 14:05:23 2017 +0800 - - Bug 1345058 - Asynchronously decide if a flash document should be blocked. r=baku - - MozReview-Commit-ID: K91cSvIdOrb - - --HG-- - extra : rebase_source : 4d91ab3499c0124129e74a054c5cc78882ff351e ---- - dom/base/nsDocument.cpp | 447 ++++++++++++++++++--- - dom/base/nsDocument.h | 5 + - .../url-classifier/nsUrlClassifierDBService.cpp | 22 +- - 3 files changed, 401 insertions(+), 73 deletions(-) - -diff --git dom/base/nsDocument.cpp dom/base/nsDocument.cpp -index acfde3bc0210..386c96745438 100644 ---- dom/base/nsDocument.cpp -+++ dom/base/nsDocument.cpp -@@ -279,6 +279,7 @@ - #include "nsIURIClassifier.h" - #include "mozilla/DocumentStyleRootIterator.h" - #include "mozilla/ServoRestyleManager.h" -+#include "mozilla/ClearOnShutdown.h" - - using namespace mozilla; - using namespace mozilla::dom; -@@ -319,6 +320,65 @@ GetHttpChannelHelper(nsIChannel* aChannel, nsIHttpChannel** aHttpChannel) - return NS_OK; - } - -+//////////////////////////////////////////////////////////////////// -+// PrincipalFlashClassifier -+ -+// Classify the flash based on the document principal. -+// The usage of this class is as follows: -+// -+// 1) Call AsyncClassify() as early as possible to asynchronously do -+// classification against all the flash blocking related tables -+// via nsIURIClassifier.asyncClassifyLocalWithTables. -+// -+// 2) At any time you need the classification result, call Result() -+// and it is guaranteed to give you the result. Note that you have -+// to specify "aIsThirdParty" to the function so please make sure -+// you can already correctly decide if the document is third-party. -+// -+// Behind the scenes, the sync classification API -+// (nsIURIClassifier.classifyLocalWithTable) may be called as a fallback to -+// synchronously get the result if the asyncClassifyLocalWithTables hasn't -+// been done yet. -+// -+// 3) You can call Result() as many times as you want and only the first time -+// it may unfortunately call the blocking sync API. The subsequent call -+// will just return the result that came out at the first time. -+// -+class PrincipalFlashClassifier final : public nsIURIClassifierCallback -+{ -+public: -+ NS_DECL_THREADSAFE_ISUPPORTS -+ NS_DECL_NSIURICLASSIFIERCALLBACK -+ -+ PrincipalFlashClassifier(); -+ -+ // Fire async classification based on the given principal. -+ void AsyncClassify(nsIPrincipal* aPrincipal); -+ -+ // Would block if the result hasn't come out. -+ mozilla::dom::FlashClassification ClassifyMaybeSync(nsIPrincipal* aPrincipal, -+ bool aIsThirdParty); -+ -+private: -+ ~PrincipalFlashClassifier() = default; -+ -+ void Reset(); -+ bool EnsureUriClassifier(); -+ mozilla::dom::FlashClassification CheckIfClassifyNeeded(nsIPrincipal* aPrincipal); -+ mozilla::dom::FlashClassification Resolve(bool aIsThirdParty); -+ mozilla::dom::FlashClassification AsyncClassifyInternal(nsIPrincipal* aPrincipal); -+ void GetClassificationTables(bool aIsThirdParty, nsACString& aTables); -+ -+ // For the fallback sync classification. -+ nsCOMPtr mClassificationURI; -+ -+ nsCOMPtr mUriClassifier; -+ bool mAsyncClassified; -+ nsTArray mMatchedTables; -+ mozilla::dom::FlashClassification mResult; -+}; -+ -+ - #define NAME_NOT_VALID ((nsSimpleContentList*)1) - - nsIdentifierMapEntry::~nsIdentifierMapEntry() -@@ -1575,6 +1635,9 @@ nsDocument::nsDocument(const char* aContentType) - - // void state used to differentiate an empty source from an unselected source - mPreloadPictureFoundSource.SetIsVoid(true); -+ // For determining if this is a flash document which should be -+ // blocked based on its principal. -+ mPrincipalFlashClassifier = new PrincipalFlashClassifier(); - } - - void -@@ -2761,6 +2824,11 @@ nsDocument::StartDocumentLoad(const char* aCommand, nsIChannel* aChannel, - aChannel->Cancel(NS_ERROR_CSP_FRAME_ANCESTOR_VIOLATION); - } - -+ // Perform a async flash classification based on the doc principal -+ // in an early stage to reduce the blocking time. -+ mFlashClassification = FlashClassification::Unclassified; -+ mPrincipalFlashClassifier->AsyncClassify(GetPrincipal()); -+ - return NS_OK; - } - -@@ -13483,6 +13551,23 @@ nsIDocument::UpdateStyleBackendType() - #endif - } - -+/** -+ * Retrieves the classification of the Flash plugins in the document based on -+ * the classification lists. We perform AsyncInitFlashClassification on -+ * StartDocumentLoad() and the result may not be initialized when this function -+ * gets called. In that case, We can only unfortunately have a blocking wait. -+ * -+ * For more information, see -+ * toolkit/components/url-classifier/flash-block-lists.rst -+ */ -+FlashClassification -+nsDocument::PrincipalFlashClassification() -+{ -+ MOZ_ASSERT(mPrincipalFlashClassifier); -+ return mPrincipalFlashClassifier->ClassifyMaybeSync(GetPrincipal(), -+ IsThirdParty()); -+} -+ - /** - * Helper function for |nsDocument::PrincipalFlashClassification| - * -@@ -13523,27 +13608,279 @@ ArrayContainsTable(const nsTArray& aTableArray, - return false; - } - --/** -- * Retrieves the classification of the Flash plugins in the document based on -- * the classification lists. -- * -- * For more information, see -- * toolkit/components/url-classifier/flash-block-lists.rst -- */ -+namespace { -+ -+// An object to store all preferences we need for flash blocking feature. -+struct PrefStore -+{ -+ PrefStore() -+ { -+ Preferences::AddBoolVarCache(&mFlashBlockEnabled, -+ "plugins.flashBlock.enabled"); -+ Preferences::AddBoolVarCache(&mPluginsHttpOnly, -+ "plugins.http_https_only"); -+ -+ // We only need to register string-typed preferences. -+ Preferences::RegisterCallback(UpdateStringPrefs, "urlclassifier.flashAllowTable", this); -+ Preferences::RegisterCallback(UpdateStringPrefs, "urlclassifier.flashAllowExceptTable", this); -+ Preferences::RegisterCallback(UpdateStringPrefs, "urlclassifier.flashTable", this); -+ Preferences::RegisterCallback(UpdateStringPrefs, "urlclassifier.flashExceptTable", this); -+ Preferences::RegisterCallback(UpdateStringPrefs, "urlclassifier.flashSubDocTable", this); -+ Preferences::RegisterCallback(UpdateStringPrefs, "urlclassifier.flashSubDocExceptTable", this); -+ -+ UpdateStringPrefs(); -+ } -+ -+ ~PrefStore() -+ { -+ Preferences::UnregisterCallback(UpdateStringPrefs, "urlclassifier.flashAllowTable", this); -+ Preferences::UnregisterCallback(UpdateStringPrefs, "urlclassifier.flashAllowExceptTable", this); -+ Preferences::UnregisterCallback(UpdateStringPrefs, "urlclassifier.flashTable", this); -+ Preferences::UnregisterCallback(UpdateStringPrefs, "urlclassifier.flashExceptTable", this); -+ Preferences::UnregisterCallback(UpdateStringPrefs, "urlclassifier.flashSubDocTable", this); -+ Preferences::UnregisterCallback(UpdateStringPrefs, "urlclassifier.flashSubDocExceptTable", this); -+ } -+ -+ void UpdateStringPrefs() -+ { -+ Preferences::GetCString("urlclassifier.flashAllowTable", mAllowTables); -+ Preferences::GetCString("urlclassifier.flashAllowExceptTable", mAllowExceptionsTables); -+ Preferences::GetCString("urlclassifier.flashTable", mDenyTables); -+ Preferences::GetCString("urlclassifier.flashExceptTable", mDenyExceptionsTables); -+ Preferences::GetCString("urlclassifier.flashSubDocTable", mSubDocDenyTables); -+ Preferences::GetCString("urlclassifier.flashSubDocExceptTable", mSubDocDenyExceptionsTables); -+ } -+ -+ static void UpdateStringPrefs(const char*, void* aClosure) -+ { -+ static_cast(aClosure)->UpdateStringPrefs(); -+ } -+ -+ bool mFlashBlockEnabled; -+ bool mPluginsHttpOnly; -+ -+ nsCString mAllowTables; -+ nsCString mAllowExceptionsTables; -+ nsCString mDenyTables; -+ nsCString mDenyExceptionsTables; -+ nsCString mSubDocDenyTables; -+ nsCString mSubDocDenyExceptionsTables; -+}; -+ -+static const -+PrefStore& GetPrefStore() -+{ -+ static UniquePtr sPrefStore; -+ if (!sPrefStore) { -+ sPrefStore.reset(new PrefStore()); -+ ClearOnShutdown(&sPrefStore); -+ } -+ return *sPrefStore; -+} -+ -+} // end of unnamed namespace. -+ -+//////////////////////////////////////////////////////////////////// -+// PrincipalFlashClassifier implementation. -+ -+NS_IMPL_ISUPPORTS(PrincipalFlashClassifier, nsIURIClassifierCallback) -+ -+PrincipalFlashClassifier::PrincipalFlashClassifier() -+{ -+ Reset(); -+} -+ -+void -+PrincipalFlashClassifier::Reset() -+{ -+ mAsyncClassified = false; -+ mMatchedTables.Clear(); -+ mResult = FlashClassification::Unclassified; -+} -+ -+void -+PrincipalFlashClassifier::GetClassificationTables(bool aIsThirdParty, -+ nsACString& aTables) -+{ -+ aTables.Truncate(); -+ auto& prefs = GetPrefStore(); -+ -+ MaybeAddTableToTableList(prefs.mAllowTables, aTables); -+ MaybeAddTableToTableList(prefs.mAllowExceptionsTables, aTables); -+ MaybeAddTableToTableList(prefs.mDenyTables, aTables); -+ MaybeAddTableToTableList(prefs.mDenyExceptionsTables, aTables); -+ -+ if (aIsThirdParty) { -+ MaybeAddTableToTableList(prefs.mSubDocDenyTables, aTables); -+ MaybeAddTableToTableList(prefs.mSubDocDenyExceptionsTables, aTables); -+ } -+} -+ -+bool -+PrincipalFlashClassifier::EnsureUriClassifier() -+{ -+ if (!mUriClassifier) { -+ mUriClassifier = do_GetService(NS_URICLASSIFIERSERVICE_CONTRACTID); -+ } -+ -+ return !!mUriClassifier; -+} -+ - FlashClassification --nsDocument::PrincipalFlashClassification() -+PrincipalFlashClassifier::ClassifyMaybeSync(nsIPrincipal* aPrincipal, bool aIsThirdParty) -+{ -+ if (FlashClassification::Unclassified != mResult) { -+ // We already have the result. Just return it. -+ return mResult; -+ } -+ -+ // TODO: Bug 1342333 - Entirely remove the use of the sync API -+ // (ClassifyLocalWithTables). -+ if (!mAsyncClassified) { -+ -+ // -+ // We may -+ // 1) have called AsyncClassifyLocalWithTables but OnClassifyComplete -+ // hasn't been called. -+ // 2) haven't even called AsyncClassifyLocalWithTables. -+ // -+ // In both cases we need to do the synchronous classification as the fallback. -+ // -+ -+ if (!EnsureUriClassifier()) { -+ return FlashClassification::Denied; -+ } -+ mResult = CheckIfClassifyNeeded(aPrincipal); -+ if (FlashClassification::Unclassified != mResult) { -+ return mResult; -+ } -+ -+ nsresult rv; -+ nsAutoCString classificationTables; -+ GetClassificationTables(aIsThirdParty, classificationTables); -+ -+ if (!mClassificationURI) { -+ rv = aPrincipal->GetURI(getter_AddRefs(mClassificationURI)); -+ if (NS_FAILED(rv) || !mClassificationURI) { -+ mResult = FlashClassification::Denied; -+ return mResult; -+ } -+ } -+ -+ rv = mUriClassifier->ClassifyLocalWithTables(mClassificationURI, -+ classificationTables, -+ mMatchedTables); -+ if (NS_WARN_IF(NS_FAILED(rv))) { -+ if (rv == NS_ERROR_MALFORMED_URI) { -+ // This means that the URI had no hostname (ex: file://doc.html). In this -+ // case, we allow the default (Unknown plugin) behavior. -+ mResult = FlashClassification::Unknown; -+ } else { -+ mResult = FlashClassification::Denied; -+ } -+ return mResult; -+ } -+ } -+ -+ // Resolve the result based on mMatchedTables and aIsThirdParty. -+ mResult = Resolve(aIsThirdParty); -+ MOZ_ASSERT(FlashClassification::Unclassified != mResult); -+ -+ // The subsequent call of Result() will return the resolved result -+ // and never reach here until Reset() is called. -+ return mResult; -+} -+ -+/*virtual*/ nsresult -+PrincipalFlashClassifier::OnClassifyComplete(nsresult /*aErrorCode*/, -+ const nsACString& aLists, // Only this matters. -+ const nsACString& /*aProvider*/, -+ const nsACString& /*aPrefix*/) -+{ -+ mAsyncClassified = true; -+ -+ if (FlashClassification::Unclassified != mResult) { -+ // Result() has been called prior to this callback. -+ return NS_OK; -+ } -+ -+ // TODO: Bug 1364804 - We should use a callback type which notifies -+ // the result as a string array rather than a formatted string. -+ -+ // We only populate the matched list without resolving the classification -+ // result because we are not sure if the parent doc has been properly set. -+ // We also parse the comma-separated tables to array. (the code is copied -+ // from Classifier::SplitTables.) -+ nsACString::const_iterator begin, iter, end; -+ aLists.BeginReading(begin); -+ aLists.EndReading(end); -+ while (begin != end) { -+ iter = begin; -+ FindCharInReadable(',', iter, end); -+ nsDependentCSubstring table = Substring(begin,iter); -+ if (!table.IsEmpty()) { -+ mMatchedTables.AppendElement(Substring(begin, iter)); -+ } -+ begin = iter; -+ if (begin != end) { -+ begin++; -+ } -+ } -+ -+ return NS_OK; -+} -+ -+// We resolve the classification result based on aIsThirdParty -+// and the matched tables we got ealier on (via either sync or async API). -+FlashClassification -+PrincipalFlashClassifier::Resolve(bool aIsThirdParty) -+{ -+ MOZ_ASSERT(FlashClassification::Unclassified == mResult, -+ "We already have resolved classification result."); -+ -+ if (mMatchedTables.IsEmpty()) { -+ return FlashClassification::Unknown; -+ } -+ -+ auto& prefs = GetPrefStore(); -+ if (ArrayContainsTable(mMatchedTables, prefs.mDenyTables) && -+ !ArrayContainsTable(mMatchedTables, prefs.mDenyExceptionsTables)) { -+ return FlashClassification::Denied; -+ } else if (ArrayContainsTable(mMatchedTables, prefs.mAllowTables) && -+ !ArrayContainsTable(mMatchedTables, prefs.mAllowExceptionsTables)) { -+ return FlashClassification::Allowed; -+ } -+ -+ if (aIsThirdParty && ArrayContainsTable(mMatchedTables, prefs.mSubDocDenyTables) && -+ !ArrayContainsTable(mMatchedTables, prefs.mSubDocDenyExceptionsTables)) { -+ return FlashClassification::Denied; -+ } -+ -+ return FlashClassification::Unknown; -+} -+ -+void -+PrincipalFlashClassifier::AsyncClassify(nsIPrincipal* aPrincipal) -+{ -+ MOZ_ASSERT(FlashClassification::Unclassified == mResult, -+ "The old classification result should be reset first."); -+ Reset(); -+ mResult = AsyncClassifyInternal(aPrincipal); -+} -+ -+FlashClassification -+PrincipalFlashClassifier::CheckIfClassifyNeeded(nsIPrincipal* aPrincipal) - { - nsresult rv; - -- bool httpOnly = Preferences::GetBool("plugins.http_https_only", true); -- bool flashBlock = Preferences::GetBool("plugins.flashBlock.enabled", false); -+ auto& prefs = GetPrefStore(); - - // If neither pref is on, skip the null-principal and principal URI checks. -- if (!httpOnly && !flashBlock) { -- return FlashClassification::Unknown; -+ if (prefs.mPluginsHttpOnly && !prefs.mFlashBlockEnabled) { -+ return FlashClassification::Unknown; - } - -- nsCOMPtr principal = GetPrincipal(); -+ nsCOMPtr principal = aPrincipal; - if (principal->GetIsNullPrincipal()) { - return FlashClassification::Denied; - } -@@ -13554,7 +13891,7 @@ nsDocument::PrincipalFlashClassification() - return FlashClassification::Denied; - } - -- if (httpOnly) { -+ if (prefs.mPluginsHttpOnly) { - // Only allow plugins for documents from an HTTP/HTTPS origin. This should - // allow dependent data: URIs to load plugins, but not: - // * chrome documents -@@ -13570,49 +13907,50 @@ nsDocument::PrincipalFlashClassification() - - // If flash blocking is disabled, it is equivalent to all sites being - // on neither list. -- if (!flashBlock) { -+ if (!prefs.mFlashBlockEnabled) { - return FlashClassification::Unknown; - } - -- nsAutoCString allowTables, allowExceptionsTables, -- denyTables, denyExceptionsTables, -- subDocDenyTables, subDocDenyExceptionsTables, -- tables; -- Preferences::GetCString("urlclassifier.flashAllowTable", allowTables); -- MaybeAddTableToTableList(allowTables, tables); -- Preferences::GetCString("urlclassifier.flashAllowExceptTable", -- allowExceptionsTables); -- MaybeAddTableToTableList(allowExceptionsTables, tables); -- Preferences::GetCString("urlclassifier.flashTable", denyTables); -- MaybeAddTableToTableList(denyTables, tables); -- Preferences::GetCString("urlclassifier.flashExceptTable", -- denyExceptionsTables); -- MaybeAddTableToTableList(denyExceptionsTables, tables); -- -- bool isThirdPartyDoc = IsThirdParty(); -- if (isThirdPartyDoc) { -- Preferences::GetCString("urlclassifier.flashSubDocTable", -- subDocDenyTables); -- MaybeAddTableToTableList(subDocDenyTables, tables); -- Preferences::GetCString("urlclassifier.flashSubDocExceptTable", -- subDocDenyExceptionsTables); -- MaybeAddTableToTableList(subDocDenyExceptionsTables, tables); -+ return FlashClassification::Unclassified; -+} -+ -+// Using nsIURIClassifier.asyncClassifyLocalWithTables to do classification -+// against the flash related tables based on the given principal. -+FlashClassification -+PrincipalFlashClassifier::AsyncClassifyInternal(nsIPrincipal* aPrincipal) -+{ -+ auto result = CheckIfClassifyNeeded(aPrincipal); -+ if (FlashClassification::Unclassified != result) { -+ return result; - } - -+ // We haven't been able to decide if it's a third party document -+ // since determining if a document is third-party may depend on its -+ // parent document. At the time we call AsyncClassifyInternal -+ // (i.e. StartDocumentLoad) the parent document may not have been -+ // set. As a result, we wait until Resolve() to be called to -+ // take "is third party" into account. At this point, we just assume -+ // it's third-party to include every list. -+ nsAutoCString tables; -+ GetClassificationTables(true, tables); -+ - if (tables.IsEmpty()) { - return FlashClassification::Unknown; - } - -- nsCOMPtr uriClassifier = -- do_GetService(NS_URICLASSIFIERSERVICE_CONTRACTID, &rv); -- if (NS_FAILED(rv)) { -+ if (!EnsureUriClassifier()) { - return FlashClassification::Denied; - } - -- nsTArray results; -- rv = uriClassifier->ClassifyLocalWithTables(classificationURI, -- tables, -- results); -+ nsresult rv = aPrincipal->GetURI(getter_AddRefs(mClassificationURI)); -+ if (NS_FAILED(rv) || !mClassificationURI) { -+ return FlashClassification::Denied; -+ } -+ -+ rv = mUriClassifier->AsyncClassifyLocalWithTables(mClassificationURI, -+ tables, -+ this); -+ - if (NS_FAILED(rv)) { - if (rv == NS_ERROR_MALFORMED_URI) { - // This means that the URI had no hostname (ex: file://doc.html). In this -@@ -13623,24 +13961,7 @@ nsDocument::PrincipalFlashClassification() - } - } - -- if (results.IsEmpty()) { -- return FlashClassification::Unknown; -- } -- -- if (ArrayContainsTable(results, denyTables) && -- !ArrayContainsTable(results, denyExceptionsTables)) { -- return FlashClassification::Denied; -- } else if (ArrayContainsTable(results, allowTables) && -- !ArrayContainsTable(results, allowExceptionsTables)) { -- return FlashClassification::Allowed; -- } -- -- if (isThirdPartyDoc && ArrayContainsTable(results, subDocDenyTables) && -- !ArrayContainsTable(results, subDocDenyExceptionsTables)) { -- return FlashClassification::Denied; -- } -- -- return FlashClassification::Unknown; -+ return FlashClassification::Unclassified; - } - - FlashClassification -diff --git dom/base/nsDocument.h dom/base/nsDocument.h -index be3d59698b56..5a2938f353a3 100644 ---- dom/base/nsDocument.h -+++ dom/base/nsDocument.h -@@ -72,6 +72,7 @@ - #include "CustomElementRegistry.h" - #include "mozilla/dom/Performance.h" - #include "mozilla/Maybe.h" -+#include "nsIURIClassifier.h" - - #define XML_DECLARATION_BITS_DECLARATION_EXISTS (1 << 0) - #define XML_DECLARATION_BITS_ENCODING_EXISTS (1 << 1) -@@ -346,6 +347,9 @@ protected: - bool mHaveShutDown; - }; - -+// For classifying a flash document based on its principal. -+class PrincipalFlashClassifier; -+ - // Base class for our document implementations. - class nsDocument : public nsIDocument, - public nsIDOMDocument, -@@ -1184,6 +1188,7 @@ protected: - // non-null when this document is in fullscreen mode. - nsWeakPtr mFullscreenRoot; - -+ RefPtr mPrincipalFlashClassifier; - mozilla::dom::FlashClassification mFlashClassification; - // Do not use this value directly. Call the |IsThirdParty()| method, which - // caches its result here. -diff --git toolkit/components/url-classifier/nsUrlClassifierDBService.cpp toolkit/components/url-classifier/nsUrlClassifierDBService.cpp -index 074bfc583b93..6476b8d546f3 100644 ---- toolkit/components/url-classifier/nsUrlClassifierDBService.cpp -+++ toolkit/components/url-classifier/nsUrlClassifierDBService.cpp -@@ -1783,6 +1783,18 @@ nsUrlClassifierDBService::AsyncClassifyLocalWithTables(nsIURI *aURI, - MOZ_ASSERT(NS_IsMainThread(), "AsyncClassifyLocalWithTables must be called " - "on main thread"); - -+ // We do this check no matter what process we are in to return -+ // error as early as possible. -+ nsCOMPtr uri = NS_GetInnermostURI(aURI); -+ NS_ENSURE_TRUE(uri, NS_ERROR_FAILURE); -+ -+ nsAutoCString key; -+ // Canonicalize the url -+ nsCOMPtr utilsService = -+ do_GetService(NS_URLCLASSIFIERUTILS_CONTRACTID); -+ nsresult rv = utilsService->GetKeyForURI(uri, key); -+ NS_ENSURE_SUCCESS(rv, rv); -+ - if (XRE_IsContentProcess()) { - using namespace mozilla::dom; - using namespace mozilla::ipc; -@@ -1815,16 +1827,6 @@ nsUrlClassifierDBService::AsyncClassifyLocalWithTables(nsIURI *aURI, - using namespace mozilla::Telemetry; - auto startTime = TimeStamp::Now(); // For telemetry. - -- nsCOMPtr uri = NS_GetInnermostURI(aURI); -- NS_ENSURE_TRUE(uri, NS_ERROR_FAILURE); -- -- nsAutoCString key; -- // Canonicalize the url -- nsCOMPtr utilsService = -- do_GetService(NS_URLCLASSIFIERUTILS_CONTRACTID); -- nsresult rv = utilsService->GetKeyForURI(uri, key); -- NS_ENSURE_SUCCESS(rv, rv); -- - auto worker = mWorker; - nsCString tables(aTables); - diff --git a/www/waterfox/files/patch-bug1346126 b/www/waterfox/files/patch-bug1346126 deleted file mode 100644 index 667a2620904..00000000000 --- a/www/waterfox/files/patch-bug1346126 +++ /dev/null @@ -1,27 +0,0 @@ -commit b46bdf1c51e0 -Author: Ryan Hunt -Date: Fri Jun 1 11:18:07 2018 -0500 - - Bug 1346126 - Use RemoveAllChildren in ~ContainerLayerComposite. r=mattwoodrow, a=RyanVM - - --HG-- - extra : source : b9814173e9a8ebbf9e6a0cb6dbf751fadead17c4 ---- - gfx/layers/composite/ContainerLayerComposite.cpp | 4 +--- - 1 file changed, 1 insertion(+), 3 deletions(-) - -diff --git gfx/layers/composite/ContainerLayerComposite.cpp gfx/layers/composite/ContainerLayerComposite.cpp -index c40b3c19f8a88..74aed9bbcc03c 100644 ---- gfx/layers/composite/ContainerLayerComposite.cpp -+++ gfx/layers/composite/ContainerLayerComposite.cpp -@@ -650,9 +650,7 @@ ContainerLayerComposite::~ContainerLayerComposite() - // LayerManagerComposite::Destroy(), a parent - // *ContainerLayerComposite::Destroy(), or Disconnect() will trigger - // cleanup of our resources. -- while (mFirstChild) { -- RemoveChild(mFirstChild); -- } -+ RemoveAllChildren(); - } - - void diff --git a/www/waterfox/files/patch-bug1346535 b/www/waterfox/files/patch-bug1346535 deleted file mode 100644 index c7621895d3d..00000000000 --- a/www/waterfox/files/patch-bug1346535 +++ /dev/null @@ -1,504 +0,0 @@ -commit 8ed454acd81e -Author: Samuel Thibault -Date: Fri Mar 16 15:57:00 2018 -0400 - - Bug 1346535 - atk: Introduce U+FEFF characters to match AT-SPI offsets with DOM offsets. r=surkov, r=dbaron a=jcristau - - --HG-- - extra : source : 6f9396e9ea0a261c881dfafbfce894d7138beb6f ---- - accessible/atk/DOMtoATK.cpp | 161 +++++++++++++++++++++++++++++++++ - accessible/atk/DOMtoATK.h | 163 ++++++++++++++++++++++++++++++++++ - accessible/atk/moz.build | 1 + - accessible/atk/nsMaiInterfaceText.cpp | 40 ++++----- - xpcom/string/nsUTF8Utils.h | 24 +++++ - 5 files changed, 369 insertions(+), 20 deletions(-) - -diff --git accessible/atk/DOMtoATK.cpp accessible/atk/DOMtoATK.cpp -new file mode 100644 -index 000000000000..ea9fa543186c ---- /dev/null -+++ accessible/atk/DOMtoATK.cpp -@@ -0,0 +1,161 @@ -+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -+/* vim: set ts=2 et sw=2 tw=80: */ -+/* 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 "DOMtoATK.h" -+#include "nsUTF8Utils.h" -+ -+namespace mozilla { -+namespace a11y { -+ -+namespace DOMtoATK { -+ -+void -+AddBOMs(nsACString& aDest, const nsACString& aSource) -+{ -+ uint32_t destlength = 0; -+ -+ // First compute how much room we will need. -+ for (uint32_t srci = 0; srci < aSource.Length(); ) { -+ int bytes = UTF8traits::bytes(aSource[srci]); -+ if (bytes >= 4) { -+ // Non-BMP character, will add a BOM after it. -+ destlength += 3; -+ } -+ // Skip whole character encoding. -+ srci += bytes; -+ destlength += bytes; -+ } -+ -+ uint32_t desti = 0; // Index within aDest. -+ -+ // Add BOMs after non-BMP characters. -+ aDest.SetLength(destlength); -+ for (uint32_t srci = 0; srci < aSource.Length(); ) { -+ uint32_t bytes = UTF8traits::bytes(aSource[srci]); -+ -+ MOZ_ASSERT(bytes <= aSource.Length() - srci, "We should have the whole sequence"); -+ -+ // Copy whole sequence. -+ aDest.Replace(desti, bytes, Substring(aSource, srci, bytes)); -+ desti += bytes; -+ srci += bytes; -+ -+ if (bytes >= 4) { -+ // More than 4 bytes in UTF-8 encoding exactly means more than 16 encoded -+ // bits. This is thus a non-BMP character which needed a surrogate -+ // pair to get encoded in UTF-16, add a BOM after it. -+ -+ // And add a BOM after it. -+ aDest.Replace(desti, 3, "\xEF\xBB\xBF"); -+ desti += 3; -+ } -+ } -+ MOZ_ASSERT(desti == destlength, "Incoherency between computed length" -+ "and actually translated length"); -+} -+ -+void -+ATKStringConverterHelper::AdjustOffsets(gint* aStartOffset, gint* aEndOffset, -+ gint count) -+{ -+ MOZ_ASSERT(!mAdjusted, "DOMtoATK::ATKStringConverterHelper::AdjustOffsets needs to be called only once"); -+ -+ if (*aStartOffset > 0) { -+ (*aStartOffset)--; -+ mStartShifted = true; -+ } -+ -+ if (*aEndOffset != -1 && *aEndOffset < count) { -+ (*aEndOffset)++; -+ mEndShifted = true; -+ } -+ -+#ifdef DEBUG -+ mAdjusted = true; -+#endif -+} -+ -+gchar* -+ATKStringConverterHelper::FinishUTF16toUTF8(nsCString& aStr) -+{ -+ int skip = 0; -+ -+ if (mStartShifted) { -+ // AdjustOffsets added a leading character. -+ -+ MOZ_ASSERT(aStr.Length() > 0, "There should be a leading character"); -+ MOZ_ASSERT(static_cast(aStr.Length()) >= UTF8traits::bytes(aStr.CharAt(0)), -+ "The leading character should be complete"); -+ -+ // drop first character -+ skip = UTF8traits::bytes(aStr.CharAt(0)); -+ } -+ -+ if (mEndShifted) { -+ // AdjustOffsets added a trailing character. -+ -+ MOZ_ASSERT(aStr.Length() > 0, "There should be a trailing character"); -+ -+ int trail = -1; -+ // Find beginning of last character. -+ for (trail = aStr.Length() - 1; trail >= 0; trail--) { -+ if (!UTF8traits::isInSeq(aStr.CharAt(trail))) { -+ break; -+ } -+ } -+ MOZ_ASSERT(trail >= 0, -+ "There should be at least a whole trailing character"); -+ MOZ_ASSERT(trail + UTF8traits::bytes(aStr.CharAt(trail)) == static_cast(aStr.Length()), -+ "The trailing character should be complete"); -+ -+ // Drop the last character. -+ aStr.Truncate(trail); -+ } -+ -+ // copy and return, libspi will free it -+ return g_strdup(aStr.get() + skip); -+} -+ -+gchar* -+ATKStringConverterHelper::ConvertAdjusted(const nsAString& aStr) -+{ -+ MOZ_ASSERT(mAdjusted, "DOMtoATK::ATKStringConverterHelper::AdjustOffsets needs to be called before ATKStringConverterHelper::ConvertAdjusted"); -+ -+ NS_ConvertUTF16toUTF8 cautoStr(aStr); -+ if (!cautoStr.get()) { -+ return nullptr; -+ } -+ -+ nsAutoCString cautoStrBOMs; -+ AddBOMs(cautoStrBOMs, cautoStr); -+ return FinishUTF16toUTF8(cautoStrBOMs); -+} -+ -+gchar* -+Convert(const nsAString& aStr) -+{ -+ NS_ConvertUTF16toUTF8 cautoStr(aStr); -+ if (!cautoStr.get()) { -+ return nullptr; -+ } -+ -+ nsAutoCString cautoStrBOMs; -+ AddBOMs(cautoStrBOMs, cautoStr); -+ return g_strdup(cautoStrBOMs.get()); -+} -+ -+void -+ConvertTexttoAsterisks(nsAString& aString) -+{ -+ for (uint32_t i = 0; i < aString.Length(); i++) { -+ aString.ReplaceLiteral(i, 1, u"*"); -+ } -+} -+ -+} -+ -+} // namespace a11y -+} // namespace mozilla -diff --git accessible/atk/DOMtoATK.h accessible/atk/DOMtoATK.h -new file mode 100644 -index 000000000000..1f1b125ebbbe ---- /dev/null -+++ accessible/atk/DOMtoATK.h -@@ -0,0 +1,163 @@ -+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -+/* vim: set ts=2 et sw=2 tw=80: */ -+/* 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 "AccessibleWrap.h" -+#include "nsString.h" -+#include "nsMai.h" -+ -+/** -+ * ATK offsets are counted in unicode codepoints, while DOM offsets are counted -+ * in UTF-16 code units. That makes a difference for non-BMP characters, -+ * which need two UTF-16 code units to be represented (a pair of surrogates), -+ * while they are just one unicode character. -+ * -+ * To keep synchronization between ATK offsets (unicode codepoints) and DOM -+ * offsets (UTF-16 code units), after translation from UTF-16 to UTF-8 we add a -+ * BOM after each non-BMP character (which would otherwise use 2 UTF-16 -+ * code units for only 1 unicode codepoint). -+ * -+ * BOMs (Byte Order Marks, U+FEFF, also known as ZERO WIDTH NO-BREAK SPACE, but -+ * that usage is deprecated) normally only appear at the beginning of unicode -+ * files, but their occurrence within text (notably after cut&paste) is not -+ * uncommon, and are thus considered as non-text. -+ * -+ * Since the selection requested through ATK may not contain both surrogates -+ * at the ends of the selection, we need to fetch one UTF-16 code point more -+ * on both side, and get rid of it before returning the string to ATK. The -+ * ATKStringConverterHelper class maintains this, NewATKString should be used -+ * to call it properly. -+ * -+ * In the end, -+ * - if the start is between the high and low surrogates, the UTF-8 result -+ * includes a BOM from it but not the character -+ * - if the end is between the high and low surrogates, the UTF-8 result -+ * includes the character but *not* the BOM -+ * - all non-BMP characters that are fully in the string are in the UTF-8 result -+ * as character followed by BOM -+ */ -+namespace mozilla { -+namespace a11y { -+ -+namespace DOMtoATK -+{ -+ -+ /** -+ * Converts a string of accessible text into ATK gchar* string (by adding -+ * BOMs). This can be used when offsets do not need to be adjusted because -+ * ends of the string can not fall between surrogates. -+ */ -+ gchar* Convert(const nsAString& aStr); -+ -+ /** -+ * Add a BOM after each non-BMP character. -+ */ -+ void AddBOMs(nsACString& aDest, const nsACString& aSource); -+ -+ /** -+ * Replace all characters with asterisks (e.g. for password fields). -+ */ -+ void ConvertTexttoAsterisks(nsAString& aString); -+ -+ /** -+ * Parameterize conversion. -+ */ -+ enum class AtkStringConvertFlags : uint32_t { -+ None = 0, -+ ConvertTextToAsterisks = 1 << 0, -+ }; -+ -+ MOZ_MAKE_ENUM_CLASS_BITWISE_OPERATORS(AtkStringConvertFlags) -+ -+ class ATKStringConverterHelper { -+ public: -+ ATKStringConverterHelper(void) : -+#ifdef DEBUG -+ mAdjusted (false), -+#endif -+ mStartShifted (false), -+ mEndShifted (false) { } -+ -+ /** -+ * In order to properly get non-BMP values, offsets need to be changed -+ * to get one character more on each end, so that ConvertUTF16toUTF8 can -+ * convert surrogates even if the originally requested offsets fall between -+ * them. -+ */ -+ void AdjustOffsets(gint* aStartOffset, gint* aEndOffset, gint count); -+ -+ /** -+ * Converts a string of accessible text with adjusted offsets into ATK -+ * gchar* string (by adding BOMs). Note, AdjustOffsets has to be called -+ * before getting the text passed to this. -+ */ -+ gchar* ConvertAdjusted(const nsAString& aStr); -+ -+ private: -+ /** -+ * Remove the additional characters requested by PrepareUTF16toUTF8. -+ */ -+ gchar* FinishUTF16toUTF8(nsCString& aStr); -+ -+#ifdef DEBUG -+ bool mAdjusted; -+#endif -+ bool mStartShifted; -+ bool mEndShifted; -+ }; -+ -+ /** -+ * Get text from aAccessible, using ATKStringConverterHelper to properly -+ * introduce appropriate BOMs. -+ */ -+ template -+ gchar* NewATKString(AccessibleOrProxy* aAccessible, -+ gint aStartOffset, gint aEndOffset, -+ AtkStringConvertFlags aFlags) -+ { -+ gint startOffset = aStartOffset, endOffset = aEndOffset; -+ ATKStringConverterHelper converter; -+ converter.AdjustOffsets(&startOffset, &endOffset, -+ gint(aAccessible->CharacterCount())); -+ nsAutoString str; -+ aAccessible->TextSubstring(startOffset, endOffset, str); -+ if (aFlags & AtkStringConvertFlags::ConvertTextToAsterisks) -+ ConvertTexttoAsterisks(str); -+ return converter.ConvertAdjusted(str); -+ } -+ -+ /** -+ * Get a character from aAccessible, fetching more data as appropriate to -+ * properly get non-BMP characters or a BOM as appropriate. -+ */ -+ template -+ gunichar ATKCharacter(AccessibleCharAt* aAccessible, gint aOffset) -+ { -+ // char16_t is unsigned short in Mozilla, gnuichar is guint32 in glib. -+ gunichar character = static_cast(aAccessible->CharAt(aOffset)); -+ -+ if (NS_IS_LOW_SURROGATE(character)) { -+ // Trailing surrogate, return BOM instead. -+ return 0xFEFF; -+ } -+ -+ if (NS_IS_HIGH_SURROGATE(character)) { -+ // Heading surrogate, get the trailing surrogate and combine them. -+ gunichar characterLow = static_cast(aAccessible->CharAt(aOffset + 1)); -+ -+ if (!NS_IS_LOW_SURROGATE(characterLow)) { -+ // It should have been a trailing surrogate... Flag the error. -+ return 0xFFFD; -+ } -+ return SURROGATE_TO_UCS4(character, characterLow); -+ } -+ -+ return character; -+ } -+ -+} -+ -+} // namespace a11y -+} // namespace mozilla -diff --git accessible/atk/moz.build accessible/atk/moz.build -index baf71c6656b5..19b94bcca723 100644 ---- accessible/atk/moz.build -+++ accessible/atk/moz.build -@@ -14,6 +14,7 @@ SOURCES += [ - 'ApplicationAccessibleWrap.cpp', - 'AtkSocketAccessible.cpp', - 'DocAccessibleWrap.cpp', -+ 'DOMtoATK.cpp', - 'nsMaiHyperlink.cpp', - 'nsMaiInterfaceAction.cpp', - 'nsMaiInterfaceComponent.cpp', -diff --git accessible/atk/nsMaiInterfaceText.cpp accessible/atk/nsMaiInterfaceText.cpp -index d8c162855343..0c723279046e 100644 ---- accessible/atk/nsMaiInterfaceText.cpp -+++ accessible/atk/nsMaiInterfaceText.cpp -@@ -14,9 +14,12 @@ - #include "nsIAccessibleTypes.h" - #include "nsIPersistentProperties2.h" - #include "nsISimpleEnumerator.h" -+#include "nsUTF8Utils.h" - - #include "mozilla/Likely.h" - -+#include "DOMtoATK.h" -+ - using namespace mozilla; - using namespace mozilla::a11y; - -@@ -128,8 +131,7 @@ ConvertTexttoAsterisks(AccessibleWrap* accWrap, nsAString& aString) - { - // convert each char to "*" when it's "password text" - if (accWrap->NativeRole() == roles::PASSWORD_TEXT) { -- for (uint32_t i = 0; i < aString.Length(); i++) -- aString.Replace(i, 1, NS_LITERAL_STRING("*")); -+ DOMtoATK::ConvertTexttoAsterisks(aString); - } - } - -@@ -142,20 +144,20 @@ getTextCB(AtkText *aText, gint aStartOffset, gint aEndOffset) - nsAutoString autoStr; - if (accWrap) { - HyperTextAccessible* text = accWrap->AsHyperText(); -- if (!text || !text->IsTextRole()) -+ if (!text || !text->IsTextRole() || text->IsDefunct()) - return nullptr; - -- text->TextSubstring(aStartOffset, aEndOffset, autoStr); -+ return DOMtoATK::NewATKString(text, aStartOffset, aEndOffset, -+ accWrap->NativeRole() == roles::PASSWORD_TEXT ? -+ DOMtoATK::AtkStringConvertFlags::ConvertTextToAsterisks : -+ DOMtoATK::AtkStringConvertFlags::None); - -- ConvertTexttoAsterisks(accWrap, autoStr); - } else if (ProxyAccessible* proxy = GetProxy(ATK_OBJECT(aText))) { -- proxy->TextSubstring(aStartOffset, aEndOffset, autoStr); -+ return DOMtoATK::NewATKString(proxy, aStartOffset, aEndOffset, -+ DOMtoATK::AtkStringConvertFlags::None); - } - -- NS_ConvertUTF16toUTF8 cautoStr(autoStr); -- -- //copy and return, libspi will free it. -- return (cautoStr.get()) ? g_strdup(cautoStr.get()) : nullptr; -+ return nullptr; - } - - static gchar* -@@ -181,8 +183,8 @@ getTextAfterOffsetCB(AtkText *aText, gint aOffset, - *aStartOffset = startOffset; - *aEndOffset = endOffset; - -- NS_ConvertUTF16toUTF8 cautoStr(autoStr); -- return (cautoStr.get()) ? g_strdup(cautoStr.get()) : nullptr; -+ // libspi will free it. -+ return DOMtoATK::Convert(autoStr); - } - - static gchar* -@@ -208,8 +210,8 @@ getTextAtOffsetCB(AtkText *aText, gint aOffset, - *aStartOffset = startOffset; - *aEndOffset = endOffset; - -- NS_ConvertUTF16toUTF8 cautoStr(autoStr); -- return (cautoStr.get()) ? g_strdup(cautoStr.get()) : nullptr; -+ // libspi will free it. -+ return DOMtoATK::Convert(autoStr); - } - - static gunichar -@@ -221,13 +223,11 @@ getCharacterAtOffsetCB(AtkText* aText, gint aOffset) - if (!text || !text->IsTextRole()) { - return 0; - } -- -- // char16_t is unsigned short in Mozilla, gnuichar is guint32 in glib. -- return static_cast(text->CharAt(aOffset)); -+ return DOMtoATK::ATKCharacter(text, aOffset); - } - - if (ProxyAccessible* proxy = GetProxy(ATK_OBJECT(aText))) { -- return static_cast(proxy->CharAt(aOffset)); -+ return DOMtoATK::ATKCharacter(proxy, aOffset); - } - - return 0; -@@ -257,8 +257,8 @@ getTextBeforeOffsetCB(AtkText *aText, gint aOffset, - *aStartOffset = startOffset; - *aEndOffset = endOffset; - -- NS_ConvertUTF16toUTF8 cautoStr(autoStr); -- return (cautoStr.get()) ? g_strdup(cautoStr.get()) : nullptr; -+ // libspi will free it. -+ return DOMtoATK::Convert(autoStr); - } - - static gint -diff --git xpcom/string/nsUTF8Utils.h xpcom/string/nsUTF8Utils.h -index ef140084c2e6..5d39b05e799a 100644 ---- xpcom/string/nsUTF8Utils.h -+++ xpcom/string/nsUTF8Utils.h -@@ -56,6 +56,30 @@ public: - { - return (aChar & 0xFE) == 0xFC; - } -+ // return the number of bytes in a sequence beginning with aChar -+ static int bytes(char aChar) -+ { -+ if (isASCII(aChar)) { -+ return 1; -+ } -+ if (is2byte(aChar)) { -+ return 2; -+ } -+ if (is3byte(aChar)) { -+ return 3; -+ } -+ if (is4byte(aChar)) { -+ return 4; -+ } -+ if (is5byte(aChar)) { -+ return 5; -+ } -+ if (is6byte(aChar)) { -+ return 6; -+ } -+ MOZ_ASSERT_UNREACHABLE("should not be used for in-sequence characters"); -+ return 1; -+ } - }; - - /** diff --git a/www/waterfox/files/patch-bug1347984 b/www/waterfox/files/patch-bug1347984 deleted file mode 100644 index fa976288d45..00000000000 --- a/www/waterfox/files/patch-bug1347984 +++ /dev/null @@ -1,96 +0,0 @@ -commit d40956eaa7d8 -Author: Jan de Mooij -Date: Fri Oct 6 20:11:07 2017 +0200 - - Bug 1347984 - Check for dead object proxies in TriggerPromiseReactions. r=till, a=ritu - - --HG-- - extra : source : 754a3e12321c8656a83759adf297e61b0e188368 ---- - js/src/builtin/Promise.cpp | 6 +++++- - js/src/jit-test/tests/basic/bug908915.js | 1 + - js/src/jit-test/tests/promise/bug1347984.js | 6 ++++++ - js/src/shell/js.cpp | 21 +++++++++++++++++++++ - 4 files changed, 33 insertions(+), 1 deletion(-) - -diff --git js/src/builtin/Promise.cpp js/src/builtin/Promise.cpp -index 2462f1f07853..1cb1cff0682e 100644 ---- js/src/builtin/Promise.cpp -+++ js/src/builtin/Promise.cpp -@@ -1017,8 +1017,12 @@ TriggerPromiseReactions(JSContext* cx, HandleValue reactionsVal, JS::PromiseStat - RootedObject reactions(cx, &reactionsVal.toObject()); - RootedObject reaction(cx); - -- if (reactions->is() || IsWrapper(reactions)) -+ if (reactions->is() || -+ IsWrapper(reactions) || -+ JS_IsDeadWrapper(reactions)) -+ { - return EnqueuePromiseReactionJob(cx, reactions, valueOrReason, state); -+ } - - RootedNativeObject reactionsList(cx, &reactions->as()); - size_t reactionsCount = reactionsList->getDenseInitializedLength(); -diff --git js/src/jit-test/tests/basic/bug908915.js js/src/jit-test/tests/basic/bug908915.js -index 5077801b1b67..f0213296e769 100644 ---- js/src/jit-test/tests/basic/bug908915.js -+++ js/src/jit-test/tests/basic/bug908915.js -@@ -11,6 +11,7 @@ var blacklist = { - 'readline': true, - 'terminate': true, - 'nestedShell': true, -+ 'nukeAllCCWs': true, - }; - - function f(y) {} -diff --git js/src/jit-test/tests/promise/bug1347984.js js/src/jit-test/tests/promise/bug1347984.js -new file mode 100644 -index 000000000000..5fc458cd452e ---- /dev/null -+++ js/src/jit-test/tests/promise/bug1347984.js -@@ -0,0 +1,6 @@ -+// |jit-test| error:dead object -+var g = newGlobal(); -+var p = new Promise(() => {}); -+g.Promise.prototype.then.call(p, () => void 0); -+g.eval("nukeAllCCWs()"); -+resolvePromise(p, 9); -diff --git js/src/shell/js.cpp js/src/shell/js.cpp -index 2bb7e97120a7..8e9aee7c854a 100644 ---- js/src/shell/js.cpp -+++ js/src/shell/js.cpp -@@ -5049,6 +5049,23 @@ NukeCCW(JSContext* cx, unsigned argc, Value* vp) - return true; - } - -+static bool -+NukeAllCCWs(JSContext* cx, unsigned argc, Value* vp) -+{ -+ CallArgs args = CallArgsFromVp(argc, vp); -+ -+ if (args.length() != 0) { -+ JS_ReportErrorNumberASCII(cx, my_GetErrorMessage, nullptr, JSSMSG_INVALID_ARGS, -+ "nukeAllCCWs"); -+ return false; -+ } -+ -+ NukeCrossCompartmentWrappers(cx, AllCompartments(), cx->compartment(), -+ NukeWindowReferences, NukeAllReferences); -+ args.rval().setUndefined(); -+ return true; -+} -+ - static bool - GetMaxArgs(JSContext* cx, unsigned argc, Value* vp) - { -@@ -6552,6 +6569,10 @@ static const JSFunctionSpecWithHelp shell_functions[] = { - "nukeCCW(wrapper)", - " Nuke a CrossCompartmentWrapper, which turns it into a DeadProxyObject."), - -+ JS_FN_HELP("nukeAllCCWs", NukeAllCCWs, 0, 0, -+"nukeAllCCWs()", -+" Like nukeCCW, but for all CrossCompartmentWrappers targeting the current compartment."), -+ - JS_FN_HELP("createMappedArrayBuffer", CreateMappedArrayBuffer, 1, 0, - "createMappedArrayBuffer(filename, [offset, [size]])", - " Create an array buffer that mmaps the given file."), diff --git a/www/waterfox/files/patch-bug1352453 b/www/waterfox/files/patch-bug1352453 deleted file mode 100644 index 87630d5510d..00000000000 --- a/www/waterfox/files/patch-bug1352453 +++ /dev/null @@ -1,27 +0,0 @@ -commit 96ac0874dc2e -Author: Ethan Lin -Date: Sat Sep 23 15:06:07 2017 +0800 - - Bug 1352453 - Check image dimension when computing border space size. r=heycam, a=sledru - - MozReview-Commit-ID: LQcf9UGyUUq - - --HG-- - extra : source : 6974ff079df11b3e7dc46e2df754149321e3f3aa ---- - layout/painting/nsCSSRendering.cpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git layout/painting/nsCSSRendering.cpp layout/painting/nsCSSRendering.cpp -index 89760f33229b..55051c9ac376 100644 ---- layout/painting/nsCSSRendering.cpp -+++ layout/painting/nsCSSRendering.cpp -@@ -3068,7 +3068,7 @@ nsCSSRendering::ComputeBorderSpacedRepeatSize(nscoord aImageDimension, - nscoord aAvailableSpace, - nscoord& aSpace) - { -- int32_t count = aAvailableSpace / aImageDimension; -+ int32_t count = aImageDimension ? (aAvailableSpace / aImageDimension) : 0; - aSpace = (aAvailableSpace - aImageDimension * count) / (count + 1); - return aSpace + aImageDimension; - } diff --git a/www/waterfox/files/patch-bug1355576 b/www/waterfox/files/patch-bug1355576 deleted file mode 100644 index cc9c8236a2b..00000000000 --- a/www/waterfox/files/patch-bug1355576 +++ /dev/null @@ -1,262 +0,0 @@ -commit e530ba4d4394 -Author: Thomas Wisniewski -Date: Tue Jul 4 20:59:26 2017 -0400 - - Bug 1355576 - Add ability to clear all localStorage with the browsingData API; r=bsilverberg,janv - - MozReview-Commit-ID: 4UUqg62yIo9 - - --HG-- - extra : rebase_source : 9c6154bbe878fc3921d22027fdc90dbdaed05be9 ---- - browser/components/extensions/ext-browsingData.js | 10 +++ - .../extensions/schemas/browsing_data.json | 1 - - .../extensions/test/browser/browser-common.ini | 1 + - .../browser_ext_browsingData_localStorage.js | 93 ++++++++++++++++++++++ - .../test/xpcshell/test_ext_browsingData.js | 4 +- - dom/storage/LocalStorageManager.cpp | 3 +- - dom/storage/StorageObserver.cpp | 12 +++ - .../extensions/schemas/browsing_data.json | 1 - - 8 files changed, 120 insertions(+), 5 deletions(-) - -diff --git browser/components/extensions/ext-browsingData.js browser/components/extensions/ext-browsingData.js -index fd59141dd15d..109ec9601487 100644 ---- browser/components/extensions/ext-browsingData.js -+++ browser/components/extensions/ext-browsingData.js -@@ -83,6 +83,10 @@ const clearHistory = options => { - return sanitizer.items.history.clear(makeRange(options)); - }; - -+const clearLocalStorage = async function(options) { -+ Services.obs.notifyObservers(null, "extension:purge-localStorage"); -+}; -+ - const clearPasswords = async function(options) { - let loginManager = Services.logins; - let yieldCounter = 0; -@@ -152,6 +156,9 @@ const doRemoval = (options, dataToRemove, extension) => { - case "history": - removalPromises.push(clearHistory(options)); - break; -+ case "localStorage": -+ removalPromises.push(clearLocalStorage(options)); -+ break; - case "passwords": - removalPromises.push(clearPasswords(options)); - break; -@@ -225,6 +232,9 @@ this.browsingData = class extends ExtensionAPI { - removeHistory(options) { - return doRemoval(options, {history: true}); - }, -+ removeLocalStorage(options) { -+ return doRemoval(options, {localStorage: true}); -+ }, - removePasswords(options) { - return doRemoval(options, {passwords: true}); - }, -diff --git browser/components/extensions/schemas/browsing_data.json browser/components/extensions/schemas/browsing_data.json -index a780f5640c8f..7755714eb898 100644 ---- browser/components/extensions/schemas/browsing_data.json -+++ browser/components/extensions/schemas/browsing_data.json -@@ -341,7 +341,6 @@ - "description": "Clears websites' local storage data.", - "type": "function", - "async": "callback", -- "unsupported": true, - "parameters": [ - { - "$ref": "RemovalOptions", -diff --git browser/components/extensions/test/browser/browser-common.ini browser/components/extensions/test/browser/browser-common.ini -index 464b8ba18f37..e3f7700f3939 100644 ---- browser/components/extensions/test/browser/browser-common.ini -+++ browser/components/extensions/test/browser/browser-common.ini -@@ -46,6 +46,7 @@ skip-if = (os == 'win' && !debug) # bug 1352668 - [browser_ext_browserAction_theme_icons.js] - [browser_ext_browsingData_formData.js] - [browser_ext_browsingData_history.js] -+[browser_ext_browsingData_localStorage.js] - [browser_ext_browsingData_pluginData.js] - [browser_ext_browsingData_serviceWorkers.js] - [browser_ext_commands_execute_browser_action.js] -diff --git browser/components/extensions/test/browser/browser_ext_browsingData_localStorage.js browser/components/extensions/test/browser/browser_ext_browsingData_localStorage.js -new file mode 100644 -index 000000000000..215f26d1fcb6 ---- /dev/null -+++ browser/components/extensions/test/browser/browser_ext_browsingData_localStorage.js -@@ -0,0 +1,93 @@ -+/* -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- */ -+/* vim: set sts=2 sw=2 et tw=80: */ -+"use strict"; -+ -+add_task(async function testLocalStorage() { -+ async function background() { -+ function openTabs() { -+ let promise = new Promise(resolve => { -+ let tabURLs = [ -+ "http://example.com/", -+ "http://example.net/", -+ ]; -+ -+ let tabs; -+ let waitingCount = tabURLs.length; -+ -+ let listener = async msg => { -+ if (msg !== "content-script-ready" || --waitingCount) { -+ return; -+ } -+ browser.runtime.onMessage.removeListener(listener); -+ resolve(Promise.all(tabs)); -+ }; -+ -+ browser.runtime.onMessage.addListener(listener); -+ -+ tabs = tabURLs.map(url => { -+ return browser.tabs.create({url: url}); -+ }); -+ }); -+ -+ return promise; -+ } -+ -+ function sendMessageToTabs(tabs, message) { -+ return Promise.all( -+ tabs.map(tab => { return browser.tabs.sendMessage(tab.id, message); })); -+ } -+ -+ let tabs = await openTabs(); -+ -+ await sendMessageToTabs(tabs, "resetLocalStorage"); -+ await sendMessageToTabs(tabs, "checkLocalStorageSet"); -+ await browser.browsingData.removeLocalStorage({}); -+ await sendMessageToTabs(tabs, "checkLocalStorageCleared"); -+ -+ await sendMessageToTabs(tabs, "resetLocalStorage"); -+ await sendMessageToTabs(tabs, "checkLocalStorageSet"); -+ await browser.browsingData.remove({}, {localStorage: true}); -+ await sendMessageToTabs(tabs, "checkLocalStorageCleared"); -+ -+ browser.tabs.remove(tabs.map(tab => tab.id)); -+ -+ browser.test.notifyPass("done"); -+ } -+ -+ function contentScript() { -+ browser.runtime.onMessage.addListener(msg => { -+ if (msg === "resetLocalStorage") { -+ localStorage.clear(); -+ localStorage.setItem("test", "test"); -+ } else if (msg === "checkLocalStorageSet") { -+ browser.test.assertEq("test", localStorage.getItem("test")); -+ } else if (msg === "checkLocalStorageCleared") { -+ browser.test.assertEq(null, localStorage.getItem("test")); -+ } -+ }); -+ browser.runtime.sendMessage("content-script-ready"); -+ } -+ -+ let extension = ExtensionTestUtils.loadExtension({ -+ background, -+ manifest: { -+ "permissions": ["browsingData"], -+ "content_scripts": [{ -+ "matches": [ -+ "http://example.com/", -+ "http://example.net/", -+ ], -+ "js": ["content-script.js"], -+ "run_at": "document_start", -+ }], -+ }, -+ files: { -+ "content-script.js": contentScript, -+ }, -+ }); -+ -+ await extension.startup(); -+ await extension.awaitFinish("done"); -+ await extension.unload(); -+}); -+ -diff --git browser/components/extensions/test/xpcshell/test_ext_browsingData.js browser/components/extensions/test/xpcshell/test_ext_browsingData.js -index 0c1c4874ca44..0b8972058e64 100644 ---- browser/components/extensions/test/xpcshell/test_ext_browsingData.js -+++ browser/components/extensions/test/xpcshell/test_ext_browsingData.js -@@ -44,7 +44,7 @@ add_task(async function testInvalidArguments() { - - add_task(async function testUnimplementedDataType() { - function background() { -- browser.browsingData.remove({}, {localStorage: true}); -+ browser.browsingData.remove({}, {indexedDB: true}); - browser.test.sendMessage("finished"); - } - -@@ -61,6 +61,6 @@ add_task(async function testUnimplementedDataType() { - await extension.unload(); - }); - -- let warningObserved = messages.find(line => /Firefox does not support dataTypes: localStorage/.test(line)); -+ let warningObserved = messages.find(line => /Firefox does not support dataTypes: indexedDB/.test(line)); - ok(warningObserved, "Warning issued when calling remove with an unimplemented dataType."); - }); -diff --git dom/storage/LocalStorageManager.cpp dom/storage/LocalStorageManager.cpp -index a161de2bc596..f366e7874a90 100644 ---- dom/storage/LocalStorageManager.cpp -+++ dom/storage/LocalStorageManager.cpp -@@ -386,7 +386,8 @@ LocalStorageManager::Observe(const char* aTopic, - } - - // Clear everything, caches + database -- if (!strcmp(aTopic, "cookie-cleared")) { -+ if (!strcmp(aTopic, "cookie-cleared") || -+ !strcmp(aTopic, "extension:purge-localStorage-caches")) { - ClearCaches(LocalStorageCache::kUnloadComplete, pattern, EmptyCString()); - return NS_OK; - } -diff --git dom/storage/StorageObserver.cpp dom/storage/StorageObserver.cpp -index e5b010f88c7b..48d484748209 100644 ---- dom/storage/StorageObserver.cpp -+++ dom/storage/StorageObserver.cpp -@@ -66,6 +66,7 @@ StorageObserver::Init() - obs->AddObserver(sSelf, "browser:purge-domain-data", true); - obs->AddObserver(sSelf, "last-pb-context-exited", true); - obs->AddObserver(sSelf, "clear-origin-attributes-data", true); -+ obs->AddObserver(sSelf, "extension:purge-localStorage", true); - - // Shutdown - obs->AddObserver(sSelf, "profile-after-change", true); -@@ -270,6 +271,23 @@ StorageObserver::Observe(nsISupports* aSubject, - - Notify("session-only-cleared", NS_ConvertUTF8toUTF16(originSuffix), - originScope); -+ -+ return NS_OK; -+ } -+ -+ if (!strcmp(aTopic, "extension:purge-localStorage")) { -+ StorageDBChild* storageChild = StorageDBChild::GetOrCreate(); -+ if (NS_WARN_IF(!storageChild)) { -+ return NS_ERROR_FAILURE; -+ } -+ -+ storageChild->AsyncClearAll(); -+ -+ if (XRE_IsParentProcess()) { -+ storageChild->SendClearAll(); -+ } -+ -+ Notify("extension:purge-localStorage-caches"); - - return NS_OK; - } -diff --git mobile/android/components/extensions/schemas/browsing_data.json mobile/android/components/extensions/schemas/browsing_data.json -index 483a462d422c..1019c1a23953 100644 ---- mobile/android/components/extensions/schemas/browsing_data.json -+++ mobile/android/components/extensions/schemas/browsing_data.json -@@ -345,7 +345,6 @@ - "description": "Clears websites' local storage data.", - "type": "function", - "async": "callback", -- "unsupported": true, - "parameters": [ - { - "$ref": "RemovalOptions", diff --git a/www/waterfox/files/patch-bug1356854 b/www/waterfox/files/patch-bug1356854 deleted file mode 100644 index 013cb6fac55..00000000000 --- a/www/waterfox/files/patch-bug1356854 +++ /dev/null @@ -1,28 +0,0 @@ -commit 6435e5f65538 -Author: Thomas Nguyen -Date: Thu Sep 21 16:39:36 2017 +0800 - - Bug 1356854 - Check mFD is not null before PR_Write. r=mcmanus, a=ritu - - MozReview-Commit-ID: INoTUvPpPrs - - --HG-- - extra : source : 638f326530b719ce386bb5d1701fed4ae4604690 ---- - netwerk/base/nsFileStreams.cpp | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git netwerk/base/nsFileStreams.cpp netwerk/base/nsFileStreams.cpp -index ac259c1c7e94..6be501456656 100644 ---- netwerk/base/nsFileStreams.cpp -+++ netwerk/base/nsFileStreams.cpp -@@ -378,6 +378,9 @@ nsFileStreamBase::DoPendingOpen() - - case eOpened: - MOZ_ASSERT(mFD); -+ if (NS_WARN_IF(!mFD)) { -+ return NS_ERROR_FAILURE; -+ } - return NS_OK; - - case eClosed: diff --git a/www/waterfox/files/patch-bug1357523 b/www/waterfox/files/patch-bug1357523 deleted file mode 100644 index 32d453e9e3b..00000000000 --- a/www/waterfox/files/patch-bug1357523 +++ /dev/null @@ -1,96 +0,0 @@ -commit ad103dfd3abe -Author: Prathiksha -Date: Fri Sep 15 22:08:12 2017 +0530 - - Bug 1357523 - Make about:home and about:newtab search box search for the value in the search textbox when we use non-default search engines. r=nhnt11, a=ritu - - MozReview-Commit-ID: CdgqghkmXau - - --HG-- - extra : source : e029590936c56ac269d68610ab389ab25887b6e1 ---- - browser/base/content/contentSearchUI.js | 2 ++ - .../test/general/browser_contentSearchUI.js | 30 +++++----------------- - 2 files changed, 9 insertions(+), 23 deletions(-) - -diff --git browser/base/content/contentSearchUI.js browser/base/content/contentSearchUI.js -index bacb985fb6ee..ffada60c3571 100644 ---- browser/base/content/contentSearchUI.js -+++ browser/base/content/contentSearchUI.js -@@ -478,6 +478,8 @@ ContentSearchUIController.prototype = { - _onMousemove(event) { - let idx = this._indexOfTableItem(event.target); - if (idx >= this.numSuggestions) { -+ // Deselect any search suggestion that has been selected. -+ this.selectedIndex = -1; - this.selectedButtonIndex = idx - this.numSuggestions; - return; - } -diff --git browser/base/content/test/general/browser_contentSearchUI.js browser/base/content/test/general/browser_contentSearchUI.js -index 51538b29e27f..85b65d40bf0b 100644 ---- browser/base/content/test/general/browser_contentSearchUI.js -+++ browser/base/content/test/general/browser_contentSearchUI.js -@@ -300,13 +300,13 @@ add_task(async function mouse() { - checkState(state, "x", ["xfoo", "xbar"], 1); - - state = await msg("mousemove", 2); -- checkState(state, "x", ["xfoo", "xbar"], 1, 0); -+ checkState(state, "x", ["xfoo", "xbar"], 2, 0); - - state = await msg("mousemove", 3); -- checkState(state, "x", ["xfoo", "xbar"], 1, 1); -+ checkState(state, "x", ["xfoo", "xbar"], 3, 1); - - state = await msg("mousemove", -1); -- checkState(state, "x", ["xfoo", "xbar"], 1); -+ checkState(state, "x", ["xfoo", "xbar"], -1); - - await msg("reset"); - await setUp(); -@@ -318,10 +318,10 @@ add_task(async function mouse() { - checkState(state, "x", ["xfoo", "xbar"], 0); - - state = await msg("mousemove", 2); -- checkState(state, "x", ["xfoo", "xbar"], 0, 0); -+ checkState(state, "x", ["xfoo", "xbar"], 2, 0); - - state = await msg("mousemove", -1); -- checkState(state, "x", ["xfoo", "xbar"], 0); -+ checkState(state, "x", ["xfoo", "xbar"], -1); - - await msg("reset"); - }); -@@ -510,24 +510,7 @@ add_task(async function search() { - await setUp(); - - // Test selecting a suggestion, then clicking a one-off without deselecting the -- // suggestion. -- await msg("key", { key: "x", waitForSuggestions: true }); -- p = msg("waitForSearch"); -- await msg("mousemove", 1); -- await msg("mousemove", 3); -- await msg("click", { eltIdx: 3, modifiers }); -- mesg = await p; -- eventData.searchString = "xfoo" -- eventData.selection = { -- index: 1, -- kind: "mouse", -- }; -- SimpleTest.isDeeply(eventData, mesg, "Search event data"); -- -- await promiseTab(); -- await setUp(); -- -- // Same as above, but with the keyboard. -+ // suggestion, using the keyboard. - delete modifiers.button; - await msg("key", { key: "x", waitForSuggestions: true }); - p = msg("waitForSearch"); -@@ -536,6 +519,7 @@ add_task(async function search() { - await msg("key", "VK_TAB"); - await msg("key", { key: "VK_RETURN", modifiers }); - mesg = await p; -+ eventData.searchString = "xfoo"; - eventData.selection = { - index: 1, - kind: "key", diff --git a/www/waterfox/files/patch-bug1360278 b/www/waterfox/files/patch-bug1360278 deleted file mode 100644 index 75e49f92f34..00000000000 --- a/www/waterfox/files/patch-bug1360278 +++ /dev/null @@ -1,184 +0,0 @@ -commit 5d127ad3bd50 -Author: Robin Grenet -Date: Thu Nov 16 13:35:58 2017 +0100 - - Bug 1360278 - Add preference to trigger context menu on mouse up for GTK+ and macOS, r=mstange,smaug a=gchang - - MozReview-Commit-ID: Bg60bD8jIg6 - - --HG-- - extra : source : f540f9e801cb2e0be5259baea13dfce953ccb520 ---- - modules/libpref/init/all.js | 4 ++++ - widget/cocoa/nsChildView.mm | 23 +++++++++++++++++++++-- - widget/gtk/nsWindow.cpp | 27 ++++++++++++++++++++------- - widget/gtk/nsWindow.h | 2 ++ - widget/nsBaseWidget.cpp | 16 ++++++++++++++++ - widget/nsBaseWidget.h | 6 ++++++ - 6 files changed, 69 insertions(+), 9 deletions(-) - -diff --git modules/libpref/init/all.js modules/libpref/init/all.js -index f9402630cf27..97ece9f13467 100644 ---- modules/libpref/init/all.js -+++ modules/libpref/init/all.js -@@ -234,6 +234,10 @@ pref("browser.sessionhistory.max_total_viewers", -1); - - pref("ui.use_native_colors", true); - 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 widget/cocoa/nsChildView.mm widget/cocoa/nsChildView.mm -index cac897327a19..bf42b4f8c095 100644 ---- widget/cocoa/nsChildView.mm -+++ widget/cocoa/nsChildView.mm -@@ -4700,8 +4700,10 @@ NSEvent* gLastDragMouseDownEvent = nil; - if (!mGeckoChild) - return; - -- // Let the superclass do the context menu stuff. -- [super rightMouseDown:theEvent]; -+ if (!nsBaseWidget::ShowContextMenuAfterMouseUp()) { -+ // Let the superclass do the context menu stuff. -+ [super rightMouseDown:theEvent]; -+ } - - NS_OBJC_END_TRY_ABORT_BLOCK; - } -@@ -4724,6 +4726,23 @@ NSEvent* gLastDragMouseDownEvent = nil; - - nsAutoRetainCocoaObject kungFuDeathGrip(self); - mGeckoChild->DispatchInputEvent(&geckoEvent); -+ if (!mGeckoChild) -+ return; -+ -+ if (nsBaseWidget::ShowContextMenuAfterMouseUp()) { -+ // Let the superclass do the context menu stuff, but pretend it's rightMouseDown. -+ NSEvent *dupeEvent = [NSEvent mouseEventWithType:NSRightMouseDown -+ location:theEvent.locationInWindow -+ modifierFlags:theEvent.modifierFlags -+ timestamp:theEvent.timestamp -+ windowNumber:theEvent.windowNumber -+ context:theEvent.context -+ eventNumber:theEvent.eventNumber -+ clickCount:theEvent.clickCount -+ pressure:theEvent.pressure]; -+ -+ [super rightMouseDown:dupeEvent]; -+ } - - NS_OBJC_END_TRY_ABORT_BLOCK; - } -diff --git widget/gtk/nsWindow.cpp widget/gtk/nsWindow.cpp -index c3da6dc00b0c..c220d0bb2192 100644 ---- widget/gtk/nsWindow.cpp -+++ widget/gtk/nsWindow.cpp -@@ -2737,6 +2737,19 @@ static guint ButtonMaskFromGDKButton(guint button) - return GDK_BUTTON1_MASK << (button - 1); - } - -+void -+nsWindow::DispatchContextMenuEventFromMouseEvent(uint16_t domButton, -+ GdkEventButton *aEvent) -+{ -+ if (domButton == WidgetMouseEvent::eRightButton && MOZ_LIKELY(!mIsDestroyed)) { -+ WidgetMouseEvent contextMenuEvent(true, eContextMenu, this, -+ WidgetMouseEvent::eReal); -+ InitButtonEvent(contextMenuEvent, aEvent); -+ contextMenuEvent.pressure = mLastMotionPressure; -+ DispatchInputEvent(&contextMenuEvent); -+ } -+} -+ - void - nsWindow::OnButtonPressEvent(GdkEventButton *aEvent) - { -@@ -2806,13 +2819,8 @@ nsWindow::OnButtonPressEvent(GdkEventButton *aEvent) - DispatchInputEvent(&event); - - // right menu click on linux should also pop up a context menu -- if (domButton == WidgetMouseEvent::eRightButton && -- MOZ_LIKELY(!mIsDestroyed)) { -- WidgetMouseEvent contextMenuEvent(true, eContextMenu, this, -- WidgetMouseEvent::eReal); -- InitButtonEvent(contextMenuEvent, aEvent); -- contextMenuEvent.pressure = mLastMotionPressure; -- DispatchInputEvent(&contextMenuEvent); -+ if (!nsBaseWidget::ShowContextMenuAfterMouseUp()) { -+ DispatchContextMenuEventFromMouseEvent(domButton, aEvent); - } - } - -@@ -2848,6 +2856,11 @@ nsWindow::OnButtonReleaseEvent(GdkEventButton *aEvent) - - DispatchInputEvent(&event); - mLastMotionPressure = pressure; -+ -+ // right menu click on linux should also pop up a context menu -+ if (nsBaseWidget::ShowContextMenuAfterMouseUp()) { -+ DispatchContextMenuEventFromMouseEvent(domButton, aEvent); -+ } - } - - void -diff --git widget/gtk/nsWindow.h widget/gtk/nsWindow.h -index 0fafc8994579..7a28e3260c0f 100644 ---- widget/gtk/nsWindow.h -+++ widget/gtk/nsWindow.h -@@ -245,6 +245,8 @@ private: - - void UpdateClientOffset(); - -+ void DispatchContextMenuEventFromMouseEvent(uint16_t domButton, -+ GdkEventButton *aEvent); - public: - void ThemeChanged(void); - void OnDPIChanged(void); -diff --git widget/nsBaseWidget.cpp widget/nsBaseWidget.cpp -index c0694714c69d..4a1320fe23d5 100644 ---- widget/nsBaseWidget.cpp -+++ widget/nsBaseWidget.cpp -@@ -1218,6 +1218,22 @@ nsBaseWidget::DispatchEventToAPZOnly(mozilla::WidgetInputEvent* aEvent) - } - } - -+// static -+bool -+nsBaseWidget::ShowContextMenuAfterMouseUp() -+{ -+ static bool gContextMenuAfterMouseUp = false; -+ static bool gContextMenuAfterMouseUpCached = false; -+ if (!gContextMenuAfterMouseUpCached) { -+ Preferences::AddBoolVarCache(&gContextMenuAfterMouseUp, -+ "ui.context_menus.after_mouseup", -+ false); -+ -+ gContextMenuAfterMouseUpCached = true; -+ } -+ return gContextMenuAfterMouseUp; -+} -+ - nsIDocument* - nsBaseWidget::GetDocument() const - { -diff --git widget/nsBaseWidget.h widget/nsBaseWidget.h -index f4e8e3d78330..3cb56f38b6ce 100644 ---- widget/nsBaseWidget.h -+++ widget/nsBaseWidget.h -@@ -417,6 +417,12 @@ public: - void RecvScreenPixels(mozilla::ipc::Shmem&& aMem, const ScreenIntSize& aSize) override {}; - #endif - -+ /** -+ * Whether context menus should only appear on mouseup instead of mousedown, -+ * on OSes where they normally appear on mousedown (macOS, *nix). -+ */ -+ static bool ShowContextMenuAfterMouseUp(); -+ - protected: - // These are methods for CompositorWidgetWrapper, and should only be - // accessed from that class. Derived widgets can choose which methods to diff --git a/www/waterfox/files/patch-bug1360603 b/www/waterfox/files/patch-bug1360603 deleted file mode 100644 index b7e5e247a43..00000000000 --- a/www/waterfox/files/patch-bug1360603 +++ /dev/null @@ -1,101 +0,0 @@ -commit b5d0a61cd5df -Author: Amy Chung -Date: Sun Sep 24 00:38:32 2017 +0800 - - Bug 1360603 - Mark the save channel as throttleable. r=baku, a=sledru - - --HG-- - extra : source : d409c2ac7d88b7193e8369aa3359a9368e1135b3 ---- - dom/webbrowserpersist/nsWebBrowserPersist.cpp | 7 +++++++ - 1 file changed, 7 insertions(+) - -diff --git dom/webbrowserpersist/nsWebBrowserPersist.cpp dom/webbrowserpersist/nsWebBrowserPersist.cpp -index a9b37ed281ca..a5971216d8b4 100644 ---- dom/webbrowserpersist/nsWebBrowserPersist.cpp -+++ dom/webbrowserpersist/nsWebBrowserPersist.cpp -@@ -13,6 +13,7 @@ - #include "nsAutoPtr.h" - #include "nsNetCID.h" - #include "nsNetUtil.h" -+#include "nsIClassOfService.h" - #include "nsIInterfaceRequestorUtils.h" - #include "nsILoadContext.h" - #include "nsIPrivateBrowsingChannel.h" -@@ -1497,6 +1498,12 @@ nsresult nsWebBrowserPersist::SaveChannelInternal( - return StartUpload(bufferedInputStream, aFile, contentType); - } - -+ // Mark save channel as throttleable. -+ nsCOMPtr cos(do_QueryInterface(aChannel)); -+ if (cos) { -+ cos->AddClassFlags(nsIClassOfService::Throttleable); -+ } -+ - // Read from the input channel - nsresult rv = NS_MaybeOpenChannelUsingAsyncOpen2(aChannel, this); - if (rv == NS_ERROR_NO_CONTENT) -commit 1e11071bc4f9 -Author: Amy Chung -Date: Sun Sep 24 00:56:04 2017 +0800 - - Bug 1360603 - Confirm the Throttleable flag on browser_saveImageURL.js. r=baku, a=sledru - - --HG-- - extra : source : 6d7610f4d26d76878b83b1f2489a96116c2bdf15 ---- - toolkit/content/contentAreaUtils.js | 4 ++++ - toolkit/content/tests/browser/browser_saveImageURL.js | 18 ++++++++++++++++++ - 2 files changed, 22 insertions(+) - -diff --git toolkit/content/contentAreaUtils.js toolkit/content/contentAreaUtils.js -index fba70c91c8a3..1492b4c1654c 100644 ---- toolkit/content/contentAreaUtils.js -+++ toolkit/content/contentAreaUtils.js -@@ -1264,6 +1264,10 @@ function openURL(aURL) { - loadUsingSystemPrincipal: true - }); - -+ if (channel) { -+ channel.channelIsForDownload = true; -+ } -+ - var uriLoader = Components.classes["@mozilla.org/uriloader;1"] - .getService(Components.interfaces.nsIURILoader); - uriLoader.openURI(channel, -diff --git toolkit/content/tests/browser/browser_saveImageURL.js toolkit/content/tests/browser/browser_saveImageURL.js -index fe10482f35dc..0d9c872921c2 100644 ---- toolkit/content/tests/browser/browser_saveImageURL.js -+++ toolkit/content/tests/browser/browser_saveImageURL.js -@@ -37,6 +37,15 @@ add_task(async function preferred_API() { - }); - - saveImageURL(url, "image.jpg", null, true, false, null, null, null, null, false); -+ let channel = content.document.docShell.currentDocumentChannel; -+ if (channel) { -+ ok(true, channel.QueryInterface(Ci.nsIHttpChannelInternal) -+ .channelIsForDownload); -+ -+ // Throttleable is the only class flag assigned to downloads. -+ ok(channel.QueryInterface(Ci.nsIClassOfService).classFlags, -+ Ci.nsIClassOfService.Throttleable); -+ } - await waitForFilePicker(); - }); - }); -@@ -64,6 +73,15 @@ add_task(async function deprecated_API() { - // pass the XUL document instead to test this interface. - let doc = document; - -+ let channel = content.document.docShell.currentDocumentChannel; -+ if (channel) { -+ ok(true, channel.QueryInterface(Ci.nsIHttpChannelInternal) -+ .channelIsForDownload); -+ -+ // Throttleable is the only class flag assigned to downloads. -+ ok(channel.QueryInterface(Ci.nsIClassOfService).classFlags, -+ Ci.nsIClassOfService.Throttleable); -+ } - saveImageURL(url, "image.jpg", null, true, false, null, doc, null, null); - await waitForFilePicker(); - }); diff --git a/www/waterfox/files/patch-bug1363038 b/www/waterfox/files/patch-bug1363038 deleted file mode 100644 index 5f8465966d5..00000000000 --- a/www/waterfox/files/patch-bug1363038 +++ /dev/null @@ -1,68 +0,0 @@ -commit 9d1887c28c05 -Author: Thomas Nguyen -Date: Tue Aug 22 14:51:44 2017 +0800 - - Bug 1363038 - Remove synchronous dispatch when worker is racing against shutdown r=hchang - - MozReview-Commit-ID: JOkOukz1fov - - --HG-- - extra : rebase_source : 9e4204cebcd4615078019a51818250ff8125efe1 ---- - .../url-classifier/nsUrlClassifierDBService.cpp | 21 ++++++++------------- - .../url-classifier/nsUrlClassifierDBService.h | 3 +++ - 2 files changed, 11 insertions(+), 13 deletions(-) - -diff --git toolkit/components/url-classifier/nsUrlClassifierDBService.cpp toolkit/components/url-classifier/nsUrlClassifierDBService.cpp -index 3f7e3c8daaac..074bfc583b93 100644 ---- toolkit/components/url-classifier/nsUrlClassifierDBService.cpp -+++ toolkit/components/url-classifier/nsUrlClassifierDBService.cpp -@@ -1616,12 +1616,6 @@ nsUrlClassifierDBService::Init() - ReadTablesFromPrefs(); - nsresult rv; - -- { -- // Force PSM loading on main thread -- nsCOMPtr dummy = do_CreateInstance(NS_CRYPTO_HASH_CONTRACTID, &rv); -- NS_ENSURE_SUCCESS(rv, rv); -- } -- - { - // Force nsIUrlClassifierUtils loading on main thread. - nsCOMPtr dummy = -@@ -2278,13 +2272,14 @@ nsUrlClassifierDBService::Shutdown() - // is to avoid racing for Classifier::mUpdateThread - // between main thread and the worker thread. (Both threads - // would access Classifier::mUpdateThread.) -- using Worker = nsUrlClassifierDBServiceWorker; -- RefPtr r = NewRunnableMethod( -- "nsUrlClassifierDBServiceWorker::FlushAndDisableAsyncUpdate", -- mWorker, -- &Worker::FlushAndDisableAsyncUpdate); -- SyncRunnable::DispatchToThread(gDbBackgroundThread, r); -- -+ if (mWorker->IsDBOpened()) { -+ using Worker = nsUrlClassifierDBServiceWorker; -+ RefPtr r = NewRunnableMethod( -+ "nsUrlClassifierDBServiceWorker::FlushAndDisableAsyncUpdate", -+ mWorker, -+ &Worker::FlushAndDisableAsyncUpdate); -+ SyncRunnable::DispatchToThread(gDbBackgroundThread, r); -+ } - // At this point the update thread has been shut down and - // the worker thread should only have at most one event, - // which is the callback event. -diff --git toolkit/components/url-classifier/nsUrlClassifierDBService.h toolkit/components/url-classifier/nsUrlClassifierDBService.h -index 13987b0ed2ee..8d284f5b0842 100644 ---- toolkit/components/url-classifier/nsUrlClassifierDBService.h -+++ toolkit/components/url-classifier/nsUrlClassifierDBService.h -@@ -227,6 +227,9 @@ public: - // will be nulled out in NotifyUpdateObserver. - bool IsBusyUpdating() const { return !!mUpdateObserver; } - -+ // Check the DB ready state of the worker thread -+ bool IsDBOpened() const { return !!mClassifier; } -+ - // Delegate Classifier to disable async update. If there is an - // ongoing update on the update thread, we will be blocked until - // the background update is done and callback is fired. diff --git a/www/waterfox/files/patch-bug1370508 b/www/waterfox/files/patch-bug1370508 deleted file mode 100644 index 3f5ffc992a6..00000000000 --- a/www/waterfox/files/patch-bug1370508 +++ /dev/null @@ -1,79 +0,0 @@ -commit c40f44ef9b35 -Author: Xidorn Quan -Date: Wed Aug 9 19:57:33 2017 +1000 - - Bug 1370508 - Enable stylo on generic XML documents. r=heycam - - MozReview-Commit-ID: 4XQ9RPQ7oa1 - - --HG-- - extra : rebase_source : 74e411e2280e818fc1fbd2efda677565cfa2f8b6 ---- - dom/base/nsDocument.cpp | 3 +-- - layout/reftests/w3c-css/failures.list | 4 ++++ - layout/reftests/w3c-css/received/reftest.list | 2 +- - layout/xul/crashtests/crashtests.list | 2 +- - testing/web-platform/meta/css/css-namespaces-3/syntax-013.xml.ini | 4 ++++ - 5 files changed, 11 insertions(+), 4 deletions(-) - -diff --git dom/base/nsDocument.cpp dom/base/nsDocument.cpp -index 2a01e6ec3a67..66a860ff3257 100644 ---- dom/base/nsDocument.cpp -+++ dom/base/nsDocument.cpp -@@ -13293,8 +13293,7 @@ nsIDocument::UpdateStyleBackendType() - mStyleBackendType = StyleBackendType::Servo; - } else if (!mDocumentContainer) { - NS_WARNING("stylo: No docshell yet, assuming Gecko style system"); -- } else if ((IsHTMLOrXHTML() || IsSVGDocument()) && -- IsContentDocument()) { -+ } else if (!IsXULDocument() && IsContentDocument()) { - // Disable stylo for about: pages other than about:blank, since - // they tend to use unsupported selectors like XUL tree pseudos. - bool isAbout = false; -diff --git layout/reftests/w3c-css/failures.list layout/reftests/w3c-css/failures.list -index 966f69ff9ae0..1560f4ad673d 100644 ---- layout/reftests/w3c-css/failures.list -+++ layout/reftests/w3c-css/failures.list -@@ -314,3 +314,7 @@ fuzzy(255,2808) css-multicol-1/multicol-rule-large-001.xht - fails-if(!styloVsGecko) css-multicol-1/multicol-fill-auto-block-children-001.xht - fails-if(!styloVsGecko) css-multicol-1/multicol-fill-auto-block-children-002.xht - fails-if(!styloVsGecko) css-multicol-1/multicol-span-all-block-sibling-003.xht -+ -+#### CSS Namespaces 3 ############################################## -+ -+fails-if(stylo||styloVsGecko) css-namespaces-3/syntax-013.xml -diff --git layout/reftests/w3c-css/received/reftest.list layout/reftests/w3c-css/received/reftest.list -index eb6151266acd..128d1fcf8121 100644 ---- layout/reftests/w3c-css/received/reftest.list -+++ layout/reftests/w3c-css/received/reftest.list -@@ -205,7 +205,7 @@ fails-if(!styloVsGecko) == css-multicol-1/multicol-zero-height-001.xht css-multi - == css-namespaces-3/syntax-010.xml css-namespaces-3/reftest/ref-lime-3.xml - == css-namespaces-3/syntax-011.xml css-namespaces-3/reftest/ref-lime-6.xml - == css-namespaces-3/syntax-012.xml css-namespaces-3/reftest/ref-lime-3.xml --== css-namespaces-3/syntax-013.xml css-namespaces-3/reftest/ref-lime-5.xml -+fails-if(stylo||styloVsGecko) == css-namespaces-3/syntax-013.xml css-namespaces-3/reftest/ref-lime-5.xml # bug 1388911 - == css-namespaces-3/syntax-014.xml css-namespaces-3/reftest/ref-lime-3.xml - == css-namespaces-3/syntax-015.xml css-namespaces-3/reftest/ref-lime-1.xml - fails-if(!styloVsGecko) == css-values-3/attr-color-invalid-cast.html css-values-3/reference/200-200-green.html -diff --git layout/xul/crashtests/crashtests.list layout/xul/crashtests/crashtests.list -index c1445cb5ec7a..e60af3526383 100644 ---- layout/xul/crashtests/crashtests.list -+++ layout/xul/crashtests/crashtests.list -@@ -1,6 +1,6 @@ - load 131008-1.xul - load 137216-1.xul --load 140218-1.xml -+asserts-if(stylo,3) load 140218-1.xml - load 151826-1.xul - load 168724-1.xul - load 189814-1.xul -diff --git testing/web-platform/meta/css/css-namespaces-3/syntax-013.xml.ini testing/web-platform/meta/css/css-namespaces-3/syntax-013.xml.ini -new file mode 100644 -index 000000000000..b034ccf978f5 ---- /dev/null -+++ testing/web-platform/meta/css/css-namespaces-3/syntax-013.xml.ini -@@ -0,0 +1,4 @@ -+[syntax-013.xml] -+ type: reftest -+ expected: -+ if stylo: FAIL diff --git a/www/waterfox/files/patch-bug1370791 b/www/waterfox/files/patch-bug1370791 deleted file mode 100644 index 038094fd6fb..00000000000 --- a/www/waterfox/files/patch-bug1370791 +++ /dev/null @@ -1,104 +0,0 @@ -commit 4ab22d92be00 -Author: Gijs Kruitbosch -Date: Wed Oct 4 19:12:40 2017 +0100 - - Bug 1370791 - Use CUI listener and an attribute to toggle hiding/showing the new tab button. r=jaws, a=ritu - - MozReview-Commit-ID: DaKohSCnrJn - - --HG-- - extra : source : 3894d341fe1631dc755e5b16b3a286ec4e741991 - extra : amend_source : 14a18fd29a60434f84664ee21eb245397a87f160 ---- - browser/base/content/browser.css | 4 +-- - browser/base/content/tabbrowser.xml | 49 +++++++++++++++++++++++++++++++++++++ - 2 files changed, 51 insertions(+), 2 deletions(-) - -diff --git browser/base/content/browser.css browser/base/content/browser.css -index 8afcbf4a5f48..4527cd480fb0 100644 ---- browser/base/content/browser.css -+++ browser/base/content/browser.css -@@ -114,9 +114,9 @@ tabbrowser { - } - - #tabbrowser-tabs:not([overflow="true"]) ~ #alltabs-button, --#tabbrowser-tabs:not([overflow="true"]) + #new-tab-button, -+#tabbrowser-tabs[hasadjacentnewtabbutton]:not([overflow="true"]) ~ #new-tab-button, - #tabbrowser-tabs[overflow="true"] > .tabbrowser-arrowscrollbox > .tabs-newtab-button, --#TabsToolbar[currentset]:not([currentset*="tabbrowser-tabs,new-tab-button"]) > #tabbrowser-tabs > .tabbrowser-arrowscrollbox > .tabs-newtab-button, -+#tabbrowser-tabs:not([hasadjacentnewtabbutton]) > .tabbrowser-arrowscrollbox > .tabs-newtab-button, - #TabsToolbar[customizing="true"] > #tabbrowser-tabs > .tabbrowser-arrowscrollbox > .tabs-newtab-button { - visibility: collapse; - } -diff --git browser/base/content/tabbrowser.xml browser/base/content/tabbrowser.xml -index 7575a985eeba..7e6c321e5dee 100644 ---- browser/base/content/tabbrowser.xml -+++ browser/base/content/tabbrowser.xml -@@ -5808,11 +5808,58 @@ - ]]> - - -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ - - -Date: Wed Mar 14 13:30:53 2018 -0500 - - Bug 1372107 - Allow browser to be started despite Autoconfig errors. r=florian, a=ritu - - MozReview-Commit-ID: of8cdUMedC - - --HG-- - extra : rebase_source : d58039b1f2e268c7a0af77e9a0680f759f203d99 - extra : source : dad020b0bb45903972c2856cc3a2968f39a27635 ---- - extensions/pref/autoconfig/src/nsReadConfig.cpp | 27 +++++++++++++------------ - 1 file changed, 14 insertions(+), 13 deletions(-) - -diff --git extensions/pref/autoconfig/src/nsReadConfig.cpp extensions/pref/autoconfig/src/nsReadConfig.cpp -index a87b5b2c1bd4..8939fdc268eb 100644 ---- extensions/pref/autoconfig/src/nsReadConfig.cpp -+++ extensions/pref/autoconfig/src/nsReadConfig.cpp -@@ -36,35 +36,35 @@ extern nsresult CentralizedAdminPrefManagerInit(); - extern nsresult CentralizedAdminPrefManagerFinish(); - - --static void DisplayError(void) -+static nsresult DisplayError(void) - { - nsresult rv; - - nsCOMPtr promptService = do_GetService("@mozilla.org/embedcomp/prompt-service;1"); - if (!promptService) -- return; -+ return NS_ERROR_FAILURE; - - nsCOMPtr bundleService = do_GetService(NS_STRINGBUNDLE_CONTRACTID); - if (!bundleService) -- return; -+ return NS_ERROR_FAILURE; - - nsCOMPtr bundle; - bundleService->CreateBundle("chrome://autoconfig/locale/autoconfig.properties", - getter_AddRefs(bundle)); - if (!bundle) -- return; -+ return NS_ERROR_FAILURE; - - nsXPIDLString title; - rv = bundle->GetStringFromName("readConfigTitle", getter_Copies(title)); - if (NS_FAILED(rv)) -- return; -+ return rv; - - nsXPIDLString err; - rv = bundle->GetStringFromName("readConfigMsg", getter_Copies(err)); - if (NS_FAILED(rv)) -- return; -+ return rv; - -- promptService->Alert(nullptr, title.get(), err.get()); -+ return promptService->Alert(nullptr, title.get(), err.get()); - } - - // nsISupports Implementation -@@ -101,12 +101,13 @@ NS_IMETHODIMP nsReadConfig::Observe(nsISupports *aSubj - if (!nsCRT::strcmp(aTopic, NS_PREFSERVICE_READ_TOPIC_ID)) { - rv = readConfigFile(); - if (NS_FAILED(rv)) { -- DisplayError(); -- -- nsCOMPtr appStartup = -- do_GetService(NS_APPSTARTUP_CONTRACTID); -- if (appStartup) -- appStartup->Quit(nsIAppStartup::eAttemptQuit); -+ rv = DisplayError(); -+ if (NS_FAILED(rv)) { -+ nsCOMPtr appStartup = -+ do_GetService(NS_APPSTARTUP_CONTRACTID); -+ if (appStartup) -+ appStartup->Quit(nsIAppStartup::eAttemptQuit); -+ } - } - } - return rv; diff --git a/www/waterfox/files/patch-bug1373371 b/www/waterfox/files/patch-bug1373371 deleted file mode 100644 index 75362fc53d3..00000000000 --- a/www/waterfox/files/patch-bug1373371 +++ /dev/null @@ -1,44 +0,0 @@ -commit 94b1df91cc7f -Author: Eric Rahm -Date: Mon Jun 19 17:09:54 2017 -0700 - - Bug 1373371 - Properly convert index in RemoveElementsAt. r=froydnj, a=ritu - - MozReview-Commit-ID: 2CRrUmOxA9B - - --HG-- - extra : source : 337103b85c025be555c107c7710ebe25d2feb6ed ---- - xpcom/ds/nsTArray.h | 12 +++++++++--- - 1 file changed, 9 insertions(+), 3 deletions(-) - -diff --git xpcom/ds/nsTArray.h xpcom/ds/nsTArray.h -index 4e9b57126bfb..e0244846aca3 100644 ---- xpcom/ds/nsTArray.h -+++ xpcom/ds/nsTArray.h -@@ -13,6 +13,7 @@ - #include "mozilla/Assertions.h" - #include "mozilla/Attributes.h" - #include "mozilla/BinarySearch.h" -+#include "mozilla/CheckedInt.h" - #include "mozilla/fallible.h" - #include "mozilla/MathAlgorithms.h" - #include "mozilla/MemoryReporting.h" -@@ -2053,9 +2054,14 @@ void - nsTArray_Impl::RemoveElementsAt(index_type aStart, size_type aCount) - { - MOZ_ASSERT(aCount == 0 || aStart < Length(), "Invalid aStart index"); -- MOZ_ASSERT(aStart + aCount <= Length(), "Invalid length"); -- // Check that the previous assert didn't overflow -- MOZ_ASSERT(aStart <= aStart + aCount, "Start index plus length overflows"); -+ -+ mozilla::CheckedInt rangeEnd = aStart; -+ rangeEnd += aCount; -+ -+ if (MOZ_UNLIKELY(!rangeEnd.isValid() || rangeEnd.value() > Length())) { -+ InvalidArrayIndex_CRASH(aStart, Length()); -+ } -+ - DestructRange(aStart, aCount); - this->template ShiftData(aStart, aCount, 0, - sizeof(elem_type), diff --git a/www/waterfox/files/patch-bug1377158 b/www/waterfox/files/patch-bug1377158 deleted file mode 100644 index dc438563571..00000000000 --- a/www/waterfox/files/patch-bug1377158 +++ /dev/null @@ -1,285 +0,0 @@ -commit 9e809e01c262 -Author: Xidorn Quan -Date: Thu Aug 3 11:24:55 2017 +1000 - - Bug 1377158 - (Part 1) Set style backend to stylo when SVG is used as an image. r=heycam - - MozReview-Commit-ID: 9FnA8X84h87 - - --HG-- - extra : rebase_source : 49a6140c4c78c35f755710934c798ce46dafa213 ---- - dom/base/nsDocument.cpp | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git dom/base/nsDocument.cpp dom/base/nsDocument.cpp -index 3585a7e222df..b4773160af92 100644 ---- dom/base/nsDocument.cpp -+++ dom/base/nsDocument.cpp -@@ -13219,7 +13219,10 @@ nsIDocument::UpdateStyleBackendType() - - #ifdef MOZ_STYLO - if (nsLayoutUtils::StyloEnabled()) { -- if (!mDocumentContainer) { -+ if (IsBeingUsedAsImage()) { -+ // Enable stylo for SVG-as-image. -+ mStyleBackendType = StyleBackendType::Servo; -+ } else if (!mDocumentContainer) { - NS_WARNING("stylo: No docshell yet, assuming Gecko style system"); - } else if ((IsHTMLOrXHTML() || IsSVGDocument()) && - IsContentDocument()) { - -commit e418f1ccf520 -Author: KuoE0 -Date: Mon Jul 24 11:51:20 2017 +0800 - - Bug 1377158 - (Part 2) Add the info of StyloEnabled() to hash function to make reftests of styloVsGecko get the correct caches. r=heycam - - MozReview-Commit-ID: 7cyXheHQ7Ot - - --HG-- - extra : rebase_source : 4a92de63228cb2a138d95d8f366b39122dbdc05e ---- - image/ImageCacheKey.cpp | 20 ++++++++++++++++---- - image/ImageCacheKey.h | 7 ++++++- - 2 files changed, 22 insertions(+), 5 deletions(-) - -diff --git image/ImageCacheKey.cpp image/ImageCacheKey.cpp -index c3327155c1cd..2dfdc7c763cc 100644 ---- image/ImageCacheKey.cpp -+++ image/ImageCacheKey.cpp -@@ -8,6 +8,7 @@ - #include "mozilla/Move.h" - #include "ImageURL.h" - #include "nsHostObjectProtocolHandler.h" -+#include "nsLayoutUtils.h" - #include "nsString.h" - #include "mozilla/dom/File.h" - #include "mozilla/dom/workers/ServiceWorkerManager.h" -@@ -53,6 +54,7 @@ ImageCacheKey::ImageCacheKey(nsIURI* aURI, - , mOriginAttributes(aAttrs) - , mControlledDocument(GetControlledDocumentToken(aDocument)) - , mIsChrome(URISchemeIs(mURI, "chrome")) -+ , mIsStyloEnabled(nsLayoutUtils::StyloEnabled()) - { - NS_ENSURE_SUCCESS_VOID(aRv); - -@@ -62,7 +64,8 @@ ImageCacheKey::ImageCacheKey(nsIURI* aURI, - mBlobSerial = BlobSerial(mURI); - } - -- mHash = ComputeHash(mURI, mBlobSerial, mOriginAttributes, mControlledDocument); -+ mHash = ComputeHash(mURI, mBlobSerial, mOriginAttributes, mControlledDocument, -+ mIsStyloEnabled); - } - - ImageCacheKey::ImageCacheKey(ImageURL* aURI, -@@ -72,6 +75,7 @@ ImageCacheKey::ImageCacheKey(ImageURL* aURI, - , mOriginAttributes(aAttrs) - , mControlledDocument(GetControlledDocumentToken(aDocument)) - , mIsChrome(URISchemeIs(mURI, "chrome")) -+ , mIsStyloEnabled(nsLayoutUtils::StyloEnabled()) - { - MOZ_ASSERT(aURI); - -@@ -79,7 +83,8 @@ ImageCacheKey::ImageCacheKey(ImageURL* aURI, - mBlobSerial = BlobSerial(mURI); - } - -- mHash = ComputeHash(mURI, mBlobSerial, mOriginAttributes, mControlledDocument); -+ mHash = ComputeHash(mURI, mBlobSerial, mOriginAttributes, mControlledDocument, -+ mIsStyloEnabled); - } - - ImageCacheKey::ImageCacheKey(const ImageCacheKey& aOther) -@@ -89,6 +94,7 @@ ImageCacheKey::ImageCacheKey(const ImageCacheKey& aOther) - , mControlledDocument(aOther.mControlledDocument) - , mHash(aOther.mHash) - , mIsChrome(aOther.mIsChrome) -+ , mIsStyloEnabled(aOther.mIsStyloEnabled) - { } - - ImageCacheKey::ImageCacheKey(ImageCacheKey&& aOther) -@@ -98,11 +104,15 @@ ImageCacheKey::ImageCacheKey(ImageCacheKey&& aOther) - , mControlledDocument(aOther.mControlledDocument) - , mHash(aOther.mHash) - , mIsChrome(aOther.mIsChrome) -+ , mIsStyloEnabled(aOther.mIsStyloEnabled) - { } - - bool - ImageCacheKey::operator==(const ImageCacheKey& aOther) const - { -+ if (mIsStyloEnabled != aOther.mIsStyloEnabled) { -+ return false; -+ } - // Don't share the image cache between a controlled document and anything else. - if (mControlledDocument != aOther.mControlledDocument) { - return false; -@@ -132,7 +142,8 @@ ImageCacheKey::Spec() const - ImageCacheKey::ComputeHash(ImageURL* aURI, - const Maybe& aBlobSerial, - const OriginAttributes& aAttrs, -- void* aControlledDocument) -+ void* aControlledDocument, -+ bool aIsStyloEnabled) - { - // Since we frequently call Hash() several times in a row on the same - // ImageCacheKey, as an optimization we compute our hash once and store it. -@@ -142,7 +153,8 @@ ImageCacheKey::ComputeHash(ImageURL* aURI, - aAttrs.CreateSuffix(suffix); - - return AddToHash(0, aURI->ComputeHash(aBlobSerial), -- HashString(suffix), HashString(ptr)); -+ HashString(suffix), HashString(ptr), -+ aIsStyloEnabled); - } - - /* static */ void* -diff --git image/ImageCacheKey.h image/ImageCacheKey.h -index c5acd0ea495e..6d676ccb6338 100644 ---- image/ImageCacheKey.h -+++ image/ImageCacheKey.h -@@ -58,7 +58,8 @@ private: - static PLDHashNumber ComputeHash(ImageURL* aURI, - const Maybe& aBlobSerial, - const OriginAttributes& aAttrs, -- void* aControlledDocument); -+ void* aControlledDocument, -+ bool aIsStyloEnabled); - static void* GetControlledDocumentToken(nsIDocument* aDocument); - - RefPtr mURI; -@@ -67,6 +68,10 @@ private: - void* mControlledDocument; - PLDHashNumber mHash; - bool mIsChrome; -+ // To prevent the reftests of styloVsGecko taking the same image cache after -+ // refreshing, we need to store different caches of stylo and gecko. So, we -+ // also consider the info of StyloEnabled() in ImageCacheKey. -+ bool mIsStyloEnabled; - }; - - } // namespace image - -commit c95ed14053c7 -Author: KuoE0 -Date: Thu Jul 27 14:06:54 2017 +0800 - - Bug 1377158 - (Part 3) Update the expectation of test cases. r=bholley,heycam - - MozReview-Commit-ID: K3gmTudkzol - - --HG-- - extra : rebase_source : 32ba6ceb37fa2f29cde8d2534d73108e87dfa406 ---- - layout/reftests/css-break/reftest.list | 2 +- - layout/reftests/svg/as-image/reftest.list | 2 +- - layout/reftests/table-background/reftest.list | 8 ++++---- - 3 files changed, 6 insertions(+), 6 deletions(-) - -diff --git layout/reftests/css-break/reftest.list layout/reftests/css-break/reftest.list -index 4364cf7d93fc..54cfbcbbeefc 100644 ---- layout/reftests/css-break/reftest.list -+++ layout/reftests/css-break/reftest.list -@@ -2,7 +2,7 @@ default-preferences pref(layout.css.box-decoration-break.enabled,true) - - == box-decoration-break-1.html box-decoration-break-1-ref.html - fuzzy(1,20) fuzzy-if(skiaContent,1,700) fuzzy-if(webrender,4-4,3273-3273) == box-decoration-break-with-inset-box-shadow-1.html box-decoration-break-with-inset-box-shadow-1-ref.html --fuzzy(16,460) fuzzy-if(Android,10,3673) fuzzy-if(skiaContent,57,374) == box-decoration-break-with-outset-box-shadow-1.html box-decoration-break-with-outset-box-shadow-1-ref.html -+fuzzy(16,460) fuzzy-if(Android,10,3673) fuzzy-if(skiaContent,57,374) fuzzy-if(styloVsGecko,1,420) == box-decoration-break-with-outset-box-shadow-1.html box-decoration-break-with-outset-box-shadow-1-ref.html # Bug 1386543 - random-if(!gtkWidget) HTTP(..) == box-decoration-break-border-image.html box-decoration-break-border-image-ref.html - == box-decoration-break-block-border-padding.html box-decoration-break-block-border-padding-ref.html - == box-decoration-break-block-margin.html box-decoration-break-block-margin-ref.html -diff --git layout/reftests/svg/as-image/reftest.list layout/reftests/svg/as-image/reftest.list -index d5feb66693ad..acff18d18b50 100644 ---- layout/reftests/svg/as-image/reftest.list -+++ layout/reftests/svg/as-image/reftest.list -@@ -58,7 +58,7 @@ fuzzy(1,2) fuzzy-if(azureSkia,1,40000) == canvas-drawImage-alpha-2.html canvas-d - # context-fill: - == context-fill-01.html blue100x100-ref.html - test-pref(svg.context-properties.content.enabled,true) == context-fill-01.html lime100x100-ref.html --== context-fill-02.html transparent100x100-w-border-ref.html -+fails-if(styloVsGecko||stylo) == context-fill-02.html transparent100x100-w-border-ref.html # Bug 1380590 - test-pref(svg.context-properties.content.enabled,true) == context-fill-02.html lime100x100-w-border-ref.html - test-pref(svg.context-properties.content.enabled,true) == context-fill-03.html lime100x100-50pct-ref.html - # fuzz because on win8 the r & b components are off by one -diff --git layout/reftests/table-background/reftest.list layout/reftests/table-background/reftest.list -index d8a138112527..df2f629d0d7f 100644 ---- layout/reftests/table-background/reftest.list -+++ layout/reftests/table-background/reftest.list -@@ -1,11 +1,11 @@ - # these could be moved to crashtests - != backgr_border-table-cell.html empty.html --!= backgr_border-table-column-group.html empty.html -+fuzzy-if(styloVsGecko,5,330) != backgr_border-table-column-group.html empty.html # Bug 1386543 - # This seems to be caused by bug 527825 --asserts-if(gtkWidget,0-12) != backgr_border-table-column.html empty.html -+fuzzy-if(styloVsGecko,5,561) asserts-if(gtkWidget,0-12) != backgr_border-table-column.html empty.html # Bug 1386543 - asserts-if(gtkWidget,0-6) != backgr_border-table-quirks.html empty.html --!= backgr_border-table-row-group.html empty.html --!= backgr_border-table-row.html empty.html -+fuzzy-if(styloVsGecko,1,168) != backgr_border-table-row-group.html empty.html # Bug 1386543 -+fuzzy-if(styloVsGecko,1,168) != backgr_border-table-row.html empty.html # Bug 1386543 - != backgr_border-table.html empty.html - != backgr_fixed-bg.html empty.html - != backgr_index.html empty.html - -commit dd7cb82fb7b5 -Author: KuoE0 -Date: Fri Jul 28 00:23:05 2017 +0800 - - Bug 1377158 - (Part 4) Reduce the assertion cost to check reconstruction frame hint. r=bholley,heycam - - The original assertion took too long time to check nsStyleChangeList. It - caused the test case with many elements timed-out and failed. - - MozReview-Commit-ID: FpNZvdQFTtR - - --HG-- - extra : rebase_source : c68072448061c4dcc8399131924cf718a5e53700 ---- - layout/base/nsStyleChangeList.cpp | 30 +++++++++++++++++++----------- - 1 file changed, 19 insertions(+), 11 deletions(-) - -diff --git layout/base/nsStyleChangeList.cpp layout/base/nsStyleChangeList.cpp -index 6f68cded3814..af6256f46c22 100644 ---- layout/base/nsStyleChangeList.cpp -+++ layout/base/nsStyleChangeList.cpp -@@ -41,17 +41,25 @@ nsStyleChangeList::AppendChange(nsIFrame* aFrame, nsIContent* aContent, nsChange - (aHint & nsChangeHint_NeedReflow), - "Reflow hint bits set without actually asking for a reflow"); - -- // If Servo fires reconstruct at a node, it is the only change hint fired at -- // that node. -- if (IsServo()) { -- for (size_t i = 0; i < Length(); ++i) { -- MOZ_ASSERT(!aContent || !((aHint | (*this)[i].mHint) & nsChangeHint_ReconstructFrame) || -- (*this)[i].mContent != aContent); -- } -- } else { -- // Filter out all other changes for same content for Gecko (Servo asserts against this -- // case above). -- if (aContent && (aHint & nsChangeHint_ReconstructFrame)) { -+ if (aContent && (aHint & nsChangeHint_ReconstructFrame)) { -+ // If Servo fires reconstruct at a node, it is the only change hint fired at -+ // that node. -+ if (IsServo()) { -+ // Note: Because we check whether |aHint| is a reconstruct above (which is -+ // necessary to avoid debug test timeouts on certain crashtests), this check -+ // will not find bugs where we add a non-reconstruct hint for an element after -+ // adding a reconstruct. This is ok though, since ProcessRestyledFrames will -+ // handle that case via mDestroyedFrames. -+ for (size_t i = 0; i < Length(); ++i) { -+ MOZ_ASSERT(aContent != (*this)[i].mContent || -+ !((*this)[i].mHint & nsChangeHint_ReconstructFrame), -+ "Should not append a non-ReconstructFrame hint after \ -+ appending a ReconstructFrame hint for the same \ -+ content."); -+ } -+ } else { -+ // Filter out all other changes for same content for Gecko (Servo asserts against this -+ // case above). - // NOTE: This is captured by reference to please static analysis. - // Capturing it by value as a pointer should be fine in this case. - RemoveElementsBy([&](const nsStyleChangeData& aData) { diff --git a/www/waterfox/files/patch-bug1377587 b/www/waterfox/files/patch-bug1377587 deleted file mode 100644 index 5e58f504cff..00000000000 --- a/www/waterfox/files/patch-bug1377587 +++ /dev/null @@ -1,929 +0,0 @@ -commit 2b68b38709b1 -Author: Andrew McCreight -Date: Tue Aug 22 14:24:11 2017 -0700 - - Bug 1377587, part 1 - Always act like __exposedProps__ is missing. r=krizsa - - This patch gently removes support for __exposedProps__ by changing - ExposedPropertiesOnly::check() to always return false, while still - failing silently in deny for some kinds of access. - - The tests that I changed all involve testing the behavior with - __exposedProps__. I adjusted them to expect it to fail, or to adjust - the error message they get when they fail. That seemed better than - deleting them entirely. - - Note that test_bug1065185.html had a bug, so that it never executed - the first case. I fixed that, and then fixed up the test to work when - __exposedProps__ is not supported. - - This also removes various bits of the test framework that use - __exposedProps__, but don't actually need to. - - MozReview-Commit-ID: 8fvkAmITmXY - - --HG-- - extra : rebase_source : ef7e2c55adc12511f17f3865ebb46c343875f0b3 ---- - addon-sdk/source/lib/sdk/console/plain-text.js | 10 -- - addon-sdk/source/lib/sdk/test/loader.js | 5 - - .../addons/e10s-content/lib/test-content-script.js | 6 +- - addon-sdk/source/test/test-content-script.js | 6 +- - devtools/server/tests/unit/test_objectgrips-17.js | 4 - - dom/base/nsDeprecatedOperationList.h | 1 - - dom/base/test/chrome/cpows_child.js | 12 +- - dom/locales/en-US/chrome/dom/dom.properties | 2 - - js/xpconnect/src/XPCJSRuntime.cpp | 1 - - js/xpconnect/src/xpcprivate.h | 1 - - js/xpconnect/tests/chrome/test_bug1065185.html | 6 +- - js/xpconnect/tests/chrome/test_cows.xul | 80 +++------ - js/xpconnect/tests/chrome/test_exposeInDerived.xul | 13 +- - js/xpconnect/tests/unit/test_bug1082450.js | 20 +-- - js/xpconnect/tests/unit/test_bug780370.js | 7 +- - js/xpconnect/tests/unit/test_bug813901.js | 2 +- - js/xpconnect/tests/unit/test_bug853709.js | 4 +- - js/xpconnect/tests/unit/test_bug854558.js | 2 +- - js/xpconnect/tests/unit/test_bug930091.js | 2 +- - js/xpconnect/wrappers/AccessCheck.cpp | 179 --------------------- - js/xpconnect/wrappers/AccessCheck.h | 11 +- - js/xpconnect/wrappers/ChromeObjectWrapper.h | 6 +- - js/xpconnect/wrappers/WrapperFactory.cpp | 4 +- - js/xpconnect/wrappers/XrayWrapper.cpp | 2 +- - testing/mochitest/tests/SimpleTest/ChromePowers.js | 9 -- - .../specialpowers/content/MockPermissionPrompt.jsm | 12 -- - .../components/addoncompat/RemoteAddonsParent.jsm | 2 +- - 27 files changed, 74 insertions(+), 335 deletions(-) - -diff --git addon-sdk/source/lib/sdk/console/plain-text.js addon-sdk/source/lib/sdk/console/plain-text.js -index 0e44cf106d52..07b8eb629e12 100644 ---- addon-sdk/source/lib/sdk/console/plain-text.js -+++ addon-sdk/source/lib/sdk/console/plain-text.js -@@ -62,16 +62,6 @@ function PlainTextConsole(print, innerID) { - } - }); - -- // We defined the `__exposedProps__` in our console chrome object. -- // -- // Meanwhile we're investigating with the platform team if `__exposedProps__` -- // are needed, or are just a left-over. -- -- console.__exposedProps__ = Object.keys(ConsoleAPI.prototype).reduce(function(exposed, prop) { -- exposed[prop] = "r"; -- return exposed; -- }, {}); -- - Object.freeze(console); - return console; - }; -diff --git addon-sdk/source/lib/sdk/test/loader.js addon-sdk/source/lib/sdk/test/loader.js -index 33ba2ca5a029..b555de63f02a 100644 ---- addon-sdk/source/lib/sdk/test/loader.js -+++ addon-sdk/source/lib/sdk/test/loader.js -@@ -53,11 +53,6 @@ function HookedPlainTextConsole(hook, print, innerID) { - this.exception = hook.bind(null, "exception", innerID); - this.time = hook.bind(null, "time", innerID); - this.timeEnd = hook.bind(null, "timeEnd", innerID); -- -- this.__exposedProps__ = { -- log: "rw", info: "rw", warn: "rw", error: "rw", debug: "rw", -- exception: "rw", time: "rw", timeEnd: "rw" -- }; - } - - // Creates a custom loader instance whose console module is hooked in order -diff --git addon-sdk/source/test/addons/e10s-content/lib/test-content-script.js addon-sdk/source/test/addons/e10s-content/lib/test-content-script.js -index 477895e40481..3dccfec618d3 100644 ---- addon-sdk/source/test/addons/e10s-content/lib/test-content-script.js -+++ addon-sdk/source/test/addons/e10s-content/lib/test-content-script.js -@@ -444,7 +444,7 @@ exports["test Highlight toString Behavior"] = createProxyTest("", function (help - let strToString = helper.rawWindow.Object.prototype.toString.call(""); - assert.ok(/\[object String.*\]/.test(strToString), "strings are strings"); - -- let o = {__exposedProps__:{}}; -+ let o = {}; - let objToString = helper.rawWindow.Object.prototype.toString.call(o); - assert.ok(/\[object Object.*\]/.test(objToString), "objects are objects"); - -@@ -622,10 +622,6 @@ exports["test Functions"] = createProxyTest("", function (helper) { - helper.rawWindow.isEqual = function isEqual(a, b) { - return a == b; - }; -- // bug 784116: workaround in order to allow proxy code to cache proxies on -- // these functions: -- helper.rawWindow.callFunction.__exposedProps__ = {__proxy: 'rw'}; -- helper.rawWindow.isEqual.__exposedProps__ = {__proxy: 'rw'}; - - helper.createWorker( - 'new ' + function ContentScriptScope() { -diff --git addon-sdk/source/test/test-content-script.js addon-sdk/source/test/test-content-script.js -index 709fb5a3aa91..a02e66f65eea 100644 ---- addon-sdk/source/test/test-content-script.js -+++ addon-sdk/source/test/test-content-script.js -@@ -444,7 +444,7 @@ exports["test Highlight toString Behavior"] = createProxyTest("", function (help - let strToString = helper.rawWindow.Object.prototype.toString.call(""); - assert.ok(/\[object String.*\]/.test(strToString), "strings are strings"); - -- let o = {__exposedProps__:{}}; -+ let o = {}; - let objToString = helper.rawWindow.Object.prototype.toString.call(o); - assert.ok(/\[object Object.*\]/.test(objToString), "objects are objects"); - -@@ -622,10 +622,6 @@ exports["test Functions"] = createProxyTest("", function (helper) { - helper.rawWindow.isEqual = function isEqual(a, b) { - return a == b; - }; -- // bug 784116: workaround in order to allow proxy code to cache proxies on -- // these functions: -- helper.rawWindow.callFunction.__exposedProps__ = {__proxy: 'rw'}; -- helper.rawWindow.isEqual.__exposedProps__ = {__proxy: 'rw'}; - - helper.createWorker( - 'new ' + function ContentScriptScope() { -diff --git dom/base/nsDeprecatedOperationList.h dom/base/nsDeprecatedOperationList.h -index 2523187c63a7..adcf4d9d8202 100644 ---- dom/base/nsDeprecatedOperationList.h -+++ dom/base/nsDeprecatedOperationList.h -@@ -21,7 +21,6 @@ DEPRECATED_OPERATION(NodeValue) - DEPRECATED_OPERATION(TextContent) - DEPRECATED_OPERATION(EnablePrivilege) - DEPRECATED_OPERATION(DOMExceptionCode) --DEPRECATED_OPERATION(NoExposedProps) - DEPRECATED_OPERATION(MutationEvent) - DEPRECATED_OPERATION(Components) - DEPRECATED_OPERATION(PrefixedVisibilityAPI) -diff --git dom/base/test/chrome/cpows_child.js dom/base/test/chrome/cpows_child.js -index 6d240a7eaa51..fc7e3f2c9d0f 100644 ---- dom/base/test/chrome/cpows_child.js -+++ dom/base/test/chrome/cpows_child.js -@@ -105,7 +105,13 @@ function parent_test(finish) - - addMessageListener("cpows:from_parent", (msg) => { - let obj = msg.objects.obj; -- ok(obj.a == 1, "correct value from parent"); -+ if (is_remote) { -+ ok(obj.a == undefined, "__exposedProps__ should not work"); -+ } else { -+ // The same process test is not run as content, so the field can -+ // be accessed even though __exposedProps__ has been removed. -+ ok(obj.a == 1, "correct value from parent"); -+ } - - // Test that a CPOW reference to a function in the chrome process - // is callable from unprivileged content. Greasemonkey uses this -@@ -260,11 +266,11 @@ function lifetime_test(finish) - var obj = {"will_die": {"f": 1}}; - let [result] = sendRpcMessage("cpows:lifetime_test_1", {}, {obj: obj}); - ok(result == 10, "got sync result"); -- ok(obj.wont_die.f == 2, "got reverse CPOW"); -+ ok(obj.wont_die.f == undefined, "got reverse CPOW"); - obj.will_die = null; - Components.utils.schedulePreciseGC(function() { - addMessageListener("cpows:lifetime_test_3", (msg) => { -- ok(obj.wont_die.f == 2, "reverse CPOW still works"); -+ ok(obj.wont_die.f == undefined, "reverse CPOW still works"); - finish(); - }); - sendRpcMessage("cpows:lifetime_test_2"); -diff --git dom/locales/en-US/chrome/dom/dom.properties dom/locales/en-US/chrome/dom/dom.properties -index 5c94a580287a..ac9dbed58e08 100644 ---- dom/locales/en-US/chrome/dom/dom.properties -+++ dom/locales/en-US/chrome/dom/dom.properties -@@ -154,8 +154,6 @@ MediaEMENoCapabilitiesDeprecatedWarning=Calling navigator.requestMediaKeySystemA - MediaEMENoCodecsDeprecatedWarning=Calling navigator.requestMediaKeySystemAccess() (at %S) passing a candidate MediaKeySystemConfiguration containing audioCapabilities or videoCapabilities without a contentType with a “codecs” string is deprecated and will soon become unsupported. - # LOCALIZATION NOTE: Do not translate "DOMException", "code" and "name" - DOMExceptionCodeWarning=Use of DOMException’s code attribute is deprecated. Use name instead. --# LOCALIZATION NOTE: Do not translate "__exposedProps__" --NoExposedPropsWarning=Exposing chrome JS objects to content without __exposedProps__ is insecure and deprecated. See https://developer.mozilla.org/en/XPConnect_wrappers for more information. - # LOCALIZATION NOTE: Do not translate "Mutation Event" and "MutationObserver" - MutationEventWarning=Use of Mutation Events is deprecated. Use MutationObserver instead. - # LOCALIZATION NOTE: Do not translate "Components" -diff --git js/xpconnect/src/XPCJSRuntime.cpp js/xpconnect/src/XPCJSRuntime.cpp -index 455b9f8e963f..ff9aea0a41eb 100644 ---- js/xpconnect/src/XPCJSRuntime.cpp -+++ js/xpconnect/src/XPCJSRuntime.cpp -@@ -93,7 +93,6 @@ const char* const XPCJSRuntime::mStrings[] = { - "item", // IDX_ITEM - "__proto__", // IDX_PROTO - "__iterator__", // IDX_ITERATOR -- "__exposedProps__", // IDX_EXPOSEDPROPS - "eval", // IDX_EVAL - "controllers", // IDX_CONTROLLERS - "Controllers", // IDX_CONTROLLERS_CLASS -diff --git js/xpconnect/src/xpcprivate.h js/xpconnect/src/xpcprivate.h -index fb7e43c22cd0..5d877f09d301 100644 ---- js/xpconnect/src/xpcprivate.h -+++ js/xpconnect/src/xpcprivate.h -@@ -460,7 +460,6 @@ public: - IDX_ITEM , - IDX_PROTO , - IDX_ITERATOR , -- IDX_EXPOSEDPROPS , - IDX_EVAL , - IDX_CONTROLLERS , - IDX_CONTROLLERS_CLASS , -diff --git js/xpconnect/tests/chrome/test_bug1065185.html js/xpconnect/tests/chrome/test_bug1065185.html -index cdd65326f9c8..7ea81fc8aa6f 100644 ---- js/xpconnect/tests/chrome/test_bug1065185.html -+++ js/xpconnect/tests/chrome/test_bug1065185.html -@@ -25,11 +25,11 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1065185 - - var gLoadCount = 0; - function loaded() { -- switch(++gLoadCount) { -+ switch(gLoadCount++) { - case 0: -- doMonitor([]); -+ doMonitor([/access to property "a"/i]); - window[0].wrappedJSObject.probe = { a: 2, __exposedProps__: { 'a': 'r' } }; -- is(window[0].eval('probe.a'), 2, "Accessed exposed prop"); -+ is(window[0].eval('probe.a'), undefined, "Accessed exposed prop"); - endMonitor(); - break; - case 1: -diff --git js/xpconnect/tests/chrome/test_cows.xul js/xpconnect/tests/chrome/test_cows.xul -index 75c5250dd150..adfdd686540b 100644 ---- js/xpconnect/tests/chrome/test_cows.xul -+++ js/xpconnect/tests/chrome/test_cows.xul -@@ -49,13 +49,6 @@ sandbox.getCOW = getCOW; - const TEST_API = ['is', 'isnot', 'ok', 'todo_is', 'todo_isnot', 'todo']; - TEST_API.forEach(function(name) { sandbox[name] = window[name]; }); - --sandbox.alienObject = { -- __exposedProps__: {funProp: 'r'}, -- funProp: function foo(x) { -- return x + 1; -- } --}; -- - sandbox.chromeGet = function (obj, prop) { return obj[prop]; }; - - function COWTests() { -@@ -74,17 +67,6 @@ function COWTests() { - // functions like assertIsWritable(myObj, 'someproperty') might - // be useful. - -- function isProp(obj, propName, value, desc) { -- try { -- is(obj[propName], value, "getting " + propName + " on " + desc); -- ok(propName in obj, -- propName + " on " + desc + " should exist"); -- ok(Object.hasOwnProperty.call(obj, propName), -- propName + " on " + desc + " should exist"); -- } catch (e) { -- ok(false, "getting " + propName + " on " + desc + " threw " + e); -- } -- } - function isPropHidden(obj, propName, desc) { - try { - is(obj[propName], undefined, -@@ -103,7 +85,7 @@ function COWTests() { - var empty = {}; - var nonempty = {foo: 42, bar: 33}; - is(getCOW(empty).foo, undefined, -- "shouldn't throw when accessing exposed properties that doesn't exist"); -+ "shouldn't throw when accessing exposed properties that don't exist"); - - PROPS_TO_TEST.forEach(function(name) { - isPropHidden(getCOW(nonempty), name, "object without exposedProps"); -@@ -135,18 +117,12 @@ function COWTests() { - var strict = { __exposedProps__: { foo: "r" }, foo: "foo property" }; - var strictCOWr = getCOW(strict); - PROPS_TO_TEST.forEach(function(name) { -- if (name == "foo") { -- isProp(strictCOWr, name, "foo property", -- "object with exposed 'foo'"); -- } -- else { -- isPropHidden(strictCOW, name, "object with exposed 'foo'"); -- } -+ isPropHidden(strictCOW, name, "object with exposed 'foo'"); - }); -- is(getNames(strictCOWr).length, 1, -- "object with exposedProps only enumerate exposed props"); -- is(getNames(strictCOWr)[0], "foo", -- "object with exposedProps only enumerate exposed props"); -+ is(getNames(strictCOWr).length, 0, -+ "exposed props does not enumerate anything"); -+ is(getNames(strictCOWr)[0], undefined, -+ "exposed props does not enumerate anything"); - - // Test writable property - var writable = getCOW({ __exposedProps__: {foo: 'w'}}); -@@ -154,25 +130,18 @@ function COWTests() { - ok(!("foo" in writable), - "non-existing write-only property shouldn't exist"); - writable.foo = 5; -- is(chromeGet(writable, "foo"), 5, "writing to a write-only exposed prop works"); -- todo("foo" in writable, -- "existing write-only property should exist"); -- } catch (e) { -- ok(false, "writing to a write-only exposed prop shouldn't throw " + e); -- } -- try { -- writable.foo; -- todo(false, "reading from a write-only exposed prop should throw"); -+ ok(false, "writing to a write-only exposed prop should throw"); - } catch (e) { -- todo(/Permission denied/.test(e), -- "reading from a write-only exposed prop should throw"); -+ ok(/Permission denied/.test(e), -+ "writing to a write-only exposed prop should throw the right error"); - } -+ is(writable.foo, undefined, -+ "reading from a write-only exposed prop should return undefined"); - try { - delete writable.foo; -- is(chromeGet(writable, "foo"), undefined, -- "deleting a write-only exposed prop works"); -+ ok(false, "deleting a write-only exposed prop should throw"); - } catch (e) { -- ok(false, "deleting a write-only exposed prop shouldn't throw " + e); -+ ok(true, "deleting a write-only exposed prop should throw " + e); - } - - // Test readable property -@@ -180,8 +149,8 @@ function COWTests() { - foo: 5, - bar: 6 }; - try { -- isProp(getCOW(readable), "foo", 5, -- "reading from a readable exposed prop works"); -+ isPropHidden(getCOW(readable), "foo", undefined, -+ "reading from a readable exposed prop shouldn't work"); - } catch (e) { - ok(false, "reading from a readable exposed prop shouldn't throw " + e); - } -@@ -202,8 +171,7 @@ function COWTests() { - - try { - var props = getNames(getCOW(readable)); -- is(props.length, 1, "COW w/ one exposed prop should enumerate once"); -- is(props[0], 'foo', "COW w/ one exposed prop should enumerate it"); -+ is(props.length, 0, "COW w/ one exposed prop should not enumerate"); - } catch (e) { - ok(false, "COW w/ a readable prop should not raise exc " + - "on enumeration: " + e); -@@ -215,21 +183,17 @@ function COWTests() { - ok(!("foo" in readwrite), - "non-existing readwrite property shouldn't exist"); - readwrite.foo = 5; -- is(readwrite.foo, 5, "writing to a readwrite exposed prop looks like it worked"); -- is(chromeGet(readwrite, "foo"), 5, "writing to a readwrite exposed prop works"); -- ok("foo" in readwrite, -- "existing readwrite property should exist"); -+ ok(false, "writing to a readwrite exposed prop should throw"); - } catch (e) { -- ok(false, "writing to a readwrite exposed prop shouldn't throw " + e); -+ ok(/Permission denied/.test(e), -+ "writing to a readwrite exposed prop should throw the right error"); - } - try { - delete readwrite.foo; -- is(readwrite.foo, undefined, "deleting readwrite prop looks like it worked"); -- ok(!("foo" in readwrite), "deleting readwrite prop looks like it really worked"); -- is(chromeGet(readwrite, "foo"), undefined, -- "deleting a readwrite exposed prop works"); -+ ok(false, "deleting a readwrite prop should throw"); - } catch (e) { -- ok(false, "deleting a readwrite exposed prop shouldn't throw " + e); -+ ok(/Permission denied/.test(e), -+ "deleting a readwrite exposed prop should throw the right error"); - } - - // Readables and functions -diff --git js/xpconnect/tests/chrome/test_exposeInDerived.xul js/xpconnect/tests/chrome/test_exposeInDerived.xul -index 2ed3bb91e7fd..7e6c24e56db1 100644 ---- js/xpconnect/tests/chrome/test_exposeInDerived.xul -+++ js/xpconnect/tests/chrome/test_exposeInDerived.xul -@@ -17,7 +17,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=804630 - - -diff --git js/xpconnect/tests/unit/test_bug1082450.js js/xpconnect/tests/unit/test_bug1082450.js -index 07f45f06beef..5880fcbcd4e6 100644 ---- js/xpconnect/tests/unit/test_bug1082450.js -+++ js/xpconnect/tests/unit/test_bug1082450.js -@@ -5,9 +5,9 @@ function run_test() { - function checkThrows(str, rgxp) { - try { - sb.eval(str); -- do_check_true(false); -+ do_check_true(false, "eval should have thrown"); - } catch (e) { -- do_check_true(rgxp.test(e)); -+ do_check_true(rgxp.test(e), "error message should match"); - } - } - -@@ -29,12 +29,12 @@ function run_test() { - chromeCallableValueProp: 'r' } - }; - -- do_check_eq(sb.eval('exposed.simpleValueProp'), 42); -- do_check_eq(sb.eval('exposed.objectValueProp.val'), 42); -- checkThrows('exposed.getterProp;', /privileged accessor/i); -- checkThrows('exposed.setterProp = 42;', /privileged accessor/i); -- checkThrows('exposed.getterSetterProp;', /privileged accessor/i); -- checkThrows('exposed.getterSetterProp = 42;', /privileged accessor/i); -- do_check_eq(sb.eval('exposed.contentCallableValueProp()'), 42); -- checkThrows('exposed.chromeCallableValueProp();', /privileged or cross-origin callable/i); -+ do_check_eq(sb.eval('exposed.simpleValueProp'), undefined); -+ do_check_eq(sb.eval('exposed.objectValueProp'), undefined); -+ do_check_eq(sb.eval('exposed.getterProp;'), undefined); -+ do_check_eq(sb.eval('exposed.getterSetterProp;'), undefined); -+ checkThrows('exposed.setterProp = 42;', /Permission denied/i); -+ checkThrows('exposed.getterSetterProp = 42;', /Permission denied/i); -+ do_check_eq(sb.eval('exposed.contentCallableValueProp'), undefined); -+ checkThrows('exposed.chromeCallableValueProp();', /is not a function/i); - } -diff --git js/xpconnect/tests/unit/test_bug780370.js js/xpconnect/tests/unit/test_bug780370.js -index 40d6f9748015..7ae757f0cd01 100644 ---- js/xpconnect/tests/unit/test_bug780370.js -+++ js/xpconnect/tests/unit/test_bug780370.js -@@ -14,10 +14,5 @@ function run_test() - var sb = Cu.Sandbox("http://www.example.com"); - sb.obj = { foo: 42, __exposedProps__: { hasOwnProperty: 'r' } }; - do_check_eq(Cu.evalInSandbox('typeof obj.foo', sb), 'undefined', "COW works as expected"); -- try { -- Cu.evalInSandbox('obj.hasOwnProperty', sb); -- do_check_true(false); -- } catch (e) { -- do_check_true(/privileged or cross-origin callable/i.test(e)); -- } -+ do_check_eq(Cu.evalInSandbox('obj.hasOwnProperty', sb), undefined); - } -diff --git js/xpconnect/tests/unit/test_bug813901.js js/xpconnect/tests/unit/test_bug813901.js -index 42f981581b51..2efc6539e879 100644 ---- js/xpconnect/tests/unit/test_bug813901.js -+++ js/xpconnect/tests/unit/test_bug813901.js -@@ -21,5 +21,5 @@ function run_test() { - checkThrows('obj.foo = 3;', sb, /denied/); - Cu.evalInSandbox("var p = {__exposedProps__: {foo: 'rw'}};", sb); - sb.obj.__proto__ = sb.p; -- checkThrows('obj.foo = 4;', sb, /__exposedProps__/); -+ checkThrows('obj.foo = 4;', sb, /denied/); - } -diff --git js/xpconnect/tests/unit/test_bug853709.js js/xpconnect/tests/unit/test_bug853709.js -index c7e51757dc63..1667d2241f93 100644 ---- js/xpconnect/tests/unit/test_bug853709.js -+++ js/xpconnect/tests/unit/test_bug853709.js -@@ -8,7 +8,7 @@ function setupChromeSandbox() { - function checkDefineThrows(sb, obj, prop, desc) { - var result = Cu.evalInSandbox('(function() { try { Object.defineProperty(' + obj + ', "' + prop + '", ' + desc.toSource() + '); return "nothrow"; } catch (e) { return e.toString(); }})();', sb); - do_check_neq(result, 'nothrow'); -- do_check_true(!!/denied/.exec(result)); -+ do_check_true(!!/denied|prohibited/.exec(result)); - do_check_true(result.indexOf(prop) != -1); // Make sure the prop name is in the error message. - } - -@@ -19,7 +19,7 @@ function run_test() { - contentSB.chromeObj = chromeSB.chromeObj; - contentSB.chromeArr = chromeSB.chromeArr; - -- do_check_eq(Cu.evalInSandbox('chromeObj.a', contentSB), 2); -+ do_check_eq(Cu.evalInSandbox('chromeObj.a', contentSB), undefined); - try { - Cu.evalInSandbox('chromeArr[1]', contentSB); - do_check_true(false); -diff --git js/xpconnect/tests/unit/test_bug854558.js js/xpconnect/tests/unit/test_bug854558.js -index d60d23a5baf8..574194dc3f52 100644 ---- js/xpconnect/tests/unit/test_bug854558.js -+++ js/xpconnect/tests/unit/test_bug854558.js -@@ -7,5 +7,5 @@ function run_test() { - contentSB.foo = chromeSB.foo; - do_check_eq(Cu.evalInSandbox('foo.a', contentSB), undefined, "Default deny with no __exposedProps__"); - Cu.evalInSandbox('this.foo.__exposedProps__ = {a: "r"}', chromeSB); -- do_check_eq(Cu.evalInSandbox('foo.a', contentSB), 2, "works with __exposedProps__"); -+ do_check_eq(Cu.evalInSandbox('foo.a', contentSB), undefined, "Still not allowed with __exposedProps__"); - } -diff --git js/xpconnect/tests/unit/test_bug930091.js js/xpconnect/tests/unit/test_bug930091.js -index aa11d5db2640..ecb2a60aed11 100644 ---- js/xpconnect/tests/unit/test_bug930091.js -+++ js/xpconnect/tests/unit/test_bug930091.js -@@ -5,7 +5,7 @@ function checkThrows(fn) { - fn(); - ok(false, "Should have thrown"); - } catch (e) { -- do_check_true(/denied|insecure/.test(e)); -+ do_check_true(/denied|insecure|prohibited/.test(e)); - } - } - -diff --git js/xpconnect/wrappers/AccessCheck.cpp js/xpconnect/wrappers/AccessCheck.cpp -index 07599ce7906a..b730310731e2 100644 ---- js/xpconnect/wrappers/AccessCheck.cpp -+++ js/xpconnect/wrappers/AccessCheck.cpp -@@ -252,20 +252,6 @@ AccessCheck::checkPassToPrivilegedCode(JSContext* cx, HandleObject wrapper, Hand - return true; - } - -- // COWs are fine to pass to chrome if and only if they have __exposedProps__, -- // since presumably content should never have a reason to pass an opaque -- // object back to chrome. -- if (AccessCheck::isChrome(js::UncheckedUnwrap(wrapper)) && WrapperFactory::IsCOW(obj)) { -- RootedObject target(cx, js::UncheckedUnwrap(obj)); -- JSAutoCompartment ac(cx, target); -- RootedId id(cx, GetJSIDByIndex(cx, XPCJSContext::IDX_EXPOSEDPROPS)); -- bool found = false; -- if (!JS_HasPropertyById(cx, target, id, &found)) -- return false; -- if (found) -- return true; -- } -- - // Same-origin wrappers are fine. - if (AccessCheck::wrapperSubsumes(obj)) - return true; -@@ -323,171 +309,6 @@ AccessCheck::reportCrossOriginDenial(JSContext* cx, JS::HandleId id, - MOZ_ALWAYS_TRUE(rv.MaybeSetPendingException(cx)); - } - --enum Access { READ = (1<<0), WRITE = (1<<1), NO_ACCESS = 0 }; -- --static void --EnterAndThrowASCII(JSContext* cx, JSObject* wrapper, const char* msg) --{ -- JSAutoCompartment ac(cx, wrapper); -- JS_ReportErrorASCII(cx, "%s", msg); --} -- --bool --ExposedPropertiesOnly::check(JSContext* cx, HandleObject wrapper, HandleId id, Wrapper::Action act) --{ -- RootedObject wrappedObject(cx, Wrapper::wrappedObject(wrapper)); -- -- if (act == Wrapper::CALL) -- return false; -- -- // For the case of getting a property descriptor, we allow if either GET or SET -- // is allowed, and rely on FilteringWrapper to filter out any disallowed accessors. -- if (act == Wrapper::GET_PROPERTY_DESCRIPTOR) { -- return check(cx, wrapper, id, Wrapper::GET) || -- check(cx, wrapper, id, Wrapper::SET); -- } -- -- RootedId exposedPropsId(cx, GetJSIDByIndex(cx, XPCJSContext::IDX_EXPOSEDPROPS)); -- -- // We need to enter the wrappee's compartment to look at __exposedProps__, -- // but we want to be in the wrapper's compartment if we call Deny(). -- // -- // Unfortunately, |cx| can be in either compartment when we call ::check. :-( -- JSAutoCompartment ac(cx, wrappedObject); -- -- bool found = false; -- if (!JS_HasPropertyById(cx, wrappedObject, exposedPropsId, &found)) -- return false; -- -- // If no __exposedProps__ existed, deny access. -- if (!found) { -- // Previously we automatically granted access to indexed properties and -- // .length for Array COWs. We're not doing that anymore, so make sure to -- // let people know what's going on. -- bool isArray; -- if (!JS_IsArrayObject(cx, wrappedObject, &isArray)) -- return false; -- if (!isArray) -- isArray = JS_IsTypedArrayObject(wrappedObject); -- bool isIndexedAccessOnArray = isArray && JSID_IS_INT(id) && JSID_TO_INT(id) >= 0; -- bool isLengthAccessOnArray = isArray && JSID_IS_STRING(id) && -- JS_FlatStringEqualsAscii(JSID_TO_FLAT_STRING(id), "length"); -- if (isIndexedAccessOnArray || isLengthAccessOnArray) { -- JSAutoCompartment ac2(cx, wrapper); -- ReportWrapperDenial(cx, id, WrapperDenialForCOW, -- "Access to elements and length of privileged Array not permitted"); -- } -- -- return false; -- } -- -- if (id == JSID_VOID) -- return true; -- -- Rooted desc(cx); -- if (!JS_GetPropertyDescriptorById(cx, wrappedObject, exposedPropsId, &desc)) -- return false; -- -- if (!desc.object()) -- return false; -- -- if (desc.hasGetterOrSetter()) { -- EnterAndThrowASCII(cx, wrapper, "__exposedProps__ must be a value property"); -- return false; -- } -- -- RootedValue exposedProps(cx, desc.value()); -- if (exposedProps.isNullOrUndefined()) -- return false; -- -- if (!exposedProps.isObject()) { -- EnterAndThrowASCII(cx, wrapper, "__exposedProps__ must be undefined, null, or an Object"); -- return false; -- } -- -- RootedObject hallpass(cx, &exposedProps.toObject()); -- -- if (!AccessCheck::subsumes(js::UncheckedUnwrap(hallpass), wrappedObject)) { -- EnterAndThrowASCII(cx, wrapper, "Invalid __exposedProps__"); -- return false; -- } -- -- Access access = NO_ACCESS; -- -- if (!JS_GetPropertyDescriptorById(cx, hallpass, id, &desc)) { -- return false; // Error -- } -- if (!desc.object() || !desc.enumerable()) -- return false; -- -- if (!desc.value().isString()) { -- EnterAndThrowASCII(cx, wrapper, "property must be a string"); -- return false; -- } -- -- JSFlatString* flat = JS_FlattenString(cx, desc.value().toString()); -- if (!flat) -- return false; -- -- size_t length = JS_GetStringLength(JS_FORGET_STRING_FLATNESS(flat)); -- -- for (size_t i = 0; i < length; ++i) { -- char16_t ch = JS_GetFlatStringCharAt(flat, i); -- switch (ch) { -- case 'r': -- if (access & READ) { -- EnterAndThrowASCII(cx, wrapper, "duplicate 'readable' property flag"); -- return false; -- } -- access = Access(access | READ); -- break; -- -- case 'w': -- if (access & WRITE) { -- EnterAndThrowASCII(cx, wrapper, "duplicate 'writable' property flag"); -- return false; -- } -- access = Access(access | WRITE); -- break; -- -- default: -- EnterAndThrowASCII(cx, wrapper, "properties can only be readable or read and writable"); -- return false; -- } -- } -- -- if (access == NO_ACCESS) { -- EnterAndThrowASCII(cx, wrapper, "specified properties must have a permission bit set"); -- return false; -- } -- -- if ((act == Wrapper::SET && !(access & WRITE)) || -- (act != Wrapper::SET && !(access & READ))) { -- return false; -- } -- -- // Inspect the property on the underlying object to check for red flags. -- if (!JS_GetPropertyDescriptorById(cx, wrappedObject, id, &desc)) -- return false; -- -- // Reject accessor properties. -- if (desc.hasGetterOrSetter()) { -- EnterAndThrowASCII(cx, wrapper, "Exposing privileged accessor properties is prohibited"); -- return false; -- } -- -- // Reject privileged or cross-origin callables. -- if (desc.value().isObject()) { -- RootedObject maybeCallable(cx, js::UncheckedUnwrap(&desc.value().toObject())); -- if (JS::IsCallable(maybeCallable) && !AccessCheck::subsumes(wrapper, maybeCallable)) { -- EnterAndThrowASCII(cx, wrapper, "Exposing privileged or cross-origin callable is prohibited"); -- return false; -- } -- } -- -- return true; --} -- - bool - ExposedPropertiesOnly::deny(JSContext* cx, js::Wrapper::Action act, HandleId id, - bool mayThrow) -diff --git js/xpconnect/wrappers/AccessCheck.h js/xpconnect/wrappers/AccessCheck.h -index 678dce3e0b81..c4873760ab7a 100644 ---- js/xpconnect/wrappers/AccessCheck.h -+++ js/xpconnect/wrappers/AccessCheck.h -@@ -104,10 +104,15 @@ struct CrossOriginAccessiblePropertiesOnly : public Policy { - } - }; - --// This policy only permits access to properties if they appear in the --// objects exposed properties list. -+// This class used to support permitting access to properties if they -+// appeared in an access list on the object, but now it acts like an -+// Opaque wrapper, with the exception that it fails silently for GET, -+// ENUMERATE, and GET_PROPERTY_DESCRIPTOR. This is done for backwards -+// compatibility. See bug 1397513. - struct ExposedPropertiesOnly : public Policy { -- static bool check(JSContext* cx, JS::HandleObject wrapper, JS::HandleId id, js::Wrapper::Action act); -+ static bool check(JSContext* cx, JS::HandleObject wrapper, JS::HandleId id, js::Wrapper::Action act) { -+ return false; -+ } - - static bool deny(JSContext* cx, js::Wrapper::Action act, JS::HandleId id, - bool mayThrow); -diff --git js/xpconnect/wrappers/ChromeObjectWrapper.h js/xpconnect/wrappers/ChromeObjectWrapper.h -index 8b273e470814..c17feed10b9a 100644 ---- js/xpconnect/wrappers/ChromeObjectWrapper.h -+++ js/xpconnect/wrappers/ChromeObjectWrapper.h -@@ -16,9 +16,9 @@ namespace xpc { - struct ExposedPropertiesOnly; - - // When a vanilla chrome JS object is exposed to content, we use a wrapper that --// supports __exposedProps__ for legacy reasons. For extra security, we override --// the traps that allow content to pass an object to chrome, and perform extra --// security checks on them. -+// fails silently on GET, ENUMERATE, and GET_PROPERTY_DESCRIPTOR for legacy -+// reasons. For extra security, we override the traps that allow content to pass -+// an object to chrome, and perform extra security checks on them. - #define ChromeObjectWrapperBase \ - FilteringWrapper - -diff --git js/xpconnect/wrappers/WrapperFactory.cpp js/xpconnect/wrappers/WrapperFactory.cpp -index 6296f69fbea4..760d2c9afda8 100644 ---- js/xpconnect/wrappers/WrapperFactory.cpp -+++ js/xpconnect/wrappers/WrapperFactory.cpp -@@ -514,8 +514,8 @@ WrapperFactory::Rewrap(JSContext* cx, HandleObject existing, HandleObject obj) - wrapper = &FilteringWrapper::singleton; - } - -- // For Vanilla JSObjects exposed from chrome to content, we use a wrapper -- // that supports __exposedProps__. We'd like to get rid of these eventually, -+ // For vanilla JSObjects exposed from chrome to content, we use a wrapper -+ // that fails silently in a few cases. We'd like to get rid of this eventually, - // but in their current form they don't cause much trouble. - else if (IdentifyStandardInstance(obj) == JSProto_Object) { - wrapper = &ChromeObjectWrapper::singleton; -diff --git js/xpconnect/wrappers/XrayWrapper.cpp js/xpconnect/wrappers/XrayWrapper.cpp -index 44dd7cb47146..28e29ea13d93 100644 ---- js/xpconnect/wrappers/XrayWrapper.cpp -+++ js/xpconnect/wrappers/XrayWrapper.cpp -@@ -291,7 +291,7 @@ ReportWrapperDenial(JSContext* cx, HandleId id, WrapperDenialType type, const ch - MOZ_ASSERT(type == WrapperDenialForCOW); - errorMessage.emplace("Security wrapper denied access to property %s on privileged " - "Javascript object. Support for exposing privileged objects " -- "to untrusted content via __exposedProps__ is being gradually " -+ "to untrusted content via __exposedProps__ has been " - "removed - use WebIDL bindings or Components.utils.cloneInto " - "instead. Note that only the first denied property access from a " - "given global object will be reported.", -diff --git testing/mochitest/tests/SimpleTest/ChromePowers.js testing/mochitest/tests/SimpleTest/ChromePowers.js -index 97de578157c0..7fbf66e2fd00 100644 ---- testing/mochitest/tests/SimpleTest/ChromePowers.js -+++ testing/mochitest/tests/SimpleTest/ChromePowers.js -@@ -104,15 +104,6 @@ ChromePowers.prototype.executeAfterFlushingMessageQueue = function(aCallback) { - aCallback(); - }; - --// Expose everything but internal APIs (starting with underscores) to --// web content. We cannot use Object.keys to view SpecialPowers.prototype since --// we are using the functions from SpecialPowersAPI.prototype --ChromePowers.prototype.__exposedProps__ = {}; --for (var i in ChromePowers.prototype) { -- if (i.charAt(0) != "_") -- ChromePowers.prototype.__exposedProps__[i] = "r"; --} -- - if ((window.parent !== null) && - (window.parent !== undefined) && - (window.parent.wrappedJSObject.SpecialPowers) && -diff --git testing/specialpowers/content/MockPermissionPrompt.jsm testing/specialpowers/content/MockPermissionPrompt.jsm -index 71d0f5d2768a..1d86cc00e360 100644 ---- testing/specialpowers/content/MockPermissionPrompt.jsm -+++ testing/specialpowers/content/MockPermissionPrompt.jsm -@@ -83,15 +83,3 @@ MockPermissionPromptInstance.prototype = { - request.allow(); - } - }; -- --// Expose everything to content. We call reset() here so that all of the relevant --// lazy expandos get added. --MockPermissionPrompt.reset(); --function exposeAll(obj) { -- var props = {}; -- for (var prop in obj) -- props[prop] = "rw"; -- obj.__exposedProps__ = props; --} --exposeAll(MockPermissionPrompt); --exposeAll(MockPermissionPromptInstance.prototype); -diff --git toolkit/components/addoncompat/RemoteAddonsParent.jsm toolkit/components/addoncompat/RemoteAddonsParent.jsm -index 1adbc0397729..d640c47d31f8 100644 ---- toolkit/components/addoncompat/RemoteAddonsParent.jsm -+++ toolkit/components/addoncompat/RemoteAddonsParent.jsm -@@ -735,7 +735,7 @@ var SandboxParent = { - if (rest.length) { - // Do a shallow copy of the options object into the child - // process. This way we don't have to access it through a Chrome -- // object wrapper, which would require __exposedProps__. -+ // object wrapper, which would not let us access any properties. - // - // The only object property here is sandboxPrototype. We assume - // it's a child process object (since that's what Greasemonkey -commit f89c72edb79e -Author: Andrew McCreight -Date: Thu Sep 7 11:17:16 2017 -0700 - - Bug 1377587, part 2 - Rename ExposedPropertiesOnly to OpaqueWithSilentFailing. r=krizsa - - This class doesn't have anything to do with __exposedProps__ any more, - so give it a more descriptive name. We'd still like to remove it - entirely eventually. - - MozReview-Commit-ID: 87KCpG6f8rI - - --HG-- - extra : rebase_source : 98a51a6af0fc8446dbcd8efa083d6c79286279d3 ---- - js/xpconnect/wrappers/AccessCheck.cpp | 4 ++-- - js/xpconnect/wrappers/AccessCheck.h | 2 +- - js/xpconnect/wrappers/ChromeObjectWrapper.h | 4 ++-- - 3 files changed, 5 insertions(+), 5 deletions(-) - -diff --git js/xpconnect/wrappers/AccessCheck.cpp js/xpconnect/wrappers/AccessCheck.cpp -index b730310731e2..620f1f678f51 100644 ---- js/xpconnect/wrappers/AccessCheck.cpp -+++ js/xpconnect/wrappers/AccessCheck.cpp -@@ -310,8 +310,8 @@ AccessCheck::reportCrossOriginDenial(JSContext* cx, JS::HandleId id, - } - - bool --ExposedPropertiesOnly::deny(JSContext* cx, js::Wrapper::Action act, HandleId id, -- bool mayThrow) -+OpaqueWithSilentFailing::deny(JSContext* cx, js::Wrapper::Action act, HandleId id, -+ bool mayThrow) - { - // Fail silently for GET, ENUMERATE, and GET_PROPERTY_DESCRIPTOR. - if (act == js::Wrapper::GET || act == js::Wrapper::ENUMERATE || -diff --git js/xpconnect/wrappers/AccessCheck.h js/xpconnect/wrappers/AccessCheck.h -index c4873760ab7a..6783258f8d94 100644 ---- js/xpconnect/wrappers/AccessCheck.h -+++ js/xpconnect/wrappers/AccessCheck.h -@@ -109,7 +109,7 @@ struct CrossOriginAccessiblePropertiesOnly : public Policy { - // Opaque wrapper, with the exception that it fails silently for GET, - // ENUMERATE, and GET_PROPERTY_DESCRIPTOR. This is done for backwards - // compatibility. See bug 1397513. --struct ExposedPropertiesOnly : public Policy { -+struct OpaqueWithSilentFailing : public Policy { - static bool check(JSContext* cx, JS::HandleObject wrapper, JS::HandleId id, js::Wrapper::Action act) { - return false; - } -diff --git js/xpconnect/wrappers/ChromeObjectWrapper.h js/xpconnect/wrappers/ChromeObjectWrapper.h -index c17feed10b9a..da4870237501 100644 ---- js/xpconnect/wrappers/ChromeObjectWrapper.h -+++ js/xpconnect/wrappers/ChromeObjectWrapper.h -@@ -13,14 +13,14 @@ - - namespace xpc { - --struct ExposedPropertiesOnly; -+struct OpaqueWithSilentFailing; - - // When a vanilla chrome JS object is exposed to content, we use a wrapper that - // fails silently on GET, ENUMERATE, and GET_PROPERTY_DESCRIPTOR for legacy - // reasons. For extra security, we override the traps that allow content to pass - // an object to chrome, and perform extra security checks on them. - #define ChromeObjectWrapperBase \ -- FilteringWrapper -+ FilteringWrapper - - class ChromeObjectWrapper : public ChromeObjectWrapperBase - { - diff --git a/www/waterfox/files/patch-bug1379148 b/www/waterfox/files/patch-bug1379148 deleted file mode 100644 index e7b01c6eee8..00000000000 --- a/www/waterfox/files/patch-bug1379148 +++ /dev/null @@ -1,366 +0,0 @@ -commit 708a5eba5908 -Author: Kris Maglione -Date: Wed Sep 20 16:12:27 2017 -0700 - - Bug 1379148 - Part 1: Allow blocking only non-script-created parsers. r=hsivonen, a=sledru - - MozReview-Commit-ID: 8cGxywiUzWj - - --HG-- - extra : source : bee57767629862c4b4bfa6258918551ed7d82998 ---- - dom/base/nsDocument.cpp | 10 ++++++---- - dom/base/nsIDocument.h | 1 + - dom/webidl/Document.webidl | 11 ++++++++++- - 3 files changed, 17 insertions(+), 5 deletions(-) - -diff --git dom/base/nsDocument.cpp dom/base/nsDocument.cpp -index 086b386d35f0..d7d1428966f1 100644 ---- dom/base/nsDocument.cpp -+++ dom/base/nsDocument.cpp -@@ -10919,11 +10919,12 @@ public: - NS_DECL_CYCLE_COLLECTING_ISUPPORTS - NS_DECL_CYCLE_COLLECTION_CLASS(UnblockParsingPromiseHandler) - -- explicit UnblockParsingPromiseHandler(nsIDocument* aDocument, Promise* aPromise) -+ explicit UnblockParsingPromiseHandler(nsIDocument* aDocument, Promise* aPromise, -+ const BlockParsingOptions& aOptions) - : mPromise(aPromise) - { - nsCOMPtr parser = aDocument->CreatorParserOrNull(); -- if (parser) { -+ if (parser && (aOptions.mBlockScriptCreated || !parser->IsScriptCreated())) { - parser->BlockParser(); - mParser = do_GetWeakReference(parser); - mDocument = aDocument; -@@ -10986,14 +10987,15 @@ NS_IMPL_CYCLE_COLLECTING_ADDREF(UnblockParsingPromiseHandler) - NS_IMPL_CYCLE_COLLECTING_RELEASE(UnblockParsingPromiseHandler) - - already_AddRefed --nsIDocument::BlockParsing(Promise& aPromise, ErrorResult& aRv) -+nsIDocument::BlockParsing(Promise& aPromise, const BlockParsingOptions& aOptions, ErrorResult& aRv) - { - RefPtr resultPromise = Promise::Create(aPromise.GetParentObject(), aRv); - if (aRv.Failed()) { - return nullptr; - } - -- RefPtr promiseHandler = new UnblockParsingPromiseHandler(this, resultPromise); -+ RefPtr promiseHandler = new UnblockParsingPromiseHandler(this, resultPromise, -+ aOptions); - aPromise.AppendNativeHandler(promiseHandler); - - return resultPromise.forget(); -diff --git dom/base/nsIDocument.h dom/base/nsIDocument.h -index 2f287ae2ccb7..512de896fddf 100644 ---- dom/base/nsIDocument.h -+++ dom/base/nsIDocument.h -@@ -2952,6 +2952,7 @@ public: - void ObsoleteSheet(const nsAString& aSheetURI, mozilla::ErrorResult& rv); - - already_AddRefed BlockParsing(mozilla::dom::Promise& aPromise, -+ const mozilla::dom::BlockParsingOptions& aOptions, - mozilla::ErrorResult& aRv); - - already_AddRefed GetMozDocumentURIIfNotForErrorPages(); -diff --git dom/webidl/Document.webidl dom/webidl/Document.webidl -index 8a629502a6ce..f83874fa7315 100644 ---- dom/webidl/Document.webidl -+++ dom/webidl/Document.webidl -@@ -385,13 +385,22 @@ partial interface Document { - - // Blocks the initial document parser until the given promise is settled. - [ChromeOnly, Throws] -- Promise blockParsing(Promise promise); -+ Promise blockParsing(Promise promise, -+ optional BlockParsingOptions options); - - // like documentURI, except that for error pages, it returns the URI we were - // trying to load when we hit an error, rather than the error page's own URI. - [ChromeOnly] readonly attribute URI? mozDocumentURIIfNotForErrorPages; - }; - -+dictionary BlockParsingOptions { -+ /** -+ * If true, blocks script-created parsers (created via document.open()) in -+ * addition to network-created parsers. -+ */ -+ boolean blockScriptCreated = true; -+}; -+ - // Extension to give chrome JS the ability to determine when a document was - // created to satisfy an iframe with srcdoc attribute. - partial interface Document { - -commit 0947c7c07361 -Author: Kris Maglione -Date: Wed Sep 20 16:13:03 2017 -0700 - - Bug 1379148 - Part 2: Don't block script-created parsers when executing content scripts. r=mixedpuppy, a=sledru - - MozReview-Commit-ID: GsqsaOVob4B - - --HG-- - extra : source : ba22a83959a06a457c8a22d0cd9521eaed220bac ---- - toolkit/components/extensions/ExtensionContent.jsm | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git toolkit/components/extensions/ExtensionContent.jsm toolkit/components/extensions/ExtensionContent.jsm -index 3429ae14daff..c05a00e95398 100644 ---- toolkit/components/extensions/ExtensionContent.jsm -+++ toolkit/components/extensions/ExtensionContent.jsm -@@ -324,7 +324,7 @@ class Script { - // until the scripts have been loaded. - let {document} = context.contentWindow; - if (this.runAt === "document_start" && document.readyState !== "complete") { -- document.blockParsing(scriptsPromise); -+ document.blockParsing(scriptsPromise, {blockScriptCreated: false}); - } - - let scripts = await scriptsPromise; - -commit 5f856a2ba599 -Author: Kris Maglione -Date: Wed Sep 20 17:00:44 2017 -0700 - - Bug 1379148 - Part 3: Inject scripts synchronously if they're already available. r=mixedpuppy, a=sledru - - MozReview-Commit-ID: J6vheuxsqJR - - --HG-- - extra : source : 14ab0648ea9194b7ad84ecf7a330c9bbdadfb303 ---- - toolkit/components/extensions/ExtensionContent.jsm | 36 ++++++++++++++++------ - toolkit/components/extensions/ExtensionUtils.jsm | 12 +++++--- - 2 files changed, 34 insertions(+), 14 deletions(-) - -diff --git toolkit/components/extensions/ExtensionContent.jsm toolkit/components/extensions/ExtensionContent.jsm -index c05a00e95398..9af6870a829b 100644 ---- toolkit/components/extensions/ExtensionContent.jsm -+++ toolkit/components/extensions/ExtensionContent.jsm -@@ -137,8 +137,16 @@ class CacheMap extends DefaultMap { - - class ScriptCache extends CacheMap { - constructor(options) { -- super(SCRIPT_EXPIRY_TIMEOUT_MS, -- url => ChromeUtils.compileScript(url, options)); -+ super(SCRIPT_EXPIRY_TIMEOUT_MS); -+ this.options = options; -+ } -+ -+ defaultConstructor(url) { -+ let promise = ChromeUtils.compileScript(url, this.options); -+ promise.then(script => { -+ promise.script = script; -+ }); -+ return promise; - } - } - -@@ -317,17 +325,25 @@ class Script { - } - } - -- let scriptsPromise = Promise.all(this.compileScripts()); -+ let scriptPromises = this.compileScripts(); -+ -+ let scripts = scriptPromises.map(promise => promise.script); -+ // If not all scripts are already available in the cache, block -+ // parsing and wait all promises to resolve. -+ if (!scripts.every(script => script)) { -+ let promise = Promise.all(scriptPromises); -+ -+ // If we're supposed to inject at the start of the document load, -+ // and we haven't already missed that point, block further parsing -+ // until the scripts have been loaded. -+ let {document} = context.contentWindow; -+ if (this.runAt === "document_start" && document.readyState !== "complete") { -+ document.blockParsing(promise, {blockScriptCreated: false}); -+ } - -- // If we're supposed to inject at the start of the document load, -- // and we haven't already missed that point, block further parsing -- // until the scripts have been loaded. -- let {document} = context.contentWindow; -- if (this.runAt === "document_start" && document.readyState !== "complete") { -- document.blockParsing(scriptsPromise, {blockScriptCreated: false}); -+ scripts = await promise; - } - -- let scripts = await scriptsPromise; - let result; - - // The evaluations below may throw, in which case the promise will be -diff --git toolkit/components/extensions/ExtensionUtils.jsm toolkit/components/extensions/ExtensionUtils.jsm -index a3ed895de6df..4a5fcb19c58d 100644 ---- toolkit/components/extensions/ExtensionUtils.jsm -+++ toolkit/components/extensions/ExtensionUtils.jsm -@@ -67,9 +67,11 @@ function instanceOf(value, type) { - * constructor if one is not present. - */ - class DefaultWeakMap extends WeakMap { -- constructor(defaultConstructor, init) { -+ constructor(defaultConstructor = undefined, init = undefined) { - super(init); -- this.defaultConstructor = defaultConstructor; -+ if (defaultConstructor) { -+ this.defaultConstructor = defaultConstructor; -+ } - } - - get(key) { -@@ -83,9 +85,11 @@ class DefaultWeakMap extends WeakMap { - } - - class DefaultMap extends Map { -- constructor(defaultConstructor, init) { -+ constructor(defaultConstructor = undefined, init = undefined) { - super(init); -- this.defaultConstructor = defaultConstructor; -+ if (defaultConstructor) { -+ this.defaultConstructor = defaultConstructor; -+ } - } - - get(key) { - -commit 3ab96ab42d99 -Author: Kris Maglione -Date: Wed Sep 20 17:01:33 2017 -0700 - - Bug 1379148 - Part 4: Add tests for document.write() with document_start content script present. r=mixedpuppy, a=sledru - - MozReview-Commit-ID: 5yxgpur1tvf - - --HG-- - extra : source : 14298b92236cfcfdd0b9dc43d8077e576f775b4d ---- - .../extensions/ExtensionXPCShellUtils.jsm | 5 +++ - .../test/xpcshell/data/file_document_write.html | 35 ++++++++++++++++ - .../test_ext_contentscript_scriptCreated.js | 49 ++++++++++++++++++++++ - .../extensions/test/xpcshell/xpcshell-content.ini | 1 + - 4 files changed, 90 insertions(+) - -diff --git toolkit/components/extensions/ExtensionXPCShellUtils.jsm toolkit/components/extensions/ExtensionXPCShellUtils.jsm -index d16003d79944..3420ce175d8a 100644 ---- toolkit/components/extensions/ExtensionXPCShellUtils.jsm -+++ toolkit/components/extensions/ExtensionXPCShellUtils.jsm -@@ -59,6 +59,11 @@ function frameScript() { - Components.utils.import("resource://gre/modules/Services.jsm"); - - Services.obs.notifyObservers(this, "tab-content-frameloader-created"); -+ -+ // eslint-disable-next-line mozilla/balanced-listeners -+ addEventListener("MozHeapMinimize", () => { -+ Services.obs.notifyObservers(null, "memory-pressure", "heap-minimize"); -+ }, true, true); - } - - const FRAME_SCRIPT = `data:text/javascript,(${encodeURI(frameScript)}).call(this)`; -diff --git toolkit/components/extensions/test/xpcshell/data/file_document_write.html toolkit/components/extensions/test/xpcshell/data/file_document_write.html -new file mode 100644 -index 000000000000..fbae3d6d763a ---- /dev/null -+++ toolkit/components/extensions/test/xpcshell/data/file_document_write.html -@@ -0,0 +1,35 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git toolkit/components/extensions/test/xpcshell/test_ext_contentscript_scriptCreated.js toolkit/components/extensions/test/xpcshell/test_ext_contentscript_scriptCreated.js -new file mode 100644 -index 000000000000..00407b914015 ---- /dev/null -+++ toolkit/components/extensions/test/xpcshell/test_ext_contentscript_scriptCreated.js -@@ -0,0 +1,49 @@ -+"use strict"; -+ -+const server = createHttpServer(); -+server.registerDirectory("/data/", do_get_file("data")); -+ -+const BASE_URL = `http://localhost:${server.identity.primaryPort}/data`; -+ -+// ExtensionContent.jsm needs to know when it's running from xpcshell, -+// to use the right timeout for content scripts executed at document_idle. -+ExtensionTestUtils.mockAppInfo(); -+ -+// Test that document_start content scripts don't block script-created -+// parsers. -+add_task(async function test_contentscript_scriptCreated() { -+ let extensionData = { -+ manifest: { -+ content_scripts: [{ -+ "matches": ["http://*/*/file_document_write.html"], -+ "js": ["content_script.js"], -+ "run_at": "document_start", -+ "match_about_blank": true, -+ "all_frames": true, -+ }], -+ }, -+ -+ files: { -+ "content_script.js": function() { -+ if (window === top) { -+ addEventListener("message", msg => { -+ browser.test.assertEq("ok", msg.data, "document.write() succeeded"); -+ browser.test.sendMessage("content-script-done"); -+ }, {once: true}); -+ } -+ }, -+ }, -+ }; -+ -+ let extension = ExtensionTestUtils.loadExtension(extensionData); -+ -+ await extension.startup(); -+ -+ let contentPage = await ExtensionTestUtils.loadContentPage(`${BASE_URL}/file_document_write.html`); -+ -+ await extension.awaitMessage("content-script-done"); -+ -+ await contentPage.close(); -+ -+ await extension.unload(); -+}); -diff --git toolkit/components/extensions/test/xpcshell/xpcshell-content.ini toolkit/components/extensions/test/xpcshell/xpcshell-content.ini -index e34ec0717691..65814ff5da97 100644 ---- toolkit/components/extensions/test/xpcshell/xpcshell-content.ini -+++ toolkit/components/extensions/test/xpcshell/xpcshell-content.ini -@@ -2,4 +2,5 @@ - skip-if = os == "android" || (os == "win" && debug) - [test_ext_i18n_css.js] - [test_ext_contentscript.js] -+[test_ext_contentscript_scriptCreated.js] - [test_ext_contentscript_xrays.js] diff --git a/www/waterfox/files/patch-bug1381761 b/www/waterfox/files/patch-bug1381761 deleted file mode 100644 index 416bd4ac8c2..00000000000 --- a/www/waterfox/files/patch-bug1381761 +++ /dev/null @@ -1,362 +0,0 @@ -commit 256e249566d8 -Author: Christoph Kerschbaumer -Date: Fri Aug 4 14:11:17 2017 +0200 - - Bug 1381761 - Treating 'data:' documents as unique, opaque origins should still inherit the CSP. r=smaug,dveditz ---- - caps/moz.build | 1 + - caps/nsScriptSecurityManager.cpp | 96 +++++++++++++++++++++++++--------------- - 2 files changed, 62 insertions(+), 35 deletions(-) - -diff --git caps/moz.build caps/moz.build -index 46331e93f097..af369e3268e0 100644 ---- caps/moz.build -+++ caps/moz.build -@@ -56,6 +56,7 @@ LOCAL_INCLUDES += [ - '/docshell/base', - '/dom/base', - '/js/xpconnect/src', -+ '/netwerk/base', - ] - - if CONFIG['ENABLE_TESTS']: -diff --git caps/nsScriptSecurityManager.cpp caps/nsScriptSecurityManager.cpp -index a930b324a6a2..90695ebd126f 100644 ---- caps/nsScriptSecurityManager.cpp -+++ caps/nsScriptSecurityManager.cpp -@@ -45,6 +45,7 @@ - #include "nsIWindowWatcher.h" - #include "nsIConsoleService.h" - #include "nsIObserverService.h" -+#include "nsIOService.h" - #include "nsIContent.h" - #include "nsDOMJSUtils.h" - #include "nsAboutProtocolUtils.h" -@@ -265,6 +266,61 @@ nsScriptSecurityManager::GetChannelResultPrincipalIfNotSandboxed(nsIChannel* aCh - /*aIgnoreSandboxing*/ true); - } - -+static void -+InheritAndSetCSPOnPrincipalIfNeeded(nsIChannel* aChannel, nsIPrincipal* aPrincipal) -+{ -+ // loading a data: URI into an iframe, or loading frame[srcdoc] need -+ // to inherit the CSP (see Bug 1073952, 1381761). -+ MOZ_ASSERT(aChannel && aPrincipal, "need a valid channel and principal"); -+ if (!aChannel) { -+ return; -+ } -+ -+ nsCOMPtr loadInfo = aChannel->GetLoadInfo(); -+ if (!loadInfo || -+ loadInfo->GetExternalContentPolicyType() != nsIContentPolicy::TYPE_SUBDOCUMENT) { -+ return; -+ } -+ -+ nsCOMPtr uri; -+ nsresult rv = aChannel->GetURI(getter_AddRefs(uri)); -+ NS_ENSURE_SUCCESS_VOID(rv); -+ nsAutoCString URISpec; -+ rv = uri->GetSpec(URISpec); -+ NS_ENSURE_SUCCESS_VOID(rv); -+ -+ bool isSrcDoc = URISpec.EqualsLiteral("about:srcdoc"); -+ bool isData = (NS_SUCCEEDED(uri->SchemeIs("data", &isData)) && isData); -+ -+ if (!isSrcDoc && !isData) { -+ return; -+ } -+ -+ nsCOMPtr principalToInherit = loadInfo->PrincipalToInherit(); -+ if (!principalToInherit) { -+ principalToInherit = loadInfo->TriggeringPrincipal(); -+ } -+ nsCOMPtr originalCSP; -+ principalToInherit->GetCsp(getter_AddRefs(originalCSP)); -+ if (!originalCSP) { -+ return; -+ } -+ -+ // if the principalToInherit had a CSP, add it to the before -+ // created NullPrincipal (unless it already has one) -+ MOZ_ASSERT(aPrincipal->GetIsNullPrincipal(), -+ "inheriting the CSP only valid for NullPrincipal"); -+ nsCOMPtr nullPrincipalCSP; -+ aPrincipal->GetCsp(getter_AddRefs(nullPrincipalCSP)); -+ if (nullPrincipalCSP) { -+ MOZ_ASSERT(nullPrincipalCSP == originalCSP, -+ "There should be no other CSP here."); -+ // CSPs are equal, no need to set it again. -+ return; -+ } -+ aPrincipal->SetCsp(originalCSP); -+} -+ - nsresult - nsScriptSecurityManager::GetChannelResultPrincipal(nsIChannel* aChannel, - nsIPrincipal** aPrincipal, -@@ -295,40 +351,7 @@ nsScriptSecurityManager::GetChannelResultPrincipal(nsIChannel* aChannel, - if (!aIgnoreSandboxing && loadInfo->GetLoadingSandboxed()) { - MOZ_ALWAYS_TRUE(NS_SUCCEEDED(loadInfo->GetSandboxedLoadingPrincipal(aPrincipal))); - MOZ_ASSERT(*aPrincipal); -- // if the new NullPrincipal (above) loads an iframe[srcdoc], we -- // need to inherit an existing CSP to avoid bypasses (bug 1073952). -- // We continue inheriting for nested frames with e.g., data: URLs. -- if (loadInfo->GetExternalContentPolicyType() == nsIContentPolicy::TYPE_SUBDOCUMENT) { -- nsCOMPtr uri; -- aChannel->GetURI(getter_AddRefs(uri)); -- nsAutoCString URISpec; -- uri->GetSpec(URISpec); -- bool isData = (NS_SUCCEEDED(uri->SchemeIs("data", &isData)) && isData); -- if (URISpec.EqualsLiteral("about:srcdoc") || isData) { -- nsCOMPtr principalToInherit = loadInfo->PrincipalToInherit(); -- if (!principalToInherit) { -- principalToInherit = loadInfo->TriggeringPrincipal(); -- } -- nsCOMPtr originalCSP; -- principalToInherit->GetCsp(getter_AddRefs(originalCSP)); -- if (originalCSP) { -- // if the principalToInherit had a CSP, -- // add it to the newly created NullPrincipal -- // (unless it already has one) -- nsCOMPtr nullPrincipalCSP; -- (*aPrincipal)->GetCsp(getter_AddRefs(nullPrincipalCSP)); -- if (nullPrincipalCSP) { -- MOZ_ASSERT(nullPrincipalCSP == originalCSP, -- "There should be no other CSP here."); -- // CSPs are equal, no need to set it again. -- return NS_OK; -- } else { -- nsresult rv = (*aPrincipal)->SetCsp(originalCSP); -- NS_ENSURE_SUCCESS(rv, rv); -- } -- } -- } -- } -+ InheritAndSetCSPOnPrincipalIfNeeded(aChannel, *aPrincipal); - return NS_OK; - } - -@@ -376,7 +399,10 @@ nsScriptSecurityManager::GetChannelResultPrincipal(nsIChannel* aChannel, - } - } - } -- return GetChannelURIPrincipal(aChannel, aPrincipal); -+ nsresult rv = GetChannelURIPrincipal(aChannel, aPrincipal); -+ NS_ENSURE_SUCCESS(rv, rv); -+ InheritAndSetCSPOnPrincipalIfNeeded(aChannel, *aPrincipal); -+ return NS_OK; - } - - /* The principal of the URI that this channel is loading. This is never - -commit 9427f1bbd826 -Author: Christoph Kerschbaumer -Date: Fri Aug 4 14:10:21 2017 +0200 - - Bug 1381761 - Convert test browser_911547.js to comply with new data: URI inheritance model. r=dveditz ---- - .../components/sessionstore/test/browser_911547.js | 47 ++++++++++++++++------ - .../sessionstore/test/browser_911547_sample.html | 6 +-- - 2 files changed, 37 insertions(+), 16 deletions(-) - -diff --git browser/components/sessionstore/test/browser_911547.js browser/components/sessionstore/test/browser_911547.js -index f0da70ed8f8c..cb95ddad7f2a 100644 ---- browser/components/sessionstore/test/browser_911547.js -+++ browser/components/sessionstore/test/browser_911547.js -@@ -1,11 +1,17 @@ - /* Any copyright is dedicated to the Public Domain. - http://creativecommons.org/publicdomain/zero/1.0/ */ - --// This tests that session restore component does restore the right content --// security policy with the document. --// The policy being tested disallows inline scripts -+// This test is two fold: -+// a) if security.data_uri.unique_opaque_origin == false, then -+// this tests that session restore component does restore the right -+// content security policy with the document. (The policy being -+// tested disallows inline scripts). -+// b) if security.data_uri.unique_opaque_origin == true, then -+// this tests that data: URIs do not inherit the CSP from -+// it's enclosing context. - - add_task(async function test() { -+ let dataURIPref = Services.prefs.getBoolPref("security.data_uri.unique_opaque_origin"); - // create a tab that has a CSP - let testURL = "http://mochi.test:8888/browser/browser/components/sessionstore/test/browser_911547_sample.html"; - let tab = gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser, testURL); -@@ -16,23 +22,33 @@ add_task(async function test() { - - // this is a baseline to ensure CSP is active - // attempt to inject and run a script via inline (pre-restore, allowed) -- await injectInlineScript(browser, `document.getElementById("test_id").value = "fail";`); -+ await injectInlineScript(browser, `document.getElementById("test_id1").value = "id1_modified";`); - - let loadedPromise = promiseBrowserLoaded(browser); - await ContentTask.spawn(browser, null, function() { -- is(content.document.getElementById("test_id").value, "ok", -+ is(content.document.getElementById("test_id1").value, "id1_initial", - "CSP should block the inline script that modifies test_id"); - -- // attempt to click a link to a data: URI (will inherit the CSP of the -- // origin document) and navigate to the data URI in the link. -+ -+ // (a) if security.data_uri.unique_opaque_origin == false: -+ // attempt to click a link to a data: URI (will inherit the CSP of -+ // the origin document) and navigate to the data URI in the link. -+ // (b) if security.data_uri.unique_opaque_origin == true: -+ // attempt to click a link to a data: URI (will *not* inherit the CSP of -+ // the origin document) and navigate to the data URI in the link. - content.document.getElementById("test_data_link").click(); - }); - - await loadedPromise; - -- await ContentTask.spawn(browser, null, function() { -- is(content.document.getElementById("test_id2").value, "ok", -- "CSP should block the script loaded by the clicked data URI"); -+ await ContentTask.spawn(browser, {dataURIPref}, function( {dataURIPref}) { // eslint-disable-line -+ if (dataURIPref) { -+ is(content.document.getElementById("test_id2").value, "id2_modified", -+ "data: URI should *not* inherit the CSP of the enclosing context"); -+ } else { -+ is(content.document.getElementById("test_id2").value, "id2_initial", -+ "CSP should block the script loaded by the clicked data URI"); -+ } - }); - - // close the tab -@@ -43,9 +59,14 @@ add_task(async function test() { - await promiseTabRestored(tab); - browser = tab.linkedBrowser; - -- await ContentTask.spawn(browser, null, function() { -- is(content.document.getElementById("test_id2").value, "ok", -- "CSP should block the script loaded by the clicked data URI after restore"); -+ await ContentTask.spawn(browser, {dataURIPref}, function({dataURIPref}) { // eslint-disable-line -+ if (dataURIPref) { -+ is(content.document.getElementById("test_id2").value, "id2_modified", -+ "data: URI should *not* inherit the CSP of the enclosing context"); -+ } else { -+ is(content.document.getElementById("test_id2").value, "id2_initial", -+ "CSP should block the script loaded by the clicked data URI after restore"); -+ } - }); - - // clean up -diff --git browser/components/sessionstore/test/browser_911547_sample.html browser/components/sessionstore/test/browser_911547_sample.html -index ccc2011593d4..73cb99ee41f1 100644 ---- browser/components/sessionstore/test/browser_911547_sample.html -+++ browser/components/sessionstore/test/browser_911547_sample.html -@@ -8,12 +8,12 @@ - - -- -+ - -- Test Link -+ Test Link - - - - -commit 8b999864f0bb -Author: Christoph Kerschbaumer -Date: Fri Aug 4 14:10:38 2017 +0200 - - Bug 1381761 - Test data: URIs inherit the CSP even if treated as unique, opaque origins. r=dveditz ---- - .../test/csp/file_data_csp_inheritance.html | 21 +++++++++++++ - dom/security/test/csp/mochitest.ini | 2 ++ - .../test/csp/test_data_csp_inheritance.html | 34 ++++++++++++++++++++++ - 3 files changed, 57 insertions(+) - -diff --git dom/security/test/csp/file_data_csp_inheritance.html dom/security/test/csp/file_data_csp_inheritance.html -new file mode 100644 -index 000000000000..299c30255aa6 ---- /dev/null -+++ dom/security/test/csp/file_data_csp_inheritance.html -@@ -0,0 +1,21 @@ -+ -+ -+ -+ Bug 1381761 - Treating 'data:' documents as unique, opaque origins should still inherit the CSP -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git dom/security/test/csp/mochitest.ini dom/security/test/csp/mochitest.ini -index ba391ad59799..09f80b2969d7 100644 ---- dom/security/test/csp/mochitest.ini -+++ dom/security/test/csp/mochitest.ini -@@ -217,6 +217,7 @@ support-files = - file_ignore_xfo.html^headers^ - file_ro_ignore_xfo.html - file_ro_ignore_xfo.html^headers^ -+ file_data_csp_inheritance.html - file_report_font_cache-1.html - file_report_font_cache-2.html - file_report_font_cache-2.html^headers^ -@@ -308,4 +309,5 @@ tags = mcb - [test_websocket_self.html] - skip-if = toolkit == 'android' - [test_ignore_xfo.html] -+[test_data_csp_inheritance.html] - [test_data_csp_merge.html] -diff --git dom/security/test/csp/test_data_csp_inheritance.html dom/security/test/csp/test_data_csp_inheritance.html -new file mode 100644 -index 000000000000..3afc4f7c02bc ---- /dev/null -+++ dom/security/test/csp/test_data_csp_inheritance.html -@@ -0,0 +1,34 @@ -+ -+ -+ -+ Bug 1381761 - Treating 'data:' documents as unique, opaque origins should still inherit the CSP -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ diff --git a/www/waterfox/files/patch-bug1381815 b/www/waterfox/files/patch-bug1381815 deleted file mode 100644 index 5681303ce45..00000000000 --- a/www/waterfox/files/patch-bug1381815 +++ /dev/null @@ -1,278 +0,0 @@ -commit 165fab2f8596 -Author: Jan Horak -Date: Tue Oct 10 13:35:56 2017 +0200 - - Bug 1381815 - fixing dimensions of radio and checkbox for GTK 3.20+; r=karlt - - In the GTK < 3.20 the size of radio and checkbox toggle is determined by indicator - spacing and indicator size. By GTK 3.20+ it is replaced by standard box model - (padding, margin, border). The patch fixes that while keeping the functionality - for older GTK. The values are also cached by similar way as scrollbar metrics - are cached now. - - The focus is no longer rendered by GTK but by Mozilla code, so the extra - size for toggles has been removed from GetExtraSizeForWidget and toggles - no longer render focus indicator. - - MozReview-Commit-ID: 1Wg5AgHy1Vz - - --HG-- - extra : rebase_source : 81437f45b7d32555942d21fccc9de4a561d85111 ---- - widget/gtk/gtk3drawing.cpp | 121 ++++++++++++++++++++++++++++++---------- - widget/gtk/gtkdrawing.h | 14 +++++ - widget/gtk/nsNativeThemeGTK.cpp | 32 +---------- - 3 files changed, 107 insertions(+), 60 deletions(-) - -diff --git widget/gtk/gtk3drawing.cpp widget/gtk/gtk3drawing.cpp -index 4c562b380095..7968aef920f6 100644 ---- widget/gtk/gtk3drawing.cpp -+++ widget/gtk/gtk3drawing.cpp -@@ -22,6 +22,8 @@ static gboolean checkbox_check_state; - static gboolean notebook_has_tab_gap; - - static ScrollbarGTKMetrics sScrollbarMetrics[2]; -+static ToggleGTKMetrics sCheckboxMetrics; -+static ToggleGTKMetrics sRadioMetrics; - - #define ARROW_UP 0 - #define ARROW_DOWN G_PI -@@ -110,6 +112,8 @@ moz_gtk_refresh() - - sScrollbarMetrics[GTK_ORIENTATION_HORIZONTAL].initialized = false; - sScrollbarMetrics[GTK_ORIENTATION_VERTICAL].initialized = false; -+ sCheckboxMetrics.initialized = false; -+ sRadioMetrics.initialized = false; - } - - gint -@@ -308,33 +312,21 @@ moz_gtk_toggle_paint(cairo_t *cr, GdkRectangle* rect, - gboolean isradio, GtkTextDirection direction) - { - GtkStateFlags state_flags = GetStateFlagsFromGtkWidgetState(state); -- gint indicator_size, indicator_spacing; - gint x, y, width, height; -- gint focus_x, focus_y, focus_width, focus_height; - GtkStyleContext *style; - -- GtkWidget *widget = GetWidget(isradio ? MOZ_GTK_RADIOBUTTON_CONTAINER : -- MOZ_GTK_CHECKBUTTON_CONTAINER); -- gtk_widget_style_get(widget, -- "indicator_size", &indicator_size, -- "indicator_spacing", &indicator_spacing, -- nullptr); -+ const ToggleGTKMetrics* metrics = GetToggleMetrics(isradio); - - // XXX we should assert rect->height >= indicator_size too - // after bug 369581 is fixed. -- MOZ_ASSERT(rect->width >= indicator_size, -+ MOZ_ASSERT(rect->width >= metrics->minSizeWithBorder.width, - "GetMinimumWidgetSize was ignored"); - - // Paint it center aligned in the rect. -- x = rect->x + (rect->width - indicator_size) / 2; -- y = rect->y + (rect->height - indicator_size) / 2; -- width = indicator_size; -- height = indicator_size; -- -- focus_x = x - indicator_spacing; -- focus_y = y - indicator_spacing; -- focus_width = width + 2 * indicator_spacing; -- focus_height = height + 2 * indicator_spacing; -+ width = metrics->minSizeWithBorder.width; -+ height = metrics->minSizeWithBorder.height; -+ x = rect->x + (rect->width - width) / 2; -+ y = rect->y + (rect->height - height) / 2; - - if (selected) - state_flags = static_cast(state_flags|checkbox_check_state); -@@ -348,20 +340,25 @@ moz_gtk_toggle_paint(cairo_t *cr, GdkRectangle* rect, - if (gtk_check_version(3, 20, 0) == nullptr) { - gtk_render_background(style, cr, x, y, width, height); - gtk_render_frame(style, cr, x, y, width, height); -- } -- -- if (isradio) { -- gtk_render_option(style, cr, x, y, width, height); -- if (state->focused) { -- gtk_render_focus(style, cr, focus_x, focus_y, -- focus_width, focus_height); -+ // Indicator is inset by the toggle's padding and border. -+ gint indicator_x = x + metrics->borderAndPadding.left; -+ gint indicator_y = y + metrics->borderAndPadding.top; -+ gint indicator_width = metrics->minSizeWithBorder.width - -+ metrics->borderAndPadding.left - metrics->borderAndPadding.right; -+ gint indicator_height = metrics->minSizeWithBorder.height - -+ metrics->borderAndPadding.top - metrics->borderAndPadding.bottom; -+ if (isradio) { -+ gtk_render_option(style, cr, indicator_x, indicator_y, -+ indicator_width, indicator_height); -+ } else { -+ gtk_render_check(style, cr, indicator_x, indicator_y, -+ indicator_width, indicator_height); - } -- } -- else { -- gtk_render_check(style, cr, x, y, width, height); -- if (state->focused) { -- gtk_render_focus(style, cr, -- focus_x, focus_y, focus_width, focus_height); -+ } else { -+ if (isradio) { -+ gtk_render_option(style, cr, x, y, width, height); -+ } else { -+ gtk_render_check(style, cr, x, y, width, height); - } - } - -@@ -2514,6 +2511,68 @@ SizeFromLengthAndBreadth(GtkOrientation aOrientation, - MozGtkSize({aLength, aBreadth}) : MozGtkSize({aBreadth, aLength}); - } - -+const ToggleGTKMetrics* -+GetToggleMetrics(bool isRadio) -+{ -+ ToggleGTKMetrics* metrics; -+ if (isRadio) { -+ metrics = &sRadioMetrics; -+ } else { -+ metrics = &sCheckboxMetrics; -+ } -+ if (metrics->initialized) -+ return metrics; -+ -+ metrics->initialized = true; -+ if (gtk_check_version(3,20,0) == nullptr) { -+ GtkStyleContext* style; -+ if (isRadio) { -+ style = GetStyleContext(MOZ_GTK_RADIOBUTTON); -+ } else { -+ style = GetStyleContext(MOZ_GTK_CHECKBUTTON); -+ } -+ GtkStateFlags state_flags = gtk_style_context_get_state(style); -+ gtk_style_context_get(style, state_flags, -+ "min-height",&(metrics->minSizeWithBorder.height), -+ "min-width", &(metrics->minSizeWithBorder.width), -+ nullptr); -+ // Fallback to indicator size if min dimensions are zero -+ if (metrics->minSizeWithBorder.height == 0 || -+ metrics->minSizeWithBorder.width == 0) { -+ gint indicator_size; -+ gtk_widget_style_get(GetWidget(MOZ_GTK_CHECKBUTTON_CONTAINER), -+ "indicator_size", &indicator_size, nullptr); -+ if (metrics->minSizeWithBorder.height == 0) { -+ metrics->minSizeWithBorder.height = indicator_size; -+ } -+ if (metrics->minSizeWithBorder.width == 0) { -+ metrics->minSizeWithBorder.width = indicator_size; -+ } -+ } -+ -+ GtkBorder border, padding; -+ gtk_style_context_get_border(style, state_flags, &border); -+ gtk_style_context_get_padding(style, state_flags, &padding); -+ metrics->borderAndPadding.left = border.left + padding.left; -+ metrics->borderAndPadding.right = border.right + padding.right; -+ metrics->borderAndPadding.top = border.top + padding.top; -+ metrics->borderAndPadding.bottom = border.bottom + padding.bottom; -+ metrics->minSizeWithBorder.width += metrics->borderAndPadding.left + -+ metrics->borderAndPadding.right; -+ metrics->minSizeWithBorder.height += metrics->borderAndPadding.top + -+ metrics->borderAndPadding.bottom; -+ } else { -+ gint indicator_size, indicator_spacing; -+ gtk_widget_style_get(GetWidget(MOZ_GTK_CHECKBUTTON_CONTAINER), -+ "indicator_size", &indicator_size, -+ "indicator_spacing", &indicator_spacing, -+ nullptr); -+ metrics->minSizeWithBorder.width = -+ metrics->minSizeWithBorder.height = indicator_size; -+ } -+ return metrics; -+} -+ - const ScrollbarGTKMetrics* - GetScrollbarMetrics(GtkOrientation aOrientation) - { -diff --git widget/gtk/gtkdrawing.h widget/gtk/gtkdrawing.h -index 42dbf8287499..909c18f7f525 100644 ---- widget/gtk/gtkdrawing.h -+++ widget/gtk/gtkdrawing.h -@@ -83,6 +83,12 @@ typedef struct { - } border; - } ScrollbarGTKMetrics; - -+typedef struct { -+ bool initialized; -+ MozGtkSize minSizeWithBorder; -+ GtkBorder borderAndPadding; -+} ToggleGTKMetrics; -+ - typedef enum { - MOZ_GTK_STEPPER_DOWN = 1 << 0, - MOZ_GTK_STEPPER_BOTTOM = 1 << 1, -@@ -391,6 +397,14 @@ moz_gtk_get_tab_border(gint* left, gint* top, gint* right, gint* bottom, - gint - moz_gtk_checkbox_get_metrics(gint* indicator_size, gint* indicator_spacing); - -+/** -+ * Get metrics of the toggle (radio or checkbox) -+ * isRadio: [IN] true when requesting metrics for the radio button -+ * returns: pointer to ToggleGTKMetrics struct -+ */ -+const ToggleGTKMetrics* -+GetToggleMetrics(bool isRadio); -+ - /** - * Get the desired size of a GtkRadioButton - * indicator_size: [OUT] the indicator size -diff --git widget/gtk/nsNativeThemeGTK.cpp widget/gtk/nsNativeThemeGTK.cpp -index 06e62efbcda8..da3eaa71a6b4 100644 ---- widget/gtk/nsNativeThemeGTK.cpp -+++ widget/gtk/nsNativeThemeGTK.cpp -@@ -1020,24 +1020,6 @@ nsNativeThemeGTK::GetExtraSizeForWidget(nsIFrame* aFrame, uint8_t aWidgetType, - aExtra->left = aExtra->right = 1; - break; - -- // Include the indicator spacing (the padding around the control). -- case NS_THEME_CHECKBOX: -- case NS_THEME_RADIO: -- { -- gint indicator_size, indicator_spacing; -- -- if (aWidgetType == NS_THEME_CHECKBOX) { -- moz_gtk_checkbox_get_metrics(&indicator_size, &indicator_spacing); -- } else { -- moz_gtk_radio_get_metrics(&indicator_size, &indicator_spacing); -- } -- -- aExtra->top = indicator_spacing; -- aExtra->right = indicator_spacing; -- aExtra->bottom = indicator_spacing; -- aExtra->left = indicator_spacing; -- break; -- } - case NS_THEME_BUTTON : - { - if (IsDefaultButton(aFrame)) { -@@ -1595,17 +1577,9 @@ nsNativeThemeGTK::GetMinimumWidgetSize(nsPresContext* aPresContext, - case NS_THEME_CHECKBOX: - case NS_THEME_RADIO: - { -- gint indicator_size, indicator_spacing; -- -- if (aWidgetType == NS_THEME_CHECKBOX) { -- moz_gtk_checkbox_get_metrics(&indicator_size, &indicator_spacing); -- } else { -- moz_gtk_radio_get_metrics(&indicator_size, &indicator_spacing); -- } -- -- // Include space for the indicator and the padding around it. -- aResult->width = indicator_size; -- aResult->height = indicator_size; -+ const ToggleGTKMetrics* metrics = GetToggleMetrics(aWidgetType == NS_THEME_RADIO); -+ aResult->width = metrics->minSizeWithBorder.width; -+ aResult->height = metrics->minSizeWithBorder.height; - } - break; - case NS_THEME_TOOLBARBUTTON_DROPDOWN: diff --git a/www/waterfox/files/patch-bug1382359 b/www/waterfox/files/patch-bug1382359 deleted file mode 100644 index 27cf995ec54..00000000000 --- a/www/waterfox/files/patch-bug1382359 +++ /dev/null @@ -1,138 +0,0 @@ -commit dd4fb3ba9f14 -Author: Georg Koppen -Date: Thu Mar 1 09:44:30 2018 +0100 - - Bug 1382359: Treat .onion as a secure context - - Websites which collect passwords but don't use HTTPS start showing scary - warnings from Firefox 51 onwards and mixed context blocking has been - available even longer. - - .onion sites without HTTPS support are affected as well, although their - traffic is encrypted and authenticated. This patch addresses this - shortcoming by making sure .onion sites are treated as potentially - trustworthy origins. - - The secure context specification - (https://w3c.github.io/webappsec-secure-contexts/) is pretty much focused - on tying security and trustworthiness to the protocol over which domains - are accessed. However, it is not obvious why .onion sites should not be - treated as potentially trustworthy given: - - "A potentially trustworthy origin is one which a user agent can - generally trust as delivering data securely. - - This algorithms [sic] considers certain hosts, scheme, and origins as - potentially trustworthy, even though they might not be authenticated and - encrypted in the traditional sense." - (https://w3c.github.io/webappsec-secure-contexts/#is-origin-trustworthy) - - We use step 8 in the algorithm to establish trustworthiness of .onion - sites by whitelisting them given the encrypted and authenticated nature - of their traffic. ---- - dom/html/HTMLFormElement.cpp | 4 ++++ - dom/security/nsContentSecurityManager.cpp | 7 +++++++ - dom/security/nsMixedContentBlocker.cpp | 29 +++++++++++++++++++++++++++++ - dom/security/nsMixedContentBlocker.h | 1 + - 4 files changed, 41 insertions(+) - -diff --git dom/html/HTMLFormElement.cpp dom/html/HTMLFormElement.cpp -index 02b3553c8a14..0e00b961ed45 100644 ---- dom/html/HTMLFormElement.cpp -+++ dom/html/HTMLFormElement.cpp -@@ -867,6 +867,10 @@ HTMLFormElement::DoSecureToInsecureSubmitCheck(nsIURI* aActionURL, - return NS_OK; - } - -+ if (nsMixedContentBlocker::IsPotentiallyTrustworthyOnion(aActionURL)) { -+ return NS_OK; -+ } -+ - nsCOMPtr window = OwnerDoc()->GetWindow(); - if (!window) { - return NS_ERROR_FAILURE; -diff --git dom/security/nsContentSecurityManager.cpp dom/security/nsContentSecurityManager.cpp -index ed83d490ca3f..d0e50d51bfd2 100644 ---- dom/security/nsContentSecurityManager.cpp -+++ dom/security/nsContentSecurityManager.cpp -@@ -13,6 +13,7 @@ - #include "nsIImageLoadingContent.h" - - #include "mozilla/dom/Element.h" -+#include "mozilla/dom/nsMixedContentBlocker.h" - - NS_IMPL_ISUPPORTS(nsContentSecurityManager, - nsIContentSecurityManager, -@@ -879,6 +880,12 @@ nsContentSecurityManager::IsOriginPotentiallyTrustworthy(nsIPrincipal* aPrincipa - } - } - } -+ // Maybe we have a .onion URL. Treat it as whitelisted as well if -+ // `dom.securecontext.whitelist_onions` is `true`. -+ if (nsMixedContentBlocker::IsPotentiallyTrustworthyOnion(uri)) { -+ *aIsTrustWorthy = true; -+ return NS_OK; -+ } - } - - return NS_OK; -diff --git dom/security/nsMixedContentBlocker.cpp dom/security/nsMixedContentBlocker.cpp -index 918a6ce53132..0361e744c800 100644 ---- dom/security/nsMixedContentBlocker.cpp -+++ dom/security/nsMixedContentBlocker.cpp -@@ -395,6 +395,28 @@ nsMixedContentBlocker::IsPotentiallyTrustworthyLoopbackURL(nsIURI* aURL) { - return host.EqualsLiteral("127.0.0.1") || host.EqualsLiteral("::1"); - } - -+/* Maybe we have a .onion URL. Treat it as whitelisted as well if -+ * `dom.securecontext.whitelist_onions` is `true`. -+ */ -+bool -+nsMixedContentBlocker::IsPotentiallyTrustworthyOnion(nsIURI* aURL) { -+ static bool sInited = false; -+ static bool sWhiteListOnions = false; -+ if (!sInited) { -+ Preferences::AddBoolVarCache(&sWhiteListOnions, -+ "dom.securecontext.whitelist_onions"); -+ sInited = true; -+ } -+ if (!sWhiteListOnions) { -+ return false; -+ } -+ -+ nsAutoCString host; -+ nsresult rv = aURL->GetHost(host); -+ NS_ENSURE_SUCCESS(rv, false); -+ return StringEndsWith(host, NS_LITERAL_CSTRING(".onion")); -+} -+ - /* Static version of ShouldLoad() that contains all the Mixed Content Blocker - * logic. Called from non-static ShouldLoad(). - */ -@@ -725,6 +747,13 @@ nsMixedContentBlocker::ShouldLoad(bool aHadInsecureImageRedirect, - return NS_OK; - } - -+ // .onion URLs are encrypted and authenticated. Don't treat them as mixed -+ // content if potentially trustworthy (i.e. whitelisted). -+ if (isHttpScheme && IsPotentiallyTrustworthyOnion(innerContentLocation)) { -+ *aDecision = ACCEPT; -+ return NS_OK; -+ } -+ - // The page might have set the CSP directive 'upgrade-insecure-requests'. In such - // a case allow the http: load to succeed with the promise that the channel will - // get upgraded to https before fetching any data from the netwerk. -diff --git dom/security/nsMixedContentBlocker.h dom/security/nsMixedContentBlocker.h -index b7e4a7457bd2..a9b4dbdb612e 100644 ---- dom/security/nsMixedContentBlocker.h -+++ dom/security/nsMixedContentBlocker.h -@@ -48,6 +48,7 @@ public: - // See: - // https://w3c.github.io/webappsec-secure-contexts/#is-origin-trustworthy - static bool IsPotentiallyTrustworthyLoopbackURL(nsIURI* aURL); -+ static bool IsPotentiallyTrustworthyOnion(nsIURI* aURL); - - /* Static version of ShouldLoad() that contains all the Mixed Content Blocker - * logic. Called from non-static ShouldLoad(). diff --git a/www/waterfox/files/patch-bug1383501 b/www/waterfox/files/patch-bug1383501 deleted file mode 100644 index 372046df120..00000000000 --- a/www/waterfox/files/patch-bug1383501 +++ /dev/null @@ -1,83 +0,0 @@ -commit 8ba0e2ee02b0 -Author: Aaron Klotz -Date: Wed Oct 4 09:12:25 2017 -0600 - - Bug 1383501 - Do not crash when TabParent::RecvPDocAccessibleConstructor receives a null COM proxy sent to the parent process. r=jimm, a=ritu - - MozReview-Commit-ID: 5IOuLXc375T - - --HG-- - extra : source : e2a6e2ddfa184b5a1f410408d7232ed0041a360f ---- - accessible/ipc/win/ProxyAccessible.cpp | 2 +- - accessible/ipc/win/ProxyAccessible.h | 13 ++++++++++++- - dom/ipc/TabParent.cpp | 2 ++ - 3 files changed, 15 insertions(+), 2 deletions(-) - -diff --git accessible/ipc/win/ProxyAccessible.cpp accessible/ipc/win/ProxyAccessible.cpp -index 0942e280ea30..383ece99fb0c 100644 ---- accessible/ipc/win/ProxyAccessible.cpp -+++ accessible/ipc/win/ProxyAccessible.cpp -@@ -34,7 +34,7 @@ ProxyAccessible::GetCOMInterface(void** aOutAccessible) const - return false; - } - -- if (!mCOMProxy) { -+ if (!mCOMProxy && mSafeToRecurse) { - // See if we can lazily obtain a COM proxy - AccessibleWrap* wrap = WrapperFor(this); - bool isDefunct = false; -diff --git accessible/ipc/win/ProxyAccessible.h accessible/ipc/win/ProxyAccessible.h -index 83f1e6093253..4fd897e588fe 100644 ---- accessible/ipc/win/ProxyAccessible.h -+++ accessible/ipc/win/ProxyAccessible.h -@@ -27,6 +27,7 @@ public: - ProxyAccessible(uint64_t aID, ProxyAccessible* aParent, - DocAccessibleParent* aDoc, role aRole, uint32_t aInterfaces) - : ProxyAccessibleBase(aID, aParent, aDoc, aRole, aInterfaces) -+ , mSafeToRecurse(true) - { - MOZ_COUNT_CTOR(ProxyAccessible); - } -@@ -40,7 +41,16 @@ public: - - bool GetCOMInterface(void** aOutAccessible) const; - void SetCOMInterface(const RefPtr& aIAccessible) -- { mCOMProxy = aIAccessible; } -+ { -+ if (aIAccessible) { -+ mCOMProxy = aIAccessible; -+ } else { -+ // If we were supposed to be receiving an interface (hence the call to -+ // this function), but the interface turns out to be null, then we're -+ // broken for some reason. -+ mSafeToRecurse = false; -+ } -+ } - - protected: - explicit ProxyAccessible(DocAccessibleParent* aThisAsDoc) -@@ -49,6 +59,7 @@ protected: - - private: - RefPtr mCOMProxy; -+ bool mSafeToRecurse; - }; - - } -diff --git dom/ipc/TabParent.cpp dom/ipc/TabParent.cpp -index 7fc5689e6211..d8733a377219 100644 ---- dom/ipc/TabParent.cpp -+++ dom/ipc/TabParent.cpp -@@ -972,9 +972,11 @@ TabParent::RecvPDocAccessibleConstructor(PDocAccessibleParent* aDoc, - #ifdef XP_WIN - a11y::WrapperFor(doc)->SetID(aMsaaID); - MOZ_ASSERT(!aDocCOMProxy.IsNull()); -+#ifdef NIGHTLY_BUILD - if (aDocCOMProxy.IsNull()) { - return IPC_FAIL(this, "Constructing a top-level PDocAccessible with null COM proxy"); - } -+#endif - - RefPtr proxy(aDocCOMProxy.Get()); - doc->SetCOMInterface(proxy); diff --git a/www/waterfox/files/patch-bug1384121 b/www/waterfox/files/patch-bug1384121 deleted file mode 100644 index 94a26158585..00000000000 --- a/www/waterfox/files/patch-bug1384121 +++ /dev/null @@ -1,218 +0,0 @@ -commit 485ed2f2b015 -Author: Jan de Mooij -Date: Mon Sep 18 15:08:44 2017 +0200 - - Bug 1384121 part 1 - Don't sweep ObjectGroups under IC helper functions. r=bhackett ---- - js/src/jit/IonCacheIRCompiler.cpp | 4 ++-- - js/src/vm/ObjectGroup.h | 2 ++ - js/src/vm/TypeInference-inl.h | 29 ++++++++++++++++++++++------- - js/src/vm/UnboxedObject.cpp | 2 +- - 4 files changed, 27 insertions(+), 10 deletions(-) - -diff --git js/src/jit/IonCacheIRCompiler.cpp js/src/jit/IonCacheIRCompiler.cpp -index b11aed7966b6..bbfbdae57b12 100644 ---- js/src/jit/IonCacheIRCompiler.cpp -+++ js/src/jit/IonCacheIRCompiler.cpp -@@ -1324,9 +1324,9 @@ IonCacheIRCompiler::emitCallStringSplitResult() - static bool - GroupHasPropertyTypes(ObjectGroup* group, jsid* id, Value* v) - { -- if (group->unknownProperties()) -+ if (group->unknownPropertiesDontCheckGeneration()) - return true; -- HeapTypeSet* propTypes = group->maybeGetProperty(*id); -+ HeapTypeSet* propTypes = group->maybeGetPropertyDontCheckGeneration(*id); - if (!propTypes) - return true; - if (!propTypes->nonConstantProperty()) -diff --git js/src/vm/ObjectGroup.h js/src/vm/ObjectGroup.h -index 237b5a152576..0eba71ee084f 100644 ---- js/src/vm/ObjectGroup.h -+++ js/src/vm/ObjectGroup.h -@@ -390,6 +390,7 @@ class ObjectGroup : public gc::TenuredCell - - /* Get a property only if it already exists. */ - MOZ_ALWAYS_INLINE HeapTypeSet* maybeGetProperty(jsid id); -+ MOZ_ALWAYS_INLINE HeapTypeSet* maybeGetPropertyDontCheckGeneration(jsid id); - - /* - * Iterate through the group's properties. getPropertyCount overapproximates -@@ -471,6 +472,7 @@ class ObjectGroup : public gc::TenuredCell - } - - inline uint32_t basePropertyCount(); -+ inline uint32_t basePropertyCountDontCheckGeneration(); - - private: - inline void setBasePropertyCount(uint32_t count); -diff --git js/src/vm/TypeInference-inl.h js/src/vm/TypeInference-inl.h -index f7cd3459ef19..f2b0b9a52fbc 100644 ---- js/src/vm/TypeInference-inl.h -+++ js/src/vm/TypeInference-inl.h -@@ -369,10 +369,10 @@ TypeMonitorCall(JSContext* cx, const js::CallArgs& args, bool constructing) - MOZ_ALWAYS_INLINE bool - TrackPropertyTypes(JSObject* obj, jsid id) - { -- if (obj->hasLazyGroup() || obj->group()->unknownProperties()) -+ if (obj->hasLazyGroup() || obj->group()->unknownPropertiesDontCheckGeneration()) - return false; - -- if (obj->isSingleton() && !obj->group()->maybeGetProperty(id)) -+ if (obj->isSingleton() && !obj->group()->maybeGetPropertyDontCheckGeneration(id)) - return false; - - return true; -@@ -410,7 +410,7 @@ HasTrackedPropertyType(JSObject* obj, jsid id, TypeSet::Type type) - MOZ_ASSERT(id == IdToTypeId(id)); - MOZ_ASSERT(TrackPropertyTypes(obj, id)); - -- if (HeapTypeSet* types = obj->group()->maybeGetProperty(id)) { -+ if (HeapTypeSet* types = obj->group()->maybeGetPropertyDontCheckGeneration(id)) { - if (!types->hasType(type)) - return false; - // Non-constant properties are only relevant for singleton objects. -@@ -1074,10 +1074,18 @@ TypeSet::getObjectClass(unsigned i) const - // ObjectGroup - ///////////////////////////////////////////////////////////////////// - -+inline uint32_t -+ObjectGroup::basePropertyCountDontCheckGeneration() -+{ -+ uint32_t flags = flagsDontCheckGeneration(); -+ return (flags & OBJECT_FLAG_PROPERTY_COUNT_MASK) >> OBJECT_FLAG_PROPERTY_COUNT_SHIFT; -+} -+ - inline uint32_t - ObjectGroup::basePropertyCount() - { -- return (flags() & OBJECT_FLAG_PROPERTY_COUNT_MASK) >> OBJECT_FLAG_PROPERTY_COUNT_SHIFT; -+ maybeSweep(nullptr); -+ return basePropertyCountDontCheckGeneration(); - } - - inline void -@@ -1134,14 +1142,14 @@ ObjectGroup::getProperty(JSContext* cx, JSObject* obj, jsid id) - } - - MOZ_ALWAYS_INLINE HeapTypeSet* --ObjectGroup::maybeGetProperty(jsid id) -+ObjectGroup::maybeGetPropertyDontCheckGeneration(jsid id) - { - MOZ_ASSERT(JSID_IS_VOID(id) || JSID_IS_EMPTY(id) || JSID_IS_STRING(id) || JSID_IS_SYMBOL(id)); - MOZ_ASSERT_IF(!JSID_IS_EMPTY(id), id == IdToTypeId(id)); -- MOZ_ASSERT(!unknownProperties()); -+ MOZ_ASSERT(!unknownPropertiesDontCheckGeneration()); - - Property* prop = TypeHashSet::Lookup -- (propertySet, basePropertyCount(), id); -+ (propertySet, basePropertyCountDontCheckGeneration(), id); - - if (!prop) - return nullptr; -@@ -1150,6 +1158,13 @@ ObjectGroup::maybeGetProperty(jsid id) - return &prop->types; - } - -+MOZ_ALWAYS_INLINE HeapTypeSet* -+ObjectGroup::maybeGetProperty(jsid id) -+{ -+ maybeSweep(nullptr); -+ return maybeGetPropertyDontCheckGeneration(id); -+} -+ - inline unsigned - ObjectGroup::getPropertyCount() - { -diff --git js/src/vm/UnboxedObject.cpp js/src/vm/UnboxedObject.cpp -index c155b7dc47c9..4e007489a67e 100644 ---- js/src/vm/UnboxedObject.cpp -+++ js/src/vm/UnboxedObject.cpp -@@ -363,7 +363,7 @@ UnboxedPlainObject::ensureExpando(JSContext* cx, Handle obj - bool - UnboxedPlainObject::containsUnboxedOrExpandoProperty(JSContext* cx, jsid id) const - { -- if (layout().lookup(id)) -+ if (layoutDontCheckGeneration().lookup(id)) - return true; - - if (maybeExpando() && maybeExpando()->containsShapeOrElement(cx, id)) -commit e240cf665f74 -Author: Jan de Mooij -Date: Wed Sep 20 12:13:54 2017 +0200 - - Bug 1384121 part 2 - Add asserts to catch similar bugs and fix some false positives. r=nbp ---- - js/src/jit/Bailouts.cpp | 4 ---- - js/src/jit/JSJitFrameIter.cpp | 2 ++ - js/src/jit/VMFunctions.cpp | 1 - - js/src/jit/arm/Trampoline-arm.cpp | 9 ++++++--- - js/src/jit/arm64/Trampoline-arm64.cpp | 9 ++++++--- - js/src/jit/mips32/Trampoline-mips32.cpp | 9 ++++++--- - js/src/jit/mips64/Trampoline-mips64.cpp | 9 ++++++--- - js/src/jit/x64/Trampoline-x64.cpp | 9 ++++++--- - js/src/jit/x86/Trampoline-x86.cpp | 9 ++++++--- - js/src/vm/ObjectGroup-inl.h | 1 + - js/src/vm/Stack.cpp | 2 ++ - js/src/vm/TypeInference.cpp | 3 +++ - 12 files changed, 44 insertions(+), 23 deletions(-) - -diff --git js/src/jit/JSJitFrameIter.cpp js/src/jit/JSJitFrameIter.cpp -index 3774b327d21c..ae76bc2abaf0 100644 ---- js/src/jit/JitFrameIterator.cpp -+++ js/src/jit/JitFrameIterator.cpp -@@ -25,6 +25,8 @@ JSJitFrameIter::JSJitFrameIter(const JitActivation* activation) - current_ = activation_->bailoutData()->fp(); - frameSize_ = activation_->bailoutData()->topFrameSize(); - type_ = JitFrame_Bailout; -+ } else { -+ MOZ_ASSERT(!TlsContext.get()->inUnsafeCallWithABI); - } - } - -diff --git js/src/vm/ObjectGroup-inl.h js/src/vm/ObjectGroup-inl.h -index 7e023ecbad8e..d7caa63d8725 100644 ---- js/src/vm/ObjectGroup-inl.h -+++ js/src/vm/ObjectGroup-inl.h -@@ -16,6 +16,7 @@ ObjectGroup::needsSweep() - { - // Note: this can be called off thread during compacting GCs, in which case - // nothing will be running on the active thread. -+ MOZ_ASSERT(!TlsContext.get()->inUnsafeCallWithABI); - return generation() != zoneFromAnyThread()->types.generation; - } - -diff --git js/src/vm/Stack.cpp js/src/vm/Stack.cpp -index d3c0038db5ca..0406195abd56 100644 ---- js/src/vm/Stack.cpp -+++ js/src/vm/Stack.cpp -@@ -605,6 +605,8 @@ FrameIter::popInterpreterFrame() - void - FrameIter::settleOnActivation() - { -+ MOZ_ASSERT(!data_.cx_->inUnsafeCallWithABI); -+ - while (true) { - if (data_.activations_.done()) { - data_.state_ = DONE; -diff --git js/src/vm/TypeInference.cpp js/src/vm/TypeInference.cpp -index f0562a4355f8..eba18e34397e 100644 ---- js/src/vm/TypeInference.cpp -+++ js/src/vm/TypeInference.cpp -@@ -4428,6 +4428,8 @@ ObjectGroup::sweep(AutoClearTypeInferenceStateOnOOM* oom) - /* static */ void - JSScript::maybeSweepTypes(AutoClearTypeInferenceStateOnOOM* oom) - { -+ MOZ_ASSERT(!TlsContext.get()->inUnsafeCallWithABI); -+ - if (!types_ || typesGeneration() == zone()->types.generation) - return; - -@@ -4611,6 +4613,7 @@ AutoClearTypeInferenceStateOnOOM::AutoClearTypeInferenceStateOnOOM(Zone* zone) - : zone(zone), oom(false) - { - MOZ_RELEASE_ASSERT(CurrentThreadCanAccessZone(zone)); -+ MOZ_ASSERT(!TlsContext.get()->inUnsafeCallWithABI); - zone->types.setSweepingTypes(true); - } - diff --git a/www/waterfox/files/patch-bug1384701 b/www/waterfox/files/patch-bug1384701 deleted file mode 100644 index 142d5430d26..00000000000 --- a/www/waterfox/files/patch-bug1384701 +++ /dev/null @@ -1,796 +0,0 @@ -diff --git widget/gtk/nsLookAndFeel.cpp widget/gtk/nsLookAndFeel.cpp -index 6bb3e27c6653..f4c35d82200a 100644 ---- widget/gtk/nsLookAndFeel.cpp -+++ widget/gtk/nsLookAndFeel.cpp -@@ -29,11 +29,9 @@ - - #include "mozilla/gfx/2D.h" - --#if MOZ_WIDGET_GTK != 2 - #include - #include "WidgetStyleCache.h" - #include "prenv.h" --#endif - - using mozilla::LookAndFeel; - -@@ -49,9 +47,6 @@ using mozilla::LookAndFeel; - - nsLookAndFeel::nsLookAndFeel() - : nsXPLookAndFeel(), --#if (MOZ_WIDGET_GTK == 2) -- mStyle(nullptr), --#endif - mDefaultFontCached(false), mButtonFontCached(false), - mFieldFontCached(false), mMenuFontCached(false), - mInitialized(false) -@@ -66,12 +61,8 @@ nsLookAndFeel::NativeInit() - - nsLookAndFeel::~nsLookAndFeel() - { --#if (MOZ_WIDGET_GTK == 2) -- g_object_unref(mStyle); --#endif - } - --#if MOZ_WIDGET_GTK != 2 - // Modifies color |*aDest| as if a pattern of color |aSource| was painted with - // CAIRO_OPERATOR_OVER to a surface with color |*aDest|. - static void -@@ -228,42 +219,19 @@ GetBorderColors(GtkStyleContext* aContext, - *aDarkColor = GDK_RGBA_TO_NS_RGBA(darkColor); - return ret; - } --#endif - - nsresult - nsLookAndFeel::NativeGetColor(ColorID aID, nscolor& aColor) - { - EnsureInit(); - --#if (MOZ_WIDGET_GTK == 3) - GdkRGBA gdk_color; --#endif - nsresult res = NS_OK; - - switch (aID) { - // These colors don't seem to be used for anything anymore in Mozilla - // (except here at least TextSelectBackground and TextSelectForeground) - // The CSS2 colors below are used. --#if (MOZ_WIDGET_GTK == 2) -- case eColorID_WindowBackground: -- aColor = GDK_COLOR_TO_NS_RGB(mStyle->base[GTK_STATE_NORMAL]); -- break; -- case eColorID_WindowForeground: -- aColor = GDK_COLOR_TO_NS_RGB(mStyle->text[GTK_STATE_NORMAL]); -- break; -- case eColorID_WidgetBackground: -- aColor = GDK_COLOR_TO_NS_RGB(mStyle->bg[GTK_STATE_NORMAL]); -- break; -- case eColorID_WidgetForeground: -- aColor = GDK_COLOR_TO_NS_RGB(mStyle->fg[GTK_STATE_NORMAL]); -- break; -- case eColorID_WidgetSelectBackground: -- aColor = GDK_COLOR_TO_NS_RGB(mStyle->bg[GTK_STATE_SELECTED]); -- break; -- case eColorID_WidgetSelectForeground: -- aColor = GDK_COLOR_TO_NS_RGB(mStyle->fg[GTK_STATE_SELECTED]); -- break; --#else - case eColorID_WindowBackground: - case eColorID_WidgetBackground: - case eColorID_TextBackground: -@@ -303,35 +271,12 @@ nsLookAndFeel::NativeGetColor(ColorID aID, nscolor& aColor) - case eColorID__moz_html_cellhighlighttext: - aColor = sTextSelectedText; - break; --#endif - case eColorID_Widget3DHighlight: - aColor = NS_RGB(0xa0,0xa0,0xa0); - break; - case eColorID_Widget3DShadow: - aColor = NS_RGB(0x40,0x40,0x40); - break; --#if (MOZ_WIDGET_GTK == 2) -- case eColorID_TextBackground: -- // not used? -- aColor = GDK_COLOR_TO_NS_RGB(mStyle->base[GTK_STATE_NORMAL]); -- break; -- case eColorID_TextForeground: -- // not used? -- aColor = GDK_COLOR_TO_NS_RGB(mStyle->text[GTK_STATE_NORMAL]); -- break; -- case eColorID_TextSelectBackground: -- case eColorID_IMESelectedRawTextBackground: -- case eColorID_IMESelectedConvertedTextBackground: -- // still used -- aColor = GDK_COLOR_TO_NS_RGB(mStyle->base[GTK_STATE_SELECTED]); -- break; -- case eColorID_TextSelectForeground: -- case eColorID_IMESelectedRawTextForeground: -- case eColorID_IMESelectedConvertedTextForeground: -- // still used -- aColor = GDK_COLOR_TO_NS_RGB(mStyle->text[GTK_STATE_SELECTED]); -- break; --#endif - case eColorID_IMERawInputBackground: - case eColorID_IMEConvertedTextBackground: - aColor = NS_TRANSPARENT; -@@ -352,53 +297,6 @@ nsLookAndFeel::NativeGetColor(ColorID aID, nscolor& aColor) - aColor = NS_RGB(0xff, 0, 0); - break; - --#if (MOZ_WIDGET_GTK == 2) -- // css2 http://www.w3.org/TR/REC-CSS2/ui.html#system-colors -- case eColorID_activeborder: -- // active window border -- aColor = GDK_COLOR_TO_NS_RGB(mStyle->bg[GTK_STATE_NORMAL]); -- break; -- case eColorID_activecaption: -- // active window caption background -- aColor = GDK_COLOR_TO_NS_RGB(mStyle->bg[GTK_STATE_NORMAL]); -- break; -- case eColorID_appworkspace: -- // MDI background color -- aColor = GDK_COLOR_TO_NS_RGB(mStyle->bg[GTK_STATE_NORMAL]); -- break; -- case eColorID_background: -- // desktop background -- aColor = GDK_COLOR_TO_NS_RGB(mStyle->bg[GTK_STATE_NORMAL]); -- break; -- case eColorID_captiontext: -- // text in active window caption, size box, and scrollbar arrow box (!) -- aColor = GDK_COLOR_TO_NS_RGB(mStyle->fg[GTK_STATE_NORMAL]); -- break; -- case eColorID_graytext: -- // disabled text in windows, menus, etc. -- aColor = GDK_COLOR_TO_NS_RGB(mStyle->fg[GTK_STATE_INSENSITIVE]); -- break; -- case eColorID_highlight: -- // background of selected item -- aColor = GDK_COLOR_TO_NS_RGB(mStyle->base[GTK_STATE_SELECTED]); -- break; -- case eColorID_highlighttext: -- // text of selected item -- aColor = GDK_COLOR_TO_NS_RGB(mStyle->text[GTK_STATE_SELECTED]); -- break; -- case eColorID_inactiveborder: -- // inactive window border -- aColor = GDK_COLOR_TO_NS_RGB(mStyle->bg[GTK_STATE_NORMAL]); -- break; -- case eColorID_inactivecaption: -- // inactive window caption -- aColor = GDK_COLOR_TO_NS_RGB(mStyle->bg[GTK_STATE_INSENSITIVE]); -- break; -- case eColorID_inactivecaptiontext: -- // text in inactive window caption -- aColor = GDK_COLOR_TO_NS_RGB(mStyle->fg[GTK_STATE_INSENSITIVE]); -- break; --#else - // css2 http://www.w3.org/TR/REC-CSS2/ui.html#system-colors - case eColorID_activeborder: { - // active window border -@@ -433,7 +331,6 @@ nsLookAndFeel::NativeGetColor(ColorID aID, nscolor& aColor) - ReleaseStyleContext(style); - break; - } --#endif - case eColorID_infobackground: - // tooltip background color - aColor = sInfoBackground; -@@ -452,11 +349,7 @@ nsLookAndFeel::NativeGetColor(ColorID aID, nscolor& aColor) - break; - case eColorID_scrollbar: - // scrollbar gray area --#if (MOZ_WIDGET_GTK == 2) -- aColor = GDK_COLOR_TO_NS_RGB(mStyle->bg[GTK_STATE_ACTIVE]); --#else - aColor = sMozScrollbar; --#endif - break; - - case eColorID_threedlightshadow: -@@ -465,11 +358,7 @@ nsLookAndFeel::NativeGetColor(ColorID aID, nscolor& aColor) - case eColorID_threedface: - case eColorID_buttonface: - // 3-D face color --#if (MOZ_WIDGET_GTK == 3) - aColor = sMozWindowBackground; --#else -- aColor = sButtonBackground; --#endif - break; - - case eColorID_buttontext: -@@ -491,56 +380,6 @@ nsLookAndFeel::NativeGetColor(ColorID aID, nscolor& aColor) - aColor = sFrameInnerDarkBorder; - break; - --#if (MOZ_WIDGET_GTK == 2) -- case eColorID_threeddarkshadow: -- // 3-D shadow outer edge color -- aColor = GDK_COLOR_TO_NS_RGB(mStyle->black); -- break; -- -- case eColorID_window: -- case eColorID_windowframe: -- aColor = GDK_COLOR_TO_NS_RGB(mStyle->bg[GTK_STATE_NORMAL]); -- break; -- -- case eColorID_windowtext: -- aColor = GDK_COLOR_TO_NS_RGB(mStyle->fg[GTK_STATE_NORMAL]); -- break; -- -- case eColorID__moz_eventreerow: -- case eColorID__moz_field: -- aColor = GDK_COLOR_TO_NS_RGB(mStyle->base[GTK_STATE_NORMAL]); -- break; -- case eColorID__moz_fieldtext: -- aColor = GDK_COLOR_TO_NS_RGB(mStyle->text[GTK_STATE_NORMAL]); -- break; -- case eColorID__moz_dialog: -- aColor = GDK_COLOR_TO_NS_RGB(mStyle->bg[GTK_STATE_NORMAL]); -- break; -- case eColorID__moz_dialogtext: -- aColor = GDK_COLOR_TO_NS_RGB(mStyle->fg[GTK_STATE_NORMAL]); -- break; -- case eColorID__moz_dragtargetzone: -- aColor = GDK_COLOR_TO_NS_RGB(mStyle->bg[GTK_STATE_SELECTED]); -- break; -- case eColorID__moz_buttondefault: -- // default button border color -- aColor = GDK_COLOR_TO_NS_RGB(mStyle->black); -- break; -- case eColorID__moz_buttonhoverface: -- aColor = GDK_COLOR_TO_NS_RGB(mStyle->bg[GTK_STATE_PRELIGHT]); -- break; -- case eColorID__moz_buttonhovertext: -- aColor = GDK_COLOR_TO_NS_RGB(mStyle->fg[GTK_STATE_PRELIGHT]); -- break; -- case eColorID__moz_cellhighlight: -- case eColorID__moz_html_cellhighlight: -- aColor = GDK_COLOR_TO_NS_RGB(mStyle->base[GTK_STATE_ACTIVE]); -- break; -- case eColorID__moz_cellhighlighttext: -- case eColorID__moz_html_cellhighlighttext: -- aColor = GDK_COLOR_TO_NS_RGB(mStyle->text[GTK_STATE_ACTIVE]); -- break; --#else - case eColorID_threeddarkshadow: - // Hardcode to black - aColor = NS_RGB(0x00,0x00,0x00); -@@ -574,7 +413,6 @@ nsLookAndFeel::NativeGetColor(ColorID aID, nscolor& aColor) - case eColorID__moz_buttonhovertext: - aColor = sButtonHoverText; - break; --#endif - case eColorID__moz_menuhover: - aColor = sMenuHover; - break; -@@ -590,11 +428,6 @@ nsLookAndFeel::NativeGetColor(ColorID aID, nscolor& aColor) - case eColorID__moz_comboboxtext: - aColor = sComboBoxText; - break; --#if (MOZ_WIDGET_GTK == 2) -- case eColorID__moz_combobox: -- aColor = sComboBoxBackground; -- break; --#endif - case eColorID__moz_menubartext: - aColor = sMenuBarText; - break; -@@ -602,11 +435,7 @@ nsLookAndFeel::NativeGetColor(ColorID aID, nscolor& aColor) - aColor = sMenuBarHoverText; - break; - case eColorID__moz_gtk_info_bar_text: --#if (MOZ_WIDGET_GTK == 3) - aColor = sInfoBarText; --#else -- aColor = sInfoText; --#endif - break; - default: - /* default color is BLACK */ -@@ -618,27 +447,6 @@ nsLookAndFeel::NativeGetColor(ColorID aID, nscolor& aColor) - return res; - } - --#if (MOZ_WIDGET_GTK == 2) --static void darken_gdk_color(GdkColor *src, GdkColor *dest) --{ -- gdouble red; -- gdouble green; -- gdouble blue; -- -- red = (gdouble) src->red / 65535.0; -- green = (gdouble) src->green / 65535.0; -- blue = (gdouble) src->blue / 65535.0; -- -- red *= 0.93; -- green *= 0.93; -- blue *= 0.93; -- -- dest->red = red * 65535.0; -- dest->green = green * 65535.0; -- dest->blue = blue * 65535.0; --} --#endif -- - static int32_t CheckWidgetStyle(GtkWidget* aWidget, const char* aStyle, int32_t aResult) { - gboolean value = FALSE; - gtk_widget_style_get(aWidget, aStyle, &value, nullptr); -@@ -826,14 +634,8 @@ nsLookAndFeel::GetIntImpl(IntID aID, int32_t &aResult) - res = NS_ERROR_NOT_IMPLEMENTED; - break; - case eIntID_TouchEnabled: --#if MOZ_WIDGET_GTK == 3 - aResult = mozilla::widget::WidgetUtils::IsTouchDeviceSupportPresent(); - break; --#else -- aResult = 0; -- res = NS_ERROR_NOT_IMPLEMENTED; --#endif -- break; - case eIntID_MacGraphiteTheme: - aResult = 0; - res = NS_ERROR_NOT_IMPLEMENTED; -@@ -905,24 +707,20 @@ nsLookAndFeel::GetFloatImpl(FloatID aID, float &aResult) - } - - static void --GetSystemFontInfo(GtkWidget *aWidget, -+GetSystemFontInfo(GtkStyleContext *aStyle, - nsString *aFontName, - gfxFontStyle *aFontStyle) - { -- GtkSettings *settings = gtk_widget_get_settings(aWidget); -- - aFontStyle->style = NS_FONT_STYLE_NORMAL; - -- gchar *fontname; -- g_object_get(settings, "gtk-font-name", &fontname, nullptr); -- -+ // As in -+ // https://git.gnome.org/browse/gtk+/tree/gtk/gtkwidget.c?h=3.22.19#n10333 - PangoFontDescription *desc; -- desc = pango_font_description_from_string(fontname); -+ gtk_style_context_get(aStyle, gtk_style_context_get_state(aStyle), -+ "font", &desc, nullptr); - - aFontStyle->systemFont = true; - -- g_free(fontname); -- - NS_NAMED_LITERAL_STRING(quote, "\""); - NS_ConvertUTF8toUTF16 family(pango_font_description_get_family(desc)); - *aFontName = quote + family + quote; -@@ -953,96 +751,28 @@ GetSystemFontInfo(GtkWidget *aWidget, - pango_font_description_free(desc); - } - --static void --GetSystemFontInfo(LookAndFeel::FontID aID, -- nsString *aFontName, -- gfxFontStyle *aFontStyle) --{ -- if (aID == LookAndFeel::eFont_Widget) { -- GtkWidget *label = gtk_label_new("M"); -- GtkWidget *parent = gtk_fixed_new(); -- GtkWidget *window = gtk_window_new(GTK_WINDOW_POPUP); -- -- gtk_container_add(GTK_CONTAINER(parent), label); -- gtk_container_add(GTK_CONTAINER(window), parent); -- -- gtk_widget_ensure_style(label); -- GetSystemFontInfo(label, aFontName, aFontStyle); -- gtk_widget_destroy(window); // no unref, windows are different -- -- } else if (aID == LookAndFeel::eFont_Button) { -- GtkWidget *label = gtk_label_new("M"); -- GtkWidget *parent = gtk_fixed_new(); -- GtkWidget *button = gtk_button_new(); -- GtkWidget *window = gtk_window_new(GTK_WINDOW_POPUP); -- -- gtk_container_add(GTK_CONTAINER(button), label); -- gtk_container_add(GTK_CONTAINER(parent), button); -- gtk_container_add(GTK_CONTAINER(window), parent); -- -- gtk_widget_ensure_style(label); -- GetSystemFontInfo(label, aFontName, aFontStyle); -- gtk_widget_destroy(window); // no unref, windows are different -- -- } else if (aID == LookAndFeel::eFont_Field) { -- GtkWidget *entry = gtk_entry_new(); -- GtkWidget *parent = gtk_fixed_new(); -- GtkWidget *window = gtk_window_new(GTK_WINDOW_POPUP); -- -- gtk_container_add(GTK_CONTAINER(parent), entry); -- gtk_container_add(GTK_CONTAINER(window), parent); -- -- gtk_widget_ensure_style(entry); -- GetSystemFontInfo(entry, aFontName, aFontStyle); -- gtk_widget_destroy(window); // no unref, windows are different -- -- } else { -- MOZ_ASSERT(aID == LookAndFeel::eFont_Menu, "unexpected font ID"); -- GtkWidget *accel_label = gtk_accel_label_new("M"); -- GtkWidget *menuitem = gtk_menu_item_new(); -- GtkWidget *menu = gtk_menu_new(); -- g_object_ref_sink(menu); -- -- gtk_container_add(GTK_CONTAINER(menuitem), accel_label); -- gtk_menu_shell_append((GtkMenuShell *)GTK_MENU(menu), menuitem); -- -- gtk_widget_ensure_style(accel_label); -- GetSystemFontInfo(accel_label, aFontName, aFontStyle); -- g_object_unref(menu); -- } --} -- - bool - nsLookAndFeel::GetFontImpl(FontID aID, nsString& aFontName, - gfxFontStyle& aFontStyle, - float aDevPixPerCSSPixel) - { -- nsString *cachedFontName = nullptr; -- gfxFontStyle *cachedFontStyle = nullptr; -- bool *isCached = nullptr; -- - switch (aID) { - case eFont_Menu: // css2 - case eFont_PullDownMenu: // css3 -- cachedFontName = &mMenuFontName; -- cachedFontStyle = &mMenuFontStyle; -- isCached = &mMenuFontCached; -- aID = eFont_Menu; -- break; -+ aFontName = mMenuFontName; -+ aFontStyle = mMenuFontStyle; -+ return true; - - case eFont_Field: // css3 - case eFont_List: // css3 -- cachedFontName = &mFieldFontName; -- cachedFontStyle = &mFieldFontStyle; -- isCached = &mFieldFontCached; -- aID = eFont_Field; -- break; -+ aFontName = mFieldFontName; -+ aFontStyle = mFieldFontStyle; -+ return true; - - case eFont_Button: // css3 -- cachedFontName = &mButtonFontName; -- cachedFontStyle = &mButtonFontStyle; -- isCached = &mButtonFontCached; -- break; -+ aFontName = mButtonFontName; -+ aFontStyle = mButtonFontStyle; -+ return true; - - case eFont_Caption: // css2 - case eFont_Icon: // css2 -@@ -1057,21 +787,11 @@ nsLookAndFeel::GetFontImpl(FontID aID, nsString& aFontName, - case eFont_Dialog: // css3 - case eFont_Tooltips: // moz - case eFont_Widget: // moz -- cachedFontName = &mDefaultFontName; -- cachedFontStyle = &mDefaultFontStyle; -- isCached = &mDefaultFontCached; -- aID = eFont_Widget; -- break; -- } -- -- if (!*isCached) { -- GetSystemFontInfo(aID, cachedFontName, cachedFontStyle); -- *isCached = true; -+ default: -+ aFontName = mDefaultFontName; -+ aFontStyle = mDefaultFontStyle; -+ return true; - } -- -- aFontName = *cachedFontName; -- aFontStyle = *cachedFontStyle; -- return true; - } - - void -@@ -1087,70 +807,6 @@ nsLookAndFeel::EnsureInit() - // gtk does non threadsafe refcounting - MOZ_ASSERT(NS_IsMainThread()); - --#if (MOZ_WIDGET_GTK == 2) -- NS_ASSERTION(!mStyle, "already initialized"); -- // GtkInvisibles come with a refcount that is not floating -- // (since their initialization code calls g_object_ref_sink) and -- // their destroy code releases that reference (which means they -- // have to be explicitly destroyed, since calling unref enough -- // to cause destruction would lead to *another* unref). -- // However, this combination means that it's actually still ok -- // to use the normal pattern, which is to g_object_ref_sink -- // after construction, and then destroy *and* unref when we're -- // done. (Though we could skip the g_object_ref_sink and the -- // corresponding g_object_unref, but that's particular to -- // GtkInvisibles and GtkWindows.) -- GtkWidget *widget = gtk_invisible_new(); -- g_object_ref_sink(widget); // effectively g_object_ref (see above) -- -- gtk_widget_ensure_style(widget); -- mStyle = gtk_style_copy(gtk_widget_get_style(widget)); -- -- gtk_widget_destroy(widget); -- g_object_unref(widget); -- -- // tooltip foreground and background -- GtkStyle *style = gtk_rc_get_style_by_paths(gtk_settings_get_default(), -- "gtk-tooltips", "GtkWindow", -- GTK_TYPE_WINDOW); -- if (style) { -- sInfoBackground = GDK_COLOR_TO_NS_RGB(style->bg[GTK_STATE_NORMAL]); -- sInfoText = GDK_COLOR_TO_NS_RGB(style->fg[GTK_STATE_NORMAL]); -- } -- -- // menu foreground & menu background -- GtkWidget *accel_label = gtk_accel_label_new("M"); -- GtkWidget *menuitem = gtk_menu_item_new(); -- GtkWidget *menu = gtk_menu_new(); -- -- g_object_ref_sink(menu); -- -- gtk_container_add(GTK_CONTAINER(menuitem), accel_label); -- gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem); -- -- gtk_widget_set_style(accel_label, nullptr); -- gtk_widget_set_style(menu, nullptr); -- gtk_widget_realize(menu); -- gtk_widget_realize(accel_label); -- -- style = gtk_widget_get_style(accel_label); -- if (style) { -- sMenuText = GDK_COLOR_TO_NS_RGB(style->fg[GTK_STATE_NORMAL]); -- } -- -- style = gtk_widget_get_style(menu); -- if (style) { -- sMenuBackground = GDK_COLOR_TO_NS_RGB(style->bg[GTK_STATE_NORMAL]); -- } -- -- style = gtk_widget_get_style(menuitem); -- if (style) { -- sMenuHover = GDK_COLOR_TO_NS_RGB(style->bg[GTK_STATE_PRELIGHT]); -- sMenuHoverText = GDK_COLOR_TO_NS_RGB(style->fg[GTK_STATE_PRELIGHT]); -- } -- -- g_object_unref(menu); --#else - GdkRGBA color; - GtkStyleContext *style; - -@@ -1195,6 +851,12 @@ nsLookAndFeel::EnsureInit() - } - } - -+ // The label is not added to a parent widget, but shared for constructing -+ // different style contexts. The node hierarchy is constructed only on -+ // the label style context. -+ GtkWidget *labelWidget = gtk_label_new("M"); -+ g_object_ref_sink(labelWidget); -+ - // Scrollbar colors - style = ClaimStyleContext(MOZ_GTK_SCROLLBAR_TROUGH_VERTICAL); - gtk_style_context_get_background_color(style, GTK_STATE_FLAG_NORMAL, &color); -@@ -1208,6 +870,13 @@ nsLookAndFeel::EnsureInit() - gtk_style_context_get_color(style, GTK_STATE_FLAG_NORMAL, &color); - sMozWindowText = GDK_RGBA_TO_NS_RGBA(color); - ReleaseStyleContext(style); -+ style = ClaimStyleContext(MOZ_GTK_WINDOW_CONTAINER); -+ { -+ GtkStyleContext* labelStyle = CreateStyleForWidget(labelWidget, style); -+ GetSystemFontInfo(labelStyle, &mDefaultFontName, &mDefaultFontStyle); -+ g_object_unref(labelStyle); -+ } -+ ReleaseStyleContext(style); - - // tooltip foreground and background - style = ClaimStyleContext(MOZ_GTK_TOOLTIP); -@@ -1224,6 +893,9 @@ nsLookAndFeel::EnsureInit() - { - GtkStyleContext* accelStyle = - CreateStyleForWidget(gtk_accel_label_new("M"), style); -+ -+ GetSystemFontInfo(accelStyle, &mMenuFontName, &mMenuFontStyle); -+ - gtk_style_context_get_color(accelStyle, GTK_STATE_FLAG_NORMAL, &color); - sMenuText = GDK_RGBA_TO_NS_RGBA(color); - gtk_style_context_get_color(accelStyle, GTK_STATE_FLAG_INSENSITIVE, &color); -@@ -1243,17 +915,8 @@ nsLookAndFeel::EnsureInit() - gtk_style_context_get_color(style, GTK_STATE_FLAG_PRELIGHT, &color); - sMenuHoverText = GDK_RGBA_TO_NS_RGBA(color); - ReleaseStyleContext(style); --#endif - -- // button styles - GtkWidget *parent = gtk_fixed_new(); -- GtkWidget *button = gtk_button_new(); -- GtkWidget *label = gtk_label_new("M"); --#if (MOZ_WIDGET_GTK == 2) -- GtkWidget *combobox = gtk_combo_box_new(); -- GtkWidget *comboboxLabel = gtk_label_new("M"); -- gtk_container_add(GTK_CONTAINER(combobox), comboboxLabel); --#endif - GtkWidget *window = gtk_window_new(GTK_WINDOW_POPUP); - GtkWidget *treeView = gtk_tree_view_new(); - GtkWidget *linkButton = gtk_link_button_new("http://example.com/"); -@@ -1262,94 +925,14 @@ nsLookAndFeel::EnsureInit() - GtkWidget *entry = gtk_entry_new(); - GtkWidget *textView = gtk_text_view_new(); - -- gtk_container_add(GTK_CONTAINER(button), label); -- gtk_container_add(GTK_CONTAINER(parent), button); - gtk_container_add(GTK_CONTAINER(parent), treeView); - gtk_container_add(GTK_CONTAINER(parent), linkButton); --#if (MOZ_WIDGET_GTK == 2) -- gtk_container_add(GTK_CONTAINER(parent), combobox); --#endif - gtk_container_add(GTK_CONTAINER(parent), menuBar); - gtk_menu_shell_append(GTK_MENU_SHELL(menuBar), menuBarItem); - gtk_container_add(GTK_CONTAINER(window), parent); - gtk_container_add(GTK_CONTAINER(parent), entry); - gtk_container_add(GTK_CONTAINER(parent), textView); - --#if (MOZ_WIDGET_GTK == 2) -- gtk_widget_set_style(button, nullptr); -- gtk_widget_set_style(label, nullptr); -- gtk_widget_set_style(treeView, nullptr); -- gtk_widget_set_style(linkButton, nullptr); -- gtk_widget_set_style(combobox, nullptr); -- gtk_widget_set_style(comboboxLabel, nullptr); -- gtk_widget_set_style(menuBar, nullptr); -- gtk_widget_set_style(entry, nullptr); -- -- gtk_widget_realize(button); -- gtk_widget_realize(label); -- gtk_widget_realize(treeView); -- gtk_widget_realize(linkButton); -- gtk_widget_realize(combobox); -- gtk_widget_realize(comboboxLabel); -- gtk_widget_realize(menuBar); -- gtk_widget_realize(entry); -- -- style = gtk_widget_get_style(label); -- if (style) { -- sButtonText = GDK_COLOR_TO_NS_RGB(style->fg[GTK_STATE_NORMAL]); -- } -- -- style = gtk_widget_get_style(comboboxLabel); -- if (style) { -- sComboBoxText = GDK_COLOR_TO_NS_RGB(style->fg[GTK_STATE_NORMAL]); -- } -- style = gtk_widget_get_style(combobox); -- if (style) { -- sComboBoxBackground = GDK_COLOR_TO_NS_RGB(style->bg[GTK_STATE_NORMAL]); -- } -- -- style = gtk_widget_get_style(menuBar); -- if (style) { -- sMenuBarText = GDK_COLOR_TO_NS_RGB(style->fg[GTK_STATE_NORMAL]); -- sMenuBarHoverText = GDK_COLOR_TO_NS_RGB(style->fg[GTK_STATE_SELECTED]); -- } -- -- // GTK's guide to fancy odd row background colors: -- // 1) Check if a theme explicitly defines an odd row color -- // 2) If not, check if it defines an even row color, and darken it -- // slightly by a hardcoded value (gtkstyle.c) -- // 3) If neither are defined, take the base background color and -- // darken that by a hardcoded value -- colorValuePtr = nullptr; -- gtk_widget_style_get(treeView, -- "odd-row-color", &colorValuePtr, -- nullptr); -- -- if (colorValuePtr) { -- colorValue = *colorValuePtr; -- } else { -- gtk_widget_style_get(treeView, -- "even-row-color", &colorValuePtr, -- nullptr); -- if (colorValuePtr) -- darken_gdk_color(colorValuePtr, &colorValue); -- else -- darken_gdk_color(&treeView->style->base[GTK_STATE_NORMAL], &colorValue); -- } -- -- sOddCellBackground = GDK_COLOR_TO_NS_RGB(colorValue); -- if (colorValuePtr) -- gdk_color_free(colorValuePtr); -- -- style = gtk_widget_get_style(button); -- if (style) { -- sButtonBackground = GDK_COLOR_TO_NS_RGB(style->bg[GTK_STATE_NORMAL]); -- sFrameOuterLightBorder = -- GDK_COLOR_TO_NS_RGB(style->light[GTK_STATE_NORMAL]); -- sFrameInnerDarkBorder = -- GDK_COLOR_TO_NS_RGB(style->dark[GTK_STATE_NORMAL]); -- } --#else - // Text colors - GdkRGBA bgColor; - // If the text window background is translucent, then the background of -@@ -1381,8 +964,10 @@ nsLookAndFeel::EnsureInit() - // Button text color - style = ClaimStyleContext(MOZ_GTK_BUTTON); - { -- GtkStyleContext* labelStyle = -- CreateStyleForWidget(gtk_label_new("M"), style); -+ GtkStyleContext* labelStyle = CreateStyleForWidget(labelWidget, style); -+ -+ GetSystemFontInfo(labelStyle, &mButtonFontName, &mButtonFontStyle); -+ - gtk_style_context_get_color(labelStyle, GTK_STATE_FLAG_NORMAL, &color); - sButtonText = GDK_RGBA_TO_NS_RGBA(color); - gtk_style_context_get_color(labelStyle, GTK_STATE_FLAG_PRELIGHT, &color); -@@ -1446,7 +1031,6 @@ nsLookAndFeel::EnsureInit() - gtk_style_context_add_class(style, GTK_STYLE_CLASS_INFO); - gtk_style_context_get_color(style, GTK_STATE_FLAG_NORMAL, &color); - sInfoBarText = GDK_RGBA_TO_NS_RGBA(color); --#endif - // Some themes have a unified menu bar, and support window dragging on it - gboolean supports_menubar_drag = FALSE; - GParamSpec *param_spec = -@@ -1493,7 +1074,11 @@ nsLookAndFeel::EnsureInit() - "cursor-aspect-ratio", &sCaretRatio, - nullptr); - -+ GetSystemFontInfo(gtk_widget_get_style_context(entry), -+ &mFieldFontName, &mFieldFontStyle); -+ - gtk_widget_destroy(window); -+ g_object_unref(labelWidget); - } - - // virtual -@@ -1515,11 +1100,6 @@ nsLookAndFeel::RefreshImpl() - mFieldFontCached = false; - mMenuFontCached = false; - --#if (MOZ_WIDGET_GTK == 2) -- g_object_unref(mStyle); -- mStyle = nullptr; --#endif -- - mInitialized = false; - } - -diff --git widget/gtk/nsLookAndFeel.h widget/gtk/nsLookAndFeel.h -index 9a4015e95415..38cd51c056d6 100644 ---- widget/gtk/nsLookAndFeel.h -+++ widget/gtk/nsLookAndFeel.h -@@ -33,9 +33,6 @@ public: - virtual bool GetEchoPasswordImpl(); - - protected: --#if (MOZ_WIDGET_GTK == 2) -- struct _GtkStyle *mStyle; --#endif - - // Cached fonts - bool mDefaultFontCached; -@@ -63,7 +60,6 @@ protected: - nscolor sMenuHoverText; - nscolor sButtonText; - nscolor sButtonHoverText; -- nscolor sButtonBackground; - nscolor sFrameOuterLightBorder; - nscolor sFrameInnerDarkBorder; - nscolor sOddCellBackground; -@@ -77,9 +73,7 @@ protected: - nscolor sTextSelectedText; - nscolor sTextSelectedBackground; - nscolor sMozScrollbar; --#if (MOZ_WIDGET_GTK == 3) - nscolor sInfoBarText; --#endif - char16_t sInvisibleCharacter; - float sCaretRatio; - bool sMenuSupportsDrag; diff --git a/www/waterfox/files/patch-bug1385013 b/www/waterfox/files/patch-bug1385013 deleted file mode 100644 index 66307f92ac6..00000000000 --- a/www/waterfox/files/patch-bug1385013 +++ /dev/null @@ -1,92 +0,0 @@ -commit 09e1ad759b21 -Author: Hiroyuki Ikezoe -Date: Wed Oct 18 10:43:22 2017 +0900 - - Bug 1385013 - Check all vertexes for the target frame are outside of the parent frame if the target frame is empty. r=birtles, a=ritu - - We create empty rectangle (zero-height or zero-width) frame for element which - has no content inside it, e.g. '

'. And nsRect.Intersects returns false - if either of the rectangles are empty, so if we check - !transformedRect.Intersects(scrollableRect) and transformedRect is empty, we - will end up returning true from IsFrameScrolledOutOfView even though the point - represented by the empty transformedRect might be inside the - scrollableRect. - - The reftest causes timeout without this fix since the animation never updates - after the initial paint. - - MozReview-Commit-ID: FymFJfjxyGc - - --HG-- - extra : source : 69e2ab081d3d71ef131f0ce878ee7830ae881d08 ---- - layout/generic/nsFrame.cpp | 11 +++++++++- - .../animation-on-empty-height-frame.html | 25 ++++++++++++++++++++++ - layout/reftests/css-animations/reftest.list | 1 + - 3 files changed, 36 insertions(+), 1 deletion(-) - -diff --git layout/generic/nsFrame.cpp layout/generic/nsFrame.cpp -index dbfd61b7e142..991ccbceeb65 100644 ---- layout/generic/nsFrame.cpp -+++ layout/generic/nsFrame.cpp -@@ -10555,7 +10555,16 @@ IsFrameScrolledOutOfView(nsIFrame *aFrame) - scrollableParent); - - nsRect scrollableRect = scrollableParent->GetVisualOverflowRect(); -- if (!transformedRect.Intersects(scrollableRect)) { -+ if (transformedRect.IsEmpty()) { -+ // If the transformed rect is empty it represents a line or a point that we -+ // should check is outside the the scrollable rect. -+ if (transformedRect.x > scrollableRect.XMost() || -+ transformedRect.y > scrollableRect.YMost() || -+ scrollableRect.x > transformedRect.XMost() || -+ scrollableRect.y > transformedRect.YMost()) { -+ return true; -+ } -+ } else if (!transformedRect.Intersects(scrollableRect)) { - return true; - } - -diff --git layout/reftests/css-animations/animation-on-empty-height-frame.html layout/reftests/css-animations/animation-on-empty-height-frame.html -new file mode 100644 -index 000000000000..eb3f58127b16 ---- /dev/null -+++ layout/reftests/css-animations/animation-on-empty-height-frame.html -@@ -0,0 +1,25 @@ -+ -+ -+ -+ -+ -+ -+ -diff --git layout/reftests/css-animations/reftest.list layout/reftests/css-animations/reftest.list -index 61e3e9ea6101..ed615645f707 100644 ---- layout/reftests/css-animations/reftest.list -+++ layout/reftests/css-animations/reftest.list -@@ -4,6 +4,7 @@ skip-if(stylo) fails == print-no-animations.html print-no-animations-ref.html # - skip-if(stylo) fails != print-no-animations.html print-no-animations-notref.html # reftest harness doesn't actually make pres context non-dynamic for reftest-paged tests. Bug 1374154 for stylo - == animate-opacity.html animate-opacity-ref.html - == animate-preserves3d.html animate-preserves3d-ref.html -+== animation-on-empty-height-frame.html about:blank - == in-visibility-hidden-animation.html in-visibility-hidden-animation-ref.html - == in-visibility-hidden-animation-pseudo-element.html in-visibility-hidden-animation-pseudo-element-ref.html - == partially-out-of-view-animation.html partially-out-of-view-animation-ref.html diff --git a/www/waterfox/files/patch-bug1385609 b/www/waterfox/files/patch-bug1385609 deleted file mode 100644 index 0fd7ca695a5..00000000000 --- a/www/waterfox/files/patch-bug1385609 +++ /dev/null @@ -1,102 +0,0 @@ -commit dd42019824ed -Author: Thomas Nguyen -Date: Wed Aug 30 18:04:10 2017 +0800 - - Bug 1385609 - Fix backoff issue that makes SB lists no longer update r=francois - - The issue occurs when nsITimer is fired earlier than the backoff time. In that - case, the update doesn't proceed and we never make another attempt because the - backoff update timer was oneshot. - - We fix the issue in two ways: - - - Add a tolerance of 1 second in case the timer fires too early. - - Set another oneshot timer whenever we are prevented from updating due to - backoff. - - MozReview-Commit-ID: E2ogNRsHJVK - - --HG-- - extra : rebase_source : c81fa77934f6c39e1c5d07b19785a01546e02542 ---- - toolkit/components/url-classifier/nsUrlClassifierLib.js | 12 +++++++++--- - .../components/url-classifier/nsUrlClassifierListManager.js | 5 ++++- - toolkit/components/url-classifier/tests/unit/test_backoff.js | 2 +- - 3 files changed, 14 insertions(+), 5 deletions(-) - -diff --git toolkit/components/url-classifier/nsUrlClassifierLib.js toolkit/components/url-classifier/nsUrlClassifierLib.js -index e2457d85474c..38d1977e4641 100644 ---- toolkit/components/url-classifier/nsUrlClassifierLib.js -+++ toolkit/components/url-classifier/nsUrlClassifierLib.js -@@ -77,17 +77,20 @@ this.HTTP_TEMPORARY_REDIRECT = 307; - * @param timeoutIncrement Number time (ms) the starting timeout period - * we double this time for consecutive errors - * @param maxTimeout Number time (ms) maximum timeout period -+ * @param tolerance Checking next request tolerance. - */ - this.RequestBackoff = - function RequestBackoff(maxErrors, retryIncrement, - maxRequests, requestPeriod, -- timeoutIncrement, maxTimeout) { -+ timeoutIncrement, maxTimeout, -+ tolerance) { - this.MAX_ERRORS_ = maxErrors; - this.RETRY_INCREMENT_ = retryIncrement; - this.MAX_REQUESTS_ = maxRequests; - this.REQUEST_PERIOD_ = requestPeriod; - this.TIMEOUT_INCREMENT_ = timeoutIncrement; - this.MAX_TIMEOUT_ = maxTimeout; -+ this.TOLERANCE_ = tolerance; - - // Queue of ints keeping the time of all requests - this.requestTimes_ = []; -@@ -111,7 +114,9 @@ RequestBackoff.prototype.reset = function() { - */ - RequestBackoff.prototype.canMakeRequest = function() { - var now = Date.now(); -- if (now < this.nextRequestTime_) { -+ // Note that nsITimer delay is approximate: the timer can be fired before the -+ // requested time has elapsed. So, give it a tolerance -+ if (now + this.TOLERANCE_ < this.nextRequestTime_) { - return false; - } - -@@ -180,7 +185,8 @@ function RequestBackoffV4(maxRequests, requestPeriod) { - maxRequests /* num requests */, - requestPeriod /* request time, 60 min */, - backoffInterval /* backoff interval, 60 min */, -- 24 * 60 * 60 * 1000 /* max backoff, 24hr */); -+ 24 * 60 * 60 * 1000 /* max backoff, 24hr */, -+ 1000 /* tolerance of 1 sec */); - } - - // Expose this whole component. -diff --git toolkit/components/url-classifier/nsUrlClassifierListManager.js toolkit/components/url-classifier/nsUrlClassifierListManager.js -index 1e976b8597b7..5f10933163b6 100644 ---- toolkit/components/url-classifier/nsUrlClassifierListManager.js -+++ toolkit/components/url-classifier/nsUrlClassifierListManager.js -@@ -236,7 +236,10 @@ PROT_ListManager.prototype.setUpdateCheckTimer = function(updateUrl, - .createInstance(Ci.nsITimer); - this.updateCheckers_[updateUrl].initWithCallback(() => { - this.updateCheckers_[updateUrl] = null; -- this.checkForUpdates(updateUrl); -+ if (updateUrl && !this.checkForUpdates(updateUrl)) { -+ // Make another attempt later. -+ this.setUpdateCheckTimer(updateUrl, this.updateInterval); -+ } - }, delay, Ci.nsITimer.TYPE_ONE_SHOT); - } - /** -diff --git toolkit/components/url-classifier/tests/unit/test_backoff.js toolkit/components/url-classifier/tests/unit/test_backoff.js -index 365568c479e9..205507e83dd6 100644 ---- toolkit/components/url-classifier/tests/unit/test_backoff.js -+++ toolkit/components/url-classifier/tests/unit/test_backoff.js -@@ -11,7 +11,7 @@ function setNow(time) { - function run_test() { - // 3 errors, 1ms retry period, max 3 requests per ten milliseconds, - // 5ms backoff interval, 19ms max delay -- var rb = new jslib.RequestBackoff(3, 1, 3, 10, 5, 19); -+ var rb = new jslib.RequestBackoff(3, 1, 3, 10, 5, 19, 0); - setNow(1); - rb.noteServerResponse(200); - do_check_true(rb.canMakeRequest()); diff --git a/www/waterfox/files/patch-bug1387170 b/www/waterfox/files/patch-bug1387170 deleted file mode 100644 index fae4b65e028..00000000000 --- a/www/waterfox/files/patch-bug1387170 +++ /dev/null @@ -1,148 +0,0 @@ -commit 02dc1567cd7d -Author: Brendan Dahl -Date: Thu Aug 3 15:08:16 2017 -0700 - - Bug 1387170 - Use custom clipboard constructor instead of singleton. r=jrmuizel - - This allows instances of the clipboard to be created (like it - was pre-headless). ---- - widget/gtk/nsClipboard.cpp | 31 ------------------------------- - widget/gtk/nsClipboard.h | 2 -- - widget/gtk/nsWidgetFactory.cpp | 26 ++++++++++++++++++++++++-- - 3 files changed, 24 insertions(+), 35 deletions(-) - -diff --git widget/gtk/nsClipboard.cpp widget/gtk/nsClipboard.cpp -index 6972715a72df..d07d5baeede3 100644 ---- widget/gtk/nsClipboard.cpp -+++ widget/gtk/nsClipboard.cpp -@@ -9,7 +9,6 @@ - - #include "nsArrayUtils.h" - #include "nsClipboard.h" --#include "HeadlessClipboard.h" - #include "nsSupportsPrimitives.h" - #include "nsString.h" - #include "nsReadableUtils.h" -@@ -21,7 +20,6 @@ - #include "nsIObserverService.h" - #include "mozilla/Services.h" - #include "mozilla/RefPtr.h" --#include "mozilla/ClearOnShutdown.h" - #include "mozilla/TimeStamp.h" - - #include "imgIContainer.h" -@@ -39,7 +37,6 @@ - - #include "mozilla/Encoding.h" - --#include "gfxPlatform.h" - - using namespace mozilla; - -@@ -81,34 +78,6 @@ selection_request_filter (GdkXEvent *gdk_xevent, - GdkEvent *event, - gpointer data); - --namespace mozilla { --namespace clipboard { --StaticRefPtr sInstance; --} --} --/* static */ already_AddRefed --nsClipboard::GetInstance() --{ -- using namespace mozilla::clipboard; -- -- if (!sInstance) { -- if (gfxPlatform::IsHeadless()) { -- sInstance = new widget::HeadlessClipboard(); -- } else { -- RefPtr clipboard = new nsClipboard(); -- nsresult rv = clipboard->Init(); -- if (NS_FAILED(rv)) { -- return nullptr; -- } -- sInstance = clipboard.forget(); -- } -- ClearOnShutdown(&sInstance); -- } -- -- RefPtr service = sInstance.get(); -- return service.forget(); --} -- - nsClipboard::nsClipboard() - { - } -diff --git widget/gtk/nsClipboard.h widget/gtk/nsClipboard.h -index 725bcdce846a..70c866a013c9 100644 ---- widget/gtk/nsClipboard.h -+++ widget/gtk/nsClipboard.h -@@ -23,8 +23,6 @@ public: - NS_DECL_NSICLIPBOARD - NS_DECL_NSIOBSERVER - -- static already_AddRefed GetInstance(); -- - // Make sure we are initialized, called from the factory - // constructor - nsresult Init (void); -diff --git widget/gtk/nsWidgetFactory.cpp widget/gtk/nsWidgetFactory.cpp -index 3c8bc02ebbb5..86b9cdab77e7 100644 ---- widget/gtk/nsWidgetFactory.cpp -+++ widget/gtk/nsWidgetFactory.cpp -@@ -17,6 +17,7 @@ - #include "nsWindow.h" - #include "nsTransferable.h" - #include "nsHTMLFormatConverter.h" -+#include "HeadlessClipboard.h" - #ifdef MOZ_X11 - #include "nsClipboardHelper.h" - #include "nsClipboard.h" -@@ -72,7 +73,6 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsHTMLFormatConverter) - #ifdef MOZ_X11 - NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsIdleServiceGTK, nsIdleServiceGTK::GetInstance) - NS_GENERIC_FACTORY_CONSTRUCTOR(nsClipboardHelper) --NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsIClipboard, nsClipboard::GetInstance) - NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsDragService, nsDragService::GetInstance) - #endif - NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsISound, nsSound::GetInstance) -@@ -194,6 +194,28 @@ nsColorPickerConstructor(nsISupports *aOuter, REFNSIID aIID, - return picker->QueryInterface(aIID, aResult); - } - -+static nsresult -+nsClipboardConstructor(nsISupports *aOuter, REFNSIID aIID, -+ void **aResult) -+{ -+ *aResult = nullptr; -+ if (aOuter != nullptr) { -+ return NS_ERROR_NO_AGGREGATION; -+ } -+ -+ nsCOMPtr inst; -+ if (gfxPlatform::IsHeadless()) { -+ inst = new HeadlessClipboard(); -+ } else { -+ RefPtr clipboard = new nsClipboard(); -+ nsresult rv = clipboard->Init(); -+ NS_ENSURE_SUCCESS(rv, rv); -+ inst = clipboard; -+ } -+ -+ return inst->QueryInterface(aIID, aResult); -+} -+ - NS_DEFINE_NAMED_CID(NS_WINDOW_CID); - NS_DEFINE_NAMED_CID(NS_CHILD_CID); - NS_DEFINE_NAMED_CID(NS_APPSHELL_CID); -@@ -239,7 +261,7 @@ static const mozilla::Module::CIDEntry kWidgetCIDs[] = { - { &kNS_SOUND_CID, false, nullptr, nsISoundConstructor, Module::MAIN_PROCESS_ONLY }, - { &kNS_TRANSFERABLE_CID, false, nullptr, nsTransferableConstructor }, - #ifdef MOZ_X11 -- { &kNS_CLIPBOARD_CID, false, nullptr, nsIClipboardConstructor, Module::MAIN_PROCESS_ONLY }, -+ { &kNS_CLIPBOARD_CID, false, nullptr, nsClipboardConstructor, Module::MAIN_PROCESS_ONLY }, - { &kNS_CLIPBOARDHELPER_CID, false, nullptr, nsClipboardHelperConstructor }, - { &kNS_DRAGSERVICE_CID, false, nullptr, nsDragServiceConstructor, Module::MAIN_PROCESS_ONLY }, - #endif diff --git a/www/waterfox/files/patch-bug1387811 b/www/waterfox/files/patch-bug1387811 deleted file mode 100644 index 9198b313f89..00000000000 --- a/www/waterfox/files/patch-bug1387811 +++ /dev/null @@ -1,42 +0,0 @@ -commit a1341ccf6d63 -Author: Christoph Kerschbaumer -Date: Sun Aug 6 11:37:09 2017 +0200 - - Bug 1387811 - Follow up for Test within Bug 1381761: CSP JSON is never null, hence it's better to check actual contents of JSON for testing. r=dveditz ---- - dom/security/test/csp/file_data_csp_inheritance.html | 6 ++++-- - dom/security/test/csp/test_data_csp_inheritance.html | 4 +++- - 2 files changed, 7 insertions(+), 3 deletions(-) - -diff --git dom/security/test/csp/file_data_csp_inheritance.html dom/security/test/csp/file_data_csp_inheritance.html -index 299c30255aa6..cbb4865343db 100644 ---- dom/security/test/csp/file_data_csp_inheritance.html -+++ dom/security/test/csp/file_data_csp_inheritance.html -@@ -13,8 +13,10 @@ - var frame = document.getElementById("dataFrame"); - var principal = SpecialPowers.wrap(frame.contentDocument).nodePrincipal; - var cspJSON = principal.cspJSON; -- var result = principal.cspJSON ? "dataInheritsCSP" : "dataDoesNotInheritCSP"; -- window.parent.postMessage({result}, "*"); -+ var cspOBJ = JSON.parse(principal.cspJSON); -+ // make sure we got >>one<< policy -+ var policies = cspOBJ["csp-policies"]; -+ window.parent.postMessage({result: policies.length}, "*"); - - - -diff --git dom/security/test/csp/test_data_csp_inheritance.html dom/security/test/csp/test_data_csp_inheritance.html -index 3afc4f7c02bc..bde2f5617e65 100644 ---- dom/security/test/csp/test_data_csp_inheritance.html -+++ dom/security/test/csp/test_data_csp_inheritance.html -@@ -22,7 +22,9 @@ SimpleTest.waitForExplicitFinish(); - window.addEventListener("message", receiveMessage); - function receiveMessage(event) { - window.removeEventListener("message", receiveMessage); -- is(event.data.result, "dataInheritsCSP", -+ // toplevel CSP should apply to data: URI iframe hence resulting -+ // in 1 applied policy. -+ is(event.data.result, 1, - "data: URI iframe inherits CSP from including context"); - SimpleTest.finish(); - } diff --git a/www/waterfox/files/patch-bug1388020 b/www/waterfox/files/patch-bug1388020 deleted file mode 100644 index 5f1b30cd64f..00000000000 --- a/www/waterfox/files/patch-bug1388020 +++ /dev/null @@ -1,158 +0,0 @@ -commit fde468da7b64 -Author: Andrew Osmond -Date: Tue Apr 10 09:40:02 2018 -0400 - - Bug 1388020. r=nical, a=RyanVM ---- - gfx/gl/GLTextureImage.cpp | 3 +++ - gfx/gl/GLUploadHelpers.cpp | 31 ++++++++++++++++++++++++++++++- - gfx/gl/GLUploadHelpers.h | 2 ++ - gfx/gl/TextureImageEGL.cpp | 4 ++++ - gfx/layers/composite/TextureHost.cpp | 3 +-- - gfx/layers/opengl/TextureHostOGL.cpp | 4 +--- - 6 files changed, 41 insertions(+), 6 deletions(-) - -diff --git gfx/gl/GLTextureImage.cpp gfx/gl/GLTextureImage.cpp -index c91d558af441..65678432dace 100644 ---- gfx/gl/GLTextureImage.cpp -+++ gfx/gl/GLTextureImage.cpp -@@ -149,6 +149,9 @@ BasicTextureImage::DirectUpdate(gfx::DataSourceSurface* aSurf, const nsIntRegion - &uploadSize, - needInit, - aFrom); -+ if (mTextureFormat == SurfaceFormat::UNKNOWN) { -+ return false; -+ } - - if (uploadSize > 0) { - UpdateUploadSize(uploadSize); -diff --git gfx/gl/GLUploadHelpers.cpp gfx/gl/GLUploadHelpers.cpp -index 75165eedf787..ca1c890a486d 100644 ---- gfx/gl/GLUploadHelpers.cpp -+++ gfx/gl/GLUploadHelpers.cpp -@@ -27,6 +27,23 @@ DataOffset(const IntPoint& aPoint, int32_t aStride, SurfaceFormat aFormat) - return data; - } - -+static bool -+CheckUploadBounds(const IntSize& aDst, const IntSize& aSrc, const IntPoint& aOffset) -+{ -+ if (aOffset.x < 0 || aOffset.y < 0 || -+ aOffset.x >= aSrc.width || -+ aOffset.y >= aSrc.height) { -+ MOZ_ASSERT_UNREACHABLE("Offset outside source bounds"); -+ return false; -+ } -+ if (aDst.width > (aSrc.width - aOffset.x) || -+ aDst.height > (aSrc.height - aOffset.y)) { -+ MOZ_ASSERT_UNREACHABLE("Source has insufficient data"); -+ return false; -+ } -+ return true; -+} -+ - static GLint GetAddressAlignment(ptrdiff_t aAddress) - { - if (!(aAddress & 0x7)) { -@@ -375,6 +392,7 @@ TexImage2DHelper(GLContext* gl, - SurfaceFormat - UploadImageDataToTexture(GLContext* gl, - unsigned char* aData, -+ const gfx::IntSize& aDataSize, - int32_t aStride, - SurfaceFormat aFormat, - const nsIntRegion& aDstRegion, -@@ -498,6 +516,10 @@ UploadImageDataToTexture(GLContext* gl, - // Upload each rect in the region to the texture - for (auto iter = aDstRegion.RectIter(); !iter.Done(); iter.Next()) { - const IntRect& rect = iter.Get(); -+ if (!CheckUploadBounds(rect.Size(), aDataSize, rect.TopLeft())) { -+ return SurfaceFormat::UNKNOWN; -+ } -+ - const unsigned char* rectData = - aData + DataOffset(rect.TopLeft(), aStride, aFormat); - -@@ -534,10 +556,17 @@ UploadSurfaceToTexture(GLContext* gl, - - int32_t stride = aSurface->Stride(); - SurfaceFormat format = aSurface->GetFormat(); -+ gfx::IntSize size = aSurface->GetSize(); -+ if (!CheckUploadBounds(aSize, size, aSrcPoint)) { -+ return SurfaceFormat::UNKNOWN; -+ } -+ - unsigned char* data = aSurface->GetData() + - DataOffset(aSrcPoint, stride, format); -+ size.width -= aSrcPoint.x; -+ size.height -= aSrcPoint.y; - -- return UploadImageDataToTexture(gl, data, stride, format, -+ return UploadImageDataToTexture(gl, data, size, stride, format, - aDstRegion, aTexture, aSize, - aOutUploadSize, aNeedInit, - aTextureUnit, aTextureTarget); -diff --git gfx/gl/GLUploadHelpers.h gfx/gl/GLUploadHelpers.h -index 866d44adbed0..f732d2b3834f 100644 ---- gfx/gl/GLUploadHelpers.h -+++ gfx/gl/GLUploadHelpers.h -@@ -28,6 +28,7 @@ class GLContext; - * \param gl The GL Context to use. - * \param aData Start of image data of surface to upload. - * Corresponds to the first pixel of the texture. -+ * \param aDataSize The image data's size. - * \param aStride The image data's stride. - * \param aFormat The image data's format. - * \param aDstRegion Region of the texture to upload. -@@ -46,6 +47,7 @@ class GLContext; - gfx::SurfaceFormat - UploadImageDataToTexture(GLContext* gl, - unsigned char* aData, -+ const gfx::IntSize& aDataSize, - int32_t aStride, - gfx::SurfaceFormat aFormat, - const nsIntRegion& aDstRegion, -diff --git gfx/gl/TextureImageEGL.cpp gfx/gl/TextureImageEGL.cpp -index 87a547c26925..3bb2987d1da5 100644 ---- gfx/gl/TextureImageEGL.cpp -+++ gfx/gl/TextureImageEGL.cpp -@@ -119,6 +119,10 @@ TextureImageEGL::DirectUpdate(gfx::DataSourceSurface* aSurf, const nsIntRegion& - &uploadSize, - needInit, - aFrom); -+ if (mTextureFormat == SurfaceFormat::UNKNOWN) { -+ return false; -+ } -+ - if (uploadSize > 0) { - UpdateUploadSize(uploadSize); - } -diff --git gfx/layers/composite/TextureHost.cpp gfx/layers/composite/TextureHost.cpp -index e7d87e238913..c93037384744 100644 ---- gfx/layers/composite/TextureHost.cpp -+++ gfx/layers/composite/TextureHost.cpp -@@ -888,8 +888,7 @@ BufferTextureHost::Upload(nsIntRegion *aRegion) - mFirstSource = mCompositor->CreateDataTextureSource(mFlags|TextureFlags::RGB_FROM_YCBCR); - mFirstSource->SetOwner(this); - } -- mFirstSource->Update(surf, aRegion); -- return true; -+ return mFirstSource->Update(surf, aRegion); - } - - RefPtr srcY; -diff --git gfx/layers/opengl/TextureHostOGL.cpp gfx/layers/opengl/TextureHostOGL.cpp -index 02c398b51fe7..ec6ba913123f 100644 ---- gfx/layers/opengl/TextureHostOGL.cpp -+++ gfx/layers/opengl/TextureHostOGL.cpp -@@ -161,9 +161,7 @@ TextureImageTextureSourceOGL::Update(gfx::DataSourceSurface* aSurface, - } - } - -- mTexImage->UpdateFromDataSource(aSurface, aDestRegion, aSrcOffset); -- -- return true; -+ return mTexImage->UpdateFromDataSource(aSurface, aDestRegion, aSrcOffset); - } - - void diff --git a/www/waterfox/files/patch-bug1388319 b/www/waterfox/files/patch-bug1388319 deleted file mode 100644 index 8b26989437d..00000000000 --- a/www/waterfox/files/patch-bug1388319 +++ /dev/null @@ -1,30 +0,0 @@ -commit e572d7e6e7cf -Author: Xidorn Quan -Date: Tue Aug 8 22:41:32 2017 +1000 - - Bug 1388319 - Mark ServoStyleSet dirty in its Init. r=emilio - - MozReview-Commit-ID: 804KasIiS6E - - --HG-- - extra : rebase_source : 36eb21c5ffc4321aef652947455e73970419803a ---- - layout/style/ServoStyleSet.cpp | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -diff --git layout/style/ServoStyleSet.cpp layout/style/ServoStyleSet.cpp -index adb3cba922d2..a1cd15903ade 100644 ---- layout/style/ServoStyleSet.cpp -+++ layout/style/ServoStyleSet.cpp -@@ -81,8 +81,9 @@ ServoStyleSet::Init(nsPresContext* aPresContext, nsBindingManager* aBindingManag - } - } - -- // No need to Servo_StyleSet_FlushStyleSheets because we just created the -- // mRawSet, so there was nothing to flush. -+ // We added prefilled stylesheets into mRawSet, so the stylist is dirty. -+ // The Stylist should be updated later when necessary. -+ SetStylistStyleSheetsDirty(); - } - - void diff --git a/www/waterfox/files/patch-bug1388744 b/www/waterfox/files/patch-bug1388744 deleted file mode 100644 index abee5406118..00000000000 --- a/www/waterfox/files/patch-bug1388744 +++ /dev/null @@ -1,14 +0,0 @@ -Unbreak pingsender build on Tier3 archs - ---- toolkit/crashreporter/google-breakpad/src/third_party/curl/curlbuild.h -+++ toolkit/crashreporter/google-breakpad/src/third_party/curl/curlbuild.h -@@ -154,8 +154,7 @@ - #endif - - /* The size of `long', as computed by sizeof. */ --#if defined(_M_X64) || (defined(__x86_64__) && !defined(__ILP32__)) || \ -- defined(__aarch64__) || (defined(__mips__) && _MIPS_SIM == _ABI64) -+#if defined(_M_X64) || defined(__LP64__) - #define CURL_SIZEOF_LONG 8 - #else - #define CURL_SIZEOF_LONG 4 diff --git a/www/waterfox/files/patch-bug1393235 b/www/waterfox/files/patch-bug1393235 deleted file mode 100644 index c7586334a05..00000000000 --- a/www/waterfox/files/patch-bug1393235 +++ /dev/null @@ -1,88 +0,0 @@ -commit 9398bd6f4378 -Author: Eric Rahm -Date: Tue Aug 22 19:30:46 2017 -0700 - - Bug 1393235 - Fix improper usages of string functions. r=njn - - This fixes usages of `Find`, `RFind` and the equality operator that kind of - work right now but will break with the proper type checking of a templatized - version of the string classes. - - For `Find` and `RFind` it appears that `nsCString::(R)Find("foo", 0)` calls - were being coerced to the `Find(char*, bool, int, int)` versions. The intent was - probably to just start searching from position zero. - - For the equality operator, the type of nullptr is nullptr_t rather than - char(16_t)* so we'd need to add an operator overload that takes nullptr_t. In - this case just using `IsVoid` is probably more appropriate. - - --HG-- - extra : rebase_source : 50f78519084012ca669da0a211c489520c11d6b6 ---- - docshell/base/nsDefaultURIFixup.cpp | 2 +- - dom/media/gmp/ChromiumCDMChild.cpp | 2 +- - toolkit/components/places/nsNavHistory.cpp | 2 +- - toolkit/components/url-classifier/Classifier.cpp | 4 ++-- - 4 files changed, 5 insertions(+), 5 deletions(-) - -diff --git docshell/base/nsDefaultURIFixup.cpp docshell/base/nsDefaultURIFixup.cpp -index 77e008b15a17..a1a893b8efb2 100644 ---- docshell/base/nsDefaultURIFixup.cpp -+++ docshell/base/nsDefaultURIFixup.cpp -@@ -687,7 +687,7 @@ nsDefaultURIFixup::FixupURIProtocol(const nsACString& aURIString, - // no-scheme.com/query?foo=http://www.foo.com - // user:pass@no-scheme.com - // -- int32_t schemeDelim = uriString.Find("://", 0); -+ int32_t schemeDelim = uriString.Find("://"); - int32_t firstDelim = uriString.FindCharInSet("/:"); - if (schemeDelim <= 0 || - (firstDelim != -1 && schemeDelim > firstDelim)) { -diff --git dom/media/gmp/ChromiumCDMChild.cpp dom/media/gmp/ChromiumCDMChild.cpp -index e99f913622ab..8dc288b4c57e 100644 ---- dom/media/gmp/ChromiumCDMChild.cpp -+++ dom/media/gmp/ChromiumCDMChild.cpp -@@ -232,7 +232,7 @@ ChromiumCDMChild::OnResolveNewSessionPromiseInternal(uint32_t aPromiseId, - // a session it calls OnResolveNewSessionPromise with nullptr as the sessionId. - // We can safely assume this means that we have failed to load a session - // as the other methods specify calling 'OnRejectPromise' when they fail. -- bool loadSuccessful = aSessionId != nullptr; -+ bool loadSuccessful = !aSessionId.IsEmpty(); - GMP_LOG("ChromiumCDMChild::OnResolveNewSessionPromise(pid=%u, sid=%s) " - "resolving %s load session ", - aPromiseId, -diff --git toolkit/components/places/nsNavHistory.cpp toolkit/components/places/nsNavHistory.cpp -index 4e52752529fa..0b01d904b2f7 100644 ---- toolkit/components/places/nsNavHistory.cpp -+++ toolkit/components/places/nsNavHistory.cpp -@@ -1939,7 +1939,7 @@ PlacesSQLQueryBuilder::Where() - - // If we used WHERE already, we inject the conditions - // in place of {ADDITIONAL_CONDITIONS} -- if (mQueryString.Find("{ADDITIONAL_CONDITIONS}", 0) != kNotFound) { -+ if (mQueryString.Find("{ADDITIONAL_CONDITIONS}") != kNotFound) { - nsAutoCString innerCondition; - // If we have condition AND it - if (!mConditions.IsEmpty()) { -diff --git toolkit/components/url-classifier/Classifier.cpp toolkit/components/url-classifier/Classifier.cpp -index 500780150a91..68169925d2d0 100644 ---- toolkit/components/url-classifier/Classifier.cpp -+++ toolkit/components/url-classifier/Classifier.cpp -@@ -992,7 +992,7 @@ Classifier::ScanStoreDir(nsIFile* aDirectory, nsTArray& aTables) - // Both v2 and v4 contain .pset file - nsCString suffix(NS_LITERAL_CSTRING(".pset")); - -- int32_t dot = leafName.RFind(suffix, 0); -+ int32_t dot = leafName.RFind(suffix); - if (dot != -1) { - leafName.Cut(dot, suffix.Length()); - aTables.AppendElement(leafName); -@@ -1582,7 +1582,7 @@ Classifier::LoadMetadata(nsIFile* aDirectory, nsACString& aResult) - rv = file->GetNativeLeafName(tableName); - NS_ENSURE_SUCCESS(rv, rv); - -- int32_t dot = tableName.RFind(METADATA_SUFFIX, 0); -+ int32_t dot = tableName.RFind(METADATA_SUFFIX); - if (dot == -1) { - continue; - } diff --git a/www/waterfox/files/patch-bug1393283 b/www/waterfox/files/patch-bug1393283 deleted file mode 100644 index b9c763fe47e..00000000000 --- a/www/waterfox/files/patch-bug1393283 +++ /dev/null @@ -1,144 +0,0 @@ -commit d20c7d929c84 -Author: Ethan -Date: Fri Sep 1 17:29:44 2017 +0800 - - Bug 1393283 - Use the last ESR version as the spoofed Firefox version. r=tihuang, r=mcmanus ---- - .../test/browser/browser_navigator.js | 2 +- - netwerk/protocol/http/nsHttpHandler.cpp | 16 +++---- - .../resistfingerprinting/nsRFPService.cpp | 56 ++++++++++++++++++++++ - .../components/resistfingerprinting/nsRFPService.h | 3 ++ - 4 files changed, 66 insertions(+), 11 deletions(-) - -diff --git browser/components/resistfingerprinting/test/browser/browser_navigator.js browser/components/resistfingerprinting/test/browser/browser_navigator.js -index 25c393d8bb2a..9f52e34a9451 100644 ---- browser/components/resistfingerprinting/test/browser/browser_navigator.js -+++ browser/components/resistfingerprinting/test/browser/browser_navigator.js -@@ -91,7 +91,7 @@ add_task(async function setup() { - - let appInfo = Cc["@mozilla.org/xre/app-info;1"].getService(Ci.nsIXULAppInfo); - let appVersion = parseInt(appInfo.version); -- let spoofedVersion = appVersion - (appVersion % 10); -+ let spoofedVersion = appVersion - ((appVersion - 3) % 7); - spoofedUserAgent = `Mozilla/5.0 (${SPOOFED_OSCPU}; rv:${spoofedVersion}.0) Gecko/20100101 Firefox/${spoofedVersion}.0`; - }); - -diff --git netwerk/protocol/http/nsHttpHandler.cpp netwerk/protocol/http/nsHttpHandler.cpp -index 31d0f8832732..b957d835b52f 100644 ---- netwerk/protocol/http/nsHttpHandler.cpp -+++ netwerk/protocol/http/nsHttpHandler.cpp -@@ -461,16 +461,12 @@ nsHttpHandler::Init() - mAppVersion.AssignLiteral(MOZ_APP_UA_VERSION); - } - -- // Generating the spoofed userAgent for fingerprinting resistance. -- // The browser version will be rounded down to a multiple of 10. -- // By doing so, the anonymity group will cover more versions instead of one -- // version. -- uint32_t spoofedVersion = mAppVersion.ToInteger(&rv); -- if (NS_SUCCEEDED(rv)) { -- spoofedVersion = (10 - spoofedVersion % 10) + spoofedVersion; -- mSpoofedUserAgent.Assign(nsPrintfCString( -- "Mozilla/5.0 (%s; rv:%d.0) Gecko/%s Firefox/%d.0", -- SPOOFED_OSCPU, spoofedVersion, LEGACY_BUILD_ID, spoofedVersion)); -+ // Generating the spoofed User Agent for fingerprinting resistance. -+ rv = nsRFPService::GetSpoofedUserAgent(mSpoofedUserAgent); -+ if (NS_FAILED(rv)) { -+ // Empty mSpoofedUserAgent to make sure the unsuccessful spoofed UA string -+ // will not be used anywhere. -+ mSpoofedUserAgent.Truncate(); - } - - mSessionStartTime = NowInSeconds(); -diff --git toolkit/components/resistfingerprinting/nsRFPService.cpp toolkit/components/resistfingerprinting/nsRFPService.cpp -index 94554200c3b8..96a2940c04a0 100644 ---- toolkit/components/resistfingerprinting/nsRFPService.cpp -+++ toolkit/components/resistfingerprinting/nsRFPService.cpp -@@ -18,10 +18,13 @@ - #include "nsServiceManagerUtils.h" - #include "nsString.h" - #include "nsXULAppAPI.h" -+#include "nsPrintfCString.h" - - #include "nsIObserverService.h" - #include "nsIPrefBranch.h" - #include "nsIPrefService.h" -+#include "nsIXULAppInfo.h" -+#include "nsIXULRuntime.h" - #include "nsJSUtils.h" - - #include "prenv.h" -@@ -162,6 +165,59 @@ nsRFPService::GetSpoofedPresentedFrames(double aTime, uint32_t aWidth, uint32_t - return NSToIntFloor(time * sVideoFramesPerSec * ((100 - boundedDroppedRatio) / 100.0)); - } - -+/* static */ -+nsresult -+nsRFPService::GetSpoofedUserAgent(nsACString &userAgent) -+{ -+ // This function generates the spoofed value of User Agent. -+ // We spoof the values of the platform and Firefox version, which could be -+ // used as fingerprinting sources to identify individuals. -+ // Reference of the format of User Agent: -+ // https://developer.mozilla.org/en-US/docs/Web/API/NavigatorID/userAgent -+ // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/User-Agent -+ -+ nsresult rv; -+ nsCOMPtr appInfo = -+ do_GetService("@mozilla.org/xre/app-info;1", &rv); -+ NS_ENSURE_SUCCESS(rv, rv); -+ -+ nsAutoCString appVersion; -+ rv = appInfo->GetVersion(appVersion); -+ NS_ENSURE_SUCCESS(rv, rv); -+ -+ // The browser version will be spoofed as the last ESR version. -+ // By doing so, the anonymity group will cover more versions instead of one -+ // version. -+ uint32_t firefoxVersion = appVersion.ToInteger(&rv); -+ NS_ENSURE_SUCCESS(rv, rv); -+ -+ // Starting from Firefox 10, Firefox ESR was released once every seven -+ // Firefox releases, e.g. Firefox 10, 17, 24, 31, and so on. -+ // We infer the last and closest ESR version based on this rule. -+ nsCOMPtr runtime = -+ do_GetService("@mozilla.org/xre/runtime;1", &rv); -+ NS_ENSURE_SUCCESS(rv, rv); -+ -+ nsAutoCString updateChannel; -+ rv = runtime->GetDefaultUpdateChannel(updateChannel); -+ NS_ENSURE_SUCCESS(rv, rv); -+ -+ // If we are running in Firefox ESR, determine whether the formula of ESR -+ // version has changed. Once changed, we must update the formula in this -+ // function. -+ if (updateChannel.Equals("esr")) { -+ MOZ_ASSERT(((firefoxVersion % 7) == 3), -+ "Please udpate ESR version formula in nsRFPService.cpp"); -+ } -+ -+ uint32_t spoofedVersion = firefoxVersion - ((firefoxVersion - 3) % 7); -+ userAgent.Assign(nsPrintfCString( -+ "Mozilla/5.0 (%s; rv:%d.0) Gecko/%s Firefox/%d.0", -+ SPOOFED_OSCPU, spoofedVersion, LEGACY_BUILD_ID, spoofedVersion)); -+ -+ return rv; -+} -+ - nsresult - nsRFPService::Init() - { -diff --git toolkit/components/resistfingerprinting/nsRFPService.h toolkit/components/resistfingerprinting/nsRFPService.h -index cf1f688bb992..bad80383883b 100644 ---- toolkit/components/resistfingerprinting/nsRFPService.h -+++ toolkit/components/resistfingerprinting/nsRFPService.h -@@ -49,6 +49,9 @@ public: - static uint32_t GetSpoofedDroppedFrames(double aTime, uint32_t aWidth, uint32_t aHeight); - static uint32_t GetSpoofedPresentedFrames(double aTime, uint32_t aWidth, uint32_t aHeight); - -+ // This method generates the spoofed value of User Agent. -+ static nsresult GetSpoofedUserAgent(nsACString &userAgent); -+ - private: - nsresult Init(); - diff --git a/www/waterfox/files/patch-bug1393627 b/www/waterfox/files/patch-bug1393627 deleted file mode 100644 index 759cbffe52b..00000000000 --- a/www/waterfox/files/patch-bug1393627 +++ /dev/null @@ -1,30 +0,0 @@ -commit 7f3f4f7f6ad3 -Author: Francois Marier -Date: Fri Nov 3 11:44:43 2017 -0700 - - Bug 1393627 - Expose the full tracking protection UI preferences. r=mossop, a=ritu - - MozReview-Commit-ID: KyDBuHyDPLP - - --HG-- - extra : source : 516690579442aecc1bea191e905f019acfad5b48 ---- - browser/app/profile/firefox.js | 4 ---- - 1 file changed, 4 deletions(-) - -diff --git browser/app/profile/firefox.js browser/app/profile/firefox.js -index 137462dc857e..9e08a0f166f9 100644 ---- browser/app/profile/firefox.js -+++ browser/app/profile/firefox.js -@@ -1511,11 +1511,7 @@ pref("browser.ping-centre.production.endpoint", "https://tiles.services.mozilla. - // Enable GMP support in the addon manager. - pref("media.gmp-provider.enabled", true); - --#ifdef NIGHTLY_BUILD - pref("privacy.trackingprotection.ui.enabled", true); --#else --pref("privacy.trackingprotection.ui.enabled", false); --#endif - pref("privacy.trackingprotection.introCount", 0); - pref("privacy.trackingprotection.introURL", "https://www.mozilla.org/%LOCALE%/firefox/%VERSION%/tracking-protection/start/"); - diff --git a/www/waterfox/files/patch-bug1394146 b/www/waterfox/files/patch-bug1394146 deleted file mode 100644 index d3cba27a5a8..00000000000 --- a/www/waterfox/files/patch-bug1394146 +++ /dev/null @@ -1,119 +0,0 @@ -commit f8221b58e542 -Author: Sean Stangl -Date: Thu Sep 21 15:37:00 2017 -0400 - - Bug 1394146 - Avoid overflow on backwards iteration of IC entries. r=jandem, a=sledru - - --HG-- - extra : source : 9f05ef54c84d9b63fb3ad2dd2916df34cb35df8d - extra : histedit_source : 753ccc8652983bb35d3a1f9f89638902d3b0a2a5 ---- - js/src/jit/BaselineJIT.cpp | 11 +++++++++-- - js/src/jit/IonControlFlow.cpp | 16 ++++++++++++---- - 2 files changed, 21 insertions(+), 6 deletions(-) - -diff --git js/src/jit/BaselineJIT.cpp js/src/jit/BaselineJIT.cpp -index 3e25fd7b7120..baec7b63b8f0 100644 ---- js/src/jit/BaselineJIT.cpp -+++ js/src/jit/BaselineJIT.cpp -@@ -669,12 +669,16 @@ BaselineScript::maybeICEntryFromPCOffset(uint32_t pcOffset) - if (!ComputeBinarySearchMid(this, pcOffset, &mid)) - return nullptr; - -+ MOZ_ASSERT(mid < numICEntries()); -+ - // Found an IC entry with a matching PC offset. Search backward, and then - // forward from this IC entry, looking for one with the same PC offset which - // has isForOp() set. -- for (size_t i = mid; i < numICEntries() && icEntry(i).pcOffset() == pcOffset; i--) { -+ for (size_t i = mid; icEntry(i).pcOffset() == pcOffset; i--) { - if (icEntry(i).isForOp()) - return &icEntry(i); -+ if (i == 0) -+ break; - } - for (size_t i = mid+1; i < numICEntries() && icEntry(i).pcOffset() == pcOffset; i++) { - if (icEntry(i).isForOp()) -@@ -728,10 +732,13 @@ BaselineScript::callVMEntryFromPCOffset(uint32_t pcOffset) - // inserted by VM calls. - size_t mid; - MOZ_ALWAYS_TRUE(ComputeBinarySearchMid(this, pcOffset, &mid)); -+ MOZ_ASSERT(mid < numICEntries()); - -- for (size_t i = mid; i < numICEntries() && icEntry(i).pcOffset() == pcOffset; i--) { -+ for (size_t i = mid; icEntry(i).pcOffset() == pcOffset; i--) { - if (icEntry(i).kind() == ICEntry::Kind_CallVM) - return icEntry(i); -+ if (i == 0) -+ break; - } - for (size_t i = mid+1; i < numICEntries() && icEntry(i).pcOffset() == pcOffset; i++) { - if (icEntry(i).kind() == ICEntry::Kind_CallVM) -diff --git js/src/jit/IonControlFlow.cpp js/src/jit/IonControlFlow.cpp -index 4f27cd53dcaa..8d8a796d3f3b 100644 ---- js/src/jit/IonControlFlow.cpp -+++ js/src/jit/IonControlFlow.cpp -@@ -1619,7 +1619,7 @@ ControlFlowGenerator::processBreak(JSOp op, jssrcnote* sn) - DebugOnly found = false; - - if (SN_TYPE(sn) == SRC_BREAK2LABEL) { -- for (size_t i = labels_.length() - 1; i < labels_.length(); i--) { -+ for (size_t i = labels_.length() - 1; ; i--) { - CFGState& cfg = cfgStack_[labels_[i].cfgEntry]; - MOZ_ASSERT(cfg.state == CFGState::LABEL); - if (cfg.stopAt == target) { -@@ -1627,9 +1627,11 @@ ControlFlowGenerator::processBreak(JSOp op, jssrcnote* sn) - found = true; - break; - } -+ if (i == 0) -+ break; - } - } else { -- for (size_t i = loops_.length() - 1; i < loops_.length(); i--) { -+ for (size_t i = loops_.length() - 1; ; i--) { - CFGState& cfg = cfgStack_[loops_[i].cfgEntry]; - MOZ_ASSERT(cfg.isLoop()); - if (cfg.loop.exitpc == target) { -@@ -1637,6 +1639,8 @@ ControlFlowGenerator::processBreak(JSOp op, jssrcnote* sn) - found = true; - break; - } -+ if (i == 0) -+ break; - } - } - -@@ -1665,7 +1669,7 @@ ControlFlowGenerator::processContinue(JSOp op) - // Find the target loop. - CFGState* found = nullptr; - jsbytecode* target = pc + GetJumpOffset(pc); -- for (size_t i = loops_.length() - 1; i < loops_.length(); i--) { -+ for (size_t i = loops_.length() - 1; ; i--) { - // +1 to skip JSOP_JUMPTARGET. - if (loops_[i].continuepc == target + 1 || - EffectiveContinue(loops_[i].continuepc) == target) -@@ -1673,6 +1677,8 @@ ControlFlowGenerator::processContinue(JSOp op) - found = &cfgStack_[loops_[i].cfgEntry]; - break; - } -+ if (i == 0) -+ break; - } - - // There must always be a valid target loop structure. If not, there's -@@ -1698,11 +1704,13 @@ ControlFlowGenerator::processSwitchBreak(JSOp op) - // Find the target switch. - CFGState* found = nullptr; - jsbytecode* target = pc + GetJumpOffset(pc); -- for (size_t i = switches_.length() - 1; i < switches_.length(); i--) { -+ for (size_t i = switches_.length() - 1; ; i--) { - if (switches_[i].continuepc == target) { - found = &cfgStack_[switches_[i].cfgEntry]; - break; - } -+ if (i == 0) -+ break; - } - - // There must always be a valid target loop structure. If not, there's diff --git a/www/waterfox/files/patch-bug1394601 b/www/waterfox/files/patch-bug1394601 deleted file mode 100644 index 582385d1f60..00000000000 --- a/www/waterfox/files/patch-bug1394601 +++ /dev/null @@ -1,26 +0,0 @@ -commit 99cb2b5a1879 -Author: Francois Marier -Date: Mon Aug 28 17:06:00 2017 -0700 - - Bug 1394601 - Log an error when the Google API key is missing during Safe Browsing initialization. r=gcp - - MozReview-Commit-ID: DNwa9lR0J6K - - --HG-- - extra : rebase_source : 0a547c0cf88e1ed09268cbb810abaaca09e98531 ---- - toolkit/components/url-classifier/SafeBrowsing.jsm | 1 + - 1 file changed, 1 insertion(+) - -diff --git toolkit/components/url-classifier/SafeBrowsing.jsm toolkit/components/url-classifier/SafeBrowsing.jsm -index 051432393539..32cab18c187f 100644 ---- toolkit/components/url-classifier/SafeBrowsing.jsm -+++ toolkit/components/url-classifier/SafeBrowsing.jsm -@@ -343,6 +343,7 @@ this.SafeBrowsing = { - let googleKey = Services.urlFormatter.formatURL("%GOOGLE_API_KEY%").trim(); - if ((provider == "google" || provider == "google4") && - (!googleKey || googleKey == "no-google-api-key")) { -+ log("Missing Google API key, clearing updateURL and gethashURL."); - updateURL= ""; - gethashURL= ""; - } diff --git a/www/waterfox/files/patch-bug1395246 b/www/waterfox/files/patch-bug1395246 deleted file mode 100644 index ba7e6fecbcd..00000000000 --- a/www/waterfox/files/patch-bug1395246 +++ /dev/null @@ -1,83 +0,0 @@ -commit be7a92ebe633 -Author: Randell Jesup -Date: Thu Jun 7 15:26:25 2018 -0400 - - Bug 1395246 - Nullcheck DataChannel SendPacket calls, add some diagnostics. r=drno, a=RyanVM - - --HG-- - extra : source : 4d7a8d001f087fc500be3b4ca2469310fa39e6be ---- - netwerk/sctp/datachannel/DataChannel.cpp | 12 +++++++++++- - netwerk/sctp/datachannel/DataChannel.h | 8 ++++++-- - 2 files changed, 17 insertions(+), 3 deletions(-) - -diff --git netwerk/sctp/datachannel/DataChannel.cpp netwerk/sctp/datachannel/DataChannel.cpp -index b07cfaa4c273d..d7a9b64f155b7 100644 ---- netwerk/sctp/datachannel/DataChannel.cpp -+++ netwerk/sctp/datachannel/DataChannel.cpp -@@ -220,6 +220,9 @@ DataChannelConnection::DataChannelConnection(DataConnectionListener *listener, - mRemotePort = 0; - LOG(("Constructor DataChannelConnection=%p, listener=%p", this, mListener.get())); - mInternalIOThread = nullptr; -+#ifdef MOZ_DIAGNOSTIC_ASSERT_ENABLED -+ mShutdown = false; -+#endif - } - - DataChannelConnection::~DataChannelConnection() -@@ -307,6 +310,10 @@ void DataChannelConnection::DestroyOnSTS(struct socket *aMasterSocket, - if (aMasterSocket) - usrsctp_close(aMasterSocket); - -+#ifdef MOZ_DIAGNOSTIC_ASSERT_ENABLED -+ mShutdown = true; -+#endif -+ - disconnect_all(); - } - -@@ -657,7 +664,10 @@ int - DataChannelConnection::SendPacket(unsigned char data[], size_t len, bool release) - { - //LOG(("%p: SCTP/DTLS sent %ld bytes", this, len)); -- int res = mTransportFlow->SendPacket(data, len) < 0 ? 1 : 0; -+ int res = 0; -+ if (mTransportFlow) { -+ res = mTransportFlow->SendPacket(data, len) < 0 ? 1 : 0; -+ } - if (release) - delete [] data; - return res; -@@ -670,6 +680,7 @@ DataChannelConnection::SctpDtlsOutput(void *addr, void *buffer, size_t length, - { - DataChannelConnection *peer = static_cast(addr); - int res; -+ MOZ_DIAGNOSTIC_ASSERT(!peer->mShutdown); - - if (MOZ_LOG_TEST(gSCTPLog, LogLevel::Debug)) { - char *buf; -diff --git netwerk/sctp/datachannel/DataChannel.h netwerk/sctp/datachannel/DataChannel.h -index 8141ed64e3176..eaf2055aacaa0 100644 ---- netwerk/sctp/datachannel/DataChannel.h -+++ netwerk/sctp/datachannel/DataChannel.h -@@ -113,8 +113,8 @@ public: - virtual void NotifyDataChannel(already_AddRefed channel) = 0; - }; - -- explicit DataChannelConnection(DataConnectionListener *listener, -- nsIEventTarget *aTarget); -+ DataChannelConnection(DataConnectionListener *listener, -+ nsIEventTarget *aTarget); - - bool Init(unsigned short aPort, uint16_t aNumStreams, bool aUsingDtls); - void Destroy(); // So we can spawn refs tied to runnables in shutdown -@@ -285,6 +285,9 @@ private: - bool mUsingDtls; - - nsCOMPtr mInternalIOThread; -+#ifdef MOZ_DIAGNOSTIC_ASSERT_ENABLED -+ bool mShutdown; -+#endif - }; - - #define ENSURE_DATACONNECTION \ diff --git a/www/waterfox/files/patch-bug1395486 b/www/waterfox/files/patch-bug1395486 deleted file mode 100644 index 06309b87a66..00000000000 --- a/www/waterfox/files/patch-bug1395486 +++ /dev/null @@ -1,53 +0,0 @@ -commit c978a96e849c -Author: Chung-Sheng Fu -Date: Thu Aug 31 17:06:22 2017 +0800 - - Bug 1395486 - Move resource://gre-resource/plaintext.css to resource://content-accessible/plaintext.css. r=heycam - - MozReview-Commit-ID: Efz2Z78W2ix - - --HG-- - extra : rebase_source : 0522f382acd14372c6fea0a695f1d09300810912 ---- - layout/style/jar.mn | 1 - - layout/style/moz.build | 1 + - parser/html/nsHtml5PlainTextUtils.cpp | 2 +- - 3 files changed, 2 insertions(+), 2 deletions(-) - -diff --git layout/style/jar.mn layout/style/jar.mn -index 81af0f7540fc..4a4418218290 100644 ---- layout/style/jar.mn -+++ layout/style/jar.mn -@@ -6,7 +6,6 @@ toolkit.jar: - * res/ua.css (res/ua.css) - * res/html.css (res/html.css) - res/quirk.css (res/quirk.css) -- res/plaintext.css (res/plaintext.css) - res/counterstyles.css (res/counterstyles.css) - res/noscript.css (res/noscript.css) - res/noframes.css (res/noframes.css) -diff --git layout/style/moz.build layout/style/moz.build -index d4fbd0fef384..b5b19ee62232 100644 ---- layout/style/moz.build -+++ layout/style/moz.build -@@ -304,6 +304,7 @@ RESOURCE_FILES += [ - - CONTENT_ACCESSIBLE_FILES += [ - 'ImageDocument.css', -+ 'res/plaintext.css', - 'res/viewsource.css', - 'TopLevelImageDocument.css', - 'TopLevelVideoDocument.css', -diff --git parser/html/nsHtml5PlainTextUtils.cpp parser/html/nsHtml5PlainTextUtils.cpp -index e68522987784..920c5eee89d1 100644 ---- parser/html/nsHtml5PlainTextUtils.cpp -+++ parser/html/nsHtml5PlainTextUtils.cpp -@@ -22,7 +22,7 @@ nsHtml5PlainTextUtils::NewLinkAttributes() - nsHtml5String type = nsHtml5Portability::newStringFromLiteral("text/css"); - linkAttrs->addAttribute(nsHtml5AttributeName::ATTR_TYPE, type, -1); - nsHtml5String href = nsHtml5Portability::newStringFromLiteral( -- "resource://gre-resources/plaintext.css"); -+ "resource://content-accessible/plaintext.css"); - linkAttrs->addAttribute(nsHtml5AttributeName::ATTR_HREF, href, -1); - - nsresult rv; diff --git a/www/waterfox/files/patch-bug1396722 b/www/waterfox/files/patch-bug1396722 deleted file mode 100644 index 55e085860e9..00000000000 --- a/www/waterfox/files/patch-bug1396722 +++ /dev/null @@ -1,1426 +0,0 @@ -commit 00beb3311073 -Author: Karl Tomlinson -Date: Tue Sep 5 09:16:01 2017 +1200 - - bug 1396722 remove no-op ReleaseStyleContext() r=stransky+263117 - - MozReview-Commit-ID: DgKM0wrStrk - - --HG-- - extra : rebase_source : a26fdc5e5d6c63e21bb98a19ee7bf58042f9b3ba ---- - widget/gtk/WidgetStyleCache.cpp | 9 +- - widget/gtk/WidgetStyleCache.h | 15 +- - widget/gtk/gtk3drawing.cpp | 306 +++++++++++++++------------------------- - widget/gtk/nsLookAndFeel.cpp | 63 +++------ - 4 files changed, 142 insertions(+), 251 deletions(-) - -diff --git widget/gtk/WidgetStyleCache.cpp widget/gtk/WidgetStyleCache.cpp -index bf0c2d080c17..39b7893df3bd 100644 ---- widget/gtk/WidgetStyleCache.cpp -+++ widget/gtk/WidgetStyleCache.cpp -@@ -1220,8 +1220,8 @@ ResetWidgetCache(void) - } - - GtkStyleContext* --ClaimStyleContext(WidgetNodeType aNodeType, GtkTextDirection aDirection, -- GtkStateFlags aStateFlags, StyleFlags aFlags) -+GetStyleContext(WidgetNodeType aNodeType, GtkTextDirection aDirection, -+ GtkStateFlags aStateFlags, StyleFlags aFlags) - { - GtkStyleContext* style; - if (gtk_check_version(3, 20, 0) != nullptr) { -@@ -1276,8 +1276,3 @@ ClaimStyleContext(WidgetNodeType aNodeType, GtkTextDirection aDirection, - } - return style; - } -- --void --ReleaseStyleContext(GtkStyleContext* aStyleContext) --{ --} -diff --git widget/gtk/WidgetStyleCache.h widget/gtk/WidgetStyleCache.h -index 2cbb5f96076f..6cce492de2b6 100644 ---- widget/gtk/WidgetStyleCache.h -+++ widget/gtk/WidgetStyleCache.h -@@ -33,14 +33,15 @@ CreateCSSNode(const char* aName, - GtkStyleContext* aParentStyle, - GType aType = G_TYPE_NONE); - --// Callers must call ReleaseStyleContext() on the returned context. -+/* -+ * Returns a pointer to a style context for the specified node and state. -+ * The context is owned by WidgetStyleCache. Do not unref. -+ */ - GtkStyleContext* --ClaimStyleContext(WidgetNodeType aNodeType, -- GtkTextDirection aDirection = GTK_TEXT_DIR_NONE, -- GtkStateFlags aStateFlags = GTK_STATE_FLAG_NORMAL, -- StyleFlags aFlags = NO_STYLE_FLAGS); --void --ReleaseStyleContext(GtkStyleContext* style); -+GetStyleContext(WidgetNodeType aNodeType, -+ GtkTextDirection aDirection = GTK_TEXT_DIR_NONE, -+ GtkStateFlags aStateFlags = GTK_STATE_FLAG_NORMAL, -+ StyleFlags aFlags = NO_STYLE_FLAGS); - - void - ResetWidgetCache(void); -diff --git widget/gtk/gtk3drawing.cpp widget/gtk/gtk3drawing.cpp -index 73bd1987fd39..4c562b380095 100644 ---- widget/gtk/gtk3drawing.cpp -+++ widget/gtk/gtk3drawing.cpp -@@ -100,10 +100,9 @@ moz_gtk_refresh() - gtk_check_version(3, 20, 0) != nullptr) - { - // Deprecated for Gtk >= 3.20+ -- GtkStyleContext *style = ClaimStyleContext(MOZ_GTK_TAB_TOP); -+ GtkStyleContext *style = GetStyleContext(MOZ_GTK_TAB_TOP); - gtk_style_context_get_style(style, - "has-tab-gap", ¬ebook_has_tab_gap, NULL); -- ReleaseStyleContext(style); - } - else { - notebook_has_tab_gap = true; -@@ -149,31 +148,28 @@ moz_gtk_get_focus_outline_size(GtkStyleContext* style, - gint - moz_gtk_get_focus_outline_size(gint* focus_h_width, gint* focus_v_width) - { -- GtkStyleContext *style = ClaimStyleContext(MOZ_GTK_ENTRY); -+ GtkStyleContext *style = GetStyleContext(MOZ_GTK_ENTRY); - moz_gtk_get_focus_outline_size(style, focus_h_width, focus_v_width); -- ReleaseStyleContext(style); - return MOZ_GTK_SUCCESS; - } - - gint - moz_gtk_menuitem_get_horizontal_padding(gint* horizontal_padding) - { -- GtkStyleContext *style = ClaimStyleContext(MOZ_GTK_MENUITEM); -+ GtkStyleContext *style = GetStyleContext(MOZ_GTK_MENUITEM); - gtk_style_context_get_style(style, - "horizontal-padding", horizontal_padding, - nullptr); -- ReleaseStyleContext(style); - return MOZ_GTK_SUCCESS; - } - - gint - moz_gtk_checkmenuitem_get_horizontal_padding(gint* horizontal_padding) - { -- GtkStyleContext *style = ClaimStyleContext(MOZ_GTK_CHECKMENUITEM); -+ GtkStyleContext *style = GetStyleContext(MOZ_GTK_CHECKMENUITEM); - gtk_style_context_get_style(style, - "horizontal-padding", horizontal_padding, - nullptr); -- ReleaseStyleContext(style); - return MOZ_GTK_SUCCESS; - } - -@@ -183,11 +179,10 @@ moz_gtk_button_get_default_overflow(gint* border_top, gint* border_left, - { - GtkBorder* default_outside_border; - -- GtkStyleContext *style = ClaimStyleContext(MOZ_GTK_BUTTON); -+ GtkStyleContext *style = GetStyleContext(MOZ_GTK_BUTTON); - gtk_style_context_get_style(style, - "default-outside-border", &default_outside_border, - NULL); -- ReleaseStyleContext(style); - - if (default_outside_border) { - *border_top = default_outside_border->top; -@@ -207,11 +202,10 @@ moz_gtk_button_get_default_border(gint* border_top, gint* border_left, - { - GtkBorder* default_border; - -- GtkStyleContext *style = ClaimStyleContext(MOZ_GTK_BUTTON); -+ GtkStyleContext *style = GetStyleContext(MOZ_GTK_BUTTON); - gtk_style_context_get_style(style, - "default-border", &default_border, - NULL); -- ReleaseStyleContext(style); - - if (default_border) { - *border_top = default_border->top; -@@ -231,12 +225,11 @@ moz_gtk_splitter_get_metrics(gint orientation, gint* size) - { - GtkStyleContext *style; - if (orientation == GTK_ORIENTATION_HORIZONTAL) { -- style = ClaimStyleContext(MOZ_GTK_SPLITTER_HORIZONTAL); -+ style = GetStyleContext(MOZ_GTK_SPLITTER_HORIZONTAL); - } else { -- style = ClaimStyleContext(MOZ_GTK_SPLITTER_VERTICAL); -+ style = GetStyleContext(MOZ_GTK_SPLITTER_VERTICAL); - } - gtk_style_context_get_style(style, "handle_size", size, NULL); -- ReleaseStyleContext(style); - return MOZ_GTK_SUCCESS; - } - -@@ -244,15 +237,13 @@ static gint - moz_gtk_window_paint(cairo_t *cr, GdkRectangle* rect, - GtkTextDirection direction) - { -- GtkStyleContext* style = ClaimStyleContext(MOZ_GTK_WINDOW, direction); -+ GtkStyleContext* style = GetStyleContext(MOZ_GTK_WINDOW, direction); - - gtk_style_context_save(style); - gtk_style_context_add_class(style, GTK_STYLE_CLASS_BACKGROUND); - gtk_render_background(style, cr, rect->x, rect->y, rect->width, rect->height); - gtk_style_context_restore(style); - -- ReleaseStyleContext(style); -- - return MOZ_GTK_SUCCESS; - } - -@@ -351,9 +342,8 @@ moz_gtk_toggle_paint(cairo_t *cr, GdkRectangle* rect, - if (inconsistent) - state_flags = static_cast(state_flags|GTK_STATE_FLAG_INCONSISTENT); - -- style = ClaimStyleContext(isradio ? MOZ_GTK_RADIOBUTTON : -- MOZ_GTK_CHECKBUTTON, -- direction, state_flags); -+ style = GetStyleContext(isradio ? MOZ_GTK_RADIOBUTTON : MOZ_GTK_CHECKBUTTON, -+ direction, state_flags); - - if (gtk_check_version(3, 20, 0) == nullptr) { - gtk_render_background(style, cr, x, y, width, height); -@@ -375,8 +365,6 @@ moz_gtk_toggle_paint(cairo_t *cr, GdkRectangle* rect, - } - } - -- ReleaseStyleContext(style); -- - return MOZ_GTK_SUCCESS; - } - -@@ -460,7 +448,7 @@ static void - moz_gtk_get_widget_min_size(WidgetNodeType aGtkWidgetType, int* width, - int* height) - { -- GtkStyleContext* style = ClaimStyleContext(aGtkWidgetType); -+ GtkStyleContext* style = GetStyleContext(aGtkWidgetType); - GtkStateFlags state_flags = gtk_style_context_get_state(style); - gtk_style_context_get(style, state_flags, - "min-height", height, -@@ -471,7 +459,6 @@ moz_gtk_get_widget_min_size(WidgetNodeType aGtkWidgetType, int* width, - gtk_style_context_get_border(style, state_flags, &border); - gtk_style_context_get_padding(style, state_flags, &padding); - gtk_style_context_get_margin(style, state_flags, &margin); -- ReleaseStyleContext(style); - - *width += border.left + border.right + margin.left + margin.right + - padding.left + padding.right; -@@ -666,7 +653,7 @@ moz_gtk_scrollbar_trough_paint(WidgetNodeType widget, - MOZ_GTK_SCROLLBAR_THUMB_VERTICAL : - MOZ_GTK_SCROLLBAR_THUMB_HORIZONTAL; - MozGtkSize thumbSize = GetMinMarginBox(thumb); -- style = ClaimStyleContext(widget, direction); -+ style = GetStyleContext(widget, direction); - MozGtkSize trackSize = GetMinContentBox(style); - trackSize.Include(thumbSize); - trackSize += GetMarginBorderPadding(style); -@@ -681,11 +668,10 @@ moz_gtk_scrollbar_trough_paint(WidgetNodeType widget, - rect.height = trackSize.height; - } - } else { -- style = ClaimStyleContext(widget, direction); -+ style = GetStyleContext(widget, direction); - } - - moz_gtk_draw_styled_frame(style, cr, &rect, state->focused); -- ReleaseStyleContext(style); - - return MOZ_GTK_SUCCESS; - } -@@ -696,18 +682,16 @@ moz_gtk_scrollbar_paint(WidgetNodeType widget, - GtkWidgetState* state, - GtkTextDirection direction) - { -- GtkStyleContext* style = ClaimStyleContext(widget, direction); -+ GtkStyleContext* style = GetStyleContext(widget, direction); - moz_gtk_update_scrollbar_style(style, widget, direction); - - moz_gtk_draw_styled_frame(style, cr, rect, state->focused); - -- ReleaseStyleContext(style); -- style = ClaimStyleContext((widget == MOZ_GTK_SCROLLBAR_HORIZONTAL) ? -- MOZ_GTK_SCROLLBAR_CONTENTS_HORIZONTAL : -- MOZ_GTK_SCROLLBAR_CONTENTS_VERTICAL, -- direction); -+ style = GetStyleContext((widget == MOZ_GTK_SCROLLBAR_HORIZONTAL) ? -+ MOZ_GTK_SCROLLBAR_CONTENTS_HORIZONTAL : -+ MOZ_GTK_SCROLLBAR_CONTENTS_VERTICAL, -+ direction); - moz_gtk_draw_styled_frame(style, cr, rect, state->focused); -- ReleaseStyleContext(style); - - return MOZ_GTK_SUCCESS; - } -@@ -721,7 +705,7 @@ moz_gtk_scrollbar_thumb_paint(WidgetNodeType widget, - GtkStateFlags state_flags = GetStateFlagsFromGtkWidgetState(state); - - GdkRectangle rect = *aRect; -- GtkStyleContext* style = ClaimStyleContext(widget, direction, state_flags); -+ GtkStyleContext* style = GetStyleContext(widget, direction, state_flags); - InsetByMargin(&rect, style); - - gtk_render_slider(style, cr, -@@ -732,7 +716,6 @@ moz_gtk_scrollbar_thumb_paint(WidgetNodeType widget, - (widget == MOZ_GTK_SCROLLBAR_THUMB_HORIZONTAL) ? - GTK_ORIENTATION_HORIZONTAL : GTK_ORIENTATION_VERTICAL); - -- ReleaseStyleContext(style); - - return MOZ_GTK_SUCCESS; - } -@@ -741,10 +724,9 @@ static gint - moz_gtk_spin_paint(cairo_t *cr, GdkRectangle* rect, - GtkTextDirection direction) - { -- GtkStyleContext* style = ClaimStyleContext(MOZ_GTK_SPINBUTTON, direction); -+ GtkStyleContext* style = GetStyleContext(MOZ_GTK_SPINBUTTON, 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); -- ReleaseStyleContext(style); - return MOZ_GTK_SUCCESS; - } - -@@ -753,7 +735,7 @@ moz_gtk_spin_updown_paint(cairo_t *cr, GdkRectangle* rect, - gboolean isDown, GtkWidgetState* state, - GtkTextDirection direction) - { -- GtkStyleContext* style = ClaimStyleContext(MOZ_GTK_SPINBUTTON, direction, -+ GtkStyleContext* style = GetStyleContext(MOZ_GTK_SPINBUTTON, direction, - GetStateFlagsFromGtkWidgetState(state)); - - gtk_render_background(style, cr, rect->x, rect->y, rect->width, rect->height); -@@ -772,7 +754,6 @@ moz_gtk_spin_updown_paint(cairo_t *cr, GdkRectangle* rect, - arrow_rect.x, arrow_rect.y, - arrow_rect.width); - -- ReleaseStyleContext(style); - return MOZ_GTK_SUCCESS; - } - -@@ -793,7 +774,7 @@ moz_gtk_scale_paint(cairo_t *cr, GdkRectangle* rect, - WidgetNodeType widget = (flags == GTK_ORIENTATION_HORIZONTAL) ? - MOZ_GTK_SCALE_TROUGH_HORIZONTAL : - MOZ_GTK_SCALE_TROUGH_VERTICAL; -- style = ClaimStyleContext(widget, direction, state_flags); -+ style = GetStyleContext(widget, direction, state_flags); - gtk_style_context_get_margin(style, state_flags, &margin); - - // Clamp the dimension perpendicular to the direction that the slider crosses -@@ -817,7 +798,6 @@ moz_gtk_scale_paint(cairo_t *cr, GdkRectangle* rect, - gtk_render_focus(style, cr, - rect->x, rect->y, rect->width, rect->height); - -- ReleaseStyleContext(style); - return MOZ_GTK_SUCCESS; - } - -@@ -846,9 +826,8 @@ moz_gtk_scale_thumb_paint(cairo_t *cr, GdkRectangle* rect, - WidgetNodeType widget = (flags == GTK_ORIENTATION_HORIZONTAL) ? - MOZ_GTK_SCALE_THUMB_HORIZONTAL : - MOZ_GTK_SCALE_THUMB_VERTICAL; -- style = ClaimStyleContext(widget, direction, state_flags); -+ style = GetStyleContext(widget, direction, state_flags); - gtk_render_slider(style, cr, x, y, thumb_width, thumb_height, flags); -- ReleaseStyleContext(style); - - return MOZ_GTK_SUCCESS; - } -@@ -859,11 +838,10 @@ moz_gtk_gripper_paint(cairo_t *cr, GdkRectangle* rect, - GtkTextDirection direction) - { - GtkStyleContext* style = -- ClaimStyleContext(MOZ_GTK_GRIPPER, direction, -- GetStateFlagsFromGtkWidgetState(state)); -+ GetStyleContext(MOZ_GTK_GRIPPER, direction, -+ GetStateFlagsFromGtkWidgetState(state)); - 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); -- ReleaseStyleContext(style); - return MOZ_GTK_SUCCESS; - } - -@@ -872,12 +850,11 @@ moz_gtk_hpaned_paint(cairo_t *cr, GdkRectangle* rect, - GtkWidgetState* state) - { - GtkStyleContext* style = -- ClaimStyleContext(MOZ_GTK_SPLITTER_SEPARATOR_HORIZONTAL, -- GTK_TEXT_DIR_LTR, -- GetStateFlagsFromGtkWidgetState(state)); -+ GetStyleContext(MOZ_GTK_SPLITTER_SEPARATOR_HORIZONTAL, -+ GTK_TEXT_DIR_LTR, -+ GetStateFlagsFromGtkWidgetState(state)); - gtk_render_handle(style, cr, - rect->x, rect->y, rect->width, rect->height); -- ReleaseStyleContext(style); - return MOZ_GTK_SUCCESS; - } - -@@ -886,12 +863,11 @@ moz_gtk_vpaned_paint(cairo_t *cr, GdkRectangle* rect, - GtkWidgetState* state) - { - GtkStyleContext* style = -- ClaimStyleContext(MOZ_GTK_SPLITTER_SEPARATOR_VERTICAL, -- GTK_TEXT_DIR_LTR, -- GetStateFlagsFromGtkWidgetState(state)); -+ GetStyleContext(MOZ_GTK_SPLITTER_SEPARATOR_VERTICAL, -+ GTK_TEXT_DIR_LTR, -+ GetStateFlagsFromGtkWidgetState(state)); - gtk_render_handle(style, cr, - rect->x, rect->y, rect->width, rect->height); -- ReleaseStyleContext(style); - return MOZ_GTK_SUCCESS; - } - -@@ -939,26 +915,22 @@ moz_gtk_text_view_paint(cairo_t *cr, GdkRectangle* aRect, - GTK_STATE_FLAG_NORMAL; - - GtkStyleContext* style_frame = -- ClaimStyleContext(MOZ_GTK_SCROLLED_WINDOW, direction, state_flags); -+ GetStyleContext(MOZ_GTK_SCROLLED_WINDOW, direction, state_flags); - gtk_render_frame(style_frame, cr, - aRect->x, aRect->y, aRect->width, aRect->height); - - GdkRectangle rect = *aRect; - InsetByBorderPadding(&rect, style_frame); - -- ReleaseStyleContext(style_frame); -- - GtkStyleContext* style = -- ClaimStyleContext(MOZ_GTK_TEXT_VIEW, direction, state_flags); -+ GetStyleContext(MOZ_GTK_TEXT_VIEW, direction, state_flags); - gtk_render_background(style, cr, rect.x, rect.y, rect.width, rect.height); -- ReleaseStyleContext(style); - // There is a separate "text" window, which usually provides the - // background behind the text. However, this is transparent in Ambiance - // for GTK 3.20, in which case the MOZ_GTK_TEXT_VIEW background is - // visible. -- style = ClaimStyleContext(MOZ_GTK_TEXT_VIEW_TEXT, direction, state_flags); -+ style = GetStyleContext(MOZ_GTK_TEXT_VIEW_TEXT, direction, state_flags); - gtk_render_background(style, cr, rect.x, rect.y, rect.width, rect.height); -- ReleaseStyleContext(style); - - return MOZ_GTK_SUCCESS; - } -@@ -978,23 +950,20 @@ moz_gtk_treeview_paint(cairo_t *cr, GdkRectangle* rect, - * area will be painted differently with other states */ - state_flags = state->disabled ? GTK_STATE_FLAG_INSENSITIVE : GTK_STATE_FLAG_NORMAL; - -- style = ClaimStyleContext(MOZ_GTK_SCROLLED_WINDOW, direction); -+ style = GetStyleContext(MOZ_GTK_SCROLLED_WINDOW, direction); - gtk_style_context_get_border(style, state_flags, &border); - xthickness = border.left; - ythickness = border.top; -- ReleaseStyleContext(style); - -- style_tree = ClaimStyleContext(MOZ_GTK_TREEVIEW_VIEW, direction); -+ style_tree = GetStyleContext(MOZ_GTK_TREEVIEW_VIEW, direction); - gtk_render_background(style_tree, cr, - rect->x + xthickness, rect->y + ythickness, - rect->width - 2 * xthickness, - rect->height - 2 * ythickness); -- ReleaseStyleContext(style_tree); - -- style = ClaimStyleContext(MOZ_GTK_SCROLLED_WINDOW, direction); -+ style = GetStyleContext(MOZ_GTK_SCROLLED_WINDOW, direction); - gtk_render_frame(style, cr, - rect->x, rect->y, rect->width, rect->height); -- ReleaseStyleContext(style); - return MOZ_GTK_SUCCESS; - } - -@@ -1022,8 +991,8 @@ moz_gtk_tree_header_sort_arrow_paint(cairo_t *cr, GdkRectangle* rect, - arrow_rect.height = 11; - arrow_rect.x = rect->x + (rect->width - arrow_rect.width) / 2; - arrow_rect.y = rect->y + (rect->height - arrow_rect.height) / 2; -- style = ClaimStyleContext(MOZ_GTK_TREE_HEADER_SORTARROW, direction, -- GetStateFlagsFromGtkWidgetState(state)); -+ style = GetStyleContext(MOZ_GTK_TREE_HEADER_SORTARROW, direction, -+ GetStateFlagsFromGtkWidgetState(state)); - switch (arrow_type) { - case GTK_ARROW_LEFT: - arrow_angle = ARROW_LEFT; -@@ -1042,7 +1011,6 @@ moz_gtk_tree_header_sort_arrow_paint(cairo_t *cr, GdkRectangle* rect, - gtk_render_arrow(style, cr, arrow_angle, - arrow_rect.x, arrow_rect.y, - arrow_rect.width); -- ReleaseStyleContext(style); - return MOZ_GTK_SUCCESS; - } - -@@ -1067,15 +1035,14 @@ moz_gtk_treeview_expander_paint(cairo_t *cr, GdkRectangle* rect, - else - state_flags = static_cast(state_flags&~(checkbox_check_state)); - -- GtkStyleContext *style = ClaimStyleContext(MOZ_GTK_TREEVIEW_EXPANDER, -- direction, state_flags); -+ GtkStyleContext *style = GetStyleContext(MOZ_GTK_TREEVIEW_EXPANDER, -+ direction, state_flags); - gtk_render_expander(style, cr, - rect->x, - rect->y, - rect->width, - rect->height); - -- ReleaseStyleContext(style); - return MOZ_GTK_SUCCESS; - } - -@@ -1112,11 +1079,10 @@ moz_gtk_combo_box_paint(cairo_t *cr, GdkRectangle* rect, - calculate_arrow_rect(comboBoxArrow, - &arrow_rect, &real_arrow_rect, direction); - -- style = ClaimStyleContext(MOZ_GTK_COMBOBOX_ARROW); -+ style = GetStyleContext(MOZ_GTK_COMBOBOX_ARROW); - gtk_render_arrow(style, cr, ARROW_DOWN, - real_arrow_rect.x, real_arrow_rect.y, - real_arrow_rect.width); -- ReleaseStyleContext(style); - - /* If there is no separator in the theme, there's nothing left to do. */ - GtkWidget* widget = GetWidget(MOZ_GTK_COMBOBOX_SEPARATOR); -@@ -1187,11 +1153,10 @@ moz_gtk_arrow_paint(cairo_t *cr, GdkRectangle* rect, - calculate_arrow_rect(GetWidget(MOZ_GTK_BUTTON_ARROW), rect, &arrow_rect, - direction); - GtkStateFlags state_flags = GetStateFlagsFromGtkWidgetState(state); -- GtkStyleContext* style = ClaimStyleContext(MOZ_GTK_BUTTON_ARROW, -- direction, state_flags); -+ GtkStyleContext* style = GetStyleContext(MOZ_GTK_BUTTON_ARROW, -+ direction, state_flags); - gtk_render_arrow(style, cr, arrow_angle, - arrow_rect.x, arrow_rect.y, arrow_rect.width); -- ReleaseStyleContext(style); - return MOZ_GTK_SUCCESS; - } - -@@ -1224,11 +1189,10 @@ moz_gtk_combo_box_entry_button_paint(cairo_t *cr, GdkRectangle* rect, - calculate_arrow_rect(GetWidget(MOZ_GTK_COMBOBOX_ENTRY_ARROW), - &arrow_rect, &real_arrow_rect, direction); - -- style = ClaimStyleContext(MOZ_GTK_COMBOBOX_ENTRY_ARROW); -+ style = GetStyleContext(MOZ_GTK_COMBOBOX_ENTRY_ARROW); - gtk_render_arrow(style, cr, ARROW_DOWN, - real_arrow_rect.x, real_arrow_rect.y, - real_arrow_rect.width); -- ReleaseStyleContext(style); - return MOZ_GTK_SUCCESS; - } - -@@ -1239,15 +1203,14 @@ moz_gtk_container_paint(cairo_t *cr, GdkRectangle* rect, - GtkTextDirection direction) - { - GtkStateFlags state_flags = GetStateFlagsFromGtkWidgetState(state); -- GtkStyleContext* style = ClaimStyleContext(widget_type, direction, -- state_flags); -+ GtkStyleContext* style = GetStyleContext(widget_type, direction, -+ state_flags); - /* this is for drawing a prelight box */ - if (state_flags & GTK_STATE_FLAG_PRELIGHT) { - gtk_render_background(style, cr, - rect->x, rect->y, rect->width, rect->height); - } - -- ReleaseStyleContext(style); - return MOZ_GTK_SUCCESS; - } - -@@ -1260,15 +1223,13 @@ moz_gtk_toggle_label_paint(cairo_t *cr, GdkRectangle* rect, - return MOZ_GTK_SUCCESS; - - GtkStyleContext *style = -- ClaimStyleContext(isradio ? MOZ_GTK_RADIOBUTTON_CONTAINER : -- MOZ_GTK_CHECKBUTTON_CONTAINER, -- direction, -- GetStateFlagsFromGtkWidgetState(state)); -+ GetStyleContext(isradio ? MOZ_GTK_RADIOBUTTON_CONTAINER : -+ MOZ_GTK_CHECKBUTTON_CONTAINER, -+ direction, -+ GetStateFlagsFromGtkWidgetState(state)); - gtk_render_focus(style, cr, - rect->x, rect->y, rect->width, rect->height); - -- ReleaseStyleContext(style); -- - return MOZ_GTK_SUCCESS; - } - -@@ -1276,10 +1237,9 @@ static gint - moz_gtk_toolbar_paint(cairo_t *cr, GdkRectangle* rect, - GtkTextDirection direction) - { -- GtkStyleContext* style = ClaimStyleContext(MOZ_GTK_TOOLBAR, direction); -+ GtkStyleContext* style = GetStyleContext(MOZ_GTK_TOOLBAR, 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); -- ReleaseStyleContext(style); - return MOZ_GTK_SUCCESS; - } - -@@ -1297,14 +1257,13 @@ moz_gtk_toolbar_separator_paint(cairo_t *cr, GdkRectangle* rect, - const double start_fraction = 0.2; - const double end_fraction = 0.8; - -- GtkStyleContext* style = ClaimStyleContext(MOZ_GTK_TOOLBAR); -+ GtkStyleContext* style = GetStyleContext(MOZ_GTK_TOOLBAR); - gtk_style_context_get_style(style, - "wide-separators", &wide_separators, - "separator-width", &separator_width, - NULL); -- ReleaseStyleContext(style); - -- style = ClaimStyleContext(MOZ_GTK_TOOLBAR_SEPARATOR, direction); -+ style = GetStyleContext(MOZ_GTK_TOOLBAR_SEPARATOR, direction); - if (wide_separators) { - if (separator_width > rect->width) - separator_width = rect->width; -@@ -1328,7 +1287,6 @@ moz_gtk_toolbar_separator_paint(cairo_t *cr, GdkRectangle* rect, - rect->x + (rect->width - paint_width) / 2, - rect->y + rect->height * end_fraction); - } -- ReleaseStyleContext(style); - return MOZ_GTK_SUCCESS; - } - -@@ -1345,11 +1303,10 @@ moz_gtk_tooltip_paint(cairo_t *cr, const GdkRectangle* aRect, - // We have to draw all elements with appropriate offset and right dimensions. - - // Tooltip drawing -- GtkStyleContext* style = ClaimStyleContext(MOZ_GTK_TOOLTIP, direction); -+ GtkStyleContext* style = GetStyleContext(MOZ_GTK_TOOLTIP, direction); - GdkRectangle rect = *aRect; - 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); -- ReleaseStyleContext(style); - - // Horizontal Box drawing - // -@@ -1359,7 +1316,7 @@ moz_gtk_tooltip_paint(cairo_t *cr, const GdkRectangle* aRect, - // 6px margin. - // For drawing Horizontal Box we have to inset drawing area by that 6px - // plus its CSS margin. -- GtkStyleContext* boxStyle = ClaimStyleContext(MOZ_GTK_TOOLTIP_BOX, direction); -+ GtkStyleContext* boxStyle = GetStyleContext(MOZ_GTK_TOOLTIP_BOX, direction); - - rect.x += 6; - rect.y += 6; -@@ -1372,12 +1329,10 @@ moz_gtk_tooltip_paint(cairo_t *cr, const GdkRectangle* aRect, - - // Label drawing - InsetByBorderPadding(&rect, boxStyle); -- ReleaseStyleContext(boxStyle); - - GtkStyleContext* labelStyle = -- ClaimStyleContext(MOZ_GTK_TOOLTIP_BOX_LABEL, direction); -+ GetStyleContext(MOZ_GTK_TOOLTIP_BOX_LABEL, direction); - moz_gtk_draw_styled_frame(labelStyle, cr, &rect, false); -- ReleaseStyleContext(labelStyle); - - return MOZ_GTK_SUCCESS; - } -@@ -1388,8 +1343,8 @@ moz_gtk_resizer_paint(cairo_t *cr, GdkRectangle* rect, - GtkTextDirection direction) - { - GtkStyleContext* style = -- ClaimStyleContext(MOZ_GTK_RESIZER, GTK_TEXT_DIR_LTR, -- GetStateFlagsFromGtkWidgetState(state)); -+ GetStyleContext(MOZ_GTK_RESIZER, GTK_TEXT_DIR_LTR, -+ GetStateFlagsFromGtkWidgetState(state)); - - // Workaround unico not respecting the text direction for resizers. - // See bug 1174248. -@@ -1403,7 +1358,6 @@ moz_gtk_resizer_paint(cairo_t *cr, GdkRectangle* rect, - - gtk_render_handle(style, cr, rect->x, rect->y, rect->width, rect->height); - cairo_restore(cr); -- ReleaseStyleContext(style); - - return MOZ_GTK_SUCCESS; - } -@@ -1412,9 +1366,8 @@ static gint - moz_gtk_frame_paint(cairo_t *cr, GdkRectangle* rect, - GtkTextDirection direction) - { -- GtkStyleContext* style = ClaimStyleContext(MOZ_GTK_FRAME, direction); -+ GtkStyleContext* style = GetStyleContext(MOZ_GTK_FRAME, direction); - gtk_render_frame(style, cr, rect->x, rect->y, rect->width, rect->height); -- ReleaseStyleContext(style); - return MOZ_GTK_SUCCESS; - } - -@@ -1422,11 +1375,10 @@ static gint - moz_gtk_progressbar_paint(cairo_t *cr, GdkRectangle* rect, - GtkTextDirection direction) - { -- GtkStyleContext* style = ClaimStyleContext(MOZ_GTK_PROGRESS_TROUGH, -- direction); -+ GtkStyleContext* style = GetStyleContext(MOZ_GTK_PROGRESS_TROUGH, -+ 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); -- ReleaseStyleContext(style); - - return MOZ_GTK_SUCCESS; - } -@@ -1437,7 +1389,7 @@ moz_gtk_progress_chunk_paint(cairo_t *cr, GdkRectangle* rect, - WidgetNodeType widget) - { - GtkStyleContext* style = -- ClaimStyleContext(MOZ_GTK_PROGRESS_CHUNK, direction); -+ GetStyleContext(MOZ_GTK_PROGRESS_CHUNK, direction); - - if (widget == MOZ_GTK_PROGRESS_CHUNK_INDETERMINATE || - widget == MOZ_GTK_PROGRESS_CHUNK_VERTICAL_INDETERMINATE) { -@@ -1481,7 +1433,6 @@ moz_gtk_progress_chunk_paint(cairo_t *cr, GdkRectangle* rect, - } else { - gtk_render_activity(style, cr, rect->x, rect->y, rect->width, rect->height); - } -- ReleaseStyleContext(style); - - return MOZ_GTK_SUCCESS; - } -@@ -1503,9 +1454,8 @@ moz_gtk_get_tab_thickness(GtkStyleContext *style) - gint - moz_gtk_get_tab_thickness(WidgetNodeType aNodeType) - { -- GtkStyleContext *style = ClaimStyleContext(aNodeType); -+ GtkStyleContext *style = GetStyleContext(aNodeType); - int thickness = moz_gtk_get_tab_thickness(style); -- ReleaseStyleContext(style); - return thickness; - } - -@@ -1528,8 +1478,8 @@ moz_gtk_tab_paint(cairo_t *cr, GdkRectangle* rect, - int initial_gap = 0; - bool isBottomTab = (widget == MOZ_GTK_TAB_BOTTOM); - -- style = ClaimStyleContext(widget, direction, -- GetStateFlagsFromGtkTabFlags(flags)); -+ style = GetStyleContext(widget, direction, -+ GetStateFlagsFromGtkTabFlags(flags)); - tabRect = *rect; - - if (flags & MOZ_GTK_TAB_FIRST) { -@@ -1606,7 +1556,7 @@ moz_gtk_tab_paint(cairo_t *cr, GdkRectangle* rect, - } - - GtkStyleContext* panelStyle = -- ClaimStyleContext(MOZ_GTK_TABPANELS, direction); -+ GetStyleContext(MOZ_GTK_TABPANELS, direction); - - if (isBottomTab) { - /* Draw the tab on bottom */ -@@ -1681,7 +1631,6 @@ moz_gtk_tab_paint(cairo_t *cr, GdkRectangle* rect, - gtk_render_focus(style, cr, - focusRect.x, focusRect.y, focusRect.width, focusRect.height); - } -- ReleaseStyleContext(style); - - return MOZ_GTK_SUCCESS; - } -@@ -1691,7 +1640,7 @@ static gint - moz_gtk_tabpanels_paint(cairo_t *cr, GdkRectangle* rect, - GtkTextDirection direction) - { -- GtkStyleContext* style = ClaimStyleContext(MOZ_GTK_TABPANELS, direction); -+ GtkStyleContext* style = GetStyleContext(MOZ_GTK_TABPANELS, direction); - gtk_render_background(style, cr, rect->x, rect->y, - rect->width, rect->height); - /* -@@ -1728,7 +1677,6 @@ moz_gtk_tabpanels_paint(cairo_t *cr, GdkRectangle* rect, - GTK_POS_TOP, 0, 1); - cairo_restore(cr); - -- ReleaseStyleContext(style); - return MOZ_GTK_SUCCESS; - } - -@@ -1763,11 +1711,10 @@ moz_gtk_tab_scroll_arrow_paint(cairo_t *cr, GdkRectangle* rect, - break; - } - if (arrow_type != GTK_ARROW_NONE) { -- style = ClaimStyleContext(MOZ_GTK_TAB_SCROLLARROW, direction, -- GetStateFlagsFromGtkWidgetState(state)); -+ style = GetStyleContext(MOZ_GTK_TAB_SCROLLARROW, direction, -+ GetStateFlagsFromGtkWidgetState(state)); - gtk_render_arrow(style, cr, arrow_angle, - x, y, arrow_size); -- ReleaseStyleContext(style); - } - return MOZ_GTK_SUCCESS; - } -@@ -1833,7 +1780,7 @@ moz_gtk_menu_separator_paint(cairo_t *cr, GdkRectangle* rect, - gint x, y, w; - GtkBorder padding; - -- style = ClaimStyleContext(MOZ_GTK_MENUSEPARATOR, direction); -+ style = GetStyleContext(MOZ_GTK_MENUSEPARATOR, direction); - gtk_style_context_get_padding(style, GTK_STATE_FLAG_NORMAL, &padding); - - x = rect->x; -@@ -1863,7 +1810,6 @@ moz_gtk_menu_separator_paint(cairo_t *cr, GdkRectangle* rect, - } - - gtk_style_context_restore(style); -- ReleaseStyleContext(style); - - return MOZ_GTK_SUCCESS; - } -@@ -1883,7 +1829,7 @@ moz_gtk_menu_item_paint(WidgetNodeType widget, cairo_t *cr, GdkRectangle* rect, - !(state_flags & GTK_STATE_FLAG_PRELIGHT))) - return MOZ_GTK_SUCCESS; - -- GtkStyleContext* style = ClaimStyleContext(widget, direction, state_flags); -+ GtkStyleContext* style = GetStyleContext(widget, direction, state_flags); - - if (minorVersion < 6) { - // GTK+ 3.4 saves the style context and adds the menubar class to -@@ -1906,7 +1852,6 @@ moz_gtk_menu_item_paint(WidgetNodeType widget, cairo_t *cr, GdkRectangle* rect, - if (minorVersion < 6) { - gtk_style_context_restore(style); - } -- ReleaseStyleContext(style); - - return MOZ_GTK_SUCCESS; - } -@@ -1917,12 +1862,11 @@ moz_gtk_menu_arrow_paint(cairo_t *cr, GdkRectangle* rect, - GtkTextDirection direction) - { - GtkStateFlags state_flags = GetStateFlagsFromGtkWidgetState(state); -- GtkStyleContext* style = ClaimStyleContext(MOZ_GTK_MENUITEM, -- direction, state_flags); -+ GtkStyleContext* style = GetStyleContext(MOZ_GTK_MENUITEM, -+ direction, state_flags); - gtk_render_arrow(style, cr, - (direction == GTK_TEXT_DIR_LTR) ? ARROW_RIGHT : ARROW_LEFT, - rect->x, rect->y, rect->width); -- ReleaseStyleContext(style); - return MOZ_GTK_SUCCESS; - } - -@@ -1947,7 +1891,7 @@ moz_gtk_check_menu_item_paint(WidgetNodeType widgetType, - - bool pre_3_20 = gtk_get_minor_version() < 20; - gint offset; -- style = ClaimStyleContext(widgetType, direction); -+ style = GetStyleContext(widgetType, direction); - gtk_style_context_get_style(style, - "indicator-size", &indicator_size, - "horizontal-padding", &horizontal_padding, -@@ -1962,12 +1906,11 @@ moz_gtk_check_menu_item_paint(WidgetNodeType widgetType, - InsetByBorderPadding(&r, style); - offset = r.x; - } -- ReleaseStyleContext(style); - - bool isRadio = (widgetType == MOZ_GTK_RADIOMENUITEM); - WidgetNodeType indicatorType = isRadio ? MOZ_GTK_RADIOMENUITEM_INDICATOR - : MOZ_GTK_CHECKMENUITEM_INDICATOR; -- style = ClaimStyleContext(indicatorType, direction, state_flags); -+ style = GetStyleContext(indicatorType, direction, state_flags); - - if (direction == GTK_TEXT_DIR_RTL) { - x = rect->width - indicator_size - offset; -@@ -1987,7 +1930,6 @@ moz_gtk_check_menu_item_paint(WidgetNodeType widgetType, - } else { - gtk_render_check(style, cr, x, y, indicator_size, indicator_size); - } -- ReleaseStyleContext(style); - - return MOZ_GTK_SUCCESS; - } -@@ -1997,12 +1939,11 @@ moz_gtk_info_bar_paint(cairo_t *cr, GdkRectangle* rect, - GtkWidgetState* state) - { - GtkStyleContext *style = -- ClaimStyleContext(MOZ_GTK_INFO_BAR, GTK_TEXT_DIR_LTR, -- GetStateFlagsFromGtkWidgetState(state)); -+ GetStyleContext(MOZ_GTK_INFO_BAR, GTK_TEXT_DIR_LTR, -+ GetStateFlagsFromGtkWidgetState(state)); - 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); -- ReleaseStyleContext(style); - - return MOZ_GTK_SUCCESS; - } -@@ -2087,7 +2028,7 @@ moz_gtk_get_widget_border(WidgetNodeType widget, gint* left, gint* top, - case MOZ_GTK_BUTTON: - case MOZ_GTK_TOOLBAR_BUTTON: - { -- style = ClaimStyleContext(MOZ_GTK_BUTTON); -+ style = GetStyleContext(MOZ_GTK_BUTTON); - - *left = *top = *right = *bottom = - gtk_container_get_border_width(GTK_CONTAINER(GetWidget(MOZ_GTK_BUTTON))); -@@ -2104,12 +2045,11 @@ moz_gtk_get_widget_border(WidgetNodeType widget, gint* left, gint* top, - - moz_gtk_add_style_border(style, left, top, right, bottom); - -- ReleaseStyleContext(style); - return MOZ_GTK_SUCCESS; - } - case MOZ_GTK_ENTRY: - { -- style = ClaimStyleContext(MOZ_GTK_ENTRY); -+ style = GetStyleContext(MOZ_GTK_ENTRY); - - // XXX: Subtract 1 pixel from the padding to account for the default - // padding in forms.css. See bug 1187385. -@@ -2117,15 +2057,13 @@ moz_gtk_get_widget_border(WidgetNodeType widget, gint* left, gint* top, - moz_gtk_add_style_padding(style, left, top, right, bottom); - moz_gtk_add_style_border(style, left, top, right, bottom); - -- ReleaseStyleContext(style); - return MOZ_GTK_SUCCESS; - } - case MOZ_GTK_TEXT_VIEW: - case MOZ_GTK_TREEVIEW: - { -- style = ClaimStyleContext(MOZ_GTK_SCROLLED_WINDOW); -+ style = GetStyleContext(MOZ_GTK_SCROLLED_WINDOW); - moz_gtk_add_style_border(style, left, top, right, bottom); -- ReleaseStyleContext(style); - return MOZ_GTK_SUCCESS; - } - case MOZ_GTK_TREE_HEADER_CELL: -@@ -2139,10 +2077,9 @@ moz_gtk_get_widget_border(WidgetNodeType widget, gint* left, gint* top, - gtk_container_get_border_width(GTK_CONTAINER( - GetWidget(MOZ_GTK_TREE_HEADER_CELL))); - -- style = ClaimStyleContext(MOZ_GTK_TREE_HEADER_CELL); -+ style = GetStyleContext(MOZ_GTK_TREE_HEADER_CELL); - moz_gtk_add_style_border(style, left, top, right, bottom); - moz_gtk_add_style_padding(style, left, top, right, bottom); -- ReleaseStyleContext(style); - return MOZ_GTK_SUCCESS; - } - case MOZ_GTK_TREE_HEADER_SORTARROW: -@@ -2167,10 +2104,9 @@ moz_gtk_get_widget_border(WidgetNodeType widget, gint* left, gint* top, - *left = *top = *right = *bottom = - gtk_container_get_border_width(GTK_CONTAINER( - GetWidget(MOZ_GTK_COMBOBOX_BUTTON))); -- style = ClaimStyleContext(MOZ_GTK_COMBOBOX_BUTTON); -+ style = GetStyleContext(MOZ_GTK_COMBOBOX_BUTTON); - moz_gtk_add_style_padding(style, left, top, right, bottom); - moz_gtk_add_style_border(style, left, top, right, bottom); -- ReleaseStyleContext(style); - - /* If there is no separator, don't try to count its width. */ - separator_width = 0; -@@ -2241,7 +2177,7 @@ moz_gtk_get_widget_border(WidgetNodeType widget, gint* left, gint* top, - // Bug 1274143 for MOZ_GTK_MENUBARITEM - WidgetNodeType type = - widget == MOZ_GTK_MENUBARITEM ? MOZ_GTK_MENUITEM : widget; -- style = ClaimStyleContext(type); -+ style = GetStyleContext(type); - - if (gtk_get_minor_version() < 20) { - moz_gtk_add_style_padding(style, left, top, right, bottom); -@@ -2249,7 +2185,6 @@ moz_gtk_get_widget_border(WidgetNodeType widget, gint* left, gint* top, - moz_gtk_add_margin_border_padding(style, - left, top, right, bottom); - } -- ReleaseStyleContext(style); - return MOZ_GTK_SUCCESS; - } - case MOZ_GTK_INFO_BAR: -@@ -2265,15 +2200,13 @@ moz_gtk_get_widget_border(WidgetNodeType widget, gint* left, gint* top, - // We also need to add margin/padding/borders from Tooltip content. - // Tooltip contains horizontal box, where icon and label is put. - // We ignore icon as long as we don't have support for it. -- GtkStyleContext* boxStyle = ClaimStyleContext(MOZ_GTK_TOOLTIP_BOX); -+ GtkStyleContext* boxStyle = GetStyleContext(MOZ_GTK_TOOLTIP_BOX); - moz_gtk_add_margin_border_padding(boxStyle, - left, top, right, bottom); -- ReleaseStyleContext(boxStyle); - -- GtkStyleContext* labelStyle = ClaimStyleContext(MOZ_GTK_TOOLTIP_BOX_LABEL); -+ GtkStyleContext* labelStyle = GetStyleContext(MOZ_GTK_TOOLTIP_BOX_LABEL); - moz_gtk_add_margin_border_padding(labelStyle, - left, top, right, bottom); -- ReleaseStyleContext(labelStyle); - - return MOZ_GTK_SUCCESS; - } -@@ -2324,7 +2257,7 @@ moz_gtk_get_tab_border(gint* left, gint* top, gint* right, gint* bottom, - GtkTextDirection direction, GtkTabFlags flags, - WidgetNodeType widget) - { -- GtkStyleContext* style = ClaimStyleContext(widget, direction, -+ GtkStyleContext* style = GetStyleContext(widget, direction, - GetStateFlagsFromGtkTabFlags(flags)); - - *left = *top = *right = *bottom = 0; -@@ -2354,15 +2287,13 @@ moz_gtk_get_tab_border(gint* left, gint* top, gint* right, gint* bottom, - *right += margin.right; - - if (flags & MOZ_GTK_TAB_FIRST) { -- ReleaseStyleContext(style); -- style = ClaimStyleContext(MOZ_GTK_NOTEBOOK_HEADER, direction); -+ style = GetStyleContext(MOZ_GTK_NOTEBOOK_HEADER, direction); - gtk_style_context_get_margin(style, GTK_STATE_FLAG_NORMAL, &margin); - *left += margin.left; - *right += margin.right; - } - } - -- ReleaseStyleContext(style); - return MOZ_GTK_SUCCESS; - } - -@@ -2389,11 +2320,10 @@ moz_gtk_get_tab_scroll_arrow_size(gint* width, gint* height) - { - gint arrow_size; - -- GtkStyleContext *style = ClaimStyleContext(MOZ_GTK_TABPANELS); -+ GtkStyleContext *style = GetStyleContext(MOZ_GTK_TABPANELS); - gtk_style_context_get_style(style, - "scroll-arrow-hlength", &arrow_size, - NULL); -- ReleaseStyleContext(style); - - *height = *width = arrow_size; - -@@ -2426,7 +2356,7 @@ moz_gtk_get_toolbar_separator_width(gint* size) - gint separator_width; - GtkBorder border; - -- GtkStyleContext* style = ClaimStyleContext(MOZ_GTK_TOOLBAR); -+ GtkStyleContext* style = GetStyleContext(MOZ_GTK_TOOLBAR); - gtk_style_context_get_style(style, - "space-size", size, - "wide-separators", &wide_separators, -@@ -2435,27 +2365,24 @@ moz_gtk_get_toolbar_separator_width(gint* size) - /* Just in case... */ - gtk_style_context_get_border(style, GTK_STATE_FLAG_NORMAL, &border); - *size = MAX(*size, (wide_separators ? separator_width : border.left)); -- ReleaseStyleContext(style); - return MOZ_GTK_SUCCESS; - } - - gint - moz_gtk_get_expander_size(gint* size) - { -- GtkStyleContext* style = ClaimStyleContext(MOZ_GTK_EXPANDER); -+ GtkStyleContext* style = GetStyleContext(MOZ_GTK_EXPANDER); - gtk_style_context_get_style(style, - "expander-size", size, - NULL); -- ReleaseStyleContext(style); - return MOZ_GTK_SUCCESS; - } - - gint - moz_gtk_get_treeview_expander_size(gint* size) - { -- GtkStyleContext* style = ClaimStyleContext(MOZ_GTK_TREEVIEW); -+ GtkStyleContext* style = GetStyleContext(MOZ_GTK_TREEVIEW); - gtk_style_context_get_style(style, "expander-size", size, NULL); -- ReleaseStyleContext(style); - return MOZ_GTK_SUCCESS; - } - -@@ -2466,7 +2393,7 @@ moz_gtk_get_menu_separator_height(gint *size) - gboolean wide_separators; - gint separator_height; - GtkBorder padding; -- GtkStyleContext* style = ClaimStyleContext(MOZ_GTK_MENUSEPARATOR); -+ GtkStyleContext* style = GetStyleContext(MOZ_GTK_MENUSEPARATOR); - gtk_style_context_get_padding(style, GTK_STATE_FLAG_NORMAL, &padding); - - gtk_style_context_save(style); -@@ -2478,7 +2405,6 @@ moz_gtk_get_menu_separator_height(gint *size) - NULL); - - gtk_style_context_restore(style); -- ReleaseStyleContext(style); - - *size = padding.top + padding.bottom; - *size += (wide_separators) ? separator_height : 1; -@@ -2489,7 +2415,7 @@ moz_gtk_get_menu_separator_height(gint *size) - void - moz_gtk_get_entry_min_height(gint* height) - { -- GtkStyleContext* style = ClaimStyleContext(MOZ_GTK_ENTRY); -+ GtkStyleContext* style = GetStyleContext(MOZ_GTK_ENTRY); - if (!gtk_check_version(3, 20, 0)) { - gtk_style_context_get(style, gtk_style_context_get_state(style), - "min-height", height, -@@ -2504,7 +2430,6 @@ moz_gtk_get_entry_min_height(gint* height) - gtk_style_context_get_padding(style, GTK_STATE_FLAG_NORMAL, &padding); - - *height += (border.top + border.bottom + padding.top + padding.bottom); -- ReleaseStyleContext(style); - } - - void -@@ -2519,7 +2444,7 @@ moz_gtk_get_scale_metrics(GtkOrientation orient, gint* scale_width, - gint thumb_length, thumb_height, trough_border; - moz_gtk_get_scalethumb_metrics(orient, &thumb_length, &thumb_height); - -- GtkStyleContext* style = ClaimStyleContext(widget); -+ GtkStyleContext* style = GetStyleContext(widget); - gtk_style_context_get_style(style, "trough-border", &trough_border, NULL); - - if (orient == GTK_ORIENTATION_HORIZONTAL) { -@@ -2529,7 +2454,6 @@ moz_gtk_get_scale_metrics(GtkOrientation orient, gint* scale_width, - *scale_width = thumb_height + trough_border * 2; - *scale_height = thumb_length + trough_border * 2; - } -- ReleaseStyleContext(style); - } else { - WidgetNodeType widget = (orient == GTK_ORIENTATION_HORIZONTAL) ? - MOZ_GTK_SCALE_TROUGH_HORIZONTAL : -@@ -2546,17 +2470,16 @@ moz_gtk_get_scalethumb_metrics(GtkOrientation orient, gint* thumb_length, gint* - WidgetNodeType widget = (orient == GTK_ORIENTATION_HORIZONTAL) ? - MOZ_GTK_SCALE_HORIZONTAL: - MOZ_GTK_SCALE_VERTICAL; -- GtkStyleContext* style = ClaimStyleContext(widget); -+ GtkStyleContext* style = GetStyleContext(widget); - gtk_style_context_get_style(style, - "slider_length", thumb_length, - "slider_width", thumb_height, - NULL); -- ReleaseStyleContext(style); - } else { - WidgetNodeType widget = (orient == GTK_ORIENTATION_HORIZONTAL) ? - MOZ_GTK_SCALE_THUMB_HORIZONTAL: - MOZ_GTK_SCALE_THUMB_VERTICAL; -- GtkStyleContext* style = ClaimStyleContext(widget); -+ GtkStyleContext* style = GetStyleContext(widget); - - gint min_width, min_height; - GtkStateFlags state = gtk_style_context_get_state(style); -@@ -2578,8 +2501,6 @@ moz_gtk_get_scalethumb_metrics(GtkOrientation orient, gint* thumb_length, gint* - - *thumb_length = min_width; - *thumb_height = min_height; -- -- ReleaseStyleContext(style); - } - - return MOZ_GTK_SUCCESS; -@@ -2606,7 +2527,7 @@ GetScrollbarMetrics(GtkOrientation aOrientation) - MOZ_GTK_SCROLLBAR_HORIZONTAL : MOZ_GTK_SCROLLBAR_VERTICAL; - - gboolean backward, forward, secondary_backward, secondary_forward; -- GtkStyleContext* style = ClaimStyleContext(scrollbar); -+ GtkStyleContext* style = GetStyleContext(scrollbar); - gtk_style_context_get_style(style, - "has-backward-stepper", &backward, - "has-forward-stepper", &forward, -@@ -2626,7 +2547,6 @@ GetScrollbarMetrics(GtkOrientation aOrientation) - "stepper-size", &stepper_size, - "min-slider-length", &min_slider_size, - nullptr); -- ReleaseStyleContext(style); - - metrics->size.thumb = - SizeFromLengthAndBreadth(aOrientation, min_slider_size, slider_width); -@@ -2663,7 +2583,6 @@ GetScrollbarMetrics(GtkOrientation aOrientation) - // GTK version > 3.20 - // scrollbar - metrics->border.scrollbar = GetMarginBorderPadding(style); -- ReleaseStyleContext(style); - - WidgetNodeType contents, track, thumb; - if (aOrientation == GTK_ORIENTATION_HORIZONTAL) { -@@ -2678,10 +2597,9 @@ GetScrollbarMetrics(GtkOrientation aOrientation) - // thumb - metrics->size.thumb = GetMinMarginBox(thumb); - // track -- style = ClaimStyleContext(track); -+ style = GetStyleContext(track); - metrics->border.track = GetMarginBorderPadding(style); - MozGtkSize trackMinSize = GetMinContentBox(style) + metrics->border.track; -- ReleaseStyleContext(style); - MozGtkSize trackSizeForThumb = metrics->size.thumb + metrics->border.track; - // button - if (hasButtons) { -@@ -2719,9 +2637,8 @@ GetScrollbarMetrics(GtkOrientation aOrientation) - } - } - -- style = ClaimStyleContext(contents); -+ style = GetStyleContext(contents); - GtkBorder contentsBorder = GetMarginBorderPadding(style); -- ReleaseStyleContext(style); - - metrics->size.scrollbar = - trackSizeForThumb + contentsBorder + metrics->border.scrollbar; -@@ -2771,10 +2688,9 @@ moz_gtk_widget_paint(WidgetNodeType widget, cairo_t *cr, - case MOZ_GTK_SCROLLBAR_VERTICAL: - if (flags & MOZ_GTK_TRACK_OPAQUE) { - GtkStyleContext* style = -- ClaimStyleContext(MOZ_GTK_WINDOW, direction); -+ GetStyleContext(MOZ_GTK_WINDOW, direction); - gtk_render_background(style, cr, - rect->x, rect->y, rect->width, rect->height); -- ReleaseStyleContext(style); - } - if (gtk_check_version(3,20,0) == nullptr) { - return moz_gtk_scrollbar_paint(widget, cr, rect, state, direction); -@@ -2818,10 +2734,10 @@ moz_gtk_widget_paint(WidgetNodeType widget, cairo_t *cr, - break; - case MOZ_GTK_SPINBUTTON_ENTRY: - { -- GtkStyleContext* style = ClaimStyleContext(MOZ_GTK_SPINBUTTON_ENTRY, -- direction, GetStateFlagsFromGtkWidgetState(state)); -+ GtkStyleContext* style = -+ GetStyleContext(MOZ_GTK_SPINBUTTON_ENTRY, direction, -+ GetStateFlagsFromGtkWidgetState(state)); - gint ret = moz_gtk_entry_paint(cr, rect, state, style); -- ReleaseStyleContext(style); - return ret; - } - break; -@@ -2849,10 +2765,10 @@ moz_gtk_widget_paint(WidgetNodeType widget, cairo_t *cr, - break; - case MOZ_GTK_ENTRY: - { -- GtkStyleContext* style = ClaimStyleContext(MOZ_GTK_ENTRY, -- direction, GetStateFlagsFromGtkWidgetState(state)); -+ GtkStyleContext* style = -+ GetStyleContext(MOZ_GTK_ENTRY, direction, -+ GetStateFlagsFromGtkWidgetState(state)); - gint ret = moz_gtk_entry_paint(cr, rect, state, style); -- ReleaseStyleContext(style); - return ret; - } - case MOZ_GTK_TEXT_VIEW: -@@ -2867,10 +2783,10 @@ moz_gtk_widget_paint(WidgetNodeType widget, cairo_t *cr, - break; - case MOZ_GTK_DROPDOWN_ENTRY: - { -- GtkStyleContext* style = ClaimStyleContext(MOZ_GTK_COMBOBOX_ENTRY_TEXTAREA, -- direction, GetStateFlagsFromGtkWidgetState(state)); -+ GtkStyleContext* style = -+ GetStyleContext(MOZ_GTK_COMBOBOX_ENTRY_TEXTAREA, direction, -+ GetStateFlagsFromGtkWidgetState(state)); - gint ret = moz_gtk_entry_paint(cr, rect, state, style); -- ReleaseStyleContext(style); - return ret; - } - break; -diff --git widget/gtk/nsLookAndFeel.cpp widget/gtk/nsLookAndFeel.cpp -index f4c35d82200a..9a2684412ee8 100644 ---- widget/gtk/nsLookAndFeel.cpp -+++ widget/gtk/nsLookAndFeel.cpp -@@ -300,21 +300,19 @@ nsLookAndFeel::NativeGetColor(ColorID aID, nscolor& aColor) - // css2 http://www.w3.org/TR/REC-CSS2/ui.html#system-colors - case eColorID_activeborder: { - // active window border -- GtkStyleContext *style = ClaimStyleContext(MOZ_GTK_WINDOW); -+ GtkStyleContext *style = GetStyleContext(MOZ_GTK_WINDOW); - gtk_style_context_get_border_color(style, - GTK_STATE_FLAG_NORMAL, &gdk_color); - aColor = GDK_RGBA_TO_NS_RGBA(gdk_color); -- ReleaseStyleContext(style); - break; - } - case eColorID_inactiveborder: { - // inactive window border -- GtkStyleContext *style = ClaimStyleContext(MOZ_GTK_WINDOW); -+ GtkStyleContext *style = GetStyleContext(MOZ_GTK_WINDOW); - gtk_style_context_get_border_color(style, - GTK_STATE_FLAG_INSENSITIVE, - &gdk_color); - aColor = GDK_RGBA_TO_NS_RGBA(gdk_color); -- ReleaseStyleContext(style); - break; - } - case eColorID_graytext: // disabled text in windows, menus, etc. -@@ -323,12 +321,11 @@ nsLookAndFeel::NativeGetColor(ColorID aID, nscolor& aColor) - break; - case eColorID_inactivecaption: { - // inactive window caption -- GtkStyleContext *style = ClaimStyleContext(MOZ_GTK_WINDOW); -+ GtkStyleContext *style = GetStyleContext(MOZ_GTK_WINDOW); - gtk_style_context_get_background_color(style, - GTK_STATE_FLAG_INSENSITIVE, - &gdk_color); - aColor = GDK_RGBA_TO_NS_RGBA(gdk_color); -- ReleaseStyleContext(style); - break; - } - case eColorID_infobackground: -@@ -394,20 +391,18 @@ nsLookAndFeel::NativeGetColor(ColorID aID, nscolor& aColor) - break; - case eColorID__moz_buttondefault: { - // default button border color -- GtkStyleContext *style = ClaimStyleContext(MOZ_GTK_BUTTON); -+ GtkStyleContext *style = GetStyleContext(MOZ_GTK_BUTTON); - gtk_style_context_get_border_color(style, - GTK_STATE_FLAG_NORMAL, &gdk_color); - aColor = GDK_RGBA_TO_NS_RGBA(gdk_color); -- ReleaseStyleContext(style); - break; - } - case eColorID__moz_buttonhoverface: { -- GtkStyleContext *style = ClaimStyleContext(MOZ_GTK_BUTTON); -+ GtkStyleContext *style = GetStyleContext(MOZ_GTK_BUTTON); - gtk_style_context_get_background_color(style, - GTK_STATE_FLAG_PRELIGHT, - &gdk_color); - aColor = GDK_RGBA_TO_NS_RGBA(gdk_color); -- ReleaseStyleContext(style); - break; - } - case eColorID__moz_buttonhovertext: -@@ -858,38 +853,33 @@ nsLookAndFeel::EnsureInit() - g_object_ref_sink(labelWidget); - - // Scrollbar colors -- style = ClaimStyleContext(MOZ_GTK_SCROLLBAR_TROUGH_VERTICAL); -+ style = GetStyleContext(MOZ_GTK_SCROLLBAR_TROUGH_VERTICAL); - gtk_style_context_get_background_color(style, GTK_STATE_FLAG_NORMAL, &color); - sMozScrollbar = GDK_RGBA_TO_NS_RGBA(color); -- ReleaseStyleContext(style); - - // Window colors -- style = ClaimStyleContext(MOZ_GTK_WINDOW); -+ style = GetStyleContext(MOZ_GTK_WINDOW); - gtk_style_context_get_background_color(style, GTK_STATE_FLAG_NORMAL, &color); - sMozWindowBackground = GDK_RGBA_TO_NS_RGBA(color); - gtk_style_context_get_color(style, GTK_STATE_FLAG_NORMAL, &color); - sMozWindowText = GDK_RGBA_TO_NS_RGBA(color); -- ReleaseStyleContext(style); -- style = ClaimStyleContext(MOZ_GTK_WINDOW_CONTAINER); -+ style = GetStyleContext(MOZ_GTK_WINDOW_CONTAINER); - { - GtkStyleContext* labelStyle = CreateStyleForWidget(labelWidget, style); - GetSystemFontInfo(labelStyle, &mDefaultFontName, &mDefaultFontStyle); - g_object_unref(labelStyle); - } -- ReleaseStyleContext(style); - - // tooltip foreground and background -- style = ClaimStyleContext(MOZ_GTK_TOOLTIP); -+ style = GetStyleContext(MOZ_GTK_TOOLTIP); - gtk_style_context_get_background_color(style, GTK_STATE_FLAG_NORMAL, &color); - sInfoBackground = GDK_RGBA_TO_NS_RGBA(color); -- ReleaseStyleContext(style); - -- style = ClaimStyleContext(MOZ_GTK_TOOLTIP_BOX_LABEL); -+ style = GetStyleContext(MOZ_GTK_TOOLTIP_BOX_LABEL); - gtk_style_context_get_color(style, GTK_STATE_FLAG_NORMAL, &color); - sInfoText = GDK_RGBA_TO_NS_RGBA(color); -- ReleaseStyleContext(style); - -- style = ClaimStyleContext(MOZ_GTK_MENUITEM); -+ style = GetStyleContext(MOZ_GTK_MENUITEM); - { - GtkStyleContext* accelStyle = - CreateStyleForWidget(gtk_accel_label_new("M"), style); -@@ -902,19 +892,16 @@ nsLookAndFeel::EnsureInit() - sMenuTextInactive = GDK_RGBA_TO_NS_RGBA(color); - g_object_unref(accelStyle); - } -- ReleaseStyleContext(style); - -- style = ClaimStyleContext(MOZ_GTK_MENUPOPUP); -+ style = GetStyleContext(MOZ_GTK_MENUPOPUP); - gtk_style_context_get_background_color(style, GTK_STATE_FLAG_NORMAL, &color); - sMenuBackground = GDK_RGBA_TO_NS_RGBA(color); -- ReleaseStyleContext(style); - -- style = ClaimStyleContext(MOZ_GTK_MENUITEM); -+ style = GetStyleContext(MOZ_GTK_MENUITEM); - gtk_style_context_get_background_color(style, GTK_STATE_FLAG_PRELIGHT, &color); - sMenuHover = GDK_RGBA_TO_NS_RGBA(color); - gtk_style_context_get_color(style, GTK_STATE_FLAG_PRELIGHT, &color); - sMenuHoverText = GDK_RGBA_TO_NS_RGBA(color); -- ReleaseStyleContext(style); - - GtkWidget *parent = gtk_fixed_new(); - GtkWidget *window = gtk_window_new(GTK_WINDOW_POPUP); -@@ -937,12 +924,11 @@ nsLookAndFeel::EnsureInit() - GdkRGBA bgColor; - // If the text window background is translucent, then the background of - // the textview root node is visible. -- style = ClaimStyleContext(MOZ_GTK_TEXT_VIEW); -+ style = GetStyleContext(MOZ_GTK_TEXT_VIEW); - gtk_style_context_get_background_color(style, GTK_STATE_FLAG_NORMAL, - &bgColor); -- ReleaseStyleContext(style); - -- style = ClaimStyleContext(MOZ_GTK_TEXT_VIEW_TEXT); -+ style = GetStyleContext(MOZ_GTK_TEXT_VIEW_TEXT); - gtk_style_context_get_background_color(style, GTK_STATE_FLAG_NORMAL, - &color); - ApplyColorOver(color, &bgColor); -@@ -959,10 +945,9 @@ nsLookAndFeel::EnsureInit() - static_cast(GTK_STATE_FLAG_FOCUSED|GTK_STATE_FLAG_SELECTED), - &color); - sTextSelectedText = GDK_RGBA_TO_NS_RGBA(color); -- ReleaseStyleContext(style); - - // Button text color -- style = ClaimStyleContext(MOZ_GTK_BUTTON); -+ style = GetStyleContext(MOZ_GTK_BUTTON); - { - GtkStyleContext* labelStyle = CreateStyleForWidget(labelWidget, style); - -@@ -974,21 +959,18 @@ nsLookAndFeel::EnsureInit() - sButtonHoverText = GDK_RGBA_TO_NS_RGBA(color); - g_object_unref(labelStyle); - } -- ReleaseStyleContext(style); - - // Combobox text color -- style = ClaimStyleContext(MOZ_GTK_COMBOBOX_ENTRY_TEXTAREA); -+ style = GetStyleContext(MOZ_GTK_COMBOBOX_ENTRY_TEXTAREA); - gtk_style_context_get_color(style, GTK_STATE_FLAG_NORMAL, &color); - sComboBoxText = GDK_RGBA_TO_NS_RGBA(color); -- ReleaseStyleContext(style); - - // Menubar text and hover text colors -- style = ClaimStyleContext(MOZ_GTK_MENUBARITEM); -+ style = GetStyleContext(MOZ_GTK_MENUBARITEM); - gtk_style_context_get_color(style, GTK_STATE_FLAG_NORMAL, &color); - sMenuBarText = GDK_RGBA_TO_NS_RGBA(color); - gtk_style_context_get_color(style, GTK_STATE_FLAG_PRELIGHT, &color); - sMenuBarHoverText = GDK_RGBA_TO_NS_RGBA(color); -- ReleaseStyleContext(style); - - // GTK's guide to fancy odd row background colors: - // 1) Check if a theme explicitly defines an odd row color -@@ -996,7 +978,7 @@ nsLookAndFeel::EnsureInit() - // slightly by a hardcoded value (gtkstyle.c) - // 3) If neither are defined, take the base background color and - // darken that by a hardcoded value -- style = ClaimStyleContext(MOZ_GTK_TREEVIEW); -+ style = GetStyleContext(MOZ_GTK_TREEVIEW); - - // Get odd row background color - gtk_style_context_save(style); -@@ -1004,20 +986,17 @@ nsLookAndFeel::EnsureInit() - gtk_style_context_get_background_color(style, GTK_STATE_FLAG_NORMAL, &color); - sOddCellBackground = GDK_RGBA_TO_NS_RGBA(color); - gtk_style_context_restore(style); -- ReleaseStyleContext(style); - - // GtkFrame has a "border" subnode on which Adwaita draws the border. - // Some themes do not draw on this node but draw a border on the widget - // root node, so check the root node if no border is found on the border - // node. -- style = ClaimStyleContext(MOZ_GTK_FRAME_BORDER); -+ style = GetStyleContext(MOZ_GTK_FRAME_BORDER); - bool themeUsesColors = - GetBorderColors(style, &sFrameOuterLightBorder, &sFrameInnerDarkBorder); -- ReleaseStyleContext(style); - if (!themeUsesColors) { -- style = ClaimStyleContext(MOZ_GTK_FRAME); -+ style = GetStyleContext(MOZ_GTK_FRAME); - GetBorderColors(style, &sFrameOuterLightBorder, &sFrameInnerDarkBorder); -- ReleaseStyleContext(style); - } - - // GtkInfoBar diff --git a/www/waterfox/files/patch-bug1397114 b/www/waterfox/files/patch-bug1397114 deleted file mode 100644 index fe12dce4f53..00000000000 --- a/www/waterfox/files/patch-bug1397114 +++ /dev/null @@ -1,105 +0,0 @@ -commit 92b82f64e587 -Author: Scott Wu -Date: Wed Sep 20 16:45:03 2017 +0800 - - Bug 1397114 - Disable smooth scrolling when value changes come from input box. r=mconley, a=ritu - - MozReview-Commit-ID: 9ZLSB2HQvcu - - --HG-- - extra : source : f215f88437f1db1884858be2c78582ab2b11bbb0 ---- - toolkit/content/widgets/datepicker.js | 11 ++++++----- - toolkit/content/widgets/spinner.js | 16 ++-------------- - 2 files changed, 8 insertions(+), 19 deletions(-) - -diff --git toolkit/content/widgets/datepicker.js toolkit/content/widgets/datepicker.js -index 31651dc63665..b125c5103a9a 100644 ---- toolkit/content/widgets/datepicker.js -+++ toolkit/content/widgets/datepicker.js -@@ -133,7 +133,7 @@ function DatePicker(context) { - /** - * Update date picker and its components. - */ -- _update() { -+ _update(options = {}) { - const { dateKeeper, isMonthPickerVisible } = this.state; - - if (isMonthPickerVisible) { -@@ -148,7 +148,8 @@ function DatePicker(context) { - dateObj: dateKeeper.state.dateObj, - months: this.state.months, - years: this.state.years, -- toggleMonthPicker: this.state.toggleMonthPicker -+ toggleMonthPicker: this.state.toggleMonthPicker, -+ noSmoothScroll: options.noSmoothScroll - }); - this.components.calendar.setProps({ - isVisible: !isMonthPickerVisible, -@@ -269,7 +270,7 @@ function DatePicker(context) { - dateKeeper.setSelection({ - year, month, day - }); -- this._update(); -+ this._update({ noSmoothScroll: true }); - } - }; - -@@ -350,14 +351,14 @@ function DatePicker(context) { - items: props.months, - isInfiniteScroll: true, - isValueSet: this.state.isMonthSet, -- smoothScroll: !this.state.firstOpened -+ smoothScroll: !(this.state.firstOpened || props.noSmoothScroll) - }); - this.components.year.setState({ - value: props.dateObj.getUTCFullYear(), - items: props.years, - isInfiniteScroll: false, - isValueSet: this.state.isYearSet, -- smoothScroll: !this.state.firstOpened -+ smoothScroll: !(this.state.firstOpened || props.noSmoothScroll) - }); - this.state.firstOpened = false; - } else { -diff --git toolkit/content/widgets/spinner.js toolkit/content/widgets/spinner.js -index 101cb01658a0..0a30766f8d13 100644 ---- toolkit/content/widgets/spinner.js -+++ toolkit/content/widgets/spinner.js -@@ -124,8 +124,6 @@ function Spinner(props, context) { - /** - * Whenever scroll event is detected: - * - Update the index state -- * - If a smooth scroll has reached its destination, set [isScrolling] state -- * to false - * - If the value has changed, update the [value] state and call [setValue] - * - If infinite scrolling is on, reset the scrolling position if necessary - */ -@@ -138,14 +136,8 @@ function Spinner(props, context) { - - const value = itemsView[this.state.index + viewportTopOffset].value; - -- // Check if smooth scrolling has reached its destination. -- // This prevents input box jump when input box changes values. -- if (this.state.value == value && this.state.isScrolling) { -- this.state.isScrolling = false; -- } -- -- // Call setValue if value has changed, and is not smooth scrolling -- if (this.state.value != value && !this.state.isScrolling) { -+ // Call setValue if value has changed -+ if (this.state.value != value) { - this.state.value = value; - this.props.setValue(value); - } -@@ -444,10 +436,6 @@ function Spinner(props, context) { - _smoothScrollToIndex(index) { - const element = this.elements.spinner.children[index]; - if (element) { -- // Set the isScrolling flag before smooth scrolling begins -- // and remove it when it has reached the destination. -- // This prevents input box jump when input box changes values -- this.state.isScrolling = true; - element.scrollIntoView({ - behavior: "smooth", block: "start" - }); diff --git a/www/waterfox/files/patch-bug1397671 b/www/waterfox/files/patch-bug1397671 deleted file mode 100644 index 567fd3f3481..00000000000 --- a/www/waterfox/files/patch-bug1397671 +++ /dev/null @@ -1,105 +0,0 @@ -commit 553df1231272 -Author: Matt Woodrow -Date: Tue Sep 26 15:57:56 2017 +1300 - - Bug 1397671 - Don't treat SVG transformed frames as being transformed for the purposes of computing Combines3DTransformWithAncestors. r=dbaron, a=sledru - - --HG-- - extra : source : 70b150570407df427bed31965fe29cf8736beab6 ---- - layout/generic/nsFrame.cpp | 11 +++++++++-- - layout/generic/nsIFrame.h | 6 ++++++ - layout/reftests/transform-3d/preserve3d-8-ref.html | 11 +++++++++++ - layout/reftests/transform-3d/preserve3d-8.html | 17 +++++++++++++++++ - 4 files changed, 43 insertions(+), 2 deletions(-) - -diff --git layout/generic/nsFrame.cpp layout/generic/nsFrame.cpp -index 6e6f2bfa5379..02d1dafec21e 100644 ---- layout/generic/nsFrame.cpp -+++ layout/generic/nsFrame.cpp -@@ -1326,11 +1326,18 @@ nsIFrame::GetMarginRectRelativeToSelf() const - bool - nsIFrame::IsTransformed(const nsStyleDisplay* aStyleDisplay, - EffectSet* aEffectSet) const -+{ -+ return IsCSSTransformed(aStyleDisplay, aEffectSet) || -+ IsSVGTransformed(); -+} -+ -+bool -+nsIFrame::IsCSSTransformed(const nsStyleDisplay* aStyleDisplay, -+ EffectSet* aEffectSet) const - { - MOZ_ASSERT(aStyleDisplay == StyleDisplay()); - return ((mState & NS_FRAME_MAY_BE_TRANSFORMED) && - (aStyleDisplay->HasTransform(this) || -- IsSVGTransformed() || - HasAnimationOfTransform(aEffectSet))); - } - -@@ -1402,7 +1409,7 @@ nsIFrame::Combines3DTransformWithAncestors(const nsStyleDisplay* aStyleDisplay, - if (!parent || !parent->Extend3DContext()) { - return false; - } -- return IsTransformed(aStyleDisplay,aEffectSet) || -+ return IsCSSTransformed(aStyleDisplay, aEffectSet) || - BackfaceIsHidden(aStyleDisplay); - } - -diff --git layout/generic/nsIFrame.h layout/generic/nsIFrame.h -index e8fb4c71a16f..b3ca08370d34 100644 ---- layout/generic/nsIFrame.h -+++ layout/generic/nsIFrame.h -@@ -1724,6 +1724,12 @@ public: - return IsTransformed(StyleDisplay(), aEffectSet); - } - -+ /** -+ * Same as IsTransformed, except that it doesn't take SVG transforms -+ * into account. -+ */ -+ bool IsCSSTransformed(const nsStyleDisplay* aStyleDisplay, mozilla::EffectSet* aEffectSet = nullptr) const; -+ - /** - * True if this frame has any animation of transform in effect. - * -diff --git layout/reftests/transform-3d/preserve3d-8-ref.html layout/reftests/transform-3d/preserve3d-8-ref.html -new file mode 100644 -index 000000000000..afddf05d4d81 ---- /dev/null -+++ layout/reftests/transform-3d/preserve3d-8-ref.html -@@ -0,0 +1,11 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git layout/reftests/transform-3d/preserve3d-8.html layout/reftests/transform-3d/preserve3d-8.html -new file mode 100644 -index 000000000000..76e9c10c33bc ---- /dev/null -+++ layout/reftests/transform-3d/preserve3d-8.html -@@ -0,0 +1,17 @@ -+ -+ -+ -+ -+
-+
-+
-+ -+ -+ -+ -+ -+
-+
-+
-+ -+ diff --git a/www/waterfox/files/patch-bug1397686 b/www/waterfox/files/patch-bug1397686 deleted file mode 100644 index 3f1687062af..00000000000 --- a/www/waterfox/files/patch-bug1397686 +++ /dev/null @@ -1,69 +0,0 @@ -commit 21d6d91c77f1 -Author: Dragana Damjanovic -Date: Fri Sep 22 09:09:57 2017 +0200 - - Bug 1397686 - The streams that cannot do 0RTT data need to be put in list and added to mReadyForWrite when 0RTT is done. r=hurley, a=sledru - - --HG-- - extra : source : 5cf7391a9825fda34241f6d7974940f8460804fd ---- - netwerk/protocol/http/Http2Session.cpp | 15 +++++++++++++++ - netwerk/protocol/http/Http2Session.h | 3 +++ - 2 files changed, 18 insertions(+) - -diff --git netwerk/protocol/http/Http2Session.cpp netwerk/protocol/http/Http2Session.cpp -index 42dd829dc73d..c652189a0e16 100644 ---- netwerk/protocol/http/Http2Session.cpp -+++ netwerk/protocol/http/Http2Session.cpp -@@ -2769,6 +2769,9 @@ Http2Session::ReadSegmentsAgain(nsAHttpSegmentReader *reader, - this, stream, stream->StreamID())); - FlushOutputQueue(); - SetWriteCallbacks(); -+ if (!mCannotDo0RTTStreams.Contains(stream)) { -+ mCannotDo0RTTStreams.AppendElement(stream); -+ } - // We can still send our preamble - *countRead = mOutputQueueUsed - mOutputQueueSent; - return *countRead ? NS_OK : NS_BASE_STREAM_WOULD_BLOCK; -@@ -3393,15 +3396,27 @@ Http2Session::Finish0RTT(bool aRestart, bool aAlpnChanged) - // This is the easy case - early data failed, but we're speaking h2, so - // we just need to rewind to the beginning of the preamble and try again. - mOutputQueueSent = 0; -+ -+ for (size_t i = 0; i < mCannotDo0RTTStreams.Length(); ++i) { -+ if (mCannotDo0RTTStreams[i] && VerifyStream(mCannotDo0RTTStreams[i])) { -+ TransactionHasDataToWrite(mCannotDo0RTTStreams[i]); -+ } -+ } - } - } else { - // 0RTT succeeded -+ for (size_t i = 0; i < mCannotDo0RTTStreams.Length(); ++i) { -+ if (mCannotDo0RTTStreams[i] && VerifyStream(mCannotDo0RTTStreams[i])) { -+ TransactionHasDataToWrite(mCannotDo0RTTStreams[i]); -+ } -+ } - // Make sure we look for any incoming data in repsonse to our early data. - Unused << ResumeRecv(); - } - - mAttemptingEarlyData = false; - m0RTTStreams.Clear(); -+ mCannotDo0RTTStreams.Clear(); - RealignOutputQueue(); - - return NS_OK; -diff --git netwerk/protocol/http/Http2Session.h netwerk/protocol/http/Http2Session.h -index 87c4e8b9fcb9..4fdc175ab166 100644 ---- netwerk/protocol/http/Http2Session.h -+++ netwerk/protocol/http/Http2Session.h -@@ -529,6 +529,9 @@ private: - bool mAttemptingEarlyData; - // The ID(s) of the stream(s) that we are getting 0RTT data from. - nsTArray> m0RTTStreams; -+ // The ID(s) of the stream(s) that are not able to send 0RTT data. We need to -+ // remember them put them into mReadyForWrite queue when 0RTT finishes. -+ nsTArray> mCannotDo0RTTStreams; - - bool RealJoinConnection(const nsACString &hostname, int32_t port, bool jk); - bool TestOriginFrame(const nsACString &name, int32_t port); diff --git a/www/waterfox/files/patch-bug1397795 b/www/waterfox/files/patch-bug1397795 deleted file mode 100644 index 61b6e2c8297..00000000000 --- a/www/waterfox/files/patch-bug1397795 +++ /dev/null @@ -1,61 +0,0 @@ -commit fc56d498fd83 -Author: Jonathan Watt -Date: Fri Feb 23 10:40:12 2018 +0000 - - Bug 1397795 - Fix stack overflow crash due to box-shadow. r=mstange, a=jcristau - - GetBoxShadowRectForFrame is called while we're calculating the visual - overflow bounds for a frame. So it is not valid for it to use the frame's - "current" visual overflow rect (which may be uninitialized or stale). - - MozReview-Commit-ID: J52dxIMrMg5 - - --HG-- - extra : source : d7c420c8dc2a6b28500eae0e35cd9f17a22908ec ---- - layout/base/nsLayoutUtils.cpp | 22 +++++++++++++--------- - 1 file changed, 13 insertions(+), 9 deletions(-) - -diff --git layout/base/nsLayoutUtils.cpp layout/base/nsLayoutUtils.cpp -index 53c43f6b3546..f85273fbf232 100644 ---- layout/base/nsLayoutUtils.cpp -+++ layout/base/nsLayoutUtils.cpp -@@ -8747,25 +8747,29 @@ nsLayoutUtils::GetBoxShadowRectForFrame(nsIFrame* aFrame, - return nsRect(); - } - -- bool nativeTheme; -+ nsRect inputRect(nsPoint(0, 0), aFrameSize); -+ -+ // According to the CSS spec, box-shadow should be based on the border box. -+ // However, that looks broken when the background extends outside the border -+ // box, as can be the case with native theming. To fix that we expand the -+ // area that we shadow to include the bounds of any native theme drawing. - const nsStyleDisplay* styleDisplay = aFrame->StyleDisplay(); - nsITheme::Transparency transparency; - if (aFrame->IsThemed(styleDisplay, &transparency)) { - // For opaque (rectangular) theme widgets we can take the generic - // border-box path with border-radius disabled. -- nativeTheme = transparency != nsITheme::eOpaque; -- } else { -- nativeTheme = false; -+ if (transparency != nsITheme::eOpaque) { -+ nsPresContext *presContext = aFrame->PresContext(); -+ presContext->GetTheme()-> -+ GetWidgetOverflow(presContext->DeviceContext(), aFrame, -+ styleDisplay->mAppearance, &inputRect); -+ } - } - -- nsRect frameRect = nativeTheme ? -- aFrame->GetVisualOverflowRectRelativeToSelf() : -- nsRect(nsPoint(0, 0), aFrameSize); -- - nsRect shadows; - int32_t A2D = aFrame->PresContext()->AppUnitsPerDevPixel(); - for (uint32_t i = 0; i < boxShadows->Length(); ++i) { -- nsRect tmpRect = frameRect; -+ nsRect tmpRect = inputRect; - nsCSSShadowItem* shadow = boxShadows->ShadowAt(i); - - // inset shadows are never painted outside the frame diff --git a/www/waterfox/files/patch-bug1397989 b/www/waterfox/files/patch-bug1397989 deleted file mode 100644 index 8cbd6360654..00000000000 --- a/www/waterfox/files/patch-bug1397989 +++ /dev/null @@ -1,42 +0,0 @@ -commit f7c4ef799832 -Author: Mike de Boer -Date: Tue Oct 10 19:14:01 2017 +0200 - - Bug 1397989 - Make sure to only set non-empty values as the content-type of a document in the remote browser binding. r=mconley, a=ritu - - What happens is the following: - - browser-child.js sends a statechange up to RemoteWebProgress.jsm that contains - a `documentContentType` value of `null`, along with `requestURI` and `originalRequestURI` - _after_ other state changes that did send a valid content-type. - - The content-type is used by the WebProgressListener in browser.js to toggle the - disabled state of the 'isImage' broadcaster. - - The 'isImage' broadcaster is used by the 'cmd_find' and 'cmd_findAgain' commands to - determine whether they should be enabled. In this case: not. - The fix here is to _not_ set the documentContentType in the browser binding when - it's `null`. - - MozReview-Commit-ID: IELoCrnOH0j - - --HG-- - extra : source : 4c86b1f93b8482ea3097a4edb51bb8c0e8dc67fc ---- - toolkit/modules/RemoteWebProgress.jsm | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -diff --git toolkit/modules/RemoteWebProgress.jsm toolkit/modules/RemoteWebProgress.jsm -index 04eb37d580f5..05e3dabda941 100644 ---- toolkit/modules/RemoteWebProgress.jsm -+++ toolkit/modules/RemoteWebProgress.jsm -@@ -222,7 +222,11 @@ RemoteWebProgressManager.prototype = { - - if (isTopLevel) { - this._browser._contentWindow = objects.contentWindow; -- this._browser._documentContentType = json.documentContentType; -+ // Setting a content-type back to `null` is quite nonsensical for the -+ // frontend, especially since we're not expecting it. -+ if (json.documentContentType !== null) { -+ this._browser._documentContentType = json.documentContentType; -+ } - if (typeof json.inLoadURI != "undefined") { - this._browser.inLoadURI = json.inLoadURI; - } diff --git a/www/waterfox/files/patch-bug1398021 b/www/waterfox/files/patch-bug1398021 deleted file mode 100644 index 0f31bc6df55..00000000000 --- a/www/waterfox/files/patch-bug1398021 +++ /dev/null @@ -1,2737 +0,0 @@ -commit 909ebdebd850 -Author: Ryan VanderMeulen -Date: Tue Sep 12 09:00:37 2017 -0400 - - Bug 1398021 - Update lz4 to version 1.8.0. r=froydnj ---- - mfbt/Compression.cpp | 7 +- - mfbt/lz4.c | 1593 ++++++++++++++++++++++++++++++-------------------- - mfbt/lz4.h | 531 +++++++++++------ - 3 files changed, 1319 insertions(+), 812 deletions(-) - -diff --git mfbt/Compression.cpp mfbt/Compression.cpp -index 3f5fff53c425..ed0bb4ef72c7 100644 ---- mfbt/Compression.cpp -+++ mfbt/Compression.cpp -@@ -36,7 +36,8 @@ LZ4::compress(const char* aSource, size_t aInputSize, char* aDest) - { - CheckedInt inputSizeChecked = aInputSize; - MOZ_ASSERT(inputSizeChecked.isValid()); -- return LZ4_compress(aSource, aDest, inputSizeChecked.value()); -+ return LZ4_compress_default(aSource, aDest, inputSizeChecked.value(), -+ LZ4_compressBound(inputSizeChecked.value())); - } - - size_t -@@ -47,8 +48,8 @@ LZ4::compressLimitedOutput(const char* aSource, size_t aInputSize, char* aDest, - MOZ_ASSERT(inputSizeChecked.isValid()); - CheckedInt maxOutputSizeChecked = aMaxOutputSize; - MOZ_ASSERT(maxOutputSizeChecked.isValid()); -- return LZ4_compress_limitedOutput(aSource, aDest, inputSizeChecked.value(), -- maxOutputSizeChecked.value()); -+ return LZ4_compress_default(aSource, aDest, inputSizeChecked.value(), -+ maxOutputSizeChecked.value()); - } - - bool -diff --git mfbt/lz4.c mfbt/lz4.c -index c416fe815a42..5752b4d17b0e 100644 ---- mfbt/lz4.c -+++ mfbt/lz4.c -@@ -1,6 +1,7 @@ - /* - LZ4 - Fast LZ compression algorithm -- Copyright (C) 2011-2014, Yann Collet. -+ Copyright (C) 2011-2017, Yann Collet. -+ - BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php) - - Redistribution and use in source and binary forms, with or without -@@ -27,118 +28,96 @@ - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - You can contact the author at : -- - LZ4 source repository : http://code.google.com/p/lz4/ -- - LZ4 public forum : https://groups.google.com/forum/#!forum/lz4c -+ - LZ4 homepage : http://www.lz4.org -+ - LZ4 source repository : https://github.com/lz4/lz4 - */ - --/************************************** -- Tuning parameters -+ -+/*-************************************ -+* Tuning parameters - **************************************/ - /* -- * HEAPMODE : -+ * LZ4_HEAPMODE : - * Select how default compression functions will allocate memory for their hash table, -- * in memory stack (0:default, fastest), or in memory heap (1:requires memory allocation (malloc)). -+ * in memory stack (0:default, fastest), or in memory heap (1:requires malloc()). - */ --#define HEAPMODE 0 -- -- --/************************************** -- CPU Feature Detection --**************************************/ --/* 32 or 64 bits ? */ --#if (defined(__x86_64__) || defined(_M_X64) || defined(_WIN64) \ -- || defined(__powerpc64__) || defined(__powerpc64le__) \ -- || defined(__ppc64__) || defined(__ppc64le__) \ -- || defined(__PPC64__) || defined(__PPC64LE__) \ -- || defined(__ia64) || defined(__itanium__) || defined(_M_IA64) \ -- || (defined(__mips64) && defined(_ABI64))) /* Detects 64 bits mode */ --# define LZ4_ARCH64 1 --#else --# define LZ4_ARCH64 0 -+#ifndef LZ4_HEAPMODE -+# define LZ4_HEAPMODE 0 - #endif - - /* -- * Little Endian or Big Endian ? -- * Overwrite the #define below if you know your architecture endianess -+ * ACCELERATION_DEFAULT : -+ * Select "acceleration" for LZ4_compress_fast() when parameter value <= 0 - */ --#include /* Apparently required to detect endianess */ --#if defined (__GLIBC__) --# include --# if (__BYTE_ORDER == __BIG_ENDIAN) --# define LZ4_BIG_ENDIAN 1 -+#define ACCELERATION_DEFAULT 1 -+ -+ -+/*-************************************ -+* CPU Feature Detection -+**************************************/ -+/* LZ4_FORCE_MEMORY_ACCESS -+ * By default, access to unaligned memory is controlled by `memcpy()`, which is safe and portable. -+ * Unfortunately, on some target/compiler combinations, the generated assembly is sub-optimal. -+ * The below switch allow to select different access method for improved performance. -+ * Method 0 (default) : use `memcpy()`. Safe and portable. -+ * Method 1 : `__packed` statement. It depends on compiler extension (ie, not portable). -+ * This method is safe if your compiler supports it, and *generally* as fast or faster than `memcpy`. -+ * Method 2 : direct access. This method is portable but violate C standard. -+ * It can generate buggy code on targets which assembly generation depends on alignment. -+ * But in some circumstances, it's the only known way to get the most performance (ie GCC + ARMv6) -+ * See https://fastcompression.blogspot.fr/2015/08/accessing-unaligned-memory.html for details. -+ * Prefer these methods in priority order (0 > 1 > 2) -+ */ -+#ifndef LZ4_FORCE_MEMORY_ACCESS /* can be defined externally */ -+# if defined(__GNUC__) && ( defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__) || defined(__ARM_ARCH_6T2__) ) -+# define LZ4_FORCE_MEMORY_ACCESS 2 -+# elif defined(__INTEL_COMPILER) || defined(__GNUC__) -+# define LZ4_FORCE_MEMORY_ACCESS 1 - # endif --#elif (defined(__BIG_ENDIAN__) || defined(__BIG_ENDIAN) || defined(_BIG_ENDIAN)) && !(defined(__LITTLE_ENDIAN__) || defined(__LITTLE_ENDIAN) || defined(_LITTLE_ENDIAN)) --# define LZ4_BIG_ENDIAN 1 --#elif defined(__sparc) || defined(__sparc__) \ -- || defined(__powerpc__) || defined(__ppc__) || defined(__PPC__) \ -- || defined(__hpux) || defined(__hppa) \ -- || defined(_MIPSEB) || defined(__s390__) --# define LZ4_BIG_ENDIAN 1 --#else --/* Little Endian assumed. PDP Endian and other very rare endian format are unsupported. */ - #endif - - /* -- * Unaligned memory access is automatically enabled for "common" CPU, such as x86. -- * For others CPU, such as ARM, the compiler may be more cautious, inserting unnecessary extra code to ensure aligned access property -- * If you know your target CPU supports unaligned memory access, you want to force this option manually to improve performance -+ * LZ4_FORCE_SW_BITCOUNT -+ * Define this parameter if your target system or compiler does not support hardware bit count - */ --#if defined(__ARM_FEATURE_UNALIGNED) --# define LZ4_FORCE_UNALIGNED_ACCESS 1 --#endif -- --/* Define this parameter if your target system or compiler does not support hardware bit count */ - #if defined(_MSC_VER) && defined(_WIN32_WCE) /* Visual Studio for Windows CE does not support Hardware bit count */ - # define LZ4_FORCE_SW_BITCOUNT - #endif - --/* -- * BIG_ENDIAN_NATIVE_BUT_INCOMPATIBLE : -- * This option may provide a small boost to performance for some big endian cpu, although probably modest. -- * You may set this option to 1 if data will remain within closed environment. -- * This option is useless on Little_Endian CPU (such as x86) -- */ - --/* #define BIG_ENDIAN_NATIVE_BUT_INCOMPATIBLE 1 */ -+/*-************************************ -+* Dependency -+**************************************/ -+#include "lz4.h" -+/* see also "memory routines" below */ - - --/************************************** -- Compiler Options -+/*-************************************ -+* Compiler Options - **************************************/ --#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 */ --/* "restrict" is a known keyword */ --#else --# define restrict /* Disable restrict */ --#endif -- - #ifdef _MSC_VER /* Visual Studio */ --# define FORCE_INLINE static __forceinline --# include /* For Visual 2005 */ --# if LZ4_ARCH64 /* 64-bits */ --# pragma intrinsic(_BitScanForward64) /* For Visual 2005 */ --# pragma intrinsic(_BitScanReverse64) /* For Visual 2005 */ --# else /* 32-bits */ --# pragma intrinsic(_BitScanForward) /* For Visual 2005 */ --# pragma intrinsic(_BitScanReverse) /* For Visual 2005 */ --# endif -+# include - # pragma warning(disable : 4127) /* disable: C4127: conditional expression is constant */ --#else --# ifdef __GNUC__ --# define FORCE_INLINE static inline __attribute__((always_inline)) --# else --# define FORCE_INLINE static inline --# endif --#endif -- --#ifdef _MSC_VER /* Visual Studio */ --# define lz4_bswap16(x) _byteswap_ushort(x) --#else --# define lz4_bswap16(x) ((unsigned short int) ((((x) >> 8) & 0xffu) | (((x) & 0xffu) << 8))) --#endif -- --#define GCC_VERSION (__GNUC__ * 100 + __GNUC_MINOR__) -+# pragma warning(disable : 4293) /* disable: C4293: too large shift (32-bits) */ -+#endif /* _MSC_VER */ - --#if (GCC_VERSION >= 302) || (__INTEL_COMPILER >= 800) || defined(__clang__) -+#ifndef FORCE_INLINE -+# ifdef _MSC_VER /* Visual Studio */ -+# define FORCE_INLINE static __forceinline -+# else -+# if defined (__cplusplus) || defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 */ -+# ifdef __GNUC__ -+# define FORCE_INLINE static inline __attribute__((always_inline)) -+# else -+# define FORCE_INLINE static inline -+# endif -+# else -+# define FORCE_INLINE static -+# endif /* __STDC_VERSION__ */ -+# endif /* _MSC_VER */ -+#endif /* FORCE_INLINE */ -+ -+#if (defined(__GNUC__) && (__GNUC__ >= 3)) || (defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 800)) || defined(__clang__) - # define expect(expr,value) (__builtin_expect ((expr),(value)) ) - #else - # define expect(expr,value) (expr) -@@ -148,8 +127,8 @@ - #define unlikely(expr) expect((expr) != 0, 0) - - --/************************************** -- Memory routines -+/*-************************************ -+* Memory routines - **************************************/ - #include /* malloc, calloc, free */ - #define ALLOCATOR(n,s) calloc(n,s) -@@ -158,84 +137,146 @@ - #define MEM_INIT memset - - --/************************************** -- Includes -+/*-************************************ -+* Basic Types - **************************************/ --#include "lz4.h" -- -- --/************************************** -- Basic Types --**************************************/ --#if defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 */ -+#if defined(__cplusplus) || (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 */) - # include - typedef uint8_t BYTE; - typedef uint16_t U16; - typedef uint32_t U32; - typedef int32_t S32; - typedef uint64_t U64; -+ typedef uintptr_t uptrval; - #else - typedef unsigned char BYTE; - typedef unsigned short U16; - typedef unsigned int U32; - typedef signed int S32; - typedef unsigned long long U64; -+ typedef size_t uptrval; /* generally true, except OpenVMS-64 */ - #endif - --#if defined(__GNUC__) && !defined(LZ4_FORCE_UNALIGNED_ACCESS) --# define _PACKED __attribute__ ((packed)) -+#if defined(__x86_64__) -+ typedef U64 reg_t; /* 64-bits in x32 mode */ - #else --# define _PACKED -+ typedef size_t reg_t; /* 32-bits in x32 mode */ - #endif - --#if !defined(LZ4_FORCE_UNALIGNED_ACCESS) && !defined(__GNUC__) --# if defined(__IBMC__) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) --# pragma pack(1) --# else --# pragma pack(push, 1) --# endif --#endif -+/*-************************************ -+* Reading and writing into memory -+**************************************/ -+static unsigned LZ4_isLittleEndian(void) -+{ -+ const union { U32 u; BYTE c[4]; } one = { 1 }; /* don't use static : performance detrimental */ -+ return one.c[0]; -+} - --typedef struct { U16 v; } _PACKED U16_S; --typedef struct { U32 v; } _PACKED U32_S; --typedef struct { U64 v; } _PACKED U64_S; --typedef struct {size_t v;} _PACKED size_t_S; - --#if !defined(LZ4_FORCE_UNALIGNED_ACCESS) && !defined(__GNUC__) --# if defined(__SUNPRO_C) || defined(__SUNPRO_CC) --# pragma pack(0) --# else --# pragma pack(pop) --# endif --#endif -+#if defined(LZ4_FORCE_MEMORY_ACCESS) && (LZ4_FORCE_MEMORY_ACCESS==2) -+/* lie to the compiler about data alignment; use with caution */ - --#define A16(x) (((U16_S *)(x))->v) --#define A32(x) (((U32_S *)(x))->v) --#define A64(x) (((U64_S *)(x))->v) --#define AARCH(x) (((size_t_S *)(x))->v) -+static U16 LZ4_read16(const void* memPtr) { return *(const U16*) memPtr; } -+static U32 LZ4_read32(const void* memPtr) { return *(const U32*) memPtr; } -+static reg_t LZ4_read_ARCH(const void* memPtr) { return *(const reg_t*) memPtr; } - -+static void LZ4_write16(void* memPtr, U16 value) { *(U16*)memPtr = value; } -+static void LZ4_write32(void* memPtr, U32 value) { *(U32*)memPtr = value; } - --/************************************** -- Constants --**************************************/ --#define LZ4_HASHLOG (LZ4_MEMORY_USAGE-2) --#define HASHTABLESIZE (1 << LZ4_MEMORY_USAGE) --#define HASH_SIZE_U32 (1 << LZ4_HASHLOG) -+#elif defined(LZ4_FORCE_MEMORY_ACCESS) && (LZ4_FORCE_MEMORY_ACCESS==1) -+ -+/* __pack instructions are safer, but compiler specific, hence potentially problematic for some compilers */ -+/* currently only defined for gcc and icc */ -+typedef union { U16 u16; U32 u32; reg_t uArch; } __attribute__((packed)) unalign; -+ -+static U16 LZ4_read16(const void* ptr) { return ((const unalign*)ptr)->u16; } -+static U32 LZ4_read32(const void* ptr) { return ((const unalign*)ptr)->u32; } -+static reg_t LZ4_read_ARCH(const void* ptr) { return ((const unalign*)ptr)->uArch; } -+ -+static void LZ4_write16(void* memPtr, U16 value) { ((unalign*)memPtr)->u16 = value; } -+static void LZ4_write32(void* memPtr, U32 value) { ((unalign*)memPtr)->u32 = value; } -+ -+#else /* safe and portable access through memcpy() */ - -+static U16 LZ4_read16(const void* memPtr) -+{ -+ U16 val; memcpy(&val, memPtr, sizeof(val)); return val; -+} -+ -+static U32 LZ4_read32(const void* memPtr) -+{ -+ U32 val; memcpy(&val, memPtr, sizeof(val)); return val; -+} -+ -+static reg_t LZ4_read_ARCH(const void* memPtr) -+{ -+ reg_t val; memcpy(&val, memPtr, sizeof(val)); return val; -+} -+ -+static void LZ4_write16(void* memPtr, U16 value) -+{ -+ memcpy(memPtr, &value, sizeof(value)); -+} -+ -+static void LZ4_write32(void* memPtr, U32 value) -+{ -+ memcpy(memPtr, &value, sizeof(value)); -+} -+ -+#endif /* LZ4_FORCE_MEMORY_ACCESS */ -+ -+ -+static U16 LZ4_readLE16(const void* memPtr) -+{ -+ if (LZ4_isLittleEndian()) { -+ return LZ4_read16(memPtr); -+ } else { -+ const BYTE* p = (const BYTE*)memPtr; -+ return (U16)((U16)p[0] + (p[1]<<8)); -+ } -+} -+ -+static void LZ4_writeLE16(void* memPtr, U16 value) -+{ -+ if (LZ4_isLittleEndian()) { -+ LZ4_write16(memPtr, value); -+ } else { -+ BYTE* p = (BYTE*)memPtr; -+ p[0] = (BYTE) value; -+ p[1] = (BYTE)(value>>8); -+ } -+} -+ -+static void LZ4_copy8(void* dst, const void* src) -+{ -+ memcpy(dst,src,8); -+} -+ -+/* customized variant of memcpy, which can overwrite up to 8 bytes beyond dstEnd */ -+static void LZ4_wildCopy(void* dstPtr, const void* srcPtr, void* dstEnd) -+{ -+ BYTE* d = (BYTE*)dstPtr; -+ const BYTE* s = (const BYTE*)srcPtr; -+ BYTE* const e = (BYTE*)dstEnd; -+ -+ do { LZ4_copy8(d,s); d+=8; s+=8; } while (d=2) -+# include -+# define DEBUGLOG(l, ...) { \ -+ if (l<=LZ4_DEBUG) { \ -+ fprintf(stderr, __FILE__ ": "); \ -+ fprintf(stderr, __VA_ARGS__); \ -+ fprintf(stderr, " \n"); \ -+ } } -+#else -+# define DEBUGLOG(l, ...) {} /* disabled */ -+#endif - --typedef enum { notLimited = 0, limitedOutput = 1 } limitedOutput_directive; --typedef enum { byPtr, byU32, byU16 } tableType_t; - --typedef enum { noDict = 0, withPrefix64k, usingExtDict } dict_directive; --typedef enum { noDictIssue = 0, dictSmall } dictIssue_directive; -+/*-************************************ -+* Common functions -+**************************************/ -+static unsigned LZ4_NbCommonBytes (register reg_t val) -+{ -+ if (LZ4_isLittleEndian()) { -+ if (sizeof(val)==8) { -+# if defined(_MSC_VER) && defined(_WIN64) && !defined(LZ4_FORCE_SW_BITCOUNT) -+ unsigned long r = 0; -+ _BitScanForward64( &r, (U64)val ); -+ return (int)(r>>3); -+# elif (defined(__clang__) || (defined(__GNUC__) && (__GNUC__>=3))) && !defined(LZ4_FORCE_SW_BITCOUNT) -+ return (__builtin_ctzll((U64)val) >> 3); -+# else -+ static const int DeBruijnBytePos[64] = { 0, 0, 0, 0, 0, 1, 1, 2, 0, 3, 1, 3, 1, 4, 2, 7, 0, 2, 3, 6, 1, 5, 3, 5, 1, 3, 4, 4, 2, 5, 6, 7, 7, 0, 1, 2, 3, 3, 4, 6, 2, 6, 5, 5, 3, 4, 5, 6, 7, 1, 2, 4, 6, 4, 4, 5, 7, 2, 6, 5, 7, 6, 7, 7 }; -+ return DeBruijnBytePos[((U64)((val & -(long long)val) * 0x0218A392CDABBD3FULL)) >> 58]; -+# endif -+ } else /* 32 bits */ { -+# if defined(_MSC_VER) && !defined(LZ4_FORCE_SW_BITCOUNT) -+ unsigned long r; -+ _BitScanForward( &r, (U32)val ); -+ return (int)(r>>3); -+# elif (defined(__clang__) || (defined(__GNUC__) && (__GNUC__>=3))) && !defined(LZ4_FORCE_SW_BITCOUNT) -+ return (__builtin_ctz((U32)val) >> 3); -+# else -+ static const int DeBruijnBytePos[32] = { 0, 0, 3, 0, 3, 1, 3, 0, 3, 2, 2, 1, 3, 2, 0, 1, 3, 3, 1, 2, 2, 2, 2, 0, 3, 1, 2, 0, 1, 0, 1, 1 }; -+ return DeBruijnBytePos[((U32)((val & -(S32)val) * 0x077CB531U)) >> 27]; -+# endif -+ } -+ } else /* Big Endian CPU */ { -+ if (sizeof(val)==8) { -+# if defined(_MSC_VER) && defined(_WIN64) && !defined(LZ4_FORCE_SW_BITCOUNT) -+ unsigned long r = 0; -+ _BitScanReverse64( &r, val ); -+ return (unsigned)(r>>3); -+# elif (defined(__clang__) || (defined(__GNUC__) && (__GNUC__>=3))) && !defined(LZ4_FORCE_SW_BITCOUNT) -+ return (__builtin_clzll((U64)val) >> 3); -+# else -+ unsigned r; -+ if (!(val>>32)) { r=4; } else { r=0; val>>=32; } -+ if (!(val>>16)) { r+=2; val>>=8; } else { val>>=24; } -+ r += (!val); -+ return r; -+# endif -+ } else /* 32 bits */ { -+# if defined(_MSC_VER) && !defined(LZ4_FORCE_SW_BITCOUNT) -+ unsigned long r = 0; -+ _BitScanReverse( &r, (unsigned long)val ); -+ return (unsigned)(r>>3); -+# elif (defined(__clang__) || (defined(__GNUC__) && (__GNUC__>=3))) && !defined(LZ4_FORCE_SW_BITCOUNT) -+ return (__builtin_clz((U32)val) >> 3); -+# else -+ unsigned r; -+ if (!(val>>16)) { r=2; val>>=8; } else { r=0; val>>=24; } -+ r += (!val); -+ return r; -+# endif -+ } -+ } -+} - --typedef enum { endOnOutputSize = 0, endOnInputSize = 1 } endCondition_directive; --typedef enum { full = 0, partial = 1 } earlyEnd_directive; -+#define STEPSIZE sizeof(reg_t) -+static unsigned LZ4_count(const BYTE* pIn, const BYTE* pMatch, const BYTE* pInLimit) -+{ -+ const BYTE* const pStart = pIn; - -+ while (likely(pIn=e; */ --#else --# define LZ4_WILDCOPY(d,s,e) { if (likely(e-d <= 8)) LZ4_COPY8(d,s) else do { LZ4_COPY8(d,s) } while (d compression run slower on incompressible data */ - - --/**************************** -- Private local functions --****************************/ --#if LZ4_ARCH64 -+/*-************************************ -+* Local Structures and types -+**************************************/ -+typedef enum { notLimited = 0, limitedOutput = 1 } limitedOutput_directive; -+typedef enum { byPtr, byU32, byU16 } tableType_t; - --int LZ4_NbCommonBytes (register U64 val) --{ --# if defined(LZ4_BIG_ENDIAN) --# if defined(_MSC_VER) && !defined(LZ4_FORCE_SW_BITCOUNT) -- unsigned long r = 0; -- _BitScanReverse64( &r, val ); -- return (int)(r>>3); --# elif defined(__GNUC__) && (GCC_VERSION >= 304) && !defined(LZ4_FORCE_SW_BITCOUNT) -- return (__builtin_clzll(val) >> 3); --# else -- int r; -- if (!(val>>32)) { r=4; } else { r=0; val>>=32; } -- if (!(val>>16)) { r+=2; val>>=8; } else { val>>=24; } -- r += (!val); -- return r; --# endif --# else --# if defined(_MSC_VER) && !defined(LZ4_FORCE_SW_BITCOUNT) -- unsigned long r = 0; -- _BitScanForward64( &r, val ); -- return (int)(r>>3); --# elif defined(__GNUC__) && (GCC_VERSION >= 304) && !defined(LZ4_FORCE_SW_BITCOUNT) -- return (__builtin_ctzll(val) >> 3); --# else -- static const int DeBruijnBytePos[64] = { 0, 0, 0, 0, 0, 1, 1, 2, 0, 3, 1, 3, 1, 4, 2, 7, 0, 2, 3, 6, 1, 5, 3, 5, 1, 3, 4, 4, 2, 5, 6, 7, 7, 0, 1, 2, 3, 3, 4, 6, 2, 6, 5, 5, 3, 4, 5, 6, 7, 1, 2, 4, 6, 4, 4, 5, 7, 2, 6, 5, 7, 6, 7, 7 }; -- return DeBruijnBytePos[((U64)((val & -(long long)val) * 0x0218A392CDABBD3FULL)) >> 58]; --# endif --# endif --} -+typedef enum { noDict = 0, withPrefix64k, usingExtDict } dict_directive; -+typedef enum { noDictIssue = 0, dictSmall } dictIssue_directive; - --#else -+typedef enum { endOnOutputSize = 0, endOnInputSize = 1 } endCondition_directive; -+typedef enum { full = 0, partial = 1 } earlyEnd_directive; - --int LZ4_NbCommonBytes (register U32 val) --{ --# if defined(LZ4_BIG_ENDIAN) --# if defined(_MSC_VER) && !defined(LZ4_FORCE_SW_BITCOUNT) -- unsigned long r = 0; -- _BitScanReverse( &r, val ); -- return (int)(r>>3); --# elif defined(__GNUC__) && (GCC_VERSION >= 304) && !defined(LZ4_FORCE_SW_BITCOUNT) -- return (__builtin_clz(val) >> 3); --# else -- int r; -- if (!(val>>16)) { r=2; val>>=8; } else { r=0; val>>=24; } -- r += (!val); -- return r; --# endif --# else --# if defined(_MSC_VER) && !defined(LZ4_FORCE_SW_BITCOUNT) -- unsigned long r; -- _BitScanForward( &r, val ); -- return (int)(r>>3); --# elif defined(__GNUC__) && (GCC_VERSION >= 304) && !defined(LZ4_FORCE_SW_BITCOUNT) -- return (__builtin_ctz(val) >> 3); --# else -- static const int DeBruijnBytePos[32] = { 0, 0, 3, 0, 3, 1, 3, 0, 3, 2, 2, 1, 3, 2, 0, 1, 3, 3, 1, 2, 2, 2, 2, 0, 3, 1, 2, 0, 1, 0, 1, 1 }; -- return DeBruijnBytePos[((U32)((val & -(S32)val) * 0x077CB531U)) >> 27]; --# endif --# endif --} - --#endif -+/*-************************************ -+* Local Utils -+**************************************/ -+int LZ4_versionNumber (void) { return LZ4_VERSION_NUMBER; } -+const char* LZ4_versionString(void) { return LZ4_VERSION_STRING; } -+int LZ4_compressBound(int isize) { return LZ4_COMPRESSBOUND(isize); } -+int LZ4_sizeofState() { return LZ4_STREAMSIZE; } - - --/******************************** -- Compression functions -+/*-****************************** -+* Compression functions - ********************************/ --int LZ4_compressBound(int isize) { return LZ4_COMPRESSBOUND(isize); } -- --static int LZ4_hashSequence(U32 sequence, tableType_t tableType) -+static U32 LZ4_hash4(U32 sequence, tableType_t const tableType) - { - if (tableType == byU16) -- return (((sequence) * 2654435761U) >> ((MINMATCH*8)-(LZ4_HASHLOG+1))); -+ return ((sequence * 2654435761U) >> ((MINMATCH*8)-(LZ4_HASHLOG+1))); - else -- return (((sequence) * 2654435761U) >> ((MINMATCH*8)-LZ4_HASHLOG)); -+ return ((sequence * 2654435761U) >> ((MINMATCH*8)-LZ4_HASHLOG)); - } - --static int LZ4_hashPosition(const BYTE* p, tableType_t tableType) { return LZ4_hashSequence(A32(p), tableType); } -+static U32 LZ4_hash5(U64 sequence, tableType_t const tableType) -+{ -+ static const U64 prime5bytes = 889523592379ULL; -+ static const U64 prime8bytes = 11400714785074694791ULL; -+ const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; -+ if (LZ4_isLittleEndian()) -+ return (U32)(((sequence << 24) * prime5bytes) >> (64 - hashLog)); -+ else -+ return (U32)(((sequence >> 24) * prime8bytes) >> (64 - hashLog)); -+} -+ -+FORCE_INLINE U32 LZ4_hashPosition(const void* const p, tableType_t const tableType) -+{ -+ if ((sizeof(reg_t)==8) && (tableType != byU16)) return LZ4_hash5(LZ4_read_ARCH(p), tableType); -+ return LZ4_hash4(LZ4_read32(p), tableType); -+} - --static void LZ4_putPositionOnHash(const BYTE* p, U32 h, void* tableBase, tableType_t tableType, const BYTE* srcBase) -+static void LZ4_putPositionOnHash(const BYTE* p, U32 h, void* tableBase, tableType_t const tableType, const BYTE* srcBase) - { - switch (tableType) - { -- case byPtr: { const BYTE** hashTable = (const BYTE**) tableBase; hashTable[h] = p; break; } -- case byU32: { U32* hashTable = (U32*) tableBase; hashTable[h] = (U32)(p-srcBase); break; } -- case byU16: { U16* hashTable = (U16*) tableBase; hashTable[h] = (U16)(p-srcBase); break; } -+ case byPtr: { const BYTE** hashTable = (const BYTE**)tableBase; hashTable[h] = p; return; } -+ case byU32: { U32* hashTable = (U32*) tableBase; hashTable[h] = (U32)(p-srcBase); return; } -+ case byU16: { U16* hashTable = (U16*) tableBase; hashTable[h] = (U16)(p-srcBase); return; } - } - } - --static void LZ4_putPosition(const BYTE* p, void* tableBase, tableType_t tableType, const BYTE* srcBase) -+FORCE_INLINE void LZ4_putPosition(const BYTE* p, void* tableBase, tableType_t tableType, const BYTE* srcBase) - { -- U32 h = LZ4_hashPosition(p, tableType); -+ U32 const h = LZ4_hashPosition(p, tableType); - LZ4_putPositionOnHash(p, h, tableBase, tableType, srcBase); - } - - static const BYTE* LZ4_getPositionOnHash(U32 h, void* tableBase, tableType_t tableType, const BYTE* srcBase) - { - if (tableType == byPtr) { const BYTE** hashTable = (const BYTE**) tableBase; return hashTable[h]; } -- if (tableType == byU32) { U32* hashTable = (U32*) tableBase; return hashTable[h] + srcBase; } -- { U16* hashTable = (U16*) tableBase; return hashTable[h] + srcBase; } /* default, to ensure a return */ -+ if (tableType == byU32) { const U32* const hashTable = (U32*) tableBase; return hashTable[h] + srcBase; } -+ { const U16* const hashTable = (U16*) tableBase; return hashTable[h] + srcBase; } /* default, to ensure a return */ - } - --static const BYTE* LZ4_getPosition(const BYTE* p, void* tableBase, tableType_t tableType, const BYTE* srcBase) -+FORCE_INLINE const BYTE* LZ4_getPosition(const BYTE* p, void* tableBase, tableType_t tableType, const BYTE* srcBase) - { -- U32 h = LZ4_hashPosition(p, tableType); -+ U32 const h = LZ4_hashPosition(p, tableType); - return LZ4_getPositionOnHash(h, tableBase, tableType, srcBase); - } - --static unsigned LZ4_count(const BYTE* pIn, const BYTE* pRef, const BYTE* pInLimit) --{ -- const BYTE* const pStart = pIn; -- -- while (likely(pIndictSize; -- const BYTE* const dictionary = dictPtr->dictionary; -- const BYTE* const dictEnd = dictionary + dictPtr->dictSize; -- const size_t dictDelta = dictEnd - (const BYTE*)source; -+ const BYTE* const lowRefLimit = ip - cctx->dictSize; -+ const BYTE* const dictionary = cctx->dictionary; -+ const BYTE* const dictEnd = dictionary + cctx->dictSize; -+ const ptrdiff_t dictDelta = dictEnd - (const BYTE*)source; - const BYTE* anchor = (const BYTE*) source; - const BYTE* const iend = ip + inputSize; - const BYTE* const mflimit = iend - MFLIMIT; -@@ -455,12 +501,10 @@ static int LZ4_compress_generic( - BYTE* op = (BYTE*) dest; - BYTE* const olimit = op + maxOutputSize; - -- const int skipStrength = SKIPSTRENGTH; - U32 forwardH; -- size_t refDelta=0; - - /* Init conditions */ -- if ((U32)inputSize > (U32)LZ4_MAX_INPUT_SIZE) return 0; /* Unsupported input size, too large (or negative) */ -+ if ((U32)inputSize > (U32)LZ4_MAX_INPUT_SIZE) return 0; /* Unsupported inputSize, too large (or negative) */ - switch(dict) - { - case noDict: -@@ -469,125 +513,118 @@ static int LZ4_compress_generic( - lowLimit = (const BYTE*)source; - break; - case withPrefix64k: -- base = (const BYTE*)source - dictPtr->currentOffset; -- lowLimit = (const BYTE*)source - dictPtr->dictSize; -+ base = (const BYTE*)source - cctx->currentOffset; -+ lowLimit = (const BYTE*)source - cctx->dictSize; - break; - case usingExtDict: -- base = (const BYTE*)source - dictPtr->currentOffset; -+ base = (const BYTE*)source - cctx->currentOffset; - lowLimit = (const BYTE*)source; - break; - } -- if ((tableType == byU16) && (inputSize>=(int)LZ4_64KLIMIT)) return 0; /* Size too large (not within 64K limit) */ -- if (inputSize=LZ4_64Klimit)) return 0; /* Size too large (not within 64K limit) */ -+ if (inputSizehashTable, tableType, base); - ip++; forwardH = LZ4_hashPosition(ip, tableType); - - /* Main Loop */ -- for ( ; ; ) -- { -- const BYTE* ref; -+ for ( ; ; ) { -+ ptrdiff_t refDelta = 0; -+ const BYTE* match; - BYTE* token; -- { -- const BYTE* forwardIp = ip; -- unsigned step=1; -- unsigned searchMatchNb = (1U << skipStrength); - -- /* Find a match */ -+ /* Find a match */ -+ { const BYTE* forwardIp = ip; -+ unsigned step = 1; -+ unsigned searchMatchNb = acceleration << LZ4_skipTrigger; - do { -- U32 h = forwardH; -+ U32 const h = forwardH; - ip = forwardIp; - forwardIp += step; -- step = searchMatchNb++ >> skipStrength; -- //if (step>8) step=8; // required for valid forwardIp ; slows down uncompressible data a bit -+ step = (searchMatchNb++ >> LZ4_skipTrigger); - - if (unlikely(forwardIp > mflimit)) goto _last_literals; - -- ref = LZ4_getPositionOnHash(h, ctx, tableType, base); -- if (dict==usingExtDict) -- { -- if (ref<(const BYTE*)source) -- { -+ match = LZ4_getPositionOnHash(h, cctx->hashTable, tableType, base); -+ if (dict==usingExtDict) { -+ if (match < (const BYTE*)source) { - refDelta = dictDelta; - lowLimit = dictionary; -- } -- else -- { -+ } else { - refDelta = 0; - lowLimit = (const BYTE*)source; -- } -- } -+ } } - forwardH = LZ4_hashPosition(forwardIp, tableType); -- LZ4_putPositionOnHash(ip, h, ctx, tableType, base); -+ LZ4_putPositionOnHash(ip, h, cctx->hashTable, tableType, base); - -- } while ( ((dictIssue==dictSmall) ? (ref < lowRefLimit) : 0) -- || ((tableType==byU16) ? 0 : (ref + MAX_DISTANCE < ip)) -- || (A32(ref+refDelta) != A32(ip)) ); -+ } while ( ((dictIssue==dictSmall) ? (match < lowRefLimit) : 0) -+ || ((tableType==byU16) ? 0 : (match + MAX_DISTANCE < ip)) -+ || (LZ4_read32(match+refDelta) != LZ4_read32(ip)) ); - } - - /* Catch up */ -- while ((ip>anchor) && (ref+refDelta > lowLimit) && (unlikely(ip[-1]==ref[refDelta-1]))) { ip--; ref--; } -+ while (((ip>anchor) & (match+refDelta > lowLimit)) && (unlikely(ip[-1]==match[refDelta-1]))) { ip--; match--; } - -- { -- /* Encode Literal length */ -- unsigned litLength = (unsigned)(ip - anchor); -+ /* Encode Literals */ -+ { unsigned const litLength = (unsigned)(ip - anchor); - token = op++; -- if ((outputLimited) && (unlikely(op + litLength + (2 + 1 + LASTLITERALS) + (litLength/255) > olimit))) -- return 0; /* Check output limit */ -- if (litLength>=RUN_MASK) -- { -+ if ((outputLimited) && /* Check output buffer overflow */ -+ (unlikely(op + litLength + (2 + 1 + LASTLITERALS) + (litLength/255) > olimit))) -+ return 0; -+ if (litLength >= RUN_MASK) { - int len = (int)litLength-RUN_MASK; -- *token=(RUN_MASK<= 255 ; len-=255) *op++ = 255; - *op++ = (BYTE)len; - } - else *token = (BYTE)(litLength< matchlimit) limit = matchlimit; -- matchLength = LZ4_count(ip+MINMATCH, ref+MINMATCH, limit); -- ip += MINMATCH + matchLength; -- if (ip==limit) -- { -- unsigned more = LZ4_count(ip, (const BYTE*)source, matchlimit); -- matchLength += more; -+ matchCode = LZ4_count(ip+MINMATCH, match+MINMATCH, limit); -+ ip += MINMATCH + matchCode; -+ if (ip==limit) { -+ unsigned const more = LZ4_count(ip, (const BYTE*)source, matchlimit); -+ matchCode += more; - ip += more; - } -- } -- else -- { -- matchLength = LZ4_count(ip+MINMATCH, ref+MINMATCH, matchlimit); -- ip += MINMATCH + matchLength; -+ } else { -+ matchCode = LZ4_count(ip+MINMATCH, match+MINMATCH, matchlimit); -+ ip += MINMATCH + matchCode; - } - -- if (matchLength>=ML_MASK) -- { -- if ((outputLimited) && (unlikely(op + (1 + LASTLITERALS) + (matchLength>>8) > olimit))) -- return 0; /* Check output limit */ -+ if ( outputLimited && /* Check output buffer overflow */ -+ (unlikely(op + (1 + LASTLITERALS) + (matchCode>>8) > olimit)) ) -+ return 0; -+ if (matchCode >= ML_MASK) { - *token += ML_MASK; -- matchLength -= ML_MASK; -- for (; matchLength >= 510 ; matchLength-=510) { *op++ = 255; *op++ = 255; } -- if (matchLength >= 255) { matchLength-=255; *op++ = 255; } -- *op++ = (BYTE)matchLength; -- } -- else *token += (BYTE)(matchLength); -+ matchCode -= ML_MASK; -+ LZ4_write32(op, 0xFFFFFFFF); -+ while (matchCode >= 4*255) { -+ op+=4; -+ LZ4_write32(op, 0xFFFFFFFF); -+ matchCode -= 4*255; -+ } -+ op += matchCode / 255; -+ *op++ = (BYTE)(matchCode % 255); -+ } else -+ *token += (BYTE)(matchCode); - } - - anchor = ip; -@@ -596,27 +633,22 @@ _next_match: - if (ip > mflimit) break; - - /* Fill table */ -- LZ4_putPosition(ip-2, ctx, tableType, base); -+ LZ4_putPosition(ip-2, cctx->hashTable, tableType, base); - - /* Test next position */ -- ref = LZ4_getPosition(ip, ctx, tableType, base); -- if (dict==usingExtDict) -- { -- if (ref<(const BYTE*)source) -- { -+ match = LZ4_getPosition(ip, cctx->hashTable, tableType, base); -+ if (dict==usingExtDict) { -+ if (match < (const BYTE*)source) { - refDelta = dictDelta; - lowLimit = dictionary; -- } -- else -- { -+ } else { - refDelta = 0; - lowLimit = (const BYTE*)source; -- } -- } -- LZ4_putPosition(ip, ctx, tableType, base); -- if ( ((dictIssue==dictSmall) ? (ref>=lowRefLimit) : 1) -- && (ref+MAX_DISTANCE>=ip) -- && (A32(ref+refDelta)==A32(ip)) ) -+ } } -+ LZ4_putPosition(ip, cctx->hashTable, tableType, base); -+ if ( ((dictIssue==dictSmall) ? (match>=lowRefLimit) : 1) -+ && (match+MAX_DISTANCE>=ip) -+ && (LZ4_read32(match+refDelta)==LZ4_read32(ip)) ) - { token=op++; *token=0; goto _next_match; } - - /* Prepare next loop */ -@@ -625,14 +657,20 @@ _next_match: - - _last_literals: - /* Encode Last Literals */ -- { -- int lastRun = (int)(iend - anchor); -- if ((outputLimited) && (((char*)op - dest) + lastRun + 1 + ((lastRun+255-RUN_MASK)/255) > (U32)maxOutputSize)) -- return 0; /* Check output limit */ -- if (lastRun>=(int)RUN_MASK) { *op++=(RUN_MASK<= 255 ; lastRun-=255) *op++ = 255; *op++ = (BYTE) lastRun; } -- else *op++ = (BYTE)(lastRun< (U32)maxOutputSize) ) -+ return 0; -+ if (lastRun >= RUN_MASK) { -+ size_t accumulator = lastRun - RUN_MASK; -+ *op++ = RUN_MASK << ML_BITS; -+ for(; accumulator >= 255 ; accumulator-=255) *op++ = 255; -+ *op++ = (BYTE) accumulator; -+ } else { -+ *op++ = (BYTE)(lastRun<internal_donotuse; -+ LZ4_resetStream((LZ4_stream_t*)state); -+ if (acceleration < 1) acceleration = ACCELERATION_DEFAULT; -+ -+ if (maxOutputSize >= LZ4_compressBound(inputSize)) { -+ if (inputSize < LZ4_64Klimit) -+ return LZ4_compress_generic(ctx, source, dest, inputSize, 0, notLimited, byU16, noDict, noDictIssue, acceleration); -+ else -+ return LZ4_compress_generic(ctx, source, dest, inputSize, 0, notLimited, (sizeof(void*)==8) ? byU32 : byPtr, noDict, noDictIssue, acceleration); -+ } else { -+ if (inputSize < LZ4_64Klimit) -+ return LZ4_compress_generic(ctx, source, dest, inputSize, maxOutputSize, limitedOutput, byU16, noDict, noDictIssue, acceleration); -+ else -+ return LZ4_compress_generic(ctx, source, dest, inputSize, maxOutputSize, limitedOutput, (sizeof(void*)==8) ? byU32 : byPtr, noDict, noDictIssue, acceleration); -+ } -+} -+ -+ -+int LZ4_compress_fast(const char* source, char* dest, int inputSize, int maxOutputSize, int acceleration) -+{ -+#if (LZ4_HEAPMODE) -+ void* ctxPtr = ALLOCATOR(1, sizeof(LZ4_stream_t)); /* malloc-calloc always properly aligned */ - #else -- U32 ctx[LZ4_STREAMSIZE_U32] = {0}; /* Ensure data is aligned on 4-bytes boundaries */ -+ LZ4_stream_t ctx; -+ void* const ctxPtr = &ctx; - #endif -- int result; - -- if (inputSize < (int)LZ4_64KLIMIT) -- result = LZ4_compress_generic((void*)ctx, source, dest, inputSize, 0, notLimited, byU16, noDict, noDictIssue); -- else -- result = LZ4_compress_generic((void*)ctx, source, dest, inputSize, 0, notLimited, (sizeof(void*)==8) ? byU32 : byPtr, noDict, noDictIssue); -+ int const result = LZ4_compress_fast_extState(ctxPtr, source, dest, inputSize, maxOutputSize, acceleration); - --#if (HEAPMODE) -- FREEMEM(ctx); -+#if (LZ4_HEAPMODE) -+ FREEMEM(ctxPtr); - #endif - return result; - } - --int LZ4_compress_limitedOutput(const char* source, char* dest, int inputSize, int maxOutputSize) -+ -+int LZ4_compress_default(const char* source, char* dest, int inputSize, int maxOutputSize) - { --#if (HEAPMODE) -- void* ctx = ALLOCATOR(LZ4_STREAMSIZE_U32, 4); /* Aligned on 4-bytes boundaries */ -+ return LZ4_compress_fast(source, dest, inputSize, maxOutputSize, 1); -+} -+ -+ -+/* hidden debug function */ -+/* strangely enough, gcc generates faster code when this function is uncommented, even if unused */ -+int LZ4_compress_fast_force(const char* source, char* dest, int inputSize, int maxOutputSize, int acceleration) -+{ -+ LZ4_stream_t ctx; -+ LZ4_resetStream(&ctx); -+ -+ if (inputSize < LZ4_64Klimit) -+ return LZ4_compress_generic(&ctx.internal_donotuse, source, dest, inputSize, maxOutputSize, limitedOutput, byU16, noDict, noDictIssue, acceleration); -+ else -+ return LZ4_compress_generic(&ctx.internal_donotuse, source, dest, inputSize, maxOutputSize, limitedOutput, sizeof(void*)==8 ? byU32 : byPtr, noDict, noDictIssue, acceleration); -+} -+ -+ -+/*-****************************** -+* *_destSize() variant -+********************************/ -+ -+static int LZ4_compress_destSize_generic( -+ LZ4_stream_t_internal* const ctx, -+ const char* const src, -+ char* const dst, -+ int* const srcSizePtr, -+ const int targetDstSize, -+ const tableType_t tableType) -+{ -+ const BYTE* ip = (const BYTE*) src; -+ const BYTE* base = (const BYTE*) src; -+ const BYTE* lowLimit = (const BYTE*) src; -+ const BYTE* anchor = ip; -+ const BYTE* const iend = ip + *srcSizePtr; -+ const BYTE* const mflimit = iend - MFLIMIT; -+ const BYTE* const matchlimit = iend - LASTLITERALS; -+ -+ BYTE* op = (BYTE*) dst; -+ BYTE* const oend = op + targetDstSize; -+ BYTE* const oMaxLit = op + targetDstSize - 2 /* offset */ - 8 /* because 8+MINMATCH==MFLIMIT */ - 1 /* token */; -+ BYTE* const oMaxMatch = op + targetDstSize - (LASTLITERALS + 1 /* token */); -+ BYTE* const oMaxSeq = oMaxLit - 1 /* token */; -+ -+ U32 forwardH; -+ -+ -+ /* Init conditions */ -+ if (targetDstSize < 1) return 0; /* Impossible to store anything */ -+ if ((U32)*srcSizePtr > (U32)LZ4_MAX_INPUT_SIZE) return 0; /* Unsupported input size, too large (or negative) */ -+ if ((tableType == byU16) && (*srcSizePtr>=LZ4_64Klimit)) return 0; /* Size too large (not within 64K limit) */ -+ if (*srcSizePtrhashTable, tableType, base); -+ ip++; forwardH = LZ4_hashPosition(ip, tableType); -+ -+ /* Main Loop */ -+ for ( ; ; ) { -+ const BYTE* match; -+ BYTE* token; -+ -+ /* Find a match */ -+ { const BYTE* forwardIp = ip; -+ unsigned step = 1; -+ unsigned searchMatchNb = 1 << LZ4_skipTrigger; -+ -+ do { -+ U32 h = forwardH; -+ ip = forwardIp; -+ forwardIp += step; -+ step = (searchMatchNb++ >> LZ4_skipTrigger); -+ -+ if (unlikely(forwardIp > mflimit)) goto _last_literals; -+ -+ match = LZ4_getPositionOnHash(h, ctx->hashTable, tableType, base); -+ forwardH = LZ4_hashPosition(forwardIp, tableType); -+ LZ4_putPositionOnHash(ip, h, ctx->hashTable, tableType, base); -+ -+ } while ( ((tableType==byU16) ? 0 : (match + MAX_DISTANCE < ip)) -+ || (LZ4_read32(match) != LZ4_read32(ip)) ); -+ } -+ -+ /* Catch up */ -+ while ((ip>anchor) && (match > lowLimit) && (unlikely(ip[-1]==match[-1]))) { ip--; match--; } -+ -+ /* Encode Literal length */ -+ { unsigned litLength = (unsigned)(ip - anchor); -+ token = op++; -+ if (op + ((litLength+240)/255) + litLength > oMaxLit) { -+ /* Not enough space for a last match */ -+ op--; -+ goto _last_literals; -+ } -+ if (litLength>=RUN_MASK) { -+ unsigned len = litLength - RUN_MASK; -+ *token=(RUN_MASK<= 255 ; len-=255) *op++ = 255; -+ *op++ = (BYTE)len; -+ } -+ else *token = (BYTE)(litLength< oMaxMatch) { -+ /* Match description too long : reduce it */ -+ matchLength = (15-1) + (oMaxMatch-op) * 255; -+ } -+ ip += MINMATCH + matchLength; -+ -+ if (matchLength>=ML_MASK) { -+ *token += ML_MASK; -+ matchLength -= ML_MASK; -+ while (matchLength >= 255) { matchLength-=255; *op++ = 255; } -+ *op++ = (BYTE)matchLength; -+ } -+ else *token += (BYTE)(matchLength); -+ } -+ -+ anchor = ip; -+ -+ /* Test end of block */ -+ if (ip > mflimit) break; -+ if (op > oMaxSeq) break; -+ -+ /* Fill table */ -+ LZ4_putPosition(ip-2, ctx->hashTable, tableType, base); -+ -+ /* Test next position */ -+ match = LZ4_getPosition(ip, ctx->hashTable, tableType, base); -+ LZ4_putPosition(ip, ctx->hashTable, tableType, base); -+ if ( (match+MAX_DISTANCE>=ip) -+ && (LZ4_read32(match)==LZ4_read32(ip)) ) -+ { token=op++; *token=0; goto _next_match; } -+ -+ /* Prepare next loop */ -+ forwardH = LZ4_hashPosition(++ip, tableType); -+ } -+ -+_last_literals: -+ /* Encode Last Literals */ -+ { size_t lastRunSize = (size_t)(iend - anchor); -+ if (op + 1 /* token */ + ((lastRunSize+240)/255) /* litLength */ + lastRunSize /* literals */ > oend) { -+ /* adapt lastRunSize to fill 'dst' */ -+ lastRunSize = (oend-op) - 1; -+ lastRunSize -= (lastRunSize+240)/255; -+ } -+ ip = anchor + lastRunSize; -+ -+ if (lastRunSize >= RUN_MASK) { -+ size_t accumulator = lastRunSize - RUN_MASK; -+ *op++ = RUN_MASK << ML_BITS; -+ for(; accumulator >= 255 ; accumulator-=255) *op++ = 255; -+ *op++ = (BYTE) accumulator; -+ } else { -+ *op++ = (BYTE)(lastRunSize<= LZ4_compressBound(*srcSizePtr)) { /* compression success is guaranteed */ -+ return LZ4_compress_fast_extState(state, src, dst, *srcSizePtr, targetDstSize, 1); -+ } else { -+ if (*srcSizePtr < LZ4_64Klimit) -+ return LZ4_compress_destSize_generic(&state->internal_donotuse, src, dst, srcSizePtr, targetDstSize, byU16); -+ else -+ return LZ4_compress_destSize_generic(&state->internal_donotuse, src, dst, srcSizePtr, targetDstSize, sizeof(void*)==8 ? byU32 : byPtr); -+ } -+} -+ -+ -+int LZ4_compress_destSize(const char* src, char* dst, int* srcSizePtr, int targetDstSize) -+{ -+#if (LZ4_HEAPMODE) -+ LZ4_stream_t* ctx = (LZ4_stream_t*)ALLOCATOR(1, sizeof(LZ4_stream_t)); /* malloc-calloc always properly aligned */ - #else -- U32 ctx[LZ4_STREAMSIZE_U32] = {0}; /* Ensure data is aligned on 4-bytes boundaries */ -+ LZ4_stream_t ctxBody; -+ LZ4_stream_t* ctx = &ctxBody; - #endif -- int result; - -- if (inputSize < (int)LZ4_64KLIMIT) -- result = LZ4_compress_generic((void*)ctx, source, dest, inputSize, maxOutputSize, limitedOutput, byU16, noDict, noDictIssue); -- else -- result = LZ4_compress_generic((void*)ctx, source, dest, inputSize, maxOutputSize, limitedOutput, (sizeof(void*)==8) ? byU32 : byPtr, noDict, noDictIssue); -+ int result = LZ4_compress_destSize_extState(ctx, src, dst, srcSizePtr, targetDstSize); - --#if (HEAPMODE) -+#if (LZ4_HEAPMODE) - FREEMEM(ctx); - #endif - return result; - } - - --/***************************************** -- Experimental : Streaming functions --*****************************************/ - --void* LZ4_createStream() -+/*-****************************** -+* Streaming functions -+********************************/ -+ -+LZ4_stream_t* LZ4_createStream(void) - { -- void* lz4s = ALLOCATOR(4, LZ4_STREAMSIZE_U32); -- MEM_INIT(lz4s, 0, LZ4_STREAMSIZE); -+ LZ4_stream_t* lz4s = (LZ4_stream_t*)ALLOCATOR(8, LZ4_STREAMSIZE_U64); -+ LZ4_STATIC_ASSERT(LZ4_STREAMSIZE >= sizeof(LZ4_stream_t_internal)); /* A compilation error here means LZ4_STREAMSIZE is not large enough */ -+ LZ4_resetStream(lz4s); - return lz4s; - } - --int LZ4_free (void* LZ4_stream) -+void LZ4_resetStream (LZ4_stream_t* LZ4_stream) -+{ -+ MEM_INIT(LZ4_stream, 0, sizeof(LZ4_stream_t)); -+} -+ -+int LZ4_freeStream (LZ4_stream_t* LZ4_stream) - { -+ if (!LZ4_stream) return 0; /* support free on NULL */ - FREEMEM(LZ4_stream); - return (0); - } - - --int LZ4_loadDict (void* LZ4_dict, const char* dictionary, int dictSize) -+#define HASH_UNIT sizeof(reg_t) -+int LZ4_loadDict (LZ4_stream_t* LZ4_dict, const char* dictionary, int dictSize) - { -- LZ4_stream_t_internal* dict = (LZ4_stream_t_internal*) LZ4_dict; -+ LZ4_stream_t_internal* dict = &LZ4_dict->internal_donotuse; - const BYTE* p = (const BYTE*)dictionary; - const BYTE* const dictEnd = p + dictSize; - const BYTE* base; - -- LZ4_STATIC_ASSERT(LZ4_STREAMSIZE >= sizeof(LZ4_stream_t_internal)); /* A compilation error here means LZ4_STREAMSIZE is not large enough */ -- if (dict->initCheck) MEM_INIT(dict, 0, sizeof(LZ4_stream_t_internal)); /* Uninitialized structure detected */ -+ if ((dict->initCheck) || (dict->currentOffset > 1 GB)) /* Uninitialized structure, or reuse overflow */ -+ LZ4_resetStream(LZ4_dict); - -- if (dictSize < MINMATCH) -- { -+ if (dictSize < (int)HASH_UNIT) { - dict->dictionary = NULL; - dict->dictSize = 0; -- return 1; -+ return 0; - } - -- if (p <= dictEnd - 64 KB) p = dictEnd - 64 KB; -+ if ((dictEnd - p) > 64 KB) p = dictEnd - 64 KB; -+ dict->currentOffset += 64 KB; - base = p - dict->currentOffset; - dict->dictionary = p; - dict->dictSize = (U32)(dictEnd - p); - dict->currentOffset += dict->dictSize; - -- while (p <= dictEnd-MINMATCH) -- { -- LZ4_putPosition(p, dict, byU32, base); -+ while (p <= dictEnd-HASH_UNIT) { -+ LZ4_putPosition(p, dict->hashTable, byU32, base); - p+=3; - } - -- return 1; -+ return dict->dictSize; - } - - --void LZ4_renormDictT(LZ4_stream_t_internal* LZ4_dict, const BYTE* src) -+static void LZ4_renormDictT(LZ4_stream_t_internal* LZ4_dict, const BYTE* src) - { - if ((LZ4_dict->currentOffset > 0x80000000) || -- ((size_t)LZ4_dict->currentOffset > (size_t)src)) /* address space overflow */ -- { -+ ((uptrval)LZ4_dict->currentOffset > (uptrval)src)) { /* address space overflow */ - /* rescale hash table */ -- U32 delta = LZ4_dict->currentOffset - 64 KB; -+ U32 const delta = LZ4_dict->currentOffset - 64 KB; - const BYTE* dictEnd = LZ4_dict->dictionary + LZ4_dict->dictSize; - int i; -- for (i=0; ihashTable[i] < delta) LZ4_dict->hashTable[i]=0; - else LZ4_dict->hashTable[i] -= delta; - } -@@ -753,22 +1007,20 @@ void LZ4_renormDictT(LZ4_stream_t_internal* LZ4_dict, const BYTE* src) - } - - --FORCE_INLINE int LZ4_compress_continue_generic (void* LZ4_stream, const char* source, char* dest, int inputSize, -- int maxOutputSize, limitedOutput_directive limit) -+int LZ4_compress_fast_continue (LZ4_stream_t* LZ4_stream, const char* source, char* dest, int inputSize, int maxOutputSize, int acceleration) - { -- LZ4_stream_t_internal* streamPtr = (LZ4_stream_t_internal*)LZ4_stream; -+ LZ4_stream_t_internal* streamPtr = &LZ4_stream->internal_donotuse; - const BYTE* const dictEnd = streamPtr->dictionary + streamPtr->dictSize; - - const BYTE* smallest = (const BYTE*) source; - if (streamPtr->initCheck) return 0; /* Uninitialized structure detected */ - if ((streamPtr->dictSize>0) && (smallest>dictEnd)) smallest = dictEnd; - LZ4_renormDictT(streamPtr, smallest); -+ if (acceleration < 1) acceleration = ACCELERATION_DEFAULT; - - /* Check overlapping input/dictionary space */ -- { -- const BYTE* sourceEnd = (const BYTE*) source + inputSize; -- if ((sourceEnd > streamPtr->dictionary) && (sourceEnd < dictEnd)) -- { -+ { const BYTE* sourceEnd = (const BYTE*) source + inputSize; -+ if ((sourceEnd > streamPtr->dictionary) && (sourceEnd < dictEnd)) { - streamPtr->dictSize = (U32)(dictEnd - sourceEnd); - if (streamPtr->dictSize > 64 KB) streamPtr->dictSize = 64 KB; - if (streamPtr->dictSize < 4) streamPtr->dictSize = 0; -@@ -777,25 +1029,23 @@ FORCE_INLINE int LZ4_compress_continue_generic (void* LZ4_stream, const char* so - } - - /* prefix mode : source data follows dictionary */ -- if (dictEnd == (const BYTE*)source) -- { -+ if (dictEnd == (const BYTE*)source) { - int result; - if ((streamPtr->dictSize < 64 KB) && (streamPtr->dictSize < streamPtr->currentOffset)) -- result = LZ4_compress_generic(LZ4_stream, source, dest, inputSize, maxOutputSize, limit, byU32, withPrefix64k, dictSmall); -+ result = LZ4_compress_generic(streamPtr, source, dest, inputSize, maxOutputSize, limitedOutput, byU32, withPrefix64k, dictSmall, acceleration); - else -- result = LZ4_compress_generic(LZ4_stream, source, dest, inputSize, maxOutputSize, limit, byU32, withPrefix64k, noDictIssue); -+ result = LZ4_compress_generic(streamPtr, source, dest, inputSize, maxOutputSize, limitedOutput, byU32, withPrefix64k, noDictIssue, acceleration); - streamPtr->dictSize += (U32)inputSize; - streamPtr->currentOffset += (U32)inputSize; - return result; - } - - /* external dictionary mode */ -- { -- int result; -+ { int result; - if ((streamPtr->dictSize < 64 KB) && (streamPtr->dictSize < streamPtr->currentOffset)) -- result = LZ4_compress_generic(LZ4_stream, source, dest, inputSize, maxOutputSize, limit, byU32, usingExtDict, dictSmall); -+ result = LZ4_compress_generic(streamPtr, source, dest, inputSize, maxOutputSize, limitedOutput, byU32, usingExtDict, dictSmall, acceleration); - else -- result = LZ4_compress_generic(LZ4_stream, source, dest, inputSize, maxOutputSize, limit, byU32, usingExtDict, noDictIssue); -+ result = LZ4_compress_generic(streamPtr, source, dest, inputSize, maxOutputSize, limitedOutput, byU32, usingExtDict, noDictIssue, acceleration); - streamPtr->dictionary = (const BYTE*)source; - streamPtr->dictSize = (U32)inputSize; - streamPtr->currentOffset += (U32)inputSize; -@@ -804,29 +1054,18 @@ FORCE_INLINE int LZ4_compress_continue_generic (void* LZ4_stream, const char* so - } - - --int LZ4_compress_continue (void* LZ4_stream, const char* source, char* dest, int inputSize) --{ -- return LZ4_compress_continue_generic(LZ4_stream, source, dest, inputSize, 0, notLimited); --} -- --int LZ4_compress_limitedOutput_continue (void* LZ4_stream, const char* source, char* dest, int inputSize, int maxOutputSize) --{ -- return LZ4_compress_continue_generic(LZ4_stream, source, dest, inputSize, maxOutputSize, limitedOutput); --} -- -- --// Hidden debug function, to force separate dictionary mode -+/* Hidden debug function, to force external dictionary mode */ - int LZ4_compress_forceExtDict (LZ4_stream_t* LZ4_dict, const char* source, char* dest, int inputSize) - { -- LZ4_stream_t_internal* streamPtr = (LZ4_stream_t_internal*)LZ4_dict; -+ LZ4_stream_t_internal* streamPtr = &LZ4_dict->internal_donotuse; - int result; - const BYTE* const dictEnd = streamPtr->dictionary + streamPtr->dictSize; - - const BYTE* smallest = dictEnd; - if (smallest > (const BYTE*) source) smallest = (const BYTE*) source; -- LZ4_renormDictT((LZ4_stream_t_internal*)LZ4_dict, smallest); -+ LZ4_renormDictT(streamPtr, smallest); - -- result = LZ4_compress_generic(LZ4_dict, source, dest, inputSize, 0, notLimited, byU32, usingExtDict, noDictIssue); -+ result = LZ4_compress_generic(streamPtr, source, dest, inputSize, 0, notLimited, byU32, usingExtDict, noDictIssue, 1); - - streamPtr->dictionary = (const BYTE*)source; - streamPtr->dictSize = (U32)inputSize; -@@ -836,36 +1075,43 @@ int LZ4_compress_forceExtDict (LZ4_stream_t* LZ4_dict, const char* source, char* - } - - --int LZ4_saveDict (void* LZ4_dict, char* safeBuffer, int dictSize) -+/*! LZ4_saveDict() : -+ * If previously compressed data block is not guaranteed to remain available at its memory location, -+ * save it into a safer place (char* safeBuffer). -+ * Note : you don't need to call LZ4_loadDict() afterwards, -+ * dictionary is immediately usable, you can therefore call LZ4_compress_fast_continue(). -+ * Return : saved dictionary size in bytes (necessarily <= dictSize), or 0 if error. -+ */ -+int LZ4_saveDict (LZ4_stream_t* LZ4_dict, char* safeBuffer, int dictSize) - { -- LZ4_stream_t_internal* dict = (LZ4_stream_t_internal*) LZ4_dict; -- const BYTE* previousDictEnd = dict->dictionary + dict->dictSize; -+ LZ4_stream_t_internal* const dict = &LZ4_dict->internal_donotuse; -+ const BYTE* const previousDictEnd = dict->dictionary + dict->dictSize; - - if ((U32)dictSize > 64 KB) dictSize = 64 KB; /* useless to define a dictionary > 64 KB */ - if ((U32)dictSize > dict->dictSize) dictSize = dict->dictSize; - -- memcpy(safeBuffer, previousDictEnd - dictSize, dictSize); -+ memmove(safeBuffer, previousDictEnd - dictSize, dictSize); - - dict->dictionary = (const BYTE*)safeBuffer; - dict->dictSize = (U32)dictSize; - -- return 1; -+ return dictSize; - } - - - --/**************************** -- Decompression functions --****************************/ --/* -- * This generic decompression function cover all use cases. -- * It shall be instanciated several times, using different sets of directives -- * Note that it is essential this generic function is really inlined, -- * in order to remove useless branches during compilation optimisation. -+/*-***************************** -+* Decompression functions -+*******************************/ -+/*! LZ4_decompress_generic() : -+ * This generic decompression function cover all use cases. -+ * It shall be instantiated several times, using different sets of directives -+ * Note that it is important this generic function is really inlined, -+ * in order to remove useless branches during compilation optimization. - */ - FORCE_INLINE int LZ4_decompress_generic( -- const char* source, -- char* dest, -+ const char* const source, -+ char* const dest, - int inputSize, - int outputSize, /* If endOnInput==endOnInputSize, this value is the max size of Output Buffer. */ - -@@ -873,162 +1119,143 @@ FORCE_INLINE int LZ4_decompress_generic( - int partialDecoding, /* full, partial */ - int targetOutputSize, /* only used if partialDecoding==partial */ - int dict, /* noDict, withPrefix64k, usingExtDict */ -- const char* dictStart, /* only if dict==usingExtDict */ -- int dictSize /* note : = 0 if noDict */ -+ const BYTE* const lowPrefix, /* == dest when no prefix */ -+ const BYTE* const dictStart, /* only if dict==usingExtDict */ -+ const size_t dictSize /* note : = 0 if noDict */ - ) - { - /* Local Variables */ -- const BYTE* restrict ip = (const BYTE*) source; -- const BYTE* ref; -+ const BYTE* ip = (const BYTE*) source; - const BYTE* const iend = ip + inputSize; - - BYTE* op = (BYTE*) dest; - BYTE* const oend = op + outputSize; - BYTE* cpy; - BYTE* oexit = op + targetOutputSize; -- const BYTE* const lowLimit = (const BYTE*)dest - dictSize; -+ const BYTE* const lowLimit = lowPrefix - dictSize; - - const BYTE* const dictEnd = (const BYTE*)dictStart + dictSize; --//#define OLD --#ifdef OLD -- const size_t dec32table[] = {0, 3, 2, 3, 0, 0, 0, 0}; /* static reduces speed for LZ4_decompress_safe() on GCC64 */ --#else -- const size_t dec32table[] = {4-0, 4-3, 4-2, 4-3, 4-0, 4-0, 4-0, 4-0}; /* static reduces speed for LZ4_decompress_safe() on GCC64 */ --#endif -- static const size_t dec64table[] = {0, 0, 0, (size_t)-1, 0, 1, 2, 3}; -+ const unsigned dec32table[] = {0, 1, 2, 1, 4, 4, 4, 4}; -+ const int dec64table[] = {0, 0, 0, -1, 0, 1, 2, 3}; - -- const int checkOffset = (endOnInput) && (dictSize < (int)(64 KB)); -+ const int safeDecode = (endOnInput==endOnInputSize); -+ const int checkOffset = ((safeDecode) && (dictSize < (int)(64 KB))); - - - /* Special cases */ -- if ((partialDecoding) && (oexit> oend-MFLIMIT)) oexit = oend-MFLIMIT; /* targetOutputSize too high => decode everything */ -- if ((endOnInput) && (unlikely(outputSize==0))) return ((inputSize==1) && (*ip==0)) ? 0 : -1; /* Empty output buffer */ -+ if ((partialDecoding) && (oexit > oend-MFLIMIT)) oexit = oend-MFLIMIT; /* targetOutputSize too high => decode everything */ -+ if ((endOnInput) && (unlikely(outputSize==0))) return ((inputSize==1) && (*ip==0)) ? 0 : -1; /* Empty output buffer */ - if ((!endOnInput) && (unlikely(outputSize==0))) return (*ip==0?1:-1); - -- -- /* Main Loop */ -- while (1) -- { -- unsigned token; -+ /* Main Loop : decode sequences */ -+ while (1) { - size_t length; -+ const BYTE* match; -+ size_t offset; - -- /* get runlength */ -- token = *ip++; -- if ((length=(token>>ML_BITS)) == RUN_MASK) -- { -+ /* get literal length */ -+ unsigned const token = *ip++; -+ if ((length=(token>>ML_BITS)) == RUN_MASK) { - unsigned s; -- do -- { -+ do { - s = *ip++; - length += s; -- } -- while (likely((endOnInput)?ipLZ4_MAX_INPUT_SIZE)) goto _output_error; /* overflow detection */ -- if ((sizeof(void*)==4) && unlikely((size_t)(op+length)<(size_t)(op))) goto _output_error; /* quickfix issue 134 */ -- if ((endOnInput) && (sizeof(void*)==4) && unlikely((size_t)(ip+length)<(size_t)(ip))) goto _output_error; /* quickfix issue 134 */ -+ } while ( likely(endOnInput ? ip(partialDecoding?oexit:oend-MFLIMIT)) || (ip+length>iend-(2+1+LASTLITERALS))) ) -- || ((!endOnInput) && (cpy>oend-COPYLENGTH))) -+ if ( ((endOnInput) && ((cpy>(partialDecoding?oexit:oend-MFLIMIT)) || (ip+length>iend-(2+1+LASTLITERALS))) ) -+ || ((!endOnInput) && (cpy>oend-WILDCOPYLENGTH)) ) - { -- if (partialDecoding) -- { -+ if (partialDecoding) { - if (cpy > oend) goto _output_error; /* Error : write attempt beyond end of output buffer */ - if ((endOnInput) && (ip+length > iend)) goto _output_error; /* Error : read attempt beyond end of input buffer */ -- } -- else -- { -+ } else { - if ((!endOnInput) && (cpy != oend)) goto _output_error; /* Error : block decoding must stop exactly there */ - if ((endOnInput) && ((ip+length != iend) || (cpy > oend))) goto _output_error; /* Error : input must be consumed */ - } - memcpy(op, ip, length); - ip += length; - op += length; -- break; /* Necessarily EOF, due to parsing restrictions */ -+ break; /* Necessarily EOF, due to parsing restrictions */ - } -- LZ4_WILDCOPY(op, ip, cpy); ip -= (op-cpy); op = cpy; -+ LZ4_wildCopy(op, ip, cpy); -+ ip += length; op = cpy; - - /* get offset */ -- LZ4_READ_LITTLEENDIAN_16(ref,cpy,ip); ip+=2; -- if ((checkOffset) && (unlikely(ref < lowLimit))) goto _output_error; /* Error : offset outside destination buffer */ -+ offset = LZ4_readLE16(ip); ip+=2; -+ match = op - offset; -+ if ((checkOffset) && (unlikely(match < lowLimit))) goto _output_error; /* Error : offset outside buffers */ -+ LZ4_write32(op, (U32)offset); /* costs ~1%; silence an msan warning when offset==0 */ - - /* get matchlength */ -- if ((length=(token&ML_MASK)) == ML_MASK) -- { -+ length = token & ML_MASK; -+ if (length == ML_MASK) { - unsigned s; -- do -- { -- if ((endOnInput) && (ip > iend-LASTLITERALS)) goto _output_error; -+ do { - s = *ip++; -+ if ((endOnInput) && (ip > iend-LASTLITERALS)) goto _output_error; - length += s; - } while (s==255); -- //if ((sizeof(void*)==4) && unlikely(length>LZ4_MAX_INPUT_SIZE)) goto _output_error; /* overflow detection */ -- if ((sizeof(void*)==4) && unlikely((size_t)(op+length)<(size_t)op)) goto _output_error; /* quickfix issue 134 */ -+ if ((safeDecode) && unlikely((uptrval)(op)+length<(uptrval)op)) goto _output_error; /* overflow detection */ - } -+ length += MINMATCH; - - /* check external dictionary */ -- if ((dict==usingExtDict) && (ref < (BYTE* const)dest)) -- { -- if (unlikely(op+length+MINMATCH > oend-LASTLITERALS)) goto _output_error; -- -- if (length+MINMATCH <= (size_t)(dest-(char*)ref)) -- { -- ref = dictEnd - (dest-(char*)ref); -- memcpy(op, ref, length+MINMATCH); -- op += length+MINMATCH; -- } -- else -- { -- size_t copySize = (size_t)(dest-(char*)ref); -+ if ((dict==usingExtDict) && (match < lowPrefix)) { -+ if (unlikely(op+length > oend-LASTLITERALS)) goto _output_error; /* doesn't respect parsing restriction */ -+ -+ if (length <= (size_t)(lowPrefix-match)) { -+ /* match can be copied as a single segment from external dictionary */ -+ memmove(op, dictEnd - (lowPrefix-match), length); -+ op += length; -+ } else { -+ /* match encompass external dictionary and current block */ -+ size_t const copySize = (size_t)(lowPrefix-match); -+ size_t const restSize = length - copySize; - memcpy(op, dictEnd - copySize, copySize); - op += copySize; -- copySize = length+MINMATCH - copySize; -- if (copySize > (size_t)((char*)op-dest)) /* overlap */ -- { -- BYTE* const cpy = op + copySize; -- const BYTE* ref = (BYTE*)dest; -- while (op < cpy) *op++ = *ref++; -- } -- else -- { -- memcpy(op, dest, copySize); -- op += copySize; -- } -- } -+ if (restSize > (size_t)(op-lowPrefix)) { /* overlap copy */ -+ BYTE* const endOfMatch = op + restSize; -+ const BYTE* copyFrom = lowPrefix; -+ while (op < endOfMatch) *op++ = *copyFrom++; -+ } else { -+ memcpy(op, lowPrefix, restSize); -+ op += restSize; -+ } } - continue; - } - -- /* copy repeated sequence */ -- if (unlikely((op-ref)<(int)STEPSIZE)) -- { -- const size_t dec64 = dec64table[(sizeof(void*)==4) ? 0 : op-ref]; -- op[0] = ref[0]; -- op[1] = ref[1]; -- op[2] = ref[2]; -- op[3] = ref[3]; --#ifdef OLD -- op += 4, ref += 4; ref -= dec32table[op-ref]; -- A32(op) = A32(ref); -- op += STEPSIZE-4; ref -= dec64; --#else -- ref += dec32table[op-ref]; -- A32(op+4) = A32(ref); -- op += STEPSIZE; ref -= dec64; --#endif -- } else { LZ4_COPYSTEP(op,ref); } -- cpy = op + length - (STEPSIZE-4); -- -- if (unlikely(cpy>oend-COPYLENGTH-(STEPSIZE-4))) -- { -- if (cpy > oend-LASTLITERALS) goto _output_error; /* Error : last 5 bytes must be literals */ -- if (opoend-12)) { -+ BYTE* const oCopyLimit = oend-(WILDCOPYLENGTH-1); -+ if (cpy > oend-LASTLITERALS) goto _output_error; /* Error : last LASTLITERALS bytes must be literals (uncompressed) */ -+ if (op < oCopyLimit) { -+ LZ4_wildCopy(op, match, oCopyLimit); -+ match += oCopyLimit - op; -+ op = oCopyLimit; -+ } -+ while (op16) LZ4_wildCopy(op+8, match+8, cpy); - } -- LZ4_WILDCOPY(op, ref, cpy); - op=cpy; /* correction */ - } - -@@ -1036,64 +1263,59 @@ FORCE_INLINE int LZ4_decompress_generic( - if (endOnInput) - return (int) (((char*)op)-dest); /* Nb of output bytes decoded */ - else -- return (int) (((char*)ip)-source); /* Nb of input bytes read */ -+ return (int) (((const char*)ip)-source); /* Nb of input bytes read */ - - /* Overflow error detected */ - _output_error: -- return (int) (-(((char*)ip)-source))-1; -+ return (int) (-(((const char*)ip)-source))-1; - } - - --int LZ4_decompress_safe(const char* source, char* dest, int compressedSize, int maxOutputSize) -+int LZ4_decompress_safe(const char* source, char* dest, int compressedSize, int maxDecompressedSize) - { -- return LZ4_decompress_generic(source, dest, compressedSize, maxOutputSize, endOnInputSize, full, 0, noDict, NULL, 0); -+ return LZ4_decompress_generic(source, dest, compressedSize, maxDecompressedSize, endOnInputSize, full, 0, noDict, (BYTE*)dest, NULL, 0); - } - --int LZ4_decompress_safe_partial(const char* source, char* dest, int compressedSize, int targetOutputSize, int maxOutputSize) -+int LZ4_decompress_safe_partial(const char* source, char* dest, int compressedSize, int targetOutputSize, int maxDecompressedSize) - { -- return LZ4_decompress_generic(source, dest, compressedSize, maxOutputSize, endOnInputSize, partial, targetOutputSize, noDict, NULL, 0); -+ return LZ4_decompress_generic(source, dest, compressedSize, maxDecompressedSize, endOnInputSize, partial, targetOutputSize, noDict, (BYTE*)dest, NULL, 0); - } - - int LZ4_decompress_fast(const char* source, char* dest, int originalSize) - { -- return LZ4_decompress_generic(source, dest, 0, originalSize, endOnOutputSize, full, 0, withPrefix64k, NULL, 0); -+ return LZ4_decompress_generic(source, dest, 0, originalSize, endOnOutputSize, full, 0, withPrefix64k, (BYTE*)(dest - 64 KB), NULL, 64 KB); - } - --/* streaming decompression functions */ - --//#define LZ4_STREAMDECODESIZE_U32 4 --//#define LZ4_STREAMDECODESIZE (LZ4_STREAMDECODESIZE_U32 * sizeof(unsigned int)) --//typedef struct { unsigned int table[LZ4_STREAMDECODESIZE_U32]; } LZ4_streamDecode_t; --typedef struct --{ -- const char* dictionary; -- int dictSize; --} LZ4_streamDecode_t_internal; -+/*===== streaming decompression functions =====*/ - --/* -- * If you prefer dynamic allocation methods, -- * LZ4_createStreamDecode() -- * provides a pointer (void*) towards an initialized LZ4_streamDecode_t structure. -- */ --void* LZ4_createStreamDecode() -+LZ4_streamDecode_t* LZ4_createStreamDecode(void) - { -- void* lz4s = ALLOCATOR(sizeof(U32), LZ4_STREAMDECODESIZE_U32); -- MEM_INIT(lz4s, 0, LZ4_STREAMDECODESIZE); -+ LZ4_streamDecode_t* lz4s = (LZ4_streamDecode_t*) ALLOCATOR(1, sizeof(LZ4_streamDecode_t)); - return lz4s; - } - --/* -- * LZ4_setDictDecode -- * Use this function to instruct where to find the dictionary -+int LZ4_freeStreamDecode (LZ4_streamDecode_t* LZ4_stream) -+{ -+ if (!LZ4_stream) return 0; /* support free on NULL */ -+ FREEMEM(LZ4_stream); -+ return 0; -+} -+ -+/*! -+ * LZ4_setStreamDecode() : -+ * Use this function to instruct where to find the dictionary. - * This function is not necessary if previous data is still available where it was decoded. - * Loading a size of 0 is allowed (same effect as no dictionary). - * Return : 1 if OK, 0 if error - */ --int LZ4_setDictDecode (void* LZ4_streamDecode, const char* dictionary, int dictSize) -+int LZ4_setStreamDecode (LZ4_streamDecode_t* LZ4_streamDecode, const char* dictionary, int dictSize) - { -- LZ4_streamDecode_t_internal* lz4sd = (LZ4_streamDecode_t_internal*) LZ4_streamDecode; -- lz4sd->dictionary = dictionary; -- lz4sd->dictSize = dictSize; -+ LZ4_streamDecode_t_internal* lz4sd = &LZ4_streamDecode->internal_donotuse; -+ lz4sd->prefixSize = (size_t) dictSize; -+ lz4sd->prefixEnd = (const BYTE*) dictionary + dictSize; -+ lz4sd->externalDict = NULL; -+ lz4sd->extDictSize = 0; - return 1; - } - -@@ -1102,43 +1324,55 @@ int LZ4_setDictDecode (void* LZ4_streamDecode, const char* dictionary, int dictS - These decoding functions allow decompression of multiple blocks in "streaming" mode. - Previously decoded blocks must still be available at the memory position where they were decoded. - If it's not possible, save the relevant part of decoded data into a safe buffer, -- and indicate where it stands using LZ4_setDictDecode() -+ and indicate where it stands using LZ4_setStreamDecode() - */ --int LZ4_decompress_safe_continue (void* LZ4_streamDecode, const char* source, char* dest, int compressedSize, int maxOutputSize) -+int LZ4_decompress_safe_continue (LZ4_streamDecode_t* LZ4_streamDecode, const char* source, char* dest, int compressedSize, int maxOutputSize) - { -- LZ4_streamDecode_t_internal* lz4sd = (LZ4_streamDecode_t_internal*) LZ4_streamDecode; -+ LZ4_streamDecode_t_internal* lz4sd = &LZ4_streamDecode->internal_donotuse; - int result; - -- result = LZ4_decompress_generic(source, dest, compressedSize, maxOutputSize, endOnInputSize, full, 0, usingExtDict, lz4sd->dictionary, lz4sd->dictSize); -- if (result <= 0) return result; -- if (lz4sd->dictionary + lz4sd->dictSize == dest) -- { -- lz4sd->dictSize += result; -- } -- else -- { -- lz4sd->dictionary = dest; -- lz4sd->dictSize = result; -+ if (lz4sd->prefixEnd == (BYTE*)dest) { -+ result = LZ4_decompress_generic(source, dest, compressedSize, maxOutputSize, -+ endOnInputSize, full, 0, -+ usingExtDict, lz4sd->prefixEnd - lz4sd->prefixSize, lz4sd->externalDict, lz4sd->extDictSize); -+ if (result <= 0) return result; -+ lz4sd->prefixSize += result; -+ lz4sd->prefixEnd += result; -+ } else { -+ lz4sd->extDictSize = lz4sd->prefixSize; -+ lz4sd->externalDict = lz4sd->prefixEnd - lz4sd->extDictSize; -+ result = LZ4_decompress_generic(source, dest, compressedSize, maxOutputSize, -+ endOnInputSize, full, 0, -+ usingExtDict, (BYTE*)dest, lz4sd->externalDict, lz4sd->extDictSize); -+ if (result <= 0) return result; -+ lz4sd->prefixSize = result; -+ lz4sd->prefixEnd = (BYTE*)dest + result; - } - - return result; - } - --int LZ4_decompress_fast_continue (void* LZ4_streamDecode, const char* source, char* dest, int originalSize) -+int LZ4_decompress_fast_continue (LZ4_streamDecode_t* LZ4_streamDecode, const char* source, char* dest, int originalSize) - { -- LZ4_streamDecode_t_internal* lz4sd = (LZ4_streamDecode_t_internal*) LZ4_streamDecode; -+ LZ4_streamDecode_t_internal* lz4sd = &LZ4_streamDecode->internal_donotuse; - int result; - -- result = LZ4_decompress_generic(source, dest, 0, originalSize, endOnOutputSize, full, 0, usingExtDict, lz4sd->dictionary, lz4sd->dictSize); -- if (result <= 0) return result; -- if (lz4sd->dictionary + lz4sd->dictSize == dest) -- { -- lz4sd->dictSize += result; -- } -- else -- { -- lz4sd->dictionary = dest; -- lz4sd->dictSize = result; -+ if (lz4sd->prefixEnd == (BYTE*)dest) { -+ result = LZ4_decompress_generic(source, dest, 0, originalSize, -+ endOnOutputSize, full, 0, -+ usingExtDict, lz4sd->prefixEnd - lz4sd->prefixSize, lz4sd->externalDict, lz4sd->extDictSize); -+ if (result <= 0) return result; -+ lz4sd->prefixSize += originalSize; -+ lz4sd->prefixEnd += originalSize; -+ } else { -+ lz4sd->extDictSize = lz4sd->prefixSize; -+ lz4sd->externalDict = lz4sd->prefixEnd - lz4sd->extDictSize; -+ result = LZ4_decompress_generic(source, dest, 0, originalSize, -+ endOnOutputSize, full, 0, -+ usingExtDict, (BYTE*)dest, lz4sd->externalDict, lz4sd->extDictSize); -+ if (result <= 0) return result; -+ lz4sd->prefixSize = originalSize; -+ lz4sd->prefixEnd = (BYTE*)dest + originalSize; - } - - return result; -@@ -1152,12 +1386,97 @@ Advanced decoding functions : - the dictionary must be explicitly provided within parameters - */ - -+FORCE_INLINE int LZ4_decompress_usingDict_generic(const char* source, char* dest, int compressedSize, int maxOutputSize, int safe, const char* dictStart, int dictSize) -+{ -+ if (dictSize==0) -+ return LZ4_decompress_generic(source, dest, compressedSize, maxOutputSize, safe, full, 0, noDict, (BYTE*)dest, NULL, 0); -+ if (dictStart+dictSize == dest) { -+ if (dictSize >= (int)(64 KB - 1)) -+ return LZ4_decompress_generic(source, dest, compressedSize, maxOutputSize, safe, full, 0, withPrefix64k, (BYTE*)dest-64 KB, NULL, 0); -+ return LZ4_decompress_generic(source, dest, compressedSize, maxOutputSize, safe, full, 0, noDict, (BYTE*)dest-dictSize, NULL, 0); -+ } -+ return LZ4_decompress_generic(source, dest, compressedSize, maxOutputSize, safe, full, 0, usingExtDict, (BYTE*)dest, (const BYTE*)dictStart, dictSize); -+} -+ - int LZ4_decompress_safe_usingDict(const char* source, char* dest, int compressedSize, int maxOutputSize, const char* dictStart, int dictSize) - { -- return LZ4_decompress_generic(source, dest, compressedSize, maxOutputSize, endOnInputSize, full, 0, usingExtDict, dictStart, dictSize); -+ return LZ4_decompress_usingDict_generic(source, dest, compressedSize, maxOutputSize, 1, dictStart, dictSize); - } - - int LZ4_decompress_fast_usingDict(const char* source, char* dest, int originalSize, const char* dictStart, int dictSize) - { -- return LZ4_decompress_generic(source, dest, 0, originalSize, endOnOutputSize, full, 0, usingExtDict, dictStart, dictSize); -+ return LZ4_decompress_usingDict_generic(source, dest, 0, originalSize, 0, dictStart, dictSize); -+} -+ -+/* debug function */ -+int LZ4_decompress_safe_forceExtDict(const char* source, char* dest, int compressedSize, int maxOutputSize, const char* dictStart, int dictSize) -+{ -+ return LZ4_decompress_generic(source, dest, compressedSize, maxOutputSize, endOnInputSize, full, 0, usingExtDict, (BYTE*)dest, (const BYTE*)dictStart, dictSize); - } -+ -+ -+/*=************************************************* -+* Obsolete Functions -+***************************************************/ -+/* obsolete compression functions */ -+int LZ4_compress_limitedOutput(const char* source, char* dest, int inputSize, int maxOutputSize) { return LZ4_compress_default(source, dest, inputSize, maxOutputSize); } -+int LZ4_compress(const char* source, char* dest, int inputSize) { return LZ4_compress_default(source, dest, inputSize, LZ4_compressBound(inputSize)); } -+int LZ4_compress_limitedOutput_withState (void* state, const char* src, char* dst, int srcSize, int dstSize) { return LZ4_compress_fast_extState(state, src, dst, srcSize, dstSize, 1); } -+int LZ4_compress_withState (void* state, const char* src, char* dst, int srcSize) { return LZ4_compress_fast_extState(state, src, dst, srcSize, LZ4_compressBound(srcSize), 1); } -+int LZ4_compress_limitedOutput_continue (LZ4_stream_t* LZ4_stream, const char* src, char* dst, int srcSize, int maxDstSize) { return LZ4_compress_fast_continue(LZ4_stream, src, dst, srcSize, maxDstSize, 1); } -+int LZ4_compress_continue (LZ4_stream_t* LZ4_stream, const char* source, char* dest, int inputSize) { return LZ4_compress_fast_continue(LZ4_stream, source, dest, inputSize, LZ4_compressBound(inputSize), 1); } -+ -+/* -+These function names are deprecated and should no longer be used. -+They are only provided here for compatibility with older user programs. -+- LZ4_uncompress is totally equivalent to LZ4_decompress_fast -+- LZ4_uncompress_unknownOutputSize is totally equivalent to LZ4_decompress_safe -+*/ -+int LZ4_uncompress (const char* source, char* dest, int outputSize) { return LZ4_decompress_fast(source, dest, outputSize); } -+int LZ4_uncompress_unknownOutputSize (const char* source, char* dest, int isize, int maxOutputSize) { return LZ4_decompress_safe(source, dest, isize, maxOutputSize); } -+ -+ -+/* Obsolete Streaming functions */ -+ -+int LZ4_sizeofStreamState() { return LZ4_STREAMSIZE; } -+ -+static void LZ4_init(LZ4_stream_t* lz4ds, BYTE* base) -+{ -+ MEM_INIT(lz4ds, 0, sizeof(LZ4_stream_t)); -+ lz4ds->internal_donotuse.bufferStart = base; -+} -+ -+int LZ4_resetStreamState(void* state, char* inputBuffer) -+{ -+ if ((((uptrval)state) & 3) != 0) return 1; /* Error : pointer is not aligned on 4-bytes boundary */ -+ LZ4_init((LZ4_stream_t*)state, (BYTE*)inputBuffer); -+ return 0; -+} -+ -+void* LZ4_create (char* inputBuffer) -+{ -+ LZ4_stream_t* lz4ds = (LZ4_stream_t*)ALLOCATOR(8, sizeof(LZ4_stream_t)); -+ LZ4_init (lz4ds, (BYTE*)inputBuffer); -+ return lz4ds; -+} -+ -+char* LZ4_slideInputBuffer (void* LZ4_Data) -+{ -+ LZ4_stream_t_internal* ctx = &((LZ4_stream_t*)LZ4_Data)->internal_donotuse; -+ int dictSize = LZ4_saveDict((LZ4_stream_t*)LZ4_Data, (char*)ctx->bufferStart, 64 KB); -+ return (char*)(ctx->bufferStart + dictSize); -+} -+ -+/* Obsolete streaming decompression functions */ -+ -+int LZ4_decompress_safe_withPrefix64k(const char* source, char* dest, int compressedSize, int maxOutputSize) -+{ -+ return LZ4_decompress_generic(source, dest, compressedSize, maxOutputSize, endOnInputSize, full, 0, withPrefix64k, (BYTE*)dest - 64 KB, NULL, 64 KB); -+} -+ -+int LZ4_decompress_fast_withPrefix64k(const char* source, char* dest, int originalSize) -+{ -+ return LZ4_decompress_generic(source, dest, 0, originalSize, endOnOutputSize, full, 0, withPrefix64k, (BYTE*)dest - 64 KB, NULL, 64 KB); -+} -+ -+#endif /* LZ4_COMMONDEFS_ONLY */ -diff --git mfbt/lz4.h mfbt/lz4.h -index bf6780122f6f..86ca0d59c1f4 100644 ---- mfbt/lz4.h -+++ mfbt/lz4.h -@@ -1,7 +1,8 @@ - /* -- LZ4 - Fast LZ compression algorithm -- Header File -- Copyright (C) 2011-2014, Yann Collet. -+ * LZ4 - Fast LZ compression algorithm -+ * Header File -+ * Copyright (C) 2011-2017, Yann Collet. -+ - BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php) - - Redistribution and use in source and binary forms, with or without -@@ -28,247 +29,433 @@ - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - You can contact the author at : -- - LZ4 source repository : http://code.google.com/p/lz4/ -- - LZ4 public forum : https://groups.google.com/forum/#!forum/lz4c -+ - LZ4 homepage : http://www.lz4.org -+ - LZ4 source repository : https://github.com/lz4/lz4 - */ --#pragma once -- - #if defined (__cplusplus) - extern "C" { - #endif - -+#ifndef LZ4_H_2983827168210 -+#define LZ4_H_2983827168210 - --/************************************** -- Version --**************************************/ --#define LZ4_VERSION_MAJOR 1 /* for major interface/format changes */ --#define LZ4_VERSION_MINOR 2 /* for minor interface/format changes */ -+/* --- Dependency --- */ -+#include /* size_t */ -+ -+ -+/** -+ Introduction -+ -+ LZ4 is lossless compression algorithm, providing compression speed at 400 MB/s per core, -+ scalable with multi-cores CPU. It features an extremely fast decoder, with speed in -+ multiple GB/s per core, typically reaching RAM speed limits on multi-core systems. -+ -+ The LZ4 compression library provides in-memory compression and decompression functions. -+ Compression can be done in: -+ - a single step (described as Simple Functions) -+ - a single step, reusing a context (described in Advanced Functions) -+ - unbounded multiple steps (described as Streaming compression) -+ -+ lz4.h provides block compression functions. It gives full buffer control to user. -+ Decompressing an lz4-compressed block also requires metadata (such as compressed size). -+ Each application is free to encode such metadata in whichever way it wants. -+ -+ An additional format, called LZ4 frame specification (doc/lz4_Frame_format.md), -+ take care of encoding standard metadata alongside LZ4-compressed blocks. -+ If your application requires interoperability, it's recommended to use it. -+ A library is provided to take care of it, see lz4frame.h. -+*/ -+ -+/*^*************************************************************** -+* Export parameters -+*****************************************************************/ -+/* -+* LZ4_DLL_EXPORT : -+* Enable exporting of functions when building a Windows DLL -+* LZ4LIB_API : -+* Control library symbols visibility. -+*/ -+#if defined(LZ4_DLL_EXPORT) && (LZ4_DLL_EXPORT==1) -+# define LZ4LIB_API __declspec(dllexport) -+#elif defined(LZ4_DLL_IMPORT) && (LZ4_DLL_IMPORT==1) -+# define LZ4LIB_API __declspec(dllimport) /* It isn't required but allows to generate better code, saving a function pointer load from the IAT and an indirect jump.*/ -+#elif defined(__GNUC__) && (__GNUC__ >= 4) -+# define LZ4LIB_API __attribute__ ((__visibility__ ("default"))) -+#else -+# define LZ4LIB_API -+#endif -+ -+ -+/*------ Version ------*/ -+#define LZ4_VERSION_MAJOR 1 /* for breaking interface changes */ -+#define LZ4_VERSION_MINOR 8 /* for new (non-breaking) interface capabilities */ - #define LZ4_VERSION_RELEASE 0 /* for tweaks, bug-fixes, or development */ - -+#define LZ4_VERSION_NUMBER (LZ4_VERSION_MAJOR *100*100 + LZ4_VERSION_MINOR *100 + LZ4_VERSION_RELEASE) - --/************************************** -- Tuning parameter -+#define LZ4_LIB_VERSION LZ4_VERSION_MAJOR.LZ4_VERSION_MINOR.LZ4_VERSION_RELEASE -+#define LZ4_QUOTE(str) #str -+#define LZ4_EXPAND_AND_QUOTE(str) LZ4_QUOTE(str) -+#define LZ4_VERSION_STRING LZ4_EXPAND_AND_QUOTE(LZ4_LIB_VERSION) -+ -+LZ4LIB_API int LZ4_versionNumber (void); /**< library version number; to be used when checking dll version */ -+LZ4LIB_API const char* LZ4_versionString (void); /**< library version string; to be used when checking dll version */ -+ -+ -+/*-************************************ -+* Tuning parameter - **************************************/ --/* -+/*! - * LZ4_MEMORY_USAGE : - * Memory usage formula : N->2^N Bytes (examples : 10 -> 1KB; 12 -> 4KB ; 16 -> 64KB; 20 -> 1MB; etc.) - * Increasing memory usage improves compression ratio - * Reduced memory usage can improve speed, due to cache effect - * Default value is 14, for 16KB, which nicely fits into Intel x86 L1 cache - */ --#define LZ4_MEMORY_USAGE 14 -- -+#ifndef LZ4_MEMORY_USAGE -+# define LZ4_MEMORY_USAGE 14 -+#endif - --/************************************** -- Simple Functions -+/*-************************************ -+* Simple Functions - **************************************/ -- --int LZ4_compress (const char* source, char* dest, int inputSize); --int LZ4_decompress_safe (const char* source, char* dest, int compressedSize, int maxOutputSize); -- --/* --LZ4_compress() : -- Compresses 'inputSize' bytes from 'source' into 'dest'. -- Destination buffer must be already allocated, -- and must be sized to handle worst cases situations (input data not compressible) -- Worst case size evaluation is provided by function LZ4_compressBound() -- inputSize : Max supported value is LZ4_MAX_INPUT_VALUE -- return : the number of bytes written in buffer dest -- or 0 if the compression fails -- --LZ4_decompress_safe() : -- compressedSize : is obviously the source size -- maxOutputSize : is the size of the destination buffer, which must be already allocated. -- return : the number of bytes decoded in the destination buffer (necessarily <= maxOutputSize) -- If the destination buffer is not large enough, decoding will stop and output an error code (<0). -+/*! LZ4_compress_default() : -+ Compresses 'sourceSize' bytes from buffer 'source' -+ into already allocated 'dest' buffer of size 'maxDestSize'. -+ Compression is guaranteed to succeed if 'maxDestSize' >= LZ4_compressBound(sourceSize). -+ It also runs faster, so it's a recommended setting. -+ If the function cannot compress 'source' into a more limited 'dest' budget, -+ compression stops *immediately*, and the function result is zero. -+ As a consequence, 'dest' content is not valid. -+ This function never writes outside 'dest' buffer, nor read outside 'source' buffer. -+ sourceSize : Max supported value is LZ4_MAX_INPUT_VALUE -+ maxDestSize : full or partial size of buffer 'dest' (which must be already allocated) -+ return : the number of bytes written into buffer 'dest' (necessarily <= maxOutputSize) -+ or 0 if compression fails */ -+LZ4LIB_API int LZ4_compress_default(const char* source, char* dest, int sourceSize, int maxDestSize); -+ -+/*! LZ4_decompress_safe() : -+ compressedSize : is the precise full size of the compressed block. -+ maxDecompressedSize : is the size of destination buffer, which must be already allocated. -+ return : the number of bytes decompressed into destination buffer (necessarily <= maxDecompressedSize) -+ If destination buffer is not large enough, decoding will stop and output an error code (<0). - If the source stream is detected malformed, the function will stop decoding and return a negative result. -- This function is protected against buffer overflow exploits : -- it never writes outside of output buffer, and never reads outside of input buffer. -- Therefore, it is protected against malicious data packets. --*/ -- -- --/* --Note : -- Should you prefer to explicitly allocate compression-table memory using your own allocation method, -- use the streaming functions provided below, simply reset the memory area between each call to LZ4_compress_continue() -+ This function is protected against buffer overflow exploits, including malicious data packets. -+ It never writes outside output buffer, nor reads outside input buffer. - */ -+LZ4LIB_API int LZ4_decompress_safe (const char* source, char* dest, int compressedSize, int maxDecompressedSize); - - --/************************************** -- Advanced Functions -+/*-************************************ -+* Advanced Functions - **************************************/ - #define LZ4_MAX_INPUT_SIZE 0x7E000000 /* 2 113 929 216 bytes */ --#define LZ4_COMPRESSBOUND(isize) ((unsigned int)(isize) > (unsigned int)LZ4_MAX_INPUT_SIZE ? 0 : (isize) + ((isize)/255) + 16) -+#define LZ4_COMPRESSBOUND(isize) ((unsigned)(isize) > (unsigned)LZ4_MAX_INPUT_SIZE ? 0 : (isize) + ((isize)/255) + 16) - --/* -+/*! - LZ4_compressBound() : -- Provides the maximum size that LZ4 may output in a "worst case" scenario (input data not compressible) -- primarily useful for memory allocation of output buffer. -- macro is also provided when result needs to be evaluated at compilation (such as stack memory allocation). -- -- isize : is the input size. Max supported value is LZ4_MAX_INPUT_SIZE -- return : maximum output size in a "worst case" scenario -- or 0, if input size is too large ( > LZ4_MAX_INPUT_SIZE) -+ Provides the maximum size that LZ4 compression may output in a "worst case" scenario (input data not compressible) -+ This function is primarily useful for memory allocation purposes (destination buffer size). -+ Macro LZ4_COMPRESSBOUND() is also provided for compilation-time evaluation (stack memory allocation for example). -+ Note that LZ4_compress_default() compress faster when dest buffer size is >= LZ4_compressBound(srcSize) -+ inputSize : max supported value is LZ4_MAX_INPUT_SIZE -+ return : maximum output size in a "worst case" scenario -+ or 0, if input size is too large ( > LZ4_MAX_INPUT_SIZE) -+*/ -+LZ4LIB_API int LZ4_compressBound(int inputSize); -+ -+/*! -+LZ4_compress_fast() : -+ Same as LZ4_compress_default(), but allows to select an "acceleration" factor. -+ The larger the acceleration value, the faster the algorithm, but also the lesser the compression. -+ It's a trade-off. It can be fine tuned, with each successive value providing roughly +~3% to speed. -+ An acceleration value of "1" is the same as regular LZ4_compress_default() -+ Values <= 0 will be replaced by ACCELERATION_DEFAULT (see lz4.c), which is 1. - */ --int LZ4_compressBound(int isize); -+LZ4LIB_API int LZ4_compress_fast (const char* source, char* dest, int sourceSize, int maxDestSize, int acceleration); - - --/* --LZ4_compress_limitedOutput() : -- Compress 'inputSize' bytes from 'source' into an output buffer 'dest' of maximum size 'maxOutputSize'. -- If it cannot achieve it, compression will stop, and result of the function will be zero. -- This function never writes outside of provided output buffer. -- -- inputSize : Max supported value is LZ4_MAX_INPUT_VALUE -- maxOutputSize : is the size of the destination buffer (which must be already allocated) -- return : the number of bytes written in buffer 'dest' -- or 0 if the compression fails -+/*! -+LZ4_compress_fast_extState() : -+ Same compression function, just using an externally allocated memory space to store compression state. -+ Use LZ4_sizeofState() to know how much memory must be allocated, -+ and allocate it on 8-bytes boundaries (using malloc() typically). -+ Then, provide it as 'void* state' to compression function. -+*/ -+LZ4LIB_API int LZ4_sizeofState(void); -+LZ4LIB_API int LZ4_compress_fast_extState (void* state, const char* source, char* dest, int inputSize, int maxDestSize, int acceleration); -+ -+ -+/*! -+LZ4_compress_destSize() : -+ Reverse the logic, by compressing as much data as possible from 'source' buffer -+ into already allocated buffer 'dest' of size 'targetDestSize'. -+ This function either compresses the entire 'source' content into 'dest' if it's large enough, -+ or fill 'dest' buffer completely with as much data as possible from 'source'. -+ *sourceSizePtr : will be modified to indicate how many bytes where read from 'source' to fill 'dest'. -+ New value is necessarily <= old value. -+ return : Nb bytes written into 'dest' (necessarily <= targetDestSize) -+ or 0 if compression fails - */ --int LZ4_compress_limitedOutput (const char* source, char* dest, int inputSize, int maxOutputSize); -+LZ4LIB_API int LZ4_compress_destSize (const char* source, char* dest, int* sourceSizePtr, int targetDestSize); - - --/* -+/*! - LZ4_decompress_fast() : - originalSize : is the original and therefore uncompressed size - return : the number of bytes read from the source buffer (in other words, the compressed size) -- If the source stream is malformed, the function will stop decoding and return a negative result. -+ If the source stream is detected malformed, the function will stop decoding and return a negative result. - Destination buffer must be already allocated. Its size must be a minimum of 'originalSize' bytes. -- note : This function is a bit faster than LZ4_decompress_safe() -- It provides fast decompression and fully respect memory boundaries for properly formed compressed data. -- It does not provide full protection against intentionnally modified data stream. -- Use this function in a trusted environment (data to decode comes from a trusted source). -+ note : This function fully respect memory boundaries for properly formed compressed data. -+ It is a bit faster than LZ4_decompress_safe(). -+ However, it does not provide any protection against intentionally modified data stream (malicious input). -+ Use this function in trusted environment only (data to decode comes from a trusted source). - */ --int LZ4_decompress_fast (const char* source, char* dest, int originalSize); -+LZ4LIB_API int LZ4_decompress_fast (const char* source, char* dest, int originalSize); - -- --/* -+/*! - LZ4_decompress_safe_partial() : - This function decompress a compressed block of size 'compressedSize' at position 'source' -- into output buffer 'dest' of size 'maxOutputSize'. -+ into destination buffer 'dest' of size 'maxDecompressedSize'. - The function tries to stop decompressing operation as soon as 'targetOutputSize' has been reached, - reducing decompression time. -- return : the number of bytes decoded in the destination buffer (necessarily <= maxOutputSize) -+ return : the number of bytes decoded in the destination buffer (necessarily <= maxDecompressedSize) - Note : this number can be < 'targetOutputSize' should the compressed block to decode be smaller. - Always control how many bytes were decoded. - If the source stream is detected malformed, the function will stop decoding and return a negative result. - This function never writes outside of output buffer, and never reads outside of input buffer. It is therefore protected against malicious data packets - */ --int LZ4_decompress_safe_partial (const char* source, char* dest, int compressedSize, int targetOutputSize, int maxOutputSize); -+LZ4LIB_API int LZ4_decompress_safe_partial (const char* source, char* dest, int compressedSize, int targetOutputSize, int maxDecompressedSize); - - --/*********************************************** -- Experimental Streaming Compression Functions -+/*-********************************************* -+* Streaming Compression Functions - ***********************************************/ -+typedef union LZ4_stream_u LZ4_stream_t; /* incomplete type (defined later) */ - --#define LZ4_STREAMSIZE_U32 ((1 << (LZ4_MEMORY_USAGE-2)) + 8) --#define LZ4_STREAMSIZE (LZ4_STREAMSIZE_U32 * sizeof(unsigned int)) --/* -- * LZ4_stream_t -- * information structure to track an LZ4 stream. -- * important : set this structure content to zero before first use ! -- */ --typedef struct { unsigned int table[LZ4_STREAMSIZE_U32]; } LZ4_stream_t; -- --/* -- * If you prefer dynamic allocation methods, -- * LZ4_createStream -- * provides a pointer (void*) towards an initialized LZ4_stream_t structure. -- * LZ4_free just frees it. -+/*! LZ4_createStream() and LZ4_freeStream() : -+ * LZ4_createStream() will allocate and initialize an `LZ4_stream_t` structure. -+ * LZ4_freeStream() releases its memory. - */ --void* LZ4_createStream(); --int LZ4_free (void* LZ4_stream); -- -+LZ4LIB_API LZ4_stream_t* LZ4_createStream(void); -+LZ4LIB_API int LZ4_freeStream (LZ4_stream_t* streamPtr); - --/* -- * LZ4_loadDict -- * Use this function to load a static dictionary into LZ4_stream. -- * Any previous data will be forgotten, only 'dictionary' will remain in memory. -- * Loading a size of 0 is allowed (same effect as init). -- * Return : 1 if OK, 0 if error -+/*! LZ4_resetStream() : -+ * An LZ4_stream_t structure can be allocated once and re-used multiple times. -+ * Use this function to init an allocated `LZ4_stream_t` structure and start a new compression. - */ --int LZ4_loadDict (void* LZ4_stream, const char* dictionary, int dictSize); -+LZ4LIB_API void LZ4_resetStream (LZ4_stream_t* streamPtr); - --/* -- * LZ4_compress_continue -- * Compress data block 'source', using blocks compressed before as dictionary to improve compression ratio -- * Previous data blocks are assumed to still be present at their previous location. -+/*! LZ4_loadDict() : -+ * Use this function to load a static dictionary into LZ4_stream. -+ * Any previous data will be forgotten, only 'dictionary' will remain in memory. -+ * Loading a size of 0 is allowed. -+ * Return : dictionary size, in bytes (necessarily <= 64 KB) - */ --int LZ4_compress_continue (void* LZ4_stream, const char* source, char* dest, int inputSize); -- --/* -- * LZ4_compress_limitedOutput_continue -- * Same as before, but also specify a maximum target compressed size (maxOutputSize) -- * If objective cannot be met, compression exits, and returns a zero. -+LZ4LIB_API int LZ4_loadDict (LZ4_stream_t* streamPtr, const char* dictionary, int dictSize); -+ -+/*! LZ4_compress_fast_continue() : -+ * Compress buffer content 'src', using data from previously compressed blocks as dictionary to improve compression ratio. -+ * Important : Previous data blocks are assumed to remain present and unmodified ! -+ * 'dst' buffer must be already allocated. -+ * If dstCapacity >= LZ4_compressBound(srcSize), compression is guaranteed to succeed, and runs faster. -+ * If not, and if compressed data cannot fit into 'dst' buffer size, compression stops, and function @return==0. -+ * After an error, the stream status is invalid, it can only be reset or freed. - */ --int LZ4_compress_limitedOutput_continue (void* LZ4_stream, const char* source, char* dest, int inputSize, int maxOutputSize); -+LZ4LIB_API int LZ4_compress_fast_continue (LZ4_stream_t* streamPtr, const char* src, char* dst, int srcSize, int dstCapacity, int acceleration); - --/* -- * LZ4_saveDict -- * If previously compressed data block is not guaranteed to remain at its previous memory location -- * save it into a safe place (char* safeBuffer) -- * Note : you don't need to call LZ4_loadDict() afterwards, -- * dictionary is immediately usable, you can therefore call again LZ4_compress_continue() -- * Return : 1 if OK, 0 if error -- * Note : any dictSize > 64 KB will be interpreted as 64KB. -+/*! LZ4_saveDict() : -+ * If previously compressed data block is not guaranteed to remain available at its current memory location, -+ * save it into a safer place (char* safeBuffer). -+ * Note : it's not necessary to call LZ4_loadDict() after LZ4_saveDict(), dictionary is immediately usable. -+ * @return : saved dictionary size in bytes (necessarily <= dictSize), or 0 if error. - */ --int LZ4_saveDict (void* LZ4_stream, char* safeBuffer, int dictSize); -+LZ4LIB_API int LZ4_saveDict (LZ4_stream_t* streamPtr, char* safeBuffer, int dictSize); - - --/************************************************ -- Experimental Streaming Decompression Functions -+/*-********************************************** -+* Streaming Decompression Functions -+* Bufferless synchronous API - ************************************************/ -+typedef union LZ4_streamDecode_u LZ4_streamDecode_t; /* incomplete type (defined later) */ - --#define LZ4_STREAMDECODESIZE_U32 4 --#define LZ4_STREAMDECODESIZE (LZ4_STREAMDECODESIZE_U32 * sizeof(unsigned int)) --/* -- * LZ4_streamDecode_t -- * information structure to track an LZ4 stream. -- * important : set this structure content to zero before first use ! -+/*! LZ4_createStreamDecode() and LZ4_freeStreamDecode() : -+ * creation / destruction of streaming decompression tracking structure */ -+LZ4LIB_API LZ4_streamDecode_t* LZ4_createStreamDecode(void); -+LZ4LIB_API int LZ4_freeStreamDecode (LZ4_streamDecode_t* LZ4_stream); -+ -+/*! LZ4_setStreamDecode() : -+ * Use this function to instruct where to find the dictionary. -+ * Setting a size of 0 is allowed (same effect as reset). -+ * @return : 1 if OK, 0 if error - */ --typedef struct { unsigned int table[LZ4_STREAMDECODESIZE_U32]; } LZ4_streamDecode_t; -+LZ4LIB_API int LZ4_setStreamDecode (LZ4_streamDecode_t* LZ4_streamDecode, const char* dictionary, int dictSize); -+ -+/*! LZ4_decompress_*_continue() : -+ * These decoding functions allow decompression of multiple blocks in "streaming" mode. -+ * Previously decoded blocks *must* remain available at the memory position where they were decoded (up to 64 KB) -+ * In the case of a ring buffers, decoding buffer must be either : -+ * - Exactly same size as encoding buffer, with same update rule (block boundaries at same positions) -+ * In which case, the decoding & encoding ring buffer can have any size, including very small ones ( < 64 KB). -+ * - Larger than encoding buffer, by a minimum of maxBlockSize more bytes. -+ * maxBlockSize is implementation dependent. It's the maximum size you intend to compress into a single block. -+ * In which case, encoding and decoding buffers do not need to be synchronized, -+ * and encoding ring buffer can have any size, including small ones ( < 64 KB). -+ * - _At least_ 64 KB + 8 bytes + maxBlockSize. -+ * In which case, encoding and decoding buffers do not need to be synchronized, -+ * and encoding ring buffer can have any size, including larger than decoding buffer. -+ * Whenever these conditions are not possible, save the last 64KB of decoded data into a safe buffer, -+ * and indicate where it is saved using LZ4_setStreamDecode() -+*/ -+LZ4LIB_API int LZ4_decompress_safe_continue (LZ4_streamDecode_t* LZ4_streamDecode, const char* source, char* dest, int compressedSize, int maxDecompressedSize); -+LZ4LIB_API int LZ4_decompress_fast_continue (LZ4_streamDecode_t* LZ4_streamDecode, const char* source, char* dest, int originalSize); - --/* -- * If you prefer dynamic allocation methods, -- * LZ4_createStreamDecode() -- * provides a pointer (void*) towards an initialized LZ4_streamDecode_t structure. -- * LZ4_free just frees it. -+ -+/*! LZ4_decompress_*_usingDict() : -+ * These decoding functions work the same as -+ * a combination of LZ4_setStreamDecode() followed by LZ4_decompress_*_continue() -+ * They are stand-alone, and don't need an LZ4_streamDecode_t structure. - */ --void* LZ4_createStreamDecode(); --int LZ4_free (void* LZ4_stream); /* yes, it's the same one as for compression */ -+LZ4LIB_API int LZ4_decompress_safe_usingDict (const char* source, char* dest, int compressedSize, int maxDecompressedSize, const char* dictStart, int dictSize); -+LZ4LIB_API int LZ4_decompress_fast_usingDict (const char* source, char* dest, int originalSize, const char* dictStart, int dictSize); -+ -+ -+/*^********************************************** -+ * !!!!!! STATIC LINKING ONLY !!!!!! -+ ***********************************************/ -+/*-************************************ -+ * Private definitions -+ ************************************** -+ * Do not use these definitions. -+ * They are exposed to allow static allocation of `LZ4_stream_t` and `LZ4_streamDecode_t`. -+ * Using these definitions will expose code to API and/or ABI break in future versions of the library. -+ **************************************/ -+#define LZ4_HASHLOG (LZ4_MEMORY_USAGE-2) -+#define LZ4_HASHTABLESIZE (1 << LZ4_MEMORY_USAGE) -+#define LZ4_HASH_SIZE_U32 (1 << LZ4_HASHLOG) /* required as macro for static allocation */ -+ -+#if defined(__cplusplus) || (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 */) -+#include -+ -+typedef struct { -+ uint32_t hashTable[LZ4_HASH_SIZE_U32]; -+ uint32_t currentOffset; -+ uint32_t initCheck; -+ const uint8_t* dictionary; -+ uint8_t* bufferStart; /* obsolete, used for slideInputBuffer */ -+ uint32_t dictSize; -+} LZ4_stream_t_internal; -+ -+typedef struct { -+ const uint8_t* externalDict; -+ size_t extDictSize; -+ const uint8_t* prefixEnd; -+ size_t prefixSize; -+} LZ4_streamDecode_t_internal; -+ -+#else -+ -+typedef struct { -+ unsigned int hashTable[LZ4_HASH_SIZE_U32]; -+ unsigned int currentOffset; -+ unsigned int initCheck; -+ const unsigned char* dictionary; -+ unsigned char* bufferStart; /* obsolete, used for slideInputBuffer */ -+ unsigned int dictSize; -+} LZ4_stream_t_internal; -+ -+typedef struct { -+ const unsigned char* externalDict; -+ size_t extDictSize; -+ const unsigned char* prefixEnd; -+ size_t prefixSize; -+} LZ4_streamDecode_t_internal; - --/* --*_continue() : -- These decoding functions allow decompression of multiple blocks in "streaming" mode. -- Previously decoded blocks must still be available at the memory position where they were decoded. -- If it's not possible, save the relevant part of decoded data into a safe buffer, -- and indicate where it stands using LZ4_setDictDecode() --*/ --int LZ4_decompress_safe_continue (void* LZ4_streamDecode, const char* source, char* dest, int compressedSize, int maxOutputSize); --int LZ4_decompress_fast_continue (void* LZ4_streamDecode, const char* source, char* dest, int originalSize); -+#endif - --/* -- * LZ4_setDictDecode -- * Use this function to instruct where to find the dictionary. -- * This function can be used to specify a static dictionary, -- * or to instruct where to find some previously decoded data saved into a different memory space. -- * Setting a size of 0 is allowed (same effect as no dictionary). -- * Return : 1 if OK, 0 if error -+/*! -+ * LZ4_stream_t : -+ * information structure to track an LZ4 stream. -+ * init this structure before first use. -+ * note : only use in association with static linking ! -+ * this definition is not API/ABI safe, -+ * it may change in a future version ! - */ --int LZ4_setDictDecode (void* LZ4_streamDecode, const char* dictionary, int dictSize); -+#define LZ4_STREAMSIZE_U64 ((1 << (LZ4_MEMORY_USAGE-3)) + 4) -+#define LZ4_STREAMSIZE (LZ4_STREAMSIZE_U64 * sizeof(unsigned long long)) -+union LZ4_stream_u { -+ unsigned long long table[LZ4_STREAMSIZE_U64]; -+ LZ4_stream_t_internal internal_donotuse; -+} ; /* previously typedef'd to LZ4_stream_t */ -+ -+ -+/*! -+ * LZ4_streamDecode_t : -+ * information structure to track an LZ4 stream during decompression. -+ * init this structure using LZ4_setStreamDecode (or memset()) before first use -+ * note : only use in association with static linking ! -+ * this definition is not API/ABI safe, -+ * and may change in a future version ! -+ */ -+#define LZ4_STREAMDECODESIZE_U64 4 -+#define LZ4_STREAMDECODESIZE (LZ4_STREAMDECODESIZE_U64 * sizeof(unsigned long long)) -+union LZ4_streamDecode_u { -+ unsigned long long table[LZ4_STREAMDECODESIZE_U64]; -+ LZ4_streamDecode_t_internal internal_donotuse; -+} ; /* previously typedef'd to LZ4_streamDecode_t */ - - --/* --Advanced decoding functions : --*_usingDict() : -- These decoding functions work the same as -- a combination of LZ4_setDictDecode() followed by LZ4_decompress_x_continue() -- all together into a single function call. -- It doesn't use nor update an LZ4_streamDecode_t structure. --*/ --int LZ4_decompress_safe_usingDict (const char* source, char* dest, int compressedSize, int maxOutputSize, const char* dictStart, int dictSize); --int LZ4_decompress_fast_usingDict (const char* source, char* dest, int originalSize, const char* dictStart, int dictSize); -+/*-************************************ -+* Obsolete Functions -+**************************************/ - -+/*! Deprecation warnings -+ Should deprecation warnings be a problem, -+ it is generally possible to disable them, -+ typically with -Wno-deprecated-declarations for gcc -+ or _CRT_SECURE_NO_WARNINGS in Visual. -+ Otherwise, it's also possible to define LZ4_DISABLE_DEPRECATE_WARNINGS */ -+#ifdef LZ4_DISABLE_DEPRECATE_WARNINGS -+# define LZ4_DEPRECATED(message) /* disable deprecation warnings */ -+#else -+# define LZ4_GCC_VERSION (__GNUC__ * 100 + __GNUC_MINOR__) -+# if defined (__cplusplus) && (__cplusplus >= 201402) /* C++14 or greater */ -+# define LZ4_DEPRECATED(message) [[deprecated(message)]] -+# elif (LZ4_GCC_VERSION >= 405) || defined(__clang__) -+# define LZ4_DEPRECATED(message) __attribute__((deprecated(message))) -+# elif (LZ4_GCC_VERSION >= 301) -+# define LZ4_DEPRECATED(message) __attribute__((deprecated)) -+# elif defined(_MSC_VER) -+# define LZ4_DEPRECATED(message) __declspec(deprecated(message)) -+# else -+# pragma message("WARNING: You need to implement LZ4_DEPRECATED for this compiler") -+# define LZ4_DEPRECATED(message) -+# endif -+#endif /* LZ4_DISABLE_DEPRECATE_WARNINGS */ -+ -+/* Obsolete compression functions */ -+LZ4LIB_API LZ4_DEPRECATED("use LZ4_compress_default() instead") int LZ4_compress (const char* source, char* dest, int sourceSize); -+LZ4LIB_API LZ4_DEPRECATED("use LZ4_compress_default() instead") int LZ4_compress_limitedOutput (const char* source, char* dest, int sourceSize, int maxOutputSize); -+LZ4LIB_API LZ4_DEPRECATED("use LZ4_compress_fast_extState() instead") int LZ4_compress_withState (void* state, const char* source, char* dest, int inputSize); -+LZ4LIB_API LZ4_DEPRECATED("use LZ4_compress_fast_extState() instead") int LZ4_compress_limitedOutput_withState (void* state, const char* source, char* dest, int inputSize, int maxOutputSize); -+LZ4LIB_API LZ4_DEPRECATED("use LZ4_compress_fast_continue() instead") int LZ4_compress_continue (LZ4_stream_t* LZ4_streamPtr, const char* source, char* dest, int inputSize); -+LZ4LIB_API LZ4_DEPRECATED("use LZ4_compress_fast_continue() instead") int LZ4_compress_limitedOutput_continue (LZ4_stream_t* LZ4_streamPtr, const char* source, char* dest, int inputSize, int maxOutputSize); -+ -+/* Obsolete decompression functions */ -+LZ4LIB_API LZ4_DEPRECATED("use LZ4_decompress_fast() instead") int LZ4_uncompress (const char* source, char* dest, int outputSize); -+LZ4LIB_API LZ4_DEPRECATED("use LZ4_decompress_safe() instead") int LZ4_uncompress_unknownOutputSize (const char* source, char* dest, int isize, int maxOutputSize); -+ -+/* Obsolete streaming functions; use new streaming interface whenever possible */ -+LZ4LIB_API LZ4_DEPRECATED("use LZ4_createStream() instead") void* LZ4_create (char* inputBuffer); -+LZ4LIB_API LZ4_DEPRECATED("use LZ4_createStream() instead") int LZ4_sizeofStreamState(void); -+LZ4LIB_API LZ4_DEPRECATED("use LZ4_resetStream() instead") int LZ4_resetStreamState(void* state, char* inputBuffer); -+LZ4LIB_API LZ4_DEPRECATED("use LZ4_saveDict() instead") char* LZ4_slideInputBuffer (void* state); -+ -+/* Obsolete streaming decoding functions */ -+LZ4LIB_API LZ4_DEPRECATED("use LZ4_decompress_safe_usingDict() instead") int LZ4_decompress_safe_withPrefix64k (const char* src, char* dst, int compressedSize, int maxDstSize); -+LZ4LIB_API LZ4_DEPRECATED("use LZ4_decompress_fast_usingDict() instead") int LZ4_decompress_fast_withPrefix64k (const char* src, char* dst, int originalSize); -+ -+#endif /* LZ4_H_2983827168210 */ - - - #if defined (__cplusplus) diff --git a/www/waterfox/files/patch-bug1398539 b/www/waterfox/files/patch-bug1398539 deleted file mode 100644 index 1ae235da8b4..00000000000 --- a/www/waterfox/files/patch-bug1398539 +++ /dev/null @@ -1,159 +0,0 @@ -commit 8b33a0a29e7e -Author: Lee Bousfield -Date: Wed Sep 13 18:28:51 2017 -0600 - - Bug 1398539: Inhibit screensaver with XScreenSaverSuspend r=karlt - - MozReview-Commit-ID: LhhpaDaPdaO - - --HG-- - extra : rebase_source : 6d53031ea8669b15cdf6fad4c55c58624bd54c38 ---- - widget/gtk/WakeLockListener.cpp | 91 ++++++++++++++++++++++++++++++++++++++++- - 1 file changed, 90 insertions(+), 1 deletion(-) - -diff --git widget/gtk/WakeLockListener.cpp widget/gtk/WakeLockListener.cpp -index 3c6d7fb186a3..93d2c5a16208 100644 ---- widget/gtk/WakeLockListener.cpp -+++ widget/gtk/WakeLockListener.cpp -@@ -15,6 +15,10 @@ - #include "mozilla/ipc/DBusMessageRefPtr.h" - #include "mozilla/ipc/DBusPendingCallRefPtr.h" - -+#if defined(MOZ_X11) -+#include "prlink.h" -+#endif -+ - #define FREEDESKTOP_SCREENSAVER_TARGET "org.freedesktop.ScreenSaver" - #define FREEDESKTOP_SCREENSAVER_OBJECT "/ScreenSaver" - #define FREEDESKTOP_SCREENSAVER_INTERFACE "org.freedesktop.ScreenSaver" -@@ -32,6 +36,9 @@ StaticRefPtr WakeLockListener::sSingleton; - enum DesktopEnvironment { - FreeDesktop, - GNOME, -+#if defined(MOZ_X11) -+ XScreenSaver, -+#endif - Unsupported, - }; - -@@ -59,6 +66,11 @@ private: - bool SendGNOMEInhibitMessage(); - bool SendMessage(DBusMessage* aMessage); - -+#if defined(MOZ_X11) -+ static bool CheckXScreenSaverSupport(); -+ static bool InhibitXScreenSaver(bool inhibit); -+#endif -+ - static void ReceiveInhibitReply(DBusPendingCall* aPending, void* aUserData); - void InhibitFailed(); - void InhibitSucceeded(uint32_t aInhibitRequest); -@@ -143,6 +155,71 @@ WakeLockTopic::SendGNOMEInhibitMessage() - } - - -+#if defined(MOZ_X11) -+ -+typedef Bool (*_XScreenSaverQueryExtension_fn)(Display* dpy, int* event_base, -+ int* error_base); -+typedef Bool (*_XScreenSaverQueryVersion_fn)(Display* dpy, int* major, -+ int* minor); -+typedef void (*_XScreenSaverSuspend_fn)(Display* dpy, Bool suspend); -+ -+static PRLibrary* sXssLib = nullptr; -+static _XScreenSaverQueryExtension_fn _XSSQueryExtension = nullptr; -+static _XScreenSaverQueryVersion_fn _XSSQueryVersion = nullptr; -+static _XScreenSaverSuspend_fn _XSSSuspend = nullptr; -+ -+/* static */ bool -+WakeLockTopic::CheckXScreenSaverSupport() -+{ -+ if (!sXssLib) { -+ sXssLib = PR_LoadLibrary("libXss.so.1"); -+ if (!sXssLib) { -+ return false; -+ } -+ } -+ -+ _XSSQueryExtension = (_XScreenSaverQueryExtension_fn) -+ PR_FindFunctionSymbol(sXssLib, "XScreenSaverQueryExtension"); -+ _XSSQueryVersion = (_XScreenSaverQueryVersion_fn) -+ PR_FindFunctionSymbol(sXssLib, "XScreenSaverQueryVersion"); -+ _XSSSuspend = (_XScreenSaverSuspend_fn) -+ PR_FindFunctionSymbol(sXssLib, "XScreenSaverSuspend"); -+ if (!_XSSQueryExtension || !_XSSQueryVersion || !_XSSSuspend) { -+ return false; -+ } -+ -+ GdkDisplay* gDisplay = gdk_display_get_default(); -+ if (!GDK_IS_X11_DISPLAY(gDisplay)) return false; -+ Display* display = GDK_DISPLAY_XDISPLAY(gDisplay); -+ -+ int throwaway; -+ if (!_XSSQueryExtension(display, &throwaway, &throwaway)) return false; -+ -+ int major, minor; -+ if (!_XSSQueryVersion(display, &major, &minor)) return false; -+ // Needs to be compatible with version 1.1 -+ if (major != 1) return false; -+ if (minor < 1) return false; -+ -+ return true; -+} -+ -+/* static */ bool -+WakeLockTopic::InhibitXScreenSaver(bool inhibit) -+{ -+ // Should only be called if CheckXScreenSaverSupport returns true. -+ // There's a couple of safety checks here nonetheless. -+ if (!_XSSSuspend) return false; -+ GdkDisplay* gDisplay = gdk_display_get_default(); -+ if (!GDK_IS_X11_DISPLAY(gDisplay)) return false; -+ Display* display = GDK_DISPLAY_XDISPLAY(gDisplay); -+ _XSSSuspend(display, inhibit); -+ return true; -+} -+ -+#endif -+ -+ - bool - WakeLockTopic::SendInhibit() - { -@@ -156,6 +233,10 @@ WakeLockTopic::SendInhibit() - case GNOME: - sendOk = SendGNOMEInhibitMessage(); - break; -+#if defined(MOZ_X11) -+ case XScreenSaver: -+ return InhibitXScreenSaver(true); -+#endif - case Unsupported: - return false; - } -@@ -185,6 +266,11 @@ WakeLockTopic::SendUninhibit() - SESSION_MANAGER_INTERFACE, - "Uninhibit")); - } -+#if defined(MOZ_X11) -+ else if (mDesktopEnvironment == XScreenSaver) { -+ return InhibitXScreenSaver(false); -+ } -+#endif - - if (!message) { - return false; -@@ -249,8 +335,11 @@ WakeLockTopic::InhibitFailed() - - if (mDesktopEnvironment == FreeDesktop) { - mDesktopEnvironment = GNOME; -+#if defined(MOZ_X11) -+ } else if (mDesktopEnvironment == GNOME && CheckXScreenSaverSupport()) { -+ mDesktopEnvironment = XScreenSaver; -+#endif - } else { -- NS_ASSERTION(mDesktopEnvironment == GNOME, "Unknown desktop environment"); - mDesktopEnvironment = Unsupported; - mShouldInhibit = false; - } diff --git a/www/waterfox/files/patch-bug1398581 b/www/waterfox/files/patch-bug1398581 deleted file mode 100644 index 36845cb0a1a..00000000000 --- a/www/waterfox/files/patch-bug1398581 +++ /dev/null @@ -1,125 +0,0 @@ -commit 762a3ec064d0 -Author: Emilio Cobos Álvarez -Date: Mon Sep 11 09:51:30 2017 +0200 - - Bug 1398581: Ensure a first-letter doesn't incorrectly inherit from a first-line. r=heycam - - This approach kinda sucks, because we woefully throw away the style context - computed in the case it inherited from a first-line, but it's the easiest thing - I could think of without either making it more inefficient, or threading a - parent style ignoring first-line through ResolvePseudoElementStyle and related - functions. - - MozReview-Commit-ID: 3uGuU7dHEnE ---- - layout/base/nsCSSFrameConstructor.cpp | 20 +++++++++++++++++--- - 1 file changed, 17 insertions(+), 3 deletions(-) - -diff --git layout/base/nsCSSFrameConstructor.cpp layout/base/nsCSSFrameConstructor.cpp -index 76d97a32ee4d..b668a837e2f3 100644 ---- layout/base/nsCSSFrameConstructor.cpp -+++ layout/base/nsCSSFrameConstructor.cpp -@@ -11861,10 +11861,11 @@ nsCSSFrameConstructor::CreateLetterFrame(nsContainerFrame* aBlockFrame, - - // Get style context for the first-letter-frame. Keep this in sync with - // nsBlockFrame::UpdatePseudoElementStyles. -- nsStyleContext* parentStyleContext = -+ nsIFrame* parentFrame = - nsFrame::CorrectStyleParentFrame(aParentFrame, -- nsCSSPseudoElements::firstLetter)-> -- StyleContext(); -+ nsCSSPseudoElements::firstLetter); -+ -+ nsStyleContext* parentStyleContext = parentFrame->StyleContext(); - - // Use content from containing block so that we can actually - // find a matching style rule. -@@ -11873,7 +11874,20 @@ nsCSSFrameConstructor::CreateLetterFrame(nsContainerFrame* aBlockFrame, - // Create first-letter style rule - RefPtr sc = - GetFirstLetterStyle(blockContent, parentStyleContext); -+ - if (sc) { -+ if (sc->IsServo() && parentFrame->IsLineFrame()) { -+ ServoStyleContext* parentStyleIgnoringFirstLine = -+ aBlockFrame->StyleContext()->AsServo(); -+ sc = -+ mPresShell->StyleSet()->AsServo()->ReparentStyleContext( -+ sc->AsServo(), -+ parentStyleContext->AsServo(), -+ parentStyleIgnoringFirstLine, -+ parentStyleIgnoringFirstLine, -+ blockContent->AsElement()); -+ } -+ - RefPtr textSC = mPresShell->StyleSet()-> - ResolveStyleForText(aTextContent, sc); - -commit 2a9742d4b68a -Author: Emilio Cobos Álvarez -Date: Mon Sep 11 17:19:05 2017 +0200 - - Bug 1398581: Address followup comments. r=me - - MozReview-Commit-ID: CymOOl4VLPj ---- - layout/base/nsCSSFrameConstructor.cpp | 15 +-------------- - 1 file changed, 1 insertion(+), 14 deletions(-) - -diff --git layout/base/nsCSSFrameConstructor.cpp layout/base/nsCSSFrameConstructor.cpp -index b668a837e2f3..bd3d406f664f 100644 ---- layout/base/nsCSSFrameConstructor.cpp -+++ layout/base/nsCSSFrameConstructor.cpp -@@ -11884,7 +11884,7 @@ nsCSSFrameConstructor::CreateLetterFrame(nsContainerFrame* aBlockFrame, - sc->AsServo(), - parentStyleContext->AsServo(), - parentStyleIgnoringFirstLine, -- parentStyleIgnoringFirstLine, -+ parentStyleContext->AsServo(), - blockContent->AsElement()); - } - -commit 9a42394a1f71 -Author: Emilio Cobos Álvarez -Date: Mon Sep 11 17:19:30 2017 +0200 - - Bug 1398581: Crashtest. r=me - - MozReview-Commit-ID: 5xy5aeDWU12 ---- - layout/style/crashtests/1398581.html | 17 +++++++++++++++++ - layout/style/crashtests/crashtests.list | 1 + - 2 files changed, 18 insertions(+) - -diff --git layout/style/crashtests/1398581.html layout/style/crashtests/1398581.html -new file mode 100644 -index 000000000000..e056ab44d55c ---- /dev/null -+++ layout/style/crashtests/1398581.html -@@ -0,0 +1,17 @@ -+ -+ -diff --git layout/style/crashtests/crashtests.list layout/style/crashtests/crashtests.list -index a32d48fa3299..719bdaf8328a 100644 ---- layout/style/crashtests/crashtests.list -+++ layout/style/crashtests/crashtests.list -@@ -201,3 +201,4 @@ load 1384824-2.html - load 1387481-1.html - load 1387499.html - load 1391577.html -+load 1398581.html diff --git a/www/waterfox/files/patch-bug1398806 b/www/waterfox/files/patch-bug1398806 deleted file mode 100644 index ecb7d12aefc..00000000000 --- a/www/waterfox/files/patch-bug1398806 +++ /dev/null @@ -1,438 +0,0 @@ -commit 95d5501cd96b -Author: Robert Longson -Date: Tue Oct 10 07:58:34 2017 +0100 - - Bug 1398806 - GetCtx and GetNearestViewport should return the nearest svg or symbol element which is now an SVGViewportElement rather than only returning the nearest svg element because a symbol establishes a viewport too. r=dholbert, a=ritu - - --HG-- - extra : source : 813d4e250712d296eb4b11b0b89e10ed6a94e3d4 ---- - dom/svg/SVGContentUtils.cpp | 12 ++++++---- - dom/svg/SVGContentUtils.h | 5 ++-- - dom/svg/SVGLength.cpp | 2 +- - dom/svg/SVGMarkerElement.cpp | 2 +- - dom/svg/SVGMarkerElement.h | 4 ++-- - dom/svg/SVGSVGElement.h | 9 ------- - dom/svg/SVGViewportElement.h | 9 +++++++ - dom/svg/nsSVGElement.cpp | 34 +++++++++++++-------------- - dom/svg/nsSVGElement.h | 3 ++- - layout/base/nsLayoutUtils.cpp | 4 ++-- - layout/reftests/svg/reftest.list | 1 + - layout/reftests/svg/viewBox-and-symbol-01.svg | 14 +++++++++++ - layout/svg/nsCSSClipPathInstance.cpp | 1 - - layout/svg/nsSVGImageFrame.cpp | 1 - - layout/svg/nsSVGImageFrame.h | 1 - - layout/svg/nsSVGMarkerFrame.cpp | 4 ++-- - layout/svg/nsSVGMarkerFrame.h | 4 ++-- - layout/svg/nsSVGPatternFrame.cpp | 2 +- - layout/svg/nsSVGUtils.cpp | 6 ++--- - 19 files changed, 68 insertions(+), 50 deletions(-) - -diff --git dom/svg/SVGContentUtils.cpp dom/svg/SVGContentUtils.cpp -index 0f744ffd8dd1..a6bf6245e95e 100644 ---- dom/svg/SVGContentUtils.cpp -+++ dom/svg/SVGContentUtils.cpp -@@ -374,8 +374,8 @@ SVGContentUtils::EstablishesViewport(nsIContent *aContent) - nsGkAtoms::symbol); - } - --nsSVGElement* --SVGContentUtils::GetNearestViewportElement(nsIContent *aContent) -+SVGViewportElement* -+SVGContentUtils::GetNearestViewportElement(const nsIContent *aContent) - { - nsIContent *element = aContent->GetFlattenedTreeParent(); - -@@ -384,7 +384,11 @@ SVGContentUtils::GetNearestViewportElement(nsIContent *aContent) - if (element->IsSVGElement(nsGkAtoms::foreignObject)) { - return nullptr; - } -- return static_cast(element); -+ MOZ_ASSERT(element->IsAnyOfSVGElements(nsGkAtoms::svg, -+ nsGkAtoms::symbol), -+ "upcoming static_cast is only valid for " -+ "SVGViewportElement subclasses"); -+ return static_cast(element); - } - element = element->GetFlattenedTreeParent(); - } -@@ -828,7 +832,7 @@ SVGContentUtils::CoordToFloat(nsSVGElement *aContent, - return nsPresContext::AppUnitsToFloatCSSPixels(aCoord.GetCoordValue()); - - case eStyleUnit_Percent: { -- SVGSVGElement* ctx = aContent->GetCtx(); -+ SVGViewportElement* ctx = aContent->GetCtx(); - return ctx ? aCoord.GetPercentValue() * ctx->GetLength(SVGContentUtils::XY) : 0.0f; - } - default: -diff --git dom/svg/SVGContentUtils.h dom/svg/SVGContentUtils.h -index 36c74f47d75a..8ec309daf6f8 100644 ---- dom/svg/SVGContentUtils.h -+++ dom/svg/SVGContentUtils.h -@@ -32,6 +32,7 @@ class SVGPreserveAspectRatio; - namespace dom { - class Element; - class SVGSVGElement; -+class SVGViewportElement; - } // namespace dom - - } // namespace mozilla -@@ -238,8 +239,8 @@ public: - */ - static bool EstablishesViewport(nsIContent *aContent); - -- static nsSVGElement* -- GetNearestViewportElement(nsIContent *aContent); -+ static mozilla::dom::SVGViewportElement* -+ GetNearestViewportElement(const nsIContent *aContent); - - /* enum for specifying coordinate direction for ObjectSpace/UserSpace */ - enum ctxDirection { X, Y, XY }; -diff --git dom/svg/SVGLength.cpp dom/svg/SVGLength.cpp -index 6c13e2e8d1a0..cecbbc8f5b40 100644 ---- dom/svg/SVGLength.cpp -+++ dom/svg/SVGLength.cpp -@@ -177,7 +177,7 @@ SVGLength::GetUserUnitsPerUnit(const nsSVGElement *aElement, uint8_t aAxis) cons - SVGLength::GetUserUnitsPerPercent(const nsSVGElement *aElement, uint8_t aAxis) - { - if (aElement) { -- dom::SVGSVGElement *viewportElement = aElement->GetCtx(); -+ dom::SVGViewportElement *viewportElement = aElement->GetCtx(); - if (viewportElement) { - return std::max(viewportElement->GetLength(aAxis) / 100.0f, 0.0f); - } -diff --git dom/svg/SVGMarkerElement.cpp dom/svg/SVGMarkerElement.cpp -index 9b0b2fcfab1e..c4cf29ae274f 100644 ---- dom/svg/SVGMarkerElement.cpp -+++ dom/svg/SVGMarkerElement.cpp -@@ -250,7 +250,7 @@ SVGMarkerElement::UnsetAttr(int32_t aNamespaceID, nsIAtom* aName, - // nsSVGElement methods - - void --SVGMarkerElement::SetParentCoordCtxProvider(SVGSVGElement *aContext) -+SVGMarkerElement::SetParentCoordCtxProvider(SVGViewportElement *aContext) - { - mCoordCtx = aContext; - mViewBoxToViewportTransform = nullptr; -diff --git dom/svg/SVGMarkerElement.h dom/svg/SVGMarkerElement.h -index 5d32de840b7a..ae08885c646e 100644 ---- dom/svg/SVGMarkerElement.h -+++ dom/svg/SVGMarkerElement.h -@@ -153,7 +153,7 @@ protected: - const nsAString& aValue, - nsAttrValue& aResult) override; - -- void SetParentCoordCtxProvider(SVGSVGElement *aContext); -+ void SetParentCoordCtxProvider(SVGViewportElement *aContext); - - virtual LengthAttributesInfo GetLengthInfo() override; - virtual AngleAttributesInfo GetAngleInfo() override; -@@ -180,7 +180,7 @@ protected: - // derived properties (from 'orient') handled separately - nsSVGOrientType mOrientType; - -- SVGSVGElement *mCoordCtx; -+ SVGViewportElement* mCoordCtx; - nsAutoPtr mViewBoxToViewportTransform; - }; - -diff --git dom/svg/SVGSVGElement.h dom/svg/SVGSVGElement.h -index fc3d7f3b55c5..431d70da2bef 100644 ---- dom/svg/SVGSVGElement.h -+++ dom/svg/SVGSVGElement.h -@@ -182,15 +182,6 @@ public: - // SVG-as-an-image documents.) - virtual void FlushImageTransformInvalidation(); - -- svgFloatSize GetViewportSize() const { -- return svgFloatSize(mViewportWidth, mViewportHeight); -- } -- -- void SetViewportSize(const svgFloatSize& aSize) { -- mViewportWidth = aSize.width; -- mViewportHeight = aSize.height; -- } -- - private: - // SVGViewportElement methods: - -diff --git dom/svg/SVGViewportElement.h dom/svg/SVGViewportElement.h -index fbc866e6a8d2..202797785131 100644 ---- dom/svg/SVGViewportElement.h -+++ dom/svg/SVGViewportElement.h -@@ -127,6 +127,15 @@ public: - - gfx::Matrix GetViewBoxTransform() const; - -+ svgFloatSize GetViewportSize() const { -+ return svgFloatSize(mViewportWidth, mViewportHeight); -+ } -+ -+ void SetViewportSize(const svgFloatSize& aSize) { -+ mViewportWidth = aSize.width; -+ mViewportHeight = aSize.height; -+ } -+ - // WebIDL - already_AddRefed ViewBox(); - already_AddRefed PreserveAspectRatio(); -diff --git dom/svg/nsSVGElement.cpp dom/svg/nsSVGElement.cpp -index 8757150c5925..a8aaa2fb5274 100644 ---- dom/svg/nsSVGElement.cpp -+++ dom/svg/nsSVGElement.cpp -@@ -1107,7 +1107,20 @@ nsSVGElement::GetOwnerSVGElement(nsIDOMSVGElement * *aOwnerSVGElement) - SVGSVGElement* - nsSVGElement::GetOwnerSVGElement() - { -- return GetCtx(); // this may return nullptr -+ nsIContent* ancestor = GetFlattenedTreeParent(); -+ -+ while (ancestor && ancestor->IsSVGElement()) { -+ if (ancestor->IsSVGElement(nsGkAtoms::foreignObject)) { -+ return nullptr; -+ } -+ if (ancestor->IsSVGElement(nsGkAtoms::svg)) { -+ return static_cast(ancestor); -+ } -+ ancestor = ancestor->GetFlattenedTreeParent(); -+ } -+ -+ // we don't have an ancestor element... -+ return nullptr; - } - - NS_IMETHODIMP -@@ -1543,23 +1556,10 @@ nsIAtom* nsSVGElement::GetEventNameForAttr(nsIAtom* aAttr) - return aAttr; - } - --SVGSVGElement * -+SVGViewportElement * - nsSVGElement::GetCtx() const - { -- nsIContent* ancestor = GetFlattenedTreeParent(); -- -- while (ancestor && ancestor->IsSVGElement()) { -- if (ancestor->IsSVGElement(nsGkAtoms::foreignObject)) { -- return nullptr; -- } -- if (ancestor->IsSVGElement(nsGkAtoms::svg)) { -- return static_cast(ancestor); -- } -- ancestor = ancestor->GetFlattenedTreeParent(); -- } -- -- // we don't have an ancestor element... -- return nullptr; -+ return SVGContentUtils::GetNearestViewportElement(this); - } - - /* virtual */ gfxMatrix -@@ -1658,7 +1658,7 @@ nsSVGElement::GetAnimatedLengthValues(float *aFirst, ...) - NS_ASSERTION(info.mLengthCount > 0, - "GetAnimatedLengthValues on element with no length attribs"); - -- SVGSVGElement *ctx = nullptr; -+ SVGViewportElement *ctx = nullptr; - - float *f = aFirst; - uint32_t i = 0; -diff --git dom/svg/nsSVGElement.h dom/svg/nsSVGElement.h -index 28c46188d4e4..955a327561d3 100644 ---- dom/svg/nsSVGElement.h -+++ dom/svg/nsSVGElement.h -@@ -44,6 +44,7 @@ class DeclarationBlock; - - namespace dom { - class SVGSVGElement; -+class SVGViewportElement; - - static const unsigned short SVG_UNIT_TYPE_UNKNOWN = 0; - static const unsigned short SVG_UNIT_TYPE_USERSPACEONUSE = 1; -@@ -145,7 +146,7 @@ public: - // Gets the element that establishes the rectangular viewport against which - // we should resolve percentage lengths (our "coordinate context"). Returns - // nullptr for outer or SVG without an parent (invalid SVG). -- mozilla::dom::SVGSVGElement* GetCtx() const; -+ mozilla::dom::SVGViewportElement* GetCtx() const; - - /** - * Returns aMatrix pre-multiplied by (explicit or implicit) transforms that -diff --git layout/base/nsLayoutUtils.cpp layout/base/nsLayoutUtils.cpp -index f5ca2719e333..7f3f5354befc 100644 ---- layout/base/nsLayoutUtils.cpp -+++ layout/base/nsLayoutUtils.cpp -@@ -120,7 +120,7 @@ - #include "mozilla/StyleSetHandle.h" - #include "mozilla/StyleSetHandleInlines.h" - #include "RegionBuilder.h" --#include "SVGSVGElement.h" -+#include "SVGViewportElement.h" - #include "DisplayItemClip.h" - #include "mozilla/layers/WebRenderLayerManager.h" - #include "prenv.h" -@@ -9479,7 +9479,7 @@ ComputeSVGReferenceRect(nsIFrame* aFrame, - case StyleGeometryBox::ViewBox: { - nsIContent* content = aFrame->GetContent(); - nsSVGElement* element = static_cast(content); -- SVGSVGElement* svgElement = element->GetCtx(); -+ SVGViewportElement* svgElement = element->GetCtx(); - MOZ_ASSERT(svgElement); - - if (svgElement && svgElement->HasViewBoxRect()) { -diff --git layout/reftests/svg/reftest.list layout/reftests/svg/reftest.list -index 2d3981f0b65e..0b96144724bb 100644 ---- layout/reftests/svg/reftest.list -+++ layout/reftests/svg/reftest.list -@@ -532,6 +532,7 @@ fuzzy-if(skiaContent,1,100) == tspan-xy-anchor-end-01.svg tspan-xy-anchor-end-re - == viewBox-and-pattern-02.svg pass.svg - == viewBox-and-pattern-03.svg pass.svg - == viewBox-and-pattern-04.svg pass.svg -+== viewBox-and-symbol-01.svg pass.svg - == viewBox-invalid-01.svg pass.svg - == viewBox-invalid-02.svg pass.svg - == viewBox-valid-01.svg pass.svg -diff --git layout/reftests/svg/viewBox-and-symbol-01.svg layout/reftests/svg/viewBox-and-symbol-01.svg -new file mode 100644 -index 000000000000..5c8ebf7bc3ea ---- /dev/null -+++ layout/reftests/svg/viewBox-and-symbol-01.svg -@@ -0,0 +1,14 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git layout/svg/nsCSSClipPathInstance.cpp layout/svg/nsCSSClipPathInstance.cpp -index 09d3530c4ef0..0c25f7a21bb8 100644 ---- layout/svg/nsCSSClipPathInstance.cpp -+++ layout/svg/nsCSSClipPathInstance.cpp -@@ -9,7 +9,6 @@ - #include "gfx2DGlue.h" - #include "gfxContext.h" - #include "gfxPlatform.h" --#include "mozilla/dom/SVGSVGElement.h" - #include "mozilla/gfx/2D.h" - #include "mozilla/gfx/PathHelpers.h" - #include "mozilla/ShapeUtils.h" -diff --git layout/svg/nsSVGImageFrame.cpp layout/svg/nsSVGImageFrame.cpp -index 074415854667..21834954721d 100644 ---- layout/svg/nsSVGImageFrame.cpp -+++ layout/svg/nsSVGImageFrame.cpp -@@ -16,7 +16,6 @@ - #include "nsLayoutUtils.h" - #include "imgINotificationObserver.h" - #include "nsSVGEffects.h" --#include "mozilla/dom/SVGSVGElement.h" - #include "nsSVGUtils.h" - #include "SVGContentUtils.h" - #include "SVGGeometryFrame.h" -diff --git layout/svg/nsSVGImageFrame.h layout/svg/nsSVGImageFrame.h -index b2c90fd6402d..fe0ac33ac02a 100644 ---- layout/svg/nsSVGImageFrame.h -+++ layout/svg/nsSVGImageFrame.h -@@ -17,7 +17,6 @@ - #include "nsLayoutUtils.h" - #include "imgINotificationObserver.h" - #include "nsSVGEffects.h" --#include "mozilla/dom/SVGSVGElement.h" - #include "nsSVGUtils.h" - #include "SVGContentUtils.h" - #include "SVGGeometryFrame.h" -diff --git layout/svg/nsSVGMarkerFrame.cpp layout/svg/nsSVGMarkerFrame.cpp -index dbeb02ea5b2d..365a0aa70a26 100644 ---- layout/svg/nsSVGMarkerFrame.cpp -+++ layout/svg/nsSVGMarkerFrame.cpp -@@ -194,7 +194,7 @@ nsSVGMarkerFrame::GetMarkBBoxContribution(const Matrix& aToBBoxUserspace, - } - - void --nsSVGMarkerFrame::SetParentCoordCtxProvider(SVGSVGElement *aContext) -+nsSVGMarkerFrame::SetParentCoordCtxProvider(SVGViewportElement *aContext) - { - SVGMarkerElement *marker = static_cast(mContent); - marker->SetParentCoordCtxProvider(aContext); -@@ -219,7 +219,7 @@ nsSVGMarkerFrame::AutoMarkerReferencer::AutoMarkerReferencer( - mFrame->mInUse = true; - mFrame->mMarkedFrame = aMarkedFrame; - -- SVGSVGElement *ctx = -+ SVGViewportElement *ctx = - static_cast(aMarkedFrame->GetContent())->GetCtx(); - mFrame->SetParentCoordCtxProvider(ctx); - } -diff --git layout/svg/nsSVGMarkerFrame.h layout/svg/nsSVGMarkerFrame.h -index 95415e6dcc21..03099eab9324 100644 ---- layout/svg/nsSVGMarkerFrame.h -+++ layout/svg/nsSVGMarkerFrame.h -@@ -20,7 +20,7 @@ class gfxContext; - namespace mozilla { - class SVGGeometryFrame; - namespace dom { --class SVGSVGElement; -+class SVGViewportElement; - } // namespace dom - } // namespace mozilla - -@@ -119,7 +119,7 @@ private: - }; - - // nsSVGMarkerFrame methods: -- void SetParentCoordCtxProvider(mozilla::dom::SVGSVGElement *aContext); -+ void SetParentCoordCtxProvider(mozilla::dom::SVGViewportElement *aContext); - - // recursion prevention flag - bool mInUse; -diff --git layout/svg/nsSVGPatternFrame.cpp layout/svg/nsSVGPatternFrame.cpp -index 488ac2f5c783..5078fb1b5a31 100644 ---- layout/svg/nsSVGPatternFrame.cpp -+++ layout/svg/nsSVGPatternFrame.cpp -@@ -660,7 +660,7 @@ nsSVGPatternFrame::ConstructCTM(const nsSVGViewBox& aViewBox, - const Matrix &callerCTM, - nsIFrame *aTarget) - { -- SVGSVGElement *ctx = nullptr; -+ SVGViewportElement *ctx = nullptr; - nsIContent* targetContent = aTarget->GetContent(); - gfxFloat scaleX, scaleY; - -diff --git layout/svg/nsSVGUtils.cpp layout/svg/nsSVGUtils.cpp -index d53a3ede0be7..f21c23491285 100644 ---- layout/svg/nsSVGUtils.cpp -+++ layout/svg/nsSVGUtils.cpp -@@ -49,7 +49,7 @@ - #include "SVGGeometryElement.h" - #include "SVGGeometryFrame.h" - #include "nsSVGPaintServerFrame.h" --#include "mozilla/dom/SVGSVGElement.h" -+#include "mozilla/dom/SVGViewportElement.h" - #include "nsTextFrame.h" - #include "SVGContentUtils.h" - #include "SVGTextFrame.h" -@@ -290,7 +290,7 @@ nsSVGUtils::GetContextSize(const nsIFrame* aFrame) - MOZ_ASSERT(aFrame->GetContent()->IsSVGElement(), "bad cast"); - const nsSVGElement* element = static_cast(aFrame->GetContent()); - -- SVGSVGElement* ctx = element->GetCtx(); -+ SVGViewportElement* ctx = element->GetCtx(); - if (ctx) { - size.width = ctx->GetLength(SVGContentUtils::X); - size.height = ctx->GetLength(SVGContentUtils::Y); -@@ -323,7 +323,7 @@ nsSVGUtils::ObjectSpace(const gfxRect &aRect, const nsSVGLength2 *aLength) - // Multiply first to avoid precision errors: - return axis * aLength->GetAnimValInSpecifiedUnits() / 100; - } -- return aLength->GetAnimValue(static_cast(nullptr)) * axis; -+ return aLength->GetAnimValue(static_cast(nullptr)) * axis; - } - - float diff --git a/www/waterfox/files/patch-bug1398983 b/www/waterfox/files/patch-bug1398983 deleted file mode 100644 index b273a11cd51..00000000000 --- a/www/waterfox/files/patch-bug1398983 +++ /dev/null @@ -1,25 +0,0 @@ -commit 6b2dbc2b8216 -Author: Bobby Holley -Date: Fri Sep 15 12:25:46 2017 -0700 - - Bug 1398983 - Remove warning about assuming gecko style system. r=me - - MozReview-Commit-ID: BCeG81uxLvS ---- - dom/base/nsDocument.cpp | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git dom/base/nsDocument.cpp dom/base/nsDocument.cpp -index 9d9af08ba04b..076fe1a5d444 100644 ---- dom/base/nsDocument.cpp -+++ dom/base/nsDocument.cpp -@@ -13490,7 +13490,8 @@ nsIDocument::UpdateStyleBackendType() - // Enable stylo for SVG-as-image. - mStyleBackendType = StyleBackendType::Servo; - } else if (!mDocumentContainer) { -- NS_WARNING("stylo: No docshell yet, assuming Gecko style system"); -+ // Not docshell, assume Gecko. Various callers can end up setting this -+ // explicitly afterwards to inherit it in various situations. - } else if (!IsXULDocument() && IsContentDocument()) { - // Disable stylo for about: pages other than about:blank, since - // they tend to use unsupported selectors like XUL tree pseudos. diff --git a/www/waterfox/files/patch-bug1399091 b/www/waterfox/files/patch-bug1399091 deleted file mode 100644 index 5b94ab09a5b..00000000000 --- a/www/waterfox/files/patch-bug1399091 +++ /dev/null @@ -1,36 +0,0 @@ -commit 4d1c939529c1 -Author: Catalin Badea -Date: Sun Sep 24 16:44:51 2017 -0400 - - Bug 1399091 - Avoid adding the same range to multiple selections. r=mats, a=sledru - - --HG-- - extra : source : c3b24ef4281035ee00e09b3386fcbf2d672775c4 ---- - dom/base/nsRange.cpp | 7 +++++++ - 1 file changed, 7 insertions(+) - -diff --git dom/base/nsRange.cpp dom/base/nsRange.cpp -index 1e95ec629f55..8221450b828b 100644 ---- dom/base/nsRange.cpp -+++ dom/base/nsRange.cpp -@@ -1048,12 +1048,19 @@ nsRange::SetSelection(mozilla::dom::Selection* aSelection) - if (mSelection == aSelection) { - return; - } -+ - // At least one of aSelection and mSelection must be null - // aSelection will be null when we are removing from a selection - // and a range can't be in more than one selection at a time, - // thus mSelection must be null too. - MOZ_ASSERT(!aSelection || !mSelection); - -+ // Extra step in case our parent failed to ensure the above -+ // invariant. -+ if (aSelection && mSelection) { -+ mSelection->RemoveRange(this); -+ } -+ - mSelection = aSelection; - if (mSelection) { - nsINode* commonAncestor = GetCommonAncestor(); diff --git a/www/waterfox/files/patch-bug1399177 b/www/waterfox/files/patch-bug1399177 deleted file mode 100644 index f412dbb621c..00000000000 --- a/www/waterfox/files/patch-bug1399177 +++ /dev/null @@ -1,47 +0,0 @@ -commit 376eb2d39f54 -Author: Doug Thayer -Date: Wed Sep 20 15:58:25 2017 -0700 - - Bug 1399177 - Pull label out of description in update popups. r=Gijs, a=sledru - - The margin rules for labels mean that if the See what's new link - starts its own line, the alignment looks off. We could override this, - but matching the styling for "Learn more" links, which get their own - line, seemed the better option. - - MozReview-Commit-ID: 4WK9QtRMUQs - - --HG-- - extra : source : f81f645704e4cdfaeebeb21d53d5d749718c3959 ---- - browser/components/customizableui/content/panelUI.inc.xul | 10 ++++------ - 1 file changed, 4 insertions(+), 6 deletions(-) - -diff --git browser/components/customizableui/content/panelUI.inc.xul browser/components/customizableui/content/panelUI.inc.xul -index 86fc1fa5639f..e7c63f612dc6 100644 ---- browser/components/customizableui/content/panelUI.inc.xul -+++ browser/components/customizableui/content/panelUI.inc.xul -@@ -421,9 +421,8 @@ - buttonhighlight="true" - hidden="true"> - -- &updateAvailable.message; -- -- -+ &updateAvailable.message; -+ - - - -@@ -440,9 +439,8 @@ - buttonhighlight="true" - hidden="true"> - -- &updateManual.message; -- -- -+ &updateManual.message; -+ - - - diff --git a/www/waterfox/files/patch-bug1399336 b/www/waterfox/files/patch-bug1399336 deleted file mode 100644 index cdd53e79195..00000000000 --- a/www/waterfox/files/patch-bug1399336 +++ /dev/null @@ -1,153 +0,0 @@ -commit 355019fdeca4 -Author: Mantaroh Yoshinaga -Date: Wed Sep 13 14:23:59 2017 +0900 - - Bug 1399336 - Memory leak of char16_t internal variables of widget/nsPrintOptionsImpl.cpp r=m_kato - - A nsPrintOptionsImpl has char16_t internal variables, and gecko will not release - these allocated variable. So we should use nsString instead of char16_t. - - MozReview-Commit-ID: 4ZMtUKoVCcR - - --HG-- - extra : rebase_source : 1720483301b900f8135c3d5f8f32d7051191aa8f ---- - widget/nsPrintOptionsImpl.cpp | 46 ++++++++++++++++++++----------------------- - 1 file changed, 21 insertions(+), 25 deletions(-) - -diff --git widget/nsPrintOptionsImpl.cpp widget/nsPrintOptionsImpl.cpp -index c36b5be3e8a7..c2b5e113612e 100644 ---- widget/nsPrintOptionsImpl.cpp -+++ widget/nsPrintOptionsImpl.cpp -@@ -765,13 +765,13 @@ nsPrintOptions::WritePrefs(nsIPrintSettings *aPS, const nsAString& aPrinterName, - if (aFlags & nsIPrintSettings::kInitSavePaperSize) { - int16_t sizeUnit; - double width, height; -- char16_t *name; -+ nsString name; - - if ( - NS_SUCCEEDED(aPS->GetPaperSizeUnit(&sizeUnit)) && - NS_SUCCEEDED(aPS->GetPaperWidth(&width)) && - NS_SUCCEEDED(aPS->GetPaperHeight(&height)) && -- NS_SUCCEEDED(aPS->GetPaperName(&name)) -+ NS_SUCCEEDED(aPS->GetPaperName(getter_Copies(name))) - ) { - DUMP_INT(kWriteStr, kPrintPaperSizeUnit, sizeUnit); - Preferences::SetInt(GetPrefName(kPrintPaperSizeUnit, aPrinterName), -@@ -780,7 +780,7 @@ nsPrintOptions::WritePrefs(nsIPrintSettings *aPS, const nsAString& aPrinterName, - WritePrefDouble(GetPrefName(kPrintPaperWidth, aPrinterName), width); - DUMP_DBL(kWriteStr, kPrintPaperHeight, height); - WritePrefDouble(GetPrefName(kPrintPaperHeight, aPrinterName), height); -- DUMP_STR(kWriteStr, kPrintPaperName, name); -+ DUMP_STR(kWriteStr, kPrintPaperName, name.get()); - Preferences::SetString(GetPrefName(kPrintPaperName, aPrinterName), name); - #if defined(XP_WIN) - // If the height and width are -1 then this might be a save triggered by -@@ -800,7 +800,7 @@ nsPrintOptions::WritePrefs(nsIPrintSettings *aPS, const nsAString& aPrinterName, - } - - bool b; -- char16_t* uStr; -+ nsString uStr; - int32_t iVal; - int16_t iVal16; - double dbl; -@@ -822,48 +822,48 @@ nsPrintOptions::WritePrefs(nsIPrintSettings *aPS, const nsAString& aPrinterName, - } - - if (aFlags & nsIPrintSettings::kInitSaveHeaderLeft) { -- if (NS_SUCCEEDED(aPS->GetHeaderStrLeft(&uStr))) { -- DUMP_STR(kWriteStr, kPrintHeaderStrLeft, uStr); -+ if (NS_SUCCEEDED(aPS->GetHeaderStrLeft(getter_Copies(uStr)))) { -+ DUMP_STR(kWriteStr, kPrintHeaderStrLeft, uStr.get()); - Preferences::SetString(GetPrefName(kPrintHeaderStrLeft, aPrinterName), - uStr); - } - } - - if (aFlags & nsIPrintSettings::kInitSaveHeaderCenter) { -- if (NS_SUCCEEDED(aPS->GetHeaderStrCenter(&uStr))) { -- DUMP_STR(kWriteStr, kPrintHeaderStrCenter, uStr); -+ if (NS_SUCCEEDED(aPS->GetHeaderStrCenter(getter_Copies(uStr)))) { -+ DUMP_STR(kWriteStr, kPrintHeaderStrCenter, uStr.get()); - Preferences::SetString(GetPrefName(kPrintHeaderStrCenter, aPrinterName), - uStr); - } - } - - if (aFlags & nsIPrintSettings::kInitSaveHeaderRight) { -- if (NS_SUCCEEDED(aPS->GetHeaderStrRight(&uStr))) { -- DUMP_STR(kWriteStr, kPrintHeaderStrRight, uStr); -+ if (NS_SUCCEEDED(aPS->GetHeaderStrRight(getter_Copies(uStr)))) { -+ DUMP_STR(kWriteStr, kPrintHeaderStrRight, uStr.get()); - Preferences::SetString(GetPrefName(kPrintHeaderStrRight, aPrinterName), - uStr); - } - } - - if (aFlags & nsIPrintSettings::kInitSaveFooterLeft) { -- if (NS_SUCCEEDED(aPS->GetFooterStrLeft(&uStr))) { -- DUMP_STR(kWriteStr, kPrintFooterStrLeft, uStr); -+ if (NS_SUCCEEDED(aPS->GetFooterStrLeft(getter_Copies(uStr)))) { -+ DUMP_STR(kWriteStr, kPrintFooterStrLeft, uStr.get()); - Preferences::SetString(GetPrefName(kPrintFooterStrLeft, aPrinterName), - uStr); - } - } - - if (aFlags & nsIPrintSettings::kInitSaveFooterCenter) { -- if (NS_SUCCEEDED(aPS->GetFooterStrCenter(&uStr))) { -- DUMP_STR(kWriteStr, kPrintFooterStrCenter, uStr); -+ if (NS_SUCCEEDED(aPS->GetFooterStrCenter(getter_Copies(uStr)))) { -+ DUMP_STR(kWriteStr, kPrintFooterStrCenter, uStr.get()); - Preferences::SetString(GetPrefName(kPrintFooterStrCenter, aPrinterName), - uStr); - } - } - - if (aFlags & nsIPrintSettings::kInitSaveFooterRight) { -- if (NS_SUCCEEDED(aPS->GetFooterStrRight(&uStr))) { -- DUMP_STR(kWriteStr, kPrintFooterStrRight, uStr); -+ if (NS_SUCCEEDED(aPS->GetFooterStrRight(getter_Copies(uStr)))) { -+ DUMP_STR(kWriteStr, kPrintFooterStrRight, uStr.get()); - Preferences::SetString(GetPrefName(kPrintFooterStrRight, aPrinterName), - uStr); - } -@@ -915,8 +915,8 @@ nsPrintOptions::WritePrefs(nsIPrintSettings *aPS, const nsAString& aPrinterName, - // Only the general version of this pref is saved - if ((aFlags & nsIPrintSettings::kInitSavePrinterName) - && aPrinterName.IsEmpty()) { -- if (NS_SUCCEEDED(aPS->GetPrinterName(&uStr))) { -- DUMP_STR(kWriteStr, kPrinterName, uStr); -+ if (NS_SUCCEEDED(aPS->GetPrinterName(getter_Copies(uStr)))) { -+ DUMP_STR(kWriteStr, kPrinterName, uStr.get()); - Preferences::SetString(kPrinterName, uStr); - } - } -@@ -929,8 +929,8 @@ nsPrintOptions::WritePrefs(nsIPrintSettings *aPS, const nsAString& aPrinterName, - } - - if (aFlags & nsIPrintSettings::kInitSaveToFileName) { -- if (NS_SUCCEEDED(aPS->GetToFileName(&uStr))) { -- DUMP_STR(kWriteStr, kPrintToFileName, uStr); -+ if (NS_SUCCEEDED(aPS->GetToFileName(getter_Copies(uStr)))) { -+ DUMP_STR(kWriteStr, kPrintToFileName, uStr.get()); - Preferences::SetString(GetPrefName(kPrintToFileName, aPrinterName), uStr); - } - } -@@ -1105,13 +1105,9 @@ GetAdjustedPrinterName(nsIPrintSettings* aPS, bool aUsePNP, - - // Get the Printer Name from the PrintSettings - // to use as a prefix for Pref Names -- char16_t* prtName = nullptr; -- -- nsresult rv = aPS->GetPrinterName(&prtName); -+ nsresult rv = aPS->GetPrinterName(getter_Copies(aPrinterName)); - NS_ENSURE_SUCCESS(rv, rv); - -- aPrinterName = nsDependentString(prtName); -- - // Convert any whitespaces, carriage returns or newlines to _ - // The below algorithm is supposedly faster than using iterators - NS_NAMED_LITERAL_STRING(replSubstr, "_"); diff --git a/www/waterfox/files/patch-bug1399412 b/www/waterfox/files/patch-bug1399412 deleted file mode 100644 index 29d0b3c5701..00000000000 --- a/www/waterfox/files/patch-bug1399412 +++ /dev/null @@ -1,31 +0,0 @@ -commit f2d86a8b3050 -Author: Dimitry Andric -Date: Wed Sep 13 09:43:00 2017 -0400 - - Bug 1399412 - Work around clang assertion by wrapping lz4.c in an extern C block. r=froydnj - - MozReview-Commit-ID: LLgSbJadbyJ - - --HG-- - extra : amend_source : 08d7908fe6807db654411fc291bccc98496d4275 ---- - mfbt/Compression.cpp | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git mfbt/Compression.cpp mfbt/Compression.cpp -index 0a94cc69e224..c675aa90af62 100644 ---- mfbt/Compression.cpp -+++ mfbt/Compression.cpp -@@ -25,8 +25,12 @@ using namespace mozilla::Compression; - - namespace { - -+extern "C" { -+ - #include "lz4.c" - -+} -+ - }/* anonymous namespace */ - - /* Our wrappers */ diff --git a/www/waterfox/files/patch-bug1399520 b/www/waterfox/files/patch-bug1399520 deleted file mode 100644 index 0db6cf64bb7..00000000000 --- a/www/waterfox/files/patch-bug1399520 +++ /dev/null @@ -1,93 +0,0 @@ -commit b4603106d015 -Author: Liang-Heng Chen -Date: Thu Oct 19 22:29:41 2017 -0400 - - Bug 1399520 - Avoid race condition. r=dragana - - MozReview-Commit-ID: 6Pd2HXqBgX4 ---- - modules/libjar/nsJAR.cpp | 26 ++++++++++++++++++-------- - modules/libjar/nsJAR.h | 8 +++++--- - 2 files changed, 23 insertions(+), 11 deletions(-) - -diff --git modules/libjar/nsJAR.cpp modules/libjar/nsJAR.cpp -index 80589e03f92b..b3121d99ef0a 100644 ---- modules/libjar/nsJAR.cpp -+++ modules/libjar/nsJAR.cpp -@@ -43,11 +43,27 @@ NS_IMPL_QUERY_INTERFACE(nsJAR, nsIZipReader) - NS_IMPL_ADDREF(nsJAR) - - // Custom Release method works with nsZipReaderCache... -+// Release might be called from multi-thread, we have to -+// take this function carefully to avoid delete-after-use. - MozExternalRefCountType nsJAR::Release(void) - { - nsrefcnt count; - NS_PRECONDITION(0 != mRefCnt, "dup release"); -- count = --mRefCnt; -+ -+ RefPtr cache; -+ if (mRefCnt == 2) { // don't use a lock too frequently -+ // Use a mutex here to guarantee mCache is not racing and the target instance -+ // is still valid to increase ref-count. -+ MutexAutoLock lock(mLock); -+ cache = mCache; -+ mCache = nullptr; -+ } -+ if (cache) { -+ DebugOnly rv = cache->ReleaseZip(this); -+ MOZ_ASSERT(NS_SUCCEEDED(rv), "failed to release zip file"); -+ } -+ -+ count = --mRefCnt; // don't access any member variable after this line - NS_LOG_RELEASE(this, count, "nsJAR"); - if (0 == count) { - mRefCnt = 1; /* stabilize */ -@@ -56,13 +72,7 @@ MozExternalRefCountType nsJAR::Release(void) - delete this; - return 0; - } -- if (1 == count && mCache) { --#ifdef DEBUG -- nsresult rv = --#endif -- mCache->ReleaseZip(this); -- NS_ASSERTION(NS_SUCCEEDED(rv), "failed to release zip file"); -- } -+ - return count; - } - -diff --git modules/libjar/nsJAR.h modules/libjar/nsJAR.h -index 7f675c93003b..4fe948680fbf 100644 ---- modules/libjar/nsJAR.h -+++ modules/libjar/nsJAR.h -@@ -12,6 +12,7 @@ - #include "mozilla/Logging.h" - #include "prinrval.h" - -+#include "mozilla/Atomics.h" - #include "mozilla/Mutex.h" - #include "nsIComponentManager.h" - #include "nsCOMPtr.h" -@@ -75,8 +76,9 @@ class nsJAR final : public nsIZipReader - mReleaseTime = PR_INTERVAL_NO_TIMEOUT; - } - -- void SetZipReaderCache(nsZipReaderCache* cache) { -- mCache = cache; -+ void SetZipReaderCache(nsZipReaderCache* aCache) { -+ mozilla::MutexAutoLock lock(mLock); -+ mCache = aCache; - } - - nsresult GetNSPRFileDesc(PRFileDesc** aNSPRFileDesc); -@@ -89,7 +91,7 @@ class nsJAR final : public nsIZipReader - RefPtr mZip; // The underlying zip archive - PRIntervalTime mReleaseTime; // used by nsZipReaderCache for flushing entries - nsZipReaderCache* mCache; // if cached, this points to the cache it's contained in -- mozilla::Mutex mLock; -+ mozilla::Mutex mLock; // protect mCache and mZip - int64_t mMtime; - bool mOpened; - bool mIsOmnijar; diff --git a/www/waterfox/files/patch-bug1399939 b/www/waterfox/files/patch-bug1399939 deleted file mode 100644 index 95bdfb17d22..00000000000 --- a/www/waterfox/files/patch-bug1399939 +++ /dev/null @@ -1,36 +0,0 @@ -commit b0369ebbca69 -Author: Gijs Kruitbosch -Date: Thu Sep 28 12:00:22 2017 +0100 - - Bug 1399939 - Switch to highly restrictive profile for IDN. r=dveditz, r=jfkthame, a=sledru - - MozReview-Commit-ID: E5LRuQVfIZP - - --HG-- - extra : source : e1c1ebf60808e5e94b9a03d8cb577990ac0b9ca1 ---- - modules/libpref/init/all.js | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git modules/libpref/init/all.js modules/libpref/init/all.js -index c74659f8d4a5..c796df0fef1d 100644 ---- modules/libpref/init/all.js -+++ modules/libpref/init/all.js -@@ -1913,7 +1913,7 @@ pref("network.IDN_show_punycode", false); - // IDN-safe. Otherwise, they're treated as unsafe and punycode will be used - // for displaying them in the UI (e.g. URL bar), unless they conform to one of - // the profiles specified in --// http://www.unicode.org/reports/tr36/proposed.html#Security_Levels_and_Alerts -+// https://www.unicode.org/reports/tr39/#Restriction_Level_Detection - // If "network.IDN.restriction_profile" is "high", the Highly Restrictive - // profile is used. - // If "network.IDN.restriction_profile" is "moderate", the Moderately -@@ -1922,7 +1922,7 @@ pref("network.IDN_show_punycode", false); - // Note that these preferences are referred to ONLY when - // "network.IDN_show_punycode" is false. In other words, all IDNs will be shown - // in punycode if "network.IDN_show_punycode" is true. --pref("network.IDN.restriction_profile", "moderate"); -+pref("network.IDN.restriction_profile", "high"); - pref("network.IDN.use_whitelist", false); - - // ccTLDs diff --git a/www/waterfox/files/patch-bug1400238 b/www/waterfox/files/patch-bug1400238 deleted file mode 100644 index efc0314ff24..00000000000 --- a/www/waterfox/files/patch-bug1400238 +++ /dev/null @@ -1,30 +0,0 @@ -commit 02ae35c9e105 -Author: Botond Ballo -Date: Wed Oct 18 13:29:47 2017 -0400 - - Bug 1400238 - Notify TabParent when the GTK client offset changes. r=karlt - - MozReview-Commit-ID: 1TacAhl6c2M - - --HG-- - extra : rebase_source : 5641d417a6245cc2f8027fd91032119f1b36d461 ---- - widget/gtk/nsWindow.cpp | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git widget/gtk/nsWindow.cpp widget/gtk/nsWindow.cpp -index 955327297ac9..e58f3dcb59d5 100644 ---- widget/gtk/nsWindow.cpp -+++ widget/gtk/nsWindow.cpp -@@ -1567,6 +1567,11 @@ nsWindow::OnPropertyNotifyEvent(GtkWidget* aWidget, GdkEventProperty* aEvent) - { - if (aEvent->atom == gdk_atom_intern("_NET_FRAME_EXTENTS", FALSE)) { - UpdateClientOffset(); -+ -+ // Send a WindowMoved notification. This ensures that TabParent -+ // picks up the new client offset and sends it to the child process -+ // if appropriate. -+ NotifyWindowMoved(mBounds.x, mBounds.y); - return FALSE; - } - diff --git a/www/waterfox/files/patch-bug1400540 b/www/waterfox/files/patch-bug1400540 deleted file mode 100644 index 6cbe87dc3d6..00000000000 --- a/www/waterfox/files/patch-bug1400540 +++ /dev/null @@ -1,47 +0,0 @@ -commit 6905267b2878 -Author: Xidorn Quan -Date: Wed Sep 20 08:26:53 2017 +1000 - - Bug 1400540 - Decide style backend type based on principal. r=bholley - - MozReview-Commit-ID: A4y9Shdbr7g - - --HG-- - extra : source : cdfe5e5e059273a1c7fc6506d6e0fecb2bb7affb ---- - dom/base/nsDocument.cpp | 21 ++++++++------------- - 1 file changed, 8 insertions(+), 13 deletions(-) - -diff --git dom/base/nsDocument.cpp dom/base/nsDocument.cpp -index 642960e6a155..265af0df07b9 100644 ---- dom/base/nsDocument.cpp -+++ dom/base/nsDocument.cpp -@@ -13465,20 +13465,15 @@ nsIDocument::UpdateStyleBackendType() - - #ifdef MOZ_STYLO - if (nsLayoutUtils::StyloEnabled()) { -- if (IsBeingUsedAsImage()) { -- // Enable stylo for SVG-as-image. -+ // Disable stylo only for system principal. Other principals aren't -+ // able to use XUL by default, and the back door to enable XUL is -+ // mostly just for testing, which means they don't matter, and we -+ // shouldn't respect them at the same time. -+ // Note that, since tests can have XUL support, we still need to -+ // explicitly exclude XUL documents here. -+ if (!nsContentUtils::IsSystemPrincipal(NodePrincipal()) && -+ !IsXULDocument()) { - mStyleBackendType = StyleBackendType::Servo; -- } else if (!mDocumentContainer) { -- // Not docshell, assume Gecko. Various callers can end up setting this -- // explicitly afterwards to inherit it in various situations. -- } else if (!IsXULDocument() && IsContentDocument()) { -- // Disable stylo for about: pages other than about:blank, since -- // they tend to use unsupported selectors like XUL tree pseudos. -- bool isAbout = false; -- mDocumentURI->SchemeIs("about", &isAbout); -- if (!isAbout || NS_IsAboutBlank(mDocumentURI)) { -- mStyleBackendType = StyleBackendType::Servo; -- } - } - } - #endif diff --git a/www/waterfox/files/patch-bug1400674 b/www/waterfox/files/patch-bug1400674 deleted file mode 100644 index 955ac0e9f58..00000000000 --- a/www/waterfox/files/patch-bug1400674 +++ /dev/null @@ -1,70 +0,0 @@ -commit c08bea16ab67 (HEAD) -Author: JW Wang -Date: Fri Oct 13 17:24:24 2017 +0800 - - Bug 1400674 - Fix the algorithm of filling audio gaps with silence. r=jya, a=ritu - - MozReview-Commit-ID: Hjsboq6PdlN - - --HG-- - extra : source : aecaa85bb1d9d8b7d2cbd9ab84eb6dbc0ed9eee8 ---- - dom/media/mediasink/AudioSink.cpp | 37 +++++++++++++++---------------------- - 1 file changed, 15 insertions(+), 22 deletions(-) - -diff --git dom/media/mediasink/AudioSink.cpp dom/media/mediasink/AudioSink.cpp -index 0dbb53a3387a..81be7ac0bd89 100644 ---- dom/media/mediasink/AudioSink.cpp -+++ dom/media/mediasink/AudioSink.cpp -@@ -426,28 +426,21 @@ AudioSink::NotifyAudioNeeded() - missingFrames = std::min(INT32_MAX, missingFrames.value()); - mFramesParsed += missingFrames.value(); - -- // We need to calculate how many frames are missing at the output rate. -- missingFrames = -- SaferMultDiv(missingFrames.value(), mOutputRate, data->mRate); -- if (!missingFrames.isValid()) { -- NS_WARNING("Int overflow in AudioSink"); -- mErrored = true; -- return; -- } -- -- // We need to insert silence, first use drained frames if any. -- missingFrames -= DrainConverter(missingFrames.value()); -- // Insert silence if still needed. -- if (missingFrames.value()) { -- AlignedAudioBuffer silenceData(missingFrames.value() * mOutputChannels); -- if (!silenceData) { -- NS_WARNING("OOM in AudioSink"); -- mErrored = true; -- return; -- } -- RefPtr silence = CreateAudioFromBuffer(Move(silenceData), data); -- PushProcessedAudio(silence); -+ RefPtr silenceData; -+ AlignedAudioBuffer silenceBuffer(missingFrames.value() * data->mChannels); -+ if (!silenceBuffer) { -+ NS_WARNING("OOM in AudioSink"); -+ mErrored = true; -+ return; -+ } -+ if (mConverter->InputConfig() != mConverter->OutputConfig()) { -+ AlignedAudioBuffer convertedData = -+ mConverter->Process(AudioSampleBuffer(Move(silenceBuffer))).Forget(); -+ silenceData = CreateAudioFromBuffer(Move(convertedData), data); -+ } else { -+ silenceData = CreateAudioFromBuffer(Move(silenceBuffer), data); - } -+ PushProcessedAudio(silenceData); - } - - mLastEndTime = data->GetEndTime(); -@@ -488,7 +481,7 @@ AudioSink::PushProcessedAudio(AudioData* aData) - - already_AddRefed - AudioSink::CreateAudioFromBuffer(AlignedAudioBuffer&& aBuffer, -- AudioData* aReference) -+ AudioData* aReference) - { - uint32_t frames = aBuffer.Length() / mOutputChannels; - if (!frames) { diff --git a/www/waterfox/files/patch-bug1400839 b/www/waterfox/files/patch-bug1400839 deleted file mode 100644 index 88f5d88c2e1..00000000000 --- a/www/waterfox/files/patch-bug1400839 +++ /dev/null @@ -1,49 +0,0 @@ -commit a0bf5a4eff67 -Author: sebastian@ifyouwantblood.de -Date: Tue Sep 19 11:47:12 2017 +1200 - - bug 1400839 use -1 instead of 0 to indicate absent glxtest_pipe fd r=karlt - - Englightenment closes fd 0 on child processes and so pipe() can return a zero fd. - - MozReview-Commit-ID: 5d9xQXgwgfv - - --HG-- - extra : rebase_source : c31aa7ce731ba325993f463b79b446ae67c932dd ---- - widget/GfxInfoX11.cpp | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git widget/GfxInfoX11.cpp widget/GfxInfoX11.cpp -index bf99367d084b..8bb54a99136f 100644 ---- widget/GfxInfoX11.cpp -+++ widget/GfxInfoX11.cpp -@@ -28,7 +28,7 @@ NS_IMPL_ISUPPORTS_INHERITED(GfxInfo, GfxInfoBase, nsIGfxInfoDebug) - #endif - - // these global variables will be set when firing the glxtest process --int glxtest_pipe = 0; -+int glxtest_pipe = -1; - pid_t glxtest_pid = 0; - - nsresult -@@ -55,8 +55,8 @@ GfxInfo::GetData() - // to understand this function, see bug 639842. We retrieve the OpenGL driver information in a - // separate process to protect against bad drivers. - -- // if glxtest_pipe == 0, that means that we already read the information -- if (!glxtest_pipe) -+ // if glxtest_pipe == -1, that means that we already read the information -+ if (glxtest_pipe == -1) - return; - - enum { buf_size = 1024 }; -@@ -65,7 +65,7 @@ GfxInfo::GetData() - &buf, - buf_size-1); // -1 because we'll append a zero - close(glxtest_pipe); -- glxtest_pipe = 0; -+ glxtest_pipe = -1; - - // bytesread < 0 would mean that the above read() call failed. - // This should never happen. If it did, the outcome would be to blacklist anyway. diff --git a/www/waterfox/files/patch-bug1401063 b/www/waterfox/files/patch-bug1401063 deleted file mode 100644 index d151a96dfd6..00000000000 --- a/www/waterfox/files/patch-bug1401063 +++ /dev/null @@ -1,160 +0,0 @@ -commit fb488ded4b64 -Author: Brad Werth -Date: Tue Sep 19 13:00:28 2017 -0700 - - Bug 1401063: Cache remaining gtk window and button colors to eliminate on-demand gtk calls in ::NativeGetColor. r=karlt - - MozReview-Commit-ID: HbZqBUG0w7y - - --HG-- - extra : rebase_source : 0b26c22113c2cda49129006fe933f20719b7a679 ---- - widget/gtk/nsLookAndFeel.cpp | 62 +++++++++++++++++++------------------------- - widget/gtk/nsLookAndFeel.h | 5 ++++ - 2 files changed, 31 insertions(+), 36 deletions(-) - -diff --git widget/gtk/nsLookAndFeel.cpp widget/gtk/nsLookAndFeel.cpp -index 9a2684412ee8..e02bf10fe87f 100644 ---- widget/gtk/nsLookAndFeel.cpp -+++ widget/gtk/nsLookAndFeel.cpp -@@ -225,7 +225,6 @@ nsLookAndFeel::NativeGetColor(ColorID aID, nscolor& aColor) - { - EnsureInit(); - -- GdkRGBA gdk_color; - nsresult res = NS_OK; - - switch (aID) { -@@ -294,40 +293,26 @@ nsLookAndFeel::NativeGetColor(ColorID aID, nscolor& aColor) - aColor = NS_TRANSPARENT; - break; - case eColorID_SpellCheckerUnderline: -- aColor = NS_RGB(0xff, 0, 0); -- break; -+ aColor = NS_RGB(0xff, 0, 0); -+ break; - - // css2 http://www.w3.org/TR/REC-CSS2/ui.html#system-colors -- case eColorID_activeborder: { -+ case eColorID_activeborder: - // active window border -- GtkStyleContext *style = GetStyleContext(MOZ_GTK_WINDOW); -- gtk_style_context_get_border_color(style, -- GTK_STATE_FLAG_NORMAL, &gdk_color); -- aColor = GDK_RGBA_TO_NS_RGBA(gdk_color); -+ aColor = sMozWindowActiveBorder; - break; -- } -- case eColorID_inactiveborder: { -+ case eColorID_inactiveborder: - // inactive window border -- GtkStyleContext *style = GetStyleContext(MOZ_GTK_WINDOW); -- gtk_style_context_get_border_color(style, -- GTK_STATE_FLAG_INSENSITIVE, -- &gdk_color); -- aColor = GDK_RGBA_TO_NS_RGBA(gdk_color); -+ aColor = sMozWindowInactiveBorder; - break; -- } - case eColorID_graytext: // disabled text in windows, menus, etc. - case eColorID_inactivecaptiontext: // text in inactive window caption - aColor = sMenuTextInactive; - break; -- case eColorID_inactivecaption: { -+ case eColorID_inactivecaption: - // inactive window caption -- GtkStyleContext *style = GetStyleContext(MOZ_GTK_WINDOW); -- gtk_style_context_get_background_color(style, -- GTK_STATE_FLAG_INSENSITIVE, -- &gdk_color); -- aColor = GDK_RGBA_TO_NS_RGBA(gdk_color); -+ aColor = sMozWindowInactiveCaption; - break; -- } - case eColorID_infobackground: - // tooltip background color - aColor = sInfoBackground; -@@ -389,22 +374,13 @@ nsLookAndFeel::NativeGetColor(ColorID aID, nscolor& aColor) - case eColorID__moz_fieldtext: - aColor = sMozFieldText; - break; -- case eColorID__moz_buttondefault: { -+ case eColorID__moz_buttondefault: - // default button border color -- GtkStyleContext *style = GetStyleContext(MOZ_GTK_BUTTON); -- gtk_style_context_get_border_color(style, -- GTK_STATE_FLAG_NORMAL, &gdk_color); -- aColor = GDK_RGBA_TO_NS_RGBA(gdk_color); -+ aColor = sButtonDefault; - break; -- } -- case eColorID__moz_buttonhoverface: { -- GtkStyleContext *style = GetStyleContext(MOZ_GTK_BUTTON); -- gtk_style_context_get_background_color(style, -- GTK_STATE_FLAG_PRELIGHT, -- &gdk_color); -- aColor = GDK_RGBA_TO_NS_RGBA(gdk_color); -+ case eColorID__moz_buttonhoverface: -+ aColor = sButtonHoverFace; - break; -- } - case eColorID__moz_buttonhovertext: - aColor = sButtonHoverText; - break; -@@ -863,6 +839,15 @@ nsLookAndFeel::EnsureInit() - sMozWindowBackground = GDK_RGBA_TO_NS_RGBA(color); - gtk_style_context_get_color(style, GTK_STATE_FLAG_NORMAL, &color); - sMozWindowText = GDK_RGBA_TO_NS_RGBA(color); -+ gtk_style_context_get_border_color(style, GTK_STATE_FLAG_NORMAL, &color); -+ sMozWindowActiveBorder = GDK_RGBA_TO_NS_RGBA(color); -+ gtk_style_context_get_border_color(style, GTK_STATE_FLAG_INSENSITIVE, -+ &color); -+ sMozWindowInactiveBorder = GDK_RGBA_TO_NS_RGBA(color); -+ gtk_style_context_get_background_color(style, GTK_STATE_FLAG_INSENSITIVE, -+ &color); -+ sMozWindowInactiveCaption = GDK_RGBA_TO_NS_RGBA(color); -+ - style = GetStyleContext(MOZ_GTK_WINDOW_CONTAINER); - { - GtkStyleContext* labelStyle = CreateStyleForWidget(labelWidget, style); -@@ -953,10 +938,15 @@ nsLookAndFeel::EnsureInit() - - GetSystemFontInfo(labelStyle, &mButtonFontName, &mButtonFontStyle); - -+ gtk_style_context_get_border_color(style, GTK_STATE_FLAG_NORMAL, &color); -+ sButtonDefault = GDK_RGBA_TO_NS_RGBA(color); - gtk_style_context_get_color(labelStyle, GTK_STATE_FLAG_NORMAL, &color); - sButtonText = GDK_RGBA_TO_NS_RGBA(color); - gtk_style_context_get_color(labelStyle, GTK_STATE_FLAG_PRELIGHT, &color); - sButtonHoverText = GDK_RGBA_TO_NS_RGBA(color); -+ gtk_style_context_get_background_color(style, GTK_STATE_FLAG_PRELIGHT, -+ &color); -+ sButtonHoverFace = GDK_RGBA_TO_NS_RGBA(color); - g_object_unref(labelStyle); - } - -diff --git widget/gtk/nsLookAndFeel.h widget/gtk/nsLookAndFeel.h -index 38cd51c056d6..177d069f6567 100644 ---- widget/gtk/nsLookAndFeel.h -+++ widget/gtk/nsLookAndFeel.h -@@ -58,8 +58,10 @@ protected: - nscolor sMenuTextInactive; - nscolor sMenuHover; - nscolor sMenuHoverText; -+ nscolor sButtonDefault; - nscolor sButtonText; - nscolor sButtonHoverText; -+ nscolor sButtonHoverFace; - nscolor sFrameOuterLightBorder; - nscolor sFrameInnerDarkBorder; - nscolor sOddCellBackground; -@@ -70,6 +72,9 @@ protected: - nscolor sMozFieldBackground; - nscolor sMozWindowText; - nscolor sMozWindowBackground; -+ nscolor sMozWindowActiveBorder; -+ nscolor sMozWindowInactiveBorder; -+ nscolor sMozWindowInactiveCaption; - nscolor sTextSelectedText; - nscolor sTextSelectedBackground; - nscolor sMozScrollbar; diff --git a/www/waterfox/files/patch-bug1401416 b/www/waterfox/files/patch-bug1401416 deleted file mode 100644 index 63f0f8e8e71..00000000000 --- a/www/waterfox/files/patch-bug1401416 +++ /dev/null @@ -1,29 +0,0 @@ -commit c5123938eb1e -Author: Tobias Schneider -Date: Thu Sep 21 12:43:35 2017 -0700 - - Bug 1401416 - [intersection-observer] Let intersection rect be empty if do_QueryFrame(rootFrame) returns null. r=dholbert, a=sledru - - --HG-- - extra : source : 90be30b5206c2b2724d61f4f6782197bfa768428 ---- - dom/base/DOMIntersectionObserver.cpp | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -diff --git dom/base/DOMIntersectionObserver.cpp dom/base/DOMIntersectionObserver.cpp -index 606a1de5ed8c..1ca909e3cfbf 100644 ---- dom/base/DOMIntersectionObserver.cpp -+++ dom/base/DOMIntersectionObserver.cpp -@@ -308,7 +308,11 @@ DOMIntersectionObserver::Update(nsIDocument* aDocument, DOMHighResTimeStamp time - } - root = rootFrame->GetContent()->AsElement(); - nsIScrollableFrame* scrollFrame = do_QueryFrame(rootFrame); -- rootRect = scrollFrame->GetScrollPortRect(); -+ // If we end up with a null root frame for some reason, we'll proceed -+ // with an empty root intersection rect. -+ if (scrollFrame) { -+ rootRect = scrollFrame->GetScrollPortRect(); -+ } - } - } - } diff --git a/www/waterfox/files/patch-bug1401522 b/www/waterfox/files/patch-bug1401522 deleted file mode 100644 index ac62fbdbb66..00000000000 --- a/www/waterfox/files/patch-bug1401522 +++ /dev/null @@ -1,34 +0,0 @@ -commit e9d4b51968e0 -Author: Samael Wang -Date: Thu Sep 28 11:16:53 2017 +0800 - - Bug 1401522 - Don't apply statusCode sent from parent if mCanceled or mStatus has been modified in the child. r=mayhemer, a=ritu - - When a WyciwygChannel is canceled, but WyciwygChannelParent::RecvCancel happens - after WyciwygChannelParent::SendOnStartRequest, it would send statusCode=NS_OK - to WyciwygChannelChild::OnStartRequest. So we should not apply the statusCode - if mCanceled, just like how HttpChannelChild handles it. - - MozReview-Commit-ID: 5H3PUrlArIA - - --HG-- - extra : source : 8ebfa90c4ebca44ac1c3829ef54de74d3b004dfc ---- - netwerk/protocol/wyciwyg/WyciwygChannelChild.cpp | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git netwerk/protocol/wyciwyg/WyciwygChannelChild.cpp netwerk/protocol/wyciwyg/WyciwygChannelChild.cpp -index d14b6f925e37..85d3ebf24439 100644 ---- netwerk/protocol/wyciwyg/WyciwygChannelChild.cpp -+++ netwerk/protocol/wyciwyg/WyciwygChannelChild.cpp -@@ -191,7 +191,9 @@ WyciwygChannelChild::OnStartRequest(const nsresult& statusCode, - - mState = WCC_ONSTART; - -- mStatus = statusCode; -+ if (!mCanceled && NS_SUCCEEDED(mStatus)) { -+ mStatus = statusCode; -+ } - mContentLength = contentLength; - mCharsetSource = source; - mCharset = charset; diff --git a/www/waterfox/files/patch-bug1401573 b/www/waterfox/files/patch-bug1401573 deleted file mode 100644 index 22fc6f569a5..00000000000 --- a/www/waterfox/files/patch-bug1401573 +++ /dev/null @@ -1,27 +0,0 @@ -commit d0ed05261f20 -Author: jason laster -Date: Wed Sep 20 10:52:54 2017 -0400 - - Bug 1401573 - Fix PoE, Link, and linux issue. r=nchevobbe - - MozReview-Commit-ID: 35TA6bhW1Wr ---- - devtools/client/debugger/new/debugger.js | 68 +++++++++++++++++----- - devtools/client/debugger/new/panel.js | 27 ++++++++- - .../new/test/mochitest/browser_dbg-expressions.js | 2 +- - 3 files changed, 79 insertions(+), 18 deletions(-) - -diff --git devtools/client/debugger/new/debugger.js devtools/client/debugger/new/debugger.js -index f52a3e380ab6..c1213180cb13 100644 ---- devtools/client/debugger/new/debugger.js -+++ devtools/client/debugger/new/debugger.js -@@ -29493,7 +29493,8 @@ return /******/ (function(modules) { // webpackBootstr - } - - function getKeyForOS(os, action) { -- return KEYS[os][action]; -+ var osActions = KEYS[os] || KEYS.Linux; -+ return osActions[action]; - } - - function formatKey(action) { diff --git a/www/waterfox/files/patch-bug1401726 b/www/waterfox/files/patch-bug1401726 deleted file mode 100644 index a4697e6263c..00000000000 --- a/www/waterfox/files/patch-bug1401726 +++ /dev/null @@ -1,60 +0,0 @@ -commit ccbee985a281 -Author: John Dai -Date: Thu Sep 21 16:32:18 2017 +0800 - - Bug 1401726 - Fix crash in nsLabelsNodeList::PopulateSelf. r=smaug, a=sledru - - From 045228df087f7612bde09d2f715ec33f2aaf777c Mon Sep 17 00:00:00 2001 ---- - dom/base/nsContentList.cpp | 4 +++- - dom/html/crashtests/1401726.html | 17 +++++++++++++++++ - dom/html/crashtests/crashtests.list | 1 + - 3 files changed, 21 insertions(+), 1 deletion(-) - -diff --git dom/base/nsContentList.cpp dom/base/nsContentList.cpp -index f943039e7fca..9b7bd6323aa8 100644 ---- dom/base/nsContentList.cpp -+++ dom/base/nsContentList.cpp -@@ -1266,7 +1266,9 @@ nsLabelsNodeList::MaybeResetRoot(nsINode* aRootNode) - void - nsLabelsNodeList::PopulateSelf(uint32_t aNeededLength) - { -- MOZ_ASSERT(mRootNode, "Must have root"); -+ if (!mRootNode) { -+ return; -+ } - - // Start searching at the root. - nsINode* cur = mRootNode; -diff --git dom/html/crashtests/1401726.html dom/html/crashtests/1401726.html -new file mode 100644 -index 000000000000..bf4b4918abd4 ---- /dev/null -+++ dom/html/crashtests/1401726.html -@@ -0,0 +1,17 @@ -+ -+ -+ -+ -+ -+ -diff --git dom/html/crashtests/crashtests.list dom/html/crashtests/crashtests.list -index a60cc9f99474..581ed10cefc8 100644 ---- dom/html/crashtests/crashtests.list -+++ dom/html/crashtests/crashtests.list -@@ -83,3 +83,4 @@ load 1343886-2.xml - load 1343886-3.xml - asserts(0-3) load 1350972.html - load 1386905.html -+asserts(0-4) load 1401726.html diff --git a/www/waterfox/files/patch-bug1401876 b/www/waterfox/files/patch-bug1401876 deleted file mode 100644 index be5ff6d9811..00000000000 --- a/www/waterfox/files/patch-bug1401876 +++ /dev/null @@ -1,48 +0,0 @@ -commit 09ba71b3a5e9 -Author: Scott Wu -Date: Thu Sep 21 15:37:25 2017 +0800 - - Bug 1401876 - Part 1: Close datetime picker on popuphidden. r=mconley, a=ritu - - MozReview-Commit-ID: FUqbtAftQxh - - --HG-- - extra : source : e238860e4943cd1bb4c2c5f7175a36d494f0e91b ---- - toolkit/content/tests/browser/head.js | 1 + - toolkit/content/widgets/datetimepopup.xml | 2 +- - toolkit/modules/DateTimePickerHelper.jsm | 1 + - 3 files changed, 3 insertions(+), 1 deletion(-) - -diff --git toolkit/content/widgets/datetimepopup.xml toolkit/content/widgets/datetimepopup.xml -index 7e4e5bcfe4e8..7397e1d310d4 100644 ---- toolkit/content/widgets/datetimepopup.xml -+++ toolkit/content/widgets/datetimepopup.xml -@@ -75,7 +75,6 @@ - this.dateTimePopupFrame.removeEventListener("load", this, true); - this.dateTimePopupFrame.contentDocument.removeEventListener("message", this); - this.dateTimePopupFrame.setAttribute("src", ""); -- this.hidePopup(); - this.hidden = true; - ]]> - -@@ -320,6 +319,7 @@ - break; - } - case "ClosePopup": { -+ this.hidePopup(); - this.closePicker(); - break; - } -diff --git toolkit/modules/DateTimePickerHelper.jsm toolkit/modules/DateTimePickerHelper.jsm -index ced4e401815b..38e89bd0d160 100644 ---- toolkit/modules/DateTimePickerHelper.jsm -+++ toolkit/modules/DateTimePickerHelper.jsm -@@ -90,6 +90,7 @@ this.DateTimePickerHelper = { - if (browser) { - browser.messageManager.sendAsyncMessage("FormDateTime:PickerClosed"); - } -+ this.picker.closePicker(); - this.close(); - break; - } diff --git a/www/waterfox/files/patch-bug1401878 b/www/waterfox/files/patch-bug1401878 deleted file mode 100644 index 8f762bf24bb..00000000000 --- a/www/waterfox/files/patch-bug1401878 +++ /dev/null @@ -1,70 +0,0 @@ -commit 59e5b0881ec2 -Author: Andrea Marchesini -Date: Thu Sep 21 21:32:00 2017 +0200 - - Bug 1401878 - Remove ServiceWorkers in SiteDataManager.jsm. r=bkelly, a=sledru - - --HG-- - extra : source : 04888373f12bd5d86ec3f4057c3a2f0b2240c963 - extra : intermediate-source : e2b1cd9fd4a66fc932d8f74cfe2b38c55b9a7a1e ---- - browser/components/preferences/SiteDataManager.jsm | 26 ++++++++++++++++++++++ - 1 file changed, 26 insertions(+) - -diff --git browser/components/preferences/SiteDataManager.jsm browser/components/preferences/SiteDataManager.jsm -index d6dd5c78656a..8f2ac2a34188 100644 ---- browser/components/preferences/SiteDataManager.jsm -+++ browser/components/preferences/SiteDataManager.jsm -@@ -9,6 +9,9 @@ XPCOMUtils.defineLazyModuleGetter(this, "OfflineAppCacheHelper", - "resource:///modules/offlineAppCache.jsm"); - XPCOMUtils.defineLazyModuleGetter(this, "ContextualIdentityService", - "resource://gre/modules/ContextualIdentityService.jsm"); -+XPCOMUtils.defineLazyServiceGetter(this, "serviceWorkerManager", -+ "@mozilla.org/serviceworkers/manager;1", -+ "nsIServiceWorkerManager"); - - this.EXPORTED_SYMBOLS = [ - "SiteDataManager" -@@ -216,6 +219,19 @@ this.SiteDataManager = { - } - }, - -+ _removeServiceWorkers(site) { -+ let serviceWorkers = serviceWorkerManager.getAllRegistrations(); -+ for (let i = 0; i < serviceWorkers.length; i++) { -+ let sw = serviceWorkers.queryElementAt(i, Ci.nsIServiceWorkerRegistrationInfo); -+ for (let principal of site.principals) { -+ if (sw.principal.equals(principal)) { -+ serviceWorkerManager.removeAndPropagate(sw.principal.URI.host); -+ break; -+ } -+ } -+ } -+ }, -+ - remove(hosts) { - let promises = []; - let unknownHost = ""; -@@ -225,6 +241,7 @@ this.SiteDataManager = { - this._removePermission(site); - this._removeAppCache(site); - this._removeCookie(site); -+ this._removeServiceWorkers(site); - promises.push(this._removeQuotaUsage(site)); - } else { - unknownHost = host; -@@ -240,6 +257,14 @@ this.SiteDataManager = { - }, - - removeAll() { -+ // Iterate through the service workers and remove them. -+ let serviceWorkers = serviceWorkerManager.getAllRegistrations(); -+ for (let i = 0; i < serviceWorkers.length; i++) { -+ let sw = serviceWorkers.queryElementAt(i, Ci.nsIServiceWorkerRegistrationInfo); -+ let host = sw.principal.URI.host; -+ serviceWorkerManager.removeAndPropagate(host); -+ } -+ - let promises = []; - for (let site of this._sites.values()) { - this._removePermission(site); diff --git a/www/waterfox/files/patch-bug1401909 b/www/waterfox/files/patch-bug1401909 deleted file mode 100644 index f376a52b273..00000000000 --- a/www/waterfox/files/patch-bug1401909 +++ /dev/null @@ -1,30 +0,0 @@ -commit ec17ee7e24b2 -Author: Kaku Kuo -Date: Thu Sep 21 17:47:45 2017 +0800 - - Bug 1401909 - Turn on preference of ShutdownDecoder feature on desktop version release and beta channel. r=bwu, a=sledru - - MozReview-Commit-ID: JB3RmyjhvK9 - - --HG-- - extra : source : 27953b6cbc9b9bff5fb14cb0e69b492f08e62da8 ---- - modules/libpref/init/all.js | 4 ---- - 1 file changed, 4 deletions(-) - -diff --git modules/libpref/init/all.js modules/libpref/init/all.js -index 6d66d27d987c..c74659f8d4a5 100644 ---- modules/libpref/init/all.js -+++ modules/libpref/init/all.js -@@ -432,11 +432,7 @@ pref("media.decoder-doctor.wmf-disabled-is-failure", false); - pref("media.decoder-doctor.new-issue-endpoint", "https://webcompat.com/issues/new"); - - // Whether to suspend decoding of videos in background tabs. --#ifdef RELEASE_OR_BETA --pref("media.suspend-bkgnd-video.enabled", false); --#else - pref("media.suspend-bkgnd-video.enabled", true); --#endif - // Delay, in ms, from time window goes to background to suspending - // video decoders. Defaults to 10 seconds. - pref("media.suspend-bkgnd-video.delay-ms", 10000); diff --git a/www/waterfox/files/patch-bug1401992 b/www/waterfox/files/patch-bug1401992 deleted file mode 100644 index cc3a94b30f9..00000000000 --- a/www/waterfox/files/patch-bug1401992 +++ /dev/null @@ -1,239 +0,0 @@ -commit b00a6f8952ad -Author: Bobby Holley -Date: Fri Sep 22 12:34:00 2017 -0700 - - Bug 1401992 - Don't cross anonymous boundaries when finding the fieldset. r=bz, a=sledru - - MozReview-Commit-ID: DiywRognpqx - - --HG-- - extra : source : 581b6ab2826a3a90f3d47713b3940f176aa4d39f ---- - dom/html/nsGenericHTMLElement.cpp | 8 ++++++-- - 1 file changed, 6 insertions(+), 2 deletions(-) - -diff --git dom/html/nsGenericHTMLElement.cpp dom/html/nsGenericHTMLElement.cpp -index 61953dab88ce..eda85c9eebaf 100644 ---- dom/html/nsGenericHTMLElement.cpp -+++ dom/html/nsGenericHTMLElement.cpp -@@ -545,7 +545,7 @@ nsGenericHTMLElement::FindAncestorForm(HTMLFormElement* aCurrentForm) - "FindAncestorForm should not be called if @form is set!"); - - // Make sure we don't end up finding a form that's anonymous from -- // our point of view. -+ // our point of view. See also nsGenericHTMLFormElement::UpdateFieldSet. - nsIContent* bindingParent = GetBindingParent(); - - nsIContent* content = this; -@@ -2365,7 +2365,11 @@ nsGenericHTMLFormElement::UpdateFieldSet(bool aNotify) - nsIContent* parent = nullptr; - nsIContent* prev = nullptr; - -- for (parent = GetParent(); parent; -+ // Don't walk out of anonymous subtrees. Note the similar code in -+ // nsGenericHTMLElement::FindAncestorForm. -+ nsIContent* bindingParent = GetBindingParent(); -+ -+ for (parent = GetParent(); parent && parent != bindingParent; - prev = parent, parent = parent->GetParent()) { - HTMLFieldSetElement* fieldset = - HTMLFieldSetElement::FromContent(parent); - -commit 637fd3497d25 -Author: Bobby Holley -Date: Fri Sep 22 17:06:00 2017 -0700 - - Bug 1401992 - Reftest. r=me, a=sledru - - MozReview-Commit-ID: C7UQEQOkE7q - - --HG-- - extra : source : 5bfa23832767e42835f4c144fcbd4a351b7feca2 - extra : histedit_source : 31c6d70fac5308f511033692eeb3d8907a88ccab%2Ce5b28d61e7e6cffa0aee00cc2d563be5052830f0 ---- - layout/reftests/bugs/1401992-ref.html | 21 +++++++++++++++++++++ - layout/reftests/bugs/1401992.html | 32 ++++++++++++++++++++++++++++++++ - layout/reftests/bugs/reftest.list | 1 + - 3 files changed, 54 insertions(+) - -diff --git layout/reftests/bugs/1401992-ref.html layout/reftests/bugs/1401992-ref.html -new file mode 100644 -index 000000000000..8fb36196cf39 ---- /dev/null -+++ layout/reftests/bugs/1401992-ref.html -@@ -0,0 +1,21 @@ -+ -+ -+ -+ -+ -+ -+ -+
-+ -+ -diff --git layout/reftests/bugs/1401992.html layout/reftests/bugs/1401992.html -new file mode 100644 -index 000000000000..f48f563a01a8 ---- /dev/null -+++ layout/reftests/bugs/1401992.html -@@ -0,0 +1,32 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+
-+ -+ -diff --git layout/reftests/bugs/reftest.list layout/reftests/bugs/reftest.list -index e95eb8318a5a..55eb7da5611f 100644 ---- layout/reftests/bugs/reftest.list -+++ layout/reftests/bugs/reftest.list -@@ -2037,3 +2037,4 @@ needs-focus != 1377447-1.html 1377447-2.html - == 1380224-1.html 1380224-1-ref.html - == 1384065.html 1384065-ref.html - == 1384275-1.html 1384275-1-ref.html -+== 1401992.html 1401992-ref.html - -commit 67ad215f14ae -Author: Bobby Holley -Date: Fri Sep 22 17:20:31 2017 -0700 - - Bug 1401992 - Mark some tests as passing on android. r=me, a=sledru - - MozReview-Commit-ID: HJuIX5VXBm5 - - --HG-- - extra : source : 4c191b4e631f2f6f672598d70359438d18d05884 - extra : histedit_source : ad3d624a38b1f0134cd286ea592586f23c52d21b ---- - layout/reftests/bugs/reftest.list | 2 +- - layout/reftests/css-disabled/select/reftest.list | 10 +++++----- - layout/reftests/css-invalid/select/reftest.list | 4 ++-- - layout/reftests/css-ui-invalid/select/reftest.list | 4 ++-- - layout/reftests/css-ui-valid/select/reftest.list | 4 ++-- - layout/reftests/css-valid/select/reftest.list | 4 ++-- - 6 files changed, 14 insertions(+), 14 deletions(-) - -diff --git layout/reftests/bugs/reftest.list layout/reftests/bugs/reftest.list -index 55eb7da5611f..7815eaf2b69d 100644 ---- layout/reftests/bugs/reftest.list -+++ layout/reftests/bugs/reftest.list -@@ -1502,7 +1502,7 @@ random != 553571-1.html 553571-1-notref.html # expect dotted circle in test, not - fuzzy-if(!contentSameGfxBackendAsCanvas,128,91) random-if(d2d) skip-if(azureSkiaGL) fuzzy-if(skiaContent,32,150) == 555388-1.html 555388-1-ref.html - == 556661-1.html 556661-1-ref.html - fuzzy-if(skiaContent,4,5) == 557087-1.html 557087-ref.html --fails-if(Android) fuzzy-if(skiaContent&&!Android,2,5) == 557087-2.html 557087-ref.html -+fuzzy-if(skiaContent&&!Android,2,5) == 557087-2.html 557087-ref.html - == 557736-1.html 557736-1-ref.html - != 558011-1.xul 558011-1-ref.xul - == 559284-1.html 559284-1-ref.html -diff --git layout/reftests/css-disabled/select/reftest.list layout/reftests/css-disabled/select/reftest.list -index 700f06471cda..d6abbd6bd903 100644 ---- layout/reftests/css-disabled/select/reftest.list -+++ layout/reftests/css-disabled/select/reftest.list -@@ -1,9 +1,9 @@ - fuzzy-if(Android,12,1) == select-fieldset-1.html select-fieldset-ref.html --fails-if(Android) fuzzy-if(skiaContent&&!Android,2,17) == select-fieldset-2.html select-fieldset-ref-disabled.html --fails-if(Android) fuzzy-if(skiaContent&&!Android,2,17) == select-fieldset-3.html select-fieldset-ref-disabled.html --fails-if(Android) fuzzy-if(skiaContent&&!Android,2,13) == select-fieldset-4.html select-fieldset-ref.html -+fuzzy-if(skiaContent&&!Android,2,17) == select-fieldset-2.html select-fieldset-ref-disabled.html -+fuzzy-if(skiaContent&&!Android,2,17) == select-fieldset-3.html select-fieldset-ref-disabled.html -+fuzzy-if(skiaContent&&!Android,2,13) == select-fieldset-4.html select-fieldset-ref.html - == select-fieldset-legend-1.html select-fieldset-legend-ref-1.html --fails-if(Android) fuzzy-if(skiaContent&&!Android,2,6) == select-fieldset-legend-2.html select-fieldset-legend-ref-2.html --fails-if(Android) fuzzy-if(skiaContent&&!Android,2,8) == select-fieldset-legend-3.html select-fieldset-legend-ref-3.html -+fuzzy-if(skiaContent&&!Android,2,6) == select-fieldset-legend-2.html select-fieldset-legend-ref-2.html -+fuzzy-if(skiaContent&&!Android,2,8) == select-fieldset-legend-3.html select-fieldset-legend-ref-3.html - fuzzy-if(skiaContent,2,12) == select-fieldset-legend-4.html select-fieldset-legend-ref-4.html - fuzzy-if(skiaContent,2,5) == select-fieldset-legend-5.html select-fieldset-legend-ref-5.html -diff --git layout/reftests/css-invalid/select/reftest.list layout/reftests/css-invalid/select/reftest.list -index 2d16e1603b0c..44bd631b6215 100644 ---- layout/reftests/css-invalid/select/reftest.list -+++ layout/reftests/css-invalid/select/reftest.list -@@ -7,6 +7,6 @@ needs-focus == select-required-invalid.html select-required-ref.html - needs-focus == select-required-valid.html select-required-ref.html - needs-focus == select-required-multiple-still-valid.html select-required-multiple-ref.html - fuzzy-if(skiaContent,1,250) needs-focus == select-required-multiple-valid.html select-required-multiple-ref.html --fails-if(Android) fuzzy-if(skiaContent&&!Android,1,3) needs-focus == select-disabled-fieldset-1.html select-fieldset-ref.html --fails-if(Android) fuzzy-if(skiaContent&&!Android,2,3) needs-focus == select-disabled-fieldset-2.html select-fieldset-ref.html -+fuzzy-if(skiaContent&&!Android,1,3) needs-focus == select-disabled-fieldset-1.html select-fieldset-ref.html -+fuzzy-if(skiaContent&&!Android,2,3) needs-focus == select-disabled-fieldset-2.html select-fieldset-ref.html - fuzzy-if(skiaContent,2,5) needs-focus == select-fieldset-legend.html select-fieldset-legend-ref.html -diff --git layout/reftests/css-ui-invalid/select/reftest.list layout/reftests/css-ui-invalid/select/reftest.list -index 1fd197793914..f0b298401ced 100644 ---- layout/reftests/css-ui-invalid/select/reftest.list -+++ layout/reftests/css-ui-invalid/select/reftest.list -@@ -12,7 +12,7 @@ fuzzy-if(skiaContent,2,5) needs-focus == select-required-valid.html select-requi - needs-focus == select-required-multiple-invalid.html select-required-multiple-ref.html - fuzzy-if(asyncPan&&!layersGPUAccelerated,84,77) fuzzy-if(skiaContent,1,1000) needs-focus == select-required-multiple-invalid-changed.html select-required-multiple-ref.html - needs-focus == select-required-multiple-valid.html select-required-multiple-ref.html --fails-if(Android) fuzzy-if(skiaContent&&!Android,2,10) needs-focus == select-disabled-fieldset-1.html select-fieldset-ref.html --fails-if(Android) fuzzy-if(skiaContent&&!Android,2,10) needs-focus == select-disabled-fieldset-2.html select-fieldset-ref.html -+fuzzy-if(skiaContent&&!Android,2,10) needs-focus == select-disabled-fieldset-1.html select-fieldset-ref.html -+fuzzy-if(skiaContent&&!Android,2,10) needs-focus == select-disabled-fieldset-2.html select-fieldset-ref.html - fuzzy-if(skiaContent,2,10) needs-focus == select-fieldset-legend.html select-fieldset-legend-ref.html - fuzzy-if(skiaContent,1,5) needs-focus == select-novalidate.html select-required-ref.html -diff --git layout/reftests/css-ui-valid/select/reftest.list layout/reftests/css-ui-valid/select/reftest.list -index 082a6fc0ce40..815cb4635ddb 100644 ---- layout/reftests/css-ui-valid/select/reftest.list -+++ layout/reftests/css-ui-valid/select/reftest.list -@@ -12,7 +12,7 @@ fuzzy-if(skiaContent,2,5) needs-focus == select-required-valid-changed-2.html se - needs-focus == select-required-multiple-invalid.html select-required-multiple-ref.html - needs-focus == select-required-multiple-valid.html select-required-multiple-ref.html - fuzzy(64,4) fuzzy-if(asyncPan&&layersGPUAccelerated,84,77) fuzzy-if(skiaContent,1,1000) needs-focus == select-required-multiple-valid-changed.html select-required-multiple-ref.html --fails-if(Android) needs-focus == select-disabled-fieldset-1.html select-fieldset-ref.html --fails-if(Android) fuzzy-if(skiaContent&&!Android,2,10) needs-focus == select-disabled-fieldset-2.html select-fieldset-ref.html -+needs-focus == select-disabled-fieldset-1.html select-fieldset-ref.html -+fuzzy-if(skiaContent&&!Android,2,10) needs-focus == select-disabled-fieldset-2.html select-fieldset-ref.html - fuzzy-if(skiaContent,2,10) needs-focus == select-fieldset-legend.html select-fieldset-legend-ref.html - fuzzy-if(skiaContent,2,5) needs-focus == select-novalidate.html select-required-ref.html -diff --git layout/reftests/css-valid/select/reftest.list layout/reftests/css-valid/select/reftest.list -index ac77e60d68a7..fc84eb8541c5 100644 ---- layout/reftests/css-valid/select/reftest.list -+++ layout/reftests/css-valid/select/reftest.list -@@ -7,6 +7,6 @@ needs-focus == select-required-invalid.html select-required-ref.html - needs-focus == select-required-valid.html select-required-ref.html - needs-focus == select-required-multiple-still-valid.html select-required-multiple-ref.html - fuzzy-if(skiaContent,1,250) needs-focus == select-required-multiple-valid.html select-required-multiple-ref.html --fails-if(Android) needs-focus == select-disabled-fieldset-1.html select-fieldset-ref.html --fails-if(Android) fuzzy-if(skiaContent&&!Android,1,3) needs-focus == select-disabled-fieldset-2.html select-fieldset-ref.html -+needs-focus == select-disabled-fieldset-1.html select-fieldset-ref.html -+fuzzy-if(skiaContent&&!Android,1,3) needs-focus == select-disabled-fieldset-2.html select-fieldset-ref.html - needs-focus == select-fieldset-legend.html select-fieldset-legend-ref.html diff --git a/www/waterfox/files/patch-bug1402025 b/www/waterfox/files/patch-bug1402025 deleted file mode 100644 index 841abfb757c..00000000000 --- a/www/waterfox/files/patch-bug1402025 +++ /dev/null @@ -1,201 +0,0 @@ -commit a80cfb448ce3 -Author: Kirk Steuber -Date: Thu Sep 28 12:09:56 2017 -0700 - - Bug 1402025 - Ensure form submission flush when unsetting relevant attributes. r=bz, a=ritu - - It seems that we were flushing any pending submission when changing the action or target attributes of a form, but not when unsetting those attributes. - - MozReview-Commit-ID: E6aUnokg54k - - --HG-- - extra : source : 32fa20aaa56cfb063433ff46f202e99eb35043d7 ---- - dom/html/HTMLFormElement.cpp | 25 ++++----- - dom/html/test/browser.ini | 3 ++ - dom/html/test/browser_submission_flush.js | 85 +++++++++++++++++++++++++++++++ - dom/html/test/post_action_page.html | 10 ++++ - dom/html/test/submission_flush.html | 13 +++++ - 5 files changed, 122 insertions(+), 14 deletions(-) - -diff --git dom/html/HTMLFormElement.cpp dom/html/HTMLFormElement.cpp -index 6b87c8b54255..c9ff6ffc8f2a 100644 ---- dom/html/HTMLFormElement.cpp -+++ dom/html/HTMLFormElement.cpp -@@ -189,21 +189,18 @@ HTMLFormElement::BeforeSetAttr(int32_t aNamespaceID, nsIAtom* aName, - { - if (aNamespaceID == kNameSpaceID_None) { - if (aName == nsGkAtoms::action || aName == nsGkAtoms::target) { -- // This check is mostly to preserve previous behavior. -- if (aValue) { -- if (mPendingSubmission) { -- // aha, there is a pending submission that means we're in -- // the script and we need to flush it. let's tell it -- // that the event was ignored to force the flush. -- // the second argument is not playing a role at all. -- FlushPendingSubmission(); -- } -- // Don't forget we've notified the password manager already if the -- // page sets the action/target in the during submit. (bug 343182) -- bool notifiedObservers = mNotifiedObservers; -- ForgetCurrentSubmission(); -- mNotifiedObservers = notifiedObservers; -+ if (mPendingSubmission) { -+ // aha, there is a pending submission that means we're in -+ // the script and we need to flush it. let's tell it -+ // that the event was ignored to force the flush. -+ // the second argument is not playing a role at all. -+ FlushPendingSubmission(); - } -+ // Don't forget we've notified the password manager already if the -+ // page sets the action/target in the during submit. (bug 343182) -+ bool notifiedObservers = mNotifiedObservers; -+ ForgetCurrentSubmission(); -+ mNotifiedObservers = notifiedObservers; - } - } - -diff --git dom/html/test/browser.ini dom/html/test/browser.ini -index 34a32b833652..67754c995dfa 100644 ---- dom/html/test/browser.ini -+++ dom/html/test/browser.ini -@@ -6,6 +6,8 @@ support-files = - file_bug649778.html^headers^ - file_fullscreen-api-keys.html - file_content_contextmenu.html -+ submission_flush.html -+ post_action_page.html - form_data_file.bin - form_data_file.txt - form_submit_server.sjs -@@ -27,3 +29,4 @@ support-files = - tags = fullscreen - [browser_fullscreen-contextmenu-esc.js] - tags = fullscreen -+[browser_submission_flush.js] -diff --git dom/html/test/browser_submission_flush.js dom/html/test/browser_submission_flush.js -new file mode 100644 -index 000000000000..e3948e7071e8 ---- /dev/null -+++ dom/html/test/browser_submission_flush.js -@@ -0,0 +1,85 @@ -+"use strict"; -+// Form submissions triggered by the Javascript 'submit' event listener are -+// deferred until the event listener finishes. However, changes to specific -+// attributes ("action" and "target" attributes) need to cause an immediate -+// flush of any pending submission to prevent the form submission from using the -+// wrong action or target. This test ensures that such flushes happen properly. -+ -+const kTestPage = "http://example.org/browser/dom/html/test/submission_flush.html"; -+// This is the page pointed to by the form action in the test HTML page. -+const kPostActionPage = "http://example.org/browser/dom/html/test/post_action_page.html"; -+ -+const kFormId = "test_form" -+const kFrameId = "test_frame" -+const kSubmitButtonId = "submit_button" -+ -+// Take in a variety of actions (in the form of setting and unsetting form -+// attributes). Then submit the form in the submit event listener to cause a -+// deferred form submission. Then perform the test actions and ensure that the -+// form used the correct attribute values rather than the changed ones. -+async function runTest(aTestActions) { -+ let tab = await BrowserTestUtils.openNewForegroundTab(gBrowser, kTestPage); -+ registerCleanupFunction(() => BrowserTestUtils.removeTab(tab)); -+ -+ let frame_url = await ContentTask.spawn(gBrowser.selectedBrowser, -+ {kFormId, kFrameId, kSubmitButtonId, aTestActions}, -+ async function({kFormId, kFrameId, kSubmitButtonId, -+ aTestActions}) { -+ let form = content.document.getElementById(kFormId); -+ -+ form.addEventListener("submit", (event) => { -+ // Need to trigger the deferred submission by submitting in the submit -+ // event handler. To prevent the form from being submitted twice, the -+ //
tag contains the attribute |onsubmit="return false;"| to cancel -+ // the original submission. -+ form.submit(); -+ -+ if (aTestActions.setattr) { -+ for (let {attr, value} of aTestActions.setattr) { -+ form.setAttribute(attr, value); -+ } -+ } -+ if (aTestActions.unsetattr) { -+ for (let attr of aTestActions.unsetattr) { -+ form.removeAttribute(attr); -+ } -+ } -+ }, {capture: true, once: true}); -+ -+ // Trigger the above event listener -+ content.document.getElementById(kSubmitButtonId).click(); -+ -+ // Test that the form was submitted to the correct target (the frame) with -+ // the correct action (kPostActionPage). -+ let frame = content.document.getElementById(kFrameId); -+ await new Promise(resolve => { -+ frame.addEventListener("load", resolve, {once: true}); -+ }); -+ return frame.contentWindow.location.href; -+ }); -+ is(frame_url, kPostActionPage, -+ "Form should have submitted with correct target and action"); -+} -+ -+add_task(async function() { -+ info("Changing action should flush pending submissions"); -+ await runTest({setattr: [{attr: "action", value: "about:blank"}]}); -+}); -+ -+add_task(async function() { -+ info("Changing target should flush pending submissions"); -+ await runTest({setattr: [{attr: "target", value: "_blank"}]}); -+}); -+ -+add_task(async function() { -+ info("Unsetting action should flush pending submissions"); -+ await runTest({unsetattr: ["action"]}); -+}); -+ -+// On failure, this test will time out rather than failing an assert. When the -+// target attribute is not set, the form will submit the active page, navigating -+// it away and preventing the wait for iframe load from ever finishing. -+add_task(async function() { -+ info("Unsetting target should flush pending submissions"); -+ await runTest({unsetattr: ["target"]}); -+}); -diff --git dom/html/test/post_action_page.html dom/html/test/post_action_page.html -new file mode 100644 -index 000000000000..ba6ae514f2e9 ---- /dev/null -+++ dom/html/test/post_action_page.html -@@ -0,0 +1,10 @@ -+ -+ -+ -+ -+ Submission Flush Test Post Action Page -+ -+ -+

Post Action Page

-+ -+ -diff --git dom/html/test/submission_flush.html dom/html/test/submission_flush.html -new file mode 100644 -index 000000000000..f70884c66ac8 ---- /dev/null -+++ dom/html/test/submission_flush.html -@@ -0,0 +1,13 @@ -+ -+ -+ -+ -+ Submission Flush Test -+ -+ -+ -+ -+
-+ -+ -+ diff --git a/www/waterfox/files/patch-bug1402094 b/www/waterfox/files/patch-bug1402094 deleted file mode 100644 index b901b43f5f1..00000000000 --- a/www/waterfox/files/patch-bug1402094 +++ /dev/null @@ -1,57 +0,0 @@ -commit 447413f00860 -Author: Xidorn Quan -Date: Thu Sep 28 16:19:45 2017 +1000 - - Bug 1402094 - Blacklist about:reader from using stylo. r=bholley, a=sledru - - MozReview-Commit-ID: 6cG1x1tcOwn - - --HG-- - extra : source : 813556d9e389f580d8e6efa9c24825edec952259 ---- - dom/base/nsDocument.cpp | 25 ++++++++++++++++++++++++- - 1 file changed, 24 insertions(+), 1 deletion(-) - -diff --git dom/base/nsDocument.cpp dom/base/nsDocument.cpp -index 07ef9ef817b7..7f8ebecffa97 100644 ---- dom/base/nsDocument.cpp -+++ dom/base/nsDocument.cpp -@@ -13575,6 +13575,29 @@ nsIDocument::ReportHasScrollLinkedEffect() - "ScrollLinkedEffectFound2"); - } - -+#ifdef MOZ_STYLO -+// URL-based blacklist for stylo. -+static bool -+ShouldUseGeckoBackend(nsIURI* aDocumentURI) -+{ -+ if (!aDocumentURI) { -+ return false; -+ } -+ bool isScheme = false; -+ if (NS_SUCCEEDED(aDocumentURI->SchemeIs("about", &isScheme))) { -+ nsAutoCString path; -+ aDocumentURI->GetFilePath(path); -+ // about:reader requires support of :scope pseudo-class so we have -+ // to use Gecko backend for now. See bug 1402094. -+ // This should be fixed by bug 1204818. -+ if (path.EqualsLiteral("reader")) { -+ return true; -+ } -+ } -+ return false; -+} -+#endif // MOZ_STYLO -+ - void - nsIDocument::UpdateStyleBackendType() - { -@@ -13593,7 +13616,7 @@ nsIDocument::UpdateStyleBackendType() - // Note that, since tests can have XUL support, we still need to - // explicitly exclude XUL documents here. - if (!nsContentUtils::IsSystemPrincipal(NodePrincipal()) && -- !IsXULDocument()) { -+ !IsXULDocument() && !ShouldUseGeckoBackend(mDocumentURI)) { - mStyleBackendType = StyleBackendType::Servo; - } - } diff --git a/www/waterfox/files/patch-bug1402205 b/www/waterfox/files/patch-bug1402205 deleted file mode 100644 index a91f5225103..00000000000 --- a/www/waterfox/files/patch-bug1402205 +++ /dev/null @@ -1,77 +0,0 @@ -commit 86b6592ab804 -Author: Haik Aftandilian -Date: Mon Sep 25 15:48:40 2017 -0700 - - Bug 1402205 - Non-existent background page blocks extension startup. r=kmag, a=sledru - - Add calls to OnStartRequest() and OnStopRequest() to properly handle async - read failures for remote JAR's and remote unpacked extension resources. - - MozReview-Commit-ID: Dcg0LDht9B9 - - --HG-- - extra : source : 611582e42451dd26fcaa38f251e2203a6e8b0bf9 ---- - netwerk/protocol/res/ExtensionProtocolHandler.cpp | 23 +++++++++++++++++------ - 1 file changed, 17 insertions(+), 6 deletions(-) - -diff --git netwerk/protocol/res/ExtensionProtocolHandler.cpp netwerk/protocol/res/ExtensionProtocolHandler.cpp -index 326c21d13057..a2d900f95b96 100644 ---- netwerk/protocol/res/ExtensionProtocolHandler.cpp -+++ netwerk/protocol/res/ExtensionProtocolHandler.cpp -@@ -253,6 +253,19 @@ ExtensionStreamGetter::GetAsync(nsIStreamListener* aListener, - return Ok(); - } - -+static void -+CancelRequest(nsIStreamListener* aListener, -+ nsIChannel* aChannel, -+ nsresult aResult) -+{ -+ MOZ_ASSERT(aListener); -+ MOZ_ASSERT(aChannel); -+ -+ aListener->OnStartRequest(aChannel, nullptr); -+ aListener->OnStopRequest(aChannel, nullptr, aResult); -+ aChannel->Cancel(NS_BINDING_ABORTED); -+} -+ - // Handle an input stream sent from the parent. - void - ExtensionStreamGetter::OnStream(nsIInputStream* aStream) -@@ -269,9 +282,7 @@ ExtensionStreamGetter::OnStream(nsIInputStream* aStream) - - if (!aStream) { - // The parent didn't send us back a stream. -- listener->OnStartRequest(mChannel, nullptr); -- listener->OnStopRequest(mChannel, nullptr, NS_ERROR_FILE_ACCESS_DENIED); -- mChannel->Cancel(NS_BINDING_ABORTED); -+ CancelRequest(listener, mChannel, NS_ERROR_FILE_ACCESS_DENIED); - return; - } - -@@ -279,13 +290,13 @@ ExtensionStreamGetter::OnStream(nsIInputStream* aStream) - nsresult rv = NS_NewInputStreamPump(getter_AddRefs(pump), aStream, -1, -1, 0, - 0, false, mMainThreadEventTarget); - if (NS_FAILED(rv)) { -- mChannel->Cancel(NS_BINDING_ABORTED); -+ CancelRequest(listener, mChannel, rv); - return; - } - - rv = pump->AsyncRead(listener, nullptr); - if (NS_FAILED(rv)) { -- mChannel->Cancel(NS_BINDING_ABORTED); -+ CancelRequest(listener, mChannel, rv); - } - } - -@@ -310,7 +321,7 @@ ExtensionStreamGetter::OnFD(const FileDescriptor& aFD) - mJarChannel->SetJarFile(fdFile); - nsresult rv = mJarChannel->AsyncOpen2(listener); - if (NS_FAILED(rv)) { -- mChannel->Cancel(NS_BINDING_ABORTED); -+ CancelRequest(listener, mChannel, rv); - } - } - diff --git a/www/waterfox/files/patch-bug1402218 b/www/waterfox/files/patch-bug1402218 deleted file mode 100644 index e407960ef94..00000000000 --- a/www/waterfox/files/patch-bug1402218 +++ /dev/null @@ -1,91 +0,0 @@ -commit 3ddaaf254633 -Author: Boris Zbarsky -Date: Thu Sep 28 22:04:34 2017 -0400 - - Bug 1402218 - Make sure to clone our CSSDeclaration as needed when removing properties. r=emilio, a=sledru - - MozReview-Commit-ID: 6LRjLU3QQok - - --HG-- - extra : source : 76b6ae2fc6eb389810cb2a745f976be11516eb44 - extra : amend_source : 849900fa9c4e12b62cf73175666a672ca6ab3914 ---- - layout/style/DeclarationBlockInlines.h | 9 +++++++++ - layout/style/crashtests/1402218-1.html | 15 +++++++++++++++ - layout/style/crashtests/crashtests.list | 3 ++- - layout/style/nsDOMCSSDeclaration.cpp | 12 +----------- - 4 files changed, 27 insertions(+), 12 deletions(-) - -diff --git layout/style/DeclarationBlockInlines.h layout/style/DeclarationBlockInlines.h -index 5438bd1957c2..c9e0d4f82e31 100644 ---- layout/style/DeclarationBlockInlines.h -+++ layout/style/DeclarationBlockInlines.h -@@ -46,6 +46,15 @@ DeclarationBlock::EnsureMutable() - AsGecko()->AssertNotExpanded(); - } - #endif -+ if (IsServo() && !IsDirty()) { -+ // In stylo, the old DeclarationBlock is stored in element's rule node tree -+ // directly, to avoid new values replacing the DeclarationBlock in the tree -+ // directly, we need to copy the old one here if we haven't yet copied. -+ // As a result the new value does not replace rule node tree until traversal -+ // happens. -+ return Clone(); -+ } -+ - if (!IsMutable()) { - return Clone(); - } -diff --git layout/style/crashtests/1402218-1.html layout/style/crashtests/1402218-1.html -new file mode 100644 -index 000000000000..597c1c4d5e53 ---- /dev/null -+++ layout/style/crashtests/1402218-1.html -@@ -0,0 +1,15 @@ -+ -+ -+ -+
-+
-+
-+ -+ -diff --git layout/style/crashtests/crashtests.list layout/style/crashtests/crashtests.list -index e0a7fe4a20c5..ab9b5a7a9a4e 100644 ---- layout/style/crashtests/crashtests.list -+++ layout/style/crashtests/crashtests.list -@@ -202,3 +202,4 @@ load 1387481-1.html - load 1387499.html - load 1391577.html - load 1398581.html -+load 1402218-1.html -diff --git layout/style/nsDOMCSSDeclaration.cpp layout/style/nsDOMCSSDeclaration.cpp -index a828f0e7b3dd..12e03c314fe9 100644 ---- layout/style/nsDOMCSSDeclaration.cpp -+++ layout/style/nsDOMCSSDeclaration.cpp -@@ -305,17 +305,7 @@ nsDOMCSSDeclaration::ModifyDeclaration(GeckoFunc aGeckoFunc, - // between when we mutate the declaration and when we set the new - // rule (see stack in bug 209575). - mozAutoDocConditionalContentUpdateBatch autoUpdate(DocToUpdate(), true); -- RefPtr decl; -- if (olddecl->IsServo() && !olddecl->IsDirty()) { -- // In stylo, the old DeclarationBlock is stored in element's rule node tree -- // directly, to avoid new values replacing the DeclarationBlock in the tree -- // directly, we need to copy the old one here if we haven't yet copied. -- // As a result the new value does not replace rule node tree until traversal -- // happens. -- decl = olddecl->Clone(); -- } else { -- decl = olddecl->EnsureMutable(); -- } -+ RefPtr decl = olddecl->EnsureMutable(); - - bool changed; - if (decl->IsGecko()) { diff --git a/www/waterfox/files/patch-bug1402366 b/www/waterfox/files/patch-bug1402366 deleted file mode 100644 index 393c36e27ef..00000000000 --- a/www/waterfox/files/patch-bug1402366 +++ /dev/null @@ -1,87 +0,0 @@ -commit 0211305e7012 -Author: Emilio Cobos Álvarez -Date: Fri Sep 22 21:23:11 2017 +0200 - - Bug 1402366 - Mark datetimebox as not needing xul.css. r=bholley, r=jessica, a=sledru - - We create a datetimebox in content documents that gets an XBL binding on - nsDateTimeControlFrame::CreateAnonymousContent. - - This is done during frame construction, and loading a datetimebox insert xul.css - in the document, which causes invalidation to run. - - datetimebox styles are in html.css, and there's no rule in xul.css that styles - it, so we don't need to load the stylesheet at all. - - MozReview-Commit-ID: 2SbIOoER2uB - - --HG-- - extra : source : 5b642e09aacd450f7ea2b667d2d453a701a30e15 ---- - dom/xul/nsXULElement.cpp | 5 ++--- - 1 file changed, 2 insertions(+), 3 deletions(-) - -diff --git dom/xul/nsXULElement.cpp dom/xul/nsXULElement.cpp -index f1a87e917182..2c3574cd6580 100644 ---- dom/xul/nsXULElement.cpp -+++ dom/xul/nsXULElement.cpp -@@ -696,6 +696,7 @@ static inline bool XULElementsRulesInMinimalXULSheet(nsIAtom* aTag) - aTag == nsGkAtoms::thumb || - aTag == nsGkAtoms::scale || - // other -+ aTag == nsGkAtoms::datetimebox || - aTag == nsGkAtoms::resizer || - aTag == nsGkAtoms::label || - aTag == nsGkAtoms::videocontrols; -@@ -810,9 +811,7 @@ nsXULElement::BindToTree(nsIDocument* aDocument, - // pulling in xul.css. - // Note that add-ons may introduce bindings that cause this assertion to - // fire. -- NS_ASSERTION(IsInVideoControls(this) || -- IsInFeedSubscribeLine(this) || -- IsXULElement(nsGkAtoms::datetimebox), -+ NS_ASSERTION(IsInVideoControls(this) || IsInFeedSubscribeLine(this), - "Unexpected XUL element in non-XUL doc"); - } - } - -commit 07adf4398955 -Author: Emilio Cobos Álvarez -Date: Mon Sep 25 10:16:36 2017 +0200 - - Bug 1402366 - Crashtest. r=me, a=sledru - - MozReview-Commit-ID: 8ZcVBHKNntj - - --HG-- - extra : source : 7fde3082d44b416af788f2ba09834fb3403eb8ff ---- - layout/style/crashtests/1402366.html | 10 ++++++++++ - layout/style/crashtests/crashtests.list | 1 + - 2 files changed, 11 insertions(+) - -diff --git layout/style/crashtests/1402366.html layout/style/crashtests/1402366.html -new file mode 100644 -index 000000000000..9cffd08f0415 ---- /dev/null -+++ layout/style/crashtests/1402366.html -@@ -0,0 +1,10 @@ -+ -diff --git layout/style/crashtests/crashtests.list layout/style/crashtests/crashtests.list -index 9cd557a44187..be05f417d6aa 100644 ---- layout/style/crashtests/crashtests.list -+++ layout/style/crashtests/crashtests.list -@@ -203,3 +203,4 @@ load 1387499.html - load 1391577.html - load 1398581.html - load 1402218-1.html -+load 1402366.html diff --git a/www/waterfox/files/patch-bug1402377 b/www/waterfox/files/patch-bug1402377 deleted file mode 100644 index 6d5322defb3..00000000000 --- a/www/waterfox/files/patch-bug1402377 +++ /dev/null @@ -1,36 +0,0 @@ -commit 9e374938aaac -Author: Munro Mengjue Chiang -Date: Wed Sep 27 10:16:46 2017 +0800 - - Bug 1402377 - Stop the corresponding track instead of the whole stream when an external device is plugged out. r=jib, r=pehrsons, a=ritu - - MozReview-Commit-ID: 7gbB5sgn6xI - - --HG-- - extra : source : 140805019de38dbfbb9f4fe363de8d7c8a52d387 - extra : histedit_source : 9f60927d8c7dfba265a60497b305e65eeb28939b ---- - dom/media/MediaManager.cpp | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git dom/media/MediaManager.cpp dom/media/MediaManager.cpp -index a06296086a28..6b37fa4206a2 100644 ---- dom/media/MediaManager.cpp -+++ dom/media/MediaManager.cpp -@@ -4067,14 +4067,14 @@ GetUserMediaWindowListener::StopRawID(const nsString& removedDeviceID) - nsString id; - source->GetAudioDevice()->GetRawId(id); - if (removedDeviceID.Equals(id)) { -- source->Stop(); -+ source->StopTrack(kAudioTrack); - } - } - if (source->GetVideoDevice()) { - nsString id; - source->GetVideoDevice()->GetRawId(id); - if (removedDeviceID.Equals(id)) { -- source->Stop(); -+ source->StopTrack(kVideoTrack); - } - } - } diff --git a/www/waterfox/files/patch-bug1402380 b/www/waterfox/files/patch-bug1402380 deleted file mode 100644 index cb0f76b6caa..00000000000 --- a/www/waterfox/files/patch-bug1402380 +++ /dev/null @@ -1,257 +0,0 @@ -commit fb06fdcf7d66 -Author: Tooru Fujisawa -Date: Sun Mar 25 17:23:48 2018 +0900 - - Bug 1402380 - Set text/x-moz-url flavor of data transfer for places container with URLs inside it. r=enndeakin, a=jcristau - - --HG-- - extra : source : e4cc022b417a1268fa063fe054aa79f3c141c2e2 ---- - .../components/places/tests/browser/browser.ini | 1 + - .../tests/browser/browser_drag_folder_on_newTab.js | 94 ++++++++++++++++++++++ - testing/mochitest/tests/SimpleTest/EventUtils.js | 86 ++++++++++++++++++++ - toolkit/components/places/PlacesUtils.jsm | 11 ++- - 4 files changed, 191 insertions(+), 1 deletion(-) - -diff --git browser/components/places/tests/browser/browser.ini browser/components/places/tests/browser/browser.ini -index 64b7782c5f83..33c4cf5cc416 100644 ---- browser/components/places/tests/browser/browser.ini -+++ browser/components/places/tests/browser/browser.ini -@@ -63,3 +63,4 @@ support-files = - support-files = - bookmark_dummy_1.html - bookmark_dummy_2.html -+[browser_drag_folder_on_newTab.js] -diff --git browser/components/places/tests/browser/browser_drag_folder_on_newTab.js browser/components/places/tests/browser/browser_drag_folder_on_newTab.js -new file mode 100644 -index 000000000000..00646fff18b4 ---- /dev/null -+++ browser/components/places/tests/browser/browser_drag_folder_on_newTab.js -@@ -0,0 +1,94 @@ -+/* Any copyright is dedicated to the Public Domain. -+ * http://creativecommons.org/publicdomain/zero/1.0/ */ -+ -+"use strict"; -+ -+add_task(async function setup() { -+ let toolbar = document.getElementById("PersonalToolbar"); -+ let wasCollapsed = toolbar.collapsed; -+ -+ // Uncollapse the personal toolbar if needed. -+ if (wasCollapsed) { -+ await promiseSetToolbarVisibility(toolbar, true); -+ } -+ -+ // Clean before and after so we don't have anything in the folders. -+ await PlacesUtils.bookmarks.eraseEverything(); -+ -+ registerCleanupFunction(async function() { -+ // Collapse the personal toolbar if needed. -+ if (wasCollapsed) { -+ await promiseSetToolbarVisibility(toolbar, false); -+ } -+ -+ await PlacesUtils.bookmarks.eraseEverything(); -+ }); -+}); -+ -+const TEST_FOLDER_NAME = "Test folder"; -+ -+add_task(async function test_change_location_from_Toolbar() { -+ let newTabButton = document.getElementById("new-tab-button"); -+ -+ let children = [ -+ { -+ title: "first", -+ url: "http://www.mochi.test/first" -+ }, -+ { -+ title: "second", -+ url: "http://www.mochi.test/second" -+ }, -+ { -+ type: PlacesUtils.bookmarks.TYPE_SEPARATOR, -+ }, -+ { -+ title: "third", -+ url: "http://www.mochi.test/third" -+ }, -+ ]; -+ let guid = PlacesUtils.history.makeGuid(); -+ await PlacesUtils.bookmarks.insertTree({ -+ guid: PlacesUtils.bookmarks.toolbarGuid, -+ children: [ -+ { -+ guid, -+ type: PlacesUtils.bookmarks.TYPE_FOLDER, -+ title: TEST_FOLDER_NAME, -+ children, -+ }, -+ ], -+ }); -+ -+ let folder = getToolbarNodeForItemGuid(guid); -+ -+ let loadedPromises = children.filter(item => "url" in item).map( -+ item => BrowserTestUtils.waitForNewTab(gBrowser, item.url, false, true)); -+ -+ let srcX = 10, srcY = 10; -+ // We should drag upwards, since dragging downwards opens menu instead. -+ let stepX = 0, stepY = -5; -+ -+ // We need to dispatch mousemove before dragging, to populate -+ // PlacesToolbar._cachedMouseMoveEvent, with the cursor position after the -+ // first step, so that the places code detects it as dragging upward. -+ EventUtils.synthesizeMouse(folder, srcX + stepX, srcY + stepY, -+ { type: "mousemove" }); -+ -+ await EventUtils.synthesizePlainDragAndDrop({ -+ srcElement: folder, -+ destElement: newTabButton, -+ srcX, -+ srcY, -+ stepX, -+ stepY, -+ }); -+ -+ let tabs = await Promise.all(loadedPromises); -+ -+ for (let tab of tabs) { -+ BrowserTestUtils.removeTab(tab); -+ } -+ -+ ok(true); -+}); -diff --git testing/mochitest/tests/SimpleTest/EventUtils.js testing/mochitest/tests/SimpleTest/EventUtils.js -index cad43966d91d..907cf60dc254 100644 ---- testing/mochitest/tests/SimpleTest/EventUtils.js -+++ testing/mochitest/tests/SimpleTest/EventUtils.js -@@ -17,6 +17,7 @@ - * synthesizeMouseExpectEvent - * synthesizeKeyExpectEvent - * synthesizeNativeOSXClick -+ * synthesizePlainDragAndDrop - * - * When adding methods to this file, please add a performance test for it. - */ -@@ -2161,6 +2162,91 @@ function synthesizeDrop(aSrcElement, aDestElement, aDragData, aDropEffect, aWind - } - } - -+/** -+ * Emulate a drag and drop by emulating a dragstart by mousedown and mousemove, -+ * and firing events dragenter, dragover, drop, and mouseup. -+ * This does not modify dataTransfer and tries to emulate the plain drag and -+ * drop as much as possible, compared to synthesizeDrop. -+ * -+ * @param aParams -+ * { -+ * srcElement: The element to start dragging -+ * destElement: The element to drop on -+ * srcX: The initial x coordinate inside srcElement -+ * srcY: The initial y coordinate inside srcElement -+ * stepX: The x-axis step for mousemove inside srcElement -+ * stepY: The y-axis step for mousemove inside srcElement -+ * destX: The x coordinate inside destElement -+ * destY: The x coordinate inside destElement -+ * srcWindow: The window for dispatching event on srcElement, -+ * defaults to the current window object -+ * destWindow: The window for dispatching event on destElement, -+ * defaults to the current window object -+ * } -+ */ -+async function synthesizePlainDragAndDrop(aParams) -+{ -+ let { -+ srcElement, -+ destElement, -+ srcX = 2, -+ srcY = 2, -+ stepX = 9, -+ stepY = 9, -+ destX = 2, -+ destY = 2, -+ srcWindow = window, -+ destWindow = window, -+ } = aParams; -+ -+ const ds = _EU_Cc["@mozilla.org/widget/dragservice;1"] -+ .getService(_EU_Ci.nsIDragService); -+ ds.startDragSession(); -+ -+ try { -+ let dataTransfer = null; -+ function trapDrag(aEvent) { -+ dataTransfer = aEvent.dataTransfer; -+ } -+ srcElement.addEventListener("dragstart", trapDrag, true); -+ synthesizeMouse(srcElement, srcX, srcY, { type: "mousedown" }, srcWindow); -+ -+ // Wait for the next event tick after each event dispatch, so that UI elements -+ // (e.g. menu) work like the real user input. -+ await new Promise(r => setTimeout(r, 0)); -+ -+ srcX += stepX; srcY += stepY; -+ synthesizeMouse(srcElement, srcX, srcY, { type: "mousemove" }, srcWindow); -+ -+ await new Promise(r => setTimeout(r, 0)); -+ -+ srcX += stepX; srcY += stepY; -+ synthesizeMouse(srcElement, srcX, srcY, { type: "mousemove" }, srcWindow); -+ -+ await new Promise(r => setTimeout(r, 0)); -+ -+ srcElement.removeEventListener("dragstart", trapDrag, true); -+ -+ await new Promise(r => setTimeout(r, 0)); -+ -+ let event = createDragEventObject("dragover", destElement, destWindow, -+ dataTransfer, {}); -+ sendDragEvent(event, destElement, destWindow); -+ -+ await new Promise(r => setTimeout(r, 0)); -+ -+ event = createDragEventObject("drop", destElement, destWindow, -+ dataTransfer, {}); -+ sendDragEvent(event, destElement, destWindow); -+ -+ await new Promise(r => setTimeout(r, 0)); -+ -+ synthesizeMouseAtCenter(destElement, { type: "mouseup" }, destWindow); -+ } finally { -+ ds.endDragSession(true, 0); -+ } -+} -+ - var PluginUtils = - { - withTestPlugin : function(callback) -diff --git toolkit/components/places/PlacesUtils.jsm toolkit/components/places/PlacesUtils.jsm -index f6315f68eb4c..5aebe0496ee8 100644 ---- toolkit/components/places/PlacesUtils.jsm -+++ toolkit/components/places/PlacesUtils.jsm -@@ -896,6 +896,11 @@ this.PlacesUtils = { - case this.TYPE_X_MOZ_URL: { - if (aFeedURI || PlacesUtils.nodeIsURI(aNode)) - return (aFeedURI || aNode.uri) + NEWLINE + aNode.title; -+ if (PlacesUtils.nodeIsContainer(aNode)) { -+ return PlacesUtils.getURLsForContainerNode(aNode) -+ .map(item => item.uri + "\n" + item.title) -+ .join("\n"); -+ } - return ""; - } - case this.TYPE_HTML: { -@@ -1491,7 +1496,11 @@ this.PlacesUtils = { - for (let i = 0; i < root.childCount; ++i) { - let child = root.getChild(i); - if (this.nodeIsURI(child)) -- urls.push({uri: child.uri, isBookmark: this.nodeIsBookmark(child)}); -+ urls.push({ -+ uri: child.uri, -+ isBookmark: this.nodeIsBookmark(child), -+ title: child.title, -+ }); - } - - if (!wasOpen) { diff --git a/www/waterfox/files/patch-bug1402442 b/www/waterfox/files/patch-bug1402442 deleted file mode 100644 index 18bf1c88ca4..00000000000 --- a/www/waterfox/files/patch-bug1402442 +++ /dev/null @@ -1,181 +0,0 @@ -commit 44b4458e2d21 -Author: Emilio Cobos Álvarez -Date: Mon Sep 25 18:25:29 2017 +0200 - - Bug 1402442 - Properly remove display: contents pseudo-frames. r=mats, a=ritu - - MozReview-Commit-ID: 4pjVLQfv3YR - Signed-off-by: Emilio Cobos Álvarez - - --HG-- - extra : source : faa69ac1c14b79838cc0aac842b470a110542ebd - extra : amend_source : 3a76e0123bf3f7d10295000cc44fd8bdddf700df ---- - layout/base/nsCSSFrameConstructor.cpp | 26 +++++++++++++++------- - testing/web-platform/meta/MANIFEST.json | 25 +++++++++++++++++++++ - ...dynamic-generated-content-fieldset-001.html.ini | 4 ++++ - ...dynamic-generated-content-fieldset-001-ref.html | 16 +++++++++++++ - ...nts-dynamic-generated-content-fieldset-001.html | 26 ++++++++++++++++++++++ - 5 files changed, 89 insertions(+), 8 deletions(-) - -diff --git layout/base/nsCSSFrameConstructor.cpp layout/base/nsCSSFrameConstructor.cpp -index 99b1211b399b..4fce3fb381a7 100644 ---- layout/base/nsCSSFrameConstructor.cpp -+++ layout/base/nsCSSFrameConstructor.cpp -@@ -1698,6 +1698,17 @@ nsCSSFrameConstructor::NotifyDestroyingFrame(nsIFrame* aFrame) - nsFrameManager::NotifyDestroyingFrame(aFrame); - } - -+static bool -+HasGeneratedContent(const nsIContent* aChild) -+{ -+ if (!aChild->MayHaveAnonymousChildren()) { -+ return false; -+ } -+ -+ return nsLayoutUtils::GetBeforeFrame(aChild) || -+ nsLayoutUtils::GetAfterFrame(aChild); -+} -+ - struct nsGenConInitializer { - nsAutoPtr mNode; - nsGenConList* mList; -@@ -8642,16 +8653,15 @@ nsCSSFrameConstructor::ContentRemoved(nsIContent* aCo - MOZ_ASSERT(!childFrame || !GetDisplayContentsStyleFor(aChild), - "display:contents nodes shouldn't have a frame"); - if (!childFrame && GetDisplayContentsStyleFor(aChild)) { -- nsIContent* ancestor = aContainer; -- MOZ_ASSERT(ancestor, "display: contents on the root?"); -- while (!ancestor->GetPrimaryFrame()) { -- // FIXME(emilio): Should this use the flattened tree parent instead? -- ancestor = ancestor->GetParent(); -- MOZ_ASSERT(ancestor, "we can't have a display: contents subtree root!"); -- } -+ if (HasGeneratedContent(aChild)) { -+ nsIContent* ancestor = aContainer; -+ MOZ_ASSERT(ancestor, "display: contents on the root?"); -+ while (!ancestor->GetPrimaryFrame()) { -+ // FIXME(emilio): Should this use the flattened tree parent instead? -+ ancestor = ancestor->GetParent(); -+ MOZ_ASSERT(ancestor, "we can't have a display: contents subtree root!"); -+ } - -- nsIFrame* ancestorFrame = ancestor->GetPrimaryFrame(); -- if (ancestorFrame->GetProperty(nsIFrame::GenConProperty())) { - *aDidReconstruct = true; - LAYOUT_PHASE_TEMP_EXIT(); - -diff --git testing/web-platform/meta/MANIFEST.json testing/web-platform/meta/MANIFEST.json -index 5f05321c5a70..8aed4a4b5078 100644 ---- testing/web-platform/meta/MANIFEST.json -+++ testing/web-platform/meta/MANIFEST.json -@@ -102975,6 +102975,18 @@ - {} - ] - ], -+ "css/css-display-3/display-contents-dynamic-generated-content-fieldset-001.html": [ -+ [ -+ "/css/css-display-3/display-contents-dynamic-generated-content-fieldset-001.html", -+ [ -+ [ -+ "/css/css-display-3/display-contents-dynamic-generated-content-fieldset-001-ref.html", -+ "==" -+ ] -+ ], -+ {} -+ ] -+ ], - "css/css-display-3/display-contents-dynamic-inline-flex-001-inline.html": [ - [ - "/css/css-display-3/display-contents-dynamic-inline-flex-001-inline.html", -@@ -227658,6 +227670,11 @@ - {} - ] - ], -+ "css/css-display-3/display-contents-dynamic-generated-content-fieldset-001-ref.html": [ -+ [ -+ {} -+ ] -+ ], - "css/css-display-3/display-contents-flex-001-ref.html": [ - [ - {} -@@ -502880,6 +502897,14 @@ - "a2d7c9368ed8c01ca06c36646666270e85aee070", - "reftest" - ], -+ "css/css-display-3/display-contents-dynamic-generated-content-fieldset-001-ref.html": [ -+ "30ec5c8ddacfbfef8434c37ca7a0a766f2bbc89a", -+ "support" -+ ], -+ "css/css-display-3/display-contents-dynamic-generated-content-fieldset-001.html": [ -+ "984bebb3c3b8661aedef4a229848dfa818bb1f4a", -+ "reftest" -+ ], - "css/css-display-3/display-contents-dynamic-inline-flex-001-inline.html": [ - "40fb07e8ada1530e6835ff2d4e49c5571ffb0baa", - "reftest" -diff --git testing/web-platform/meta/css/css-display-3/display-contents-dynamic-generated-content-fieldset-001.html.ini testing/web-platform/meta/css/css-display-3/display-contents-dynamic-generated-content-fieldset-001.html.ini -new file mode 100644 -index 000000000000..63c7442a2362 ---- /dev/null -+++ testing/web-platform/meta/css/css-display-3/display-contents-dynamic-generated-content-fieldset-001.html.ini -@@ -0,0 +1,4 @@ -+[display-contents-dynamic-generated-content-fieldset-001.html] -+ type: reftest -+ expected: -+ if not stylo: FAIL -diff --git testing/web-platform/tests/css/css-display-3/display-contents-dynamic-generated-content-fieldset-001-ref.html testing/web-platform/tests/css/css-display-3/display-contents-dynamic-generated-content-fieldset-001-ref.html -new file mode 100644 -index 000000000000..651bc19b83e9 ---- /dev/null -+++ testing/web-platform/tests/css/css-display-3/display-contents-dynamic-generated-content-fieldset-001-ref.html -@@ -0,0 +1,16 @@ -+ -+ -+CSS Reftest Reference -+ -+ -+

-+ Test passes if there is no red text and no red border. -+

-+
-+
-+
-diff --git testing/web-platform/tests/css/css-display-3/display-contents-dynamic-generated-content-fieldset-001.html testing/web-platform/tests/css/css-display-3/display-contents-dynamic-generated-content-fieldset-001.html -new file mode 100644 -index 000000000000..8f8a0ba47971 ---- /dev/null -+++ testing/web-platform/tests/css/css-display-3/display-contents-dynamic-generated-content-fieldset-001.html -@@ -0,0 +1,26 @@ -+ -+ -+CSS Test: Dynamic changes to display: contents generated content in fieldsets. -+ -+ -+ -+ -+

-+ Test passes if there is no red text and no red border. -+

-+
-+
-+
-+ diff --git a/www/waterfox/files/patch-bug1402469 b/www/waterfox/files/patch-bug1402469 deleted file mode 100644 index 4dae69a93f0..00000000000 --- a/www/waterfox/files/patch-bug1402469 +++ /dev/null @@ -1,182 +0,0 @@ -commit 6b4f644b9a4e -Author: Makoto Kato -Date: Mon Sep 25 14:15:50 2017 +0900 - - Bug 1402469 - Part 1. Return value of ConvertListType should use Element instead of nsresult. r=masayuki, a=sledru - - This is a typo bug of Bug 1053779 Part 2. ConvertListType might return NS_OK - even if ReplaceContainer doesn't return valid value. - - So, to clean up code, we should return Element instead of nsresult since out - parameter of this function is Element only. - - MozReview-Commit-ID: 44UHETzcdGy - - --HG-- - extra : source : 5efdecc086858b4b4e5b0fcf9b7f27ef63d91738 ---- - editor/libeditor/HTMLEditRules.cpp | 47 +++++++++++++++++--------------------- - editor/libeditor/HTMLEditRules.h | 4 ++-- - 2 files changed, 23 insertions(+), 28 deletions(-) - -diff --git editor/libeditor/HTMLEditRules.cpp editor/libeditor/HTMLEditRules.cpp -index ad613517269d..fdb15fec7b2f 100644 ---- editor/libeditor/HTMLEditRules.cpp -+++ editor/libeditor/HTMLEditRules.cpp -@@ -2960,9 +2960,8 @@ HTMLEditRules::TryToJoinBlocks(nsIContent& aLeftNode, - // Nodes are same type. merge them. - EditorDOMPoint pt = JoinNodesSmart(*leftBlock, *rightBlock); - if (pt.node && mergeLists) { -- nsCOMPtr newBlock; -- ConvertListType(rightBlock, getter_AddRefs(newBlock), -- existingList, nsGkAtoms::li); -+ RefPtr newBlock = -+ ConvertListType(rightBlock, existingList, nsGkAtoms::li); - } - ret.MarkAsHandled(); - } else { -@@ -3320,18 +3319,19 @@ HTMLEditRules::WillMakeList(Selection* aSelection, - NS_ENSURE_STATE(mHTMLEditor); - rv = mHTMLEditor->MoveNode(curNode, curList, -1); - NS_ENSURE_SUCCESS(rv, rv); -- rv = ConvertListType(curNode->AsElement(), getter_AddRefs(newBlock), -- listType, itemType); -- NS_ENSURE_SUCCESS(rv, rv); -+ newBlock = ConvertListType(curNode->AsElement(), listType, itemType); -+ if (NS_WARN_IF(!newBlock)) { -+ return NS_ERROR_FAILURE; -+ } - NS_ENSURE_STATE(mHTMLEditor); - rv = mHTMLEditor->RemoveBlockContainer(*newBlock); - NS_ENSURE_SUCCESS(rv, rv); - } else { - // replace list with new list type -- rv = ConvertListType(curNode->AsElement(), getter_AddRefs(newBlock), -- listType, itemType); -- NS_ENSURE_SUCCESS(rv, rv); -- curList = newBlock; -+ curList = ConvertListType(curNode->AsElement(), listType, itemType); -+ if (NS_WARN_IF(!curList)) { -+ return NS_ERROR_FAILURE; -+ } - } - prevListItem = nullptr; - continue; -@@ -4495,14 +4495,12 @@ HTMLEditRules::OutdentPartOfBlock(Element& aBlock, - /** - * ConvertListType() converts list type and list item type. - */ --nsresult -+already_AddRefed - HTMLEditRules::ConvertListType(Element* aList, -- Element** aOutList, - nsIAtom* aListType, - nsIAtom* aItemType) - { - MOZ_ASSERT(aList); -- MOZ_ASSERT(aOutList); - MOZ_ASSERT(aListType); - MOZ_ASSERT(aItemType); - -@@ -4513,29 +4511,26 @@ HTMLEditRules::ConvertListType(Element* aList, - if (HTMLEditUtils::IsListItem(element) && - !element->IsHTMLElement(aItemType)) { - child = mHTMLEditor->ReplaceContainer(element, aItemType); -- NS_ENSURE_STATE(child); -+ if (NS_WARN_IF(!child)) { -+ return nullptr; -+ } - } else if (HTMLEditUtils::IsList(element) && - !element->IsHTMLElement(aListType)) { -- nsCOMPtr temp; -- nsresult rv = ConvertListType(child->AsElement(), getter_AddRefs(temp), -- aListType, aItemType); -- NS_ENSURE_SUCCESS(rv, rv); -- child = temp.forget(); -+ child = ConvertListType(child->AsElement(), aListType, aItemType); -+ if (NS_WARN_IF(!child)) { -+ return nullptr; -+ } - } - } - child = child->GetNextSibling(); - } - - if (aList->IsHTMLElement(aListType)) { -- nsCOMPtr list = aList->AsElement(); -- list.forget(aOutList); -- return NS_OK; -+ RefPtr list = aList->AsElement(); -+ return list.forget(); - } - -- *aOutList = mHTMLEditor->ReplaceContainer(aList, aListType).take(); -- NS_ENSURE_STATE(aOutList); -- -- return NS_OK; -+ return mHTMLEditor->ReplaceContainer(aList, aListType); - } - - -diff --git editor/libeditor/HTMLEditRules.h editor/libeditor/HTMLEditRules.h -index d1bb1fa7e3b2..0dde7f01e408 100644 ---- editor/libeditor/HTMLEditRules.h -+++ editor/libeditor/HTMLEditRules.h -@@ -316,8 +316,8 @@ protected: - nsIContent** aOutLeftNode, - nsIContent** aOutRightNode); - -- nsresult ConvertListType(Element* aList, Element** aOutList, -- nsIAtom* aListType, nsIAtom* aItemType); -+ already_AddRefed ConvertListType(Element* aList, nsIAtom* aListType, -+ nsIAtom* aItemType); - - nsresult CreateStyleForInsertText(Selection& aSelection, nsIDocument& aDoc); - enum class MozBRCounts { yes, no }; - -commit 5e5f298b8e42 -Author: Makoto Kato -Date: Mon Sep 25 14:11:29 2017 +0900 - - Bug 1402469 - Part 2. Add crash test. r=masayuki, a=sledru - - MozReview-Commit-ID: HogVH2OTyd6 - - --HG-- - extra : source : 5e311cd7074e6b649187f5a79371f0681c2d7504 ---- - editor/libeditor/crashtests/1402469.html | 16 ++++++++++++++++ - editor/libeditor/crashtests/crashtests.list | 1 + - 2 files changed, 17 insertions(+) - -diff --git editor/libeditor/crashtests/1402469.html editor/libeditor/crashtests/1402469.html -new file mode 100644 -index 000000000000..04b1adc96f25 ---- /dev/null -+++ editor/libeditor/crashtests/1402469.html -@@ -0,0 +1,16 @@ -+ -+ -+ -+ -+ -+ -+ -+
-+
    -+
-+ -+ -diff --git editor/libeditor/crashtests/crashtests.list editor/libeditor/crashtests/crashtests.list -index 11672c41d102..840e26f2fe62 100644 ---- editor/libeditor/crashtests/crashtests.list -+++ editor/libeditor/crashtests/crashtests.list -@@ -80,3 +80,4 @@ load 1366176.html - load 1375131.html - load 1381541.html - load 1383755.html -+load 1402469.html diff --git a/www/waterfox/files/patch-bug1402681 b/www/waterfox/files/patch-bug1402681 deleted file mode 100644 index 6fddbdf9937..00000000000 --- a/www/waterfox/files/patch-bug1402681 +++ /dev/null @@ -1,138 +0,0 @@ -commit ffcf40b7a0e9 -Author: Alastor Wu -Date: Tue Sep 26 17:48:19 2017 +0800 - - Bug 1402681 - Part 1: Do not queue the task without task queue. r=jya, a=sledru - - Since the source buffer is a wrapped native, it would be unlinked twice and then the - TrackBuffersManager::Detach() would also be called twice. - - The first detach task would clear the task queue of TrackBuffersManager, and then we - won't accept any new task without task queue. The second detach task should not be - executed. - - MozReview-Commit-ID: AWTzVbRH5B1 - - --HG-- - extra : source : 145eac8ba70636cdb1a235d6d7094b87bbfd8022 ---- - dom/media/mediasource/TrackBuffersManager.cpp | 9 +++++++++ - 1 file changed, 9 insertions(+) - -diff --git dom/media/mediasource/TrackBuffersManager.cpp dom/media/mediasource/TrackBuffersManager.cpp -index 50293810064b..cda89faaff51 100644 ---- dom/media/mediasource/TrackBuffersManager.cpp -+++ dom/media/mediasource/TrackBuffersManager.cpp -@@ -145,6 +145,15 @@ TrackBuffersManager::DoAppendData(already_AddRefed aData, - void - TrackBuffersManager::QueueTask(SourceBufferTask* aTask) - { -+ // The source buffer is a wrapped native, it would be unlinked twice and so -+ // the TrackBuffersManager::Detach() would also be called twice. Since the -+ // detach task has been done before, we could ignore this task. -+ if (!GetTaskQueue()) { -+ MOZ_ASSERT(aTask->GetType() == SourceBufferTask::Type::Detach, -+ "only detach task could happen here!"); -+ return; -+ } -+ - if (!OnTaskQueue()) { - GetTaskQueue()->Dispatch(NewRunnableMethod>( - "TrackBuffersManager::QueueTask", - -commit 99e2204da6a1 -Author: Alastor Wu -Date: Tue Sep 26 17:48:39 2017 +0800 - - Bug 1402681 - Part 2: Add log. r=jya, a=sledru - - MozReview-Commit-ID: 8qINxSCKrvg - - --HG-- - extra : source : 0cac2e15b4ca7cf03e75ee208da624495215382f ---- - dom/media/mediasource/SourceBufferTask.h | 7 +++++++ - dom/media/mediasource/TrackBuffersManager.cpp | 4 ++++ - 2 files changed, 11 insertions(+) - -diff --git dom/media/mediasource/SourceBufferTask.h dom/media/mediasource/SourceBufferTask.h -index 183e7b4b2a0b..b73094fbd282 100644 ---- dom/media/mediasource/SourceBufferTask.h -+++ dom/media/mediasource/SourceBufferTask.h -@@ -32,6 +32,7 @@ public: - typedef MozPromise RangeRemovalPromise; - - virtual Type GetType() const = 0; -+ virtual const char* GetTypeName() const = 0; - - template - ReturnType* As() -@@ -54,6 +55,7 @@ public: - - static const Type sType = Type::AppendBuffer; - Type GetType() const override { return Type::AppendBuffer; } -+ const char* GetTypeName() const override { return "AppendBuffer"; } - - RefPtr mBuffer; - SourceBufferAttributes mAttributes; -@@ -64,12 +66,14 @@ class AbortTask : public SourceBufferTask { - public: - static const Type sType = Type::Abort; - Type GetType() const override { return Type::Abort; } -+ const char* GetTypeName() const override { return "Abort"; } - }; - - class ResetTask : public SourceBufferTask { - public: - static const Type sType = Type::Reset; - Type GetType() const override { return Type::Reset; } -+ const char* GetTypeName() const override { return "Reset"; } - }; - - class RangeRemovalTask : public SourceBufferTask { -@@ -80,6 +84,7 @@ public: - - static const Type sType = Type::RangeRemoval; - Type GetType() const override { return Type::RangeRemoval; } -+ const char* GetTypeName() const override { return "RangeRemoval"; } - - media::TimeInterval mRange; - MozPromiseHolder mPromise; -@@ -94,6 +99,7 @@ public: - - static const Type sType = Type::EvictData; - Type GetType() const override { return Type::EvictData; } -+ const char* GetTypeName() const override { return "EvictData"; } - - media::TimeUnit mPlaybackTime; - int64_t mSizeToEvict; -@@ -103,6 +109,7 @@ class DetachTask : public SourceBufferTask { - public: - static const Type sType = Type::Detach; - Type GetType() const override { return Type::Detach; } -+ const char* GetTypeName() const override { return "Detach"; } - }; - - } // end mozilla namespace -diff --git dom/media/mediasource/TrackBuffersManager.cpp dom/media/mediasource/TrackBuffersManager.cpp -index cda89faaff51..b9b768b726a2 100644 ---- dom/media/mediasource/TrackBuffersManager.cpp -+++ dom/media/mediasource/TrackBuffersManager.cpp -@@ -151,6 +151,8 @@ TrackBuffersManager::QueueTask(SourceBufferTask* aTask) - if (!GetTaskQueue()) { - MOZ_ASSERT(aTask->GetType() == SourceBufferTask::Type::Detach, - "only detach task could happen here!"); -+ MSE_DEBUG("Could not queue the task '%s' without task queue", -+ aTask->GetTypeName()); - return; - } - -@@ -183,6 +185,8 @@ TrackBuffersManager::ProcessTasks() - // nothing to do. - return; - } -+ -+ MSE_DEBUG("Process task '%s'", task->GetTypeName()); - switch (task->GetType()) { - case Type::AppendBuffer: - mCurrentTask = task; diff --git a/www/waterfox/files/patch-bug1402715 b/www/waterfox/files/patch-bug1402715 deleted file mode 100644 index c8857edb5ee..00000000000 --- a/www/waterfox/files/patch-bug1402715 +++ /dev/null @@ -1,44 +0,0 @@ -commit 6c7fb56e58c5 -Author: Mats Palmgren -Date: Wed Sep 27 14:12:01 2017 +0200 - - Bug 1402715 - Treat URL bar contents as raw text when copying. r=mak - - MozReview-Commit-ID: LuSvwRUVwAq ---- - browser/base/content/test/urlbar/browser_urlbarCopying.js | 5 +++++ - browser/base/content/urlbarBindings.xml | 5 ++++- - 2 files changed, 9 insertions(+), 1 deletion(-) - -diff --git browser/base/content/test/urlbar/browser_urlbarCopying.js browser/base/content/test/urlbar/browser_urlbarCopying.js -index 521dace780f2..9559b06b2ec6 100644 ---- browser/base/content/test/urlbar/browser_urlbarCopying.js -+++ browser/base/content/test/urlbar/browser_urlbarCopying.js -@@ -164,6 +164,11 @@ var tests = [ - copyVal: "\xf7", - copyExpected: "http://example.com/?\xf7" - }, -+ { -+ loadURL: "http://example.com/%20%20%20", -+ expectedURL: "example.com/ ", -+ copyExpected: "http://example.com/%20%20%20" -+ }, - - // data: and javsacript: URIs shouldn't be encoded - { -diff --git browser/base/content/urlbarBindings.xml browser/base/content/urlbarBindings.xml -index 8999ab379cb2..4a86ce38e893 100644 ---- browser/base/content/urlbarBindings.xml -+++ browser/base/content/urlbarBindings.xml -@@ -972,7 +972,10 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/. - // Grab the actual input field's value, not our value, which could include moz-action: - var inputVal = this.inputField.value; - let selection = this.editor.selection; -- var selectedVal = selection.toString(); -+ const flags = Ci.nsIDocumentEncoder.OutputPreformatted | -+ Ci.nsIDocumentEncoder.OutputRaw; -+ let selectedVal = selection.QueryInterface(Ci.nsISelectionPrivate) -+ .toStringWithFormat("text/plain", flags, 0); - - // Handle multiple-range selection as a string for simplicity. - if (selection.rangeCount > 1) { diff --git a/www/waterfox/files/patch-bug1402766 b/www/waterfox/files/patch-bug1402766 deleted file mode 100644 index a339af5d118..00000000000 --- a/www/waterfox/files/patch-bug1402766 +++ /dev/null @@ -1,69 +0,0 @@ -commit fd42606e30e4 -Author: Boris Zbarsky -Date: Tue Oct 3 18:50:10 2017 -0400 - - Bug 1402766 - Work around layout violating its own invariants and causing stylo code to crash. r=emilio, a=sledru - - MozReview-Commit-ID: 3ggJI0qmOJV - - --HG-- - extra : source : 71d02a129bebc9dfd804b1babb8fae587d1930a8 - extra : histedit_source : d36726bf4182c3820a3f8efd2d2599b114cb55c4 ---- - layout/generic/crashtests/1405443.html | 19 +++++++++++++++++++ - layout/generic/crashtests/crashtests.list | 1 + - layout/generic/nsInlineFrame.cpp | 7 +++++++ - 3 files changed, 27 insertions(+) - -diff --git layout/generic/crashtests/1405443.html layout/generic/crashtests/1405443.html -new file mode 100644 -index 000000000000..79313ae1c4d4 ---- /dev/null -+++ layout/generic/crashtests/1405443.html -@@ -0,0 +1,19 @@ -+ -+ -+ -+
-+A -+ -+ -+ -+
-diff --git layout/generic/crashtests/crashtests.list layout/generic/crashtests/crashtests.list -index 25c2c32470fc..07cc75ea0f9a 100644 ---- layout/generic/crashtests/crashtests.list -+++ layout/generic/crashtests/crashtests.list -@@ -659,3 +659,4 @@ load 1367413-1.html - load 1368617-1.html - load 1373586.html - load 1401420-1.html -+asserts(11) load 1405443.html # bug 1405443 -diff --git layout/generic/nsInlineFrame.cpp layout/generic/nsInlineFrame.cpp -index 089178a6ada2..ce62f822bda0 100644 ---- layout/generic/nsInlineFrame.cpp -+++ layout/generic/nsInlineFrame.cpp -@@ -1065,6 +1065,13 @@ nsInlineFrame::UpdateStyleOfOwnedAnonBoxesForIBSplit( - } - - nsIFrame* nextInline = blockFrame->GetProperty(nsIFrame::IBSplitSibling()); -+ -+ // This check is here due to bug 1405443. Please remove it once -+ // that bug is fixed. -+ if (!nextInline) { -+ break; -+ } -+ - MOZ_ASSERT(nextInline, "There is always a trailing inline in an IB split"); - - for (nsIFrame* cont = nextInline; cont; cont = cont->GetNextContinuation()) { diff --git a/www/waterfox/files/patch-bug1402871 b/www/waterfox/files/patch-bug1402871 deleted file mode 100644 index a0b71c81a4a..00000000000 --- a/www/waterfox/files/patch-bug1402871 +++ /dev/null @@ -1,28 +0,0 @@ -commit 6f6ee3c5b2ad -Author: Kearwood Gilbert -Date: Wed Oct 11 14:25:51 2017 -0700 - - Bug 1402871 - Change VREventObserver::mWindow to a RefPtr. r=dveditz, a=ritu - - MozReview-Commit-ID: 79MlNMAvIQD - - --HG-- - extra : source : 84ff58454e222ce067ec27f8841ba684934b7666 ---- - dom/vr/VREventObserver.h | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -diff --git dom/vr/VREventObserver.h dom/vr/VREventObserver.h -index 24a1065a18fe..cd2cf69469b5 100644 ---- dom/vr/VREventObserver.h -+++ dom/vr/VREventObserver.h -@@ -34,8 +34,7 @@ public: - private: - ~VREventObserver(); - -- // Weak pointer, instance is owned by mWindow. -- nsGlobalWindow* MOZ_NON_OWNING_REF mWindow; -+ RefPtr mWindow; - // For WebVR telemetry for tracking users who view content - // in the 2D view. - TimeStamp mSpendTimeIn2DView; diff --git a/www/waterfox/files/patch-bug1402951 b/www/waterfox/files/patch-bug1402951 deleted file mode 100644 index 7c9a14017c7..00000000000 --- a/www/waterfox/files/patch-bug1402951 +++ /dev/null @@ -1,164 +0,0 @@ -commit 71daba14a2c4 -Author: Alexander Surkov -Date: Tue Oct 3 10:58:27 2017 -0400 - - Bug 1402951 - No show events for content on document load complete. r=aklotz, r=yzen, a=ritu - - --HG-- - extra : source : ffc4c63976921cbfec03b26ff48541c2f414d2e3 ---- - accessible/generic/DocAccessible.cpp | 14 ++++++++------ - accessible/ipc/DocAccessibleChildBase.cpp | 15 ++++++++++++++- - accessible/ipc/DocAccessibleChildBase.h | 5 +++++ - accessible/ipc/DocAccessibleParent.cpp | 5 +++++ - accessible/ipc/other/PDocAccessible.ipdl | 1 + - accessible/ipc/win/DocAccessibleChild.h | 3 ++- - accessible/ipc/win/PDocAccessible.ipdl | 1 + - accessible/tests/mochitest/treeupdate/test_ariaowns.html | 5 ++--- - 8 files changed, 38 insertions(+), 11 deletions(-) - -diff --git accessible/generic/DocAccessible.cpp accessible/generic/DocAccessible.cpp -index 60b160b21a78..fa6f3c6a70d5 100644 ---- accessible/generic/DocAccessible.cpp -+++ accessible/generic/DocAccessible.cpp -@@ -1536,13 +1536,15 @@ DocAccessible::DoInitialUpdate() - ParentDocument()->FireDelayedEvent(reorderEvent); - } - -- TreeMutation mt(this); -- uint32_t childCount = ChildCount(); -- for (uint32_t i = 0; i < childCount; i++) { -- Accessible* child = GetChildAt(i); -- mt.AfterInsertion(child); -+ if (IPCAccessibilityActive()) { -+ DocAccessibleChild* ipcDoc = IPCDoc(); -+ MOZ_ASSERT(ipcDoc); -+ if (ipcDoc) { -+ for (auto idx = 0U; idx < mChildren.Length(); idx++) { -+ ipcDoc->InsertIntoIpcTree(this, mChildren.ElementAt(idx), idx); -+ } -+ } - } -- mt.Done(); - } - - void -diff --git accessible/ipc/DocAccessibleChildBase.cpp accessible/ipc/DocAccessibleChildBase.cpp -index 6a0ad9b7dbc6..19a858aa6d9b 100644 ---- accessible/ipc/DocAccessibleChildBase.cpp -+++ accessible/ipc/DocAccessibleChildBase.cpp -@@ -80,6 +80,19 @@ DocAccessibleChildBase::SerializeTree(Accessible* aRoot, - } - } - -+void -+DocAccessibleChildBase::InsertIntoIpcTree(Accessible* aParent, -+ Accessible* aChild, -+ uint32_t aIdxInParent) -+{ -+ uint64_t parentID = aParent->IsDoc() ? -+ 0 : reinterpret_cast(aParent->UniqueID()); -+ nsTArray shownTree; -+ ShowEventData data(parentID, aIdxInParent, shownTree, true); -+ SerializeTree(aChild, data.NewTree()); -+ MaybeSendShowEvent(data, false); -+} -+ - void - DocAccessibleChildBase::ShowEvent(AccShowEvent* aShowEvent) - { -@@ -87,7 +100,7 @@ DocAccessibleChildBase::ShowEvent(AccShowEvent* aShowEvent) - uint64_t parentID = parent->IsDoc() ? 0 : reinterpret_cast(parent->UniqueID()); - uint32_t idxInParent = aShowEvent->GetAccessible()->IndexInParent(); - nsTArray shownTree; -- ShowEventData data(parentID, idxInParent, shownTree); -+ ShowEventData data(parentID, idxInParent, shownTree, false); - SerializeTree(aShowEvent->GetAccessible(), data.NewTree()); - MaybeSendShowEvent(data, aShowEvent->IsFromUserInput()); - } -diff --git accessible/ipc/DocAccessibleChildBase.h accessible/ipc/DocAccessibleChildBase.h -index b8a8bfde1d0c..13146e5d44e2 100644 ---- accessible/ipc/DocAccessibleChildBase.h -+++ accessible/ipc/DocAccessibleChildBase.h -@@ -45,6 +45,11 @@ public: - SendShutdown(); - } - -+ /** -+ * Serializes a shown tree and sends it to the chrome process. -+ */ -+ void InsertIntoIpcTree(Accessible* aParent, -+ Accessible* aChild, uint32_t aIdxInParent); - void ShowEvent(AccShowEvent* aShowEvent); - - virtual void ActorDestroy(ActorDestroyReason) override -diff --git accessible/ipc/DocAccessibleParent.cpp accessible/ipc/DocAccessibleParent.cpp -index 4bbf261273c5..34c334847c04 100644 ---- accessible/ipc/DocAccessibleParent.cpp -+++ accessible/ipc/DocAccessibleParent.cpp -@@ -79,6 +79,11 @@ DocAccessibleParent::RecvShowEvent(const ShowEventData& aData, - - MOZ_ASSERT(CheckDocTree()); - -+ // Just update, no events. -+ if (aData.EventSuppressed()) { -+ return IPC_OK(); -+ } -+ - ProxyAccessible* target = parent->ChildAt(newChildIdx); - ProxyShowHideEvent(target, parent, true, aFromUser); - -diff --git accessible/ipc/other/PDocAccessible.ipdl accessible/ipc/other/PDocAccessible.ipdl -index 4c084bbee125..ffed961185fa 100644 ---- accessible/ipc/other/PDocAccessible.ipdl -+++ accessible/ipc/other/PDocAccessible.ipdl -@@ -29,6 +29,7 @@ struct ShowEventData - uint64_t ID; - uint32_t Idx; - AccessibleData[] NewTree; -+ bool EventSuppressed; - }; - - struct Attribute -diff --git accessible/ipc/win/DocAccessibleChild.h accessible/ipc/win/DocAccessibleChild.h -index e34987005a40..9b4586a16cda 100644 ---- accessible/ipc/win/DocAccessibleChild.h -+++ accessible/ipc/win/DocAccessibleChild.h -@@ -110,7 +110,8 @@ private: - SerializedShow(DocAccessibleChild* aTarget, - ShowEventData& aEventData, bool aFromUser) - : DeferredEvent(aTarget) -- , mEventData(aEventData.ID(), aEventData.Idx(), nsTArray()) -+ , mEventData(aEventData.ID(), aEventData.Idx(), -+ nsTArray(), aEventData.EventSuppressed()) - , mFromUser(aFromUser) - { - // Since IPDL doesn't generate a move constructor for ShowEventData, -diff --git accessible/ipc/win/PDocAccessible.ipdl accessible/ipc/win/PDocAccessible.ipdl -index afd3b991efdc..da7128e87a65 100644 ---- accessible/ipc/win/PDocAccessible.ipdl -+++ accessible/ipc/win/PDocAccessible.ipdl -@@ -29,6 +29,7 @@ struct ShowEventData - uint64_t ID; - uint32_t Idx; - AccessibleData[] NewTree; -+ bool EventSuppressed; - }; - - struct Attribute -diff --git accessible/tests/mochitest/treeupdate/test_ariaowns.html accessible/tests/mochitest/treeupdate/test_ariaowns.html -index 7d88b9a0698b..bf47bc84c280 100644 ---- accessible/tests/mochitest/treeupdate/test_ariaowns.html -+++ accessible/tests/mochitest/treeupdate/test_ariaowns.html -@@ -580,9 +580,8 @@ - function test9_prepare() - { - this.eventSeq = [ -- new invokerChecker(EVENT_SHOW, () => { -- let doc = getNode('t9_container').contentDocument; -- return doc && doc.getElementById('container'); -+ new invokerChecker(EVENT_DOCUMENT_LOAD_COMPLETE, () => { -+ return getNode('t9_container').contentDocument; - }) - ]; - diff --git a/www/waterfox/files/patch-bug1402966 b/www/waterfox/files/patch-bug1402966 deleted file mode 100644 index 51123f684a0..00000000000 --- a/www/waterfox/files/patch-bug1402966 +++ /dev/null @@ -1,51 +0,0 @@ -commit 6149574dc0f9 -Author: Gabriele Svelto -Date: Tue Sep 26 09:35:03 2017 +0200 - - Bug 1402966 - Search for libcurl in more paths to support various *BSDs. r=Dexter, a=sledru - - MozReview-Commit-ID: J4ykuSVEa0y - - --HG-- - extra : source : 4741b93cfdf29517ff8eae863825fdc2ab5bd7bd ---- - .../telemetry/pingsender/pingsender_unix_common.cpp | 16 ++++++++++------ - 1 file changed, 10 insertions(+), 6 deletions(-) - -diff --git toolkit/components/telemetry/pingsender/pingsender_unix_common.cpp toolkit/components/telemetry/pingsender/pingsender_unix_common.cpp -index ae20f4114193..7817e93e3d1f 100644 ---- toolkit/components/telemetry/pingsender/pingsender_unix_common.cpp -+++ toolkit/components/telemetry/pingsender/pingsender_unix_common.cpp -@@ -88,10 +88,19 @@ CurlWrapper::Init() - "/usr/lib/i386-linux-gnu", // Debian 32-bit x86 - "/usr/lib/x86_64-linux-gnu", // Debian 64-bit x86 - #endif // XP_LINUX -+#if !defined(XP_MACOSX) && !defined(XP_LINUX) // Various BSDs -+ "/usr/local/lib", // FreeBSD, OpenBSD -+ "/usr/pkg/lib", // NetBSD -+#endif // !defined(XP_MACOSX) && !defined(XP_LINUX) - }; - - const char* libcurlNames[] = { --#ifdef XP_LINUX -+#if defined(XP_MACOSX) -+ // macOS -+ "libcurl.dylib", -+ "libcurl.4.dylib", -+ "libcurl.3.dylib", -+#else // Linux, *BSD, ... - "libcurl.so", - "libcurl.so.4", - // Debian gives libcurl a different name when it is built against GnuTLS -@@ -100,11 +109,6 @@ CurlWrapper::Init() - // Older versions in case we find nothing better - "libcurl.so.3", - "libcurl-gnutls.so.3", // See above for Debian --#elif defined(XP_MACOSX) -- // macOS -- "libcurl.dylib", -- "libcurl.4.dylib", -- "libcurl.3.dylib", - #endif - }; - diff --git a/www/waterfox/files/patch-bug1402981 b/www/waterfox/files/patch-bug1402981 deleted file mode 100644 index 9e177ca672e..00000000000 --- a/www/waterfox/files/patch-bug1402981 +++ /dev/null @@ -1,172 +0,0 @@ -commit bcef6c71b916 -Author: Gijs Kruitbosch -Date: Wed Sep 27 22:37:19 2017 +0100 - - Bug 1402981 - Add light and dark themes to the list of themes in customize mode by default. r=jaws, a=sledru - - MozReview-Commit-ID: 4GxPEm119Yc - - --HG-- - extra : source : ed2a1dff7a2e544a76de0eb65139f0febd0211e4 ---- - .../components/customizableui/CustomizeMode.jsm | 45 +++++++++++++++------- - .../browser_1007336_lwthemes_in_customize_mode.js | 44 +++++++++++++++------ - 2 files changed, 64 insertions(+), 25 deletions(-) - -diff --git browser/components/customizableui/CustomizeMode.jsm browser/components/customizableui/CustomizeMode.jsm -index fbc8ff27093c..aa80840a3c42 100644 ---- browser/components/customizableui/CustomizeMode.jsm -+++ browser/components/customizableui/CustomizeMode.jsm -@@ -1311,7 +1311,9 @@ CustomizeMode.prototype = { - - onLWThemesMenuShowing(aEvent) { - const DEFAULT_THEME_ID = "{972ce4c6-7e08-4474-a285-3208198ce6fd}"; -- const RECENT_LWT_COUNT = 5; -+ const LIGHT_THEME_ID = "firefox-compact-light@mozilla.org"; -+ const DARK_THEME_ID = "firefox-compact-dark@mozilla.org"; -+ const MAX_THEME_COUNT = 6; - - this._clearLWThemesMenu(aEvent.target); - -@@ -1366,19 +1368,27 @@ CustomizeMode.prototype = { - let themes = [aDefaultTheme]; - let lwts = LightweightThemeManager.usedThemes; - let currentLwt = LightweightThemeManager.currentTheme; -- let currentLwtIndex = lwts.indexOf(currentLwt); -- if (currentLwtIndex > -1) { -- // Make sure that the current lightweight theme -- // is at the beginning of the array to avoid truncation -- // in the next step. -- lwts = lwts.splice(currentLwtIndex, 1).concat(lwts); -- } -- if (lwts.length > RECENT_LWT_COUNT) -- lwts.length = RECENT_LWT_COUNT; -+ // The lwts besides the builtin themes don't have an isActive property: - for (let lwt of lwts) { -- lwt.isActive = !!currentLwt && (lwt.id == currentLwt.id); -- themes.push(lwt); -+ if (!lwt.hasOwnProperty("isActive")) { -+ lwt.isActive = !!currentLwt && (lwt.id == currentLwt.id); -+ } -+ } -+ -+ // Move the current theme (if any) and the light/dark themes to the start: -+ let importantThemes = [LIGHT_THEME_ID, DARK_THEME_ID]; -+ if (currentLwt && !importantThemes.includes(currentLwt.id)) { -+ importantThemes.push(currentLwt.id); -+ } -+ for (let importantTheme of importantThemes) { -+ let themeIndex = lwts.findIndex(theme => theme.id == importantTheme); -+ if (themeIndex > -1) { -+ themes.push(...lwts.splice(themeIndex, 1)); -+ } - } -+ themes = themes.concat(lwts); -+ if (themes.length > MAX_THEME_COUNT) -+ themes.length = MAX_THEME_COUNT; - - let footer = doc.getElementById("customization-lwtheme-menu-footer"); - let panel = footer.parentNode; -@@ -1400,8 +1410,15 @@ CustomizeMode.prototype = { - recommendedThemes = JSON.parse(recommendedThemes); - let sb = Services.strings.createBundle("chrome://browser/locale/lightweightThemes.properties"); - for (let theme of recommendedThemes) { -- theme.name = sb.GetStringFromName("lightweightThemes." + theme.id + ".name"); -- theme.description = sb.GetStringFromName("lightweightThemes." + theme.id + ".description"); -+ try { -+ theme.name = sb.GetStringFromName("lightweightThemes." + theme.id + ".name"); -+ theme.description = sb.GetStringFromName("lightweightThemes." + theme.id + ".description"); -+ } catch (ex) { -+ // If finding strings for this failed, just don't build it. This can -+ // happen for users with 'older' recommended themes lists, some of which -+ // have since been removed from Firefox. -+ continue; -+ } - let button = buildToolbarButton(theme); - button.addEventListener("command", () => { - LightweightThemeManager.setLocalTheme(button.theme); -diff --git browser/components/customizableui/test/browser_1007336_lwthemes_in_customize_mode.js browser/components/customizableui/test/browser_1007336_lwthemes_in_customize_mode.js -index 3cb3ee34c7cf..3ee8f9b8f697 100644 ---- browser/components/customizableui/test/browser_1007336_lwthemes_in_customize_mode.js -+++ browser/components/customizableui/test/browser_1007336_lwthemes_in_customize_mode.js -@@ -5,12 +5,13 @@ - "use strict"; - - const DEFAULT_THEME_ID = "{972ce4c6-7e08-4474-a285-3208198ce6fd}"; -+const LIGHT_THEME_ID = "firefox-compact-light@mozilla.org"; -+const DARK_THEME_ID = "firefox-compact-dark@mozilla.org"; - const {LightweightThemeManager} = Components.utils.import("resource://gre/modules/LightweightThemeManager.jsm", {}); - - add_task(async function() { - Services.prefs.clearUserPref("lightweightThemes.usedThemes"); - Services.prefs.clearUserPref("lightweightThemes.recommendedThemes"); -- LightweightThemeManager.clearBuiltInThemes(); - - await startCustomizing(); - -@@ -35,9 +36,14 @@ add_task(async function() { - let header = document.getElementById("customization-lwtheme-menu-header"); - let recommendedHeader = document.getElementById("customization-lwtheme-menu-recommended"); - -- is(header.nextSibling.nextSibling, recommendedHeader, -- "There should only be one theme (default) in the 'My Themes' section by default"); -- is(header.nextSibling.theme.id, DEFAULT_THEME_ID, "That theme should be the default theme"); -+ is(header.nextSibling.nextSibling.nextSibling.nextSibling, recommendedHeader, -+ "There should only be three themes (default, light, dark) in the 'My Themes' section by default"); -+ is(header.nextSibling.theme.id, DEFAULT_THEME_ID, -+ "The first theme should be the default theme"); -+ is(header.nextSibling.nextSibling.theme.id, LIGHT_THEME_ID, -+ "The second theme should be the light theme"); -+ is(header.nextSibling.nextSibling.nextSibling.theme.id, DARK_THEME_ID, -+ "The third theme should be the dark theme"); - - let firstLWTheme = recommendedHeader.nextSibling; - let firstLWThemeId = firstLWTheme.theme.id; -@@ -52,12 +58,18 @@ add_task(async function() { - await popupShownPromise; - - is(header.nextSibling.theme.id, DEFAULT_THEME_ID, "The first theme should be the Default theme"); -- let installedThemeId = header.nextSibling.nextSibling.theme.id; -+ let installedThemeId = header.nextSibling.nextSibling.nextSibling.nextSibling.theme.id; - ok(installedThemeId.startsWith(firstLWThemeId), - "The second theme in the 'My Themes' section should be the newly installed theme: " + - "Installed theme id: " + installedThemeId + "; First theme ID: " + firstLWThemeId); -- is(header.nextSibling.nextSibling.nextSibling, recommendedHeader, -- "There should be two themes in the 'My Themes' section"); -+ let themeCount = 0; -+ let iterNode = header; -+ while (iterNode.nextSibling && iterNode.nextSibling.theme) { -+ themeCount++; -+ iterNode = iterNode.nextSibling; -+ } -+ is(themeCount, 4, -+ "There should be four themes in the 'My Themes' section"); - - let defaultTheme = header.nextSibling; - defaultTheme.doCommand(); -@@ -90,11 +102,21 @@ add_task(async function() { - await popupShownPromise; - header = document.getElementById("customization-lwtheme-menu-header"); - is(header.hidden, false, "Header should never be hidden"); -- is(header.nextSibling.theme.id, DEFAULT_THEME_ID, "The first theme should be the Default theme"); -- is(header.nextSibling.hidden, false, "The default theme should never be hidden"); -+ let themeNode = header.nextSibling; -+ is(themeNode.theme.id, DEFAULT_THEME_ID, "The first theme should be the Default theme"); -+ is(themeNode.hidden, false, "The default theme should never be hidden"); -+ -+ themeNode = themeNode.nextSibling; -+ is(themeNode.theme.id, LIGHT_THEME_ID, "The second theme should be the Light theme"); -+ is(themeNode.hidden, false, "The light theme should never be hidden"); -+ -+ themeNode = themeNode.nextSibling; -+ is(themeNode.theme.id, DARK_THEME_ID, "The third theme should be the Dark theme"); -+ is(themeNode.hidden, false, "The dark theme should never be hidden"); -+ - recommendedHeader = document.getElementById("customization-lwtheme-menu-recommended"); -- is(header.nextSibling.nextSibling, recommendedHeader, -- "There should only be one theme (default) in the 'My Themes' section by default"); -+ is(themeNode.nextSibling, recommendedHeader, -+ "There should only be three themes (default, light, dark) in the 'My Themes' section now"); - let footer = document.getElementById("customization-lwtheme-menu-footer"); - is(recommendedHeader.nextSibling.id, footer.id, "There should be no recommended themes in the menu"); - is(recommendedHeader.hidden, true, "The recommendedHeader should be hidden since there are no recommended themes"); diff --git a/www/waterfox/files/patch-bug1403282 b/www/waterfox/files/patch-bug1403282 deleted file mode 100644 index baab3804b1b..00000000000 --- a/www/waterfox/files/patch-bug1403282 +++ /dev/null @@ -1,180 +0,0 @@ -commit fc20d87173c4 -Author: Manish Goregaokar -Date: Tue Sep 26 23:56:15 2017 -0500 - - Bug 1403282 - stylo: Don't error out on trailing whitespace in attr(). r=bz, a=sledru - - Source-Repo: https://github.com/servo/servo - Source-Revision: 97227aaca3613e22afc832554d29f7f7fdfb7220 - - --HG-- - extra : source : 4263e1c081c940b4eae7bcd388274ec8c5b5dd8b ---- - servo/components/style/values/specified/mod.rs | 44 ++++++++++++++------------ - 1 file changed, 24 insertions(+), 20 deletions(-) - -diff --git servo/components/style/values/specified/mod.rs servo/components/style/values/specified/mod.rs -index 856aecca90ac..72ed1b1de83a 100644 ---- servo/components/style/values/specified/mod.rs -+++ servo/components/style/values/specified/mod.rs -@@ -739,28 +739,32 @@ impl Attr { - let first = input.try(|i| i.expect_ident_cloned()).ok(); - if let Ok(token) = input.try(|i| i.next_including_whitespace().map(|t| t.clone())) { - match token { -- Token::Delim('|') => {} -+ Token::Delim('|') => { -+ // must be followed by an ident -+ let second_token = match *input.next_including_whitespace()? { -+ Token::Ident(ref second) => second, -+ ref t => return Err(BasicParseError::UnexpectedToken(t.clone()).into()), -+ }; -+ -+ let ns_with_id = if let Some(ns) = first { -+ let ns = Namespace::from(ns.as_ref()); -+ let id: Result<_, ParseError> = -+ get_id_for_namespace(&ns, context) -+ .map_err(|()| StyleParseError::UnspecifiedError.into()); -+ Some((ns, id?)) -+ } else { -+ None -+ }; -+ return Ok(Attr { -+ namespace: ns_with_id, -+ attribute: second_token.as_ref().to_owned(), -+ }) -+ } -+ // In the case of attr(foobar ) we don't want to error out -+ // because of the trailing whitespace -+ Token::WhiteSpace(_) => (), - ref t => return Err(BasicParseError::UnexpectedToken(t.clone()).into()), - } -- // must be followed by an ident -- let second_token = match *input.next_including_whitespace()? { -- Token::Ident(ref second) => second, -- ref t => return Err(BasicParseError::UnexpectedToken(t.clone()).into()), -- }; -- -- let ns_with_id = if let Some(ns) = first { -- let ns = Namespace::from(ns.as_ref()); -- let id: Result<_, ParseError> = -- get_id_for_namespace(&ns, context) -- .map_err(|()| StyleParseError::UnspecifiedError.into()); -- Some((ns, id?)) -- } else { -- None -- }; -- return Ok(Attr { -- namespace: ns_with_id, -- attribute: second_token.as_ref().to_owned(), -- }) - } - - if let Some(first) = first { - -commit 20bbda2d12de -Author: Manish Goregaokar -Date: Tue Sep 26 13:54:22 2017 -0700 - - Bug 1403282 - stylo: Add reftests for whitespace in attr(). r=bz, a=sledru - - MozReview-Commit-ID: IMXFY7bpKGf - - --HG-- - extra : source : cfcb518088438415e5c6f7776dc268abd0b86119 ---- - .../generated-content/attr-whitespace-ref.html | 10 ++++ - .../generated-content/attr-whitespace.xhtml | 60 ++++++++++++++++++++++ - layout/reftests/generated-content/reftest.list | 1 + - 3 files changed, 71 insertions(+) - -diff --git layout/reftests/generated-content/attr-whitespace-ref.html layout/reftests/generated-content/attr-whitespace-ref.html -new file mode 100644 -index 000000000000..54a74fe4d81f ---- /dev/null -+++ layout/reftests/generated-content/attr-whitespace-ref.html -@@ -0,0 +1,10 @@ -+ -+ -+ -+
HelloWorld
-+
HelloWorld
-+
HelloWorld
-+
Hello
-+
Hello
-+ -+ -diff --git layout/reftests/generated-content/attr-whitespace.xhtml layout/reftests/generated-content/attr-whitespace.xhtml -new file mode 100644 -index 000000000000..e9b6554849b0 ---- /dev/null -+++ layout/reftests/generated-content/attr-whitespace.xhtml -@@ -0,0 +1,60 @@ -+ -+ -+ -+ -+ Whitespace in attributes -+ -+ -+ -+ -+ -+ -+
Hello
-+
Hello
-+
Hello
-+
Hello
-+
Hello
-+ -+ -diff --git layout/reftests/generated-content/reftest.list layout/reftests/generated-content/reftest.list -index e07a0dd565a5..c789f1845421 100644 ---- layout/reftests/generated-content/reftest.list -+++ layout/reftests/generated-content/reftest.list -@@ -19,3 +19,4 @@ fuzzy-if(OSX==1010,1,10) == table-parts-01.html table-parts-01-ref.html - == before-style-sharing.html before-style-sharing-ref.html - == transitive-style-invalidation.html transitive-style-invalidation-ref.html - == dynamic-content.html dynamic-content-ref.html -+== attr-whitespace.xhtml attr-whitespace-ref.html diff --git a/www/waterfox/files/patch-bug1403349 b/www/waterfox/files/patch-bug1403349 deleted file mode 100644 index bdeb5aa5658..00000000000 --- a/www/waterfox/files/patch-bug1403349 +++ /dev/null @@ -1,1216 +0,0 @@ -commit bec0ae08b1a9 -Author: Luca Greco -Date: Wed Sep 27 14:24:54 2017 +0200 - - Bug 1403349 - Fix wrong sourceTabId on webNavigation.onCreatedTarget event. r=aswan, a=ritu - - This changes fixes the regression introduced by Bug 1355120 and adds a new - test case which contains a browserAction popup which open and immediately - close a new window and ensure that the received onCreatedNavigationTarget - is the expected one. - - MozReview-Commit-ID: JIcVCpBTpxj - - --HG-- - extra : source : 435db72f9b6ab5ec9144bbf92611c5c877342410 - extra : histedit_source : 99ba482dfa4bacfbd3b96d4044fdab536c1955e5 ---- - ...gation_onCreatedNavigationTarget_window_open.js | 76 ++++++++++++++++++++-- - toolkit/modules/addons/WebNavigation.jsm | 23 ++++--- - toolkit/modules/addons/WebNavigationContent.js | 16 ++++- - 3 files changed, 99 insertions(+), 16 deletions(-) - -diff --git browser/components/extensions/test/browser/browser_ext_webNavigation_onCreatedNavigationTarget_window_open.js browser/components/extensions/test/browser/browser_ext_webNavigation_onCreatedNavigationTarget_window_open.js -index 1dd79b4256f7..993d7c50ff43 100644 ---- browser/components/extensions/test/browser/browser_ext_webNavigation_onCreatedNavigationTarget_window_open.js -+++ browser/components/extensions/test/browser/browser_ext_webNavigation_onCreatedNavigationTarget_window_open.js -@@ -58,7 +58,7 @@ async function runTestCase({extension, openNavTarget, expectedWebNavProps}) { - is(completedNavMsg.url, url, "Got the expected webNavigation.onCompleted url property"); - } - --add_task(async function test_on_created_navigation_target_from_window_open() { -+add_task(async function test_window_open() { - const tab1 = await BrowserTestUtils.openNewForegroundTab(gBrowser, SOURCE_PAGE); - - gBrowser.selectedTab = tab1; -@@ -74,7 +74,7 @@ add_task(async function test_on_created_navigation_target_from_window_open() { - - const expectedSourceTab = await extension.awaitMessage("expectedSourceTab"); - -- info("open an url in a new tab from a window.open call"); -+ info("open a url in a new tab from a window.open call"); - - await runTestCase({ - extension, -@@ -91,7 +91,7 @@ add_task(async function test_on_created_navigation_target_from_window_open() { - }, - }); - -- info("open an url in a new window from a window.open call"); -+ info("open a url in a new window from a window.open call"); - - await runTestCase({ - extension, -@@ -113,7 +113,7 @@ add_task(async function test_on_created_navigation_target_from_window_open() { - await extension.unload(); - }); - --add_task(async function test_on_created_navigation_target_from_window_open_subframe() { -+add_task(async function test_window_open_from_subframe() { - const tab1 = await BrowserTestUtils.openNewForegroundTab(gBrowser, SOURCE_PAGE); - - gBrowser.selectedTab = tab1; -@@ -129,7 +129,7 @@ add_task(async function test_on_created_navigation_target_from_window_open_subfr - - const expectedSourceTab = await extension.awaitMessage("expectedSourceTab"); - -- info("open an url in a new tab from subframe window.open call"); -+ info("open a url in a new tab from subframe window.open call"); - - await runTestCase({ - extension, -@@ -146,7 +146,7 @@ add_task(async function test_on_created_navigation_target_from_window_open_subfr - }, - }); - -- info("open an url in a new window from subframe window.open call"); -+ info("open a url in a new window from subframe window.open call"); - - await runTestCase({ - extension, -@@ -167,3 +167,67 @@ add_task(async function test_on_created_navigation_target_from_window_open_subfr - - await extension.unload(); - }); -+ -+add_task(async function test_window_open_close_from_browserAction_popup() { -+ const tab1 = await BrowserTestUtils.openNewForegroundTab(gBrowser, SOURCE_PAGE); -+ -+ gBrowser.selectedTab = tab1; -+ -+ function popup() { -+ window.open("", "_self").close(); -+ -+ browser.test.sendMessage("browserAction_popup_executed"); -+ } -+ -+ const extension = ExtensionTestUtils.loadExtension({ -+ background, -+ manifest: { -+ browser_action: { -+ default_popup: "popup.html", -+ }, -+ permissions: ["webNavigation", "tabs", ""], -+ }, -+ files: { -+ "popup.html": ` -+ -+ -+ -+ -+ -+ -+ -+ -+ `, -+ "popup.js": popup, -+ }, -+ }); -+ -+ await extension.startup(); -+ -+ const expectedSourceTab = await extension.awaitMessage("expectedSourceTab"); -+ -+ clickBrowserAction(extension); -+ -+ await extension.awaitMessage("browserAction_popup_executed"); -+ -+ info("open a url in a new tab from a window.open call"); -+ -+ await runTestCase({ -+ extension, -+ openNavTarget() { -+ extension.sendMessage({ -+ type: "execute-contentscript", -+ code: `window.open("${OPENED_PAGE}#new-tab-from-window-open"); true;`, -+ }); -+ }, -+ expectedWebNavProps: { -+ sourceTabId: expectedSourceTab.sourceTabId, -+ sourceFrameId: 0, -+ url: `${OPENED_PAGE}#new-tab-from-window-open`, -+ }, -+ }); -+ -+ await BrowserTestUtils.removeTab(tab1); -+ -+ await extension.unload(); -+}); -diff --git toolkit/modules/addons/WebNavigation.jsm toolkit/modules/addons/WebNavigation.jsm -index 1aadbd579e05..a0c774665d17 100644 ---- toolkit/modules/addons/WebNavigation.jsm -+++ toolkit/modules/addons/WebNavigation.jsm -@@ -306,19 +306,26 @@ var Manager = { - }, - - onCreatedNavigationTarget(browser, data) { -- const {isSourceTab, createdWindowId, sourceFrameId, url} = data; -- -- // We are going to potentially received two message manager messages for a single -- // onCreatedNavigationTarget event that is happening in the child process, -- // we are going to use the generate uuid to pair them together. -- const pairedMessage = this.createdNavigationTargetByOuterWindowId.get(createdWindowId); -+ const { -+ createdOuterWindowId, -+ isSourceTab, -+ sourceFrameId, -+ url, -+ } = data; -+ -+ // We are going to receive two message manager messages for a single -+ // onCreatedNavigationTarget event related to a window.open that is happening -+ // in the child process (one from the source tab and one from the created tab), -+ // the unique createdWindowId (the outerWindowID of the created docShell) -+ // to pair them together. -+ const pairedMessage = this.createdNavigationTargetByOuterWindowId.get(createdOuterWindowId); - - if (!pairedMessage) { -- this.createdNavigationTargetByOuterWindowId.set(createdWindowId, {browser, data}); -+ this.createdNavigationTargetByOuterWindowId.set(createdOuterWindowId, {browser, data}); - return; - } - -- this.createdNavigationTargetByOuterWindowId.delete(createdWindowId); -+ this.createdNavigationTargetByOuterWindowId.delete(createdOuterWindowId); - - let sourceTabBrowser; - let createdTabBrowser; -diff --git toolkit/modules/addons/WebNavigationContent.js toolkit/modules/addons/WebNavigationContent.js -index 31a8b7328fc9..ed873cc98644 100644 ---- toolkit/modules/addons/WebNavigationContent.js -+++ toolkit/modules/addons/WebNavigationContent.js -@@ -10,6 +10,17 @@ Components.utils.import("resource://gre/modules/Services.jsm"); - XPCOMUtils.defineLazyModuleGetter(this, "WebNavigationFrames", - "resource://gre/modules/WebNavigationFrames.jsm"); - -+function getDocShellOuterWindowId(docShell) { -+ if (!docShell) { -+ return undefined; -+ } -+ -+ return docShell.QueryInterface(Ci.nsIInterfaceRequestor) -+ .getInterface(Ci.nsIDOMWindow) -+ .getInterface(Ci.nsIDOMWindowUtils) -+ .outerWindowID; -+} -+ - function loadListener(event) { - let document = event.target; - let window = document.defaultView; -@@ -56,8 +67,9 @@ var CreatedNavigationTargetListener = { - } - - const isSourceTab = docShell === sourceDocShell || isSourceTabDescendant; -+ - const sourceFrameId = WebNavigationFrames.getDocShellFrameId(sourceDocShell); -- const createdWindowId = WebNavigationFrames.getDocShellFrameId(createdDocShell); -+ const createdOuterWindowId = getDocShellOuterWindowId(sourceDocShell); - - let url; - if (props.hasKey("url")) { -@@ -67,7 +79,7 @@ var CreatedNavigationTargetListener = { - sendAsyncMessage("Extension:CreatedNavigationTarget", { - url, - sourceFrameId, -- createdWindowId, -+ createdOuterWindowId, - isSourceTab, - }); - }, - -commit 27a18112bd4c -Author: Luca Greco -Date: Wed Sep 27 19:07:41 2017 +0200 - - Bug 1403349 - Prevent WebNavigation jsm to leak the sourceTab browser on unpaired CreatedNavigationTarget messages. r=aswan, a=ritu - - This applies the following changes: - - - store a weak reference to the browser element in the WebNavigation.jsm Manager's map - of pending CreatedNavigationTarget messages - - - when a CreatedNavigationTarget message is received from a sourceTab - for a created window that is not currently tracked in the map - (e.g. it has been immediately closed), the message received from the sourceTab - is not saved in the map of the pending CreatedNavigationTarget (and a message - is logged in the console to make easier to investigate issues related to discarded - CreatedNavigationTarget events). - - - adds an additional assertion to the related test case to ensure that no CreatedNavigationTarget - message is still pending in the WebNavigation/jsm's Manager. - - MozReview-Commit-ID: FijQ8IqiY8L - - --HG-- - extra : source : 6692df0c568732b5f38bc594e7e020b3ea2e0f41 - extra : histedit_source : cd9bd61c19bf32bdd24f0faed101a0da9faf5ed4 ---- - ...gation_onCreatedNavigationTarget_window_open.js | 16 +++++++ - toolkit/modules/addons/WebNavigation.jsm | 50 ++++++++++++++++++---- - 2 files changed, 57 insertions(+), 9 deletions(-) - -diff --git browser/components/extensions/test/browser/browser_ext_webNavigation_onCreatedNavigationTarget_window_open.js browser/components/extensions/test/browser/browser_ext_webNavigation_onCreatedNavigationTarget_window_open.js -index 993d7c50ff43..1fbb3c07d4a9 100644 ---- browser/components/extensions/test/browser/browser_ext_webNavigation_onCreatedNavigationTarget_window_open.js -+++ browser/components/extensions/test/browser/browser_ext_webNavigation_onCreatedNavigationTarget_window_open.js -@@ -58,6 +58,16 @@ async function runTestCase({extension, openNavTarget, expectedWebNavProps}) { - is(completedNavMsg.url, url, "Got the expected webNavigation.onCompleted url property"); - } - -+// Test that there are no pending createdNavigationTarget messages still tracked -+// in WebNavigation.jsm (to be called before the extension is unloaded, because -+// once the last extension which have subscribed a webNavigation event is unloaded -+// all the pending created navigation target data is completely cleared). -+function assertNoPendingCreatedNavigationTargetData() { -+ const {Manager} = Cu.import("resource://gre/modules/WebNavigation.jsm", {}); -+ Assert.equal(Manager.createdNavigationTargetByOuterWindowId.size, 0, -+ "There should be no pending createdNavigationTarget messages in WebNavigation"); -+} -+ - add_task(async function test_window_open() { - const tab1 = await BrowserTestUtils.openNewForegroundTab(gBrowser, SOURCE_PAGE); - -@@ -108,6 +118,8 @@ add_task(async function test_window_open() { - }, - }); - -+ assertNoPendingCreatedNavigationTargetData(); -+ - await BrowserTestUtils.removeTab(tab1); - - await extension.unload(); -@@ -163,6 +175,8 @@ add_task(async function test_window_open_from_subframe() { - }, - }); - -+ assertNoPendingCreatedNavigationTargetData(); -+ - await BrowserTestUtils.removeTab(tab1); - - await extension.unload(); -@@ -227,6 +241,8 @@ add_task(async function test_window_open_close_from_browserAction_popup() { - }, - }); - -+ assertNoPendingCreatedNavigationTargetData(); -+ - await BrowserTestUtils.removeTab(tab1); - - await extension.unload(); -diff --git toolkit/modules/addons/WebNavigation.jsm toolkit/modules/addons/WebNavigation.jsm -index a0c774665d17..db6efdb443de 100644 ---- toolkit/modules/addons/WebNavigation.jsm -+++ toolkit/modules/addons/WebNavigation.jsm -@@ -320,22 +320,54 @@ var Manager = { - // to pair them together. - const pairedMessage = this.createdNavigationTargetByOuterWindowId.get(createdOuterWindowId); - -+ if (!isSourceTab) { -+ if (pairedMessage) { -+ // This should not happen, print a warning before overwriting the unexpected pending data. -+ Services.console.logStringMessage( -+ `Discarding onCreatedNavigationTarget for ${createdOuterWindowId}: ` + -+ "unexpected pending data while receiving the created tab data" -+ ); -+ } -+ -+ // Store a weak reference to the browser XUL element, so that we don't prevent -+ // it to be garbage collected if it has been destroyed. -+ const browserWeakRef = Cu.getWeakReference(browser); -+ -+ this.createdNavigationTargetByOuterWindowId.set(createdOuterWindowId, { -+ browserWeakRef, -+ data, -+ }); -+ -+ return; -+ } -+ - if (!pairedMessage) { -- this.createdNavigationTargetByOuterWindowId.set(createdOuterWindowId, {browser, data}); -+ // The sourceTab should always be received after the message coming from the created -+ // top level frame because the "webNavigation-createdNavigationTarget-from-js" observers -+ // subscribed by WebNavigationContent.js are going to be executed in reverse order -+ // (See http://searchfox.org/mozilla-central/rev/f54c1723be/xpcom/ds/nsObserverList.cpp#76) -+ // and the observer subscribed to the created target will be the last one subscribed -+ // to the ObserverService (and the first one to be triggered). -+ Services.console.logStringMessage( -+ `Discarding onCreatedNavigationTarget for ${createdOuterWindowId}: ` + -+ "received source tab data without any created tab data available" -+ ); -+ - return; - } - - this.createdNavigationTargetByOuterWindowId.delete(createdOuterWindowId); - -- let sourceTabBrowser; -- let createdTabBrowser; -+ let sourceTabBrowser = browser; -+ let createdTabBrowser = pairedMessage.browserWeakRef.get(); - -- if (isSourceTab) { -- sourceTabBrowser = browser; -- createdTabBrowser = pairedMessage.browser; -- } else { -- sourceTabBrowser = pairedMessage.browser; -- createdTabBrowser = browser; -+ if (!createdTabBrowser) { -+ Services.console.logStringMessage( -+ `Discarding onCreatedNavigationTarget for ${createdOuterWindowId}: ` + -+ "the created tab has been already destroyed" -+ ); -+ -+ return; - } - - this.fire("onCreatedNavigationTarget", createdTabBrowser, {}, { - -commit 9f0305064bbe -Author: Luca Greco -Date: Thu Sep 28 22:04:14 2017 +0200 - - Bug 1403349 - Add a new webNavigation test for window.open called with a named window target. r=aswan, a=ritu - - MozReview-Commit-ID: Aj8uMtcGwJx - - --HG-- - extra : source : acc39e04d4f0559b796916d5f54a36673708766a - extra : histedit_source : 2366c25a25acf76333f6b9386886ca5c866dad54 ---- - ...gation_onCreatedNavigationTarget_window_open.js | 57 ++++++++++++++++++++++ - 1 file changed, 57 insertions(+) - -diff --git browser/components/extensions/test/browser/browser_ext_webNavigation_onCreatedNavigationTarget_window_open.js browser/components/extensions/test/browser/browser_ext_webNavigation_onCreatedNavigationTarget_window_open.js -index 1fbb3c07d4a9..232b9321fcd3 100644 ---- browser/components/extensions/test/browser/browser_ext_webNavigation_onCreatedNavigationTarget_window_open.js -+++ browser/components/extensions/test/browser/browser_ext_webNavigation_onCreatedNavigationTarget_window_open.js -@@ -247,3 +247,60 @@ add_task(async function test_window_open_close_from_browserAction_popup() { - - await extension.unload(); - }); -+ -+add_task(async function test_window_open_in_named_win() { -+ const tab1 = await BrowserTestUtils.openNewForegroundTab(gBrowser, SOURCE_PAGE); -+ -+ gBrowser.selectedTab = tab1; -+ -+ const extension = ExtensionTestUtils.loadExtension({ -+ background, -+ manifest: { -+ permissions: ["webNavigation", "tabs", ""], -+ }, -+ }); -+ -+ await extension.startup(); -+ -+ const expectedSourceTab = await extension.awaitMessage("expectedSourceTab"); -+ -+ info("open a url in a new named window from a window.open call"); -+ -+ await runTestCase({ -+ extension, -+ openNavTarget() { -+ extension.sendMessage({ -+ type: "execute-contentscript", -+ code: `window.open("${OPENED_PAGE}#new-named-window-open", "TestWinName"); true;`, -+ }); -+ }, -+ expectedWebNavProps: { -+ sourceTabId: expectedSourceTab.sourceTabId, -+ sourceFrameId: 0, -+ url: `${OPENED_PAGE}#new-named-window-open`, -+ }, -+ }); -+ -+ info("open a url in an existent named window from a window.open call"); -+ -+ await runTestCase({ -+ extension, -+ openNavTarget() { -+ extension.sendMessage({ -+ type: "execute-contentscript", -+ code: `window.open("${OPENED_PAGE}#existent-named-window-open", "TestWinName"); true;`, -+ }); -+ }, -+ expectedWebNavProps: { -+ sourceTabId: expectedSourceTab.sourceTabId, -+ sourceFrameId: 0, -+ url: `${OPENED_PAGE}#existent-named-window-open`, -+ }, -+ }); -+ -+ assertNoPendingCreatedNavigationTargetData(); -+ -+ await BrowserTestUtils.removeTab(tab1); -+ -+ await extension.unload(); -+}); - -commit 2a05645d21a8 -Author: Luca Greco -Date: Fri Oct 13 18:19:47 2017 +0200 - - Bug 1403349 - Split webNavigation onCreatedNavigationTarget tests to prevent timeouts on linux32 debug. r=aswan, a=ritu - - MozReview-Commit-ID: 50JLocTVvfu - - --HG-- - rename : browser/components/extensions/test/browser/browser_ext_webNavigation_onCreatedNavigationTarget_window_open.js => browser/components/extensions/test/browser/browser_ext_webNavigation_onCreatedNavigationTarget_named_window.js - rename : browser/components/extensions/test/browser/browser_ext_webNavigation_onCreatedNavigationTarget_window_open.js => browser/components/extensions/test/browser/browser_ext_webNavigation_onCreatedNavigationTarget_subframe_window_open.js - extra : source : e802283bbf21d14d431901dd286681cd1933bb97 - extra : histedit_source : dfedfb9746b98e9ee96e768a53aa0f6cbdc8b6ee ---- - .../extensions/test/browser/browser-common.ini | 3 + - ..._ext_webNavigation_onCreatedNavigationTarget.js | 36 +---- - ...gation_onCreatedNavigationTarget_contextmenu.js | 47 ++---- - ...ation_onCreatedNavigationTarget_named_window.js | 97 ++++++++++++ - ...CreatedNavigationTarget_subframe_window_open.js | 163 +++++++++++++++++++++ - ...gation_onCreatedNavigationTarget_window_open.js | 153 +------------------ - .../extensions/test/browser/head_webNavigation.js | 39 +++++ - 7 files changed, 329 insertions(+), 209 deletions(-) - -diff --git browser/components/extensions/test/browser/browser-common.ini browser/components/extensions/test/browser/browser-common.ini -index a03cb9147a7f..3a672f737a59 100644 ---- browser/components/extensions/test/browser/browser-common.ini -+++ browser/components/extensions/test/browser/browser-common.ini -@@ -3,6 +3,7 @@ support-files = - head.js - head_pageAction.js - head_sessions.js -+ head_webNavigation.js - profilerSymbols.sjs - context.html - context_frame.html -@@ -171,6 +172,8 @@ skip-if = true # Bug 1398514 - [browser_ext_webNavigation_getFrames.js] - [browser_ext_webNavigation_onCreatedNavigationTarget.js] - [browser_ext_webNavigation_onCreatedNavigationTarget_contextmenu.js] -+[browser_ext_webNavigation_onCreatedNavigationTarget_named_window.js] -+[browser_ext_webNavigation_onCreatedNavigationTarget_subframe_window_open.js] - [browser_ext_webNavigation_onCreatedNavigationTarget_window_open.js] - [browser_ext_webNavigation_urlbar_transitions.js] - [browser_ext_windows.js] -diff --git browser/components/extensions/test/browser/browser_ext_webNavigation_onCreatedNavigationTarget.js browser/components/extensions/test/browser/browser_ext_webNavigation_onCreatedNavigationTarget.js -index 2c17f9e711f8..47d8b0a8c65a 100644 ---- browser/components/extensions/test/browser/browser_ext_webNavigation_onCreatedNavigationTarget.js -+++ browser/components/extensions/test/browser/browser_ext_webNavigation_onCreatedNavigationTarget.js -@@ -2,9 +2,8 @@ - /* vim: set sts=2 sw=2 et tw=80: */ - "use strict"; - --const BASE_URL = "http://mochi.test:8888/browser/browser/components/extensions/test/browser"; --const SOURCE_PAGE = `${BASE_URL}/webNav_createdTargetSource.html`; --const OPENED_PAGE = `${BASE_URL}/webNav_createdTarget.html`; -+Services.scriptloader.loadSubScript(new URL("head_webNavigation.js", gTestPath).href, -+ this); - - async function background() { - const tabs = await browser.tabs.query({active: true, currentWindow: true}); -@@ -34,24 +33,6 @@ async function background() { - }); - } - --async function runTestCase({extension, openNavTarget, expectedWebNavProps}) { -- await openNavTarget(); -- -- const webNavMsg = await extension.awaitMessage("webNavOnCreated"); -- const createdTabId = await extension.awaitMessage("tabsOnCreated"); -- const completedNavMsg = await extension.awaitMessage("webNavOnCompleted"); -- -- let {sourceTabId, sourceFrameId, url} = expectedWebNavProps; -- -- is(webNavMsg.tabId, createdTabId, "Got the expected tabId property"); -- is(webNavMsg.sourceTabId, sourceTabId, "Got the expected sourceTabId property"); -- is(webNavMsg.sourceFrameId, sourceFrameId, "Got the expected sourceFrameId property"); -- is(webNavMsg.url, url, "Got the expected url property"); -- -- is(completedNavMsg.tabId, createdTabId, "Got the expected webNavigation.onCompleted tabId property"); -- is(completedNavMsg.url, url, "Got the expected webNavigation.onCompleted url property"); --} -- - add_task(async function test_on_created_navigation_target_from_mouse_click() { - const tab = await BrowserTestUtils.openNewForegroundTab(gBrowser, SOURCE_PAGE); - -@@ -68,7 +49,7 @@ add_task(async function test_on_created_navigation_target_from_mouse_click() { - - info("Open link in a new tab using Ctrl-click"); - -- await runTestCase({ -+ await runCreatedNavigationTargetTest({ - extension, - openNavTarget() { - BrowserTestUtils.synthesizeMouseAtCenter("#test-create-new-tab-from-mouse-click", -@@ -84,7 +65,7 @@ add_task(async function test_on_created_navigation_target_from_mouse_click() { - - info("Open link in a new window using Shift-click"); - -- await runTestCase({ -+ await runCreatedNavigationTargetTest({ - extension, - openNavTarget() { - BrowserTestUtils.synthesizeMouseAtCenter("#test-create-new-window-from-mouse-click", -@@ -100,7 +81,7 @@ add_task(async function test_on_created_navigation_target_from_mouse_click() { - - info("Open link with target=\"_blank\" in a new tab using click"); - -- await runTestCase({ -+ await runCreatedNavigationTargetTest({ - extension, - openNavTarget() { - BrowserTestUtils.synthesizeMouseAtCenter("#test-create-new-tab-from-targetblank-click", -@@ -135,7 +116,7 @@ add_task(async function test_on_created_navigation_target_from_mouse_click_subfr - - info("Open a subframe link in a new tab using Ctrl-click"); - -- await runTestCase({ -+ await runCreatedNavigationTargetTest({ - extension, - openNavTarget() { - BrowserTestUtils.synthesizeMouseAtCenter(function() { -@@ -154,7 +135,7 @@ add_task(async function test_on_created_navigation_target_from_mouse_click_subfr - - info("Open a subframe link in a new window using Shift-click"); - -- await runTestCase({ -+ await runCreatedNavigationTargetTest({ - extension, - openNavTarget() { - BrowserTestUtils.synthesizeMouseAtCenter(function() { -@@ -173,7 +154,7 @@ add_task(async function test_on_created_navigation_target_from_mouse_click_subfr - - info("Open a subframe link with target=\"_blank\" in a new tab using click"); - -- await runTestCase({ -+ await runCreatedNavigationTargetTest({ - extension, - openNavTarget() { - BrowserTestUtils.synthesizeMouseAtCenter(function() { -@@ -194,4 +175,3 @@ add_task(async function test_on_created_navigation_target_from_mouse_click_subfr - - await extension.unload(); - }); -- -diff --git browser/components/extensions/test/browser/browser_ext_webNavigation_onCreatedNavigationTarget_contextmenu.js browser/components/extensions/test/browser/browser_ext_webNavigation_onCreatedNavigationTarget_contextmenu.js -index 670dad87f1e4..e29fccf57a5b 100644 ---- browser/components/extensions/test/browser/browser_ext_webNavigation_onCreatedNavigationTarget_contextmenu.js -+++ browser/components/extensions/test/browser/browser_ext_webNavigation_onCreatedNavigationTarget_contextmenu.js -@@ -2,9 +2,16 @@ - /* vim: set sts=2 sw=2 et tw=80: */ - "use strict"; - --const BASE_URL = "http://mochi.test:8888/browser/browser/components/extensions/test/browser"; --const SOURCE_PAGE = `${BASE_URL}/webNav_createdTargetSource.html`; --const OPENED_PAGE = `${BASE_URL}/webNav_createdTarget.html`; -+Services.scriptloader.loadSubScript(new URL("head_webNavigation.js", gTestPath).href, -+ this); -+ -+async function clickContextMenuItem({pageElementSelector, contextMenuItemLabel}) { -+ const contentAreaContextMenu = await openContextMenu(pageElementSelector); -+ const item = contentAreaContextMenu.getElementsByAttribute("label", contextMenuItemLabel); -+ is(item.length, 1, `found contextMenu item for "${contextMenuItemLabel}"`); -+ item[0].click(); -+ await closeContextMenu(); -+} - - async function background() { - const tabs = await browser.tabs.query({active: true, currentWindow: true}); -@@ -34,32 +41,6 @@ async function background() { - }); - } - --async function runTestCase({extension, openNavTarget, expectedWebNavProps}) { -- await openNavTarget(); -- -- const webNavMsg = await extension.awaitMessage("webNavOnCreated"); -- const createdTabId = await extension.awaitMessage("tabsOnCreated"); -- const completedNavMsg = await extension.awaitMessage("webNavOnCompleted"); -- -- let {sourceTabId, sourceFrameId, url} = expectedWebNavProps; -- -- is(webNavMsg.tabId, createdTabId, "Got the expected tabId property"); -- is(webNavMsg.sourceTabId, sourceTabId, "Got the expected sourceTabId property"); -- is(webNavMsg.sourceFrameId, sourceFrameId, "Got the expected sourceFrameId property"); -- is(webNavMsg.url, url, "Got the expected url property"); -- -- is(completedNavMsg.tabId, createdTabId, "Got the expected webNavigation.onCompleted tabId property"); -- is(completedNavMsg.url, url, "Got the expected webNavigation.onCompleted url property"); --} -- --async function clickContextMenuItem({pageElementSelector, contextMenuItemLabel}) { -- const contentAreaContextMenu = await openContextMenu(pageElementSelector); -- const item = contentAreaContextMenu.getElementsByAttribute("label", contextMenuItemLabel); -- is(item.length, 1, `found contextMenu item for "${contextMenuItemLabel}"`); -- item[0].click(); -- await closeContextMenu(); --} -- - add_task(async function test_on_created_navigation_target_from_context_menu() { - const tab = await BrowserTestUtils.openNewForegroundTab(gBrowser, SOURCE_PAGE); - -@@ -76,7 +57,7 @@ add_task(async function test_on_created_navigation_target_from_context_menu() { - - info("Open link in a new tab from the context menu"); - -- await runTestCase({ -+ await runCreatedNavigationTargetTest({ - extension, - async openNavTarget() { - await clickContextMenuItem({ -@@ -93,7 +74,7 @@ add_task(async function test_on_created_navigation_target_from_context_menu() { - - info("Open link in a new window from the context menu"); - -- await runTestCase({ -+ await runCreatedNavigationTargetTest({ - extension, - async openNavTarget() { - await clickContextMenuItem({ -@@ -129,7 +110,7 @@ add_task(async function test_on_created_navigation_target_from_context_menu_subf - - info("Open a subframe link in a new tab from the context menu"); - -- await runTestCase({ -+ await runCreatedNavigationTargetTest({ - extension, - async openNavTarget() { - await clickContextMenuItem({ -@@ -151,7 +132,7 @@ add_task(async function test_on_created_navigation_target_from_context_menu_subf - - info("Open a subframe link in a new window from the context menu"); - -- await runTestCase({ -+ await runCreatedNavigationTargetTest({ - extension, - async openNavTarget() { - await clickContextMenuItem({ -diff --git browser/components/extensions/test/browser/browser_ext_webNavigation_onCreatedNavigationTarget_named_window.js browser/components/extensions/test/browser/browser_ext_webNavigation_onCreatedNavigationTarget_named_window.js -new file mode 100644 -index 000000000000..9888bfb23da6 ---- /dev/null -+++ browser/components/extensions/test/browser/browser_ext_webNavigation_onCreatedNavigationTarget_named_window.js -@@ -0,0 +1,97 @@ -+/* -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- */ -+/* vim: set sts=2 sw=2 et tw=80: */ -+"use strict"; -+ -+Services.scriptloader.loadSubScript(new URL("head_webNavigation.js", gTestPath).href, -+ this); -+ -+async function background() { -+ const tabs = await browser.tabs.query({active: true, currentWindow: true}); -+ const sourceTabId = tabs[0].id; -+ -+ const sourceTabFrames = await browser.webNavigation.getAllFrames({tabId: sourceTabId}); -+ -+ browser.webNavigation.onCreatedNavigationTarget.addListener((msg) => { -+ browser.test.sendMessage("webNavOnCreated", msg); -+ }); -+ -+ browser.webNavigation.onCompleted.addListener(async (msg) => { -+ // NOTE: checking the url is currently necessary because of Bug 1252129 -+ // ( Filter out webNavigation events related to new window initialization phase). -+ if (msg.tabId !== sourceTabId && msg.url !== "about:blank") { -+ await browser.tabs.remove(msg.tabId); -+ browser.test.sendMessage("webNavOnCompleted", msg); -+ } -+ }); -+ -+ browser.tabs.onCreated.addListener((tab) => { -+ browser.test.sendMessage("tabsOnCreated", tab.id); -+ }); -+ -+ browser.test.onMessage.addListener(({type, code}) => { -+ if (type === "execute-contentscript") { -+ browser.tabs.executeScript(sourceTabId, {code: code}); -+ } -+ }); -+ -+ browser.test.sendMessage("expectedSourceTab", { -+ sourceTabId, sourceTabFrames, -+ }); -+} -+ -+add_task(async function test_window_open_in_named_win() { -+ const tab1 = await BrowserTestUtils.openNewForegroundTab(gBrowser, SOURCE_PAGE); -+ -+ gBrowser.selectedTab = tab1; -+ -+ const extension = ExtensionTestUtils.loadExtension({ -+ background, -+ manifest: { -+ permissions: ["webNavigation", "tabs", ""], -+ }, -+ }); -+ -+ await extension.startup(); -+ -+ const expectedSourceTab = await extension.awaitMessage("expectedSourceTab"); -+ -+ info("open a url in a new named window from a window.open call"); -+ -+ await runCreatedNavigationTargetTest({ -+ extension, -+ openNavTarget() { -+ extension.sendMessage({ -+ type: "execute-contentscript", -+ code: `window.open("${OPENED_PAGE}#new-named-window-open", "TestWinName"); true;`, -+ }); -+ }, -+ expectedWebNavProps: { -+ sourceTabId: expectedSourceTab.sourceTabId, -+ sourceFrameId: 0, -+ url: `${OPENED_PAGE}#new-named-window-open`, -+ }, -+ }); -+ -+ info("open a url in an existent named window from a window.open call"); -+ -+ await runCreatedNavigationTargetTest({ -+ extension, -+ openNavTarget() { -+ extension.sendMessage({ -+ type: "execute-contentscript", -+ code: `window.open("${OPENED_PAGE}#existent-named-window-open", "TestWinName"); true;`, -+ }); -+ }, -+ expectedWebNavProps: { -+ sourceTabId: expectedSourceTab.sourceTabId, -+ sourceFrameId: 0, -+ url: `${OPENED_PAGE}#existent-named-window-open`, -+ }, -+ }); -+ -+ assertNoPendingCreatedNavigationTargetData(); -+ -+ await BrowserTestUtils.removeTab(tab1); -+ -+ await extension.unload(); -+}); -diff --git browser/components/extensions/test/browser/browser_ext_webNavigation_onCreatedNavigationTarget_subframe_window_open.js browser/components/extensions/test/browser/browser_ext_webNavigation_onCreatedNavigationTarget_subframe_window_open.js -new file mode 100644 -index 000000000000..147c943f7102 ---- /dev/null -+++ browser/components/extensions/test/browser/browser_ext_webNavigation_onCreatedNavigationTarget_subframe_window_open.js -@@ -0,0 +1,163 @@ -+/* -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- */ -+/* vim: set sts=2 sw=2 et tw=80: */ -+"use strict"; -+ -+Services.scriptloader.loadSubScript(new URL("head_webNavigation.js", gTestPath).href, -+ this); -+ -+async function background() { -+ const tabs = await browser.tabs.query({active: true, currentWindow: true}); -+ const sourceTabId = tabs[0].id; -+ -+ const sourceTabFrames = await browser.webNavigation.getAllFrames({tabId: sourceTabId}); -+ -+ browser.webNavigation.onCreatedNavigationTarget.addListener((msg) => { -+ browser.test.sendMessage("webNavOnCreated", msg); -+ }); -+ -+ browser.webNavigation.onCompleted.addListener(async (msg) => { -+ // NOTE: checking the url is currently necessary because of Bug 1252129 -+ // ( Filter out webNavigation events related to new window initialization phase). -+ if (msg.tabId !== sourceTabId && msg.url !== "about:blank") { -+ await browser.tabs.remove(msg.tabId); -+ browser.test.sendMessage("webNavOnCompleted", msg); -+ } -+ }); -+ -+ browser.tabs.onCreated.addListener((tab) => { -+ browser.test.sendMessage("tabsOnCreated", tab.id); -+ }); -+ -+ browser.test.onMessage.addListener(({type, code}) => { -+ if (type === "execute-contentscript") { -+ browser.tabs.executeScript(sourceTabId, {code: code}); -+ } -+ }); -+ -+ browser.test.sendMessage("expectedSourceTab", { -+ sourceTabId, sourceTabFrames, -+ }); -+} -+ -+add_task(async function test_window_open_from_subframe() { -+ const tab1 = await BrowserTestUtils.openNewForegroundTab(gBrowser, SOURCE_PAGE); -+ -+ gBrowser.selectedTab = tab1; -+ -+ const extension = ExtensionTestUtils.loadExtension({ -+ background, -+ manifest: { -+ permissions: ["webNavigation", "tabs", ""], -+ }, -+ }); -+ -+ await extension.startup(); -+ -+ const expectedSourceTab = await extension.awaitMessage("expectedSourceTab"); -+ -+ info("open a url in a new tab from subframe window.open call"); -+ -+ await runCreatedNavigationTargetTest({ -+ extension, -+ openNavTarget() { -+ extension.sendMessage({ -+ type: "execute-contentscript", -+ code: `document.querySelector('iframe').contentWindow.open("${OPENED_PAGE}#new-tab-from-window-open-subframe"); true;`, -+ }); -+ }, -+ expectedWebNavProps: { -+ sourceTabId: expectedSourceTab.sourceTabId, -+ sourceFrameId: expectedSourceTab.sourceTabFrames[1].frameId, -+ url: `${OPENED_PAGE}#new-tab-from-window-open-subframe`, -+ }, -+ }); -+ -+ info("open a url in a new window from subframe window.open call"); -+ -+ await runCreatedNavigationTargetTest({ -+ extension, -+ openNavTarget() { -+ extension.sendMessage({ -+ type: "execute-contentscript", -+ code: `document.querySelector('iframe').contentWindow.open("${OPENED_PAGE}#new-win-from-window-open-subframe", "_blank", "toolbar=0"); true;`, -+ }); -+ }, -+ expectedWebNavProps: { -+ sourceTabId: expectedSourceTab.sourceTabId, -+ sourceFrameId: expectedSourceTab.sourceTabFrames[1].frameId, -+ url: `${OPENED_PAGE}#new-win-from-window-open-subframe`, -+ }, -+ }); -+ -+ assertNoPendingCreatedNavigationTargetData(); -+ -+ await BrowserTestUtils.removeTab(tab1); -+ -+ await extension.unload(); -+}); -+ -+add_task(async function test_window_open_close_from_browserAction_popup() { -+ const tab1 = await BrowserTestUtils.openNewForegroundTab(gBrowser, SOURCE_PAGE); -+ -+ gBrowser.selectedTab = tab1; -+ -+ function popup() { -+ window.open("", "_self").close(); -+ -+ browser.test.sendMessage("browserAction_popup_executed"); -+ } -+ -+ const extension = ExtensionTestUtils.loadExtension({ -+ background, -+ manifest: { -+ browser_action: { -+ default_popup: "popup.html", -+ }, -+ permissions: ["webNavigation", "tabs", ""], -+ }, -+ files: { -+ "popup.html": ` -+ -+ -+ -+ -+ -+ -+ -+ -+ `, -+ "popup.js": popup, -+ }, -+ }); -+ -+ await extension.startup(); -+ -+ const expectedSourceTab = await extension.awaitMessage("expectedSourceTab"); -+ -+ clickBrowserAction(extension); -+ -+ await extension.awaitMessage("browserAction_popup_executed"); -+ -+ info("open a url in a new tab from a window.open call"); -+ -+ await runCreatedNavigationTargetTest({ -+ extension, -+ openNavTarget() { -+ extension.sendMessage({ -+ type: "execute-contentscript", -+ code: `window.open("${OPENED_PAGE}#new-tab-from-window-open"); true;`, -+ }); -+ }, -+ expectedWebNavProps: { -+ sourceTabId: expectedSourceTab.sourceTabId, -+ sourceFrameId: 0, -+ url: `${OPENED_PAGE}#new-tab-from-window-open`, -+ }, -+ }); -+ -+ assertNoPendingCreatedNavigationTargetData(); -+ -+ await BrowserTestUtils.removeTab(tab1); -+ -+ await extension.unload(); -+}); -diff --git browser/components/extensions/test/browser/browser_ext_webNavigation_onCreatedNavigationTarget_window_open.js browser/components/extensions/test/browser/browser_ext_webNavigation_onCreatedNavigationTarget_window_open.js -index 232b9321fcd3..b56097e44484 100644 ---- browser/components/extensions/test/browser/browser_ext_webNavigation_onCreatedNavigationTarget_window_open.js -+++ browser/components/extensions/test/browser/browser_ext_webNavigation_onCreatedNavigationTarget_window_open.js -@@ -2,9 +2,8 @@ - /* vim: set sts=2 sw=2 et tw=80: */ - "use strict"; - --const BASE_URL = "http://mochi.test:8888/browser/browser/components/extensions/test/browser"; --const SOURCE_PAGE = `${BASE_URL}/webNav_createdTargetSource.html`; --const OPENED_PAGE = `${BASE_URL}/webNav_createdTarget.html`; -+Services.scriptloader.loadSubScript(new URL("head_webNavigation.js", gTestPath).href, -+ this); - - async function background() { - const tabs = await browser.tabs.query({active: true, currentWindow: true}); -@@ -40,34 +39,6 @@ async function background() { - }); - } - --async function runTestCase({extension, openNavTarget, expectedWebNavProps}) { -- await openNavTarget(); -- -- const webNavMsg = await extension.awaitMessage("webNavOnCreated"); -- const createdTabId = await extension.awaitMessage("tabsOnCreated"); -- const completedNavMsg = await extension.awaitMessage("webNavOnCompleted"); -- -- let {sourceTabId, sourceFrameId, url} = expectedWebNavProps; -- -- is(webNavMsg.tabId, createdTabId, "Got the expected tabId property"); -- is(webNavMsg.sourceTabId, sourceTabId, "Got the expected sourceTabId property"); -- is(webNavMsg.sourceFrameId, sourceFrameId, "Got the expected sourceFrameId property"); -- is(webNavMsg.url, url, "Got the expected url property"); -- -- is(completedNavMsg.tabId, createdTabId, "Got the expected webNavigation.onCompleted tabId property"); -- is(completedNavMsg.url, url, "Got the expected webNavigation.onCompleted url property"); --} -- --// Test that there are no pending createdNavigationTarget messages still tracked --// in WebNavigation.jsm (to be called before the extension is unloaded, because --// once the last extension which have subscribed a webNavigation event is unloaded --// all the pending created navigation target data is completely cleared). --function assertNoPendingCreatedNavigationTargetData() { -- const {Manager} = Cu.import("resource://gre/modules/WebNavigation.jsm", {}); -- Assert.equal(Manager.createdNavigationTargetByOuterWindowId.size, 0, -- "There should be no pending createdNavigationTarget messages in WebNavigation"); --} -- - add_task(async function test_window_open() { - const tab1 = await BrowserTestUtils.openNewForegroundTab(gBrowser, SOURCE_PAGE); - -@@ -86,7 +57,7 @@ add_task(async function test_window_open() { - - info("open a url in a new tab from a window.open call"); - -- await runTestCase({ -+ await runCreatedNavigationTargetTest({ - extension, - openNavTarget() { - extension.sendMessage({ -@@ -103,7 +74,7 @@ add_task(async function test_window_open() { - - info("open a url in a new window from a window.open call"); - -- await runTestCase({ -+ await runCreatedNavigationTargetTest({ - extension, - openNavTarget() { - extension.sendMessage({ -@@ -125,63 +96,6 @@ add_task(async function test_window_open() { - await extension.unload(); - }); - --add_task(async function test_window_open_from_subframe() { -- const tab1 = await BrowserTestUtils.openNewForegroundTab(gBrowser, SOURCE_PAGE); -- -- gBrowser.selectedTab = tab1; -- -- const extension = ExtensionTestUtils.loadExtension({ -- background, -- manifest: { -- permissions: ["webNavigation", "tabs", ""], -- }, -- }); -- -- await extension.startup(); -- -- const expectedSourceTab = await extension.awaitMessage("expectedSourceTab"); -- -- info("open a url in a new tab from subframe window.open call"); -- -- await runTestCase({ -- extension, -- openNavTarget() { -- extension.sendMessage({ -- type: "execute-contentscript", -- code: `document.querySelector('iframe').contentWindow.open("${OPENED_PAGE}#new-tab-from-window-open-subframe"); true;`, -- }); -- }, -- expectedWebNavProps: { -- sourceTabId: expectedSourceTab.sourceTabId, -- sourceFrameId: expectedSourceTab.sourceTabFrames[1].frameId, -- url: `${OPENED_PAGE}#new-tab-from-window-open-subframe`, -- }, -- }); -- -- info("open a url in a new window from subframe window.open call"); -- -- await runTestCase({ -- extension, -- openNavTarget() { -- extension.sendMessage({ -- type: "execute-contentscript", -- code: `document.querySelector('iframe').contentWindow.open("${OPENED_PAGE}#new-win-from-window-open-subframe", "_blank", "toolbar=0"); true;`, -- }); -- }, -- expectedWebNavProps: { -- sourceTabId: expectedSourceTab.sourceTabId, -- sourceFrameId: expectedSourceTab.sourceTabFrames[1].frameId, -- url: `${OPENED_PAGE}#new-win-from-window-open-subframe`, -- }, -- }); -- -- assertNoPendingCreatedNavigationTargetData(); -- -- await BrowserTestUtils.removeTab(tab1); -- -- await extension.unload(); --}); -- - add_task(async function test_window_open_close_from_browserAction_popup() { - const tab1 = await BrowserTestUtils.openNewForegroundTab(gBrowser, SOURCE_PAGE); - -@@ -226,7 +140,7 @@ add_task(async function test_window_open_close_from_browserAction_popup() { - - info("open a url in a new tab from a window.open call"); - -- await runTestCase({ -+ await runCreatedNavigationTargetTest({ - extension, - openNavTarget() { - extension.sendMessage({ -@@ -247,60 +161,3 @@ add_task(async function test_window_open_close_from_browserAction_popup() { - - await extension.unload(); - }); -- --add_task(async function test_window_open_in_named_win() { -- const tab1 = await BrowserTestUtils.openNewForegroundTab(gBrowser, SOURCE_PAGE); -- -- gBrowser.selectedTab = tab1; -- -- const extension = ExtensionTestUtils.loadExtension({ -- background, -- manifest: { -- permissions: ["webNavigation", "tabs", ""], -- }, -- }); -- -- await extension.startup(); -- -- const expectedSourceTab = await extension.awaitMessage("expectedSourceTab"); -- -- info("open a url in a new named window from a window.open call"); -- -- await runTestCase({ -- extension, -- openNavTarget() { -- extension.sendMessage({ -- type: "execute-contentscript", -- code: `window.open("${OPENED_PAGE}#new-named-window-open", "TestWinName"); true;`, -- }); -- }, -- expectedWebNavProps: { -- sourceTabId: expectedSourceTab.sourceTabId, -- sourceFrameId: 0, -- url: `${OPENED_PAGE}#new-named-window-open`, -- }, -- }); -- -- info("open a url in an existent named window from a window.open call"); -- -- await runTestCase({ -- extension, -- openNavTarget() { -- extension.sendMessage({ -- type: "execute-contentscript", -- code: `window.open("${OPENED_PAGE}#existent-named-window-open", "TestWinName"); true;`, -- }); -- }, -- expectedWebNavProps: { -- sourceTabId: expectedSourceTab.sourceTabId, -- sourceFrameId: 0, -- url: `${OPENED_PAGE}#existent-named-window-open`, -- }, -- }); -- -- assertNoPendingCreatedNavigationTargetData(); -- -- await BrowserTestUtils.removeTab(tab1); -- -- await extension.unload(); --}); -diff --git browser/components/extensions/test/browser/head_webNavigation.js browser/components/extensions/test/browser/head_webNavigation.js -new file mode 100644 -index 000000000000..a98ccd9934ba ---- /dev/null -+++ browser/components/extensions/test/browser/head_webNavigation.js -@@ -0,0 +1,39 @@ -+/* -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- */ -+/* vim: set sts=2 sw=2 et tw=80: */ -+"use strict"; -+ -+/* exported BASE_URL, SOURCE_PAGE, OPENED_PAGE, -+ runCreatedNavigationTargetTest, assertNoPendingCreatedNavigationTargetData */ -+ -+const BASE_URL = "http://mochi.test:8888/browser/browser/components/extensions/test/browser"; -+const SOURCE_PAGE = `${BASE_URL}/webNav_createdTargetSource.html`; -+const OPENED_PAGE = `${BASE_URL}/webNav_createdTarget.html`; -+ -+async function runCreatedNavigationTargetTest({extension, openNavTarget, expectedWebNavProps}) { -+ await openNavTarget(); -+ -+ const webNavMsg = await extension.awaitMessage("webNavOnCreated"); -+ const createdTabId = await extension.awaitMessage("tabsOnCreated"); -+ const completedNavMsg = await extension.awaitMessage("webNavOnCompleted"); -+ -+ let {sourceTabId, sourceFrameId, url} = expectedWebNavProps; -+ -+ is(webNavMsg.tabId, createdTabId, "Got the expected tabId property"); -+ is(webNavMsg.sourceTabId, sourceTabId, "Got the expected sourceTabId property"); -+ is(webNavMsg.sourceFrameId, sourceFrameId, "Got the expected sourceFrameId property"); -+ is(webNavMsg.url, url, "Got the expected url property"); -+ -+ is(completedNavMsg.tabId, createdTabId, "Got the expected webNavigation.onCompleted tabId property"); -+ is(completedNavMsg.url, url, "Got the expected webNavigation.onCompleted url property"); -+} -+ -+ -+// Test that there are no pending createdNavigationTarget messages still tracked -+// in WebNavigation.jsm (to be called before the extension is unloaded, because -+// once the last extension which have subscribed a webNavigation event is unloaded -+// all the pending created navigation target data is completely cleared). -+function assertNoPendingCreatedNavigationTargetData() { -+ const {Manager} = Cu.import("resource://gre/modules/WebNavigation.jsm", {}); -+ Assert.equal(Manager.createdNavigationTargetByOuterWindowId.size, 0, -+ "There should be no pending createdNavigationTarget messages in WebNavigation"); -+} diff --git a/www/waterfox/files/patch-bug1403465 b/www/waterfox/files/patch-bug1403465 deleted file mode 100644 index 23ed5a79d30..00000000000 --- a/www/waterfox/files/patch-bug1403465 +++ /dev/null @@ -1,60 +0,0 @@ -commit f2c88f86dc5b -Author: Emilio Cobos Álvarez -Date: Thu Sep 28 10:40:02 2017 +0200 - - Bug 1403465 - style: Avoid creating element data in Servo_ResolvePseudoStyle. r=bholley, a=sledru - - The reason the patch in bug 1402285 doesn't work is that we call this function - multiple times with the same element. This fixes it. - - MozReview-Commit-ID: Ko9zirCOzTR - - --HG-- - extra : transplant_source : qegB%06%15r/%F2%BDm%86%9C%C7%91%06%FA-%1E%A8 ---- - servo/ports/geckolib/glue.rs | 27 +++++++++++++++++---------- - 1 file changed, 17 insertions(+), 10 deletions(-) - -diff --git servo/ports/geckolib/glue.rs servo/ports/geckolib/glue.rs -index 714947fc1812..2f2938f4890b 100644 ---- servo/ports/geckolib/glue.rs -+++ servo/ports/geckolib/glue.rs -@@ -1767,21 +1767,28 @@ pub extern "C" fn Servo_ResolvePseudoStyle(element: RawGeckoElementBorrowed, - -> ServoStyleContextStrong - { - let element = GeckoElement(element); -- let data = unsafe { element.ensure_data() }; - let doc_data = PerDocumentStyleData::from_ffi(raw_data).borrow(); - - debug!("Servo_ResolvePseudoStyle: {:?} {:?}, is_probe: {}", - element, PseudoElement::from_pseudo_type(pseudo_type), is_probe); - -- // FIXME(bholley): Assert against this. -- if !data.has_styles() { -- warn!("Calling Servo_ResolvePseudoStyle on unstyled element"); -- return if is_probe { -- Strong::null() -- } else { -- doc_data.default_computed_values().clone().into() -- }; -- } -+ let data = element.borrow_data(); -+ -+ let data = match data.as_ref() { -+ Some(data) if data.has_styles() => data, -+ _ => { -+ // FIXME(bholley, emilio): Assert against this. -+ // -+ // Known offender is nsMathMLmoFrame::MarkIntrinsicISizesDirty, -+ // which goes and does a bunch of work involving style resolution. -+ warn!("Calling Servo_ResolvePseudoStyle on unstyled element"); -+ return if is_probe { -+ Strong::null() -+ } else { -+ doc_data.default_computed_values().clone().into() -+ }; -+ } -+ }; - - let pseudo = PseudoElement::from_pseudo_type(pseudo_type) - .expect("ResolvePseudoStyle with a non-pseudo?"); diff --git a/www/waterfox/files/patch-bug1403466 b/www/waterfox/files/patch-bug1403466 deleted file mode 100644 index 434752911bd..00000000000 --- a/www/waterfox/files/patch-bug1403466 +++ /dev/null @@ -1,50 +0,0 @@ -commit 0d4a6317df44 -Author: Mike de Boer -Date: Tue Oct 10 12:44:04 2017 +0200 - - Bug 1403466 - Don't set a max-height on panelviews used by WebExtensions, because it causes browser contents to be cut-off. r=Gijs, a=ritu - - Setting a max-height caused the '_handleDOMChange' method in ext-browser-content.js - to consistently lie about the scrollHeight, since it was never allowed to grow - beyond the maxHeight - even when the document needs to be larger to fit its contents. - We don't need this aggressiveness in Photon panels anyway, so that makes it - doubly safe to remove this code. - - MozReview-Commit-ID: HJVMXXHS4By - - --HG-- - extra : source : cd62fb50fe61504937ff3d37db3852bae0d73d0c ---- - browser/components/extensions/ExtensionPopups.jsm | 10 +--------- - 1 file changed, 1 insertion(+), 9 deletions(-) - -diff --git browser/components/extensions/ExtensionPopups.jsm browser/components/extensions/ExtensionPopups.jsm -index 5ac4f43943f1..cc02e48b32dd 100644 ---- browser/components/extensions/ExtensionPopups.jsm -+++ browser/components/extensions/ExtensionPopups.jsm -@@ -123,7 +123,6 @@ class BasePopup { - - if (this.viewNode) { - this.viewNode.removeEventListener(this.DESTROY_EVENT, this); -- this.viewNode.style.maxHeight = ""; - delete this.viewNode.customRectGetter; - } - -@@ -331,16 +330,9 @@ class BasePopup { - height = Math.min(height, maxHeight); - this.browser.style.height = `${height}px`; - -- // Set a maximum height on the element to our preferred -- // maximum height, so that the PanelUI resizing code can make an accurate -- // calculation. If we don't do this, the flex sizing logic will prevent us -- // from ever reporting a preferred size smaller than the height currently -- // available to us in the panel. -- height = Math.max(height, this.viewHeight); -- this.viewNode.style.maxHeight = `${height}px`; - // Used by the panelmultiview code to figure out sizing without reparenting - // (which would destroy the browser and break us). -- this.lastCalculatedInViewHeight = height; -+ this.lastCalculatedInViewHeight = Math.max(height, this.viewHeight); - } else { - this.browser.style.width = `${width}px`; - this.browser.style.minWidth = `${width}px`; diff --git a/www/waterfox/files/patch-bug1403473 b/www/waterfox/files/patch-bug1403473 deleted file mode 100644 index 87196f41522..00000000000 --- a/www/waterfox/files/patch-bug1403473 +++ /dev/null @@ -1,27 +0,0 @@ -commit 3da3e74521d4 (HEAD) -Author: Thomas Nguyen -Date: Fri Sep 29 01:46:00 2017 -0400 - - Bug 1403473 - Init loggingEnable for hashcompleter. r=dimi, a=sledru - - MozReview-Commit-ID: 1BpErwmbgCM - - --HG-- - extra : amend_source : 5993fe27195003ac1fa77f89b4d14187cbff591e ---- - toolkit/components/url-classifier/nsUrlClassifierHashCompleter.js | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git toolkit/components/url-classifier/nsUrlClassifierHashCompleter.js toolkit/components/url-classifier/nsUrlClassifierHashCompleter.js -index eac72dadabd3..16b1b7dc7c52 100644 ---- toolkit/components/url-classifier/nsUrlClassifierHashCompleter.js -+++ toolkit/components/url-classifier/nsUrlClassifierHashCompleter.js -@@ -184,6 +184,8 @@ function HashCompleter() { - - Services.obs.addObserver(this, "quit-application"); - Services.prefs.addObserver(PREF_DEBUG_ENABLED, this); -+ -+ loggingEnabled = Services.prefs.getBoolPref(PREF_DEBUG_ENABLED); - } - - HashCompleter.prototype = { diff --git a/www/waterfox/files/patch-bug1403592 b/www/waterfox/files/patch-bug1403592 deleted file mode 100644 index a716a4fd183..00000000000 --- a/www/waterfox/files/patch-bug1403592 +++ /dev/null @@ -1,157 +0,0 @@ -commit 79c72166bf05 -Author: Emilio Cobos Álvarez -Date: Wed Sep 27 18:09:31 2017 +0200 - - Bug 1403592 - Never flush the user font set when getting font metrics from style resolution. r=Manishearth, a=sledru - - In this case, the caller doesn't go through all the PreTraverseSync stuff (we - don't really want it to do so), via GetComputedStyleNoFlush. - - It makes sense to not flush the user font set that case, we'll schedule a - restyle properly if / when needed. - - Since the set should be flushed otherwise, let's just not flush it from the - styling code. - - MozReview-Commit-ID: LLHfxemJ8QQ - - --HG-- - extra : source : 0a0cc4bb885a2487b643e94fc244620751616d03 ---- - layout/style/ServoBindings.cpp | 7 ++++--- - layout/style/nsRuleNode.cpp | 13 ++++++++----- - layout/style/nsRuleNode.h | 8 +++++++- - 3 files changed, 19 insertions(+), 9 deletions(-) - -diff --git layout/style/ServoBindings.cpp layout/style/ServoBindings.cpp -index ac2a6cc2ec01..d248e6ad1401 100644 ---- layout/style/ServoBindings.cpp -+++ layout/style/ServoBindings.cpp -@@ -2482,9 +2482,10 @@ Gecko_GetFontMetrics(RawGeckoPresContextBorrowed aPresContext, - - nsPresContext* presContext = const_cast(aPresContext); - presContext->SetUsesExChUnits(true); -- RefPtr fm = nsRuleNode::GetMetricsFor(presContext, aIsVertical, -- aFont, aFontSize, -- aUseUserFontSet); -+ RefPtr fm = nsRuleNode::GetMetricsFor( -+ presContext, aIsVertical, aFont, aFontSize, aUseUserFontSet, -+ nsRuleNode::FlushUserFontSet::No); -+ - ret.mXSize = fm->XHeight(); - gfxFloat zeroWidth = fm->GetThebesFontGroup()->GetFirstValidFont()-> - GetMetrics(fm->Orientation()).zeroOrAveCharWidth; -diff --git layout/style/nsRuleNode.cpp layout/style/nsRuleNode.cpp -index ccccce98009e..fbb5e3824e2f 100644 ---- layout/style/nsRuleNode.cpp -+++ layout/style/nsRuleNode.cpp -@@ -377,7 +377,8 @@ nsRuleNode::GetMetricsFor(nsPresContext* aPresContext, - bool aIsVertical, - const nsStyleFont* aStyleFont, - nscoord aFontSize, -- bool aUseUserFontSet) -+ bool aUseUserFontSet, -+ FlushUserFontSet aFlushUserFontSet) - { - nsFont font = aStyleFont->mFont; - font.size = aFontSize; -@@ -387,8 +388,9 @@ nsRuleNode::GetMetricsFor(nsPresContext* aPresContext, - params.language = aStyleFont->mLanguage; - params.explicitLanguage = aStyleFont->mExplicitLanguage; - params.orientation = orientation; -- params.userFontSet = -- aUseUserFontSet ? aPresContext->GetUserFontSet() : nullptr; -+ params.userFontSet = aUseUserFontSet -+ ? aPresContext->GetUserFontSet(aFlushUserFontSet == FlushUserFontSet::Yes) -+ : nullptr; - params.textPerf = aPresContext->GetTextPerfMetrics(); - return aPresContext->DeviceContext()->GetMetricsFor(font, params); - } -@@ -408,8 +410,9 @@ nsRuleNode::GetMetricsFor(nsPresContext* aPresContext, - isVertical = true; - } - } -- return nsRuleNode::GetMetricsFor(aPresContext, isVertical, aStyleFont, -- aFontSize, aUseUserFontSet); -+ return nsRuleNode::GetMetricsFor( -+ aPresContext, isVertical, aStyleFont, aFontSize, aUseUserFontSet, -+ FlushUserFontSet::Yes); - } - - /* static */ -diff --git layout/style/nsRuleNode.h layout/style/nsRuleNode.h -index 423545ffd198..719eb0c51eb0 100644 ---- layout/style/nsRuleNode.h -+++ layout/style/nsRuleNode.h -@@ -807,11 +807,17 @@ public: - bool aConvertListItem = false); - static void EnsureInlineDisplay(mozilla::StyleDisplay& display); - -+ enum class FlushUserFontSet { -+ Yes, -+ No, -+ }; -+ - static already_AddRefed GetMetricsFor(nsPresContext* aPresContext, - bool aIsVertical, - const nsStyleFont* aStyleFont, - nscoord aFontSize, -- bool aUseUserFontSet); -+ bool aUseUserFontSet, -+ FlushUserFontSet aFlushUserFontSet); - - static already_AddRefed GetMetricsFor(nsPresContext* aPresContext, - nsStyleContext* aStyleContext, -commit f01f1d6ac516 -Author: Emilio Cobos Álvarez -Date: Wed Sep 27 18:16:25 2017 +0200 - - Bug 1403592 - Crashtest. r=Manishearth, a=sledru - - I've made it crash at least once, though it's intermittent-y. I guess it's - better than no crashtest. - - MozReview-Commit-ID: 5m2VCrEs8lM - - --HG-- - extra : source : c050d8574203c0344a9570fef73df51a1a489091 - extra : amend_source : 45265a4fbe7d484fc784c3389f912d45eebf15de ---- - layout/style/crashtests/1403592.html | 19 +++++++++++++++++++ - layout/style/crashtests/crashtests.list | 1 + - 2 files changed, 20 insertions(+) - -diff --git layout/style/crashtests/1403592.html layout/style/crashtests/1403592.html -new file mode 100644 -index 000000000000..fdd810b88603 ---- /dev/null -+++ layout/style/crashtests/1403592.html -@@ -0,0 +1,19 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git layout/style/crashtests/crashtests.list layout/style/crashtests/crashtests.list -index 565abf6c1f83..e811e54554b3 100644 ---- layout/style/crashtests/crashtests.list -+++ layout/style/crashtests/crashtests.list -@@ -204,3 +204,4 @@ load 1391577.html - load 1398581.html - load 1402218-1.html - load 1402366.html -+load 1403592.html diff --git a/www/waterfox/files/patch-bug1403721 b/www/waterfox/files/patch-bug1403721 deleted file mode 100644 index 6459c089408..00000000000 --- a/www/waterfox/files/patch-bug1403721 +++ /dev/null @@ -1,182 +0,0 @@ -commit 637bcd0503db -Author: Tom Schuster -Date: Thu Sep 28 12:46:09 2017 +0200 - - Bug 1403723 - Correct metadata when using management.get. r=mixedpuppy, a=ritu - * * * - Bug 1403721 - Limit management.get to allowed addon types. r=mixedpuppy ---- - toolkit/components/extensions/ext-management.js | 36 ++++++++++++++-------- - .../test/xpcshell/test_ext_experiments.js | 25 +++++++++++++++ - .../test/xpcshell/test_ext_management.js | 8 +++++ - .../mozapps/extensions/internal/XPIProvider.jsm | 4 +++ - 4 files changed, 61 insertions(+), 12 deletions(-) - -diff --git toolkit/components/extensions/ext-management.js toolkit/components/extensions/ext-management.js -index 0e46732b201d..d86a15ceb6a1 100644 ---- toolkit/components/extensions/ext-management.js -+++ toolkit/components/extensions/ext-management.js -@@ -91,6 +91,16 @@ const listenerMap = new WeakMap(); - // Some management APIs are intentionally limited. - const allowedTypes = ["theme", "extension"]; - -+function checkAllowedAddon(addon) { -+ if (addon.isSystem || addon.isAPIExtension) { -+ return false; -+ } -+ if (addon.type == "extension" && !addon.isWebExtension) { -+ return false; -+ } -+ return allowedTypes.includes(addon.type); -+} -+ - class AddonListener { - constructor() { - AddonManager.addAddonListener(this); -@@ -106,33 +116,29 @@ class AddonListener { - return getExtensionInfoForAddon(ext, addon); - } - -- checkAllowed(addon) { -- return !addon.isSystem && allowedTypes.includes(addon.type); -- } -- - onEnabled(addon) { -- if (!this.checkAllowed(addon)) { -+ if (!checkAllowedAddon(addon)) { - return; - } - this.emit("onEnabled", this.getExtensionInfo(addon)); - } - - onDisabled(addon) { -- if (!this.checkAllowed(addon)) { -+ if (!checkAllowedAddon(addon)) { - return; - } - this.emit("onDisabled", this.getExtensionInfo(addon)); - } - - onInstalled(addon) { -- if (!this.checkAllowed(addon)) { -+ if (!checkAllowedAddon(addon)) { - return; - } - this.emit("onInstalled", this.getExtensionInfo(addon)); - } - - onUninstalled(addon) { -- if (!this.checkAllowed(addon)) { -+ if (!checkAllowedAddon(addon)) { - return; - } - this.emit("onUninstalled", this.getExtensionInfo(addon)); -@@ -167,16 +173,22 @@ this.management = class extends ExtensionAPI { - management: { - async get(id) { - let addon = await AddonManager.getAddonByID(id); -- if (!addon.isSystem) { -- return getExtensionInfoForAddon(extension, addon); -+ if (!addon) { -+ throw new ExtensionError(`No such addon ${id}`); -+ } -+ if (!checkAllowedAddon(addon)) { -+ throw new ExtensionError("get not allowed for this addon"); - } -+ // If the extension is enabled get it and use it for more data. -+ let ext = GlobalManager.extensionMap.get(addon.id); -+ return getExtensionInfoForAddon(ext, addon); - }, - - async getAll() { - let addons = await AddonManager.getAddonsByTypes(allowedTypes); -- return addons.filter(addon => !addon.isSystem).map(addon => { -+ return addons.filter(checkAllowedAddon).map(addon => { - // If the extension is enabled get it and use it for more data. -- let ext = addon.isWebExtension && GlobalManager.extensionMap.get(addon.id); -+ let ext = GlobalManager.extensionMap.get(addon.id); - return getExtensionInfoForAddon(ext, addon); - }); - }, -diff --git toolkit/components/extensions/test/xpcshell/test_ext_experiments.js toolkit/components/extensions/test/xpcshell/test_ext_experiments.js -index 343e1e50d983..c8d097decf90 100644 ---- toolkit/components/extensions/test/xpcshell/test_ext_experiments.js -+++ toolkit/components/extensions/test/xpcshell/test_ext_experiments.js -@@ -148,6 +148,31 @@ add_task(async function test_experiments_api() { - let hello = await promise; - equal(hello, "Here I am", "Should get hello from add-on"); - -+ // Install management test add-on. -+ let managementAddon = ExtensionTestUtils.loadExtension({ -+ manifest: { -+ applications: {gecko: {id: "management@web.extension"}}, -+ permissions: ["management"], -+ }, -+ async background() { -+ // Should find the simple extension. -+ let normalAddon = await browser.management.get("boring@web.extension"); -+ browser.test.assertEq(normalAddon.id, "boring@web.extension", "Found boring addon"); -+ -+ try { -+ // Not allowed to get the API experiment. -+ await browser.management.get("fooBar@experiments.addons.mozilla.org"); -+ } catch (e) { -+ browser.test.sendMessage("done"); -+ } -+ }, -+ useAddonManager: "temporary", -+ }); -+ -+ await managementAddon.startup(); -+ await managementAddon.awaitMessage("done"); -+ await managementAddon.unload(); -+ - // Cleanup. - apiAddon.uninstall(); - -diff --git toolkit/components/extensions/test/xpcshell/test_ext_management.js toolkit/components/extensions/test/xpcshell/test_ext_management.js -index c1702042c054..975c14a566e4 100644 ---- toolkit/components/extensions/test/xpcshell/test_ext_management.js -+++ toolkit/components/extensions/test/xpcshell/test_ext_management.js -@@ -22,6 +22,7 @@ add_task(async function test_management_getAll() { - }, - name: id, - version: "1.0", -+ short_name: id, - permissions: ["management"], - }; - } -@@ -55,11 +56,18 @@ add_task(async function test_management_getAll() { - for (let id of [id1, id2]) { - let addon = addons.find(a => { return a.id === id; }); - equal(addon.name, id, `The extension with id ${id} was returned by getAll.`); -+ equal(addon.shortName, id, "Additional extension metadata was correct"); - } - - extension2.sendMessage("getAddon", id1); - let addon = await extension2.awaitMessage("addon"); - equal(addon.name, id1, `The extension with id ${id1} was returned by get.`); -+ equal(addon.shortName, id1, "Additional extension metadata was correct"); -+ -+ extension2.sendMessage("getAddon", id2); -+ addon = await extension2.awaitMessage("addon"); -+ equal(addon.name, id2, `The extension with id ${id2} was returned by get.`); -+ equal(addon.shortName, id2, "Additional extension metadata was correct"); - - await extension2.unload(); - await extension1.unload(); -diff --git toolkit/mozapps/extensions/internal/XPIProvider.jsm toolkit/mozapps/extensions/internal/XPIProvider.jsm -index 0027e13e3804..56f3982e7214 100644 ---- toolkit/mozapps/extensions/internal/XPIProvider.jsm -+++ toolkit/mozapps/extensions/internal/XPIProvider.jsm -@@ -5197,6 +5197,10 @@ AddonWrapper.prototype = { - return isWebExtension(addonFor(this).type); - }, - -+ get isAPIExtension() { -+ return addonFor(this).type == "apiextension"; -+ }, -+ - get temporarilyInstalled() { - return addonFor(this)._installLocation == TemporaryInstallLocation; - }, diff --git a/www/waterfox/files/patch-bug1403998 b/www/waterfox/files/patch-bug1403998 deleted file mode 100644 index 58519848264..00000000000 --- a/www/waterfox/files/patch-bug1403998 +++ /dev/null @@ -1,167 +0,0 @@ -commit b5254d352036 -Author: Honza Bambas -Date: Mon Oct 2 10:12:00 2017 -0400 - - Bug 1403998 - Make view-source channels return correct resultPrincipalURI via LoadInfo after redirect. r=bz, a=ritu - - --HG-- - extra : source : f693bf1345f941592b1ce19514a2bbf00e6ef06a ---- - .../protocol/viewsource/nsViewSourceChannel.cpp | 95 ++++++++++++++++++---- - netwerk/protocol/viewsource/nsViewSourceChannel.h | 10 +++ - 2 files changed, 91 insertions(+), 14 deletions(-) - -diff --git netwerk/protocol/viewsource/nsViewSourceChannel.cpp netwerk/protocol/viewsource/nsViewSourceChannel.cpp -index 4c7f335352d3..1f1ee01818fb 100644 ---- netwerk/protocol/viewsource/nsViewSourceChannel.cpp -+++ netwerk/protocol/viewsource/nsViewSourceChannel.cpp -@@ -129,12 +129,87 @@ nsViewSourceChannel::InitSrcdoc(nsIURI* aURI, - mApplicationCacheChannel = do_QueryInterface(mChannel); - mUploadChannel = do_QueryInterface(mChannel); - -+ rv = UpdateLoadInfoResultPrincipalURI(); -+ NS_ENSURE_SUCCESS(rv, rv); -+ - nsCOMPtr isc = do_QueryInterface(mChannel); - MOZ_ASSERT(isc); - isc->SetBaseURI(aBaseURI); - return NS_OK; - } - -+nsresult -+nsViewSourceChannel::UpdateLoadInfoResultPrincipalURI() -+{ -+ nsresult rv; -+ -+ MOZ_ASSERT(mChannel); -+ -+ nsCOMPtr channelLoadInfo = mChannel->GetLoadInfo(); -+ if (!channelLoadInfo) { -+ return NS_OK; -+ } -+ -+ nsCOMPtr channelResultPrincipalURI; -+ rv = channelLoadInfo->GetResultPrincipalURI(getter_AddRefs(channelResultPrincipalURI)); -+ if (NS_FAILED(rv)) { -+ return rv; -+ } -+ -+ if (!channelResultPrincipalURI) { -+ mChannel->GetOriginalURI(getter_AddRefs(channelResultPrincipalURI)); -+ return NS_OK; -+ } -+ -+ if (!channelResultPrincipalURI) { -+ return NS_ERROR_UNEXPECTED; -+ } -+ -+ bool alreadyViewSource; -+ if (NS_SUCCEEDED(channelResultPrincipalURI->SchemeIs("view-source", &alreadyViewSource)) && -+ alreadyViewSource) { -+ return NS_OK; -+ } -+ -+ nsCOMPtr updatedResultPrincipalURI; -+ rv = BuildViewSourceURI(channelResultPrincipalURI, -+ getter_AddRefs(updatedResultPrincipalURI)); -+ if (NS_FAILED(rv)) { -+ return rv; -+ } -+ -+ rv = channelLoadInfo->SetResultPrincipalURI(updatedResultPrincipalURI); -+ if (NS_FAILED(rv)) { -+ return rv; -+ } -+ -+ return NS_OK; -+} -+ -+nsresult -+nsViewSourceChannel::BuildViewSourceURI(nsIURI * aURI, nsIURI ** aResult) -+{ -+ nsresult rv; -+ -+ // protect ourselves against broken channel implementations -+ if (!aURI) { -+ NS_ERROR("no URI to build view-source uri!"); -+ return NS_ERROR_UNEXPECTED; -+ } -+ -+ nsAutoCString spec; -+ rv = aURI->GetSpec(spec); -+ if (NS_FAILED(rv)) { -+ return rv; -+ } -+ -+ return NS_NewURI(aResult, -+ /* XXX Gross hack -- NS_NewURI goes into an infinite loop on -+ non-flat specs. See bug 136980 */ -+ nsAutoCString(NS_LITERAL_CSTRING("view-source:") + spec), -+ nullptr); -+} -+ - //////////////////////////////////////////////////////////////////////////////// - // nsIRequest methods: - -@@ -229,24 +304,11 @@ nsViewSourceChannel::GetURI(nsIURI* *aURI) - - nsCOMPtr uri; - nsresult rv = mChannel->GetURI(getter_AddRefs(uri)); -- if (NS_FAILED(rv)) -- return rv; -- -- // protect ourselves against broken channel implementations -- if (!uri) { -- NS_ERROR("inner channel returned NS_OK and a null URI"); -- return NS_ERROR_UNEXPECTED; -- } -- -- nsAutoCString spec; -- rv = uri->GetSpec(spec); - if (NS_FAILED(rv)) { - return rv; - } - -- /* XXX Gross hack -- NS_NewURI goes into an infinite loop on -- non-flat specs. See bug 136980 */ -- return NS_NewURI(aURI, nsAutoCString(NS_LITERAL_CSTRING("view-source:")+spec), nullptr); -+ return BuildViewSourceURI(uri, aURI); - } - - NS_IMETHODIMP -@@ -671,6 +733,11 @@ nsViewSourceChannel::OnStartRequest(nsIRequest *aRequest, nsISupports *aContext) - mCacheInfoChannel = do_QueryInterface(mChannel); - mUploadChannel = do_QueryInterface(aRequest); - -+ nsresult rv = UpdateLoadInfoResultPrincipalURI(); -+ if (NS_FAILED(rv)) { -+ Cancel(rv); -+ } -+ - return mListener->OnStartRequest(static_cast - (this), - aContext); -diff --git netwerk/protocol/viewsource/nsViewSourceChannel.h netwerk/protocol/viewsource/nsViewSourceChannel.h -index 002739b361f7..1970c01588e3 100644 ---- netwerk/protocol/viewsource/nsViewSourceChannel.h -+++ netwerk/protocol/viewsource/nsViewSourceChannel.h -@@ -55,9 +55,19 @@ public: - const nsAString &aSrcdoc, - nsILoadInfo* aLoadInfo); - -+ // Updates or sets the result principal URI of the underlying channel's -+ // loadinfo to be prefixed with the "view-source:" schema as: -+ // -+ // mChannel.loadInfo.resultPrincipalURI = "view-source:" + -+ // (mChannel.loadInfo.resultPrincipalURI | mChannel.orignalURI); -+ nsresult UpdateLoadInfoResultPrincipalURI(); -+ - protected: - ~nsViewSourceChannel() {} - -+ // Clones aURI and prefixes it with "view-source:" schema, -+ nsresult BuildViewSourceURI(nsIURI* aURI, nsIURI** aResult); -+ - nsCOMPtr mChannel; - nsCOMPtr mHttpChannel; - nsCOMPtr mHttpChannelInternal; diff --git a/www/waterfox/files/patch-bug1404057 b/www/waterfox/files/patch-bug1404057 deleted file mode 100644 index e82bafd8ba7..00000000000 --- a/www/waterfox/files/patch-bug1404057 +++ /dev/null @@ -1,139 +0,0 @@ -commit 52f5824f49d0 -Author: Manish Goregaokar -Date: Wed Oct 4 20:57:24 2017 -0500 - - Bug 1404057 - stylo: `all` shorthand should not apply to internal properties. r=xidorn, a=ritu - - Source-Repo: https://github.com/servo/servo - Source-Revision: 43686a8738513db728eebcc535b5ac6e1a2f17f7 ---- - servo/components/style/properties/properties.mako.rs | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git servo/components/style/properties/properties.mako.rs servo/components/style/properties/properties.mako.rs -index 13dd6212fe1a..269bf0dbbbb5 100644 ---- servo/components/style/properties/properties.mako.rs -+++ servo/components/style/properties/properties.mako.rs -@@ -217,7 +217,9 @@ pub mod shorthands { - // We don't defined the 'all' shorthand using the regular helpers:shorthand - // mechanism, since it causes some very large types to be generated. - <% data.declare_shorthand("all", -- [p.name for p in data.longhands if p.name not in ['direction', 'unicode-bidi']], -+ [p.name for p in data.longhands -+ if p.name not in ['direction', 'unicode-bidi'] -+ and not p.internal], - spec="https://drafts.csswg.org/css-cascade-3/#all-shorthand") %> - } - -commit ff25959d0893 -Author: Manish Goregaokar -Date: Mon Oct 2 18:53:19 2017 -0700 - - Bug 1404057 - stylo: Add crashtest for text-zoom being reenabled within svg:text. r=xidorn, a=ritu - - MozReview-Commit-ID: 3dIDW8Tz6Mj ---- - layout/style/crashtests/1404057.html | 6 ++++++ - layout/style/crashtests/crashtests.list | 1 + - 2 files changed, 7 insertions(+) - -diff --git layout/style/crashtests/1404057.html layout/style/crashtests/1404057.html -new file mode 100644 -index 000000000000..4c4a33ce495d ---- /dev/null -+++ layout/style/crashtests/1404057.html -@@ -0,0 +1,6 @@ -+ -+ Testcase, bug 143862 -+ -+aaa -+ -+ -\ No newline at end of file -diff --git layout/style/crashtests/crashtests.list layout/style/crashtests/crashtests.list -index 5eaba6935ee2..70e240d14e2f 100644 ---- layout/style/crashtests/crashtests.list -+++ layout/style/crashtests/crashtests.list -@@ -205,3 +205,4 @@ asserts-if(stylo,1) load 1404324-1.html # bug 1405605 - load 1387499.html - load 1391577.html - load 1398581.html -+load 1404057.html -commit c883f59323fd -Author: Manish Goregaokar -Date: Tue Oct 3 08:30:34 2017 -0700 - - Bug 1404057 - stylo: Add reftest for ensuring lang is not reset by the `all` shorthand. r=xidorn, a=ritu - - MozReview-Commit-ID: HgjJDwUM6Ju ---- - layout/reftests/bugs/1404057-noref.html | 12 ++++++++++++ - layout/reftests/bugs/1404057-ref.html | 12 ++++++++++++ - layout/reftests/bugs/1404057.html | 12 ++++++++++++ - layout/reftests/bugs/reftest.list | 2 ++ - 4 files changed, 38 insertions(+) - -diff --git layout/reftests/bugs/1404057-noref.html layout/reftests/bugs/1404057-noref.html -new file mode 100644 -index 000000000000..dc734b6b1f5e ---- /dev/null -+++ layout/reftests/bugs/1404057-noref.html -@@ -0,0 +1,12 @@ -+ -+ -+ -+ -+
-+
-+
-+ -diff --git layout/reftests/bugs/1404057-ref.html layout/reftests/bugs/1404057-ref.html -new file mode 100644 -index 000000000000..3c06958591be ---- /dev/null -+++ layout/reftests/bugs/1404057-ref.html -@@ -0,0 +1,12 @@ -+ -+ -+ -+ -+
-+
-+
-+ -diff --git layout/reftests/bugs/1404057.html layout/reftests/bugs/1404057.html -new file mode 100644 -index 000000000000..3a9e3af26a25 ---- /dev/null -+++ layout/reftests/bugs/1404057.html -@@ -0,0 +1,12 @@ -+ -+ -+ -+ -+
-+
-+
-+ -diff --git layout/reftests/bugs/reftest.list layout/reftests/bugs/reftest.list -index 679672b8c24b..52f8cb915cee 100644 ---- layout/reftests/bugs/reftest.list -+++ layout/reftests/bugs/reftest.list -@@ -2037,3 +2037,5 @@ needs-focus != 1377447-1.html 1377447-2.html - == 1380224-1.html 1380224-1-ref.html - == 1384065.html 1384065-ref.html - == 1384275-1.html 1384275-1-ref.html -+== 1404057.html 1404057-ref.html -+!= 1404057.html 1404057-noref.html diff --git a/www/waterfox/files/patch-bug1404180 b/www/waterfox/files/patch-bug1404180 deleted file mode 100644 index 87ad2b6c538..00000000000 --- a/www/waterfox/files/patch-bug1404180 +++ /dev/null @@ -1,68 +0,0 @@ -commit 5d2f7f4ae8d8 -Author: Cameron McCormack -Date: Mon Oct 2 13:10:18 2017 +0800 - - Bug 1404180 - Don't allow associating form elements by ID to
s across anonymous subtree boundaries. r=smaug, a=ritu - - MozReview-Commit-ID: KRJjrkL4FgZ - - --HG-- - extra : source : 123004932443033cc9490e80d52c827d60079c65 ---- - dom/html/nsGenericHTMLElement.cpp | 4 +++- - layout/style/crashtests/1404180-1.html | 22 ++++++++++++++++++++++ - layout/style/crashtests/crashtests.list | 1 + - 3 files changed, 26 insertions(+), 1 deletion(-) - -diff --git dom/html/nsGenericHTMLElement.cpp dom/html/nsGenericHTMLElement.cpp -index eda85c9eebaf..54041d7bf071 100644 ---- dom/html/nsGenericHTMLElement.cpp -+++ dom/html/nsGenericHTMLElement.cpp -@@ -2319,7 +2319,9 @@ nsGenericHTMLFormElement::UpdateFormOwner(bool aBindToTree, - "element should be equals to the current element " - "associated with the id in @form!"); - -- if (element && element->IsHTMLElement(nsGkAtoms::form)) { -+ if (element && -+ element->IsHTMLElement(nsGkAtoms::form) && -+ nsContentUtils::IsInSameAnonymousTree(this, element)) { - SetForm(static_cast(element), aBindToTree); - } - } -diff --git layout/style/crashtests/1404180-1.html layout/style/crashtests/1404180-1.html -new file mode 100644 -index 000000000000..079d6800f55f ---- /dev/null -+++ layout/style/crashtests/1404180-1.html -@@ -0,0 +1,22 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ to a non- -- mCommonAncestors.Clear(); -- nsContentUtils::GetAncestors(p->GetParentNode(), mCommonAncestors); - mDisableContextSerialize = false; -- rv = SerializeRangeContextEnd(mCommonAncestors, output); -+ rv = SerializeRangeContextEnd(output); - NS_ENSURE_SUCCESS(rv, rv); - prevNode = nullptr; - } -@@ -1134,10 +1132,8 @@ nsDocumentEncoder::EncodeToStringWithMaxLength(uint32_t aMaxLength, - nsCOMPtr p = do_QueryInterface(prevNode); - rv = SerializeNodeEnd(p, output); - NS_ENSURE_SUCCESS(rv, rv); -- mCommonAncestors.Clear(); -- nsContentUtils::GetAncestors(p->GetParentNode(), mCommonAncestors); - mDisableContextSerialize = false; -- rv = SerializeRangeContextEnd(mCommonAncestors, output); -+ rv = SerializeRangeContextEnd(output); - NS_ENSURE_SUCCESS(rv, rv); - } - -@@ -1196,6 +1192,10 @@ nsDocumentEncoder::EncodeToStringWithMaxLength(uint32_t aMaxLength, - NS_IMETHODIMP - nsDocumentEncoder::EncodeToStream(nsIOutputStream* aStream) - { -+ MOZ_ASSERT(mRangeContexts.IsEmpty(), "Re-entrant call to nsDocumentEncoder."); -+ auto rangeContextGuard = MakeScopeExit([&] { -+ mRangeContexts.Clear(); -+ }); - nsresult rv = NS_OK; - - if (!mDocument) -diff --git dom/base/nsPlainTextSerializer.cpp dom/base/nsPlainTextSerializer.cpp -index 189469f73bb6..d7ddb0274be5 100644 ---- dom/base/nsPlainTextSerializer.cpp -+++ dom/base/nsPlainTextSerializer.cpp -@@ -388,6 +388,7 @@ nsPlainTextSerializer::ScanElementForPreformat(Element* aElement) - NS_IMETHODIMP - nsPlainTextSerializer::ForgetElementForPreformat(Element* aElement) - { -+ MOZ_RELEASE_ASSERT(!mPreformatStack.empty(), "Tried to pop without previous push."); - mPreformatStack.pop(); - return NS_OK; - } diff --git a/www/waterfox/files/patch-bug1410134 b/www/waterfox/files/patch-bug1410134 deleted file mode 100644 index 7a30e8a20fe..00000000000 --- a/www/waterfox/files/patch-bug1410134 +++ /dev/null @@ -1,52 +0,0 @@ -commit 2d5001acfa08 -Author: Tim Huang -Date: Tue Nov 28 14:56:55 2017 -0500 - - Bug 1410134 - Fix the remove-while-iterating for RemoveCookiesWithOriginAttributes. r=jdm, a=gchang - - MozReview-Commit-ID: u56N4084lL - - --HG-- - extra : source : ffab26e34d92c1fc2e5103d2bad3625e180963bb ---- - netwerk/cookie/nsCookieService.cpp | 24 ++++++++++-------------- - 1 file changed, 10 insertions(+), 14 deletions(-) - -diff --git netwerk/cookie/nsCookieService.cpp netwerk/cookie/nsCookieService.cpp -index 7d939da101e2..0692b7088751 100644 ---- netwerk/cookie/nsCookieService.cpp -+++ netwerk/cookie/nsCookieService.cpp -@@ -4899,23 +4899,19 @@ nsCookieService::RemoveCookiesWithOriginAttributes( - } - - // Pattern matches. Delete all cookies within this nsCookieEntry. -- const nsCookieEntry::ArrayType& cookies = entry->GetCookies(); -+ uint32_t cookiesCount = entry->GetCookies().Length(); - -- while (!cookies.IsEmpty()) { -- nsCookie *cookie = cookies.LastElement(); -- -- nsAutoCString host; -- cookie->GetHost(host); -- -- nsAutoCString name; -- cookie->GetName(name); -- -- nsAutoCString path; -- cookie->GetPath(path); -+ for (nsCookieEntry::IndexType i = 0 ; i < cookiesCount; ++i) { -+ // Remove the first cookie from the list. -+ nsListIter iter(entry, 0); -+ RefPtr cookie = iter.Cookie(); - - // Remove the cookie. -- nsresult rv = Remove(host, entry->mOriginAttributes, name, path, false); -- NS_ENSURE_SUCCESS(rv, rv); -+ RemoveCookieFromList(iter); -+ -+ if (cookie) { -+ NotifyChanged(cookie, u"deleted"); -+ } - } - } - DebugOnly rv = transaction.Commit(); diff --git a/www/waterfox/files/patch-bug1410146 b/www/waterfox/files/patch-bug1410146 deleted file mode 100644 index 258525f9bc9..00000000000 --- a/www/waterfox/files/patch-bug1410146 +++ /dev/null @@ -1,27 +0,0 @@ -commit a8fff8ff6df2 -Author: Dragana Damjanovic dd.mozilla@gmail.com -Date: Tue Oct 24 14:23:00 2017 -0400 - - Bug 1410146 - Fix UnknownDecoder. r=mayhemer, a=ritu - - --HG-- - extra : source : 8e55fa4da0cb3213d24aca8326792f6346594ed6 ---- - netwerk/streamconv/converters/nsUnknownDecoder.cpp | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git netwerk/streamconv/converters/nsUnknownDecoder.cpp netwerk/streamconv/converters/nsUnknownDecoder.cpp -index f3249942580c..ea69d4eb63a3 100644 ---- netwerk/streamconv/converters/nsUnknownDecoder.cpp -+++ netwerk/streamconv/converters/nsUnknownDecoder.cpp -@@ -75,6 +75,10 @@ nsUnknownDecoder::ConvertedStreamListener:: - { - uint32_t read; - nsAutoCString decodedData; -+ { -+ MutexAutoLock lock(mDecoder->mMutex); -+ decodedData = mDecoder->mDecodedData; -+ } - nsresult rv = stream->ReadSegments(AppendDataToString, &decodedData, count, - &read); - if (NS_FAILED(rv)) { diff --git a/www/waterfox/files/patch-bug1410420 b/www/waterfox/files/patch-bug1410420 deleted file mode 100644 index 0d7ea1d8914..00000000000 --- a/www/waterfox/files/patch-bug1410420 +++ /dev/null @@ -1,140 +0,0 @@ -commit 7bc1ff4cdf6e -Author: Jan Varga -Date: Mon Oct 30 07:13:40 2017 +0100 - - Bug 1410420 - Clear database actor's strong reference to IDBDatabase when opening of a database fails. r=asuth, a=ritu - - --HG-- - extra : source : d7a53e1454addc0d6bdda84e6c5125c88a14d5cc ---- - dom/indexedDB/ActorsChild.cpp | 25 +++++++++++++++++++++++++ - dom/indexedDB/ActorsChild.h | 17 +++++++++++++++++ - 2 files changed, 42 insertions(+) - -diff --git dom/indexedDB/ActorsChild.cpp dom/indexedDB/ActorsChild.cpp -index a720e9520e6e..0074956761e0 100644 ---- dom/indexedDB/ActorsChild.cpp -+++ dom/indexedDB/ActorsChild.cpp -@@ -1755,6 +1755,7 @@ BackgroundFactoryRequestChild::BackgroundFactoryRequestChild( - uint64_t aRequestedVersion) - : BackgroundRequestChildBase(aOpenRequest) - , mFactory(aFactory) -+ , mDatabaseActor(nullptr) - , mRequestedVersion(aRequestedVersion) - , mIsDeleteOp(aIsDeleteOp) - { -@@ -1779,6 +1780,15 @@ BackgroundFactoryRequestChild::GetOpenDBRequest() const - return static_cast(mRequest.get()); - } - -+void -+BackgroundFactoryRequestChild::SetDatabaseActor(BackgroundDatabaseChild* aActor) -+{ -+ AssertIsOnOwningThread(); -+ MOZ_ASSERT(!aActor || !mDatabaseActor); -+ -+ mDatabaseActor = aActor; -+} -+ - bool - BackgroundFactoryRequestChild::HandleResponse(nsresult aResponse) - { -@@ -1790,6 +1800,11 @@ BackgroundFactoryRequestChild::HandleResponse(nsresult aResponse) - - DispatchErrorEvent(mRequest, aResponse); - -+ if (mDatabaseActor) { -+ mDatabaseActor->ReleaseDOMObject(); -+ MOZ_ASSERT(!mDatabaseActor); -+ } -+ - return true; - } - -@@ -1808,6 +1823,7 @@ BackgroundFactoryRequestChild::HandleResponse( - IDBDatabase* database = databaseActor->GetDOMObject(); - if (!database) { - databaseActor->EnsureDOMObject(); -+ MOZ_ASSERT(mDatabaseActor); - - database = databaseActor->GetDOMObject(); - MOZ_ASSERT(database); -@@ -1815,6 +1831,8 @@ BackgroundFactoryRequestChild::HandleResponse( - MOZ_ASSERT(!database->IsClosed()); - } - -+ MOZ_ASSERT(mDatabaseActor == databaseActor); -+ - if (database->IsClosed()) { - // If the database was closed already, which is only possible if we fired an - // "upgradeneeded" event, then we shouldn't fire a "success" event here. -@@ -1827,6 +1845,7 @@ BackgroundFactoryRequestChild::HandleResponse( - } - - databaseActor->ReleaseDOMObject(); -+ MOZ_ASSERT(!mDatabaseActor); - - return true; - } -@@ -1847,6 +1866,8 @@ BackgroundFactoryRequestChild::HandleResponse( - - DispatchSuccessEvent(&helper, successEvent); - -+ MOZ_ASSERT(!mDatabaseActor); -+ - return true; - } - -@@ -2095,6 +2116,8 @@ BackgroundDatabaseChild::EnsureDOMObject() - - mDatabase = mTemporaryStrongDatabase; - mSpec.forget(); -+ -+ mOpenRequestActor->SetDatabaseActor(this); - } - - void -@@ -2106,6 +2129,8 @@ BackgroundDatabaseChild::ReleaseDOMObject() - MOZ_ASSERT(mOpenRequestActor); - MOZ_ASSERT(mDatabase == mTemporaryStrongDatabase); - -+ mOpenRequestActor->SetDatabaseActor(nullptr); -+ - mOpenRequestActor = nullptr; - - // This may be the final reference to the IDBDatabase object so we may end up -diff --git dom/indexedDB/ActorsChild.h dom/indexedDB/ActorsChild.h -index 866a405fb4e2..d82a188b8253 100644 ---- dom/indexedDB/ActorsChild.h -+++ dom/indexedDB/ActorsChild.h -@@ -253,6 +253,20 @@ class BackgroundFactoryRequestChild final - friend class PermissionRequestParent; - - RefPtr mFactory; -+ -+ // Normally when opening of a database is successful, we receive a database -+ // actor in request response, so we can use it to call ReleaseDOMObject() -+ // which clears temporary strong reference to IDBDatabase. -+ // However, when there's an error, we don't receive a database actor and -+ // IDBRequest::mTransaction is already cleared (must be). So the only way how -+ // to call ReleaseDOMObject() is to have a back-reference to database actor. -+ // This creates a weak ref cycle between -+ // BackgroundFactoryRequestChild (using mDatabaseActor member) and -+ // BackgroundDatabaseChild actor (using mOpenRequestActor member). -+ // mDatabaseActor is set in EnsureDOMObject() and cleared in -+ // ReleaseDOMObject(). -+ BackgroundDatabaseChild* mDatabaseActor; -+ - const uint64_t mRequestedVersion; - const bool mIsDeleteOp; - -@@ -270,6 +284,9 @@ private: - // Only destroyed by BackgroundFactoryChild. - ~BackgroundFactoryRequestChild(); - -+ void -+ SetDatabaseActor(BackgroundDatabaseChild* aActor); -+ - bool - HandleResponse(nsresult aResponse); - diff --git a/www/waterfox/files/patch-bug1410457 b/www/waterfox/files/patch-bug1410457 deleted file mode 100644 index a9d6511bfc0..00000000000 --- a/www/waterfox/files/patch-bug1410457 +++ /dev/null @@ -1,117 +0,0 @@ -commit 1b99cb80da51 -Author: Marco Bonardo -Date: Fri Oct 20 17:14:17 2017 +0200 - - Bug 1410457 - Places.sqlite may be marked as corrupt if schema migration mixes up sync and async execution. r=Paolo, a=ritu - - MozReview-Commit-ID: 7O18MLdHU08 - - --HG-- - extra : source : c7cab42203dfce68c8c4cd152055a22b4fdbc402 - extra : histedit_source : dbec7034f68805d1597e4577534de934be04af59 ---- - toolkit/components/places/Database.cpp | 45 +++++++++++++++++++++++++++++----- - toolkit/components/places/Database.h | 3 +++ - 2 files changed, 42 insertions(+), 6 deletions(-) - -diff --git toolkit/components/places/Database.cpp toolkit/components/places/Database.cpp -index 85e365ff3d9e..3ff9e0fa2078 100644 ---- toolkit/components/places/Database.cpp -+++ toolkit/components/places/Database.cpp -@@ -370,6 +370,7 @@ Database::Database() - , mDBPageSize(0) - , mDatabaseStatus(nsINavHistoryService::DATABASE_STATUS_OK) - , mClosed(false) -+ , mShouldConvertIconPayloads(false) - , mClientsShutdown(new ClientsShutdownBlocker()) - , mConnectionShutdown(new ConnectionShutdownBlocker(this)) - , mMaxUrlLength(0) -@@ -588,13 +589,31 @@ Database::EnsureConnection() - bool databaseMigrated = false; - rv = SetupDatabaseConnection(storage); - if (NS_SUCCEEDED(rv)) { -- // Failing to initialize the schema always indicates a corruption. -- if (NS_FAILED(InitSchema(&databaseMigrated))) { -- rv = NS_ERROR_FILE_CORRUPTED; -+ // Failing to initialize the schema may indicate a corruption. -+ rv = InitSchema(&databaseMigrated); -+ if (NS_FAILED(rv)) { -+ if (rv == NS_ERROR_STORAGE_BUSY || -+ rv == NS_ERROR_FILE_IS_LOCKED || -+ rv == NS_ERROR_FILE_NO_DEVICE_SPACE || -+ rv == NS_ERROR_OUT_OF_MEMORY) { -+ // The database is not corrupt, though some migration step failed. -+ // This may be caused by concurrent use of sync and async Storage APIs -+ // or by a system issue. -+ // The best we can do is trying again. If it should still fail, Places -+ // won't work properly and will be handled as LOCKED. -+ rv = InitSchema(&databaseMigrated); -+ if (NS_FAILED(rv)) { -+ rv = NS_ERROR_FILE_IS_LOCKED; -+ } -+ } else { -+ rv = NS_ERROR_FILE_CORRUPTED; -+ } - } - } - if (NS_WARN_IF(NS_FAILED(rv))) { -- mDatabaseStatus = nsINavHistoryService::DATABASE_STATUS_CORRUPT; -+ if (rv != NS_ERROR_FILE_IS_LOCKED) { -+ mDatabaseStatus = nsINavHistoryService::DATABASE_STATUS_CORRUPT; -+ } - // Some errors may not indicate a database corruption, for those cases we - // just bail out without throwing away a possibly valid places.sqlite. - if (rv == NS_ERROR_FILE_CORRUPTED) { -@@ -961,6 +980,14 @@ Database::InitSchema(bool* aDatabaseMigrated) - return NS_ERROR_FILE_CORRUPTED; - } - -+ auto guard = MakeScopeExit([&]() { -+ // This runs at the end of the migration, regardless of its success. -+ if (mShouldConvertIconPayloads) { -+ mShouldConvertIconPayloads = false; -+ nsFaviconService::ConvertUnsupportedPayloads(mMainConn); -+ } -+ }); -+ - // Firefox 4 uses schema version 11. - - // Firefox 8 uses schema version 12. -@@ -1122,6 +1149,11 @@ Database::InitSchema(bool* aDatabaseMigrated) - // Firefox 57 uses schema version 39. - - // Schema Upgrades must add migration code here. -+ // >>> IMPORTANT! <<< -+ // NEVER MIX UP SYNC AND ASYNC EXECUTION IN MIGRATORS, YOU MAY LOCK THE -+ // CONNECTION AND CAUSE FURTHER STEPS TO FAIL. -+ // In case, set a bool and do the async work in the ScopeExit guard just -+ // before the migration steps. - - rv = UpdateBookmarkRootTitles(); - // We don't want a broken localization to cause us to think -@@ -2304,8 +2336,9 @@ Database::MigrateV37Up() { - )); - NS_ENSURE_SUCCESS(rv, rv); - -- // Start the async conversion -- nsFaviconService::ConvertUnsupportedPayloads(mMainConn); -+ // The async favicons conversion will happen at the end of the normal schema -+ // migration. -+ mShouldConvertIconPayloads = true; - - return NS_OK; - } -diff --git toolkit/components/places/Database.h toolkit/components/places/Database.h -index 9000fb269dc2..6213678b3e47 100644 ---- toolkit/components/places/Database.h -+++ toolkit/components/places/Database.h -@@ -333,6 +333,9 @@ private: - int32_t mDBPageSize; - uint16_t mDatabaseStatus; - bool mClosed; -+ // Used to track whether icon payloads should be converted at the end of -+ // schema migration. -+ bool mShouldConvertIconPayloads; - - /** - * Phases for shutting down the Database. diff --git a/www/waterfox/files/patch-bug1410634 b/www/waterfox/files/patch-bug1410634 deleted file mode 100644 index 0fdc6cbe00c..00000000000 --- a/www/waterfox/files/patch-bug1410634 +++ /dev/null @@ -1,145 +0,0 @@ -commit a34cf3c8ad18 -Author: Ben Kelly -Date: Tue Oct 24 09:24:53 2017 -0400 - - Bug 1410634 - Part 1: Call channel IsFromCache() during OnStartRequest() to determine if update result came from http cache or network. r=tt, a=ritu - - --HG-- - extra : source : 087e11c956e368c41e91bdc5d689d5e94f3ef7ef ---- - dom/workers/ServiceWorkerScriptCache.cpp | 22 ++++++++++++---------- - 1 file changed, 12 insertions(+), 10 deletions(-) - -diff --git dom/workers/ServiceWorkerScriptCache.cpp dom/workers/ServiceWorkerScriptCache.cpp -index a065a6fafbf8..f30bca95229c 100644 ---- dom/workers/ServiceWorkerScriptCache.cpp -+++ dom/workers/ServiceWorkerScriptCache.cpp -@@ -100,12 +100,13 @@ public: - bool aIsMainScript) - : mManager(aManager) - , mRegistration(aRegistration) -- , mIsMainScript(aIsMainScript) - , mInternalHeaders(new InternalHeaders()) - , mLoadFlags(nsIChannel::LOAD_BYPASS_SERVICE_WORKER) - , mState(WaitingForInitialization) - , mNetworkResult(NS_OK) - , mCacheResult(NS_OK) -+ , mIsMainScript(aIsMainScript) -+ , mIsFromCache(false) - { - MOZ_ASSERT(aManager); - AssertIsOnMainThread(); -@@ -180,8 +181,6 @@ private: - RefPtr mCC; - RefPtr mRegistration; - -- bool mIsMainScript; -- - nsCOMPtr mChannel; - nsString mBuffer; - nsString mURL; -@@ -202,6 +201,9 @@ private: - - nsresult mNetworkResult; - nsresult mCacheResult; -+ -+ const bool mIsMainScript; -+ bool mIsFromCache; - }; - - NS_IMPL_ISUPPORTS(CompareNetwork, nsIStreamLoaderObserver, -@@ -863,6 +865,12 @@ CompareNetwork::OnStartRequest(nsIRequest* aRequest, nsISupports* aContext) - } - - mInternalHeaders->FillResponseHeaders(mChannel); -+ -+ nsCOMPtr cacheChannel(do_QueryInterface(mChannel)); -+ if (cacheChannel) { -+ cacheChannel->IsFromCache(&mIsFromCache); -+ } -+ - return NS_OK; - } - -@@ -959,15 +967,9 @@ CompareNetwork::OnStreamComplete(nsIStreamLoader* aLoader, nsISupports* aContext - NS_LITERAL_CSTRING("Service-Worker-Allowed"), - mMaxScope); - -- bool isFromCache = false; -- nsCOMPtr cacheChannel(do_QueryInterface(httpChannel)); -- if (cacheChannel) { -- cacheChannel->IsFromCache(&isFromCache); -- } -- - // [9.2 Update]4.13, If response's cache state is not "local", - // set registration's last update check time to the current time -- if (!isFromCache) { -+ if (!mIsFromCache) { - mRegistration->RefreshLastUpdateCheckTime(); - } - - -commit 5aebe3f6b13b -Author: Ben Kelly -Date: Tue Oct 24 09:24:53 2017 -0400 - - Bug 1410634 - Part 2: Verify ServiceWorkerInfo.lastUpdateTime is not changed when reading from http cache. r=tt, a=ritu - - --HG-- - extra : source : 1abb70007b4c50a588b6a344879fd9efc3ef9ca5 ---- - .../test/serviceworkers/serviceworkerinfo_iframe.html | 3 ++- - .../test_devtools_track_serviceworker_time.html | 12 ++++++++++++ - 2 files changed, 14 insertions(+), 1 deletion(-) - -diff --git dom/workers/test/serviceworkers/serviceworkerinfo_iframe.html dom/workers/test/serviceworkers/serviceworkerinfo_iframe.html -index a0a2de76030e..16a175836981 100644 ---- dom/workers/test/serviceworkers/serviceworkerinfo_iframe.html -+++ dom/workers/test/serviceworkers/serviceworkerinfo_iframe.html -@@ -7,7 +7,8 @@ - if (event.data !== "register") { - return; - } -- var promise = navigator.serviceWorker.register("worker.js"); -+ var promise = navigator.serviceWorker.register("worker.js", -+ { updateViaCache: 'all' }); - window.onmessage = function (event) { - if (event.data !== "unregister") { - return; -diff --git dom/workers/test/serviceworkers/test_devtools_track_serviceworker_time.html dom/workers/test/serviceworkers/test_devtools_track_serviceworker_time.html -index 4b58d659f565..6b95d6b34fe1 100644 ---- dom/workers/test/serviceworkers/test_devtools_track_serviceworker_time.html -+++ dom/workers/test/serviceworkers/test_devtools_track_serviceworker_time.html -@@ -53,6 +53,8 @@ let expectedResults = [ - state: State.ACTIVATED, installedTimeRecorded: true, - activatedTimeRecorded: true, redundantTimeRecorded: false - }, -+ -+ // On unregister - { - state: State.REDUNDANT, installedTimeRecorded: true, - activatedTimeRecorded: true, redundantTimeRecorded: true -@@ -170,6 +172,15 @@ function testServiceWorkerInfo() { - return promise; - } - -+async function testHttpCacheUpdateTime() { -+ let iframe = document.querySelector("iframe"); -+ let reg = await iframe.contentWindow.navigator.serviceWorker.getRegistration(); -+ let lastUpdateTime = registrationInfo.lastUpdateTime; -+ await reg.update(); -+ is(lastUpdateTime, registrationInfo.lastUpdateTime, -+ "The update time should not change when SW script is read from http cache."); -+} -+ - function unregister() { - info("Unregister the ServiceWorker"); - -@@ -196,6 +207,7 @@ function runTest() { - return Promise.resolve() - .then(register) - .then(testServiceWorkerInfo) -+ .then(testHttpCacheUpdateTime) - .then(unregister) - .catch(aError => ok(false, "Some test failed with error " + aError)) - .then(cleanAll) diff --git a/www/waterfox/files/patch-bug1410808 b/www/waterfox/files/patch-bug1410808 deleted file mode 100644 index 885dd10db62..00000000000 --- a/www/waterfox/files/patch-bug1410808 +++ /dev/null @@ -1,27 +0,0 @@ -commit 17ccad87f85c -Author: Emilio Cobos Álvarez -Date: Mon Oct 23 17:17:13 2017 +0200 - - Bug 1410808. r=xidorn, a=ritu - - MozReview-Commit-ID: 5uufVVEIw20 - - --HG-- - extra : source : d44c182148c233556f38d1c6dc61ab6098f44e85 ---- - layout/style/ServoKeyframeRule.cpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git layout/style/ServoKeyframeRule.cpp layout/style/ServoKeyframeRule.cpp -index 4fe9f6440211..1be82c3100c5 100644 ---- layout/style/ServoKeyframeRule.cpp -+++ layout/style/ServoKeyframeRule.cpp -@@ -31,7 +31,7 @@ public: - - NS_IMETHOD GetParentRule(nsIDOMCSSRule** aParent) final - { -- *aParent = mRule; -+ NS_IF_ADDREF(*aParent = mRule); - return NS_OK; - } - diff --git a/www/waterfox/files/patch-bug1411415 b/www/waterfox/files/patch-bug1411415 deleted file mode 100644 index b988d95e11b..00000000000 --- a/www/waterfox/files/patch-bug1411415 +++ /dev/null @@ -1,383 +0,0 @@ -commit 627eb6ae9a72 -Author: Kannan Vijayan -Date: Mon Mar 5 19:27:02 2018 -0500 - - Bug 1411415 - r=bz r=fitzgen ---- - dom/bindings/BindingUtils.cpp | 20 +++++------ - dom/bindings/ErrorResult.h | 2 +- - dom/xslt/xpath/txXPCOMExtensionFunction.cpp | 2 +- - js/public/Value.h | 55 ++++++++++++++++++++++++++--- - js/rust/build.rs | 1 + - js/src/jit/BaselineFrameInfo.h | 4 +-- - js/src/jit/CacheIRCompiler.cpp | 2 +- - js/src/jit/RegisterSets.h | 8 ++--- - js/src/jit/RematerializedFrame.cpp | 14 ++++++-- - js/src/wasm/AsmJS.cpp | 10 +++--- - js/xpconnect/src/XPCWrappedNative.cpp | 7 ++-- - layout/style/ServoBindings.toml | 6 ++-- - xpcom/reflect/xptcall/xptcall.h | 2 +- - 13 files changed, 97 insertions(+), 36 deletions(-) - -diff --git dom/bindings/BindingUtils.cpp dom/bindings/BindingUtils.cpp -index 93069ac4a8b8..ac8c7a2229f3 100644 ---- dom/bindings/BindingUtils.cpp -+++ dom/bindings/BindingUtils.cpp -@@ -287,8 +287,8 @@ TErrorResult::ThrowJSException(JSContext* cx, JS::Handle::SetPendingJSException(JSContext* cx) - mJSException = exception; - // If JS_WrapValue failed, not much we can do about it... No matter - // what, go ahead and unroot mJSException. -- js::RemoveRawValueRoot(cx, &mJSException); -+ js::RemoveRawValueRoot(cx, &mJSException.asValueRef()); - - mResult = NS_OK; - #ifdef DEBUG -@@ -423,8 +423,8 @@ TErrorResult::ClearUnionData() - if (IsJSException()) { - JSContext* cx = dom::danger::GetJSContext(); - MOZ_ASSERT(cx); -- mJSException.setUndefined(); -- js::RemoveRawValueRoot(cx, &mJSException); -+ mJSException.asValueRef().setUndefined(); -+ js::RemoveRawValueRoot(cx, &mJSException.asValueRef()); - #ifdef DEBUG - mUnionState = HasNothing; - #endif // DEBUG -@@ -467,13 +467,13 @@ TErrorResult::operator=(TErrorResult&& aRHS) - } else if (aRHS.IsJSException()) { - JSContext* cx = dom::danger::GetJSContext(); - MOZ_ASSERT(cx); -- mJSException.setUndefined(); -- if (!js::AddRawValueRoot(cx, &mJSException, "TErrorResult::mJSException")) { -+ mJSException.asValueRef().setUndefined(); -+ if (!js::AddRawValueRoot(cx, &mJSException.asValueRef(), "TErrorResult::mJSException")) { - MOZ_CRASH("Could not root mJSException, we're about to OOM"); - } - mJSException = aRHS.mJSException; -- aRHS.mJSException.setUndefined(); -- js::RemoveRawValueRoot(cx, &aRHS.mJSException); -+ aRHS.mJSException.asValueRef().setUndefined(); -+ js::RemoveRawValueRoot(cx, &aRHS.mJSException.asValueRef()); - } else if (aRHS.IsDOMException()) { - mDOMExceptionInfo = aRHS.mDOMExceptionInfo; - aRHS.mDOMExceptionInfo = nullptr; -@@ -525,7 +525,7 @@ TErrorResult::CloneTo(TErrorResult& aRv) const - aRv.mUnionState = HasJSException; - #endif - JSContext* cx = dom::danger::GetJSContext(); -- JS::Rooted exception(cx, mJSException); -+ JS::Rooted exception(cx, mJSException.asValueRef()); - aRv.ThrowJSException(cx, exception); - } - } -diff --git dom/bindings/ErrorResult.h dom/bindings/ErrorResult.h -index 7b38226691bb..a406a2c490a5 100644 ---- dom/bindings/ErrorResult.h -+++ dom/bindings/ErrorResult.h -@@ -507,7 +507,7 @@ private: - // (and deallocated) by SetPendingDOMException. - union { - Message* mMessage; // valid when IsErrorWithMessage() -- JS::Value mJSException; // valid when IsJSException() -+ JS::UninitializedValue mJSException; // valid when IsJSException() - DOMExceptionInfo* mDOMExceptionInfo; // valid when IsDOMException() - }; - -diff --git dom/xslt/xpath/txXPCOMExtensionFunction.cpp dom/xslt/xpath/txXPCOMExtensionFunction.cpp -index e95baa0bbde8..e1387422c303 100644 ---- dom/xslt/xpath/txXPCOMExtensionFunction.cpp -+++ dom/xslt/xpath/txXPCOMExtensionFunction.cpp -@@ -322,7 +322,7 @@ public: - void trace(JSTracer* trc) { - for (uint8_t i = 0; i < mCount; ++i) { - if (mArray[i].type == nsXPTType::T_JSVAL) { -- JS::UnsafeTraceRoot(trc, &mArray[i].val.j, "txParam value"); -+ JS::UnsafeTraceRoot(trc, &mArray[i].val.j.asValueRef(), "txParam value"); - } - } - } -diff --git js/public/Value.h js/public/Value.h -index b7c4e1b8a770..96a1b703bbc1 100644 ---- js/public/Value.h -+++ js/public/Value.h -@@ -137,12 +137,16 @@ static_assert(sizeof(JSValueShiftedTag) == sizeof(uint64_t), - - #define JSVAL_TYPE_TO_TAG(type) ((JSValueTag)(JSVAL_TAG_CLEAR | (type))) - -+#define JSVAL_RAW64_UNDEFINED (uint64_t(JSVAL_TAG_UNDEFINED) << 32) -+ - #define JSVAL_UPPER_EXCL_TAG_OF_PRIMITIVE_SET JSVAL_TAG_OBJECT - #define JSVAL_UPPER_INCL_TAG_OF_NUMBER_SET JSVAL_TAG_INT32 - #define JSVAL_LOWER_INCL_TAG_OF_GCTHING_SET JSVAL_TAG_STRING - - #elif defined(JS_PUNBOX64) - -+#define JSVAL_RAW64_UNDEFINED (uint64_t(JSVAL_TAG_UNDEFINED) << JSVAL_TAG_SHIFT) -+ - #define JSVAL_PAYLOAD_MASK 0x00007FFFFFFFFFFFLL - #define JSVAL_TAG_MASK 0xFFFF800000000000LL - #define JSVAL_TYPE_TO_TAG(type) ((JSValueTag)(JSVAL_TAG_MAX_DOUBLE | (type))) -@@ -814,7 +818,7 @@ class MOZ_NON_PARAM alignas(8) Value - double asDouble; - void* asPtr; - -- layout() = default; -+ layout() : asBits(JSVAL_RAW64_UNDEFINED) {} - explicit constexpr layout(uint64_t bits) : asBits(bits) {} - explicit constexpr layout(double d) : asDouble(d) {} - } data; -@@ -840,7 +844,7 @@ class MOZ_NON_PARAM alignas(8) Value - size_t asWord; - uintptr_t asUIntPtr; - -- layout() = default; -+ layout() : asBits(JSVAL_RAW64_UNDEFINED) {} - explicit constexpr layout(uint64_t bits) : asBits(bits) {} - explicit constexpr layout(double d) : asDouble(d) {} - } data; -@@ -868,7 +872,7 @@ class MOZ_NON_PARAM alignas(8) Value - double asDouble; - void* asPtr; - -- layout() = default; -+ layout() : asBits(JSVAL_RAW64_UNDEFINED) {} - explicit constexpr layout(uint64_t bits) : asBits(bits) {} - explicit constexpr layout(double d) : asDouble(d) {} - } data; -@@ -892,7 +896,7 @@ class MOZ_NON_PARAM alignas(8) Value - size_t asWord; - uintptr_t asUIntPtr; - -- layout() = default; -+ layout() : asBits(JSVAL_RAW64_UNDEFINED) {} - explicit constexpr layout(uint64_t bits) : asBits(bits) {} - explicit constexpr layout(double d) : asDouble(d) {} - } data; -@@ -945,8 +949,51 @@ class MOZ_NON_PARAM alignas(8) Value - } - } JS_HAZ_GC_POINTER; - -+/** -+ * This is a null-constructible structure that can convert to and from -+ * a Value, allowing UninitializedValue to be stored in unions. -+ */ -+struct MOZ_NON_PARAM alignas(8) UninitializedValue -+{ -+ private: -+ uint64_t bits; -+ -+ public: -+ UninitializedValue() = default; -+ UninitializedValue(const UninitializedValue&) = default; -+ MOZ_IMPLICIT UninitializedValue(const Value& val) : bits(val.asRawBits()) {} -+ -+ inline uint64_t asRawBits() const { -+ return bits; -+ } -+ -+ inline Value& asValueRef() { -+ return *reinterpret_cast(this); -+ } -+ inline const Value& asValueRef() const { -+ return *reinterpret_cast(this); -+ } -+ -+ inline operator Value&() { -+ return asValueRef(); -+ } -+ inline operator Value const&() const { -+ return asValueRef(); -+ } -+ inline operator Value() const { -+ return asValueRef(); -+ } -+ -+ inline void operator=(Value const& other) { -+ asValueRef() = other; -+ } -+}; -+ - static_assert(sizeof(Value) == 8, "Value size must leave three tag bits, be a binary power, and is ubiquitously depended upon everywhere"); - -+static_assert(sizeof(UninitializedValue) == sizeof(Value), "Value and UninitializedValue must be the same size"); -+static_assert(alignof(UninitializedValue) == alignof(Value), "Value and UninitializedValue must have same alignment"); -+ - inline bool - IsOptimizedPlaceholderMagicValue(const Value& v) - { -diff --git js/src/jit/BaselineFrameInfo.h js/src/jit/BaselineFrameInfo.h -index 13bf0358d944..1691270acf17 100644 ---- js/src/jit/BaselineFrameInfo.h -+++ js/src/jit/BaselineFrameInfo.h -@@ -67,7 +67,7 @@ class StackValue - - union { - struct { -- Value v; -+ JS::UninitializedValue v; - } constant; - struct { - mozilla::AlignedStorage2 reg; -@@ -112,7 +112,7 @@ class StackValue - } - Value constant() const { - MOZ_ASSERT(kind_ == Constant); -- return data.constant.v; -+ return data.constant.v.asValueRef(); - } - ValueOperand reg() const { - MOZ_ASSERT(kind_ == Register); -diff --git js/src/jit/CacheIRCompiler.cpp js/src/jit/CacheIRCompiler.cpp -index 98d2dcbf1b23..35357ed7c8da 100644 ---- js/src/jit/CacheIRCompiler.cpp -+++ js/src/jit/CacheIRCompiler.cpp -@@ -925,7 +925,7 @@ CacheIRWriter::copyStubData(uint8_t* dest) const - *reinterpret_cast(destWords) = field.asInt64(); - break; - case StubField::Type::Value: -- InitGCPtr(destWords, field.asInt64()); -+ AsGCPtr(destWords)->init(Value::fromRawBits(uint64_t(field.asInt64()))); - break; - case StubField::Type::Limit: - MOZ_CRASH("Invalid type"); -diff --git js/src/jit/RegisterSets.h js/src/jit/RegisterSets.h -index b6436a801b1c..749730aac4c6 100644 ---- js/src/jit/RegisterSets.h -+++ js/src/jit/RegisterSets.h -@@ -226,13 +226,13 @@ class ConstantOrRegister - - // Space to hold either a Value or a TypedOrValueRegister. - union U { -- Value constant; -+ JS::UninitializedValue constant; - TypedOrValueRegister reg; - } data; - -- const Value& dataValue() const { -+ Value dataValue() const { - MOZ_ASSERT(constant()); -- return data.constant; -+ return data.constant.asValueRef(); - } - void setDataValue(const Value& value) { - MOZ_ASSERT(constant()); -@@ -268,7 +268,7 @@ class ConstantOrRegister - return constant_; - } - -- const Value& value() const { -+ Value value() const { - return dataValue(); - } - -diff --git js/src/jit/RematerializedFrame.cpp js/src/jit/RematerializedFrame.cpp -index f12475e5ee55..8cfb0c0d0b87 100644 ---- js/src/jit/RematerializedFrame.cpp -+++ js/src/jit/RematerializedFrame.cpp -@@ -60,9 +60,17 @@ RematerializedFrame::New(JSContext* cx, uint8_t* top, InlineFrameIterator& iter, - { - unsigned numFormals = iter.isFunctionFrame() ? iter.calleeTemplate()->nargs() : 0; - unsigned argSlots = Max(numFormals, iter.numActualArgs()); -- size_t numBytes = sizeof(RematerializedFrame) + -- (argSlots + iter.script()->nfixed()) * sizeof(Value) - -- sizeof(Value); // 1 Value included in sizeof(RematerializedFrame) -+ unsigned extraSlots = argSlots + iter.script()->nfixed(); -+ -+ // One Value slot is included in sizeof(RematerializedFrame), so we can -+ // reduce the extra slot count by one. However, if there are zero slot -+ // allocations total, then reducing the slots by one will lead to -+ // the memory allocation being smaller than sizeof(RematerializedFrame). -+ if (extraSlots > 0) -+ extraSlots -= 1; -+ -+ size_t numBytes = sizeof(RematerializedFrame) + (extraSlots * sizeof(Value)); -+ MOZ_ASSERT(numBytes >= sizeof(RematerializedFrame)); - - void* buf = cx->pod_calloc(numBytes); - if (!buf) -diff --git js/src/wasm/AsmJS.cpp js/src/wasm/AsmJS.cpp -index a5102bd66373..9fe705976ea3 100644 ---- js/src/wasm/AsmJS.cpp -+++ js/src/wasm/AsmJS.cpp -@@ -851,7 +851,7 @@ class NumLit - private: - Which which_; - union { -- Value scalar_; -+ JS::UninitializedValue scalar_; - SimdConstant simd_; - } u; - -@@ -874,7 +874,7 @@ class NumLit - - int32_t toInt32() const { - MOZ_ASSERT(which_ == Fixnum || which_ == NegativeInt || which_ == BigUnsigned); -- return u.scalar_.toInt32(); -+ return u.scalar_.asValueRef().toInt32(); - } - - uint32_t toUint32() const { -@@ -883,17 +883,17 @@ class NumLit - - double toDouble() const { - MOZ_ASSERT(which_ == Double); -- return u.scalar_.toDouble(); -+ return u.scalar_.asValueRef().toDouble(); - } - - float toFloat() const { - MOZ_ASSERT(which_ == Float); -- return float(u.scalar_.toDouble()); -+ return float(u.scalar_.asValueRef().toDouble()); - } - - Value scalarValue() const { - MOZ_ASSERT(which_ != OutOfRangeInt); -- return u.scalar_; -+ return u.scalar_.asValueRef(); - } - - bool isSimd() const -diff --git js/xpconnect/src/XPCWrappedNative.cpp js/xpconnect/src/XPCWrappedNative.cpp -index fd992eb22465..946d671ddd00 100644 ---- js/xpconnect/src/XPCWrappedNative.cpp -+++ js/xpconnect/src/XPCWrappedNative.cpp -@@ -1723,9 +1723,12 @@ CallMethodHelper::ConvertIndependentParam(uint8_t i) - // indirectly, regardless of in/out-ness. - if (type_tag == nsXPTType::T_JSVAL) { - // Root the value. -- dp->val.j.setUndefined(); -- if (!js::AddRawValueRoot(mCallContext, &dp->val.j, "XPCWrappedNative::CallMethod param")) -+ dp->val.j.asValueRef().setUndefined(); -+ if (!js::AddRawValueRoot(mCallContext, &dp->val.j.asValueRef(), -+ "XPCWrappedNative::CallMethod param")) -+ { - return false; -+ } - } - - // Flag cleanup for anything that isn't self-contained. -diff --git xpcom/reflect/xptcall/xptcall.h xpcom/reflect/xptcall/xptcall.h -index ddab2e4af127..4b387e8ee9c1 100644 ---- xpcom/reflect/xptcall/xptcall.h -+++ xpcom/reflect/xptcall/xptcall.h -@@ -39,7 +39,7 @@ struct nsXPTCMiniVariant - // Types below here are unknown to the assembly implementations, and - // therefore _must_ be passed with indirect semantics. We put them in - // the union here for type safety, so that we can avoid void* tricks. -- JS::Value j; -+ JS::UninitializedValue j; - } val; - }; - diff --git a/www/waterfox/files/patch-bug1411745 b/www/waterfox/files/patch-bug1411745 deleted file mode 100644 index f5f25d894da..00000000000 --- a/www/waterfox/files/patch-bug1411745 +++ /dev/null @@ -1,26 +0,0 @@ -commit 4bd747285cad -Author: Magnus Melin -Date: Sat Dec 9 16:43:16 2017 +0200 - - Bug 1411745 - crash for svg linking to mailbox URI. r=smaug a=gchang - - --HG-- - extra : source : 2a01f65ec8af02827f0621f86e501ad236431415 ---- - dom/base/nsDocument.cpp | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git dom/base/nsDocument.cpp dom/base/nsDocument.cpp -index fe44e902241f..ce511f50e9de 100644 ---- dom/base/nsDocument.cpp -+++ dom/base/nsDocument.cpp -@@ -1233,7 +1233,8 @@ nsExternalResourceMap::PendingLoad::OnDataAvailable(nsIRequest* aRequest, - uint64_t aOffset, - uint32_t aCount) - { -- NS_PRECONDITION(mTargetListener, "Shouldn't be getting called!"); -+ // mTargetListener might be null if SetupViewer or AddExternalResource failed. -+ NS_ENSURE_TRUE(mTargetListener, NS_ERROR_FAILURE); - if (mDisplayDocument->ExternalResourceMap().HaveShutDown()) { - return NS_BINDING_ABORTED; - } diff --git a/www/waterfox/files/patch-bug1412011 b/www/waterfox/files/patch-bug1412011 deleted file mode 100644 index 88937770f57..00000000000 --- a/www/waterfox/files/patch-bug1412011 +++ /dev/null @@ -1,100 +0,0 @@ -commit 4112ea0d8cb1 -Author: Emilio Cobos Álvarez -Date: Mon Oct 30 11:02:16 2017 -0400 - - Bug 1412011 - selectors: Be consistent about how we get a parent element for selector matching. r=xidorn, a=ritu - - Source-Repo: https://github.com/servo/servo - Source-Revision: de7595f16fa41c32ca5654aef53c60ad19bb108a - - --HG-- - extra : rebase_source : fc932c8d05ec1861ee16d7a89bfe1da1228d1c08 ---- - servo/components/selectors/matching.rs | 49 +++++++++++++++++++++++----------- - 1 file changed, 33 insertions(+), 16 deletions(-) - -diff --git servo/components/selectors/matching.rs servo/components/selectors/matching.rs -index c6c2db3c4719..30586b27f457 100644 ---- servo/components/selectors/matching.rs -+++ servo/components/selectors/matching.rs -@@ -515,6 +515,32 @@ pub fn matches_complex_selector(mut iter: SelectorIter, - } - } - -+#[inline(always)] -+fn next_element_for_combinator( -+ element: &E, -+ combinator: Combinator, -+) -> Option -+where -+ E: Element, -+{ -+ match combinator { -+ Combinator::NextSibling | -+ Combinator::LaterSibling => { -+ element.prev_sibling_element() -+ } -+ Combinator::Child | -+ Combinator::Descendant => { -+ if element.blocks_ancestor_combinators() { -+ return None; -+ } -+ element.parent_element() -+ } -+ Combinator::PseudoElement => { -+ element.pseudo_element_originating_element() -+ } -+ } -+} -+ - fn matches_complex_selector_internal(mut selector_iter: SelectorIter, - element: &E, - context: &mut LocalMatchingContext, -@@ -546,28 +572,23 @@ fn matches_complex_selector_internal(mut selector_iter: SelectorIter SelectorMatchingResult::Matched, - Some(c) => { -- let (mut next_element, candidate_not_found) = match c { -+ let candidate_not_found= match c { - Combinator::NextSibling | Combinator::LaterSibling => { - // Only ancestor combinators are allowed while looking for - // relevant links, so switch to not looking. - *relevant_link = RelevantLinkStatus::NotLooking; -- (element.prev_sibling_element(), -- SelectorMatchingResult::NotMatchedAndRestartFromClosestDescendant) -+ SelectorMatchingResult::NotMatchedAndRestartFromClosestDescendant - } - Combinator::Child | Combinator::Descendant => { -- if element.blocks_ancestor_combinators() { -- (None, SelectorMatchingResult::NotMatchedGlobally) -- } else { -- (element.parent_element(), -- SelectorMatchingResult::NotMatchedGlobally) -- } -+ SelectorMatchingResult::NotMatchedGlobally - } - Combinator::PseudoElement => { -- (element.pseudo_element_originating_element(), -- SelectorMatchingResult::NotMatchedGlobally) -+ SelectorMatchingResult::NotMatchedGlobally - } - }; - -+ let mut next_element = next_element_for_combinator(element, c); -+ - loop { - let element = match next_element { - None => return candidate_not_found, -@@ -607,11 +628,7 @@ fn matches_complex_selector_internal(mut selector_iter: SelectorIter {}, - } -- next_element = if siblings { -- element.prev_sibling_element() -- } else { -- element.parent_element() -- }; -+ next_element = next_element_for_combinator(&element, c); - } - } - } diff --git a/www/waterfox/files/patch-bug1412145 b/www/waterfox/files/patch-bug1412145 deleted file mode 100644 index 595ba7297dc..00000000000 --- a/www/waterfox/files/patch-bug1412145 +++ /dev/null @@ -1,286 +0,0 @@ -commit d83a24ce6fb3 -Author: Xidorn Quan -Date: Tue Nov 28 17:06:51 2017 -0600 - - Bug 1412145 - Drop more backpointers of CSSOM objects in dtor and unlink. r=bz, a=gchang - - MozReview-Commit-ID: Ftg3WMBBNlO ---- - layout/style/GroupRule.cpp | 7 +++++++ - layout/style/GroupRule.h | 1 + - layout/style/MediaList.h | 4 +++- - layout/style/ServoCSSRuleList.cpp | 2 ++ - layout/style/ServoKeyframeRule.cpp | 12 ++++++++++-- - layout/style/ServoKeyframesRule.cpp | 23 ++++++++++++++++------- - layout/style/ServoMediaRule.cpp | 17 +++++++++++++++-- - layout/style/ServoPageRule.cpp | 2 ++ - layout/style/ServoStyleRule.cpp | 1 + - layout/style/nsCSSRules.cpp | 31 +++++++++++++++++++++++++++---- - 10 files changed, 84 insertions(+), 16 deletions(-) - -diff --git layout/style/GroupRule.cpp layout/style/GroupRule.cpp -index 28739e1818eb..32bd8c83e43a 100644 ---- layout/style/GroupRule.cpp -+++ layout/style/GroupRule.cpp -@@ -198,6 +198,13 @@ GeckoGroupRuleRules::SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const - // ServoGroupRuleRules - // - -+ServoGroupRuleRules::~ServoGroupRuleRules() -+{ -+ if (mRuleList) { -+ mRuleList->DropReference(); -+ } -+} -+ - #ifdef DEBUG - void - ServoGroupRuleRules::List(FILE* out, int32_t aIndent) const -diff --git layout/style/GroupRule.h layout/style/GroupRule.h -index ac9e26921f0b..5c336e5c3611 100644 ---- layout/style/GroupRule.h -+++ layout/style/GroupRule.h -@@ -87,6 +87,7 @@ struct ServoGroupRuleRules - // Do we ever clone Servo rules? - MOZ_ASSERT_UNREACHABLE("stylo: Cloning GroupRule not implemented"); - } -+ ~ServoGroupRuleRules(); - - void SetParentRule(GroupRule* aParentRule) { - if (mRuleList) { -diff --git layout/style/MediaList.h layout/style/MediaList.h -index 4e8c12a2461a..b95e6ec26895 100644 ---- layout/style/MediaList.h -+++ layout/style/MediaList.h -@@ -84,7 +84,9 @@ protected: - virtual nsresult Delete(const nsAString& aOldMedium) = 0; - virtual nsresult Append(const nsAString& aNewMedium) = 0; - -- virtual ~MediaList() {} -+ virtual ~MediaList() { -+ MOZ_ASSERT(!mStyleSheet, "Backpointer should have been cleared"); -+ } - - // not refcounted; sheet will let us know when it goes away - // mStyleSheet is the sheet that needs to be dirtied when this -diff --git layout/style/ServoCSSRuleList.cpp layout/style/ServoCSSRuleList.cpp -index 37ce9be9f337..31f481899964 100644 ---- layout/style/ServoCSSRuleList.cpp -+++ layout/style/ServoCSSRuleList.cpp -@@ -234,6 +234,8 @@ ServoCSSRuleList::GetDOMCSSRuleType(uint32_t aIndex) const - - ServoCSSRuleList::~ServoCSSRuleList() - { -+ MOZ_ASSERT(!mStyleSheet, "Backpointer should have been cleared"); -+ MOZ_ASSERT(!mParentRule, "Backpointer should have been cleared"); - DropAllRules(); - } - -diff --git layout/style/ServoKeyframeRule.cpp layout/style/ServoKeyframeRule.cpp -index 1be82c3100c5..6ca8a1815f8c 100644 ---- layout/style/ServoKeyframeRule.cpp -+++ layout/style/ServoKeyframeRule.cpp -@@ -35,7 +35,10 @@ public: - return NS_OK; - } - -- void DropReference() { mRule = nullptr; } -+ void DropReference() { -+ mRule = nullptr; -+ mDecls->SetOwningRule(nullptr); -+ } - - DeclarationBlock* GetCSSDeclaration(Operation aOperation) final - { -@@ -81,7 +84,9 @@ public: - } - - private: -- virtual ~ServoKeyframeDeclaration() {} -+ virtual ~ServoKeyframeDeclaration() { -+ MOZ_ASSERT(!mRule, "Backpointer should have been cleared"); -+ } - - ServoKeyframeRule* mRule; - RefPtr mDecls; -@@ -102,6 +107,9 @@ NS_INTERFACE_MAP_END_INHERITING(nsDOMCSSDeclaration) - - ServoKeyframeRule::~ServoKeyframeRule() - { -+ if (mDeclaration) { -+ mDeclaration->DropReference(); -+ } - } - - NS_IMPL_ADDREF_INHERITED(ServoKeyframeRule, dom::CSSKeyframeRule) -diff --git layout/style/ServoKeyframesRule.cpp layout/style/ServoKeyframesRule.cpp -index 9a7252a5a639..7341b954ec60 100644 ---- layout/style/ServoKeyframesRule.cpp -+++ layout/style/ServoKeyframesRule.cpp -@@ -90,7 +90,12 @@ public: - { - mStyleSheet = nullptr; - mParentRule = nullptr; -- DropAllRules(); -+ for (css::Rule* rule : mRules) { -+ if (rule) { -+ rule->SetStyleSheet(nullptr); -+ rule->SetParentRule(nullptr); -+ } -+ } - } - - size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const -@@ -103,15 +108,16 @@ public: - } - - private: -- virtual ~ServoKeyframeList() {} -+ virtual ~ServoKeyframeList() { -+ MOZ_ASSERT(!mParentRule, "Backpointer should have been cleared"); -+ MOZ_ASSERT(!mStyleSheet, "Backpointer should have been cleared"); -+ DropAllRules(); -+ } - - void DropAllRules() - { -- for (css::Rule* rule : mRules) { -- if (rule) { -- rule->SetStyleSheet(nullptr); -- rule->SetParentRule(nullptr); -- } -+ if (mParentRule || mStyleSheet) { -+ DropReference(); - } - mRules.Clear(); - mRawRule = nullptr; -@@ -163,6 +169,9 @@ ServoKeyframesRule::ServoKeyframesRule(RefPtr aRawRule, - - ServoKeyframesRule::~ServoKeyframesRule() - { -+ if (mKeyframeList) { -+ mKeyframeList->DropReference(); -+ } - } - - NS_IMPL_ADDREF_INHERITED(ServoKeyframesRule, dom::CSSKeyframesRule) -diff --git layout/style/ServoMediaRule.cpp layout/style/ServoMediaRule.cpp -index 002ae20ffd0b..fbda581a377f 100644 ---- layout/style/ServoMediaRule.cpp -+++ layout/style/ServoMediaRule.cpp -@@ -24,6 +24,9 @@ ServoMediaRule::ServoMediaRule(RefPtr aRawRule, - - ServoMediaRule::~ServoMediaRule() - { -+ if (mMediaList) { -+ mMediaList->SetStyleSheet(nullptr); -+ } - } - - NS_IMPL_ADDREF_INHERITED(ServoMediaRule, CSSMediaRule) -@@ -33,8 +36,18 @@ NS_IMPL_RELEASE_INHERITED(ServoMediaRule, CSSMediaRule) - NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(ServoMediaRule) - NS_INTERFACE_MAP_END_INHERITING(CSSMediaRule) - --NS_IMPL_CYCLE_COLLECTION_INHERITED(ServoMediaRule, CSSMediaRule, -- mMediaList) -+NS_IMPL_CYCLE_COLLECTION_CLASS(ServoMediaRule) -+ -+NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(ServoMediaRule, CSSMediaRule) -+ if (tmp->mMediaList) { -+ tmp->mMediaList->SetStyleSheet(nullptr); -+ tmp->mMediaList = nullptr; -+ } -+NS_IMPL_CYCLE_COLLECTION_UNLINK_END -+ -+NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(ServoMediaRule, CSSMediaRule) -+ NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mMediaList) -+NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END - - /* virtual */ already_AddRefed - ServoMediaRule::Clone() const -diff --git layout/style/ServoPageRule.cpp layout/style/ServoPageRule.cpp -index 97c718ed1ba9..93e8ff334122 100644 ---- layout/style/ServoPageRule.cpp -+++ layout/style/ServoPageRule.cpp -@@ -26,6 +26,7 @@ ServoPageRuleDeclaration::ServoPageRuleDeclaration( - - ServoPageRuleDeclaration::~ServoPageRuleDeclaration() - { -+ mDecls->SetOwningRule(nullptr); - } - - // QueryInterface implementation for ServoPageRuleDeclaration -@@ -141,6 +142,7 @@ NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(ServoPageRule, CSSPageRule) - // NS_IMPL_CYCLE_COLLECTION_UNLINK_PRESERVED_WRAPPER which we can't use - // directly because the wrapper is on the declaration, not on us. - tmp->mDecls.ReleaseWrapper(static_cast(p)); -+ tmp->mDecls.mDecls->SetOwningRule(nullptr); - NS_IMPL_CYCLE_COLLECTION_UNLINK_END - - NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(ServoPageRule, CSSPageRule) -diff --git layout/style/ServoStyleRule.cpp layout/style/ServoStyleRule.cpp -index 1d7470eef037..855e643515f9 100644 ---- layout/style/ServoStyleRule.cpp -+++ layout/style/ServoStyleRule.cpp -@@ -28,6 +28,7 @@ ServoStyleRuleDeclaration::ServoStyleRuleDeclaration( - - ServoStyleRuleDeclaration::~ServoStyleRuleDeclaration() - { -+ mDecls->SetOwningRule(nullptr); - } - - // QueryInterface implementation for ServoStyleRuleDeclaration -diff --git layout/style/nsCSSRules.cpp layout/style/nsCSSRules.cpp -index 5081244c6a53..0bdedc4a3b03 100644 ---- layout/style/nsCSSRules.cpp -+++ layout/style/nsCSSRules.cpp -@@ -212,12 +212,25 @@ ImportRule::~ImportRule() - NS_IMPL_ADDREF_INHERITED(ImportRule, CSSImportRule) - NS_IMPL_RELEASE_INHERITED(ImportRule, CSSImportRule) - --NS_IMPL_CYCLE_COLLECTION_INHERITED(ImportRule, CSSImportRule, mMedia, mChildSheet) -- - // QueryInterface implementation for ImportRule - NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(ImportRule) - NS_INTERFACE_MAP_END_INHERITING(CSSImportRule) - -+NS_IMPL_CYCLE_COLLECTION_CLASS(ImportRule) -+ -+NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(ImportRule, CSSImportRule) -+ if (tmp->mChildSheet) { -+ tmp->mChildSheet->SetOwnerRule(nullptr); -+ tmp->mChildSheet = nullptr; -+ } -+ tmp->mMedia = nullptr; -+NS_IMPL_CYCLE_COLLECTION_UNLINK_END -+ -+NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(ImportRule, CSSImportRule) -+ NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mMedia) -+ NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mChildSheet) -+NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END -+ - #ifdef DEBUG - /* virtual */ void - ImportRule::List(FILE* out, int32_t aIndent) const -@@ -342,8 +355,18 @@ NS_IMPL_RELEASE_INHERITED(MediaRule, CSSMediaRule) - NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(MediaRule) - NS_INTERFACE_MAP_END_INHERITING(CSSMediaRule) - --NS_IMPL_CYCLE_COLLECTION_INHERITED(MediaRule, CSSMediaRule, -- mMedia) -+NS_IMPL_CYCLE_COLLECTION_CLASS(MediaRule) -+ -+NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(MediaRule, CSSMediaRule) -+ if (tmp->mMedia) { -+ tmp->mMedia->SetStyleSheet(nullptr); -+ tmp->mMedia = nullptr; -+ } -+NS_IMPL_CYCLE_COLLECTION_UNLINK_END -+ -+NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(MediaRule, CSSMediaRule) -+ NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mMedia) -+NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END - - /* virtual */ void - MediaRule::SetStyleSheet(StyleSheet* aSheet) diff --git a/www/waterfox/files/patch-bug1412420 b/www/waterfox/files/patch-bug1412420 deleted file mode 100644 index 6bafc3fb91f..00000000000 --- a/www/waterfox/files/patch-bug1412420 +++ /dev/null @@ -1,284 +0,0 @@ -commit c3b597795e95 -Author: Jan de Mooij -Date: Sat Dec 16 16:22:13 2017 -0600 - - Bug 1412420 - Ensure upper bits are zeroed when calling a function that returns int32. r=nbp a=ritu - - --HG-- - extra : source : 26d3df5b58fb60facb9057dc1e86576127c9e1f5 ---- - js/src/irregexp/NativeRegExpMacroAssembler.cpp | 4 ++-- - js/src/irregexp/RegExpStack.cpp | 2 +- - js/src/irregexp/RegExpStack.h | 2 +- - js/src/jit/CodeGenerator.cpp | 12 ++++++------ - js/src/jit/MacroAssembler-inl.h | 11 +++++++++++ - js/src/jit/MacroAssembler.cpp | 2 +- - js/src/jit/MacroAssembler.h | 3 ++- - js/src/jit/SharedIC.cpp | 16 ++++++++-------- - js/src/jit/shared/CodeGenerator-shared.h | 8 +++++--- - js/src/jit/x86/CodeGenerator-x86.cpp | 4 ++-- - 10 files changed, 39 insertions(+), 25 deletions(-) - -diff --git js/src/irregexp/NativeRegExpMacroAssembler.cpp js/src/irregexp/NativeRegExpMacroAssembler.cpp -index 004bb8e108f2..0c5743ea506b 100644 ---- js/src/irregexp/NativeRegExpMacroAssembler.cpp -+++ js/src/irregexp/NativeRegExpMacroAssembler.cpp -@@ -453,7 +453,7 @@ NativeRegExpMacroAssembler::GenerateCode(JSContext* cx, bool match_only) - masm.setupUnalignedABICall(temp0); - masm.passABIArg(temp1); - masm.callWithABI(JS_FUNC_TO_DATA_PTR(void*, GrowBacktrackStack)); -- masm.storeCallWordResult(temp0); -+ masm.storeCallBoolResult(temp0); - - masm.PopRegsInMask(volatileRegs); - -@@ -882,7 +882,7 @@ NativeRegExpMacroAssembler::CheckNotBackReferenceIgnoreCase(int start_reg, Label - int (*fun)(const char16_t*, const char16_t*, size_t) = CaseInsensitiveCompareUCStrings; - masm.callWithABI(JS_FUNC_TO_DATA_PTR(void*, fun)); - } -- masm.storeCallWordResult(temp0); -+ masm.storeCallInt32Result(temp0); - - masm.PopRegsInMask(volatileRegs); - -diff --git js/src/irregexp/RegExpStack.cpp js/src/irregexp/RegExpStack.cpp -index 7ea47149ed40..15008ccd7b9b 100644 ---- js/src/irregexp/RegExpStack.cpp -+++ js/src/irregexp/RegExpStack.cpp -@@ -44,7 +44,7 @@ RegExpStackScope::~RegExpStackScope() - regexp_stack->reset(); - } - --int -+bool - irregexp::GrowBacktrackStack(JSRuntime* rt) - { - AutoUnsafeCallWithABI unsafe; -diff --git js/src/irregexp/RegExpStack.h js/src/irregexp/RegExpStack.h -index da81567a11b6..c92666f2427a 100644 ---- js/src/irregexp/RegExpStack.h -+++ js/src/irregexp/RegExpStack.h -@@ -114,7 +114,7 @@ class RegExpStack - } - }; - --int -+bool - GrowBacktrackStack(JSRuntime* rt); - - }} // namespace js::irregexp -diff --git js/src/jit/CodeGenerator.cpp js/src/jit/CodeGenerator.cpp -index 22c0a3163232..4befbdc285db 100644 ---- js/src/jit/CodeGenerator.cpp -+++ js/src/jit/CodeGenerator.cpp -@@ -1640,7 +1640,7 @@ CreateDependentString::generateFallback(MacroAssembler& masm, LiveRegisterSet re - masm.callWithABI(kind == FallbackKind::FatInlineString - ? JS_FUNC_TO_DATA_PTR(void*, AllocateFatInlineString) - : JS_FUNC_TO_DATA_PTR(void*, AllocateString)); -- masm.storeCallWordResult(string_); -+ masm.storeCallPointerResult(string_); - - masm.PopRegsInMask(regsToSave); - -@@ -1679,7 +1679,7 @@ CreateMatchResultFallback(MacroAssembler& masm, LiveRegisterSet regsToSave, - masm.move32(Imm32(int32_t(templateObj->as().numDynamicSlots())), temp5); - masm.passABIArg(temp5); - masm.callWithABI(JS_FUNC_TO_DATA_PTR(void*, CreateMatchResultFallbackFunc)); -- masm.storeCallWordResult(object); -+ masm.storeCallPointerResult(object); - - masm.PopRegsInMask(regsToSave); - -@@ -7976,7 +7976,7 @@ JitRuntime::generateMallocStub(JSContext* cx) - masm.passABIArg(regZone); - masm.passABIArg(regNBytes); - masm.callWithABI(JS_FUNC_TO_DATA_PTR(void*, MallocWrapper)); -- masm.storeCallWordResult(regReturn); -+ masm.storeCallPointerResult(regReturn); - - masm.PopRegsInMask(save); - masm.ret(); -@@ -9445,7 +9445,7 @@ CodeGenerator::emitRest(LInstruction* lir, Register array, Register numActuals, - callVM(InitRestParameterInfo, lir); - - if (saveAndRestore) { -- storeResultTo(resultreg); -+ storePointerResultTo(resultreg); - restoreLive(lir); - } - } -@@ -10682,8 +10682,8 @@ CodeGenerator::visitOutOfLineTypeOfV(OutOfLineTypeOfV* ool) - masm.passABIArg(obj); - masm.movePtr(ImmPtr(gen->runtime), output); - masm.passABIArg(output); -- masm.callWithABI(JS_FUNC_TO_DATA_PTR(void*, TypeOfObject)); -- masm.storeCallWordResult(output); -+ masm.callWithABI(JS_FUNC_TO_DATA_PTR(void*, jit::TypeOfObject)); -+ masm.storeCallPointerResult(output); - restoreVolatile(output); - - masm.jump(ool->rejoin()); -diff --git js/src/jit/MacroAssembler-inl.h js/src/jit/MacroAssembler-inl.h -index 9d0acbfb4002..a1f9716e1329 100644 ---- js/src/jit/MacroAssembler-inl.h -+++ js/src/jit/MacroAssembler-inl.h -@@ -831,6 +831,17 @@ MacroAssembler::storeCallBoolResult(Register reg) - and32(Imm32(0xFF), reg); - } - -+void -+MacroAssembler::storeCallInt32Result(Register reg) -+{ -+#if JS_BITS_PER_WORD == 32 -+ storeCallPointerResult(reg); -+#else -+ // Ensure the upper 32 bits are cleared. -+ move32(ReturnReg, reg); -+#endif -+} -+ - void - MacroAssembler::storeCallResultValue(AnyRegister dest) - { -diff --git js/src/jit/MacroAssembler.cpp js/src/jit/MacroAssembler.cpp -index 0863dd980e93..25c284324bfe 100644 ---- js/src/jit/MacroAssembler.cpp -+++ js/src/jit/MacroAssembler.cpp -@@ -2117,7 +2117,7 @@ MacroAssembler::outOfLineTruncateSlow(FloatRegister src, Register dest, bool wid - callWithABI(mozilla::BitwiseCast(JS::ToInt32), - MoveOp::GENERAL, CheckUnsafeCallWithABI::DontCheckOther); - } -- storeCallWordResult(dest); -+ storeCallInt32Result(dest); - - #if defined(JS_CODEGEN_ARM) || defined(JS_CODEGEN_ARM64) || \ - defined(JS_CODEGEN_MIPS32) || defined(JS_CODEGEN_MIPS64) -diff --git js/src/jit/MacroAssembler.h js/src/jit/MacroAssembler.h -index e353c5aa10f5..2c8b005b7008 100644 ---- js/src/jit/MacroAssembler.h -+++ js/src/jit/MacroAssembler.h -@@ -1630,12 +1630,13 @@ class MacroAssembler : public MacroAssemblerSpecific - storeTypedOrValue(src.reg(), dest); - } - -- void storeCallWordResult(Register reg) { -+ void storeCallPointerResult(Register reg) { - if (reg != ReturnReg) - mov(ReturnReg, reg); - } - - inline void storeCallBoolResult(Register reg); -+ inline void storeCallInt32Result(Register reg); - - void storeCallFloatResult(FloatRegister reg) { - if (reg != ReturnDoubleReg) -diff --git js/src/jit/SharedIC.cpp js/src/jit/SharedIC.cpp -index 0c8be36a592d..1f88cc93176d 100644 ---- js/src/jit/SharedIC.cpp -+++ js/src/jit/SharedIC.cpp -@@ -1145,19 +1145,19 @@ ICBinaryArith_BooleanWithInt32::Compiler::generateStubCode(MacroAssembler& masm) - break; - } - case JSOP_BITOR: { -- masm.orPtr(rhsReg, lhsReg); -+ masm.or32(rhsReg, lhsReg); - masm.tagValue(JSVAL_TYPE_INT32, lhsReg, R0); - EmitReturnFromIC(masm); - break; - } - case JSOP_BITXOR: { -- masm.xorPtr(rhsReg, lhsReg); -+ masm.xor32(rhsReg, lhsReg); - masm.tagValue(JSVAL_TYPE_INT32, lhsReg, R0); - EmitReturnFromIC(masm); - break; - } - case JSOP_BITAND: { -- masm.andPtr(rhsReg, lhsReg); -+ masm.and32(rhsReg, lhsReg); - masm.tagValue(JSVAL_TYPE_INT32, lhsReg, R0); - EmitReturnFromIC(masm); - break; -@@ -1206,7 +1206,7 @@ ICBinaryArith_DoubleWithInt32::Compiler::generateStubCode(MacroAssembler& masm) - masm.setupUnalignedABICall(scratchReg); - masm.passABIArg(FloatReg0, MoveOp::DOUBLE); - masm.callWithABI(mozilla::BitwiseCast(JS::ToInt32)); -- masm.storeCallWordResult(scratchReg); -+ masm.storeCallInt32Result(scratchReg); - masm.pop(intReg); - - masm.bind(&doneTruncate); -@@ -1216,13 +1216,13 @@ ICBinaryArith_DoubleWithInt32::Compiler::generateStubCode(MacroAssembler& masm) - // All handled ops commute, so no need to worry about ordering. - switch(op) { - case JSOP_BITOR: -- masm.orPtr(intReg, intReg2); -+ masm.or32(intReg, intReg2); - break; - case JSOP_BITXOR: -- masm.xorPtr(intReg, intReg2); -+ masm.xor32(intReg, intReg2); - break; - case JSOP_BITAND: -- masm.andPtr(intReg, intReg2); -+ masm.and32(intReg, intReg2); - break; - default: - MOZ_CRASH("Unhandled op for BinaryArith_DoubleWithInt32."); -@@ -1359,7 +1359,7 @@ ICUnaryArith_Double::Compiler::generateStubCode(MacroAssembler& masm) - masm.setupUnalignedABICall(scratchReg); - masm.passABIArg(FloatReg0, MoveOp::DOUBLE); - masm.callWithABI(BitwiseCast(JS::ToInt32)); -- masm.storeCallWordResult(scratchReg); -+ masm.storeCallInt32Result(scratchReg); - - masm.bind(&doneTruncate); - masm.not32(scratchReg); -diff --git js/src/jit/shared/CodeGenerator-shared.h js/src/jit/shared/CodeGenerator-shared.h -index d75572dac0a6..48b2b4d8561c 100644 ---- js/src/jit/shared/CodeGenerator-shared.h -+++ js/src/jit/shared/CodeGenerator-shared.h -@@ -454,8 +454,8 @@ class CodeGeneratorShared : public LElementVisitor - return masm.PushWithPatch(t); - } - -- void storeResultTo(Register reg) { -- masm.storeCallWordResult(reg); -+ void storePointerResultTo(Register reg) { -+ masm.storeCallPointerResult(reg); - } - - void storeFloatResultTo(FloatRegister reg) { -@@ -725,7 +725,9 @@ class StoreRegisterTo - { } - - inline void generate(CodeGeneratorShared* codegen) const { -- codegen->storeResultTo(out_); -+ // It's okay to use storePointerResultTo here - the VMFunction wrapper -+ // ensures the upper bytes are zero for bool/int32 return values. -+ codegen->storePointerResultTo(out_); - } - inline LiveRegisterSet clobbered() const { - LiveRegisterSet set; -diff --git js/src/jit/x86/CodeGenerator-x86.cpp js/src/jit/x86/CodeGenerator-x86.cpp -index e2f80c4ac8fc..fe358c370baf 100644 ---- js/src/jit/x86/CodeGenerator-x86.cpp -+++ js/src/jit/x86/CodeGenerator-x86.cpp -@@ -747,7 +747,7 @@ CodeGeneratorX86::visitOutOfLineTruncate(OutOfLineTruncate* ool) - masm.callWithABI(BitwiseCast(JS::ToInt32), MoveOp::GENERAL, - CheckUnsafeCallWithABI::DontCheckOther); - } -- masm.storeCallWordResult(output); -+ masm.storeCallInt32Result(output); - - restoreVolatile(output); - } -@@ -839,7 +839,7 @@ CodeGeneratorX86::visitOutOfLineTruncateFloat32(OutOfLineTruncateFloat32* ool) - CheckUnsafeCallWithABI::DontCheckOther); - } - -- masm.storeCallWordResult(output); -+ masm.storeCallInt32Result(output); - masm.Pop(input); - - restoreVolatile(output); diff --git a/www/waterfox/files/patch-bug1412558 b/www/waterfox/files/patch-bug1412558 deleted file mode 100644 index dd142370e23..00000000000 --- a/www/waterfox/files/patch-bug1412558 +++ /dev/null @@ -1,42 +0,0 @@ -diff --git dom/media/flac/FlacDecoder.cpp dom/media/flac/FlacDecoder.cpp -index 53fc3c9937f7..b23771ab80fa 100644 ---- dom/media/flac/FlacDecoder.cpp -+++ dom/media/flac/FlacDecoder.cpp -@@ -7,6 +7,7 @@ - #include "FlacDecoder.h" - #include "MediaContainerType.h" - #include "MediaPrefs.h" -+#include "PDMFactory.h" - - namespace mozilla { - -@@ -15,6 +16,10 @@ FlacDecoder::IsEnabled() - { - #ifdef MOZ_FFVPX - return MediaPrefs::FlacEnabled(); -+#elif defined(MOZ_FFMPEG) -+ RefPtr platform = new PDMFactory(); -+ return MediaPrefs::FlacEnabled() && platform->SupportsMimeType(NS_LITERAL_CSTRING("audio/flac"), -+ /* DecoderDoctorDiagnostics* */ nullptr); - #else - // Until bug 1295886 is fixed. - return false; -diff --git old-configure.in old-configure.in -index b8ce71278548..410be683c2f6 100644 ---- old-configure.in -+++ old-configure.in -@@ -3279,11 +3279,11 @@ dnl = FFmpeg's ffvpx configuration - dnl ======================================================== - - MOZ_FFVPX= --case "$CPU_ARCH" in -- x86) -+case "$OS_ARCH:$CPU_ARCH" in -+ WINNT:x86) - MOZ_FFVPX=1 - ;; -- x86_64) -+ *:x86_64) - MOZ_FFVPX=1 - ;; - esac diff --git a/www/waterfox/files/patch-bug1412741 b/www/waterfox/files/patch-bug1412741 deleted file mode 100644 index 5bf24d87ce6..00000000000 --- a/www/waterfox/files/patch-bug1412741 +++ /dev/null @@ -1,87 +0,0 @@ -commit 9bfa45f5e083 -Author: Boris Zbarsky -Date: Thu Nov 2 13:02:55 2017 -0400 - - Bug 1412741 - Back out the fix for bug 1381408, because that change doesn't look like it's web-compatible. r=peterv, a=ritu - - MozReview-Commit-ID: LSYYAt0bAkT - - --HG-- - extra : source : 1fdce3a0396c599ad52749e1650beeb8f455d891 ---- - js/xpconnect/tests/mochitest/test_bug862380.html | 23 +++++----------------- - js/xpconnect/wrappers/FilteringWrapper.cpp | 5 +++-- - .../cross-origin-objects.html.ini | 10 ++++++++++ - 3 files changed, 18 insertions(+), 20 deletions(-) - -diff --git js/xpconnect/tests/mochitest/test_bug862380.html js/xpconnect/tests/mochitest/test_bug862380.html -index 0f1611776320..0d3fb7329358 100644 ---- js/xpconnect/tests/mochitest/test_bug862380.html -+++ js/xpconnect/tests/mochitest/test_bug862380.html -@@ -13,29 +13,16 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=862380 - /** Test for Bug 862380 **/ - SimpleTest.waitForExplicitFinish(); - function go() { -- checkNotEnumerable($('ifr').contentWindow, true); -- checkNotEnumerable($('ifr').contentWindow.location, false); -+ checkNotEnumerable($('ifr').contentWindow); -+ checkNotEnumerable($('ifr').contentWindow.location); - SimpleTest.finish(); - } - --function checkNotEnumerable(obj, isWindow) { -+ function checkNotEnumerable(obj) { - try { -- const expectedWindow = ["0", "window", "location", "top", "close", -- "focus", "blur", "postMessage", "self", "closed", -- "frames", "length", "opener", "parent"]; -- const expectedLocation = ["replace", "href"]; -- const expected = isWindow ? expectedWindow : expectedLocation; -- is(Object.keys(obj).length, expected.length, -- "Object.keys gives right array length"); -- var actual = []; -+ is(Object.keys(obj).length, 0, "Object.keys gives empty array"); - for (var i in obj) -- actual.push(i); -- is(actual.length, expected.length, -- "Enumeration sees the right number of props"); -- actual.sort(); -- expected.sort(); -- for (var i = 0; i < actual.length; ++i) -- is(actual[i], expected[i], "Arrays should be the same " + i); -+ ok(false, "Enumerated something: " + i); - } catch (e) { - ok(false, "threw: " + e); - } -diff --git js/xpconnect/wrappers/FilteringWrapper.cpp js/xpconnect/wrappers/FilteringWrapper.cpp -index c35c3e896afc..1e986c734cde 100644 ---- js/xpconnect/wrappers/FilteringWrapper.cpp -+++ js/xpconnect/wrappers/FilteringWrapper.cpp -@@ -223,8 +223,9 @@ CrossOriginXrayWrapper::getPropertyDescriptor(JSContext* cx, - // All properties on cross-origin DOM objects are |own|. - desc.object().set(wrapper); - -- // All properties on cross-origin DOM objects are "configurable". Any -- // value attributes are read-only. -+ // All properties on cross-origin DOM objects are non-enumerable and -+ // "configurable". Any value attributes are read-only. -+ desc.attributesRef() &= ~JSPROP_ENUMERATE; - desc.attributesRef() &= ~JSPROP_PERMANENT; - if (!desc.getter() && !desc.setter()) - desc.attributesRef() |= JSPROP_READONLY; -diff --git testing/web-platform/meta/html/browsers/origin/cross-origin-objects/cross-origin-objects.html.ini testing/web-platform/meta/html/browsers/origin/cross-origin-objects/cross-origin-objects.html.ini -new file mode 100644 -index 000000000000..6c5e683863e9 ---- /dev/null -+++ testing/web-platform/meta/html/browsers/origin/cross-origin-objects/cross-origin-objects.html.ini -@@ -0,0 +1,10 @@ -+[cross-origin-objects.html] -+ type: testharness -+ [[[GetOwnProperty\]\] - Property descriptors for cross-origin properties should be set up correctly] -+ expected: FAIL -+ -+ [Can only enumerate safelisted properties] -+ expected: FAIL -+ -+ [[[OwnPropertyKeys\]\] should return all properties from cross-origin objects] -+ expected: FAIL diff --git a/www/waterfox/files/patch-bug1412882 b/www/waterfox/files/patch-bug1412882 deleted file mode 100644 index 327b6da45b9..00000000000 --- a/www/waterfox/files/patch-bug1412882 +++ /dev/null @@ -1,192 +0,0 @@ -commit 7513891383a1 -Author: Jonathan Kew -Date: Sat May 19 08:32:22 2018 +0100 - - Bug 1412882 - Rework gfxFontUtils::MapCharToGlyphFormat4 to be more robust. r=lsalzman, a=RyanVM - - --HG-- - extra : source : e96eaa6603005c3e2361d9d32ef59adb718d4203 ---- - gfx/thebes/gfxFontUtils.cpp | 89 ++++++++++++++++++++++------------------ - gfx/thebes/gfxFontUtils.h | 2 +- - gfx/thebes/gfxHarfBuzzShaper.cpp | 8 +++- - 3 files changed, 57 insertions(+), 42 deletions(-) - -diff --git gfx/thebes/gfxFontUtils.cpp gfx/thebes/gfxFontUtils.cpp -index b3c1cae1bbb67..1590fb52ab6b7 100644 ---- gfx/thebes/gfxFontUtils.cpp -+++ gfx/thebes/gfxFontUtils.cpp -@@ -569,55 +569,64 @@ typedef struct { - #pragma pack() - - uint32_t --gfxFontUtils::MapCharToGlyphFormat4(const uint8_t *aBuf, char16_t aCh) -+gfxFontUtils::MapCharToGlyphFormat4(const uint8_t* aBuf, uint32_t aLength, -+ char16_t aCh) - { - const Format4Cmap *cmap4 = reinterpret_cast(aBuf); -- uint16_t segCount; -- const AutoSwap_PRUint16 *endCodes; -- const AutoSwap_PRUint16 *startCodes; -- const AutoSwap_PRUint16 *idDelta; -- const AutoSwap_PRUint16 *idRangeOffset; -- uint16_t probe; -- uint16_t rangeShiftOver2; -- uint16_t index; -- -- segCount = (uint16_t)(cmap4->segCountX2) / 2; -- -- endCodes = &cmap4->arrays[0]; -- startCodes = &cmap4->arrays[segCount + 1]; // +1 for reserved word between arrays -- idDelta = &startCodes[segCount]; -- idRangeOffset = &idDelta[segCount]; -- -- probe = 1 << (uint16_t)(cmap4->entrySelector); -- rangeShiftOver2 = (uint16_t)(cmap4->rangeShift) / 2; -- -- if ((uint16_t)(startCodes[rangeShiftOver2]) <= aCh) { -- index = rangeShiftOver2; -- } else { -- index = 0; -- } -- -- while (probe > 1) { -- probe >>= 1; -- if ((uint16_t)(startCodes[index + probe]) <= aCh) { -- index += probe; -+ -+ uint16_t segCount = (uint16_t)(cmap4->segCountX2) / 2; -+ -+ const AutoSwap_PRUint16* endCodes = &cmap4->arrays[0]; -+ const AutoSwap_PRUint16* startCodes = &cmap4->arrays[segCount + 1]; -+ const AutoSwap_PRUint16* idDelta = &startCodes[segCount]; -+ const AutoSwap_PRUint16* idRangeOffset = &idDelta[segCount]; -+ -+ // Sanity-check that the fixed-size arrays don't exceed the buffer. -+ const uint8_t* const limit = aBuf + aLength; -+ if ((const uint8_t*)(&idRangeOffset[segCount]) > limit) { -+ return 0; // broken font, just bail out safely -+ } -+ -+ // For most efficient binary search, we want to work on a range of segment -+ // indexes that is a power of 2 so that we can always halve it by shifting. -+ // So we find the largest power of 2 that is <= segCount. -+ // We will offset this range by segOffset so as to reach the end -+ // of the table, provided that doesn't put us beyond the target -+ // value from the outset. -+ uint32_t powerOf2 = mozilla::FindHighestBit(segCount); -+ uint32_t segOffset = segCount - powerOf2; -+ uint32_t idx = 0; -+ -+ if (uint16_t(startCodes[segOffset]) <= aCh) { -+ idx = segOffset; -+ } -+ -+ // Repeatedly halve the size of the range until we find the target group -+ while (powerOf2 > 1) { -+ powerOf2 >>= 1; -+ if (uint16_t(startCodes[idx + powerOf2]) <= aCh) { -+ idx += powerOf2; - } - } - -- if (aCh >= (uint16_t)(startCodes[index]) && aCh <= (uint16_t)(endCodes[index])) { -+ if (aCh >= uint16_t(startCodes[idx]) && aCh <= uint16_t(endCodes[idx])) { - uint16_t result; -- if ((uint16_t)(idRangeOffset[index]) == 0) { -+ if (uint16_t(idRangeOffset[idx]) == 0) { - result = aCh; - } else { -- uint16_t offset = aCh - (uint16_t)(startCodes[index]); -- const AutoSwap_PRUint16 *glyphIndexTable = -- (const AutoSwap_PRUint16*)((const char*)&idRangeOffset[index] + -- (uint16_t)(idRangeOffset[index])); -+ uint16_t offset = aCh - uint16_t(startCodes[idx]); -+ const AutoSwap_PRUint16* glyphIndexTable = -+ (const AutoSwap_PRUint16*)((const char*)&idRangeOffset[idx] + -+ uint16_t(idRangeOffset[idx])); -+ if ((const uint8_t*)(glyphIndexTable + offset + 1) > limit) { -+ return 0; // broken font, just bail out safely -+ } - result = glyphIndexTable[offset]; - } - -- // note that this is unsigned 16-bit arithmetic, and may wrap around -- result += (uint16_t)(idDelta[index]); -+ // Note that this is unsigned 16-bit arithmetic, and may wrap around -+ // (which is required behavior per spec) -+ result += uint16_t(idDelta[idx]); - return result; - } - -@@ -761,7 +770,8 @@ gfxFontUtils::MapCharToGlyph(const uint8_t *aCmapBuf, uint32_t aBufLength, - switch (format) { - case 4: - gid = aUnicode < UNICODE_BMP_LIMIT ? -- MapCharToGlyphFormat4(aCmapBuf + offset, char16_t(aUnicode)) : 0; -+ MapCharToGlyphFormat4(aCmapBuf + offset, aBufLength - offset, -+ char16_t(aUnicode)) : 0; - break; - case 10: - gid = MapCharToGlyphFormat10(aCmapBuf + offset, aUnicode); -@@ -786,6 +796,7 @@ gfxFontUtils::MapCharToGlyph(const uint8_t *aCmapBuf, uint32_t aBufLength, - case 4: - if (aUnicode < UNICODE_BMP_LIMIT) { - varGID = MapCharToGlyphFormat4(aCmapBuf + offset, -+ aBufLength - offset, - char16_t(aUnicode)); - } - break; -diff --git gfx/thebes/gfxFontUtils.h gfx/thebes/gfxFontUtils.h -index 250df442c3a2e..be2f54a9a7026 100644 ---- gfx/thebes/gfxFontUtils.h -+++ gfx/thebes/gfxFontUtils.h -@@ -804,7 +804,7 @@ public: - uint32_t& aUVSOffset); - - static uint32_t -- MapCharToGlyphFormat4(const uint8_t *aBuf, char16_t aCh); -+ MapCharToGlyphFormat4(const uint8_t *aBuf, uint32_t aLength, char16_t aCh); - - static uint32_t - MapCharToGlyphFormat10(const uint8_t *aBuf, uint32_t aCh); -diff --git gfx/thebes/gfxHarfBuzzShaper.cpp gfx/thebes/gfxHarfBuzzShaper.cpp -index c57504a4d9db4..ff638dcef73ad 100644 ---- gfx/thebes/gfxHarfBuzzShaper.cpp -+++ gfx/thebes/gfxHarfBuzzShaper.cpp -@@ -116,13 +116,15 @@ gfxHarfBuzzShaper::GetNominalGlyph(hb_codepoint_t unicode) const - NS_ASSERTION(mCmapTable && (mCmapFormat > 0) && (mSubtableOffset > 0), - "cmap data not correctly set up, expect disaster"); - -+ uint32_t length; - const uint8_t* data = -- (const uint8_t*)hb_blob_get_data(mCmapTable, nullptr); -+ (const uint8_t*)hb_blob_get_data(mCmapTable, &length); - - switch (mCmapFormat) { - case 4: - gid = unicode < UNICODE_BMP_LIMIT ? - gfxFontUtils::MapCharToGlyphFormat4(data + mSubtableOffset, -+ length - mSubtableOffset, - unicode) : 0; - break; - case 10: -@@ -164,8 +166,9 @@ gfxHarfBuzzShaper::GetVariationGlyph(hb_codepoint_t unicode, - NS_ASSERTION(mCmapTable && (mCmapFormat > 0) && (mSubtableOffset > 0), - "cmap data not correctly set up, expect disaster"); - -+ uint32_t length; - const uint8_t* data = -- (const uint8_t*)hb_blob_get_data(mCmapTable, nullptr); -+ (const uint8_t*)hb_blob_get_data(mCmapTable, &length); - - if (mUVSTableOffset) { - hb_codepoint_t gid = -@@ -183,6 +186,7 @@ gfxHarfBuzzShaper::GetVariationGlyph(hb_codepoint_t unicode, - case 4: - if (compat < UNICODE_BMP_LIMIT) { - return gfxFontUtils::MapCharToGlyphFormat4(data + mSubtableOffset, -+ length - mSubtableOffset, - compat); - } - break; diff --git a/www/waterfox/files/patch-bug1413143 b/www/waterfox/files/patch-bug1413143 deleted file mode 100644 index 19067f325bd..00000000000 --- a/www/waterfox/files/patch-bug1413143 +++ /dev/null @@ -1,306 +0,0 @@ -commit 51708fb1315d -Author: Emilio Cobos Álvarez -Date: Wed Nov 1 11:24:17 2017 +0100 - - Bug 1413143: Make font inflation computation less lazy. r=bz,JanH - - This makes it a bit more straight-forward to change the system font scale, - preserving the sync MediaFeatureChanged event. - - This also avoids notifying media queries when the shell is not initialized. - - In particular, the patch in bug 1404545 allows calling MediaFeatureValuesChanged - on a still-initializing pres-shell. This is nasty, and all this initialization - order is kind of a mess, but I'm not reworking it for now... - - Also, this drops the invalidation of font-inflation when a doctype is added to - the document. GetViewportInfo() already relies on the doctype not changing, as - noted in a comment. - - MozReview-Commit-ID: Knw7dM1B04Y ---- - dom/base/nsDocument.cpp | 2 + - layout/base/PresShell.cpp | 84 ++++++++++++++------------------------- - layout/base/nsIPresShell.h | 36 ++++------------- - layout/base/nsLayoutUtils.cpp | 8 ++-- - layout/base/nsPresContext.cpp | 6 ++- - layout/reftests/bugs/reftest.list | 2 +- - 6 files changed, 48 insertions(+), 90 deletions(-) - -diff --git dom/base/nsDocument.cpp dom/base/nsDocument.cpp -index 03bf17e6a4b9..f3579c9420d6 100644 ---- dom/base/nsDocument.cpp -+++ dom/base/nsDocument.cpp -@@ -8172,6 +8172,8 @@ nsIDocument::AdoptNode(nsINode& aAdoptedNode, ErrorResult& rv) - nsViewportInfo - nsDocument::GetViewportInfo(const ScreenIntSize& aDisplaySize) - { -+ MOZ_ASSERT(mPresShell); -+ - // Compute the CSS-to-LayoutDevice pixel scale as the product of the - // widget scale and the full zoom. - nsPresContext* context = mPresShell->GetPresContext(); -diff --git layout/base/PresShell.cpp layout/base/PresShell.cpp -index 6983d2d3c894..a883791d3695 100644 ---- layout/base/PresShell.cpp -+++ layout/base/PresShell.cpp -@@ -765,7 +765,6 @@ nsIPresShell::nsIPresShell() - , mFontSizeInflationForceEnabled(false) - , mFontSizeInflationDisabledInMasterProcess(false) - , mFontSizeInflationEnabled(false) -- , mFontSizeInflationEnabledIsDirty(false) - , mPaintingIsFrozen(false) - , mIsNeverPainting(false) - , mInFlush(false) -@@ -1010,7 +1009,13 @@ PresShell::Init(nsIDocument* aDocument, - QueryIsActive(); - - // Setup our font inflation preferences. -- SetupFontInflation(); -+ mFontSizeInflationEmPerLine = nsLayoutUtils::FontSizeInflationEmPerLine(); -+ mFontSizeInflationMinTwips = nsLayoutUtils::FontSizeInflationMinTwips(); -+ mFontSizeInflationLineThreshold = nsLayoutUtils::FontSizeInflationLineThreshold(); -+ mFontSizeInflationForceEnabled = nsLayoutUtils::FontSizeInflationForceEnabled(); -+ mFontSizeInflationDisabledInMasterProcess = nsLayoutUtils::FontSizeInflationDisabledInMasterProcess(); -+ // We'll compute the font size inflation state in Initialize(), when we know -+ // the document type. - - mTouchManager.Init(this, mDocument); - -@@ -1700,6 +1705,10 @@ PresShell::Initialize(nscoord aWidth, nscoord aHeight) - NS_ASSERTION(!mDidInitialize, "Why are we being called?"); - - nsCOMPtr kungFuDeathGrip(this); -+ -+ RecomputeFontSizeInflationEnabled(); -+ MOZ_DIAGNOSTIC_ASSERT(!mIsDestroying); -+ - mDidInitialize = true; - - #ifdef DEBUG -@@ -1725,6 +1734,7 @@ PresShell::Initialize(nscoord aWidth, nscoord aHeight) - // time we do this! - nsIFrame* rootFrame = mFrameConstructor->GetRootFrame(); - NS_ASSERTION(!rootFrame, "How did that happen, exactly?"); -+ - if (!rootFrame) { - nsAutoScriptBlocker scriptBlocker; - mFrameConstructor->BeginUpdate(); -@@ -4456,11 +4466,6 @@ PresShell::ContentInserted(nsIDocument* aDocument, - nullptr, - nsCSSFrameConstructor::InsertionKind::Async); - -- if (aChild->NodeType() == nsIDOMNode::DOCUMENT_TYPE_NODE) { -- MOZ_ASSERT(container == aDocument); -- NotifyFontSizeInflationEnabledIsDirty(); -- } -- - VERIFY_STYLE_TREE; - } - -@@ -4505,11 +4510,6 @@ PresShell::ContentRemoved(nsIDocument *aDocument, - mFrameConstructor->ContentRemoved(aMaybeContainer, aChild, oldNextSibling, - nsCSSFrameConstructor::REMOVE_CONTENT); - -- if (aChild->NodeType() == nsIDOMNode::DOCUMENT_TYPE_NODE) { -- MOZ_ASSERT(container == aDocument); -- NotifyFontSizeInflationEnabledIsDirty(); -- } -- - VERIFY_STYLE_TREE; - } - -@@ -10701,33 +10701,34 @@ nsIPresShell::SetScrollPositionClampingScrollPortSize(nscoord aWidth, nscoord aH - } - } - --void --PresShell::SetupFontInflation() --{ -- mFontSizeInflationEmPerLine = nsLayoutUtils::FontSizeInflationEmPerLine(); -- mFontSizeInflationMinTwips = nsLayoutUtils::FontSizeInflationMinTwips(); -- mFontSizeInflationLineThreshold = nsLayoutUtils::FontSizeInflationLineThreshold(); -- mFontSizeInflationForceEnabled = nsLayoutUtils::FontSizeInflationForceEnabled(); -- mFontSizeInflationDisabledInMasterProcess = nsLayoutUtils::FontSizeInflationDisabledInMasterProcess(); -- -- NotifyFontSizeInflationEnabledIsDirty(); --} -- - void - nsIPresShell::RecomputeFontSizeInflationEnabled() - { -- mFontSizeInflationEnabledIsDirty = false; - mFontSizeInflationEnabled = DetermineFontSizeInflationState(); - -- HandleSystemFontScale(); -+ float fontScale = nsLayoutUtils::SystemFontScale(); -+ if (fontScale == 0.0f) { -+ return; -+ } -+ -+ MOZ_ASSERT(mDocument); -+ MOZ_ASSERT(mPresContext); -+ if (mFontSizeInflationEnabled || mDocument->IsSyntheticDocument()) { -+ mPresContext->SetSystemFontScale(1.0f); -+ } else { -+ mPresContext->SetSystemFontScale(fontScale); -+ } - } - - bool - nsIPresShell::DetermineFontSizeInflationState() - { - MOZ_ASSERT(mPresContext, "our pres context should not be null"); -- if ((FontSizeInflationEmPerLine() == 0 && -- FontSizeInflationMinTwips() == 0) || mPresContext->IsChrome()) { -+ if (mPresContext->IsChrome()) { -+ return false; -+ } -+ -+ if (FontSizeInflationEmPerLine() == 0 && FontSizeInflationMinTwips() == 0) { - return false; - } - -@@ -10788,33 +10789,6 @@ nsIPresShell::DetermineFontSizeInflationState() - return true; - } - --bool --nsIPresShell::FontSizeInflationEnabled() --{ -- if (mFontSizeInflationEnabledIsDirty) { -- RecomputeFontSizeInflationEnabled(); -- } -- -- return mFontSizeInflationEnabled; --} -- --void --nsIPresShell::HandleSystemFontScale() --{ -- float fontScale = nsLayoutUtils::SystemFontScale(); -- if (fontScale == 0.0f) { -- return; -- } -- -- MOZ_ASSERT(mDocument && mPresContext, "our document and pres context should not be null"); -- -- if (!mFontSizeInflationEnabled && !mDocument->IsSyntheticDocument()) { -- mPresContext->SetSystemFontScale(fontScale); -- } else { -- mPresContext->SetSystemFontScale(1.0f); -- } --} -- - void - PresShell::PausePainting() - { -diff --git layout/base/nsIPresShell.h layout/base/nsIPresShell.h -index 32f4855347d5..3f6be216a60c 100644 ---- layout/base/nsIPresShell.h -+++ layout/base/nsIPresShell.h -@@ -1507,24 +1507,14 @@ public: - return mFontSizeInflationDisabledInMasterProcess; - } - -- /** -- * Determine if font size inflation is enabled. This value is cached until -- * it becomes dirty. -- * -- * @returns true, if font size inflation is enabled; false otherwise. -- */ -- bool FontSizeInflationEnabled(); -+ bool FontSizeInflationEnabled() const { -+ return mFontSizeInflationEnabled; -+ } - - /** -- * Notify the pres shell that an event occurred making the current value of -- * mFontSizeInflationEnabled invalid. This will schedule a recomputation of -- * whether font size inflation is enabled on the next call to -- * FontSizeInflationEnabled(). -+ * Recomputes whether font-size inflation is enabled. - */ -- void NotifyFontSizeInflationEnabledIsDirty() -- { -- mFontSizeInflationEnabledIsDirty = true; -- } -+ void RecomputeFontSizeInflationEnabled(); - - /** - * Return true if the most recent interruptible reflow was interrupted. -@@ -1590,23 +1580,11 @@ protected: - void DoObserveLayoutFlushes(); - - /** -- * Do computations necessary to determine if font size inflation is enabled. -- * This value is cached after computation, as the computation is somewhat -- * expensive. -- */ -- void RecomputeFontSizeInflationEnabled(); -- -- /** -- * Does the actual work of figuring out the current state of font size inflation. -+ * Does the actual work of figuring out the current state of font size -+ * inflation. - */ - bool DetermineFontSizeInflationState(); - -- /** -- * Apply the system font scale from the corresponding pref to the PresContext, -- * taking into account the current state of font size inflation. -- */ -- void HandleSystemFontScale(); -- - void RecordAlloc(void* aPtr) { - #ifdef DEBUG - MOZ_ASSERT(!mAllocatedPointers.Contains(aPtr)); -diff --git layout/base/nsLayoutUtils.cpp layout/base/nsLayoutUtils.cpp -index e1289fd4a6a6..e165588e9c6c 100644 ---- layout/base/nsLayoutUtils.cpp -+++ layout/base/nsLayoutUtils.cpp -@@ -9130,16 +9130,16 @@ MaybeReflowForInflationScreenSizeChange(nsPresContext *aPresContext) - { - if (aPresContext) { - nsIPresShell* presShell = aPresContext->GetPresShell(); -- bool fontInflationWasEnabled = presShell->FontSizeInflationEnabled(); -- presShell->NotifyFontSizeInflationEnabledIsDirty(); -+ const bool fontInflationWasEnabled = presShell->FontSizeInflationEnabled(); -+ presShell->RecomputeFontSizeInflationEnabled(); - bool changed = false; -- if (presShell && presShell->FontSizeInflationEnabled() && -+ if (presShell->FontSizeInflationEnabled() && - presShell->FontSizeInflationMinTwips() != 0) { - aPresContext->ScreenSizeInchesForFontInflation(&changed); - } - - changed = changed || -- (fontInflationWasEnabled != presShell->FontSizeInflationEnabled()); -+ fontInflationWasEnabled != presShell->FontSizeInflationEnabled(); - if (changed) { - nsCOMPtr docShell = aPresContext->GetDocShell(); - if (docShell) { -diff --git layout/base/nsPresContext.cpp layout/base/nsPresContext.cpp -index 2fadaf78a29f..1ce0b492673d 100644 ---- layout/base/nsPresContext.cpp -+++ layout/base/nsPresContext.cpp -@@ -2123,6 +2123,10 @@ nsPresContext::MediaFeatureValuesChanged(nsRestyleHint aRestyleHint, - - mPendingViewportChange = false; - -+ if (!mShell || !mShell->DidInitialize()) { -+ return; -+ } -+ - if (mDocument->IsBeingUsedAsImage()) { - MOZ_ASSERT(mDocument->MediaQueryLists().isEmpty()); - return; -@@ -2130,7 +2134,7 @@ nsPresContext::MediaFeatureValuesChanged(nsRestyleHint aRestyleHint, - - mDocument->NotifyMediaFeatureValuesChanged(); - -- MOZ_ASSERT(nsContentUtils::IsSafeToRunScript()); -+ MOZ_DIAGNOSTIC_ASSERT(nsContentUtils::IsSafeToRunScript()); - - // Media query list listeners should be notified from a queued task - // (in HTML5 terms), although we also want to notify them on certain diff --git a/www/waterfox/files/patch-bug1413741 b/www/waterfox/files/patch-bug1413741 deleted file mode 100644 index 28e94186d83..00000000000 --- a/www/waterfox/files/patch-bug1413741 +++ /dev/null @@ -1,25 +0,0 @@ -commit bd17df85baf4 -Author: Andrea Marchesini -Date: Tue Nov 14 08:18:41 2017 +0100 - - Bug 1413741 - Improve the use of XHR.mProxy in workers after the dispatching of sync OpenRunnable, r=smaug a=gchang - - --HG-- - extra : source : 063022b93ec40d00601a21b92525a4285f984484 ---- - dom/xhr/XMLHttpRequestWorker.cpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git dom/xhr/XMLHttpRequestWorker.cpp dom/xhr/XMLHttpRequestWorker.cpp -index c337bb258767..9954da23493f 100644 ---- dom/xhr/XMLHttpRequestWorker.cpp -+++ dom/xhr/XMLHttpRequestWorker.cpp -@@ -1895,7 +1895,7 @@ XMLHttpRequestWorker::Open(const nsACString& aMethod, - ++mProxy->mOpenCount; - runnable->Dispatch(Terminating, aRv); - if (aRv.Failed()) { -- if (!--mProxy->mOpenCount) { -+ if (mProxy && !--mProxy->mOpenCount) { - ReleaseProxy(); - } - diff --git a/www/waterfox/files/patch-bug1414292 b/www/waterfox/files/patch-bug1414292 deleted file mode 100644 index 77100836514..00000000000 --- a/www/waterfox/files/patch-bug1414292 +++ /dev/null @@ -1,171 +0,0 @@ -commit e66612be968f -Author: Boris Zbarsky -Date: Tue Nov 7 15:36:16 2017 -0500 - - Bug 1414292. Update to HTML spec changes for cross-origin object property enumerability. r=peterv - - Updates to https://github.com/whatwg/html/pull/3186 - - Includes the changes from https://github.com/w3c/web-platform-tests/pull/8045 - - MozReview-Commit-ID: 5vEo1QGPufE ---- - js/xpconnect/wrappers/FilteringWrapper.cpp | 9 ++++--- - .../cross-origin-objects.html.ini | 10 ------- - .../cross-origin-objects/cross-origin-objects.html | 31 +++++++++++----------- - 3 files changed, 22 insertions(+), 28 deletions(-) - -diff --git js/xpconnect/wrappers/FilteringWrapper.cpp js/xpconnect/wrappers/FilteringWrapper.cpp -index 1e986c734cde..4c9db40cdd5d 100644 ---- js/xpconnect/wrappers/FilteringWrapper.cpp -+++ js/xpconnect/wrappers/FilteringWrapper.cpp -@@ -223,9 +223,12 @@ CrossOriginXrayWrapper::getPropertyDescriptor(JSContext* cx, - // All properties on cross-origin DOM objects are |own|. - desc.object().set(wrapper); - -- // All properties on cross-origin DOM objects are non-enumerable and -- // "configurable". Any value attributes are read-only. -- desc.attributesRef() &= ~JSPROP_ENUMERATE; -+ // All properties on cross-origin DOM objects are "configurable". Any -+ // value attributes are read-only. Indexed properties are enumerable, -+ // but nothing else is. -+ if (!JSID_IS_INT(id)) { -+ desc.attributesRef() &= ~JSPROP_ENUMERATE; -+ } - desc.attributesRef() &= ~JSPROP_PERMANENT; - if (!desc.getter() && !desc.setter()) - desc.attributesRef() |= JSPROP_READONLY; -diff --git testing/web-platform/meta/html/browsers/origin/cross-origin-objects/cross-origin-objects.html.ini testing/web-platform/meta/html/browsers/origin/cross-origin-objects/cross-origin-objects.html.ini -deleted file mode 100644 -index 6c5e683863e9..000000000000 ---- testing/web-platform/meta/html/browsers/origin/cross-origin-objects/cross-origin-objects.html.ini -+++ /dev/null -@@ -1,10 +0,0 @@ --[cross-origin-objects.html] -- type: testharness -- [[[GetOwnProperty\]\] - Property descriptors for cross-origin properties should be set up correctly] -- expected: FAIL -- -- [Can only enumerate safelisted properties] -- expected: FAIL -- -- [[[OwnPropertyKeys\]\] should return all properties from cross-origin objects] -- expected: FAIL -diff --git testing/web-platform/tests/html/browsers/origin/cross-origin-objects/cross-origin-objects.html testing/web-platform/tests/html/browsers/origin/cross-origin-objects/cross-origin-objects.html -index 06d96b11372d..f79f7ce4ae51 100644 ---- testing/web-platform/tests/html/browsers/origin/cross-origin-objects/cross-origin-objects.html -+++ testing/web-platform/tests/html/browsers/origin/cross-origin-objects/cross-origin-objects.html -@@ -184,17 +184,20 @@ addTest(function() { - }, "[[GetOwnProperty]] - Properties on cross-origin objects should be reported |own|"); - - function checkPropertyDescriptor(desc, propName, expectWritable) { -- var isSymbol = (typeof(propName) == "symbol"); -+ const isSymbol = typeof(propName) === "symbol"; -+ const isArrayIndexPropertyName = !isSymbol && !isNaN(parseInt(propName, 10)); - propName = String(propName); - assert_true(isObject(desc), "property descriptor for " + propName + " should exist"); - assert_equals(desc.configurable, true, "property descriptor for " + propName + " should be configurable"); -- if (isSymbol) { -- assert_equals(desc.enumerable, false, "symbol-property descriptor for " + propName + " should not be enumerable"); -- assert_true("value" in desc, -- "property descriptor for " + propName + " should be a value descriptor"); -- assert_equals(desc.value, undefined, -+ if (!isArrayIndexPropertyName) { -+ assert_equals(desc.enumerable, false, "property descriptor for " + propName + " should not be enumerable"); -+ if(isSymbol) { -+ assert_true("value" in desc, -+ "property descriptor for " + propName + " should be a value descriptor"); -+ assert_equals(desc.value, undefined, - "symbol-named cross-origin visible prop " + propName + - " should come back as undefined"); -+ } - } else { - assert_equals(desc.enumerable, true, "property descriptor for " + propName + " should be enumerable"); - } -@@ -265,16 +268,15 @@ addTest(function() { - let i = 0; - for (var prop in C) { - i++; -- assert_true(whitelistedWindowPropNames.includes(prop), prop + " is not safelisted for a cross-origin Window"); -+ assert_true(whitelistedWindowIndices.includes(prop), prop + " is not safelisted for a cross-origin Window"); - } -- assert_equals(i, whitelistedWindowPropNames.length, "Enumerate all safelisted cross-origin Window properties"); -+ assert_equals(i, whitelistedWindowIndices.length, "Enumerate all enumerable safelisted cross-origin Window properties"); - i = 0; - for (var prop in C.location) { - i++; -- assert_true(whitelistedLocationPropNames.includes(prop), prop + " is not safelisted for a cross-origin Location"); - } -- assert_equals(i, whitelistedLocationPropNames.length, "Enumerate all safelisted cross-origin Location properties"); --}, "Can only enumerate safelisted properties"); -+ assert_equals(i, 0, "There's nothing to enumerate for cross-origin Location properties"); -+}, "Can only enumerate safelisted enumerable properties"); - - /* - * [[OwnPropertyKeys]] -@@ -285,14 +287,13 @@ addTest(function() { - whitelistedWindowPropNames, - "Object.getOwnPropertyNames() gives the right answer for cross-origin Window"); - assert_array_equals(Object.keys(C).sort(), -- whitelistedWindowPropNames, -+ whitelistedWindowIndices, - "Object.keys() gives the right answer for cross-origin Window"); - assert_array_equals(Object.getOwnPropertyNames(C.location).sort(), - whitelistedLocationPropNames, - "Object.getOwnPropertyNames() gives the right answer for cross-origin Location"); -- assert_array_equals(Object.keys(C.location).sort(), -- whitelistedLocationPropNames, -- "Object.keys() gives the right answer for cross-origin Location"); -+ assert_equals(Object.keys(C.location).length, 0, -+ "Object.keys() gives the right answer for cross-origin Location"); - }, "[[OwnPropertyKeys]] should return all properties from cross-origin objects"); - - addTest(function() { -commit 25f3d350f097 -Author: Boris Zbarsky -Date: Tue Nov 7 16:55:29 2017 -0500 - - Bug 1414292 followup. Indexed properties are enumerable on Window per spec, and thus we fix the CLOSED TREE. - - MozReview-Commit-ID: 6Q76VqwSiEx ---- - js/xpconnect/tests/mochitest/test_bug862380.html | 21 ++++++++++++++++----- - 1 file changed, 16 insertions(+), 5 deletions(-) - -diff --git js/xpconnect/tests/mochitest/test_bug862380.html js/xpconnect/tests/mochitest/test_bug862380.html -index 0d3fb7329358..eb7cd99c3080 100644 ---- js/xpconnect/tests/mochitest/test_bug862380.html -+++ js/xpconnect/tests/mochitest/test_bug862380.html -@@ -13,16 +13,27 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=862380 - /** Test for Bug 862380 **/ - SimpleTest.waitForExplicitFinish(); - function go() { -- checkNotEnumerable($('ifr').contentWindow); -- checkNotEnumerable($('ifr').contentWindow.location); -+ checkNotEnumerable($('ifr').contentWindow, true); -+ checkNotEnumerable($('ifr').contentWindow.location, false); - SimpleTest.finish(); - } - -- function checkNotEnumerable(obj) { -+function checkNotEnumerable(obj, isWindow) { - try { -- is(Object.keys(obj).length, 0, "Object.keys gives empty array"); -+ const expectedWindow = ["0"]; -+ const expectedLocation = []; -+ const expected = isWindow ? expectedWindow : expectedLocation; -+ is(Object.keys(obj).length, expected.length, -+ "Object.keys gives right array length"); -+ var actual = []; - for (var i in obj) -- ok(false, "Enumerated something: " + i); -+ actual.push(i); -+ is(actual.length, expected.length, -+ "Enumeration sees the right number of props"); -+ actual.sort(); -+ expected.sort(); -+ for (var i = 0; i < actual.length; ++i) -+ is(actual[i], expected[i], "Arrays should be the same " + i); - } catch (e) { - ok(false, "threw: " + e); - } diff --git a/www/waterfox/files/patch-bug1414425 b/www/waterfox/files/patch-bug1414425 deleted file mode 100644 index 4ae66b3a662..00000000000 --- a/www/waterfox/files/patch-bug1414425 +++ /dev/null @@ -1,231 +0,0 @@ -commit 8dce7d3eb6a3 -Author: Valentin Gosu -Date: Thu Nov 9 16:32:51 2017 +0100 - - Bug 1414425 - Make sure the appropriate triggeringPrincipal is set for a meta refresh. r=bz, a=gchang - - MozReview-Commit-ID: 4Kn6P4hnx74 - - --HG-- - extra : source : 229546747cbf04cf71a235275d7c2eb2520a298b ---- - browser/base/content/tab-content.js | 2 +- - .../content/test/general/browser_refreshBlocker.js | 2 +- - docshell/base/nsDocShell.cpp | 28 +++++++++++++++------- - docshell/base/nsDocShell.h | 12 +++++++--- - docshell/base/nsIRefreshURI.idl | 23 ++++++++++++++---- - 5 files changed, 50 insertions(+), 17 deletions(-) - -diff --git browser/base/content/tab-content.js browser/base/content/tab-content.js -index 4d85ada0321b..5497a1cc208d 100644 ---- browser/base/content/tab-content.js -+++ browser/base/content/tab-content.js -@@ -995,7 +995,7 @@ var RefreshBlocker = { - - let URI = Services.io.newURI(data.URI); - -- refreshURI.forceRefreshURI(URI, data.delay, true); -+ refreshURI.forceRefreshURI(URI, null, data.delay, true); - } - }, - -diff --git browser/base/content/test/general/browser_refreshBlocker.js browser/base/content/test/general/browser_refreshBlocker.js -index cd82cf40b479..4a280d4cb12b 100644 ---- browser/base/content/test/general/browser_refreshBlocker.js -+++ browser/base/content/test/general/browser_refreshBlocker.js -@@ -20,7 +20,7 @@ async function attemptFakeRefresh(browser, expectRefresh) { - await ContentTask.spawn(browser, expectRefresh, async function(contentExpectRefresh) { - let URI = docShell.QueryInterface(Ci.nsIWebNavigation).currentURI; - let refresher = docShell.QueryInterface(Ci.nsIRefreshURI); -- refresher.refreshURI(URI, 0, false, true); -+ refresher.refreshURI(URI, null, 0, false, true); - - Assert.equal(refresher.refreshPending, contentExpectRefresh, - "Got the right refreshPending state"); -diff --git docshell/base/nsDocShell.cpp docshell/base/nsDocShell.cpp -index 3ded70a66fe8..83cb87dd8255 100644 ---- docshell/base/nsDocShell.cpp -+++ docshell/base/nsDocShell.cpp -@@ -6831,7 +6831,8 @@ nsDocShell::ScrollByPages(int32_t aNumPages) - //***************************************************************************** - - NS_IMETHODIMP --nsDocShell::RefreshURI(nsIURI* aURI, int32_t aDelay, bool aRepeat, -+nsDocShell::RefreshURI(nsIURI* aURI, nsIPrincipal* aPrincipal, -+ int32_t aDelay, bool aRepeat, - bool aMetaRefresh) - { - NS_ENSURE_ARG(aURI); -@@ -6860,7 +6861,7 @@ nsDocShell::RefreshURI(nsIURI* aURI, int32_t aDelay, bool aRepeat, - } - - nsCOMPtr refreshTimer = -- new nsRefreshTimer(this, aURI, aDelay, aRepeat, aMetaRefresh); -+ new nsRefreshTimer(this, aURI, aPrincipal, aDelay, aRepeat, aMetaRefresh); - - uint32_t busyFlags = 0; - GetBusyFlags(&busyFlags); -@@ -6891,6 +6892,7 @@ nsDocShell::RefreshURI(nsIURI* aURI, int32_t aDelay, bool aRepeat, - - nsresult - nsDocShell::ForceRefreshURIFromTimer(nsIURI* aURI, -+ nsIPrincipal* aPrincipal, - int32_t aDelay, - bool aMetaRefresh, - nsITimer* aTimer) -@@ -6911,11 +6913,11 @@ nsDocShell::ForceRefreshURIFromTimer(nsIURI* aURI, - } - } - -- return ForceRefreshURI(aURI, aDelay, aMetaRefresh); -+ return ForceRefreshURI(aURI, aPrincipal, aDelay, aMetaRefresh); - } - - NS_IMETHODIMP --nsDocShell::ForceRefreshURI(nsIURI* aURI, int32_t aDelay, bool aMetaRefresh) -+nsDocShell::ForceRefreshURI(nsIURI* aURI, nsIPrincipal* aPrincipal, int32_t aDelay, bool aMetaRefresh) - { - NS_ENSURE_ARG(aURI); - -@@ -6963,6 +6965,13 @@ nsDocShell::ForceRefreshURI(nsIURI* aURI, int32_t aDelay, bool aMetaRefresh) - loadInfo->SetLoadType(nsIDocShellLoadInfo::loadRefresh); - } - -+ // If the principal is null, the refresh will have a triggeringPrincipal -+ // derived from the referrer URI, or will be set to the system principal -+ // if there is no refererrer. See LoadURI() -+ if (aPrincipal) { -+ loadInfo->SetTriggeringPrincipal(aPrincipal); -+ } -+ - /* - * LoadURI(...) will cancel all refresh timers... This causes the - * Timer and its refreshData instance to be released... -@@ -7203,7 +7212,7 @@ nsDocShell::SetupRefreshURIFromHeader(nsIURI* aBaseURI, - return NS_ERROR_FAILURE; - } - -- rv = RefreshURI(uri, seconds * 1000, false, true); -+ rv = RefreshURI(uri, aPrincipal, seconds * 1000, false, true); - } - } - } -@@ -13793,9 +13802,12 @@ nsDocShell::SetLayoutHistoryState(nsILayoutHistoryState* aLayoutHistoryState) - return NS_OK; - } - --nsRefreshTimer::nsRefreshTimer(nsDocShell* aDocShell, nsIURI* aURI, -+nsRefreshTimer::nsRefreshTimer(nsDocShell* aDocShell, -+ nsIURI* aURI, -+ nsIPrincipal* aPrincipal, - int32_t aDelay, bool aRepeat, bool aMetaRefresh) -- : mDocShell(aDocShell), mURI(aURI), mDelay(aDelay), mRepeat(aRepeat), -+ : mDocShell(aDocShell), mURI(aURI), mPrincipal(aPrincipal), -+ mDelay(aDelay), mRepeat(aRepeat), - mMetaRefresh(aMetaRefresh) - { - } -@@ -13822,7 +13834,7 @@ nsRefreshTimer::Notify(nsITimer* aTimer) - // Get the delay count to determine load type - uint32_t delay = 0; - aTimer->GetDelay(&delay); -- mDocShell->ForceRefreshURIFromTimer(mURI, delay, mMetaRefresh, aTimer); -+ mDocShell->ForceRefreshURIFromTimer(mURI, mPrincipal, delay, mMetaRefresh, aTimer); - } - return NS_OK; - } -diff --git docshell/base/nsDocShell.h docshell/base/nsDocShell.h -index f805deaa2edf..57fc63fe5795 100644 ---- docshell/base/nsDocShell.h -+++ docshell/base/nsDocShell.h -@@ -114,8 +114,12 @@ class nsRefreshTimer : public nsITimerCallback - , public nsINamed - { - public: -- nsRefreshTimer(nsDocShell* aDocShell, nsIURI* aURI, int32_t aDelay, -- bool aRepeat, bool aMetaRefresh); -+ nsRefreshTimer(nsDocShell* aDocShell, -+ nsIURI* aURI, -+ nsIPrincipal* aPrincipal, -+ int32_t aDelay, -+ bool aRepeat, -+ bool aMetaRefresh); - - NS_DECL_THREADSAFE_ISUPPORTS - NS_DECL_NSITIMERCALLBACK -@@ -125,6 +129,7 @@ public: - - RefPtr mDocShell; - nsCOMPtr mURI; -+ nsCOMPtr mPrincipal; - int32_t mDelay; - bool mRepeat; - bool mMetaRefresh; -@@ -259,7 +264,8 @@ public: - // ForceRefreshURI method on nsIRefreshURI, but makes sure to take - // the timer involved out of mRefreshURIList if it's there. - // aTimer must not be null. -- nsresult ForceRefreshURIFromTimer(nsIURI* aURI, int32_t aDelay, -+ nsresult ForceRefreshURIFromTimer(nsIURI* aURI, nsIPrincipal* aPrincipal, -+ int32_t aDelay, - bool aMetaRefresh, nsITimer* aTimer); - - friend class OnLinkClickEvent; -diff --git docshell/base/nsIRefreshURI.idl docshell/base/nsIRefreshURI.idl -index f872d8b7f5cf..3e85e4c516c6 100644 ---- docshell/base/nsIRefreshURI.idl -+++ docshell/base/nsIRefreshURI.idl -@@ -18,23 +18,33 @@ interface nsIRefreshURI : nsISupports { - * queued and executed when the current load finishes. - * - * @param aUri The uri to refresh. -+ * @param aPrincipal The triggeringPrincipal for the refresh load -+ * May be null, in which case a principal will be built based on the -+ * referrer URI of the previous docshell load, or will use the system -+ * principal when there is no referrer. - * @param aMillis The number of milliseconds to wait. - * @param aRepeat Flag to indicate if the uri is to be - * repeatedly refreshed every aMillis milliseconds. - * @param aMetaRefresh Flag to indicate if this is a Meta refresh. - */ -- void refreshURI(in nsIURI aURI, in long aMillis, in boolean aRepeat, -+ void refreshURI(in nsIURI aURI, in nsIPrincipal aPrincipal, -+ in long aMillis, in boolean aRepeat, - in boolean aMetaRefresh); - - /** - * Loads a URI immediately as if it were a refresh. - * - * @param aURI The URI to refresh. -+ * @param aPrincipal The triggeringPrincipal for the refresh load -+ * May be null, in which case a principal will be built based on the -+ * referrer URI of the previous docshell load, or will use the system -+ * principal when there is no referrer. - * @param aMillis The number of milliseconds by which this refresh would - * be delayed if it were not being forced. - * @param aMetaRefresh Flag to indicate if this is a meta refresh. - */ -- void forceRefreshURI(in nsIURI aURI, in long aMillis, in boolean aMetaRefresh); -+ void forceRefreshURI(in nsIURI aURI, in nsIPrincipal aPrincipal, -+ in long aMillis, in boolean aMetaRefresh); - - /** - * Checks the passed in channel to see if there is a refresh header, -@@ -57,10 +67,15 @@ interface nsIRefreshURI : nsISupports { - * the current page finishes loading. - * - * @param aBaseURI base URI to resolve refresh uri with. -- * @param principal the associated principal -+ * @param aPrincipal The triggeringPrincipal for the refresh load -+ * May be null, in which case a principal will be built based on the -+ * referrer URI of the previous docshell load, or will use the system -+ * principal when there is no referrer. - * @param aHeader The meta refresh header string. - */ -- void setupRefreshURIFromHeader(in nsIURI aBaseURI, in nsIPrincipal principal, in ACString aHeader); -+ void setupRefreshURIFromHeader(in nsIURI aBaseURI, -+ in nsIPrincipal principal, -+ in ACString aHeader); - - /** - * Cancels all timer loads. diff --git a/www/waterfox/files/patch-bug1414452 b/www/waterfox/files/patch-bug1414452 deleted file mode 100644 index 695ea3e848a..00000000000 --- a/www/waterfox/files/patch-bug1414452 +++ /dev/null @@ -1,70 +0,0 @@ -commit 24a8b8309514 -Author: Olli Pettay -Date: Tue Nov 28 16:17:17 2017 +0200 - - Bug 1414452 - Clear dirAutoSetBy properties iteratively. r=peterv, a=abillings - - --HG-- - extra : source : 157a15cd5ecc8706b502f78c51e79b58ac59eaf0 ---- - dom/base/DirectionalityUtils.cpp | 23 +++++++++++++---------- - 1 file changed, 13 insertions(+), 10 deletions(-) - -diff --git dom/base/DirectionalityUtils.cpp dom/base/DirectionalityUtils.cpp -index fb443e23688c..f132c8970fe7 100644 ---- dom/base/DirectionalityUtils.cpp -+++ dom/base/DirectionalityUtils.cpp -@@ -419,7 +419,7 @@ class nsTextNodeDirectionalityMap - - nsTextNodeDirectionalityMap* map = - reinterpret_cast(aPropertyValue); -- map->EnsureMapIsClear(textNode); -+ map->EnsureMapIsClear(); - delete map; - } - -@@ -548,11 +548,11 @@ private: - return OpRemove; - } - -- static nsCheapSetOperator ClearEntry(nsPtrHashKey* aEntry, void* aData) -+ static nsCheapSetOperator TakeEntries(nsPtrHashKey* aEntry, void* aData) - { -- Element* rootNode = aEntry->GetKey(); -- rootNode->ClearHasDirAutoSet(); -- rootNode->DeleteProperty(nsGkAtoms::dirAutoSetBy); -+ AutoTArray* entries = -+ static_cast*>(aData); -+ entries->AppendElement(aEntry->GetKey()); - return OpRemove; - } - -@@ -568,12 +568,15 @@ public: - mElements.EnumerateEntries(ResetNodeDirection, &data); - } - -- void EnsureMapIsClear(nsINode* aTextNode) -+ void EnsureMapIsClear() - { - AutoRestore restore(mElementToBeRemoved); -- DebugOnly clearedEntries = -- mElements.EnumerateEntries(ClearEntry, aTextNode); -- MOZ_ASSERT(clearedEntries == 0, "Map should be empty already"); -+ AutoTArray entries; -+ mElements.EnumerateEntries(TakeEntries, &entries); -+ for (Element* el : entries) { -+ el->ClearHasDirAutoSet(); -+ el->DeleteProperty(nsGkAtoms::dirAutoSetBy); -+ } - } - - static void RemoveElementFromMap(nsTextNode* aTextNode, Element* aElement) -@@ -613,7 +616,7 @@ public: - static void EnsureMapIsClearFor(nsINode* aTextNode) - { - if (aTextNode->HasTextNodeDirectionalityMap()) { -- GetDirectionalityMap(aTextNode)->EnsureMapIsClear(aTextNode); -+ GetDirectionalityMap(aTextNode)->EnsureMapIsClear(); - } - } - }; diff --git a/www/waterfox/files/patch-bug1414945 b/www/waterfox/files/patch-bug1414945 deleted file mode 100644 index 3b57e971dc9..00000000000 --- a/www/waterfox/files/patch-bug1414945 +++ /dev/null @@ -1,43 +0,0 @@ -commit 26740772e0c9 -Author: Philip Chimento -Date: Mon Nov 6 15:49:15 2017 -0800 - - Bug 1414945 - Don't use TimeDuration in static initializer. r=jandem - - On Darwin this would cause a race between two static initializers. - - --HG-- - extra : rebase_source : 0547c4018334f7112022f1893c5f36a47dc14501 ---- - js/src/shell/js.cpp | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git js/src/shell/js.cpp js/src/shell/js.cpp -index afb4990ecc0f..f8f81446c7ae 100644 ---- js/src/shell/js.cpp -+++ js/src/shell/js.cpp -@@ -150,7 +150,7 @@ static const size_t gMaxStackSize = 128 * sizeof(size_t) * 1024; - * Limit the timeout to 30 minutes to prevent an overflow on platfoms - * that represent the time internally in microseconds using 32-bit int. - */ --static const TimeDuration MAX_TIMEOUT_INTERVAL = TimeDuration::FromSeconds(1800.0); -+static const double MAX_TIMEOUT_SECONDS = 1800.0; - - // SharedArrayBuffer and Atomics are enabled by default (tracking Firefox). - #define SHARED_MEMORY_DEFAULT 1 -@@ -3852,6 +3852,7 @@ Sleep_fn(JSContext* cx, unsigned argc, Value* vp) - } - - duration = TimeDuration::FromSeconds(Max(0.0, t_secs)); -+ const TimeDuration MAX_TIMEOUT_INTERVAL = TimeDuration::FromSeconds(MAX_TIMEOUT_SECONDS); - if (duration > MAX_TIMEOUT_INTERVAL) { - JS_ReportErrorASCII(cx, "Excessive sleep interval"); - return false; -@@ -4019,6 +4020,7 @@ SetTimeoutValue(JSContext* cx, double t) - JS_ReportErrorASCII(cx, "timeout is not a number"); - return false; - } -+ const TimeDuration MAX_TIMEOUT_INTERVAL = TimeDuration::FromSeconds(MAX_TIMEOUT_SECONDS); - if (TimeDuration::FromSeconds(t) > MAX_TIMEOUT_INTERVAL) { - JS_ReportErrorASCII(cx, "Excessive timeout value"); - return false; diff --git a/www/waterfox/files/patch-bug1415291 b/www/waterfox/files/patch-bug1415291 deleted file mode 100644 index e4bdf334753..00000000000 --- a/www/waterfox/files/patch-bug1415291 +++ /dev/null @@ -1,52 +0,0 @@ -commit e5ec8a70ef9e -Author: Luke Wagner -Date: Sat Dec 2 12:33:29 2017 -0500 - - Bug 1415291 - Baldr: factor out ToTableIndex(). r=bbouvier, a=gchang ---- - js/src/wasm/WasmJS.cpp | 18 ++++++++++++++++-- - 1 file changed, 16 insertions(+), 2 deletions(-) - -diff --git js/src/wasm/WasmJS.cpp js/src/wasm/WasmJS.cpp -index 1d07b0d065fe..482de9788221 100644 ---- js/src/wasm/WasmJS.cpp -+++ js/src/wasm/WasmJS.cpp -@@ -1694,6 +1694,20 @@ const JSPropertySpec WasmTableObject::properties[] = - JS_PS_END - }; - -+static bool -+ToTableIndex(JSContext* cx, HandleValue v, const Table& table, const char* noun, uint32_t* index) -+{ -+ if (!ToNonWrappingUint32(cx, v, UINT32_MAX, "Table", noun, index)) -+ return false; -+ -+ if (*index >= table.length()) { -+ JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, JSMSG_WASM_BAD_UINT32, "Table", noun); -+ return false; -+ } -+ -+ return true; -+} -+ - /* static */ bool - WasmTableObject::getImpl(JSContext* cx, const CallArgs& args) - { -@@ -1701,7 +1715,7 @@ WasmTableObject::getImpl(JSContext* cx, const CallArgs& args) - const Table& table = tableObj->table(); - - uint32_t index; -- if (!ToNonWrappingUint32(cx, args.get(0), table.length() - 1, "Table", "get index", &index)) -+ if (!ToTableIndex(cx, args.get(0), table, "get index", &index)) - return false; - - ExternalTableElem& elem = table.externalArray()[index]; -@@ -1740,7 +1754,7 @@ WasmTableObject::setImpl(JSContext* cx, const CallArgs& args) - return false; - - uint32_t index; -- if (!ToNonWrappingUint32(cx, args.get(0), table.length() - 1, "Table", "set index", &index)) -+ if (!ToTableIndex(cx, args.get(0), table, "set index", &index)) - return false; - - RootedFunction value(cx); diff --git a/www/waterfox/files/patch-bug1415441 b/www/waterfox/files/patch-bug1415441 deleted file mode 100644 index c51fed60cfe..00000000000 --- a/www/waterfox/files/patch-bug1415441 +++ /dev/null @@ -1,22 +0,0 @@ -commit 8b02d6d479da -Author: JW Wang -Date: Fri Dec 8 10:01:18 2017 +0800 - - Bug 1415441 - Eagerly init gMediaDecoderLog to debug crash. r=cpearce, a=jcristau ---- - dom/media/MediaDecoder.cpp | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git dom/media/MediaDecoder.cpp dom/media/MediaDecoder.cpp -index cbf97ddf084d..5de31894d9d9 100644 ---- dom/media/MediaDecoder.cpp -+++ dom/media/MediaDecoder.cpp -@@ -280,6 +280,8 @@ void - MediaDecoder::InitStatics() - { - MOZ_ASSERT(NS_IsMainThread()); -+ // Eagerly init gMediaDecoderLog to work around bug 1415441. -+ MOZ_LOG(gMediaDecoderLog, LogLevel::Info, ("MediaDecoder::InitStatics")); - } - - NS_IMPL_ISUPPORTS(MediaMemoryTracker, nsIMemoryReporter) diff --git a/www/waterfox/files/patch-bug1415582 b/www/waterfox/files/patch-bug1415582 deleted file mode 100644 index 47faa0eb70d..00000000000 --- a/www/waterfox/files/patch-bug1415582 +++ /dev/null @@ -1,34 +0,0 @@ -commit 1ab98367b3c1 -Author: Randell Jesup -Date: Wed Nov 8 11:00:24 2017 -0500 - - Bug 1415582 - Mirror changes done to Encoder InitDone to decoder. r=bwc, a=gchang - - --HG-- - extra : source : 833205c1f498bed137fb2e0a06d14ef31e3c0609 ---- - media/webrtc/signaling/src/media-conduit/WebrtcGmpVideoCodec.h | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git media/webrtc/signaling/src/media-conduit/WebrtcGmpVideoCodec.h media/webrtc/signaling/src/media-conduit/WebrtcGmpVideoCodec.h -index b8067a278f18..50189c488df1 100644 ---- media/webrtc/signaling/src/media-conduit/WebrtcGmpVideoCodec.h -+++ media/webrtc/signaling/src/media-conduit/WebrtcGmpVideoCodec.h -@@ -449,7 +449,7 @@ private: - class InitDoneCallback : public GetGMPVideoDecoderCallback - { - public: -- explicit InitDoneCallback(WebrtcGmpVideoDecoder* aDecoder, -+ explicit InitDoneCallback(const RefPtr& aDecoder, - const RefPtr& aInitDone) - : mDecoder(aDecoder), - mInitDone(aInitDone) -@@ -465,7 +465,7 @@ private: - } - - private: -- WebrtcGmpVideoDecoder* mDecoder; -+ RefPtr mDecoder; - RefPtr mInitDone; - }; - diff --git a/www/waterfox/files/patch-bug1415598 b/www/waterfox/files/patch-bug1415598 deleted file mode 100644 index 6fd819610ca..00000000000 --- a/www/waterfox/files/patch-bug1415598 +++ /dev/null @@ -1,58 +0,0 @@ -commit 63db080ae5cb -Author: Marco Bonardo -Date: Thu Dec 7 15:28:41 2017 +0100 - - Bug 1415598. r=gijs, a=jcristau - - --HG-- - extra : source : 94f1fb1043a81e619d7b73d48a86d66d1cf4eebc ---- - toolkit/components/places/History.cpp | 15 ++++++++++++++- - 1 file changed, 14 insertions(+), 1 deletion(-) - -diff --git toolkit/components/places/History.cpp toolkit/components/places/History.cpp -index 94755d3bdde5..b3618c065601 100644 ---- toolkit/components/places/History.cpp -+++ toolkit/components/places/History.cpp -@@ -1955,6 +1955,7 @@ History::InitMemoryReporter() - NS_IMETHODIMP - History::NotifyVisited(nsIURI* aURI) - { -+ MOZ_ASSERT(NS_IsMainThread()); - NS_ENSURE_ARG(aURI); - - nsAutoScriptBlocker scriptBlocker; -@@ -2565,6 +2566,7 @@ NS_IMETHODIMP - History::RegisterVisitedCallback(nsIURI* aURI, - Link* aLink) - { -+ MOZ_ASSERT(NS_IsMainThread()); - NS_ASSERTION(aURI, "Must pass a non-null URI!"); - if (XRE_IsContentProcess()) { - NS_PRECONDITION(aLink, "Must pass a non-null Link!"); -@@ -2594,7 +2596,16 @@ History::RegisterVisitedCallback(nsIURI* aURI, - if (NS_FAILED(rv) || !aLink) { - // Remove our array from the hashtable so we don't keep it around. - MOZ_ASSERT(key == mObservers.GetEntry(aURI), "The URIs hash mutated!"); -- mObservers.RemoveEntry(key); -+ // In some case calling RemoveEntry on the key obtained by PutEntry -+ // crashes for currently unknown reasons. Our suspect is that something -+ // between PutEntry and this call causes a nested loop that either removes -+ // the entry or reallocs the hash. -+ // TODO (Bug 1412647): we must figure the root cause for these issues and -+ // remove this stop-gap crash fix. -+ key = mObservers.GetEntry(aURI); -+ if (key) { -+ mObservers.RemoveEntry(key); -+ } - return rv; - } - } -@@ -2626,6 +2637,7 @@ NS_IMETHODIMP - History::UnregisterVisitedCallback(nsIURI* aURI, - Link* aLink) - { -+ MOZ_ASSERT(NS_IsMainThread()); - // TODO: aURI is sometimes null - see bug 548685 - NS_ASSERTION(aURI, "Must pass a non-null URI!"); - NS_ASSERTION(aLink, "Must pass a non-null Link object!"); diff --git a/www/waterfox/files/patch-bug1415883 b/www/waterfox/files/patch-bug1415883 deleted file mode 100644 index 3d862aa510c..00000000000 --- a/www/waterfox/files/patch-bug1415883 +++ /dev/null @@ -1,44 +0,0 @@ -commit a4d70f676839 -Author: Jan de Mooij -Date: Wed Nov 29 16:03:12 2017 +0100 - - Bug 1415883 - Fix some issues in ShiftFromList. r=arai, a=abillings - - --HG-- - extra : source : 2467d71d0e0de20103ce61cdd221461a48e4591b ---- - js/src/vm/List-inl.h | 4 ++-- - js/src/vm/NativeObject.cpp | 2 ++ - 2 files changed, 4 insertions(+), 2 deletions(-) - -diff --git js/src/builtin/Stream.cpp js/src/builtin/Stream.cpp -index e53f811a02e1..28cafd6c06d6 100644 ---- js/src/builtin/Stream.cpp -+++ js/src/builtin/Stream.cpp -@@ -357,11 +357,11 @@ ShiftFromList(JSContext* cx, HandleNativeObject list) - Rooted entry(cx, &list->getDenseElement(0).toObject().as()); - if (!list->tryShiftDenseElements(1)) { - list->moveDenseElements(0, 1, length - 1); -+ list->setDenseInitializedLength(length - 1); - list->shrinkElements(cx, length - 1); - } - -- list->setDenseInitializedLength(length - 1); -- -+ MOZ_ASSERT(list->getDenseInitializedLength() == length - 1); - return entry; - } - -diff --git js/src/vm/NativeObject.cpp js/src/vm/NativeObject.cpp -index 780bc74192dc..deab37154af2 100644 ---- js/src/vm/NativeObject.cpp -+++ js/src/vm/NativeObject.cpp -@@ -1000,6 +1000,8 @@ void - NativeObject::shrinkElements(JSContext* cx, uint32_t reqCapacity) - { - MOZ_ASSERT(canHaveNonEmptyElements()); -+ MOZ_ASSERT(reqCapacity >= getDenseInitializedLength()); -+ - if (denseElementsAreCopyOnWrite()) - MOZ_CRASH(); - diff --git a/www/waterfox/files/patch-bug1415946 b/www/waterfox/files/patch-bug1415946 deleted file mode 100644 index 9bc3ea84653..00000000000 --- a/www/waterfox/files/patch-bug1415946 +++ /dev/null @@ -1,33 +0,0 @@ -commit 9a1395f61292 -Author: Emilio Cobos Álvarez -Date: Fri Nov 10 17:33:00 2017 -0500 - - Bug 1415946 - Make font-variant-alternates: historical-forms parsing ascii case insensitive. r=jfkthame, a=sledru - - MozReview-Commit-ID: 42bKZEgysdW ---- - servo/components/style/properties/longhand/font.mako.rs | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git servo/components/style/properties/longhand/font.mako.rs servo/components/style/properties/longhand/font.mako.rs -index b880cd335321..91d2c254d219 100644 ---- servo/components/style/properties/longhand/font.mako.rs -+++ servo/components/style/properties/longhand/font.mako.rs -@@ -1450,6 +1450,8 @@ ${helpers.single_keyword_system("font-kerning", - /// annotation() ] - pub fn parse<'i, 't>(_context: &ParserContext, input: &mut Parser<'i, 't>) - -> Result> { -+ #[allow(unused_imports)] use std::ascii::AsciiExt; -+ - let mut alternates = Vec::new(); - if input.try(|input| input.expect_ident_matching("normal")).is_ok() { - return Ok(SpecifiedValue::Value(VariantAlternatesList(alternates.into_boxed_slice()))); -@@ -1468,7 +1470,7 @@ ${helpers.single_keyword_system("font-kerning", - // FIXME: remove clone() when lifetimes are non-lexical - match input.next()?.clone() { - Token::Ident(ref ident) => { -- if *ident == "historical-forms" { -+ if ident.eq_ignore_ascii_case("historical-forms") { - check_if_parsed!(HISTORICAL_FORMS); - alternates.push(VariantAlternates::HistoricalForms); - Ok(()) diff --git a/www/waterfox/files/patch-bug1416307 b/www/waterfox/files/patch-bug1416307 deleted file mode 100644 index 7d77ad31793..00000000000 --- a/www/waterfox/files/patch-bug1416307 +++ /dev/null @@ -1,94 +0,0 @@ -commit 1159955c684f -Author: Samael Wang -Date: Tue Feb 6 13:28:30 2018 -0500 - - Bug 1416307 - Set triggeringPrincipal to current document's principal, if aPrincipal is not given. r=bz a=ritu - - MozReview-Commit-ID: 8lxKFeUlyzq - - --HG-- - extra : source : 9fcf48189000ab8ee16f236be57c9659c7243b42 ---- - docshell/base/nsDocShell.cpp | 21 +++++++++++---------- - docshell/base/nsIRefreshURI.idl | 15 ++++++--------- - 2 files changed, 17 insertions(+), 19 deletions(-) - -diff --git docshell/base/nsDocShell.cpp docshell/base/nsDocShell.cpp -index fa3707880772..84a9086a1a00 100644 ---- docshell/base/nsDocShell.cpp -+++ docshell/base/nsDocShell.cpp -@@ -6396,9 +6396,17 @@ nsDocShell::ForceRefreshURI(nsIURI* aURI, nsIPrincipal* aPrincipal, int32_t aDel - */ - loadInfo->SetReferrer(mCurrentURI); - -- /* Don't ever "guess" on which principal to use to avoid picking -- * the current principal. -- */ -+ // Set the triggering pricipal to aPrincipal if available, or current -+ // document's principal otherwise. -+ nsCOMPtr principal = aPrincipal; -+ if (!principal) { -+ nsCOMPtr doc = GetDocument(); -+ if (!doc) { -+ return NS_ERROR_FAILURE; -+ } -+ principal = doc->NodePrincipal(); -+ } -+ loadInfo->SetTriggeringPrincipal(principal); - loadInfo->SetPrincipalIsExplicit(true); - - /* Check if this META refresh causes a redirection -@@ -6426,13 +6434,6 @@ nsDocShell::ForceRefreshURI(nsIURI* aURI, nsIPrincipal* aPrincipal, int32_t aDel - loadInfo->SetLoadType(nsIDocShellLoadInfo::loadRefresh); - } - -- // If the principal is null, the refresh will have a triggeringPrincipal -- // derived from the referrer URI, or will be set to the system principal -- // if there is no refererrer. See LoadURI() -- if (aPrincipal) { -- loadInfo->SetTriggeringPrincipal(aPrincipal); -- } -- - /* - * LoadURI(...) will cancel all refresh timers... This causes the - * Timer and its refreshData instance to be released... -diff --git docshell/base/nsIRefreshURI.idl docshell/base/nsIRefreshURI.idl -index 3e85e4c516c6..77d8fd660674 100644 ---- docshell/base/nsIRefreshURI.idl -+++ docshell/base/nsIRefreshURI.idl -@@ -19,9 +19,8 @@ interface nsIRefreshURI : nsISupports { - * - * @param aUri The uri to refresh. - * @param aPrincipal The triggeringPrincipal for the refresh load -- * May be null, in which case a principal will be built based on the -- * referrer URI of the previous docshell load, or will use the system -- * principal when there is no referrer. -+ * May be null, in which case the principal of current document will be -+ * applied. - * @param aMillis The number of milliseconds to wait. - * @param aRepeat Flag to indicate if the uri is to be - * repeatedly refreshed every aMillis milliseconds. -@@ -36,9 +35,8 @@ interface nsIRefreshURI : nsISupports { - * - * @param aURI The URI to refresh. - * @param aPrincipal The triggeringPrincipal for the refresh load -- * May be null, in which case a principal will be built based on the -- * referrer URI of the previous docshell load, or will use the system -- * principal when there is no referrer. -+ * May be null, in which case the principal of current document will be -+ * applied. - * @param aMillis The number of milliseconds by which this refresh would - * be delayed if it were not being forced. - * @param aMetaRefresh Flag to indicate if this is a meta refresh. -@@ -68,9 +66,8 @@ interface nsIRefreshURI : nsISupports { - * - * @param aBaseURI base URI to resolve refresh uri with. - * @param aPrincipal The triggeringPrincipal for the refresh load -- * May be null, in which case a principal will be built based on the -- * referrer URI of the previous docshell load, or will use the system -- * principal when there is no referrer. -+ * May be null, in which case the principal of current document will be -+ * applied. - * @param aHeader The meta refresh header string. - */ - void setupRefreshURIFromHeader(in nsIURI aBaseURI, diff --git a/www/waterfox/files/patch-bug1416529 b/www/waterfox/files/patch-bug1416529 deleted file mode 100644 index a88f4e28941..00000000000 --- a/www/waterfox/files/patch-bug1416529 +++ /dev/null @@ -1,101 +0,0 @@ -commit 4cfa1b84d80c -Author: Nicholas Hurley -Date: Fri Feb 2 11:03:08 2018 -0800 - - Bug 1416529 r=mcmanus a=ritu - MozReview-Commit-ID: CD1l5vLB4yy - - --HG-- - extra : amend_source : 44c6368af20b158091a90c627ea4f206871dfa9d ---- - netwerk/protocol/http/Http2Session.cpp | 18 +++++++++--------- - netwerk/protocol/http/Http2Stream.cpp | 14 ++++++++++++++ - netwerk/protocol/http/Http2Stream.h | 1 + - 3 files changed, 24 insertions(+), 9 deletions(-) - -diff --git netwerk/protocol/http/Http2Session.cpp netwerk/protocol/http/Http2Session.cpp -index 9fd021065742..622c1657027a 100644 ---- netwerk/protocol/http/Http2Session.cpp -+++ netwerk/protocol/http/Http2Session.cpp -@@ -1136,6 +1136,15 @@ Http2Session::CleanupStream(Http2Stream *aStream, nsresult aResult, - return; - } - -+ Http2PushedStream *pushSource = aStream->PushSource(); -+ if (pushSource) { -+ // aStream is a synthetic attached to an even push -+ MOZ_ASSERT(pushSource->GetConsumerStream() == aStream); -+ MOZ_ASSERT(!aStream->StreamID()); -+ MOZ_ASSERT(!(pushSource->StreamID() & 0x1)); -+ aStream->ClearPushSource(); -+ } -+ - if (aStream->DeferCleanup(aResult)) { - LOG3(("Http2Session::CleanupStream 0x%X deferred\n", aStream->StreamID())); - return; -@@ -1146,15 +1155,6 @@ Http2Session::CleanupStream(Http2Stream *aStream, nsresult aResult, - return; - } - -- Http2PushedStream *pushSource = aStream->PushSource(); -- if (pushSource) { -- // aStream is a synthetic attached to an even push -- MOZ_ASSERT(pushSource->GetConsumerStream() == aStream); -- MOZ_ASSERT(!aStream->StreamID()); -- MOZ_ASSERT(!(pushSource->StreamID() & 0x1)); -- pushSource->SetConsumerStream(nullptr); -- } -- - // don't reset a stream that has recevied a fin or rst - if (!aStream->RecvdFin() && !aStream->RecvdReset() && aStream->StreamID() && - !(mInputFrameFinal && (aStream == mInputFrameDataStream))) { // !(recvdfin with mark pending) -diff --git netwerk/protocol/http/Http2Stream.cpp netwerk/protocol/http/Http2Stream.cpp -index d2f304b5ed7b..95674d018ab1 100644 ---- netwerk/protocol/http/Http2Stream.cpp -+++ netwerk/protocol/http/Http2Stream.cpp -@@ -112,12 +112,22 @@ Http2Stream::Http2Stream(nsAHttpTransaction *httpTransaction, - - Http2Stream::~Http2Stream() - { -+ ClearPushSource(); - ClearTransactionsBlockedOnTunnel(); - mStreamID = Http2Session::kDeadStreamID; - - LOG3(("Http2Stream::~Http2Stream %p", this)); - } - -+void -+Http2Stream::ClearPushSource() -+{ -+ if (mPushSource) { -+ mPushSource->SetConsumerStream(nullptr); -+ mPushSource = nullptr; -+ } -+} -+ - // ReadSegments() is used to write data down the socket. Generally, HTTP - // request data is pulled from the approriate transaction and - // converted to HTTP/2 data. Sometimes control data like a window-update is -@@ -1135,6 +1145,10 @@ Http2Stream::ConvertPushHeaders(Http2Decompressor *decompressor, - void - Http2Stream::Close(nsresult reason) - { -+ // In case we are connected to a push, make sure the push knows we are closed, -+ // so it doesn't try to give us any more DATA that comes on it after our close. -+ ClearPushSource(); -+ - mTransaction->Close(reason); - } - -diff --git netwerk/protocol/http/Http2Stream.h netwerk/protocol/http/Http2Stream.h -index 3412eb56f809..29f98163c4ac 100644 ---- netwerk/protocol/http/Http2Stream.h -+++ netwerk/protocol/http/Http2Stream.h -@@ -56,6 +56,7 @@ public: - - uint32_t StreamID() { return mStreamID; } - Http2PushedStream *PushSource() { return mPushSource; } -+ void ClearPushSource(); - - stateType HTTPState() { return mState; } - void SetHTTPState(stateType val) { mState = val; } diff --git a/www/waterfox/files/patch-bug1417661 b/www/waterfox/files/patch-bug1417661 deleted file mode 100644 index a9ac6a9835c..00000000000 --- a/www/waterfox/files/patch-bug1417661 +++ /dev/null @@ -1,37 +0,0 @@ -commit ad9b162b2a97 -Author: Emilio Cobos Álvarez -Date: Tue Nov 28 19:27:49 2017 +0100 - - Bug 1417661 - Use the correct parent style for inheriting from first-letter if the container is an anonymous box. r=bz, a=gchang - - MozReview-Commit-ID: 1B7DrAVa274 - - --HG-- - extra : source : 2be23298d4872b9d1677b6014683f554d857966f ---- - layout/base/nsCSSFrameConstructor.cpp | 8 +++++--- - 1 file changed, 5 insertions(+), 3 deletions(-) - -diff --git layout/base/nsCSSFrameConstructor.cpp layout/base/nsCSSFrameConstructor.cpp -index f9994b31e649..0da45cc33544 100644 ---- layout/base/nsCSSFrameConstructor.cpp -+++ layout/base/nsCSSFrameConstructor.cpp -@@ -11666,13 +11666,15 @@ nsCSSFrameConstructor::CreateLetterFrame(nsContainerFrame* aBlockFrame, - - if (sc) { - if (sc->IsServo() && parentFrame->IsLineFrame()) { -- ServoStyleContext* parentStyleIgnoringFirstLine = -- aBlockFrame->StyleContext()->AsServo(); -+ nsIFrame* parentIgnoringFirstLine = -+ nsFrame::CorrectStyleParentFrame(aBlockFrame, -+ nsCSSPseudoElements::firstLetter); -+ - sc = - mPresShell->StyleSet()->AsServo()->ReparentStyleContext( - sc->AsServo(), - parentStyleContext->AsServo(), -- parentStyleIgnoringFirstLine, -+ parentIgnoringFirstLine->StyleContext()->AsServo(), - parentStyleContext->AsServo(), - blockContent->AsElement()); - } diff --git a/www/waterfox/files/patch-bug1417751 b/www/waterfox/files/patch-bug1417751 deleted file mode 100644 index aea1eddf0f5..00000000000 --- a/www/waterfox/files/patch-bug1417751 +++ /dev/null @@ -1,379 +0,0 @@ -commit e889dbe68557 -Author: lochang -Date: Wed Nov 29 10:43:13 2017 +0800 - - Bug 1417751 - Implement a new value inner-spin-button to -moz-appearance on all platforms except Android. r=mats - - MozReview-Commit-ID: 7jpLCOWZA2x - - --HG-- - extra : rebase_source : d2a4d160d26e6f6996ed1cb3a673576236b8ef23 ---- - devtools/shared/css/generated/properties-db.js | 2 ++ - gfx/src/nsThemeConstants.h | 3 ++ - layout/style/nsCSSKeywordList.h | 1 + - layout/style/nsCSSProps.cpp | 1 + - widget/cocoa/nsNativeThemeCocoa.mm | 9 +++-- - widget/gtk/gtk2drawing.c | 49 ++++++++++++++++++++++++++ - widget/gtk/gtk3drawing.cpp | 38 ++++++++++++++++++++ - widget/gtk/gtkdrawing.h | 1 + - widget/gtk/nsNativeThemeGTK.cpp | 5 +++ - widget/headless/HeadlessThemeGTK.cpp | 2 ++ - widget/windows/nsNativeThemeWin.cpp | 9 +++++ - 11 files changed, 118 insertions(+), 2 deletions(-) - -diff --git devtools/shared/css/generated/properties-db.js devtools/shared/css/generated/properties-db.js -index 6d12ca38f14d..b87366998a16 100644 ---- devtools/shared/css/generated/properties-db.js -+++ devtools/shared/css/generated/properties-db.js -@@ -236,6 +236,7 @@ exports.CSS_PROPERTIES = { - "groupbox", - "inherit", - "initial", -+ "inner-spin-button", - "listbox", - "listitem", - "menuarrow", -@@ -3458,6 +3459,7 @@ exports.CSS_PROPERTIES = { - "inline-grid", - "inline-start", - "inline-table", -+ "inner-spin-button", - "inset", - "inside", - "inter-character", -diff --git gfx/src/nsThemeConstants.h gfx/src/nsThemeConstants.h -index 439ada6e80a6..0688222ef7ea 100644 ---- gfx/src/nsThemeConstants.h -+++ gfx/src/nsThemeConstants.h -@@ -135,6 +135,9 @@ enum ThemeWidgetType : uint8_t { - // A tooltip - NS_THEME_TOOLTIP, - -+ // A inner-spin control -+ NS_THEME_INNER_SPIN_BUTTON, -+ - // A spin control (up/down control for time/date pickers) - NS_THEME_SPINNER, - -diff --git layout/style/nsCSSKeywordList.h layout/style/nsCSSKeywordList.h -index f184592ad7c6..ff448c87b761 100644 ---- layout/style/nsCSSKeywordList.h -+++ layout/style/nsCSSKeywordList.h -@@ -683,6 +683,7 @@ CSS_KEY(tabpanel, tabpanel) - CSS_KEY(tab-scroll-arrow-back, tab_scroll_arrow_back) - CSS_KEY(tab-scroll-arrow-forward, tab_scroll_arrow_forward) - CSS_KEY(tooltip, tooltip) -+CSS_KEY(inner-spin-button, inner_spin_button) - CSS_KEY(spinner, spinner) - CSS_KEY(spinner-upbutton, spinner_upbutton) - CSS_KEY(spinner-downbutton, spinner_downbutton) -diff --git layout/style/nsCSSProps.cpp layout/style/nsCSSProps.cpp -index b7815699afa6..5c1ab8e8aae3 100644 ---- layout/style/nsCSSProps.cpp -+++ layout/style/nsCSSProps.cpp -@@ -786,6 +786,7 @@ const KTableEntry nsCSSProps::kAppearanceKTable[] = { - { eCSSKeyword_tab_scroll_arrow_back, NS_THEME_TAB_SCROLL_ARROW_BACK }, - { eCSSKeyword_tab_scroll_arrow_forward, NS_THEME_TAB_SCROLL_ARROW_FORWARD }, - { eCSSKeyword_tooltip, NS_THEME_TOOLTIP }, -+ { eCSSKeyword_inner_spin_button, NS_THEME_INNER_SPIN_BUTTON }, - { eCSSKeyword_spinner, NS_THEME_SPINNER }, - { eCSSKeyword_spinner_upbutton, NS_THEME_SPINNER_UPBUTTON }, - { eCSSKeyword_spinner_downbutton, NS_THEME_SPINNER_DOWNBUTTON }, -diff --git widget/cocoa/nsNativeThemeCocoa.mm widget/cocoa/nsNativeThemeCocoa.mm -index 760279b3a972..a4066b030897 100644 ---- widget/cocoa/nsNativeThemeCocoa.mm -+++ widget/cocoa/nsNativeThemeCocoa.mm -@@ -2551,9 +2551,11 @@ nsNativeThemeCocoa::DrawWidgetBackground(gfxContext* aContext, - eventState, aFrame); - break; - -- case NS_THEME_SPINNER: { -+ case NS_THEME_INNER_SPIN_BUTTON: { -+ case NS_THEME_SPINNER: -+ bool isSpinner = (aWidgetType == NS_THEME_SPINNER); - nsIContent* content = aFrame->GetContent(); -- if (content->IsHTMLElement()) { -+ if (isSpinner && content->IsHTMLElement()) { - // In HTML the theming for the spin buttons is drawn individually into - // their own backgrounds instead of being drawn into the background of - // their spinner parent as it is for XUL. -@@ -3454,6 +3456,7 @@ nsNativeThemeCocoa::GetMinimumWidgetSize(nsPresContext* aPresContext, - break; - } - -+ case NS_THEME_INNER_SPIN_BUTTON: - case NS_THEME_SPINNER: - case NS_THEME_SPINNER_UPBUTTON: - case NS_THEME_SPINNER_DOWNBUTTON: -@@ -3838,6 +3841,7 @@ nsNativeThemeCocoa::ThemeSupportsWidget(nsPresContext* aPresContext, nsIFrame* a - case NS_THEME_BUTTON_ARROW_DOWN: - case NS_THEME_BUTTON_BEVEL: - case NS_THEME_TOOLBARBUTTON: -+ case NS_THEME_INNER_SPIN_BUTTON: - case NS_THEME_SPINNER: - case NS_THEME_SPINNER_UPBUTTON: - case NS_THEME_SPINNER_DOWNBUTTON: -@@ -3978,6 +3982,7 @@ nsNativeThemeCocoa::WidgetAppearanceDependsOnWindowFocus(uint8_t aWidgetType) - case NS_THEME_MENUITEM: - case NS_THEME_MENUSEPARATOR: - case NS_THEME_TOOLTIP: -+ case NS_THEME_INNER_SPIN_BUTTON: - case NS_THEME_SPINNER: - case NS_THEME_SPINNER_UPBUTTON: - case NS_THEME_SPINNER_DOWNBUTTON: -diff --git widget/gtk/gtk2drawing.c widget/gtk/gtk2drawing.c -index 9b523c8f893e..e7f9d32a4d1c 100644 ---- widget/gtk/gtk2drawing.c -+++ widget/gtk/gtk2drawing.c -@@ -1365,6 +1365,51 @@ moz_gtk_scrollbar_thumb_paint(WidgetNodeType widget, - return MOZ_GTK_SUCCESS; - } - -+static gint -+moz_gtk_inner_spin_paint(GdkDrawable* drawable, GdkRectangle* rect, -+ GtkWidgetState* state, -+ GtkTextDirection direction) -+{ -+ GdkRectangle arrow_rect; -+ GtkStateType state_type = ConvertGtkState(state); -+ GtkShadowType shadow_type = state_type == GTK_STATE_ACTIVE ? -+ GTK_SHADOW_IN : GTK_SHADOW_OUT; -+ GtkStyle* style; -+ -+ ensure_spin_widget(); -+ style = gSpinWidget->style; -+ gtk_widget_set_direction(gSpinWidget, direction); -+ -+ TSOffsetStyleGCs(style, rect->x, rect->y); -+ gtk_paint_box(style, drawable, state_type, shadow_type, NULL, gSpinWidget, -+ "spinbutton", rect->x, rect->y, rect->width, rect->height); -+ -+ /* hard code these values */ -+ arrow_rect.width = 6; -+ arrow_rect.height = 6; -+ -+ // align spin to the left -+ arrow_rect.x = rect->x; -+ -+ // up button -+ arrow_rect.y = rect->y + (rect->height - arrow_rect.height) / 2 - 3; -+ gtk_paint_arrow(style, drawable, state_type, shadow_type, NULL, -+ gSpinWidget, "spinbutton", -+ GTK_ARROW_UP, TRUE, -+ arrow_rect.x, arrow_rect.y, -+ arrow_rect.width, arrow_rect.height); -+ -+ // down button -+ arrow_rect.y = rect->y + (rect->height - arrow_rect.height) / 2 + 3; -+ gtk_paint_arrow(style, drawable, state_type, shadow_type, NULL, -+ gSpinWidget, "spinbutton", -+ GTK_ARROW_DOWN, -+ arrow_rect.x, arrow_rect.y, -+ arrow_rect.width, arrow_rect.height); -+ -+ return MOZ_GTK_SUCCESS; -+} -+ - static gint - moz_gtk_spin_paint(GdkDrawable* drawable, GdkRectangle* rect, - GtkTextDirection direction) -@@ -2984,6 +3029,7 @@ moz_gtk_get_widget_border(WidgetNodeType widget, gint* left, gint* top, - case MOZ_GTK_TOOLBAR_SEPARATOR: - case MOZ_GTK_MENUSEPARATOR: - /* These widgets have no borders.*/ -+ case MOZ_GTK_INNER_SPIN_BUTTON: - case MOZ_GTK_SPINBUTTON: - case MOZ_GTK_WINDOW: - case MOZ_GTK_RESIZER: -@@ -3247,6 +3293,9 @@ moz_gtk_widget_paint(WidgetNodeType widget, GdkDrawable* drawable, - return moz_gtk_scale_thumb_paint(drawable, rect, cliprect, state, - (GtkOrientation) flags, direction); - break; -+ case MOZ_GTK_INNER_SPIN_BUTTON: -+ return moz_gtk_inner_spin_paint(drawable, rect, state, direction); -+ break; - case MOZ_GTK_SPINBUTTON: - return moz_gtk_spin_paint(drawable, rect, direction); - break; -diff --git widget/gtk/gtk3drawing.cpp widget/gtk/gtk3drawing.cpp -index 2969be818e96..a3a1478bfe85 100644 ---- widget/gtk/gtk3drawing.cpp -+++ widget/gtk/gtk3drawing.cpp -@@ -797,6 +797,40 @@ moz_gtk_scrollbar_thumb_paint(WidgetNodeType widget, - return MOZ_GTK_SUCCESS; - } - -+static gint -+moz_gtk_inner_spin_paint(cairo_t *cr, GdkRectangle* rect, -+ GtkWidgetState* state, -+ GtkTextDirection direction) -+{ -+ GtkStyleContext* style = GetStyleContext(MOZ_GTK_SPINBUTTON, direction, -+ GetStateFlagsFromGtkWidgetState(state)); -+ -+ 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); -+ -+ /* hard code these values */ -+ GdkRectangle arrow_rect; -+ arrow_rect.width = 6; -+ arrow_rect.height = 6; -+ -+ // align spin to the left -+ arrow_rect.x = rect->x; -+ -+ // up button -+ arrow_rect.y = rect->y + (rect->height - arrow_rect.height) / 2 - 3; -+ gtk_render_arrow(style, cr, ARROW_UP, -+ arrow_rect.x, arrow_rect.y, -+ arrow_rect.width); -+ -+ // down button -+ arrow_rect.y = rect->y + (rect->height - arrow_rect.height) / 2 + 3; -+ gtk_render_arrow(style, cr, ARROW_DOWN, -+ arrow_rect.x, arrow_rect.y, -+ arrow_rect.width); -+ -+ return MOZ_GTK_SUCCESS; -+} -+ - static gint - moz_gtk_spin_paint(cairo_t *cr, GdkRectangle* rect, - GtkTextDirection direction) -@@ -2283,6 +2317,7 @@ moz_gtk_get_widget_border(WidgetNodeType widget, gint* left, gint* top, - case MOZ_GTK_TOOLBAR_SEPARATOR: - case MOZ_GTK_MENUSEPARATOR: - /* These widgets have no borders.*/ -+ case MOZ_GTK_INNER_SPIN_BUTTON: - case MOZ_GTK_SPINBUTTON: - case MOZ_GTK_WINDOW: - case MOZ_GTK_RESIZER: -@@ -2845,6 +2880,9 @@ moz_gtk_widget_paint(WidgetNodeType widget, cairo_t *cr, - return moz_gtk_scale_thumb_paint(cr, rect, state, - (GtkOrientation) flags, direction); - break; -+ case MOZ_GTK_INNER_SPIN_BUTTON: -+ return moz_gtk_inner_spin_paint(cr, rect, state, direction); -+ break; - case MOZ_GTK_SPINBUTTON: - return moz_gtk_spin_paint(cr, rect, direction); - break; -diff --git widget/gtk/gtkdrawing.h widget/gtk/gtkdrawing.h -index 59fd1256e22d..4e796d0237d9 100644 ---- widget/gtk/gtkdrawing.h -+++ widget/gtk/gtkdrawing.h -@@ -175,6 +175,7 @@ typedef enum { - MOZ_GTK_SCALE_THUMB_HORIZONTAL, - MOZ_GTK_SCALE_THUMB_VERTICAL, - /* Paints a GtkSpinButton */ -+ MOZ_GTK_INNER_SPIN_BUTTON, - MOZ_GTK_SPINBUTTON, - MOZ_GTK_SPINBUTTON_UP, - MOZ_GTK_SPINBUTTON_DOWN, -diff --git widget/gtk/nsNativeThemeGTK.cpp widget/gtk/nsNativeThemeGTK.cpp -index c38c9e1eed3d..953aead6cdd4 100644 ---- widget/gtk/nsNativeThemeGTK.cpp -+++ widget/gtk/nsNativeThemeGTK.cpp -@@ -439,6 +439,9 @@ nsNativeThemeGTK::GetGtkWidgetAndState(uint8_t aWidgetType, nsIFrame* aFrame, - case NS_THEME_SCROLLBARTHUMB_HORIZONTAL: - aGtkWidgetType = MOZ_GTK_SCROLLBAR_THUMB_HORIZONTAL; - break; -+ case NS_THEME_INNER_SPIN_BUTTON: -+ aGtkWidgetType = MOZ_GTK_INNER_SPIN_BUTTON; -+ break; - case NS_THEME_SPINNER: - aGtkWidgetType = MOZ_GTK_SPINBUTTON; - break; -@@ -1657,6 +1660,7 @@ nsNativeThemeGTK::GetMinimumWidgetSize(nsPresContext* aPresContext, - aResult->width = separator_width; - } - break; -+ case NS_THEME_INNER_SPIN_BUTTON: - case NS_THEME_SPINNER: - // hard code these sizes - aResult->width = 14; -@@ -1844,6 +1848,7 @@ nsNativeThemeGTK::ThemeSupportsWidget(nsPresContext* aPresContext, - case NS_THEME_TAB_SCROLL_ARROW_BACK: - case NS_THEME_TAB_SCROLL_ARROW_FORWARD: - case NS_THEME_TOOLTIP: -+ case NS_THEME_INNER_SPIN_BUTTON: - case NS_THEME_SPINNER: - case NS_THEME_SPINNER_UPBUTTON: - case NS_THEME_SPINNER_DOWNBUTTON: -diff --git widget/windows/nsNativeThemeWin.cpp widget/windows/nsNativeThemeWin.cpp -index 5bbdc3aacc1e..bd6f76ca3e52 100644 ---- widget/windows/nsNativeThemeWin.cpp -+++ widget/windows/nsNativeThemeWin.cpp -@@ -682,6 +682,7 @@ nsresult nsNativeThemeWin::GetCachedMinimumWidgetSize(nsIFrame * aFrame, HANDLE - aResult->height = sz.cy; - - switch (aWidgetType) { -+ case NS_THEME_INNER_SPIN_BUTTON: - case NS_THEME_SPINNER_UPBUTTON: - case NS_THEME_SPINNER_DOWNBUTTON: - aResult->width++; -@@ -766,6 +767,7 @@ mozilla::Maybe nsNativeThemeWin::GetThemeClass(uint8_t aWidgetTy - case NS_THEME_SCALETHUMB_HORIZONTAL: - case NS_THEME_SCALETHUMB_VERTICAL: - return Some(eUXTrackbar); -+ case NS_THEME_INNER_SPIN_BUTTON: - case NS_THEME_SPINNER_UPBUTTON: - case NS_THEME_SPINNER_DOWNBUTTON: - return Some(eUXSpin); -@@ -1143,6 +1145,7 @@ nsNativeThemeWin::GetThemePartAndState(nsIFrame* aFrame, uint8_t aWidgetType, - } - return NS_OK; - } -+ case NS_THEME_INNER_SPIN_BUTTON: - case NS_THEME_SPINNER_UPBUTTON: - case NS_THEME_SPINNER_DOWNBUTTON: { - aPart = (aWidgetType == NS_THEME_SPINNER_UPBUTTON) ? -@@ -2718,6 +2721,7 @@ nsNativeThemeWin::ClassicThemeSupportsWidget(nsIFrame* aFrame, - case NS_THEME_SCALETHUMB_HORIZONTAL: - case NS_THEME_SCALETHUMB_VERTICAL: - case NS_THEME_MENULIST_BUTTON: -+ case NS_THEME_INNER_SPIN_BUTTON: - case NS_THEME_SPINNER_UPBUTTON: - case NS_THEME_SPINNER_DOWNBUTTON: - case NS_THEME_LISTBOX: -@@ -2873,6 +2877,7 @@ nsNativeThemeWin::ClassicGetMinimumWidgetSize(nsIFrame* aFrame, - (*aResult).width = ::GetSystemMetrics(SM_CXMENUCHECK); - (*aResult).height = ::GetSystemMetrics(SM_CYMENUCHECK); - break; -+ case NS_THEME_INNER_SPIN_BUTTON: - case NS_THEME_SPINNER_UPBUTTON: - case NS_THEME_SPINNER_DOWNBUTTON: - (*aResult).width = ::GetSystemMetrics(SM_CXVSCROLL); -@@ -3274,6 +3279,7 @@ nsresult nsNativeThemeWin::ClassicGetThemePartAndState(nsIFrame* aFrame, uint8_t - - return NS_OK; - } -+ case NS_THEME_INNER_SPIN_BUTTON: - case NS_THEME_SPINNER_UPBUTTON: - case NS_THEME_SPINNER_DOWNBUTTON: { - EventStates contentState = GetContentState(aFrame, aWidgetType); -@@ -3283,6 +3289,7 @@ nsresult nsNativeThemeWin::ClassicGetThemePartAndState(nsIFrame* aFrame, uint8_t - case NS_THEME_SPINNER_UPBUTTON: - aState = DFCS_SCROLLUP; - break; -+ case NS_THEME_INNER_SPIN_BUTTON: - case NS_THEME_SPINNER_DOWNBUTTON: - aState = DFCS_SCROLLDOWN; - break; -@@ -3583,6 +3590,7 @@ RENDER_AGAIN: - case NS_THEME_SCROLLBARBUTTON_DOWN: - case NS_THEME_SCROLLBARBUTTON_LEFT: - case NS_THEME_SCROLLBARBUTTON_RIGHT: -+ case NS_THEME_INNER_SPIN_BUTTON: - case NS_THEME_SPINNER_UPBUTTON: - case NS_THEME_SPINNER_DOWNBUTTON: - case NS_THEME_MENULIST_BUTTON: -@@ -3987,6 +3995,7 @@ nsNativeThemeWin::GetWidgetNativeDrawingFlags(uint8_t aWidgetType) - case NS_THEME_SCALE_VERTICAL: - case NS_THEME_SCALETHUMB_HORIZONTAL: - case NS_THEME_SCALETHUMB_VERTICAL: -+ case NS_THEME_INNER_SPIN_BUTTON: - case NS_THEME_SPINNER_UPBUTTON: - case NS_THEME_SPINNER_DOWNBUTTON: - case NS_THEME_LISTBOX: diff --git a/www/waterfox/files/patch-bug1417797 b/www/waterfox/files/patch-bug1417797 deleted file mode 100644 index e3e1fc5d44a..00000000000 --- a/www/waterfox/files/patch-bug1417797 +++ /dev/null @@ -1,25 +0,0 @@ -commit 95077ef89979 -Author: Dan Minor -Date: Mon Nov 20 07:09:19 2017 -0500 - - Bug 1417797 - Stop callback in WebrtcGmpVideoDecoder::ReleaseGmp. r=jesup, a=gchang - - --HG-- - extra : source : d0eb2fe1a7389d40d1abdccbeeaef9c4b30ae7b1 ---- - media/webrtc/signaling/src/media-conduit/WebrtcGmpVideoCodec.cpp | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git media/webrtc/signaling/src/media-conduit/WebrtcGmpVideoCodec.cpp media/webrtc/signaling/src/media-conduit/WebrtcGmpVideoCodec.cpp -index 53212d888dcb..e3063ea3fefb 100644 ---- media/webrtc/signaling/src/media-conduit/WebrtcGmpVideoCodec.cpp -+++ media/webrtc/signaling/src/media-conduit/WebrtcGmpVideoCodec.cpp -@@ -923,6 +923,8 @@ int32_t - WebrtcGmpVideoDecoder::ReleaseGmp() - { - LOGD(("GMP Released:")); -+ RegisterDecodeCompleteCallback(nullptr); -+ - if (mGMPThread) { - mGMPThread->Dispatch( - WrapRunnableNM(&WebrtcGmpVideoDecoder::ReleaseGmp_g, diff --git a/www/waterfox/files/patch-bug1417869 b/www/waterfox/files/patch-bug1417869 deleted file mode 100644 index cc344f72dbc..00000000000 --- a/www/waterfox/files/patch-bug1417869 +++ /dev/null @@ -1,42 +0,0 @@ -commit 22760bd00a04 -Author: JW Wang -Date: Fri Nov 24 11:14:51 2017 +0100 - - Bug 1417869. P2 - abort the load algorithm early if media not allowed to load. r=jya, a=sledru - - MozReview-Commit-ID: DUxyo4ywCPW ---- - dom/html/HTMLMediaElement.cpp | 13 +++++++------ - 1 file changed, 7 insertions(+), 6 deletions(-) - -diff --git dom/html/HTMLMediaElement.cpp dom/html/HTMLMediaElement.cpp -index 5d51851047cf..c2106402c661 100644 ---- dom/html/HTMLMediaElement.cpp -+++ dom/html/HTMLMediaElement.cpp -@@ -1956,6 +1956,13 @@ NS_IMETHODIMP HTMLMediaElement::Load() - - void HTMLMediaElement::DoLoad() - { -+ // Check if media is allowed for the docshell. -+ nsCOMPtr docShell = OwnerDoc()->GetDocShell(); -+ if (docShell && !docShell->GetAllowMedia()) { -+ LOG(LogLevel::Debug, ("%p Media not allowed", this)); -+ return; -+ } -+ - if (mIsRunningLoadMethod) { - return; - } -@@ -2497,12 +2504,6 @@ nsresult HTMLMediaElement::LoadResource() - mChannelLoader = nullptr; - } - -- // Check if media is allowed for the docshell. -- nsCOMPtr docShell = OwnerDoc()->GetDocShell(); -- if (docShell && !docShell->GetAllowMedia()) { -- return NS_ERROR_FAILURE; -- } -- - // Set the media element's CORS mode only when loading a resource - mCORSMode = AttrValueToCORSMode(GetParsedAttr(nsGkAtoms::crossorigin)); - diff --git a/www/waterfox/files/patch-bug1418009 b/www/waterfox/files/patch-bug1418009 deleted file mode 100644 index 2a9f5a7fd4f..00000000000 --- a/www/waterfox/files/patch-bug1418009 +++ /dev/null @@ -1,28 +0,0 @@ -commit 068a8c4feb56 -Author: Oriol Brufau -Date: Fri Mar 16 16:58:36 2018 +0100 - - Bug 1418009 - Avoid speculative connections on prematurely inserted lazy tabs. r=dao, a=RyanVM - - MozReview-Commit-ID: 3T8PLBLEGNt - - --HG-- - extra : rebase_source : 5839f1ede2a3d939e8bad02520979a8911f69553 - extra : source : 6d67283033868a54d89a936ba5e336d9bad5c79c ---- - browser/components/sessionstore/SessionStore.jsm | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git browser/components/sessionstore/SessionStore.jsm browser/components/sessionstore/SessionStore.jsm -index dee998cbe7eb..88de8a64f0fc 100644 ---- browser/components/sessionstore/SessionStore.jsm -+++ browser/components/sessionstore/SessionStore.jsm -@@ -3547,7 +3547,7 @@ var SessionStoreInternal = { - * a tab to speculatively connect on mouse hover. - */ - speculativeConnectOnTabHover(tab) { -- if (this._restore_on_demand && !tab.__SS_connectionPrepared && tab.hasAttribute("pending")) { -+ if (tab.__SS_lazyData && !tab.__SS_connectionPrepared) { - let url = this.getLazyTabValue(tab, "url"); - let prepared = this.prepareConnectionToHost(url); - // This is used to test if a connection has been made beforehand. diff --git a/www/waterfox/files/patch-bug1418152 b/www/waterfox/files/patch-bug1418152 deleted file mode 100644 index d7634229aa8..00000000000 --- a/www/waterfox/files/patch-bug1418152 +++ /dev/null @@ -1,36 +0,0 @@ -commit d7441ef15616 -Author: Cameron McCormack -Date: Sat Nov 18 00:47:57 2017 -0600 - - Bug 1418152 - servo: Merge #19263 - selectors: Allow white space in the brackets of an attribute selector (from heycam:attr-ws); r=SimonSapin a=sylvestre - - Source-Repo: https://github.com/servo/servo - Source-Revision: 7b886b4479763018ecad62aa6db96049732ca9ed - - --HG-- - extra : amend_source : 67e691f8caf4bc07a9ea0e33bd31286ae123f5ff - extra : transplant_source : %C6%FF%3A%13I%5E%B7%14%3C%F2%F7%CE%80%DB%08%16bh%60s ---- - servo/components/selectors/parser.rs | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git servo/components/selectors/parser.rs servo/components/selectors/parser.rs -index b020a04fd032..b7c421998530 100644 ---- servo/components/selectors/parser.rs -+++ servo/components/selectors/parser.rs -@@ -1306,6 +1306,15 @@ fn parse_attribute_selector<'i, 't, P, E, Impl>(parser: &P, input: &mut CssParse - { - let namespace; - let local_name; -+ -+ loop { -+ let position = input.position(); -+ if !matches!(input.next_including_whitespace(), Ok(&Token::WhiteSpace(_))) { -+ input.reset(position); -+ break -+ } -+ } -+ - match parse_qualified_name(parser, input, /* in_attr_selector = */ true)? { - None => return Err(ParseError::Custom(SelectorParseError::NoQualifiedNameInAttributeSelector)), - Some((_, None)) => unreachable!(), diff --git a/www/waterfox/files/patch-bug1418757 b/www/waterfox/files/patch-bug1418757 deleted file mode 100644 index 139fce6ec8c..00000000000 --- a/www/waterfox/files/patch-bug1418757 +++ /dev/null @@ -1,169 +0,0 @@ -commit 1b3df31dd202 -Author: Gijs Kruitbosch -Date: Wed Nov 22 13:49:07 2017 +0000 - - Bug 1418757 - new tab button isn't adjacent to the last tab when customizing in customize mode, r=jaws a=gchang - - MozReview-Commit-ID: bQoNfDD2sX - - --HG-- - extra : histedit_source : 15b29e1c8e8ba295ecbd76d266de3611862a72c3 ---- - browser/base/content/tabbrowser.xml | 15 ++- - browser/components/customizableui/test/browser.ini | 1 + - .../test/browser_newtab_button_customizemode.js | 106 +++++++++++++++++++++ - 3 files changed, 121 insertions(+), 1 deletion(-) - -diff --git browser/base/content/tabbrowser.xml browser/base/content/tabbrowser.xml -index dc4560e0f5b2..a13df7715f2d 100644 ---- browser/base/content/tabbrowser.xml -+++ browser/base/content/tabbrowser.xml -@@ -5448,10 +5448,23 @@ - - - are never wrapped in s in customize mode, -+ // but the other items will be. - let sib = this.tabContainer.nextElementSibling; -+ if (isCustomizing) { -+ sib = sib && sib.firstElementChild; -+ } - while (sib && sib.hidden) { -- sib = sib.nextElementSibling; -+ if (isCustomizing) { -+ sib = sib.parentNode.nextElementSibling; -+ sib = sib && sib.firstElementChild; -+ } else { -+ sib = sib.nextElementSibling; -+ } - } -+ - const kAttr = "hasadjacentnewtabbutton"; - if (sib && sib.id == "new-tab-button") { - this.tabContainer.setAttribute(kAttr, "true"); -diff --git browser/components/customizableui/test/browser.ini browser/components/customizableui/test/browser.ini -index d5f5eaf2a113..b164a573f094 100644 ---- browser/components/customizableui/test/browser.ini -+++ browser/components/customizableui/test/browser.ini -@@ -164,6 +164,7 @@ tags = fullscreen - [browser_check_tooltips_in_navbar.js] - [browser_editcontrols_update.js] - subsuite = clipboard -+[browser_newtab_button_customizemode.js] - [browser_photon_customization_context_menus.js] - [browser_sidebar_toggle.js] - [browser_remote_tabs_button.js] -diff --git browser/components/customizableui/test/browser_newtab_button_customizemode.js browser/components/customizableui/test/browser_newtab_button_customizemode.js -new file mode 100644 -index 000000000000..da886fc47376 ---- /dev/null -+++ browser/components/customizableui/test/browser_newtab_button_customizemode.js -@@ -0,0 +1,106 @@ -+/* Any copyright is dedicated to the Public Domain. -+ * http://creativecommons.org/publicdomain/zero/1.0/ */ -+ -+"use strict"; -+ -+/** -+ * Tests in this file check that user customizations to the tabstrip show -+ * the correct type of new tab button while the tabstrip isn't overflowing. -+ */ -+ -+const kGlobalNewTabButton = document.getElementById("new-tab-button"); -+const kInnerNewTabButton = document.getAnonymousElementByAttribute(gBrowser.tabContainer, "anonid", "tabs-newtab-button"); -+ -+function assertNewTabButton(which) { -+ if (which == "global") { -+ isnot(kGlobalNewTabButton.getBoundingClientRect().width, 0, -+ "main new tab button should be visible"); -+ is(kInnerNewTabButton.getBoundingClientRect().width, 0, -+ "inner new tab button should be hidden"); -+ } else if (which == "inner") { -+ is(kGlobalNewTabButton.getBoundingClientRect().width, 0, -+ "main new tab button should be hidden"); -+ isnot(kInnerNewTabButton.getBoundingClientRect().width, 0, -+ "inner new tab button should be visible"); -+ } else { -+ ok(false, "Unexpected button: " + which); -+ } -+} -+ -+/** -+ * Add and remove items *after* the new tab button in customize mode. -+ */ -+add_task(async function addremove_after_newtab_customizemode() { -+ await startCustomizing(); -+ simulateItemDrag(document.getElementById("home-button"), -+ kGlobalNewTabButton.parentNode.nextElementSibling); -+ ok(gBrowser.tabContainer.hasAttribute("hasadjacentnewtabbutton"), -+ "tabs should have the adjacent newtab attribute"); -+ await endCustomizing(); -+ assertNewTabButton("inner"); -+ -+ await startCustomizing(); -+ simulateItemDrag(document.getElementById("home-button"), -+ document.getElementById("stop-reload-button").parentNode.nextElementSibling); -+ ok(gBrowser.tabContainer.hasAttribute("hasadjacentnewtabbutton"), -+ "tabs should still have the adjacent newtab attribute"); -+ await endCustomizing(); -+ assertNewTabButton("inner"); -+ ok(CustomizableUI.inDefaultState, "Should be in default state"); -+}); -+ -+/** -+ * Add and remove items *before* the new tab button in customize mode. -+ */ -+add_task(async function addremove_before_newtab_customizemode() { -+ await startCustomizing(); -+ simulateItemDrag(document.getElementById("home-button"), kGlobalNewTabButton); -+ ok(!gBrowser.tabContainer.hasAttribute("hasadjacentnewtabbutton"), -+ "tabs should no longer have the adjacent newtab attribute"); -+ await endCustomizing(); -+ assertNewTabButton("global"); -+ await startCustomizing(); -+ simulateItemDrag(document.getElementById("home-button"), -+ document.getElementById("stop-reload-button").parentNode.nextElementSibling); -+ ok(gBrowser.tabContainer.hasAttribute("hasadjacentnewtabbutton"), -+ "tabs should have the adjacent newtab attribute again"); -+ await endCustomizing(); -+ assertNewTabButton("inner"); -+ ok(CustomizableUI.inDefaultState, "Should be in default state"); -+}); -+ -+/** -+ * Add and remove items *after* the new tab button outside of customize mode. -+ */ -+add_task(async function addremove_after_newtab_api() { -+ CustomizableUI.addWidgetToArea("home-button", "TabsToolbar"); -+ ok(gBrowser.tabContainer.hasAttribute("hasadjacentnewtabbutton"), -+ "tabs should have the adjacent newtab attribute"); -+ assertNewTabButton("inner"); -+ -+ CustomizableUI.reset(); -+ ok(gBrowser.tabContainer.hasAttribute("hasadjacentnewtabbutton"), -+ "tabs should still have the adjacent newtab attribute"); -+ assertNewTabButton("inner"); -+ ok(CustomizableUI.inDefaultState, "Should be in default state"); -+ -+}); -+ -+/** -+ * Add and remove items *before* the new tab button outside of customize mode. -+ */ -+add_task(async function addremove_before_newtab_api() { -+ let index = CustomizableUI.getWidgetIdsInArea("TabsToolbar").indexOf("new-tab-button"); -+ CustomizableUI.addWidgetToArea("home-button", "TabsToolbar", index); -+ ok(!gBrowser.tabContainer.hasAttribute("hasadjacentnewtabbutton"), -+ "tabs should no longer have the adjacent newtab attribute"); -+ assertNewTabButton("global"); -+ -+ CustomizableUI.removeWidgetFromArea("home-button"); -+ ok(gBrowser.tabContainer.hasAttribute("hasadjacentnewtabbutton"), -+ "tabs should have the adjacent newtab attribute again"); -+ assertNewTabButton("inner"); -+ -+ CustomizableUI.reset(); -+ ok(CustomizableUI.inDefaultState, "Should be in default state"); -+}); diff --git a/www/waterfox/files/patch-bug1418854 b/www/waterfox/files/patch-bug1418854 deleted file mode 100644 index e707d06094a..00000000000 --- a/www/waterfox/files/patch-bug1418854 +++ /dev/null @@ -1,102 +0,0 @@ -commit 1fe2b37624d6 -Author: Michal Novotny -Date: Wed Dec 6 20:48:06 2017 -0500 - - Bug 1418854 - Race condition in AutoClose. r=honzab, a=jcristau - - --HG-- - extra : source : 3e425d2e71df08dc944a26eaa41158522a75ff02 ---- - netwerk/base/AutoClose.h | 43 ++++++++++++++++++++++--------------------- - 1 file changed, 22 insertions(+), 21 deletions(-) - -diff --git netwerk/base/AutoClose.h netwerk/base/AutoClose.h -index 8c401071428f..43ab27133fdd 100644 ---- netwerk/base/AutoClose.h -+++ netwerk/base/AutoClose.h -@@ -8,6 +8,7 @@ - #define mozilla_net_AutoClose_h - - #include "nsCOMPtr.h" -+#include "mozilla/Mutex.h" - - namespace mozilla { namespace net { - -@@ -18,49 +19,48 @@ template - class AutoClose - { - public: -- AutoClose() { } -+ AutoClose() : mMutex("net::AutoClose.mMutex") { } - ~AutoClose(){ -- Close(); -+ CloseAndRelease(); - } - -- explicit operator bool() const -+ explicit operator bool() - { -+ MutexAutoLock lock(mMutex); - return mPtr; - } - - already_AddRefed forget() - { -+ MutexAutoLock lock(mMutex); - return mPtr.forget(); - } - - void takeOver(nsCOMPtr & rhs) - { -- Close(); -- mPtr = rhs.forget(); -- } -- -- void takeOver(AutoClose & rhs) -- { -- Close(); -- mPtr = rhs.mPtr.forget(); -+ already_AddRefed other = rhs.forget(); -+ TakeOverInternal(&other); - } - - void CloseAndRelease() - { -- Close(); -- mPtr = nullptr; -- } -- -- T* operator->() const MOZ_NO_ADDREF_RELEASE_ON_RETURN -- { -- return mPtr.operator->(); -+ TakeOverInternal(nullptr); - } - - private: -- void Close() -+ void TakeOverInternal(already_AddRefed *aOther) - { -- if (mPtr) { -- mPtr->Close(); -+ nsCOMPtr ptr; -+ { -+ MutexAutoLock lock(mMutex); -+ ptr.swap(mPtr); -+ if (aOther) { -+ mPtr = *aOther; -+ } -+ } -+ -+ if (ptr) { -+ ptr->Close(); - } - } - -@@ -68,6 +68,7 @@ private: - AutoClose(const AutoClose &) = delete; - - nsCOMPtr mPtr; -+ Mutex mMutex; - }; - - } // namespace net diff --git a/www/waterfox/files/patch-bug1418894 b/www/waterfox/files/patch-bug1418894 deleted file mode 100644 index b092b623b5b..00000000000 --- a/www/waterfox/files/patch-bug1418894 +++ /dev/null @@ -1,244 +0,0 @@ -commit 408a8eddca66 -Author: Ted Campbell -Date: Tue Nov 28 22:52:34 2017 -0500 - - Bug 1418894 - Use marker values in XDR data to detect corruption. r=nbp a=gchang - - MozReview-Commit-ID: D6PxPBdgtPP - - --HG-- - extra : source : 3c5cc7786d922c70b937d1dbe57f0ce700c39551 ---- - js/src/jsfun.cpp | 4 ++++ - js/src/jsscript.cpp | 10 ++++++++++ - js/src/vm/Xdr.h | 12 ++++++++++++ - 3 files changed, 26 insertions(+) - -diff --git js/src/jsfun.cpp js/src/jsfun.cpp -index 234d0cc3438c..5a461c9230eb 100644 ---- js/src/jsfun.cpp -+++ js/src/jsfun.cpp -@@ -682,6 +682,10 @@ js::XDRInterpretedFunction(XDRState* xdr, HandleScope enclosingScope, - objp.set(fun); - } - -+ // Verify marker at end of function to detect buffer trunction. -+ if (!xdr->codeMarker(0x9E35CA1F)) -+ return false; -+ - return true; - } - -diff --git js/src/jsscript.cpp js/src/jsscript.cpp -index 1b31a0639644..88d6c7bc75b6 100644 ---- js/src/jsscript.cpp -+++ js/src/jsscript.cpp -@@ -808,6 +808,11 @@ js::XDRScript(XDRState* xdr, HandleScope scriptEnclosingScope, - if (mode == XDR_DECODE) - vector[i].init(scope); - } -+ -+ // Verify marker to detect data corruption after decoding scope data. A -+ // mismatch here indicates we will almost certainly crash in release. -+ if (!xdr->codeMarker(0x48922BAB)) -+ return false; - } - - /* -@@ -900,6 +905,11 @@ js::XDRScript(XDRState* xdr, HandleScope scriptEnclosingScope, - } - } - -+ // Verify marker to detect data corruption after decoding object data. A -+ // mismatch here indicates we will almost certainly crash in release. -+ if (!xdr->codeMarker(0xF83B989A)) -+ return false; -+ - if (ntrynotes != 0) { - JSTryNote* tnfirst = script->trynotes()->vector; - MOZ_ASSERT(script->trynotes()->length == ntrynotes); -diff --git js/src/vm/Xdr.h js/src/vm/Xdr.h -index 18fa1af8ab5b..0a6cbf01b50f 100644 ---- js/src/vm/Xdr.h -+++ js/src/vm/Xdr.h -@@ -307,6 +307,18 @@ class XDRState : public XDRCoderBase - return true; - } - -+ bool codeMarker(uint32_t magic) { -+ uint32_t actual = magic; -+ if (!codeUint32(&actual)) -+ return false; -+ if (actual != magic) { -+ // Fail in debug, but only soft-fail in release -+ MOZ_ASSERT(false, "Bad XDR marker"); -+ return fail(JS::TranscodeResult_Failure_BadDecode); -+ } -+ return true; -+ } -+ - bool codeBytes(void* bytes, size_t len) { - if (len == 0) - return true; - -commit 885c19e8e675 -Author: Ted Campbell -Date: Tue Nov 28 23:01:49 2017 -0500 - - Bug 1418894 - Harden XDR data decoding. r=nbp a=gchang - - This patch adds better error detection to XDR decoding to reduce memory - corruption in the event that XDR data is corrupt (which is not - *supposed* to happen). - - Add missing default cases. Make out-of-range values fail the decode by - asserting in debug, and returning a TranscodeError in release. Mix a - magic value into enum value before transcoding to buffer (to reduce - chance of garbage data being decoded). - - MozReview-Commit-ID: 1wPkho9dm8c - - --HG-- - extra : source : 484499ffcbbad636a904832cc90c56c016ad4582 ---- - js/src/jsapi.h | 2 +- - js/src/jsscript.cpp | 40 ++++++++++++++++++++++------------------ - js/src/shell/js.cpp | 4 ++-- - js/src/vm/Xdr.h | 8 ++++++-- - 4 files changed, 31 insertions(+), 23 deletions(-) - -diff --git js/src/jsapi.h js/src/jsapi.h -index 323396025b7a..c43a4c693778 100644 ---- js/src/jsapi.h -+++ js/src/jsapi.h -@@ -6420,7 +6420,7 @@ enum TranscodeResult - TranscodeResult_Failure_BadBuildId = TranscodeResult_Failure | 0x1, - TranscodeResult_Failure_RunOnceNotSupported = TranscodeResult_Failure | 0x2, - TranscodeResult_Failure_AsmJSNotSupported = TranscodeResult_Failure | 0x3, -- TranscodeResult_Failure_UnknownClassKind = TranscodeResult_Failure | 0x4, -+ TranscodeResult_Failure_BadDecode = TranscodeResult_Failure | 0x4, - TranscodeResult_Failure_WrongCompileOption = TranscodeResult_Failure | 0x5, - TranscodeResult_Failure_NotInterpretedFun = TranscodeResult_Failure | 0x6, - -diff --git js/src/jsscript.cpp js/src/jsscript.cpp -index eff03d909353..1b31a0639644 100644 ---- js/src/jsscript.cpp -+++ js/src/jsscript.cpp -@@ -92,24 +92,19 @@ js::XDRScriptConst(XDRState* xdr, MutableHandleValue vp) - { - JSContext* cx = xdr->cx(); - -- /* -- * A script constant can be an arbitrary primitive value as they are used -- * to implement JSOP_LOOKUPSWITCH. But they cannot be objects, see -- * bug 407186. -- */ - enum ConstTag { -- SCRIPT_INT = 0, -- SCRIPT_DOUBLE = 1, -- SCRIPT_ATOM = 2, -- SCRIPT_TRUE = 3, -- SCRIPT_FALSE = 4, -- SCRIPT_NULL = 5, -- SCRIPT_OBJECT = 6, -- SCRIPT_VOID = 7, -- SCRIPT_HOLE = 8 -+ SCRIPT_INT, -+ SCRIPT_DOUBLE, -+ SCRIPT_ATOM, -+ SCRIPT_TRUE, -+ SCRIPT_FALSE, -+ SCRIPT_NULL, -+ SCRIPT_OBJECT, -+ SCRIPT_VOID, -+ SCRIPT_HOLE - }; - -- uint32_t tag; -+ ConstTag tag; - if (mode == XDR_ENCODE) { - if (vp.isInt32()) { - tag = SCRIPT_INT; -@@ -133,7 +128,7 @@ js::XDRScriptConst(XDRState* xdr, MutableHandleValue vp) - } - } - -- if (!xdr->codeUint32(&tag)) -+ if (!xdr->codeEnum32(&tag)) - return false; - - switch (tag) { -@@ -199,6 +194,10 @@ js::XDRScriptConst(XDRState* xdr, MutableHandleValue vp) - if (mode == XDR_DECODE) - vp.setMagic(JS_ELEMENTS_HOLE); - break; -+ default: -+ // Fail in debug, but only soft-fail in release -+ MOZ_ASSERT(false, "Bad XDR value kind"); -+ return xdr->fail(JS::TranscodeResult_Failure_BadDecode); - } - return true; - } -@@ -800,6 +799,10 @@ js::XDRScript(XDRState* xdr, HandleScope scriptEnclosingScope, - case ScopeKind::WasmFunction: - MOZ_CRASH("wasm functions cannot be nested in JSScripts"); - break; -+ default: -+ // Fail in debug, but only soft-fail in release -+ MOZ_ASSERT(false, "Bad XDR scope kind"); -+ return xdr->fail(JS::TranscodeResult_Failure_BadDecode); - } - - if (mode == XDR_DECODE) -@@ -890,8 +893,9 @@ js::XDRScript(XDRState* xdr, HandleScope scriptEnclosingScope, - } - - default: { -- MOZ_ASSERT(false, "Unknown class kind."); -- return xdr->fail(JS::TranscodeResult_Failure_UnknownClassKind); -+ // Fail in debug, but only soft-fail in release -+ MOZ_ASSERT(false, "Bad XDR class kind"); -+ return xdr->fail(JS::TranscodeResult_Failure_BadDecode); - } - } - } -diff --git js/src/shell/js.cpp js/src/shell/js.cpp -index 16ee93bc66a8..1f5afb04e1f8 100644 ---- js/src/shell/js.cpp -+++ js/src/shell/js.cpp -@@ -1519,9 +1519,9 @@ ConvertTranscodeResultToJSException(JSContext* cx, JS::TranscodeResult rv) - MOZ_ASSERT(!cx->isExceptionPending()); - JS_ReportErrorASCII(cx, "Asm.js is not supported by XDR"); - return false; -- case JS::TranscodeResult_Failure_UnknownClassKind: -+ case JS::TranscodeResult_Failure_BadDecode: - MOZ_ASSERT(!cx->isExceptionPending()); -- JS_ReportErrorASCII(cx, "Unknown class kind, go fix it."); -+ JS_ReportErrorASCII(cx, "XDR data corruption"); - return false; - case JS::TranscodeResult_Failure_WrongCompileOption: - MOZ_ASSERT(!cx->isExceptionPending()); -diff --git js/src/vm/Xdr.h js/src/vm/Xdr.h -index e88968b9a4c0..18fa1af8ab5b 100644 ---- js/src/vm/Xdr.h -+++ js/src/vm/Xdr.h -@@ -279,13 +279,17 @@ class XDRState : public XDRCoderBase - template - bool codeEnum32(T* val, typename mozilla::EnableIf::value, T>::Type * = NULL) - { -+ // Mix the enumeration value with a random magic number, such that a -+ // corruption with a low-ranged value (like 0) is less likely to cause a -+ // miss-interpretation of the XDR content and instead cause a failure. -+ const uint32_t MAGIC = 0x21AB218C; - uint32_t tmp; - if (mode == XDR_ENCODE) -- tmp = uint32_t(*val); -+ tmp = uint32_t(*val) ^ MAGIC; - if (!codeUint32(&tmp)) - return false; - if (mode == XDR_DECODE) -- *val = T(tmp); -+ *val = T(tmp ^ MAGIC); - return true; - } - diff --git a/www/waterfox/files/patch-bug1419508 b/www/waterfox/files/patch-bug1419508 deleted file mode 100644 index 4d5ca04baaa..00000000000 --- a/www/waterfox/files/patch-bug1419508 +++ /dev/null @@ -1,29 +0,0 @@ -commit 4d25545cc673 -Author: Gerald Squelart -Date: Thu Jan 25 16:21:23 2018 +1100 - - Bug 1419508 - Return early from CreateMaskLayer if there is no visible data - r=mattwoodrow a=lizzard - - MozReview-Commit-ID: 9jWGXA2eGvv - - --HG-- - extra : source : c5d8b1ed27228f4bcf45b2746f78dba3795d0868 ---- - layout/painting/FrameLayerBuilder.cpp | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git layout/painting/FrameLayerBuilder.cpp layout/painting/FrameLayerBuilder.cpp -index 3c5d04260f7e..48ec5db56251 100644 ---- layout/painting/FrameLayerBuilder.cpp -+++ layout/painting/FrameLayerBuilder.cpp -@@ -6358,6 +6358,10 @@ ContainerState::CreateMaskLayer(Layer *aLayer, - gfx::Rect boundingRect = CalculateBounds(newData.mRoundedClipRects, - newData.mAppUnitsPerDevPixel); - boundingRect.Scale(mParameters.mXScale, mParameters.mYScale); -+ if (boundingRect.IsEmpty()) { -+ // Return early if we know that there is effectively no visible data. -+ return nullptr; -+ } - - uint32_t maxSize = mManager->GetMaxTextureSize(); - NS_ASSERTION(maxSize > 0, "Invalid max texture size"); diff --git a/www/waterfox/files/patch-bug1419762 b/www/waterfox/files/patch-bug1419762 deleted file mode 100644 index 57599be571f..00000000000 --- a/www/waterfox/files/patch-bug1419762 +++ /dev/null @@ -1,69 +0,0 @@ -commit 0f58a35d5cb7 -Author: Emilio Cobos Álvarez -Date: Thu Nov 23 01:01:34 2017 +0100 - - Bug 1419762 - Return the inline continuation of an IB split when appending. r=mats, a=jcristau - - The only reason not to do that is when there's after content in there. We know - that there isn't really any ::after content, since it would've been handled by - FindNextSibling, so we know we're performing a real append. - - MozReview-Commit-ID: ExoPolZy4gG - - --HG-- - extra : source : 333214e07fd463dc1c7db00875bb6dff98eb0cdf ---- - layout/base/crashtests/1419762.html | 15 +++++++++++++++ - layout/base/crashtests/crashtests.list | 1 + - layout/base/nsCSSFrameConstructor.cpp | 7 ++++--- - 3 files changed, 20 insertions(+), 3 deletions(-) - -diff --git layout/base/crashtests/1419762.html layout/base/crashtests/1419762.html -new file mode 100644 -index 000000000000..08a56106db93 ---- /dev/null -+++ layout/base/crashtests/1419762.html -@@ -0,0 +1,15 @@ -+ -+ -diff --git layout/base/crashtests/crashtests.list layout/base/crashtests/crashtests.list -index 7010ca4f2d3f..ecced042e228 100644 ---- layout/base/crashtests/crashtests.list -+++ layout/base/crashtests/crashtests.list -@@ -493,3 +493,4 @@ asserts(0-1) load 1343606.html # bug 1343948 - load 1352380.html - load 1362423-1.html - load 1381323.html -+load 1419762.html -diff --git layout/base/nsCSSFrameConstructor.cpp layout/base/nsCSSFrameConstructor.cpp -index bb6da0dba1da..0a1b588c21df 100644 ---- layout/base/nsCSSFrameConstructor.cpp -+++ layout/base/nsCSSFrameConstructor.cpp -@@ -7044,10 +7044,11 @@ nsCSSFrameConstructor::GetInsertionPrevSibling(InsertionPoint* aInsertion, - *aIsAppend = true; - if (IsFramePartOfIBSplit(aInsertion->mParentFrame)) { - // Since we're appending, we'll walk to the last anonymous frame -- // that was created for the broken inline frame. But don't walk -- // to the trailing inline if it's empty; stop at the block. -+ // that was created for the broken inline frame. We can walk to the -+ // trailing inline, since we know this is a real append, and not an -+ // insert (that would've been handled by `FindNextSibling`). - aInsertion->mParentFrame = -- GetLastIBSplitSibling(aInsertion->mParentFrame, false); -+ GetLastIBSplitSibling(aInsertion->mParentFrame, true); - } - // Get continuation that parents the last child. This MUST be done - // before the AdjustAppendParentForAfterContent call. diff --git a/www/waterfox/files/patch-bug1420001 b/www/waterfox/files/patch-bug1420001 deleted file mode 100644 index 384c973c54d..00000000000 --- a/www/waterfox/files/patch-bug1420001 +++ /dev/null @@ -1,67 +0,0 @@ -commit 3bd032461399 -Author: Emilio Cobos Álvarez -Date: Mon Nov 27 14:57:57 2017 -0600 - - Bug 1420001 - style: Disable :visited if the document is being used as an image (from emilio:visited-as-an-image). r=dholbert, a=sledru - - MozReview-Commit-ID: F9MeT1kXZER - Source-Repo: https://github.com/servo/servo - Source-Revision: 7c99ae3bb8056f7e30a3b40340200eced385902d - - --HG-- - extra : source : ed1802f246cb377522e492bf313038213c114843 - extra : intermediate-source : d1599028c579f31e1441b9df277bf8f38c0e7f56 ---- - servo/components/style/gecko/data.rs | 25 +++++++++++++++++++++++-- - 1 file changed, 23 insertions(+), 2 deletions(-) - -diff --git servo/components/style/gecko/data.rs servo/components/style/gecko/data.rs -index aeab6a938b9f..244fa034ba61 100644 ---- servo/components/style/gecko/data.rs -+++ servo/components/style/gecko/data.rs -@@ -165,12 +165,20 @@ impl PerDocumentStyleDataImpl { - } - - /// Returns whether private browsing is enabled. -- pub fn is_private_browsing_enabled(&self) -> bool { -+ fn is_private_browsing_enabled(&self) -> bool { - let doc = - self.stylist.device().pres_context().mDocument.raw::(); - unsafe { bindings::Gecko_IsPrivateBrowsingEnabled(doc) } - } - -+ /// Returns whether the document is being used as an image. -+ fn is_being_used_as_an_image(&self) -> bool { -+ let doc = -+ self.stylist.device().pres_context().mDocument.raw::(); -+ -+ unsafe { (*doc).mIsBeingUsedAsImage() } -+ } -+ - /// Get the default computed values for this document. - pub fn default_computed_values(&self) -> &Arc { - self.stylist.device().default_computed_values_arc() -@@ -180,9 +188,22 @@ impl PerDocumentStyleDataImpl { - fn visited_links_enabled(&self) -> bool { - unsafe { bindings::Gecko_AreVisitedLinksEnabled() } - } -+ - /// Returns whether visited styles are enabled. - pub fn visited_styles_enabled(&self) -> bool { -- self.visited_links_enabled() && !self.is_private_browsing_enabled() -+ if !self.visited_links_enabled() { -+ return false; -+ } -+ -+ if self.is_private_browsing_enabled() { -+ return false; -+ } -+ -+ if self.is_being_used_as_an_image() { -+ return false; -+ } -+ -+ true - } - - /// Measure heap usage. diff --git a/www/waterfox/files/patch-bug1421009 b/www/waterfox/files/patch-bug1421009 deleted file mode 100644 index 81357b67ec1..00000000000 --- a/www/waterfox/files/patch-bug1421009 +++ /dev/null @@ -1,24 +0,0 @@ -commit d4db948c9381 -Author: Andreas Farre -Date: Tue Dec 5 04:54:00 2017 -0500 - - Bug 1421009 - Don't schedule idle callback if window is shutting down. r=bkelly, a=gchang ---- - dom/base/nsGlobalWindow.cpp | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git dom/base/nsGlobalWindow.cpp dom/base/nsGlobalWindow.cpp -index 40b0847e9b1c..bbbc94095896 100644 ---- dom/base/nsGlobalWindow.cpp -+++ dom/base/nsGlobalWindow.cpp -@@ -913,6 +913,10 @@ nsGlobalWindow::RequestIdleCallback(JSContext* aCx, - MOZ_RELEASE_ASSERT(IsInnerWindow()); - AssertIsOnMainThread(); - -+ if (mInnerObjectsFreed) { -+ return 0; -+ } -+ - uint32_t handle = mIdleRequestCallbackCounter++; - - RefPtr request = diff --git a/www/waterfox/files/patch-bug1421963 b/www/waterfox/files/patch-bug1421963 deleted file mode 100644 index 538df5e120f..00000000000 --- a/www/waterfox/files/patch-bug1421963 +++ /dev/null @@ -1,39 +0,0 @@ -commit edbe55cb9057 -Author: Randell Jesup -Date: Thu Dec 7 13:24:46 2017 -0500 - - Bug 1421963: lock around SCTP input processing, not just the receive callback r=drno ---- - netwerk/sctp/datachannel/DataChannel.cpp | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -diff --git netwerk/sctp/datachannel/DataChannel.cpp netwerk/sctp/datachannel/DataChannel.cpp -index 4a0432469a80..6f13826ed7c6 100644 ---- netwerk/sctp/datachannel/DataChannel.cpp -+++ netwerk/sctp/datachannel/DataChannel.cpp -@@ -817,6 +817,7 @@ DataChannelConnection::SctpDtlsInput(TransportFlow *flow, - } - } - // Pass the data to SCTP -+ MutexAutoLock lock(mLock); - usrsctp_conninput(static_cast(this), data, len, 0); - } - -@@ -1224,7 +1225,7 @@ DataChannelConnection::SendDeferredMessages() - RefPtr channel; // we may null out the refs to this - - // This may block while something is modifying channels, but should not block for IO -- MutexAutoLock lock(mLock); -+ mLock.AssertCurrentThreadOwns(); - - LOG(("SendDeferredMessages called, pending type: %d", mPendingType)); - if (!mPendingType) { -@@ -2307,7 +2308,7 @@ DataChannelConnection::ReceiveCallback(struct socket* sock, void *data, size_t d - if (!data) { - usrsctp_close(sock); // SCTP has finished shutting down - } else { -- MutexAutoLock lock(mLock); -+ mLock.AssertCurrentThreadOwns(); - if (flags & MSG_NOTIFICATION) { - HandleNotification(static_cast(data), datalen); - } else { diff --git a/www/waterfox/files/patch-bug1422036 b/www/waterfox/files/patch-bug1422036 deleted file mode 100644 index 3f19764927f..00000000000 --- a/www/waterfox/files/patch-bug1422036 +++ /dev/null @@ -1,229 +0,0 @@ -commit 74ed31e949fa -Author: Andrea Marchesini -Date: Mon Feb 5 19:55:08 2018 +0100 - - Bug 1422036 - Using WorkerControlRunnable to release resources in fetch when the worker is shutting down. r=catalinb, a=RyanVM - - --HG-- - extra : source : d79788e03f7451ebc4a3c694117497f091a5a129 ---- - dom/fetch/FetchConsumer.cpp | 123 +++++++++++++++++++++++++++++++++++++------- - dom/fetch/FetchConsumer.h | 5 +- - 2 files changed, 106 insertions(+), 22 deletions(-) - -diff --git dom/fetch/FetchConsumer.cpp dom/fetch/FetchConsumer.cpp -index b83c8671404a..1e173f9c9661 100644 ---- dom/fetch/FetchConsumer.cpp -+++ dom/fetch/FetchConsumer.cpp -@@ -102,6 +102,32 @@ public: - } - }; - -+// ControlRunnable used to complete the releasing of resources on the worker -+// thread when already shutting down. -+template -+class ContinueConsumeBodyControlRunnable final : public MainThreadWorkerControlRunnable -+{ -+ RefPtr> mFetchBodyConsumer; -+ -+public: -+ ContinueConsumeBodyControlRunnable(FetchBodyConsumer* aFetchBodyConsumer, -+ uint8_t* aResult) -+ : MainThreadWorkerControlRunnable(aFetchBodyConsumer->GetWorkerPrivate()) -+ , mFetchBodyConsumer(aFetchBodyConsumer) -+ { -+ MOZ_ASSERT(NS_IsMainThread()); -+ free(aResult); -+ } -+ -+ bool -+ WorkerRun(JSContext* aCx, WorkerPrivate* aWorkerPrivate) override -+ { -+ mFetchBodyConsumer->ContinueConsumeBody(NS_BINDING_ABORTED, 0, nullptr, -+ true /* shutting down */); -+ return true; -+ } -+}; -+ - template - class FailConsumeBodyWorkerRunnable : public MainThreadWorkerControlRunnable - { -@@ -189,6 +215,31 @@ public: - } - }; - -+// ControlRunnable used to complete the releasing of resources on the worker -+// thread when already shutting down. -+template -+class ContinueConsumeBlobBodyControlRunnable final -+ : public MainThreadWorkerControlRunnable -+{ -+ RefPtr> mFetchBodyConsumer; -+ -+public: -+ explicit ContinueConsumeBlobBodyControlRunnable(FetchBodyConsumer* aFetchBodyConsumer) -+ : MainThreadWorkerControlRunnable(aFetchBodyConsumer->GetWorkerPrivate()) -+ , mFetchBodyConsumer(aFetchBodyConsumer) -+ { -+ MOZ_ASSERT(NS_IsMainThread()); -+ } -+ -+ bool -+ WorkerRun(JSContext* aCx, WorkerPrivate* aWorkerPrivate) override -+ { -+ mFetchBodyConsumer->ContinueConsumeBlobBody(nullptr, -+ true /* shutting down */); -+ return true; -+ } -+}; -+ - template - class ConsumeBodyDoneObserver : public nsIStreamLoaderObserver - , public MutableBlobStorageCallback -@@ -216,20 +267,33 @@ public: - mFetchBodyConsumer->NullifyConsumeBodyPump(); - - uint8_t* nonconstResult = const_cast(aResult); -- if (mFetchBodyConsumer->GetWorkerPrivate()) { -+ if (!mFetchBodyConsumer->GetWorkerPrivate()) { -+ mFetchBodyConsumer->ContinueConsumeBody(aStatus, aResultLength, -+ nonconstResult); -+ // FetchBody is responsible for data. -+ return NS_SUCCESS_ADOPTED_DATA; -+ } -+ -+ { - RefPtr> r = - new ContinueConsumeBodyRunnable(mFetchBodyConsumer, - aStatus, - aResultLength, - nonconstResult); -- if (!r->Dispatch()) { -- NS_WARNING("Could not dispatch ConsumeBodyRunnable"); -- // Return failure so that aResult is freed. -- return NS_ERROR_FAILURE; -+ if (r->Dispatch()) { -+ // FetchBody is responsible for data. -+ return NS_SUCCESS_ADOPTED_DATA; - } -- } else { -- mFetchBodyConsumer->ContinueConsumeBody(aStatus, aResultLength, -- nonconstResult); -+ } -+ -+ // The worker is shutting down. Let's use a control runnable to complete the -+ // shutting down procedure. -+ -+ RefPtr> r = -+ new ContinueConsumeBodyControlRunnable(mFetchBodyConsumer, -+ nonconstResult); -+ if (NS_WARN_IF(!r->Dispatch())) { -+ return NS_ERROR_FAILURE; - } - - // FetchBody is responsible for data. -@@ -252,18 +316,28 @@ public: - - MOZ_ASSERT(aBlob); - -- if (mFetchBodyConsumer->GetWorkerPrivate()) { -+ if (!mFetchBodyConsumer->GetWorkerPrivate()) { -+ mFetchBodyConsumer->ContinueConsumeBlobBody(aBlob->Impl()); -+ return; -+ } -+ -+ { - RefPtr> r = - new ContinueConsumeBlobBodyRunnable(mFetchBodyConsumer, - aBlob->Impl()); - -- if (!r->Dispatch()) { -- NS_WARNING("Could not dispatch ConsumeBlobBodyRunnable"); -+ if (r->Dispatch()) { - return; - } -- } else { -- mFetchBodyConsumer->ContinueConsumeBlobBody(aBlob->Impl()); - } -+ -+ // The worker is shutting down. Let's use a control runnable to complete the -+ // shutting down procedure. -+ -+ RefPtr> r = -+ new ContinueConsumeBlobBodyControlRunnable(mFetchBodyConsumer); -+ -+ Unused << NS_WARN_IF(!r->Dispatch()); - } - - private: -@@ -525,7 +599,8 @@ template - void - FetchBodyConsumer::ContinueConsumeBody(nsresult aStatus, - uint32_t aResultLength, -- uint8_t* aResult) -+ uint8_t* aResult, -+ bool aShuttingDown) - { - AssertIsOnTargetThread(); - -@@ -550,6 +625,11 @@ FetchBodyConsumer::ContinueConsumeBody(nsresult aStatus, - self->ReleaseObject(); - }); - -+ if (aShuttingDown) { -+ // If shutting down, we don't want to resolve any promise. -+ return; -+ } -+ - if (NS_WARN_IF(NS_FAILED(aStatus))) { - localPromise->MaybeReject(NS_ERROR_DOM_ABORT_ERR); - } -@@ -632,7 +712,8 @@ FetchBodyConsumer::ContinueConsumeBody(nsresult aStatus, - - template - void --FetchBodyConsumer::ContinueConsumeBlobBody(BlobImpl* aBlobImpl) -+FetchBodyConsumer::ContinueConsumeBlobBody(BlobImpl* aBlobImpl, -+ bool aShuttingDown) - { - AssertIsOnTargetThread(); - MOZ_ASSERT(mConsumeType == CONSUME_BLOB); -@@ -646,13 +727,15 @@ FetchBodyConsumer::ContinueConsumeBlobBody(BlobImpl* aBlobImpl) - // sync with a body read. - MOZ_ASSERT(mBody->BodyUsed()); - -- MOZ_ASSERT(mConsumePromise); -- RefPtr localPromise = mConsumePromise.forget(); -+ if (!aShuttingDown) { -+ MOZ_ASSERT(mConsumePromise); -+ RefPtr localPromise = mConsumePromise.forget(); - -- RefPtr blob = dom::Blob::Create(mGlobal, aBlobImpl); -- MOZ_ASSERT(blob); -+ RefPtr blob = dom::Blob::Create(mGlobal, aBlobImpl); -+ MOZ_ASSERT(blob); - -- localPromise->MaybeResolve(blob); -+ localPromise->MaybeResolve(blob); -+ } - - ReleaseObject(); - } -diff --git dom/fetch/FetchConsumer.h dom/fetch/FetchConsumer.h -index 04b02aee5d4b..d45b62b8379b 100644 ---- dom/fetch/FetchConsumer.h -+++ dom/fetch/FetchConsumer.h -@@ -54,10 +54,11 @@ public: - BeginConsumeBodyMainThread(); - - void -- ContinueConsumeBody(nsresult aStatus, uint32_t aLength, uint8_t* aResult); -+ ContinueConsumeBody(nsresult aStatus, uint32_t aLength, uint8_t* aResult, -+ bool aShuttingDown = false); - - void -- ContinueConsumeBlobBody(BlobImpl* aBlobImpl); -+ ContinueConsumeBlobBody(BlobImpl* aBlobImpl, bool aShuttingDown = false); - - void - ShutDownMainThreadConsuming(); diff --git a/www/waterfox/files/patch-bug1422389 b/www/waterfox/files/patch-bug1422389 deleted file mode 100644 index 07096fca06d..00000000000 --- a/www/waterfox/files/patch-bug1422389 +++ /dev/null @@ -1,28 +0,0 @@ -commit 25e68494fad3 -Author: Jan-Ivar Bruaroey -Date: Fri Dec 1 20:49:46 2017 -0500 - - Bug 1422389 - Limit default engine resolution. r=mchiang, a=abillings - - MozReview-Commit-ID: LS1z7I4myeb - - --HG-- - extra : rebase_source : 200216163b4555ede8912e64871eea81eb8affac - extra : source : f0fd6e20a13d11660a5ac57e9703f09978f12acb ---- - dom/media/webrtc/MediaEngineDefault.cpp | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git dom/media/webrtc/MediaEngineDefault.cpp dom/media/webrtc/MediaEngineDefault.cpp -index ea5996e92e23..01efb04b5df8 100644 ---- dom/media/webrtc/MediaEngineDefault.cpp -+++ dom/media/webrtc/MediaEngineDefault.cpp -@@ -120,6 +120,8 @@ MediaEngineDefaultVideoSource::Allocate(const dom::MediaTrackConstraints &aConst - MediaEngine::DEFAULT_43_VIDEO_HEIGHT - #endif - ); -+ mOpts.mWidth = std::max(160, std::min(mOpts.mWidth, 4096)); -+ mOpts.mHeight = std::max(90, std::min(mOpts.mHeight, 2160)); - mState = kAllocated; - *aOutHandle = nullptr; - return NS_OK; diff --git a/www/waterfox/files/patch-bug1422518 b/www/waterfox/files/patch-bug1422518 deleted file mode 100644 index bc8a641cb33..00000000000 --- a/www/waterfox/files/patch-bug1422518 +++ /dev/null @@ -1,27 +0,0 @@ -commit 22e0f06767fe -Author: Valentin Gosu -Date: Tue Dec 5 02:29:41 2017 +0100 - - Bug 1422518 - Use LOAD_FLAGS_DISALLOW_INHERIT_PRINCIPAL for meta refresh r=bz a=gchang - MozReview-Commit-ID: H3hnO3NmHYA - - --HG-- - extra : rebase_source : b9f7cbccdd2f2723e6d66d89f9ac529d462d75dd - extra : source : 6f5aec4cde6f874921eaa1b0b9d7e9d4c7feabe0 ---- - docshell/base/nsDocShell.cpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git docshell/base/nsDocShell.cpp docshell/base/nsDocShell.cpp -index 83cb87dd8255..31d414d1b57d 100644 ---- docshell/base/nsDocShell.cpp -+++ docshell/base/nsDocShell.cpp -@@ -6976,7 +6976,7 @@ nsDocShell::ForceRefreshURI(nsIURI* aURI, nsIPrincipal* aPrincipal, int32_t aDel - * LoadURI(...) will cancel all refresh timers... This causes the - * Timer and its refreshData instance to be released... - */ -- LoadURI(aURI, loadInfo, nsIWebNavigation::LOAD_FLAGS_NONE, true); -+ LoadURI(aURI, loadInfo, nsIWebNavigation::LOAD_FLAGS_DISALLOW_INHERIT_PRINCIPAL, true); - - return NS_OK; - } diff --git a/www/waterfox/files/patch-bug1422545 b/www/waterfox/files/patch-bug1422545 deleted file mode 100644 index 0bf2e1e3109..00000000000 --- a/www/waterfox/files/patch-bug1422545 +++ /dev/null @@ -1,38 +0,0 @@ -commit d5e722168a84 -Author: Dragana Damjanovic -Date: Wed Dec 20 16:13:36 2017 +0100 - - Bug 1422545 - Do not close connection between a httpChannelChild and its httpChannelParent if we need to divert to parent. r=mayhemer, a=jcristau - - If UnknowDecoder is involved and the received content is short we will know whether we need to divert to parent only after OnStartRequest of the listener chain is called. Therefore do not do cleanup if we detect diversion. - - --HG-- - extra : source : e87b07c9db7c302237fa0adbb68c0f31b1840191 ---- - netwerk/protocol/http/HttpChannelChild.cpp | 13 +++++++++++++ - 1 file changed, 13 insertions(+) - -diff --git netwerk/protocol/http/HttpChannelChild.cpp netwerk/protocol/http/HttpChannelChild.cpp -index 18b9fe2de1db..8fc7746a2a42 100644 ---- netwerk/protocol/http/HttpChannelChild.cpp -+++ netwerk/protocol/http/HttpChannelChild.cpp -@@ -1100,6 +1100,19 @@ HttpChannelChild::OnStopRequest(const nsresult& channelStatus, - // DoOnStopRequest() calls ReleaseListeners() - } - -+ // If unknownDecoder is involved and the received content is short we will -+ // know whether we need to divert to parent only after OnStopRequest of the -+ // listeners chain is called in DoOnStopRequest. At that moment -+ // unknownDecoder will call OnStartRequest of the real listeners of the -+ // channel including the OnStopRequest of UrlLoader which decides whether we -+ // need to divert to parent. -+ // If we are diverting to parent we should not do a cleanup. -+ if (mDivertingToParent) { -+ LOG(("HttpChannelChild::OnStopRequest - We are diverting to parent, " -+ "postpone cleaning up.")); -+ return; -+ } -+ - CleanupBackgroundChannel(); - - // If there is a possibility we might want to write alt data to the cache diff --git a/www/waterfox/files/patch-bug1423647 b/www/waterfox/files/patch-bug1423647 deleted file mode 100644 index 06855735a09..00000000000 --- a/www/waterfox/files/patch-bug1423647 +++ /dev/null @@ -1,37 +0,0 @@ -commit 65de8dd25011 -Author: Dão Gottwald -Date: Thu Dec 7 12:25:33 2017 +0100 - - Bug 1423647 - Restore border-radius for buttons in the Downloads View in the Library. r=mak, a=jcristau - - MozReview-Commit-ID: 6kkdp8pHAlv - - --HG-- - extra : source : 1b381ddb9779e2e0bc2be4f9382ca8560862b409 ---- - browser/themes/shared/downloads/allDownloadsViewOverlay.inc.css | 5 +---- - 1 file changed, 1 insertion(+), 4 deletions(-) - -diff --git browser/themes/shared/downloads/allDownloadsViewOverlay.inc.css browser/themes/shared/downloads/allDownloadsViewOverlay.inc.css -index 063668d48509..663b0893892c 100644 ---- browser/themes/shared/downloads/allDownloadsViewOverlay.inc.css -+++ browser/themes/shared/downloads/allDownloadsViewOverlay.inc.css -@@ -80,10 +80,6 @@ - padding: 0 18px; - } - --.downloadButton:-moz-focusring { -- -moz-outline-radius: 50%; --} -- - .downloadButton > .button-box { - -moz-appearance: none; - padding: 2px !important; -@@ -104,6 +100,7 @@ - .downloadButton:hover > .button-box { - background-color: graytext; - color: -moz-field; -+ border-radius: 50%; - } - - .downloadButton:hover:active > .button-box { diff --git a/www/waterfox/files/patch-bug1423770 b/www/waterfox/files/patch-bug1423770 deleted file mode 100644 index bd82b116bf1..00000000000 --- a/www/waterfox/files/patch-bug1423770 +++ /dev/null @@ -1,44 +0,0 @@ -commit 2506c20ded5b -Author: Alex Chronopoulos -Date: Wed Dec 20 09:21:40 2017 -0500 - - Bug 1423770. r=padenot, a=jcristau - - --HG-- - extra : rebase_source : 6c9ad483fe1ef89966e1a2a1fac8a9bdb8bf43c8 ---- - media/webrtc/signaling/src/mediapipeline/MediaPipeline.cpp | 7 ++++--- - 1 file changed, 4 insertions(+), 3 deletions(-) - -diff --git media/webrtc/signaling/src/mediapipeline/MediaPipeline.cpp media/webrtc/signaling/src/mediapipeline/MediaPipeline.cpp -index 5c2bcd16d017..2bb7203f85bd 100644 ---- media/webrtc/signaling/src/mediapipeline/MediaPipeline.cpp -+++ media/webrtc/signaling/src/mediapipeline/MediaPipeline.cpp -@@ -518,6 +518,7 @@ public: - packetizer_->Channels() != outputChannels) { - // It's ok to drop the audio still in the packetizer here. - packetizer_ = new AudioPacketizer(audio_10ms, outputChannels); -+ packet_ = MakeUnique(audio_10ms * outputChannels); - } - - packetizer_->Input(samples, chunk.mDuration); -@@ -525,8 +526,8 @@ public: - while (packetizer_->PacketsAvailable()) { - uint32_t samplesPerPacket = packetizer_->PacketSize() * - packetizer_->Channels(); -- packetizer_->Output(packet_); -- mConduit->SendAudioFrame(packet_, samplesPerPacket, rate, 0); -+ packetizer_->Output(packet_.get()); -+ mConduit->SendAudioFrame(packet_.get(), samplesPerPacket, rate, 0); - } - } - -@@ -555,7 +556,7 @@ protected: - // Only accessed on mThread - nsAutoPtr> packetizer_; - // A buffer to hold a single packet of audio. -- int16_t packet_[AUDIO_SAMPLE_BUFFER_MAX_BYTES / sizeof(int16_t)]; -+ UniquePtr packet_; - }; - - static char kDTLSExporterLabel[] = "EXTRACTOR-dtls_srtp"; diff --git a/www/waterfox/files/patch-bug1424311 b/www/waterfox/files/patch-bug1424311 deleted file mode 100644 index 8db2056c22a..00000000000 --- a/www/waterfox/files/patch-bug1424311 +++ /dev/null @@ -1,66 +0,0 @@ -commit af4e28ddf70d -Author: David Keeler -Date: Wed Mar 28 13:43:03 2018 -0700 - - Bug 1424311 - Don't persist the certificate exception dialog's size so it doesn't grow unboundedly. r=jcj, a=RyanVM - - window.sizeToContent() apparently interacts poorly with windows that have a - persisted size (see bug 90276, which is a 5-digit bug that hasn't been touched - in over a decade). As a workaround, don't persist the certificate exception - dialog's size. This means we have to call window.sizeToContent() more often and - unfortunately results in the window growing and shrinking again on Windows, but - at least it will always be the "right size" for its content. - - MozReview-Commit-ID: 9UT3X8IEqZg - - --HG-- - extra : source : 02213fd3a9c84544936a6901adb8821e0c0f44b9 ---- - security/manager/pki/resources/content/exceptionDialog.js | 3 ++- - security/manager/pki/resources/content/exceptionDialog.xul | 2 -- - 2 files changed, 2 insertions(+), 3 deletions(-) - -diff --git security/manager/pki/resources/content/exceptionDialog.js security/manager/pki/resources/content/exceptionDialog.js -index bf17af169c54..72c7d455e958 100644 ---- security/manager/pki/resources/content/exceptionDialog.js -+++ security/manager/pki/resources/content/exceptionDialog.js -@@ -59,6 +59,7 @@ function initExceptionDialog() { - // Set out parameter to false by default - args[0].exceptionAdded = false; - } -+ window.sizeToContent(); - } - - /** -@@ -150,6 +151,7 @@ function resetDialog() { - setText("status2LongDescription", ""); - setText("status3Description", ""); - setText("status3LongDescription", ""); -+ window.sizeToContent(); - } - - /** -@@ -275,7 +277,6 @@ function updateCertStatus() { - } - - window.sizeToContent(); -- - gNeedReset = true; - } - -diff --git security/manager/pki/resources/content/exceptionDialog.xul security/manager/pki/resources/content/exceptionDialog.xul -index 6d417f360ccd..b7d85e2930c4 100644 ---- security/manager/pki/resources/content/exceptionDialog.xul -+++ security/manager/pki/resources/content/exceptionDialog.xul -@@ -14,11 +14,9 @@ - buttons="cancel,extra1,extra2" - buttonlabelextra1="&exceptionMgr.exceptionButton.label;" - buttonaccesskeyextra1="&exceptionMgr.exceptionButton.accesskey;" -- style="width: 46em; min-height: 38em;" - onload="initExceptionDialog();" - ondialogextra1="addException();" - ondialogextra2="checkCert();" -- persist="screenX screenY width height" - defaultButton="extra2"> - - diff --git a/www/waterfox/files/patch-bug1424373 b/www/waterfox/files/patch-bug1424373 deleted file mode 100644 index e237dfc67cd..00000000000 --- a/www/waterfox/files/patch-bug1424373 +++ /dev/null @@ -1,305 +0,0 @@ -commit 3512ab03dd1f -Author: Mike Conley -Date: Mon Dec 18 11:19:53 2017 -0500 - - Bug 1424373 - Don't set crash reporting prefs when showing about:tabcrashed for a crash without a report. r=Mossop a=jcristau ---- - browser/base/content/aboutTabCrashed.js | 1 + - .../test/tabcrashed/browser_autoSubmitRequest.js | 63 ++++++++++++++++++++-- - .../content/test/tabcrashed/browser_withoutDump.js | 10 +--- - browser/base/content/test/tabcrashed/head.js | 12 +++++ - browser/modules/ContentCrashHandlers.jsm | 13 +++-- - 5 files changed, 83 insertions(+), 16 deletions(-) - -diff --git browser/base/content/aboutTabCrashed.js browser/base/content/aboutTabCrashed.js -index 822e3f78d4b5..8fccc92aa0fe 100644 ---- browser/base/content/aboutTabCrashed.js -+++ browser/base/content/aboutTabCrashed.js -@@ -303,6 +303,7 @@ var AboutTabCrashed = { - includeURL, - URL, - autoSubmit, -+ hasReport: this.hasReport, - }); - }, - }; -diff --git browser/base/content/test/tabcrashed/browser_autoSubmitRequest.js browser/base/content/test/tabcrashed/browser_autoSubmitRequest.js -index a86b1e2c79b7..e04ebc80cdea 100644 ---- browser/base/content/test/tabcrashed/browser_autoSubmitRequest.js -+++ browser/base/content/test/tabcrashed/browser_autoSubmitRequest.js -@@ -19,9 +19,9 @@ requestLongerTimeout(2); - add_task(async function test_show_form() { - await SpecialPowers.pushPrefEnv({ - set: [[AUTOSUBMIT_PREF, false]], -- }) -+ }); - -- return BrowserTestUtils.withNewTab({ -+ await BrowserTestUtils.withNewTab({ - gBrowser, - url: PAGE, - }, async function(browser) { -@@ -66,9 +66,9 @@ add_task(async function test_show_form() { - add_task(async function test_show_form() { - await SpecialPowers.pushPrefEnv({ - set: [[AUTOSUBMIT_PREF, true]], -- }) -+ }); - -- return BrowserTestUtils.withNewTab({ -+ await BrowserTestUtils.withNewTab({ - gBrowser, - url: PAGE, - }, async function(browser) { -@@ -95,3 +95,58 @@ add_task(async function test_show_form() { - "Autosubmission pref should have been set."); - }); - }); -+ -+/** -+ * Tests that we properly set the autoSubmit preference if the user is -+ * presented with a tabcrashed page without a crash report. -+ */ -+add_task(async function test_no_offer() { -+ // We should default to sending the report. -+ Assert.ok(TabCrashHandler.prefs.getBoolPref("sendReport")); -+ -+ await SpecialPowers.pushPrefEnv({ -+ set: [[AUTOSUBMIT_PREF, false]], -+ }); -+ -+ await BrowserTestUtils.withNewTab({ -+ gBrowser, -+ url: PAGE, -+ }, async function(browser) { -+ await TabStateFlusher.flush(browser); -+ -+ // Make it so that it seems like no dump is available for the next crash. -+ prepareNoDump(); -+ -+ // Now crash the browser. -+ await BrowserTestUtils.crashBrowser(browser); -+ -+ // eslint-disable-next-line mozilla/no-cpows-in-tests -+ let doc = browser.contentDocument; -+ -+ // Ensure the request to autosubmit is invisible, since there's no report. -+ let requestRect = doc.getElementById("requestAutoSubmit") -+ .getBoundingClientRect(); -+ Assert.equal(0, requestRect.height, -+ "Request for autosubmission has no height"); -+ Assert.equal(0, requestRect.width, -+ "Request for autosubmission has no width"); -+ -+ // Since the pref is set to false, the checkbox should be -+ // unchecked. -+ let autoSubmit = doc.getElementById("autoSubmit"); -+ Assert.ok(!autoSubmit.checked, -+ "Checkbox for autosubmission is not checked."); -+ -+ let restoreButton = doc.getElementById("restoreTab"); -+ restoreButton.click(); -+ -+ await BrowserTestUtils.browserLoaded(browser, false, PAGE); -+ -+ // The autosubmission pref should now be set. -+ Assert.ok(!Services.prefs.getBoolPref(AUTOSUBMIT_PREF), -+ "Autosubmission pref should not have changed."); -+ }); -+ -+ // We should not have changed the default value for sending the report. -+ Assert.ok(TabCrashHandler.prefs.getBoolPref("sendReport")); -+}); -diff --git browser/base/content/test/tabcrashed/browser_withoutDump.js browser/base/content/test/tabcrashed/browser_withoutDump.js -index 62d997240af4..33bc2b3164a1 100644 ---- browser/base/content/test/tabcrashed/browser_withoutDump.js -+++ browser/base/content/test/tabcrashed/browser_withoutDump.js -@@ -2,16 +2,8 @@ - - const PAGE = "data:text/html,A%20regular,%20everyday,%20normal%20page."; - --/** -- * Monkey patches TabCrashHandler.getDumpID to return null in order to test -- * about:tabcrashed when a dump is not available. -- */ - add_task(async function setup() { -- let originalGetDumpID = TabCrashHandler.getDumpID; -- TabCrashHandler.getDumpID = function(browser) { return null; }; -- registerCleanupFunction(() => { -- TabCrashHandler.getDumpID = originalGetDumpID; -- }); -+ prepareNoDump(); - }); - - /** -diff --git browser/base/content/test/tabcrashed/head.js browser/base/content/test/tabcrashed/head.js -index e437acbcc4d5..9102e409ee91 100644 ---- browser/base/content/test/tabcrashed/head.js -+++ browser/base/content/test/tabcrashed/head.js -@@ -121,3 +121,15 @@ async function setupLocalCrashReportServer() { - env.set("MOZ_CRASHREPORTER_URL", serverUrl); - }); - } -+ -+/** -+ * Monkey patches TabCrashHandler.getDumpID to return null in order to test -+ * about:tabcrashed when a dump is not available. -+ */ -+function prepareNoDump() { -+ let originalGetDumpID = TabCrashHandler.getDumpID; -+ TabCrashHandler.getDumpID = function(browser) { return null; }; -+ registerCleanupFunction(() => { -+ TabCrashHandler.getDumpID = originalGetDumpID; -+ }); -+} -diff --git browser/modules/ContentCrashHandlers.jsm browser/modules/ContentCrashHandlers.jsm -index 36e60ede4f03..524d6a86a50a 100644 ---- browser/modules/ContentCrashHandlers.jsm -+++ browser/modules/ContentCrashHandlers.jsm -@@ -361,8 +361,14 @@ this.TabCrashHandler = { - * even if they are empty. - */ - maybeSendCrashReport(message) { -- if (!AppConstants.MOZ_CRASHREPORTER) -+ if (!AppConstants.MOZ_CRASHREPORTER) { -+ return; -+ } -+ -+ if (!message.data.hasReport) { -+ // There was no report, so nothing to do. - return; -+ } - - let browser = message.target.browser; - -@@ -374,8 +380,9 @@ this.TabCrashHandler = { - - let childID = this.browserMap.get(browser); - let dumpID = this.childMap.get(childID); -- if (!dumpID) -- return -+ if (!dumpID) { -+ return; -+ } - - if (!message.data.sendReport) { - Services.telemetry.getHistogramById("FX_CONTENT_CRASH_NOT_SUBMITTED").add(1); - -commit a4a421108540 -Author: Mike Conley -Date: Thu Dec 21 16:36:13 2017 -0500 - - Bug 1424373 - Rename crash report submission pref. r=Mossop a=jcristau ---- - browser/app/profile/firefox.js | 2 +- - browser/base/content/test/tabcrashed/browser_autoSubmitRequest.js | 2 +- - browser/components/preferences/in-content/privacy.xul | 6 +++--- - .../tests/browser_bug1020245_openPreferences_to_paneContent.js | 4 ++-- - .../components/sessionstore/test/browser_background_tab_crash.js | 2 +- - browser/modules/ContentCrashHandlers.jsm | 4 ++-- - browser/modules/test/browser/browser_UnsubmittedCrashHandler.js | 4 ++-- - 7 files changed, 12 insertions(+), 12 deletions(-) - -diff --git browser/app/profile/firefox.js browser/app/profile/firefox.js -index 8c29be0acc58..a1844936fdea 100644 ---- browser/app/profile/firefox.js -+++ browser/app/profile/firefox.js -@@ -1664,7 +1664,7 @@ pref("browser.crashReports.unsubmittedCheck.enabled", false); - // without a user choice before we suppress the notification for - // some number of days. - pref("browser.crashReports.unsubmittedCheck.chancesUntilSuppress", 4); --pref("browser.crashReports.unsubmittedCheck.autoSubmit", false); -+pref("browser.crashReports.unsubmittedCheck.autoSubmit2", false); - - // Preferences for the form autofill system extension - // The truthy values of "extensions.formautofill.available" are "on" and "detect", -diff --git browser/base/content/test/tabcrashed/browser_autoSubmitRequest.js browser/base/content/test/tabcrashed/browser_autoSubmitRequest.js -index e04ebc80cdea..1d4a70a1d145 100644 ---- browser/base/content/test/tabcrashed/browser_autoSubmitRequest.js -+++ browser/base/content/test/tabcrashed/browser_autoSubmitRequest.js -@@ -1,7 +1,7 @@ - "use strict"; - - const PAGE = "data:text/html,A%20regular,%20everyday,%20normal%20page."; --const AUTOSUBMIT_PREF = "browser.crashReports.unsubmittedCheck.autoSubmit"; -+const AUTOSUBMIT_PREF = "browser.crashReports.unsubmittedCheck.autoSubmit2"; - - const {TabStateFlusher} = - Cu.import("resource:///modules/sessionstore/TabStateFlusher.jsm", {}); -diff --git browser/components/preferences/in-content-new/privacy.xul browser/components/preferences/in-content-new/privacy.xul -index 7eb882972ffa..1d34065ac7e5 100644 ---- browser/components/preferences/in-content-new/privacy.xul -+++ browser/components/preferences/in-content-new/privacy.xul -@@ -161,8 +161,8 @@ - - - #ifdef MOZ_CRASHREPORTER -- - #endif - -@@ -671,7 +671,7 @@ - #ifdef MOZ_CRASHREPORTER - - -
-+ -diff --git layout/style/crashtests/crashtests.list layout/style/crashtests/crashtests.list -index d75d5559ec2b..be9a46c52bfa 100644 ---- layout/style/crashtests/crashtests.list -+++ layout/style/crashtests/crashtests.list -@@ -206,3 +206,4 @@ load 1404324-2.html - load 1404324-3.html - load 1398581.html - load 1404057.html -+load 1404180-1.html diff --git a/www/waterfox/files/patch-bug1404323 b/www/waterfox/files/patch-bug1404323 deleted file mode 100644 index 20adb23c2c4..00000000000 --- a/www/waterfox/files/patch-bug1404323 +++ /dev/null @@ -1,27 +0,0 @@ -commit f9c6b4c7459c -Author: Lee Salzman -Date: Fri Sep 29 23:59:40 2017 -0400 - - Bug 1404323 - Limit WindowSurfaceX11Image::Commit to clip bounds. r=gankro, a=ritu - - MozReview-Commit-ID: 55GbZ2EHdbQ - - --HG-- - extra : source : 19c2892e7a3ad24b6d235948ef514b20e216b57d ---- - widget/gtk/WindowSurfaceX11Image.cpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git widget/gtk/WindowSurfaceX11Image.cpp widget/gtk/WindowSurfaceX11Image.cpp -index 5de0288043d6..59db17b642f2 100644 ---- widget/gtk/WindowSurfaceX11Image.cpp -+++ widget/gtk/WindowSurfaceX11Image.cpp -@@ -93,7 +93,7 @@ WindowSurfaceX11Image::Commit(const LayoutDeviceIntRegion& aInvalidRegion) - } - - gfx::IntRect bounds = aInvalidRegion.GetBounds().ToUnknownRect(); -- gfx::Rect rect(0, 0, bounds.XMost(), bounds.YMost()); -+ gfx::Rect rect(bounds); - if (rect.IsEmpty()) { - return; - } diff --git a/www/waterfox/files/patch-bug1404324 b/www/waterfox/files/patch-bug1404324 deleted file mode 100644 index afcbc3efb2e..00000000000 --- a/www/waterfox/files/patch-bug1404324 +++ /dev/null @@ -1,299 +0,0 @@ -commit 5647dde295f4 -Author: Emilio Cobos Álvarez -Date: Wed Oct 4 11:36:20 2017 +0200 - - Bug 1404324 - Use the placeholder state to remove out-of-flows that aren't real descendants of the destruction root. r=bz, a=ritu - - Using the style of the frame can mess things up when we reparent them due to - ::first-line before removing them. - - MozReview-Commit-ID: 3Dt0wF2XRAH - - --HG-- - extra : source : 5a034cdb513208dd19adf0babf30ee734968a78f - extra : histedit_source : 4cd958939c5a76e013695e931d721454268a0dc7%2C96bdeda302c567493c7db5105f306595d25332e1 ---- - layout/base/nsCSSFrameConstructor.cpp | 8 +++--- - layout/base/nsLayoutUtils.cpp | 46 +++------------------------------ - layout/generic/nsPlaceholderFrame.cpp | 27 ++++++++++++++++--- - layout/generic/nsPlaceholderFrame.h | 21 ++++++++------- - layout/style/crashtests/1404324-1.html | 12 +++++++++ - layout/style/crashtests/1404324-2.html | 10 +++++++ - layout/style/crashtests/1404324-3.html | 14 ++++++++++ - layout/style/crashtests/crashtests.list | 3 +++ - 8 files changed, 83 insertions(+), 58 deletions(-) - -diff --git layout/base/nsCSSFrameConstructor.cpp layout/base/nsCSSFrameConstructor.cpp -index c840416fd6a7..99b1211b399b 100644 ---- layout/base/nsCSSFrameConstructor.cpp -+++ layout/base/nsCSSFrameConstructor.cpp -@@ -1260,8 +1260,10 @@ nsFrameConstructorState::GetOutOfFlowFrameItems(nsIFrame* aNewFrame, - if (disp->mTopLayer != NS_STYLE_TOP_LAYER_NONE) { - *aPlaceholderType = PLACEHOLDER_FOR_TOPLAYER; - if (disp->mPosition == NS_STYLE_POSITION_FIXED) { -+ *aPlaceholderType |= PLACEHOLDER_FOR_FIXEDPOS; - return &mTopLayerFixedItems; - } -+ *aPlaceholderType |= PLACEHOLDER_FOR_ABSPOS; - return &mTopLayerAbsoluteItems; - } - if (disp->mPosition == NS_STYLE_POSITION_ABSOLUTE) { -@@ -1303,11 +1305,11 @@ nsFrameConstructorState::ConstructBackdropFrameFor(nsIContent* aContent, - nsAbsoluteItems* frameItems = GetOutOfFlowFrameItems(backdropFrame, - true, true, false, - &placeholderType); -- MOZ_ASSERT(placeholderType == PLACEHOLDER_FOR_TOPLAYER); -+ MOZ_ASSERT(placeholderType & PLACEHOLDER_FOR_TOPLAYER); - - nsIFrame* placeholder = nsCSSFrameConstructor:: - CreatePlaceholderFrameFor(mPresShell, aContent, backdropFrame, -- frame, nullptr, PLACEHOLDER_FOR_TOPLAYER); -+ frame, nullptr, placeholderType); - nsFrameList temp(placeholder, placeholder); - frame->SetInitialChildList(nsIFrame::kBackdropList, temp); - -@@ -1361,7 +1363,7 @@ nsFrameConstructorState::AddChild(nsIFrame* aNewFrame, - // Add the placeholder frame to the flow - aFrameItems.AddChild(placeholderFrame); - -- if (placeholderType == PLACEHOLDER_FOR_TOPLAYER) { -+ if (placeholderType & PLACEHOLDER_FOR_TOPLAYER) { - ConstructBackdropFrameFor(aContent, aNewFrame); - } - } -diff --git layout/base/nsLayoutUtils.cpp layout/base/nsLayoutUtils.cpp -index cb010c0a1a80..94ead9830c25 100644 ---- layout/base/nsLayoutUtils.cpp -+++ layout/base/nsLayoutUtils.cpp -@@ -1525,6 +1525,8 @@ nsLayoutUtils::GetChildListNameFor(nsIFrame* aChildFrame) - { - nsIFrame::ChildListID id = nsIFrame::kPrincipalList; - -+ MOZ_DIAGNOSTIC_ASSERT(!(aChildFrame->GetStateBits() & NS_FRAME_OUT_OF_FLOW)); -+ - if (aChildFrame->GetStateBits() & NS_FRAME_IS_OVERFLOW_CONTAINER) { - nsIFrame* pif = aChildFrame->GetPrevInFlow(); - if (pif->GetParent() == aChildFrame->GetParent()) { -@@ -1533,35 +1535,6 @@ nsLayoutUtils::GetChildListNameFor(nsIFrame* aChildFrame) - else { - id = nsIFrame::kOverflowContainersList; - } -- } -- // See if the frame is moved out of the flow -- else if (aChildFrame->GetStateBits() & NS_FRAME_OUT_OF_FLOW) { -- // Look at the style information to tell -- const nsStyleDisplay* disp = aChildFrame->StyleDisplay(); -- -- if (NS_STYLE_POSITION_ABSOLUTE == disp->mPosition) { -- id = nsIFrame::kAbsoluteList; -- } else if (NS_STYLE_POSITION_FIXED == disp->mPosition) { -- if (nsLayoutUtils::IsReallyFixedPos(aChildFrame)) { -- id = nsIFrame::kFixedList; -- } else { -- id = nsIFrame::kAbsoluteList; -- } --#ifdef MOZ_XUL -- } else if (StyleDisplay::MozPopup == disp->mDisplay) { -- // Out-of-flows that are DISPLAY_POPUP must be kids of the root popup set --#ifdef DEBUG -- nsIFrame* parent = aChildFrame->GetParent(); -- NS_ASSERTION(parent && parent->IsPopupSetFrame(), "Unexpected parent"); --#endif // DEBUG -- -- id = nsIFrame::kPopupList; --#endif // MOZ_XUL -- } else { -- NS_ASSERTION(aChildFrame->IsFloating(), "not a floated frame"); -- id = nsIFrame::kFloatList; -- } -- - } else { - LayoutFrameType childType = aChildFrame->Type(); - if (LayoutFrameType::MenuPopup == childType) { -@@ -1596,19 +1569,8 @@ nsLayoutUtils::GetChildListNameFor(nsIFrame* aChildFrame) - nsContainerFrame* parent = aChildFrame->GetParent(); - bool found = parent->GetChildList(id).ContainsFrame(aChildFrame); - if (!found) { -- if (!(aChildFrame->GetStateBits() & NS_FRAME_OUT_OF_FLOW)) { -- found = parent->GetChildList(nsIFrame::kOverflowList) -- .ContainsFrame(aChildFrame); -- } -- else if (aChildFrame->IsFloating()) { -- found = parent->GetChildList(nsIFrame::kOverflowOutOfFlowList) -- .ContainsFrame(aChildFrame); -- if (!found) { -- found = parent->GetChildList(nsIFrame::kPushedFloatsList) -- .ContainsFrame(aChildFrame); -- } -- } -- // else it's positioned and should have been on the 'id' child list. -+ found = parent->GetChildList(nsIFrame::kOverflowList) -+ .ContainsFrame(aChildFrame); - NS_POSTCONDITION(found, "not in child list"); - } - #endif -diff --git layout/generic/nsPlaceholderFrame.cpp layout/generic/nsPlaceholderFrame.cpp -index 7da2582ae526..4b2e1bf84b36 100644 ---- layout/generic/nsPlaceholderFrame.cpp -+++ layout/generic/nsPlaceholderFrame.cpp -@@ -25,9 +25,9 @@ using namespace mozilla::gfx; - - nsIFrame* - NS_NewPlaceholderFrame(nsIPresShell* aPresShell, nsStyleContext* aContext, -- nsFrameState aTypeBit) -+ nsFrameState aTypeBits) - { -- return new (aPresShell) nsPlaceholderFrame(aContext, aTypeBit); -+ return new (aPresShell) nsPlaceholderFrame(aContext, aTypeBits); - } - - NS_IMPL_FRAMEARENA_HELPERS(nsPlaceholderFrame) -@@ -155,6 +155,26 @@ nsPlaceholderFrame::Reflow(nsPresContext* aPresContext, - NS_FRAME_SET_TRUNCATION(aStatus, aReflowInput, aDesiredSize); - } - -+static nsIFrame::ChildListID -+ChildListIDForOutOfFlow(nsFrameState aPlaceholderState, nsIFrame* aChild) -+{ -+ if (aPlaceholderState & PLACEHOLDER_FOR_FLOAT) { -+ return nsIFrame::kFloatList; -+ } -+ if (aPlaceholderState & PLACEHOLDER_FOR_POPUP) { -+ return nsIFrame::kPopupList; -+ } -+ if (aPlaceholderState & PLACEHOLDER_FOR_FIXEDPOS) { -+ return nsLayoutUtils::IsReallyFixedPos(aChild) -+ ? nsIFrame::kFixedList : nsIFrame::kAbsoluteList; -+ } -+ if (aPlaceholderState & PLACEHOLDER_FOR_ABSPOS) { -+ return nsIFrame::kAbsoluteList; -+ } -+ MOZ_DIAGNOSTIC_ASSERT(false, "unknown list"); -+ return nsIFrame::kFloatList; -+} -+ - void - nsPlaceholderFrame::DestroyFrom(nsIFrame* aDestructRoot) - { -@@ -162,12 +182,13 @@ nsPlaceholderFrame::DestroyFrom(nsIFrame* aDestructRoot) - if (oof) { - mOutOfFlowFrame = nullptr; - oof->DeleteProperty(nsIFrame::PlaceholderFrameProperty()); -+ - // If aDestructRoot is not an ancestor of the out-of-flow frame, - // then call RemoveFrame on it here. - // Also destroy it here if it's a popup frame. (Bug 96291) - if ((GetStateBits() & PLACEHOLDER_FOR_POPUP) || - !nsLayoutUtils::IsProperAncestorFrame(aDestructRoot, oof)) { -- ChildListID listId = nsLayoutUtils::GetChildListNameFor(oof); -+ ChildListID listId = ChildListIDForOutOfFlow(GetStateBits(), oof); - nsFrameManager* fm = PresContext()->GetPresShell()->FrameManager(); - fm->RemoveFrame(listId, oof); - } -diff --git layout/generic/nsPlaceholderFrame.h layout/generic/nsPlaceholderFrame.h -index e270c76cdd31..2af9b4ccbc93 100644 ---- layout/generic/nsPlaceholderFrame.h -+++ layout/generic/nsPlaceholderFrame.h -@@ -40,7 +40,7 @@ - - nsIFrame* NS_NewPlaceholderFrame(nsIPresShell* aPresShell, - nsStyleContext* aContext, -- nsFrameState aTypeBit); -+ nsFrameState aTypeBits); - - #define PLACEHOLDER_TYPE_MASK (PLACEHOLDER_FOR_FLOAT | \ - PLACEHOLDER_FOR_ABSPOS | \ -@@ -65,18 +65,19 @@ public: - */ - friend nsIFrame* NS_NewPlaceholderFrame(nsIPresShell* aPresShell, - nsStyleContext* aContext, -- nsFrameState aTypeBit); -- nsPlaceholderFrame(nsStyleContext* aContext, nsFrameState aTypeBit) -+ nsFrameState aTypeBits); -+ nsPlaceholderFrame(nsStyleContext* aContext, nsFrameState aTypeBits) - : nsFrame(aContext, kClassID) - , mOutOfFlowFrame(nullptr) - { -- NS_PRECONDITION(aTypeBit == PLACEHOLDER_FOR_FLOAT || -- aTypeBit == PLACEHOLDER_FOR_ABSPOS || -- aTypeBit == PLACEHOLDER_FOR_FIXEDPOS || -- aTypeBit == PLACEHOLDER_FOR_POPUP || -- aTypeBit == PLACEHOLDER_FOR_TOPLAYER, -- "Unexpected type bit"); -- AddStateBits(aTypeBit); -+ MOZ_ASSERT(aTypeBits == PLACEHOLDER_FOR_FLOAT || -+ aTypeBits == PLACEHOLDER_FOR_ABSPOS || -+ aTypeBits == PLACEHOLDER_FOR_FIXEDPOS || -+ aTypeBits == PLACEHOLDER_FOR_POPUP || -+ aTypeBits == (PLACEHOLDER_FOR_TOPLAYER | PLACEHOLDER_FOR_ABSPOS) || -+ aTypeBits == (PLACEHOLDER_FOR_TOPLAYER | PLACEHOLDER_FOR_FIXEDPOS), -+ "Unexpected type bit"); -+ AddStateBits(aTypeBits); - } - - // Get/Set the associated out of flow frame -diff --git layout/style/crashtests/1404324-1.html layout/style/crashtests/1404324-1.html -new file mode 100644 -index 000000000000..574a5437cb1b ---- /dev/null -+++ layout/style/crashtests/1404324-1.html -@@ -0,0 +1,12 @@ -+ -+ -diff --git layout/style/crashtests/1404324-2.html layout/style/crashtests/1404324-2.html -new file mode 100644 -index 000000000000..797347d5c058 ---- /dev/null -+++ layout/style/crashtests/1404324-2.html -@@ -0,0 +1,10 @@ -+ -+ -+ -diff --git layout/style/crashtests/1404324-3.html layout/style/crashtests/1404324-3.html -new file mode 100644 -index 000000000000..3b06f12a2bf6 ---- /dev/null -+++ layout/style/crashtests/1404324-3.html -@@ -0,0 +1,14 @@ -+ -+ -+ -diff --git layout/style/crashtests/crashtests.list layout/style/crashtests/crashtests.list -index be9a46c52bfa..5eaba6935ee2 100644 ---- layout/style/crashtests/crashtests.list -+++ layout/style/crashtests/crashtests.list -@@ -238,3 +238,6 @@ load 1403615.html - load 1387481-1.html - load 1387499.html - load 1391577.html -+asserts-if(stylo,1) load 1404324-1.html # bug 1405605 -+load 1404324-2.html -+load 1404324-3.html diff --git a/www/waterfox/files/patch-bug1404568 b/www/waterfox/files/patch-bug1404568 deleted file mode 100644 index 3884d431c1b..00000000000 --- a/www/waterfox/files/patch-bug1404568 +++ /dev/null @@ -1,120 +0,0 @@ -commit 7d205a638012 -Author: Ian Moody -Date: Sun Oct 8 13:23:33 2017 +0100 - - Bug 1404568 - Improve webext browser_action icon fallbacks. r=mixedpuppy, a=ritu - - Currently if there is no default icon at the specified size, the default icon - falls back to the light text icon at that size. This is wrong in two ways: - First, the default theme uses dark text, so it should fallback to the dark icon - Secondly, authors expect the unsized default_icon to be used if specified - - This patch fixes both of these issues, so that the default icon first falls back - to the unsized default_icon, and then only if that is not specified falls back - to the dark icon - - MozReview-Commit-ID: C3RRTKhYq6r - - --HG-- - extra : source : ca81275884eb6147bd1022779fcac81fa0930128 ---- - .../extensions/test/browser/browser_ext_browserAction_theme_icons.js | 4 ++-- - toolkit/components/extensions/ExtensionParent.jsm | 4 ++-- - 2 files changed, 4 insertions(+), 4 deletions(-) - -diff --git browser/components/extensions/test/browser/browser_ext_browserAction_theme_icons.js browser/components/extensions/test/browser/browser_ext_browserAction_theme_icons.js -index 05d8474ab2b6..b910568e0f78 100644 ---- browser/components/extensions/test/browser/browser_ext_browserAction_theme_icons.js -+++ browser/components/extensions/test/browser/browser_ext_browserAction_theme_icons.js -@@ -46,7 +46,7 @@ async function testStaticTheme(options) { - await extension.startup(); - - // Confirm that the browser action has the correct default icon before a theme is loaded. -- let expectedDefaultIcon = withDefaultIcon ? "default.png" : "light.png"; -+ let expectedDefaultIcon = withDefaultIcon ? "default.png" : "dark.png"; - await testBrowserAction(extension, expectedDefaultIcon); - - let theme = ExtensionTestUtils.loadExtension({ -@@ -164,7 +164,7 @@ add_task(async function browseraction_theme_icons_dynamic_theme() { - "theme_icons": [{ - "light": "light.png", - "dark": "dark.png", -- "size": 19, -+ "size": 16, - }], - }, - }, -diff --git toolkit/components/extensions/ExtensionParent.jsm toolkit/components/extensions/ExtensionParent.jsm -index e608ff2d19c6..75df6a285195 100644 ---- toolkit/components/extensions/ExtensionParent.jsm -+++ toolkit/components/extensions/ExtensionParent.jsm -@@ -1306,9 +1306,9 @@ let IconDetails = { - this._checkURL(lightURL, extension); - this._checkURL(darkURL, extension); - -- let defaultURL = result[size]; -+ let defaultURL = result[size] || result[19]; // always fallback to default first - result[size] = { -- "default": defaultURL || lightURL, // Fallback to the light url if no default is specified. -+ "default": defaultURL || darkURL, // Fallback to the dark url if no default is specified. - "light": lightURL, - "dark": darkURL, - }; - -commit 1cceb370d13c -Author: Ian Moody -Date: Wed Oct 4 01:40:45 2017 +0100 - - Bug 1404568 - Use the correct browser_action theme icons when the action is in a menu-panel. r=mixedpuppy, a=ritu - - The patch adding support for specifying theme icons had a bug in the CSS: it - added styles for the action in a menu-panel depending on theme, but missed out - the theme pseudo-class selectors. Therefore the dark text icon was always used - since it was last in the CSS. - Additionally, the menu panels can't be styled, so still have light backgrounds - and dark text even in light text themes. If a light icon is used in the menu - panel in a light text theme it will be hard to see. - - Thus, this patch adds the pseudo-class for dark text themes, but removes the - selector entirely for light text themes. - - MozReview-Commit-ID: AmKVDYwGGKj - - --HG-- - extra : source : 38347dff77997359905b6efc1f6061e4103431d6 ---- - browser/base/content/browser.css | 6 ++---- - 1 file changed, 2 insertions(+), 4 deletions(-) - -diff --git browser/base/content/browser.css browser/base/content/browser.css -index bbd7310f55d0..fe940cf58408 100644 ---- browser/base/content/browser.css -+++ browser/base/content/browser.css -@@ -377,12 +377,11 @@ toolbarpaletteitem > toolbaritem[sdkstylewidget="true"][cui-areatype="toolbar"] - list-style-image: var(--webextension-menupanel-image, inherit); - } - -- .webextension-browser-action[cui-areatype="menu-panel"], - toolbarpaletteitem[place="palette"] > .webextension-browser-action:-moz-lwtheme-brighttext { - list-style-image: var(--webextension-menupanel-image-light, inherit); - } - -- .webextension-browser-action[cui-areatype="menu-panel"], -+ .webextension-browser-action[cui-areatype="menu-panel"]:-moz-lwtheme-darktext, - toolbarpaletteitem[place="palette"] > .webextension-browser-action:-moz-lwtheme-darktext { - list-style-image: var(--webextension-menupanel-image-dark, inherit); - } -@@ -414,12 +413,11 @@ toolbarpaletteitem > toolbaritem[sdkstylewidget="true"][cui-areatype="toolbar"] - list-style-image: var(--webextension-menupanel-image-2x, inherit); - } - -- .webextension-browser-action[cui-areatype="menu-panel"], - toolbarpaletteitem[place="palette"] > .webextension-browser-action:-moz-lwtheme-brighttext { - list-style-image: var(--webextension-menupanel-image-2x-light, inherit); - } - -- .webextension-browser-action[cui-areatype="menu-panel"], -+ .webextension-browser-action[cui-areatype="menu-panel"]:-moz-lwtheme-darktext, - toolbarpaletteitem[place="palette"] > .webextension-browser-action:-moz-lwtheme-darktext { - list-style-image: var(--webextension-menupanel-image-2x-dark, inherit); - } diff --git a/www/waterfox/files/patch-bug1404651 b/www/waterfox/files/patch-bug1404651 deleted file mode 100644 index 0c9f490f52c..00000000000 --- a/www/waterfox/files/patch-bug1404651 +++ /dev/null @@ -1,39 +0,0 @@ -commit 698e5f304f4b -Author: Gijs Kruitbosch -Date: Wed Oct 4 13:29:53 2017 +0100 - - Bug 1404651 - Keep focus in the tabstrip when the focus has shifted with the arrow keys. r=dao, a=ritu - - MozReview-Commit-ID: Brm9jImW9bc - - --HG-- - extra : source : 0304a90aee90618165af50193ea6255c54a6b9ea ---- - browser/base/content/tabbrowser.xml | 13 +++++++------ - 1 file changed, 7 insertions(+), 6 deletions(-) - -diff --git browser/base/content/tabbrowser.xml browser/base/content/tabbrowser.xml -index 37efdcc5bc0c..4f40e45f2446 100644 ---- browser/base/content/tabbrowser.xml -+++ browser/base/content/tabbrowser.xml -@@ -1417,13 +1417,14 @@ - findBar._findField.getAttribute("focused") == "true"); - } - -- // If focus is in the tab bar, retain it there. -- if (document.activeElement == oldTab) { -- // We need to explicitly focus the new tab, because -- // tabbox.xml does this only in some cases. -+ let activeEl = document.activeElement; -+ // If focus is on the old tab, move it to the new tab. -+ if (activeEl == oldTab) { - newTab.focus(); -- } else if (gMultiProcessBrowser && document.activeElement !== newBrowser) { -- -+ } else if (gMultiProcessBrowser && activeEl != newBrowser && activeEl != newTab) { -+ // In e10s, if focus isn't already in the tabstrip or on the new browser, -+ // and the new browser's previous focus wasn't in the url bar but focus is -+ // there now, we need to adjust focus further. - let keepFocusOnUrlBar = newBrowser && - newBrowser._urlbarFocused && - gURLBar && diff --git a/www/waterfox/files/patch-bug1404714 b/www/waterfox/files/patch-bug1404714 deleted file mode 100644 index 5c867926d43..00000000000 --- a/www/waterfox/files/patch-bug1404714 +++ /dev/null @@ -1,34 +0,0 @@ -commit 867b599b37e0 -Author: Benjamin Bouvier -Date: Tue Oct 3 19:57:05 2017 +0200 - - Bug 1404714 - inIon() should return false when in wasm. r=nbp, a=test-only on a CLOSED TREE - - MozReview-Commit-ID: 76qU9UjcROt - - --HG-- - extra : source : 6956f4fcbb7973e93c7314eb8bb9e7f8de93b96f - extra : amend_source : ed03aa30810d829dbf0951ccbc7aaab805afa280 - extra : intermediate-source : d5f57ad0a0fb5b362ed6abc150aa1038a1555fa5 ---- - js/src/builtin/TestingFunctions.cpp | 7 +++++++ - 1 file changed, 7 insertions(+) - -diff --git js/src/builtin/TestingFunctions.cpp js/src/builtin/TestingFunctions.cpp -index cf2f0e3ecc2a..5cc776d0a7cc 100644 ---- js/src/builtin/TestingFunctions.cpp -+++ js/src/builtin/TestingFunctions.cpp -@@ -2199,6 +2199,13 @@ testingFunc_inIon(JSContext* cx, unsigned argc, Value* vp) - return true; - } - -+ if (cx->activation()->isWasm()) { -+ // Exited through wasm. Note this is false when the fast wasm->jit exit -+ // was taken, in which case we actually have jit frames on the stack. -+ args.rval().setBoolean(false); -+ return true; -+ } -+ - ScriptFrameIter iter(cx); - if (!iter.done() && iter.isIon()) { - // Reset the counter of the IonScript's script. diff --git a/www/waterfox/files/patch-bug1404760 b/www/waterfox/files/patch-bug1404760 deleted file mode 100644 index 68cf6f5f73b..00000000000 --- a/www/waterfox/files/patch-bug1404760 +++ /dev/null @@ -1,65 +0,0 @@ -commit a73710615fe2 -Author: Lars T Hansen -Date: Mon Oct 2 10:45:26 2017 +0200 - - Bug 1404760 - wasm baseline, disable branch optimization for int64 on x86 to avoid register starvation. r=bbouvier, a=ritu - - --HG-- - extra : source : c80e87f3242679c9e9548592f27173871824b681 - extra : intermediate-source : 12d671fcc1f1c25898ebb0723e1eb0b20b5b4838 ---- - .../jit-test/tests/wasm/regress/baseline-i64-opt-cmp.js | 16 ++++++++++++++++ - js/src/wasm/WasmBaselineCompile.cpp | 14 ++++++++------ - 2 files changed, 24 insertions(+), 6 deletions(-) - -diff --git js/src/jit-test/tests/wasm/regress/baseline-i64-opt-cmp.js js/src/jit-test/tests/wasm/regress/baseline-i64-opt-cmp.js -new file mode 100644 -index 000000000000..aad892558a15 ---- /dev/null -+++ js/src/jit-test/tests/wasm/regress/baseline-i64-opt-cmp.js -@@ -0,0 +1,16 @@ -+// Bug 1404760: Optimized compare-and-branch with a preserved value would fail -+// the baseline compiler on x86 debug builds (and would just generate bad code -+// on non-debug builds) because of register starvation. -+ -+wasmEvalText( -+ `(module -+ (func $run (param i64) (param i64) (result i64) -+ block i64 -+ i64.const 1 -+ (i64.lt_s (get_local 0) (get_local 1)) -+ br_if 0 -+ drop -+ i64.const 2 -+ end) -+ (export "run" $run))` -+); -diff --git js/src/wasm/WasmBaselineCompile.cpp js/src/wasm/WasmBaselineCompile.cpp -index bf83cbb3f818..50de676de678 100644 ---- js/src/wasm/WasmBaselineCompile.cpp -+++ js/src/wasm/WasmBaselineCompile.cpp -@@ -5212,16 +5212,18 @@ BaseCompiler::sniffConditionalControlCmp(Cond compareOp, ValType operandType) - { - MOZ_ASSERT(latentOp_ == LatentOp::None, "Latent comparison state not properly reset"); - -+#ifdef JS_CODEGEN_X86 -+ // On x86, latent i64 binary comparisons use too many registers: the -+ // reserved join register and the lhs and rhs operands require six, but we -+ // only have five. -+ if (operandType == ValType::I64) -+ return false; -+#endif -+ - OpBytes op; - iter_.peekOp(&op); - switch (op.b0) { - case uint16_t(Op::Select): --#ifdef JS_CODEGEN_X86 -- // On x86, with only 5 available registers, a latent i64 binary -- // comparison takes 4 leaving only 1 which is not enough for select. -- if (operandType == ValType::I64) -- return false; --#endif - MOZ_FALLTHROUGH; - case uint16_t(Op::BrIf): - case uint16_t(Op::If): diff --git a/www/waterfox/files/patch-bug1404910 b/www/waterfox/files/patch-bug1404910 deleted file mode 100644 index 1157ce53838..00000000000 --- a/www/waterfox/files/patch-bug1404910 +++ /dev/null @@ -1,170 +0,0 @@ -commit 2c8bf0ecbc5d -Author: Andrea Marchesini -Date: Wed Oct 4 14:18:19 2017 +0200 - - Bug 1404910 - WebSocket should consider the corrent top-level window principal. r=smaug, a=ritu - - --HG-- - extra : source : c543c0a50db700883b57c052710c97b5ef731e1f ---- - dom/base/WebSocket.cpp | 15 ++++--- - dom/base/test/iframe_webSocket_sandbox.html | 65 +++++++++++++++++++++++++++++ - dom/base/test/mochitest.ini | 3 ++ - dom/base/test/test_webSocket_sandbox.html | 34 +++++++++++++++ - 4 files changed, 109 insertions(+), 8 deletions(-) - -diff --git dom/base/WebSocket.cpp dom/base/WebSocket.cpp -index dc2c1c70107b..982c67cd2abd 100644 ---- dom/base/WebSocket.cpp -+++ dom/base/WebSocket.cpp -@@ -1666,18 +1666,17 @@ WebSocketImpl::Init(JSContext* aCx, - nsCOMPtr innerWindow; - - while (true) { -- if (principal) { -- bool isNullPrincipal = true; -- isNullPrincipal = principal->GetIsNullPrincipal(); -- if (isNullPrincipal || nsContentUtils::IsSystemPrincipal(principal)) { -- break; -- } -+ if (principal && !principal->GetIsNullPrincipal()) { -+ break; - } - - if (!innerWindow) { - innerWindow = do_QueryInterface(globalObject); -- if (NS_WARN_IF(!innerWindow)) { -- return NS_ERROR_DOM_SECURITY_ERR; -+ if (!innerWindow) { -+ // If we are in a XPConnect sandbox or in a JS component, -+ // innerWindow will be null. There is nothing on top of this to be -+ // considered. -+ break; - } - } - -diff --git dom/base/test/iframe_webSocket_sandbox.html dom/base/test/iframe_webSocket_sandbox.html -new file mode 100644 -index 000000000000..d889a79b05da ---- /dev/null -+++ dom/base/test/iframe_webSocket_sandbox.html -@@ -0,0 +1,65 @@ -+ -+ -+ -+ -diff --git dom/base/test/mochitest.ini dom/base/test/mochitest.ini -index 670dd5ae0a06..5d59fe1ea7b8 100644 ---- dom/base/test/mochitest.ini -+++ dom/base/test/mochitest.ini -@@ -804,6 +804,9 @@ skip-if = toolkit == 'android' - skip-if = toolkit == 'android' - [test_websocket_permessage_deflate.html] - skip-if = toolkit == 'android' -+[test_webSocket_sandbox.html] -+skip-if = toolkit == 'android' -+support-files = iframe_webSocket_sandbox.html - [test_websocket1.html] - skip-if = toolkit == 'android' - [test_websocket2.html] -diff --git dom/base/test/test_webSocket_sandbox.html dom/base/test/test_webSocket_sandbox.html -new file mode 100644 -index 000000000000..b343fa784f39 ---- /dev/null -+++ dom/base/test/test_webSocket_sandbox.html -@@ -0,0 +1,34 @@ -+ -+ -+ -+ Bug 1252751 -+ -+ -+ -+ -+
-+ -+ -+ -+ diff --git a/www/waterfox/files/patch-bug1405199 b/www/waterfox/files/patch-bug1405199 deleted file mode 100644 index 6e7ffc1c0d4..00000000000 --- a/www/waterfox/files/patch-bug1405199 +++ /dev/null @@ -1,45 +0,0 @@ -commit a8e2534607cc -Author: Honza Bambas -Date: Mon Oct 9 07:50:00 2017 -0400 - - Bug 1405199 - Update result principal URI on the new channel when nsBaseChannel redirects. r=bz, a=ritu - - --HG-- - extra : source : 41697bca82fb1cb74c3617f8c7496cebacf81efc ---- - netwerk/base/nsBaseChannel.cpp | 22 ++++++++++++++++++++++ - 1 file changed, 22 insertions(+) - -diff --git netwerk/base/nsBaseChannel.cpp netwerk/base/nsBaseChannel.cpp -index 07a12c8fa5b6..b839bc6e1b7e 100644 ---- netwerk/base/nsBaseChannel.cpp -+++ netwerk/base/nsBaseChannel.cpp -@@ -106,6 +106,28 @@ nsBaseChannel::Redirect(nsIChannel *newChannel, uint32_t redirectFlags, - new nsRedirectHistoryEntry(uriPrincipal, nullptr, EmptyCString()); - - newLoadInfo->AppendRedirectHistoryEntry(entry, isInternalRedirect); -+ -+ // Ensure the channel's loadInfo's result principal URI so that it's -+ // either non-null or updated to the redirect target URI. -+ // We must do this because in case the loadInfo's result principal URI -+ // is null, it would be taken from OriginalURI of the channel. But we -+ // overwrite it with the whole redirect chain first URI before opening -+ // the target channel, hence the information would be lost. -+ // If the protocol handler that created the channel wants to use -+ // the originalURI of the channel as the principal URI, it has left -+ // the result principal URI on the load info null. -+ nsCOMPtr resultPrincipalURI; -+ -+ nsCOMPtr existingLoadInfo = newChannel->GetLoadInfo(); -+ if (existingLoadInfo) { -+ existingLoadInfo->GetResultPrincipalURI(getter_AddRefs(resultPrincipalURI)); -+ } -+ if (!resultPrincipalURI) { -+ newChannel->GetOriginalURI(getter_AddRefs(resultPrincipalURI)); -+ } -+ -+ newLoadInfo->SetResultPrincipalURI(resultPrincipalURI); -+ - newChannel->SetLoadInfo(newLoadInfo); - } - else { diff --git a/www/waterfox/files/patch-bug1405267 b/www/waterfox/files/patch-bug1405267 deleted file mode 100644 index 63fc86f584b..00000000000 --- a/www/waterfox/files/patch-bug1405267 +++ /dev/null @@ -1,32 +0,0 @@ -commit 28e925727f61 -Author: Chris Coulson -Date: Tue Oct 3 04:58:00 2017 -0400 - - Bug 1405267 - Don't stub gdk_window_get_window_type in mozgtk2. r=karlt, a=ritu - - --HG-- - extra : source : d06512adfab5cc90d985a1b814e8ba3dc4b81fff ---- - widget/gtk/mozgtk/mozgtk.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git widget/gtk/mozgtk/mozgtk.c widget/gtk/mozgtk/mozgtk.c -index 7285b7f001ac..9a5498a173fd 100644 ---- widget/gtk/mozgtk/mozgtk.c -+++ widget/gtk/mozgtk/mozgtk.c -@@ -95,6 +95,7 @@ STUB(gdk_window_get_update_area) - STUB(gdk_window_get_user_data) - STUB(gdk_window_get_visual) - STUB(gdk_window_get_width) -+STUB(gdk_window_get_window_type) - STUB(gdk_window_hide) - STUB(gdk_window_input_shape_combine_region) - STUB(gdk_window_invalidate_rect) -@@ -520,7 +521,6 @@ STUB(gdk_error_trap_pop_ignored) - STUB(gdk_event_get_source_device) - STUB(gdk_screen_get_monitor_workarea) - STUB(gdk_window_get_type) --STUB(gdk_window_get_window_type) - STUB(gdk_x11_window_get_xid) - STUB(gdk_x11_display_get_type) - STUB(gdk_wayland_display_get_type) diff --git a/www/waterfox/files/patch-bug1405364 b/www/waterfox/files/patch-bug1405364 deleted file mode 100644 index b3cec01bcb6..00000000000 --- a/www/waterfox/files/patch-bug1405364 +++ /dev/null @@ -1,84 +0,0 @@ -commit bc3e9c9c8230 -Author: Andrew Osmond -Date: Mon Oct 30 06:58:04 2017 -0400 - - Bug 1405364 - ImageBridgeParent::GetInstance should not mutate sImageBridges for lookups. r=sotaro a=sylvestre - - --HG-- - extra : amend_source : 6121399940a53f45027923e0e3f5a517722036ed - extra : transplant_source : %D1%06%8F%0D%25%B3%FD%82%3D%C9%0A%5C%9B%C7%3B%15%9C%A7%EC%91 ---- - gfx/layers/ipc/ImageBridgeParent.cpp | 18 ++++++++++++------ - gfx/layers/ipc/ImageBridgeParent.h | 5 +++-- - 2 files changed, 15 insertions(+), 8 deletions(-) - -diff --git gfx/layers/ipc/ImageBridgeParent.cpp gfx/layers/ipc/ImageBridgeParent.cpp -index 745576a3a7b3..8f8f60ffcd78 100644 ---- gfx/layers/ipc/ImageBridgeParent.cpp -+++ gfx/layers/ipc/ImageBridgeParent.cpp -@@ -42,7 +42,7 @@ using namespace mozilla::ipc; - using namespace mozilla::gfx; - using namespace mozilla::media; - --std::map ImageBridgeParent::sImageBridges; -+ImageBridgeParent::ImageBridgeMap ImageBridgeParent::sImageBridges; - - StaticAutoPtr sImageBridgesLock; - -@@ -366,8 +366,9 @@ ImageBridgeParent::NotifyImageComposites(nsTArraySendPendingAsyncMessages(); -- if (!GetInstance(pid)->SendDidComposite(notifications)) { -+ RefPtr bridge = GetInstance(pid); -+ bridge->SendPendingAsyncMessages(); -+ if (!bridge->SendDidComposite(notifications)) { - ok = false; - } - i = end; -@@ -382,13 +383,18 @@ ImageBridgeParent::DeferredDestroy() - mSelfRef = nullptr; // "this" ImageBridge may get deleted here. - } - --RefPtr -+already_AddRefed - ImageBridgeParent::GetInstance(ProcessId aId) - { - MOZ_ASSERT(CompositorThreadHolder::IsInCompositorThread()); - MonitorAutoLock lock(*sImageBridgesLock); -- NS_ASSERTION(sImageBridges.count(aId) == 1, "ImageBridgeParent for the process"); -- return sImageBridges[aId]; -+ ImageBridgeMap::const_iterator i = sImageBridges.find(aId); -+ if (i == sImageBridges.end()) { -+ NS_ASSERTION(false, "Cannot find image bridge for process!"); -+ return nullptr; -+ } -+ RefPtr bridge = i->second; -+ return bridge.forget(); - } - - bool -diff --git gfx/layers/ipc/ImageBridgeParent.h gfx/layers/ipc/ImageBridgeParent.h -index 7475b67e356d..3edd1f8861ee 100644 ---- gfx/layers/ipc/ImageBridgeParent.h -+++ gfx/layers/ipc/ImageBridgeParent.h -@@ -114,7 +114,7 @@ public: - - virtual bool IsSameProcess() const override; - -- static RefPtr GetInstance(ProcessId aId); -+ static already_AddRefed GetInstance(ProcessId aId); - - static bool NotifyImageComposites(nsTArray& aNotifications); - -@@ -140,7 +140,8 @@ private: - /** - * Map of all living ImageBridgeParent instances - */ -- static std::map sImageBridges; -+ typedef std::map ImageBridgeMap; -+ static ImageBridgeMap sImageBridges; - - RefPtr mCompositorThreadHolder; - }; diff --git a/www/waterfox/files/patch-bug1405377 b/www/waterfox/files/patch-bug1405377 deleted file mode 100644 index 4f6a39347fb..00000000000 --- a/www/waterfox/files/patch-bug1405377 +++ /dev/null @@ -1,31 +0,0 @@ -commit 3036b2933fde -Author: Gijs Kruitbosch -Date: Tue Oct 3 19:29:36 2017 +0100 - - Bug 1405377 - Remove trailing separator in recently closed tabs/windows subviews. r=mikedeboer, a=ritu - - The third param of 'getTabsFragment' and 'getWindowsFragment' toggles whether the 'restore all' item - gets prefixed (true) or suffixed (false). The prefixed version doesn't get a separator, so this - seems like the simplest fix. - - MozReview-Commit-ID: BzKWvndWUMp - - --HG-- - extra : source : ed7b92c9eca5e1faa1b193918f0b9ddf7fc9c0e5 ---- - browser/components/customizableui/CustomizableWidgets.jsm | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git browser/components/customizableui/CustomizableWidgets.jsm browser/components/customizableui/CustomizableWidgets.jsm -index fb12d40da42d..b197d2d72fdc 100644 ---- browser/components/customizableui/CustomizableWidgets.jsm -+++ browser/components/customizableui/CustomizableWidgets.jsm -@@ -215,7 +215,7 @@ const CustomizableWidgets = [ - - let utils = RecentlyClosedTabsAndWindowsMenuUtils; - let method = `get${viewType}Fragment`; -- let fragment = utils[method](window, "toolbarbutton"); -+ let fragment = utils[method](window, "toolbarbutton", true); - let elementCount = fragment.childElementCount; - this._panelMenuView._setEmptyPopupStatus(panelview, !elementCount); - if (!elementCount) diff --git a/www/waterfox/files/patch-bug1405635 b/www/waterfox/files/patch-bug1405635 deleted file mode 100644 index c4a015d63fb..00000000000 --- a/www/waterfox/files/patch-bug1405635 +++ /dev/null @@ -1,100 +0,0 @@ -commit c10a94980921 -Author: Emilio Cobos Álvarez -Date: Thu Oct 5 05:49:06 2017 -0500 - - Bug 1405635 - style: Use the flattened tree parent to find the closest non-nac ancestor of an element. r=bzbarsky, a=ritu - - This only matters for document level NAC like canvas custom content, in which - case otherwise we inherit from the document element (which is wrong). - - Source-Repo: https://github.com/servo/servo - Source-Revision: 35e84c5cdf9cad0f16f94525d425a3b881b3b524 - - --HG-- - extra : source : 657529d410eb93f3e89cde5e11b9ca7a6f882d39 ---- - servo/components/style/gecko/wrapper.rs | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git servo/components/style/gecko/wrapper.rs servo/components/style/gecko/wrapper.rs -index 1d6864a482bd..353bbeeedffc 100644 ---- servo/components/style/gecko/wrapper.rs -+++ servo/components/style/gecko/wrapper.rs -@@ -934,7 +934,7 @@ impl<'le> TElement for GeckoElement<'le> { - - fn closest_non_native_anonymous_ancestor(&self) -> Option { - debug_assert!(self.is_native_anonymous()); -- let mut parent = match self.parent_element() { -+ let mut parent = match self.traversal_parent() { - Some(e) => e, - None => return None, - }; -@@ -944,7 +944,7 @@ impl<'le> TElement for GeckoElement<'le> { - return Some(parent); - } - -- parent = match parent.parent_element() { -+ parent = match parent.traversal_parent() { - Some(p) => p, - None => return None, - }; -commit efb04b1d1114 -Author: Emilio Cobos Álvarez -Date: Thu Oct 5 01:40:48 2017 +0200 - - Bug 1405635 - Test that custom content doesn't inherit from the root element. r=bholley, a=ritu - - MozReview-Commit-ID: GvjsdQk5Wt4 - - --HG-- - extra : source : 777faf67f590f1d1c64f1b09601a7974a8f627ce ---- - layout/style/test/mochitest.ini | 2 ++ - .../test/test_custom_content_inheritance.html | 26 ++++++++++++++++++++++ - 2 files changed, 28 insertions(+) - -diff --git layout/style/test/mochitest.ini layout/style/test/mochitest.ini -index dafe0434981c..5a8beed3b103 100644 ---- layout/style/test/mochitest.ini -+++ layout/style/test/mochitest.ini -@@ -194,6 +194,8 @@ skip-if = toolkit == 'android' #bug 536603 - [test_css_parse_error_smoketest.html] - [test_css_supports.html] - [test_css_supports_variables.html] -+[test_custom_content_inheritance.html] -+skip-if = !stylo # Gecko fails this and messes up inheritance - [test_default_bidi_css.html] - [test_default_computed_style.html] - [test_descriptor_storage.html] -diff --git layout/style/test/test_custom_content_inheritance.html layout/style/test/test_custom_content_inheritance.html -new file mode 100644 -index 000000000000..ccbce86574bb ---- /dev/null -+++ layout/style/test/test_custom_content_inheritance.html -@@ -0,0 +1,26 @@ -+ -+Test for custom content inheritance -+ -+ -+ diff --git a/www/waterfox/files/patch-bug1405655 b/www/waterfox/files/patch-bug1405655 deleted file mode 100644 index 0a2d6529a5d..00000000000 --- a/www/waterfox/files/patch-bug1405655 +++ /dev/null @@ -1,256 +0,0 @@ -commit 5b5983d8528a -Author: Felipe Gomes -Date: Tue Oct 17 12:10:31 2017 -0200 - - Bug 1405655 - Only hide Flash Activation overlay UI if the entire plugin is covered. r=dthayer, a=ritu - - As opposed to right now where we hide if any of the corners or the center of the plugin is covered. - - MozReview-Commit-ID: 9mOVXYyV1Il - - --HG-- - extra : source : a6aaaf9cb7d3a4f3baa430cfa88671f0acabed6c ---- - browser/base/content/test/plugins/browser.ini | 2 + - .../test/plugins/browser_CTP_shouldShowOverlay.js | 56 ++++++++++ - .../test/plugins/plugin_shouldShowOverlay.html | 116 +++++++++++++++++++++ - browser/modules/PluginContent.jsm | 13 ++- - 4 files changed, 180 insertions(+), 7 deletions(-) - -diff --git browser/base/content/test/plugins/browser.ini browser/base/content/test/plugins/browser.ini -index 56f5fba1a9d0..9b3a518ecb7c 100644 ---- browser/base/content/test/plugins/browser.ini -+++ browser/base/content/test/plugins/browser.ini -@@ -29,6 +29,7 @@ support-files = - plugin_overlayed.html - plugin_positioned.html - plugin_simple_blank.swf -+ plugin_shouldShowOverlay.html - plugin_small.html - plugin_small_2.html - plugin_syncRemoved.html -@@ -76,6 +77,7 @@ tags = blocklist - tags = blocklist - [browser_CTP_resize.js] - tags = blocklist -+[browser_CTP_shouldShowOverlay.js] - [browser_CTP_zoom.js] - tags = blocklist - [browser_blocking.js] -diff --git browser/base/content/test/plugins/browser_CTP_shouldShowOverlay.js browser/base/content/test/plugins/browser_CTP_shouldShowOverlay.js -new file mode 100644 -index 000000000000..6af674a0e5b2 ---- /dev/null -+++ browser/base/content/test/plugins/browser_CTP_shouldShowOverlay.js -@@ -0,0 +1,56 @@ -+/* 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/. */ -+ -+"use strict"; -+ -+/* This test ensures that the click-to-play "Activate Plugin" overlay -+ * is shown when expected. -+ * All testcases are in the plugin_shouldShowOverlay.html file. -+ */ -+ -+var rootDir = getRootDirectory(gTestPath); -+const gTestRoot = rootDir.replace("chrome://mochitests/content/", "http://127.0.0.1:8888/"); -+ -+var gTestBrowser = null; -+ -+add_task(async function() { -+ registerCleanupFunction(function() { -+ clearAllPluginPermissions(); -+ setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Test Plug-in"); -+ gBrowser.removeCurrentTab(); -+ gTestBrowser = null; -+ }); -+}); -+ -+add_task(async function() { -+ gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser); -+ gTestBrowser = gBrowser.selectedBrowser; -+ -+ setTestPluginEnabledState(Ci.nsIPluginTag.STATE_CLICKTOPLAY, "Test Plug-in"); -+ -+ let popupNotification = PopupNotifications.getNotification("click-to-play-plugins", gTestBrowser); -+ ok(!popupNotification, "Sanity check, should not have a click-to-play notification"); -+ -+ await promiseTabLoadEvent(gBrowser.selectedTab, gTestRoot + "plugin_shouldShowOverlay.html"); -+ -+ // Work around for delayed PluginBindingAttached -+ await promiseUpdatePluginBindings(gTestBrowser); -+ -+ await ContentTask.spawn(gTestBrowser, null, async function() { -+ let doc = content.document; -+ let testcases = doc.querySelectorAll(".testcase"); -+ -+ for (let testcase of testcases) { -+ let plugin = testcase.querySelector("object"); -+ Assert.ok(plugin, `plugin exists in ${testcase.id}`); -+ -+ let overlay = doc.getAnonymousElementByAttribute(plugin, "anonid", "main"); -+ Assert.ok(overlay, `overlay exists in ${testcase.id}`); -+ -+ let expectedVisibility = (testcase.getAttribute("shouldshow") == "true"); -+ Assert.ok(overlay.classList.contains("visible") == expectedVisibility, -+ `The expected visibility is correct in ${testcase.id}`); -+ } -+ }) -+}); -diff --git browser/base/content/test/plugins/plugin_shouldShowOverlay.html browser/base/content/test/plugins/plugin_shouldShowOverlay.html -new file mode 100644 -index 000000000000..24d07d164260 ---- /dev/null -+++ browser/base/content/test/plugins/plugin_shouldShowOverlay.html -@@ -0,0 +1,116 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+
-+ -+ -+
-+ -+
-+ -+ -+
-+ -+
-+ -+ -+
-+ -+
-+ -+
-+ -+
-+ -+
-+ -+
-+ -+
-+ -+
-+ -+
-+ -+
-+ -+ -+
-+ -+
-+ -+
-+ -+
-+ -+
-+ -+
-+ -+
-+ -+
-+
-+
-+
-+ -+
-+ -+
-+ -+
-+
-+
-+
-+ -+
-+ -+
-+ -+
-+
-+
-+
-+
-+ -+
-+ -+
-+ -+
-+ -+
-+ -+ -+ -diff --git browser/modules/PluginContent.jsm browser/modules/PluginContent.jsm -index 678369d7e3ec..6aec465a2955 100644 ---- browser/modules/PluginContent.jsm -+++ browser/modules/PluginContent.jsm -@@ -330,22 +330,21 @@ PluginContent.prototype = { - [right, bottom], - [centerX, centerY]]; - -- if (right <= 0 || top <= 0) { -- return false; -- } -- - let contentWindow = plugin.ownerGlobal; - let cwu = contentWindow.QueryInterface(Ci.nsIInterfaceRequestor) - .getInterface(Ci.nsIDOMWindowUtils); - - for (let [x, y] of points) { -+ if (x < 0 || y < 0) { -+ continue; -+ } - let el = cwu.elementFromPoint(x, y, true, true); -- if (el !== plugin) { -- return false; -+ if (el === plugin) { -+ return true; - } - } - -- return true; -+ return false; - }, - - addLinkClickCallback(linkNode, callbackName /* callbackArgs...*/) { diff --git a/www/waterfox/files/patch-bug1405720 b/www/waterfox/files/patch-bug1405720 deleted file mode 100644 index c316067d398..00000000000 --- a/www/waterfox/files/patch-bug1405720 +++ /dev/null @@ -1,122 +0,0 @@ -commit f0664b7a8e76 -Author: Gijs Kruitbosch -Date: Thu Oct 5 15:17:12 2017 +0100 - - Bug 1405720 - Ensure only 1 theme is ever shown as selected in customize mode. r=jaws, r=johannh, a=ritu - - The previous code here always set the `isActive` property on all themes. When writing the - patch for bug 1402981 I ran into issues because the default theme has an `isActive` property - anyway (it's a different type of object). So I tried to avoid setting `isActive` if it was - already present. Unfortunately, the result was that `isActive` values, once set, weren't - correctly updated. Worse, these values are (and were, prior to bug 1402981) persisted in - some cases. - - There's no point persisting these values, all that will happen is that they'll start - mismatching the 'real' state of the world (LightweightThemeManager.currentTheme). So instead, - let's just not set the `isActive` property at all, and rely solely on the ID of the current - theme (or the default theme's ID, now that we no longer support non-lightweight-themes) to - establish whether any of the themes should appear selected or not. - - MozReview-Commit-ID: 7rajS71FoQR - - --HG-- - extra : source : 4099fa94e3ba6728761655f0e11e7b65d573617d ---- - .../components/customizableui/CustomizeMode.jsm | 13 ++++------ - .../browser_1007336_lwthemes_in_customize_mode.js | 28 +++++++++++++++++++--- - 2 files changed, 30 insertions(+), 11 deletions(-) - -diff --git browser/components/customizableui/CustomizeMode.jsm browser/components/customizableui/CustomizeMode.jsm -index b0e31cad63fc..79f23079b1a0 100644 ---- browser/components/customizableui/CustomizeMode.jsm -+++ browser/components/customizableui/CustomizeMode.jsm -@@ -1358,9 +1358,10 @@ CustomizeMode.prototype = { - tbb.setAttribute("tooltiptext", aTheme.description); - tbb.setAttribute("tabindex", "0"); - tbb.classList.add("customization-lwtheme-menu-theme"); -- tbb.setAttribute("aria-checked", aTheme.isActive); -+ let isActive = activeThemeID == aTheme.id; -+ tbb.setAttribute("aria-checked", isActive); - tbb.setAttribute("role", "menuitemradio"); -- if (aTheme.isActive) { -+ if (isActive) { - tbb.setAttribute("active", "true"); - } - tbb.addEventListener("focus", previewTheme); -@@ -1374,12 +1375,8 @@ CustomizeMode.prototype = { - let themes = [aDefaultTheme]; - let lwts = LightweightThemeManager.usedThemes; - let currentLwt = LightweightThemeManager.currentTheme; -- // The lwts besides the builtin themes don't have an isActive property: -- for (let lwt of lwts) { -- if (!lwt.hasOwnProperty("isActive")) { -- lwt.isActive = !!currentLwt && (lwt.id == currentLwt.id); -- } -- } -+ -+ let activeThemeID = currentLwt ? currentLwt.id : DEFAULT_THEME_ID; - - // Move the current theme (if any) and the light/dark themes to the start: - let importantThemes = [LIGHT_THEME_ID, DARK_THEME_ID]; -diff --git browser/components/customizableui/test/browser_1007336_lwthemes_in_customize_mode.js browser/components/customizableui/test/browser_1007336_lwthemes_in_customize_mode.js -index 3ee8f9b8f697..7b94289c0177 100644 ---- browser/components/customizableui/test/browser_1007336_lwthemes_in_customize_mode.js -+++ browser/components/customizableui/test/browser_1007336_lwthemes_in_customize_mode.js -@@ -45,9 +45,25 @@ add_task(async function() { - is(header.nextSibling.nextSibling.nextSibling.theme.id, DARK_THEME_ID, - "The third theme should be the dark theme"); - -+ let themeChangedPromise = promiseObserverNotified("lightweight-theme-changed"); -+ header.nextSibling.nextSibling.doCommand(); // Select light theme -+ info("Clicked on light theme"); -+ await themeChangedPromise; -+ -+ popupShownPromise = popupShown(popup); -+ EventUtils.synthesizeMouseAtCenter(themesButton, {}); -+ info("Clicked on themes button a third time"); -+ await popupShownPromise; -+ -+ let activeThemes = popup.querySelectorAll("toolbarbutton.customization-lwtheme-menu-theme[active]"); -+ is(activeThemes.length, 1, "Exactly 1 theme should be selected"); -+ if (activeThemes.length > 0) { -+ is(activeThemes[0].theme.id, LIGHT_THEME_ID, "Light theme should be selected"); -+ } -+ - let firstLWTheme = recommendedHeader.nextSibling; - let firstLWThemeId = firstLWTheme.theme.id; -- let themeChangedPromise = promiseObserverNotified("lightweight-theme-changed"); -+ themeChangedPromise = promiseObserverNotified("lightweight-theme-changed"); - firstLWTheme.doCommand(); - info("Clicked on first theme"); - await themeChangedPromise; -@@ -57,6 +73,12 @@ add_task(async function() { - info("Clicked on themes button"); - await popupShownPromise; - -+ activeThemes = popup.querySelectorAll("toolbarbutton.customization-lwtheme-menu-theme[active]"); -+ is(activeThemes.length, 1, "Exactly 1 theme should be selected"); -+ if (activeThemes.length > 0) { -+ is(activeThemes[0].theme.id, firstLWThemeId, "First theme should be selected"); -+ } -+ - is(header.nextSibling.theme.id, DEFAULT_THEME_ID, "The first theme should be the Default theme"); - let installedThemeId = header.nextSibling.nextSibling.nextSibling.nextSibling.theme.id; - ok(installedThemeId.startsWith(firstLWThemeId), -@@ -78,7 +100,7 @@ add_task(async function() { - // ensure current theme isn't set to "Default" - popupShownPromise = popupShown(popup); - EventUtils.synthesizeMouseAtCenter(themesButton, {}); -- info("Clicked on themes button a second time"); -+ info("Clicked on themes button a fourth time"); - await popupShownPromise; - - firstLWTheme = recommendedHeader.nextSibling; -@@ -98,7 +120,7 @@ add_task(async function() { - await startCustomizing(); - popupShownPromise = popupShown(popup); - EventUtils.synthesizeMouseAtCenter(themesButton, {}); -- info("Clicked on themes button a second time"); -+ info("Clicked on themes button a fifth time"); - await popupShownPromise; - header = document.getElementById("customization-lwtheme-menu-header"); - is(header.hidden, false, "Header should never be hidden"); diff --git a/www/waterfox/files/patch-bug1405761 b/www/waterfox/files/patch-bug1405761 deleted file mode 100644 index fcd51bf2ca2..00000000000 --- a/www/waterfox/files/patch-bug1405761 +++ /dev/null @@ -1,109 +0,0 @@ -commit 0e2ac46fa12c -Author: Dragana Damjanovic -Date: Wed Oct 11 03:20:00 2017 -0400 - - Bug 1405761 - If the preload pref is disabled rel=preload should be shown as not supported. r=smaug, a=ritu - - --HG-- - extra : source : 1f4d35d137631cde34f318fac0c33421d5360dc3 ---- - dom/base/test/test_bug1222633.html | 4 +++- - dom/base/test/test_bug1222633_link_update.html | 4 +++- - dom/html/HTMLLinkElement.cpp | 19 ++++++++++++++++++- - modules/libpref/init/all.js | 2 +- - .../tools/wptrunner/wptrunner/browsers/firefox.py | 3 ++- - 5 files changed, 27 insertions(+), 5 deletions(-) - -diff --git dom/base/test/test_bug1222633.html dom/base/test/test_bug1222633.html -index 52fecff16e9b..099345dab0b7 100644 ---- dom/base/test/test_bug1222633.html -+++ dom/base/test/test_bug1222633.html -@@ -88,8 +88,10 @@ const CROSS_ORIGIN = "http://example.com" + SJS_PATH; - - SimpleTest.waitForExplicitFinish(); - -+SpecialPowers.pushPrefEnv({"set": [["network.preload", true]]}) -+ - // test same origin --testPreloadEvent(SAME_ORIGIN + "?statusCode=200&cacheControl=no-cache", false, false) -+.then(() => testPreloadEvent(SAME_ORIGIN + "?statusCode=200&cacheControl=no-cache", false, false)) - .then(() => testPreloadEvent(SAME_ORIGIN + "?statusCode=404&cacheControl=no-cache", false, false)) - .then(() => testPreloadEvent(SAME_ORIGIN + "?statusCode=200&cacheControl=max-age%3D120", false, true)) - .then(() => testPreloadEvent(SAME_ORIGIN + "?statusCode=404&cacheControl=max-age%3D120", false, false)) -diff --git dom/base/test/test_bug1222633_link_update.html dom/base/test/test_bug1222633_link_update.html -index 97508d3596cf..1f18284c9470 100644 ---- dom/base/test/test_bug1222633_link_update.html -+++ dom/base/test/test_bug1222633_link_update.html -@@ -122,8 +122,10 @@ const CROSS_ORIGIN = "http://example.com" + SJS_PATH; - - SimpleTest.waitForExplicitFinish(); - -+SpecialPowers.pushPrefEnv({"set": [["network.preload", true]]}) -+ - // Test changing as parameter from a wrong to a correct one. --testPreloadEventAsAttributeChange(SAME_ORIGIN + "?statusCode=200&cacheControl=max-age%3D120") -+.then(() => testPreloadEventAsAttributeChange(SAME_ORIGIN + "?statusCode=200&cacheControl=max-age%3D120")) - // Test changing type parameter from a wrong to a correct one for given as parameter. - .then(() => testPreloadEventAttributeChange(SAME_ORIGIN + "?statusCode=200&cacheControl=max-age%3D120", "type", "text/vtt", "image/png", false, true)) - // Test changing media parameter from a wrong to a correct one. -diff --git dom/html/HTMLLinkElement.cpp dom/html/HTMLLinkElement.cpp -index 810b47aed670..37b45ca03636 100644 ---- dom/html/HTMLLinkElement.cpp -+++ dom/html/HTMLLinkElement.cpp -@@ -408,11 +408,28 @@ static const DOMTokenListSupportedToken sSupportedRelValues[] = { - nullptr - }; - -+static const DOMTokenListSupportedToken sSupportedRelValuesNoPreload[] = { -+ // Keep this in sync with ToLinkMask in nsStyleLinkElement.cpp. -+ // "import" must come first because it's conditional. -+ "prefetch", -+ "dns-prefetch", -+ "stylesheet", -+ "next", -+ "alternate", -+ "preconnect", -+ "icon", -+ "search", -+ nullptr -+}; - nsDOMTokenList* - HTMLLinkElement::RelList() - { - if (!mRelList) { -- mRelList = new nsDOMTokenList(this, nsGkAtoms::rel, sSupportedRelValues); -+ if (Preferences::GetBool("network.preload")) { -+ mRelList = new nsDOMTokenList(this, nsGkAtoms::rel, sSupportedRelValues); -+ } else { -+ mRelList = new nsDOMTokenList(this, nsGkAtoms::rel, sSupportedRelValuesNoPreload); -+ } - } - return mRelList; - } -diff --git modules/libpref/init/all.js modules/libpref/init/all.js -index e83781623803..79a0ea89d6de 100644 ---- modules/libpref/init/all.js -+++ modules/libpref/init/all.js -@@ -2105,7 +2105,7 @@ pref("network.dir.format", 2); - // URLs). - pref("network.prefetch-next", true); - // enables the preloading (i.e., preloading of URLs). --pref("network.preload", true); -+pref("network.preload", false); - - // enables the predictive service - pref("network.predictor.enabled", true); -diff --git testing/web-platform/tests/tools/wptrunner/wptrunner/browsers/firefox.py testing/web-platform/tests/tools/wptrunner/wptrunner/browsers/firefox.py -index f869c82a8ed0..43da63c7ca4e 100644 ---- testing/web-platform/tests/tools/wptrunner/wptrunner/browsers/firefox.py -+++ testing/web-platform/tests/tools/wptrunner/wptrunner/browsers/firefox.py -@@ -190,7 +190,8 @@ class FirefoxBrowser(Browser): - "network.dns.localDomains": ",".join(hostnames), - "network.proxy.type": 0, - "places.history.enabled": False, -- "dom.send_after_paint_to_content": True}) -+ "dom.send_after_paint_to_content": True, -+ "network.preload": True}) - if self.e10s: - self.profile.set_preferences({"browser.tabs.remote.autostart": True}) - diff --git a/www/waterfox/files/patch-bug1405878 b/www/waterfox/files/patch-bug1405878 deleted file mode 100644 index fa3d058e234..00000000000 --- a/www/waterfox/files/patch-bug1405878 +++ /dev/null @@ -1,120 +0,0 @@ -commit 87f3d592d92f -Author: Boris Zbarsky -Date: Mon Oct 9 14:49:19 2017 -0400 - - Bug 1405878 - Make sure to notify for our kids, if needed, before calling DoneAddingChildren in the XML content sink. r=hsivonen, a=sledru - - Once we call DoneAddingChildren, random code of various sorts will run, which - can flush our notification state. If that happens before we've notified on our - kids, but after we've popped the element we're closing off the element stack, - we will fail to ever notify on the kids. - - MozReview-Commit-ID: Ei7v5OobX8R - - --HG-- - extra : source : f144e1434312485cf9ee16a36d6159dbcb13a07d ---- - dom/xml/crashtests/1405878.xml | 11 +++++++++++ - dom/xml/crashtests/crashtests.list | 1 + - dom/xml/nsXMLContentSink.cpp | 18 +++++++++++------- - layout/reftests/bugs/1405878-1-ref.xml | 7 +++++++ - layout/reftests/bugs/1405878-1.xml | 6 ++++++ - layout/reftests/bugs/reftest.list | 1 + - 6 files changed, 37 insertions(+), 7 deletions(-) - -diff --git dom/xml/crashtests/1405878.xml dom/xml/crashtests/1405878.xml -new file mode 100644 -index 000000000000..12677ade938d ---- /dev/null -+++ dom/xml/crashtests/1405878.xml -@@ -0,0 +1,11 @@ -+ -+ -+ -+ -+ -+ -diff --git dom/xml/crashtests/crashtests.list dom/xml/crashtests/crashtests.list -index f18767d582c2..2c06ffc545ec 100644 ---- dom/xml/crashtests/crashtests.list -+++ dom/xml/crashtests/crashtests.list -@@ -10,3 +10,4 @@ load 453278.html - load 803586.xhtml - load 994740-1.xhtml - load 1038887.xhtml -+load 1405878.xml -diff --git dom/xml/nsXMLContentSink.cpp dom/xml/nsXMLContentSink.cpp -index 2593519aa44b..b04977d62cf1 100644 ---- dom/xml/nsXMLContentSink.cpp -+++ dom/xml/nsXMLContentSink.cpp -@@ -1071,6 +1071,17 @@ nsXMLContentSink::HandleEndElement(const char16_t *aName, - isTemplateElement, "Wrong element being closed"); - #endif - -+ // Make sure to notify on our kids before we call out to any other code that -+ // might reenter us and call FlushTags, in a state in which we've already -+ // popped "content" from the stack but haven't notified on its kids yet. -+ int32_t stackLen = mContentStack.Length(); -+ if (mNotifyLevel >= stackLen) { -+ if (numFlushed < content->GetChildCount()) { -+ NotifyAppend(content, numFlushed); -+ } -+ mNotifyLevel = stackLen - 1; -+ } -+ - result = CloseElement(content); - - if (mCurrentHead == content) { -@@ -1086,13 +1097,6 @@ nsXMLContentSink::HandleEndElement(const char16_t *aName, - MaybeStartLayout(false); - } - -- int32_t stackLen = mContentStack.Length(); -- if (mNotifyLevel >= stackLen) { -- if (numFlushed < content->GetChildCount()) { -- NotifyAppend(content, numFlushed); -- } -- mNotifyLevel = stackLen - 1; -- } - DidAddContent(); - - if (content->IsSVGElement(nsGkAtoms::svg)) { -diff --git layout/reftests/bugs/1405878-1-ref.xml layout/reftests/bugs/1405878-1-ref.xml -new file mode 100644 -index 000000000000..6d1dd199b41e ---- /dev/null -+++ layout/reftests/bugs/1405878-1-ref.xml -@@ -0,0 +1,7 @@ -+ -+ -+ -diff --git layout/reftests/bugs/1405878-1.xml layout/reftests/bugs/1405878-1.xml -new file mode 100644 -index 000000000000..3915711b1103 ---- /dev/null -+++ layout/reftests/bugs/1405878-1.xml -@@ -0,0 +1,6 @@ -+ -+ -+ -diff --git layout/reftests/bugs/reftest.list layout/reftests/bugs/reftest.list -index 52f8cb915cee..47c04cdf41d6 100644 ---- layout/reftests/bugs/reftest.list -+++ layout/reftests/bugs/reftest.list -@@ -2037,3 +2037,4 @@ needs-focus != 1377447-1.html 1377447-2.html - == 1380224-1.html 1380224-1-ref.html - == 1384065.html 1384065-ref.html - == 1384275-1.html 1384275-1-ref.html -+== 1405878-1.xml 1405878-1-ref.xml diff --git a/www/waterfox/files/patch-bug1406222 b/www/waterfox/files/patch-bug1406222 deleted file mode 100644 index 86efe7c15e6..00000000000 --- a/www/waterfox/files/patch-bug1406222 +++ /dev/null @@ -1,39 +0,0 @@ -commit 04dfc1bac3e0 -Author: Boris Zbarsky -Date: Fri Oct 6 01:53:12 2017 -0500 - - Bug 1406222 - servo: Don't assume that inputs to compute_style_with_inputs have any rules. r=heycam, a=ritu - - It could be a text style, which never has any rules attached to it. - - Source-Repo: https://github.com/servo/servo - Source-Revision: 117dbfaac20d8a388cf3cf5d2bc103b9d6249ee8 - - --HG-- - extra : source : 97fcd35b0d3792e7305bcb46b303ce409b30d23e - extra : histedit_source : 72acaec12ed99fa306148b7679c682abc0abaeea ---- - servo/components/style/stylist.rs | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git servo/components/style/stylist.rs servo/components/style/stylist.rs -index b40c5825a55c..e6feb6f26d15 100644 ---- servo/components/style/stylist.rs -+++ servo/components/style/stylist.rs -@@ -896,12 +896,12 @@ impl Stylist { - // We need to compute visited values if we have visited rules or if our - // parent has visited values. - let visited_values = if inputs.visited_rules.is_some() || parent_style.get_visited_style().is_some() { -- // Slightly annoying: we know that inputs has either rules or -- // visited rules, but we can't do inputs.rules() up front because -- // maybe it just has visited rules, so can't unwrap_or. -+ // At this point inputs may have visited rules, or rules, or both, -+ // or neither (e.g. if it's a text style it may have neither). So -+ // we have to be a bit careful here. - let rule_node = match inputs.visited_rules.as_ref() { - Some(rules) => rules, -- None => inputs.rules.as_ref().unwrap(), -+ None => inputs.rules.as_ref().unwrap_or(self.rule_tree().root()), - }; - let inherited_style; - let inherited_style_ignoring_first_line; diff --git a/www/waterfox/files/patch-bug1406229 b/www/waterfox/files/patch-bug1406229 deleted file mode 100644 index defa5065499..00000000000 --- a/www/waterfox/files/patch-bug1406229 +++ /dev/null @@ -1,32 +0,0 @@ -commit 2e9ce146b6b5 -Author: Shane Caraveo -Date: Fri Oct 6 16:58:15 2017 -0700 - - Bug 1406229 - Fix autocomplete crash in panels when window is closed during event. r=mak, a=ritu - - MozReview-Commit-ID: 6TrLuwrk2nD - - --HG-- - extra : source : 118b67c940dc554a4adf6fb397db775861962c68 ---- - toolkit/components/autocomplete/nsAutoCompleteController.cpp | 7 +++++++ - 1 file changed, 7 insertions(+) - -diff --git toolkit/components/autocomplete/nsAutoCompleteController.cpp toolkit/components/autocomplete/nsAutoCompleteController.cpp -index 3876380201f6..ba5287f1fabd 100644 ---- toolkit/components/autocomplete/nsAutoCompleteController.cpp -+++ toolkit/components/autocomplete/nsAutoCompleteController.cpp -@@ -367,6 +367,13 @@ nsAutoCompleteController::HandleEnter(bool aIsPopupSelection, - - // Stop the search, and handle the enter. - StopSearch(); -+ // StopSearch() can call PostSearchCleanup() which might result -+ // in a blur event, which could null out mInput, so we need to check it -+ // again. See bug #408463 for more details -+ if (!mInput) { -+ return NS_OK; -+ } -+ - EnterMatch(aIsPopupSelection, aEvent); - - return NS_OK; diff --git a/www/waterfox/files/patch-bug1406254 b/www/waterfox/files/patch-bug1406254 deleted file mode 100644 index 15337c4be60..00000000000 --- a/www/waterfox/files/patch-bug1406254 +++ /dev/null @@ -1,155 +0,0 @@ -commit e07fe5183b75 -Author: J. Ryan Stinnett -Date: Wed Oct 11 18:50:23 2017 -0500 - - Bug 1406254 - servo: Clear visited rules for text inheritance. r=emilio, a=ritu - - Source-Repo: https://github.com/servo/servo - Source-Revision: dbf0991f8cab54516c5b0211e1818a16cfbf9e19 - MozReview-Commit-ID: LP8VmxRopA4 ---- - servo/components/style/properties/gecko.mako.rs | 2 +- - servo/components/style/properties/properties.mako.rs | 16 ++++++++++++++-- - 2 files changed, 15 insertions(+), 3 deletions(-) - -diff --git servo/components/style/properties/gecko.mako.rs servo/components/style/properties/gecko.mako.rs -index d7e5496971e3..090a31ff9d4b 100644 ---- servo/components/style/properties/gecko.mako.rs -+++ servo/components/style/properties/gecko.mako.rs -@@ -323,7 +323,7 @@ impl ComputedValuesInner { - } - - /// Clone the visited style. Used for inheriting parent styles in -- /// StyleBuilder::for_inheritance. -+ /// StyleBuilder::for_derived_style. - pub fn clone_visited_style(&self) -> Option> { - self.visited_style.as_ref().map(|x| x.clone_arc()) - } -diff --git servo/components/style/properties/properties.mako.rs servo/components/style/properties/properties.mako.rs -index 269bf0dbbbb5..80238450a9c5 100644 ---- servo/components/style/properties/properties.mako.rs -+++ servo/components/style/properties/properties.mako.rs -@@ -2170,7 +2170,7 @@ impl ComputedValuesInner { - } - - /// Clone the visited style. Used for inheriting parent styles in -- /// StyleBuilder::for_inheritance. -+ /// StyleBuilder::for_derived_style. - pub fn clone_visited_style(&self) -> Option> { - self.visited_style.clone() - } -@@ -2830,6 +2830,18 @@ impl<'a> StyleBuilder<'a> { - parent: &'a ComputedValues, - pseudo: Option<<&'a PseudoElement>, - ) -> Self { -+ // Rebuild the visited style from the parent, ensuring that it will also -+ // not have rules. This matches the unvisited style that will be -+ // produced by this builder. This assumes that the caller doesn't need -+ // to adjust or process visited style, so we can just build visited -+ // style here for simplicity. -+ let visited_style = parent.get_visited_style().map(|style| { -+ Self::for_inheritance( -+ device, -+ style, -+ pseudo, -+ ).build() -+ }); - // FIXME(emilio): This Some(parent) here is inconsistent with what we - // usually do if `parent` is the default computed values, but that's - // fine, and we want to eventually get rid of it. -@@ -2844,7 +2856,7 @@ impl<'a> StyleBuilder<'a> { - parent.writing_mode, - parent.font_computation_data, - parent.flags, -- parent.clone_visited_style() -+ visited_style, - ) - } - -commit d8586d78bd43 -Author: J. Ryan Stinnett -Date: Wed Oct 11 15:33:14 2017 -0500 - - Bug 1406254 - Visited reftest for ::first-line inheritance. r=emilio, a=ritu - - MozReview-Commit-ID: 4ZOlVvBuSfT ---- - .../css-visited/color-on-visited-text-1-ref.html | 16 ++++++++++++++++ - .../css-visited/color-on-visited-text-1.html | 20 ++++++++++++++++++++ - layout/style/test/moz.build | 2 ++ - layout/style/test/test_visited_reftests.html | 1 + - 4 files changed, 39 insertions(+) - -diff --git layout/reftests/css-visited/color-on-visited-text-1-ref.html layout/reftests/css-visited/color-on-visited-text-1-ref.html -new file mode 100644 -index 000000000000..b144767ce76e ---- /dev/null -+++ layout/reftests/css-visited/color-on-visited-text-1-ref.html -@@ -0,0 +1,16 @@ -+ -+ -+
Visited
-+
Visited with span
-+
Visited with inner unvisited
-+
Visited with inner visited
-diff --git layout/reftests/css-visited/color-on-visited-text-1.html layout/reftests/css-visited/color-on-visited-text-1.html -new file mode 100644 -index 000000000000..d9dab8f3b8a7 ---- /dev/null -+++ layout/reftests/css-visited/color-on-visited-text-1.html -@@ -0,0 +1,20 @@ -+ -+ -+Visited -+Visited with span -+Visited with inner unvisited -+Visited with inner visited -diff --git layout/style/test/moz.build layout/style/test/moz.build -index fa646ca16dd3..74fe23260aa7 100644 ---- layout/style/test/moz.build -+++ layout/style/test/moz.build -@@ -60,6 +60,8 @@ TEST_HARNESS_FILES.testing.mochitest.tests.layout.style.test['css-visited'] += [ - '/layout/reftests/css-visited/color-on-visited-1-ref.html', - '/layout/reftests/css-visited/color-on-visited-1.html', - '/layout/reftests/css-visited/color-on-visited-before-1.html', -+ '/layout/reftests/css-visited/color-on-visited-text-1-ref.html', -+ '/layout/reftests/css-visited/color-on-visited-text-1.html', - '/layout/reftests/css-visited/column-rule-1-notref.html', - '/layout/reftests/css-visited/column-rule-1-ref.html', - '/layout/reftests/css-visited/column-rule-1.html', -diff --git layout/style/test/test_visited_reftests.html layout/style/test/test_visited_reftests.html -index aea857f031d2..850d35bae867 100644 ---- layout/style/test/test_visited_reftests.html -+++ layout/style/test/test_visited_reftests.html -@@ -38,6 +38,7 @@ var gTests = [ - "== color-on-link-before-1.html color-on-link-1-ref.html", - "== color-on-visited-1.html color-on-visited-1-ref.html", - "== color-on-visited-before-1.html color-on-visited-1-ref.html", -+ "== color-on-visited-text-1.html color-on-visited-text-1-ref.html", - "!= content-color-on-link-before-1-ref.html content-color-on-visited-before-1-ref.html", - "== content-color-on-link-before-1.html content-color-on-link-before-1-ref.html", - "== content-color-on-visited-before-1.html content-color-on-visited-before-1-ref.html", diff --git a/www/waterfox/files/patch-bug1406396 b/www/waterfox/files/patch-bug1406396 deleted file mode 100644 index 40d5e3c13a6..00000000000 --- a/www/waterfox/files/patch-bug1406396 +++ /dev/null @@ -1,211 +0,0 @@ -commit 45ffbc50f1f2 -Author: David Keeler -Date: Fri Oct 13 11:27:30 2017 -0700 - - Bug 1406396 - Work around NSS utils potentially loading spurious root cert modules. r=mgoodwin, a=ritu, l10n=flod - - NSS command-line utilities may add a built-in root certificate module with the - name "Root Certs" if run on a profile that has a copy of the module file (which - is an unexpected configuration in general for Firefox). This can cause breakage. - To work around this, PSM now simply deletes any module named "Root Certs" at - startup. In an effort to prevent PSM from deleting unrelated modules - coincidentally named "Root Certs", we also prevent the user from using the - Firefox UI to name modules "Root Certs". - - MozReview-Commit-ID: ABja3wpShO9 - - --HG-- - extra : histedit_source : 3f8a20980a1f7fbc838b610763369af3ddf95e16 ---- - security/certverifier/NSSCertDBTrustDomain.cpp | 6 +++++ - .../locales/en-US/chrome/pippki/pippki.properties | 5 ++++ - .../manager/pki/resources/content/load_device.js | 17 ++++++++++++ - .../manager/pki/resources/content/load_device.xul | 4 ++- - security/manager/ssl/PKCS11ModuleDB.cpp | 11 ++++++++ - .../browser/browser_loadPKCS11Module_ui.js | 30 ++++++++++++++++++++++ - .../manager/ssl/tests/unit/test_pkcs11_moduleDB.js | 28 ++++++++++++++++++++ - .../manager/ssl/tests/unit/xpcshell-smartcards.ini | 1 + - 8 files changed, 101 insertions(+), 1 deletion(-) - -diff --git security/certverifier/NSSCertDBTrustDomain.cpp security/certverifier/NSSCertDBTrustDomain.cpp -index a352d928a3c9..229a0b5df28c 100644 ---- security/certverifier/NSSCertDBTrustDomain.cpp -+++ security/certverifier/NSSCertDBTrustDomain.cpp -@@ -1216,6 +1216,12 @@ LoadLoadableRoots(const nsCString& dir, const nsCString& modNameUTF8) - // the return value would be detrimental in that case. - int unusedModType; - Unused << SECMOD_DeleteModule(modNameUTF8.get(), &unusedModType); -+ // Some NSS command-line utilities will load a roots module under the name -+ // "Root Certs" if there happens to be a `DLL_PREFIX "nssckbi" DLL_SUFFIX` -+ // file in the directory being operated on. In some cases this can cause us to -+ // fail to load our roots module. In these cases, deleting the "Root Certs" -+ // module allows us to load the correct one. See bug 1406396. -+ Unused << SECMOD_DeleteModule("Root Certs", &unusedModType); - - nsAutoCString fullLibraryPath; - if (!dir.IsEmpty()) { -diff --git security/manager/locales/en-US/chrome/pippki/pippki.properties security/manager/locales/en-US/chrome/pippki/pippki.properties -index 4bf67da7bab2..163384651067 100644 ---- security/manager/locales/en-US/chrome/pippki/pippki.properties -+++ security/manager/locales/en-US/chrome/pippki/pippki.properties -@@ -185,3 +185,8 @@ addExceptionCheckingShort=Checking Information - addExceptionCheckingLong2=Attempting to identify this site… - addExceptionNoCertShort=No Information Available - addExceptionNoCertLong2=Unable to obtain identification status for this site. -+ -+# Load Module Dialog -+loadModuleHelp_emptyModuleName=The module name cannot be empty. -+# LOCALIZATION NOTE(loadModuleHelp_rootCertsModuleName): Do not translate 'Root Certs' -+loadModuleHelp_rootCertsModuleName=‘Root Certs‘ is reserved and cannot be used as the module name. -diff --git security/manager/pki/resources/content/load_device.js security/manager/pki/resources/content/load_device.js -index b3b020236b93..08831f16e27e 100644 ---- security/manager/pki/resources/content/load_device.js -+++ security/manager/pki/resources/content/load_device.js -@@ -51,3 +51,20 @@ function onDialogAccept() { - - return true; - } -+ -+function validateModuleName() { -+ let bundle = document.getElementById("pippki_bundle"); -+ let name = document.getElementById("device_name").value; -+ let helpText = document.getElementById("helpText"); -+ helpText.value = ""; -+ let dialogNode = document.querySelector("dialog"); -+ dialogNode.removeAttribute("buttondisabledaccept"); -+ if (name == "") { -+ helpText.value = bundle.getString("loadModuleHelp_emptyModuleName"); -+ dialogNode.setAttribute("buttondisabledaccept", true); -+ } -+ if (name == "Root Certs") { -+ helpText.value = bundle.getString("loadModuleHelp_rootCertsModuleName"); -+ dialogNode.setAttribute("buttondisabledaccept", true); -+ } -+} -diff --git security/manager/pki/resources/content/load_device.xul security/manager/pki/resources/content/load_device.xul -index b3a82df7ac57..f7cfca3cacf7 100644 ---- security/manager/pki/resources/content/load_device.xul -+++ security/manager/pki/resources/content/load_device.xul -@@ -29,7 +29,8 @@ - - - - -+