From d867f26c0ed7e82fb1381e0e295f3a4fb346f3d1 Mon Sep 17 00:00:00 2001 From: Moonchild Date: Sun, 21 Feb 2021 10:32:47 +0000 Subject: [PATCH 1/9] [widget] Require user interaction when picking files or folders v2 Now with extra sauce to make it work cross-platform and cross-versions and for HTML input elements only. --- dom/html/HTMLInputElement.cpp | 2 +- dom/ipc/FilePickerParent.cpp | 3 ++- widget/nsBaseFilePicker.cpp | 3 ++- widget/nsBaseFilePicker.h | 3 ++- widget/nsFilePickerProxy.cpp | 2 +- widget/nsFilePickerProxy.h | 2 +- widget/nsIFilePicker.idl | 5 ++++- widget/windows/nsFilePicker.cpp | 19 ++++++++++++++++++- widget/windows/nsFilePicker.h | 4 +++- 9 files changed, 34 insertions(+), 9 deletions(-) diff --git a/dom/html/HTMLInputElement.cpp b/dom/html/HTMLInputElement.cpp index 86d03d8f59..557e673e15 100644 --- a/dom/html/HTMLInputElement.cpp +++ b/dom/html/HTMLInputElement.cpp @@ -866,7 +866,7 @@ HTMLInputElement::InitFilePicker(FilePickerType aType) mode = static_cast(nsIFilePicker::modeOpen); } - nsresult rv = filePicker->Init(win, title, mode); + nsresult rv = filePicker->Init(win, title, mode, /*aRequireInteraction = */ true); NS_ENSURE_SUCCESS(rv, rv); if (!okButtonLabel.IsEmpty()) { diff --git a/dom/ipc/FilePickerParent.cpp b/dom/ipc/FilePickerParent.cpp index 3e8301f246..1438e374fe 100644 --- a/dom/ipc/FilePickerParent.cpp +++ b/dom/ipc/FilePickerParent.cpp @@ -248,7 +248,8 @@ FilePickerParent::CreateFilePicker() return false; } - return NS_SUCCEEDED(mFilePicker->Init(window, mTitle, mMode)); + return NS_SUCCEEDED(mFilePicker->Init(window, mTitle, mMode, + element->IsNodeOfType(nsINode::eHTML_FORM_CONTROL))); } bool diff --git a/widget/nsBaseFilePicker.cpp b/widget/nsBaseFilePicker.cpp index d65ffb651a..1bcd78b462 100644 --- a/widget/nsBaseFilePicker.cpp +++ b/widget/nsBaseFilePicker.cpp @@ -166,7 +166,8 @@ nsBaseFilePicker::~nsBaseFilePicker() NS_IMETHODIMP nsBaseFilePicker::Init(mozIDOMWindowProxy* aParent, const nsAString& aTitle, - int16_t aMode) + int16_t aMode, + bool aRequireInteraction) { NS_PRECONDITION(aParent, "Null parent passed to filepicker, no file " "picker for you!"); diff --git a/widget/nsBaseFilePicker.h b/widget/nsBaseFilePicker.h index 56ca5acc8d..c0a197e263 100644 --- a/widget/nsBaseFilePicker.h +++ b/widget/nsBaseFilePicker.h @@ -25,7 +25,8 @@ public: NS_IMETHOD Init(mozIDOMWindowProxy* aParent, const nsAString& aTitle, - int16_t aMode); + int16_t aMode, + bool aRequireInteraction = false); NS_IMETHOD Open(nsIFilePickerShownCallback *aCallback); NS_IMETHOD AppendFilters(int32_t filterMask); diff --git a/widget/nsFilePickerProxy.cpp b/widget/nsFilePickerProxy.cpp index 8828c416e9..077168c455 100644 --- a/widget/nsFilePickerProxy.cpp +++ b/widget/nsFilePickerProxy.cpp @@ -27,7 +27,7 @@ nsFilePickerProxy::~nsFilePickerProxy() NS_IMETHODIMP nsFilePickerProxy::Init(mozIDOMWindowProxy* aParent, const nsAString& aTitle, - int16_t aMode) + int16_t aMode, bool aRequireInteraction) { TabChild* tabChild = TabChild::GetFrom(aParent); if (!tabChild) { diff --git a/widget/nsFilePickerProxy.h b/widget/nsFilePickerProxy.h index fbffb93dee..62d343d72f 100644 --- a/widget/nsFilePickerProxy.h +++ b/widget/nsFilePickerProxy.h @@ -34,7 +34,7 @@ public: NS_DECL_ISUPPORTS // nsIFilePicker (less what's in nsBaseFilePicker) - NS_IMETHOD Init(mozIDOMWindowProxy* aParent, const nsAString& aTitle, int16_t aMode) override; + NS_IMETHOD Init(mozIDOMWindowProxy* aParent, const nsAString& aTitle, int16_t aMode, bool aRequireInteraction = false) override; NS_IMETHOD AppendFilter(const nsAString& aTitle, const nsAString& aFilter) override; NS_IMETHOD GetDefaultString(nsAString& aDefaultString) override; NS_IMETHOD SetDefaultString(const nsAString& aDefaultString) override; diff --git a/widget/nsIFilePicker.idl b/widget/nsIFilePicker.idl index 62efe93ecf..8de69c56e9 100644 --- a/widget/nsIFilePicker.idl +++ b/widget/nsIFilePicker.idl @@ -66,9 +66,12 @@ interface nsIFilePicker : nsISupports * on this parent. parent must be non-null. * @param title The title for the file widget * @param mode load, save, or get folder + * @param requireinteraction (optional) + * require interaction before confirmation is possible * */ - void init(in mozIDOMWindowProxy parent, in AString title, in short mode); + void init(in mozIDOMWindowProxy parent, in AString title, in short mode, + [optional] in boolean requireinteraction); /** * Append to the filter list with things from the predefined list diff --git a/widget/windows/nsFilePicker.cpp b/widget/windows/nsFilePicker.cpp index 53857cf5e4..e2e0ab01f7 100644 --- a/widget/windows/nsFilePicker.cpp +++ b/widget/windows/nsFilePicker.cpp @@ -30,6 +30,7 @@ using mozilla::IsVistaOrLater; using mozilla::IsWin8OrLater; +using mozilla::IsWin10OrLater; using mozilla::MakeUnique; using mozilla::mscom::EnsureMTA; using mozilla::UniquePtr; @@ -194,11 +195,13 @@ nsFilePicker::~nsFilePicker() NS_IMPL_ISUPPORTS(nsFilePicker, nsIFilePicker) -NS_IMETHODIMP nsFilePicker::Init(mozIDOMWindowProxy *aParent, const nsAString& aTitle, int16_t aMode) +NS_IMETHODIMP nsFilePicker::Init(mozIDOMWindowProxy *aParent, const nsAString& aTitle, int16_t aMode, + bool aRequireInteraction) { nsCOMPtr window = do_QueryInterface(aParent); nsIDocShell* docShell = window ? window->GetDocShell() : nullptr; mLoadContext = do_QueryInterface(docShell); + mRequireInteraction = aRequireInteraction; return nsBaseFilePicker::Init(aParent, aTitle, aMode); } @@ -603,6 +606,13 @@ nsFilePicker::ShowFolderPicker(const nsString& aInitialDir, bool &aWasInitError) // options FILEOPENDIALOGOPTIONS fos = FOS_PICKFOLDERS; + // Require interaction if the folder picker is triggered by an element that + // is potentially unsafe to use the default value in. + // Win 10+ only, because this dialog flag is broken in earlier versions. + if (IsWin10OrLater() && mRequireInteraction) { + fos |= FOS_OKBUTTONNEEDSINTERACTION; + } + dialog->SetOptions(fos); // initial strings @@ -923,6 +933,13 @@ nsFilePicker::ShowFilePicker(const nsString& aInitialDir, bool &aWasInitError) FILEOPENDIALOGOPTIONS fos = 0; fos |= FOS_SHAREAWARE | FOS_OVERWRITEPROMPT | FOS_FORCEFILESYSTEM; + + // Require interaction if the file picker is triggered by an element that + // is potentially unsafe to use the default value in. + // Win 10+ only, because this dialog flag is broken in earlier versions. + if (IsWin10OrLater() && mRequireInteraction) { + fos |= FOS_OKBUTTONNEEDSINTERACTION; + } // Handle add to recent docs settings if (IsPrivacyModeEnabled() || !mAddToRecentDocs) { diff --git a/widget/windows/nsFilePicker.h b/widget/windows/nsFilePicker.h index 90d8c15bc1..0a2e01b90b 100644 --- a/widget/windows/nsFilePicker.h +++ b/widget/windows/nsFilePicker.h @@ -60,7 +60,8 @@ class nsFilePicker : public: nsFilePicker(); - NS_IMETHOD Init(mozIDOMWindowProxy *aParent, const nsAString& aTitle, int16_t aMode); + NS_IMETHOD Init(mozIDOMWindowProxy *aParent, const nsAString& aTitle, int16_t aMode, + bool aRequireInteraction = false); NS_DECL_ISUPPORTS @@ -125,6 +126,7 @@ protected: nsString mUnicodeFile; static char16_t *mLastUsedUnicodeDirectory; HWND mDlgWnd; + bool mRequireInteraction; class ComDlgFilterSpec { From 79d90233cdc3047cc8b3b5c8f46477acba1d8287 Mon Sep 17 00:00:00 2001 From: Moonchild Date: Sun, 21 Feb 2021 19:20:31 +0000 Subject: [PATCH 2/9] Issue #1722 - Update about:license Mostly making parts conditional and removing blocks that are no longer applicable, and a few minor edits otherwise to update links and text. Resolves #1722 --- toolkit/content/license.html | 520 +++++++++-------------------------- 1 file changed, 127 insertions(+), 393 deletions(-) diff --git a/toolkit/content/license.html b/toolkit/content/license.html index 1041ec42f6..5e88440689 100644 --- a/toolkit/content/license.html +++ b/toolkit/content/license.html @@ -33,9 +33,7 @@ available under licenses which are both free and open source. - A URL identifying the specific source code used to create this copy can be found - on the build configuration page, and you can read - instructions + You can read instructions on how to download and build the code for yourself.

@@ -65,31 +63,34 @@
  • GNU General Public License 3.0

  • +#ifdef MOZ_WEBRTC
  • ACE License
  • +#endif +#ifdef MOZ_DEVTOOLS_SERVER
  • acorn License
  • -#ifdef MOZ_INSTALL_TRACKING -
  • Adjust SDK License
  • #endif
  • Adobe CMap License
  • -
  • Android Open Source License
  • +#ifdef MOZ_ANGLE_RENDERER
  • ANGLE License
  • +#endif
  • Apache License 2.0
  • Apple License
  • Apple/Mozilla NPRuntime License
  • ARM License
  • +#ifdef MOZ_UPDATER
  • bspatch License
  • +#endif
  • Cairo Component Licenses
  • Chromium License
  • -
  • CodeMirror License
  • +#ifdef MOZ_DEVTOOLS
  • CodeMirror License
  • cubic-bezier License
  • D3 License
  • Dagre-D3 License
  • +#endif
  • dtoa License
  • -
  • Dutch Spellchecking Dictionary License
  • #if defined(XP_WIN) || defined(XP_LINUX)
  • Twemoji License
  • #endif -
  • Estonian Spellchecking Dictionary License
  • Expat License
  • Firebug License
  • gfxFontList License
  • @@ -98,11 +99,15 @@
  • Google Gears/iStumbler License
  • Google VP8 License
  • GSL License
  • +#ifdef MOZ_WEBRTC
  • gyp License
  • +#endif
  • halloc License
  • HarfBuzz License
  • ICU License
  • +#ifdef MOZ_DEVTOOLS
  • Immutable.js License
  • +#endif
  • Japan Network Information Center License
  • jQuery License
  • k_exp License
  • @@ -118,42 +123,56 @@
  • libnestegg License
  • libsoundtouch License
  • libyuv License
  • -
  • Lithuanian Spellchecking Dictionary License
  • MIT license — microformat-shiv
  • MySpell License
  • +#ifdef MOZ_DEVTOOLS
  • naturalSort License
  • +#endif +#ifdef MOZ_WEBRTC
  • nICEr License
  • +#endif
  • node-properties License
  • +#ifdef MOZ_WEBRTC
  • nrappkit License
  • +#endif +#ifdef MOZ_EME
  • OpenAES License
  • +#endif
  • OpenVision License
  • -
  • pbkdf2_sha256 License
  • praton License
  • qcms License
  • +#ifdef MOZ_DEVTOOLS_SERVER
  • QR Code Generator License
  • +#endif
  • React License
  • +#ifdef MOZ_DEVTOOLS
  • React-Redux License
  • React Virtualized License
  • +#endif
  • Red Hat xdg_user_dir_lookup License
  • +#ifdef MOZ_DEVTOOLS
  • Redux License
  • Reselect License
  • -
  • Russian Spellchecking Dictionary License
  • +#endif
  • SCTP Licenses
  • +#ifdef MOZ_ENABLE_SKIA
  • Skia License
  • +#endif
  • Snappy License
  • +#ifdef MOZ_DEVTOOLS_SERVER
  • sprintf.js License
  • +#endif
  • SunSoft License
  • SuperFastHash License
  • Unicode License
  • University of California License
  • US English Spellchecking Dictionary Licenses
  • V8 License
  • -#if defined(XP_WIN) || defined(XP_MACOSX) || defined(XP_LINUX) -
  • Valve BSD License
  • -#endif
  • VTune License
  • +#ifdef MOZ_WEBRTC
  • WebRTC License
  • x264 License
  • +#endif
  • Xiph.org Foundation License
  • @@ -2053,7 +2072,7 @@ Public License instead of this License. But first, please read <http://www.gnu.org/philosophy/why-not-lgpl.html>.


    - +#ifdef MOZ_WEBRTC

    ACE License

    This license applies to the file @@ -2077,11 +2096,13 @@ executables of your software products.


    - +#endif

    Adobe CMap License

    -

    This license applies to files in the directory - browser/extensions/pdfjs/content/web/cmaps/.

    +

    This license applies to files in application directories for + applications including the pdf.js in-application PDF reader, + specifically + */pdfjs/content/web/cmaps/.

     Copyright 1990-2009 Adobe Systems Incorporated.
    @@ -2122,41 +2143,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     
     
         
    - -

    Android Open Source License

    - -

    This license applies to various files in the Mozilla codebase, - including those in the directory gfx/skia/.

    - - -
    - Copyright 2009, The Android Open Source Project
    -
    - Redistribution and use in source and binary forms, with or without
    - modification, are permitted provided that the following conditions
    - are met:
    -  * Redistributions of source code must retain the above copyright
    -    notice, this list of conditions and the following disclaimer.
    -  * Redistributions in binary form must reproduce the above copyright
    -    notice, this list of conditions and the following disclaimer in the
    -    documentation and/or other materials provided with the distribution.
    -
    - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
    - EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
    - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
    - PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
    - CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
    - EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
    - PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
    - PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
    - OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
    - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
    - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    -
    - - -
    - +#ifdef MOZ_ANGLE_RENDERER

    ANGLE License

    This license applies to files in the directory gfx/angle/.

    @@ -2198,7 +2185,8 @@ POSSIBILITY OF SUCH DAMAGE.
    - +#endif +#ifdef MOZ_DEVTOOLS_SERVER

    acorn License

    This license applies to all files in @@ -2232,6 +2220,7 @@ licences.


    +#endif #ifdef MOZ_INSTALL_TRACKING

    Adjust SDK License

    @@ -2559,6 +2548,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    +#ifdef MOZ_UPDATER

    bspatch License

    This license applies to the files @@ -2594,6 +2584,7 @@ POSSIBILITY OF SUCH DAMAGE.


    +#endif

    Cairo Component Licenses

    @@ -2652,7 +2643,6 @@ WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

    This license applies to parts of the code in:

    • editor/libeditor/EditorEventListener.cpp
    • -
    • security/sandbox/
    • widget/cocoa/GfxInfo.mm

    and also some files in these directories:

    @@ -2700,7 +2690,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    - +#ifdef MOZ_DEVTOOLS

    CodeMirror License

    This license applies to all files in @@ -2777,7 +2767,7 @@ DEALINGS IN THE SOFTWARE.

    D3 License

    This license applies to the file - devtools/client/shared/d3.js. + devtools/client/shared/vendor/d3.js.

     Copyright (c) 2014, Michael Bostock
    @@ -2840,6 +2830,7 @@ THE SOFTWARE.
     
     
         
    +#endif

    dtoa License

    @@ -2866,47 +2857,6 @@ OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE.
    -

    Dutch Spellchecking Dictionary License

    - -

    This license applies to the Dutch Spellchecking Dictionary. (This - code only ships in some localized versions of this product.)

    - -
    -Copyright (c) 2006, 2007 OpenTaal
    -Copyright (c) 2001, 2002, 2003, 2005 Simon Brouwer e.a.
    -Copyright (c) 1996 Nederlandstalige Tex Gebruikersgroep
    -
    -All rights reserved.
    -
    -Redistribution and use in source and binary forms, with or without
    -modification, are permitted provided that the following conditions are met:
    -
    -* Redistributions of source code must retain the above copyright notice, this
    -list of conditions and the following disclaimer.
    -* Redistributions in binary form must reproduce the above copyright notice,
    -this list of conditions and the following disclaimer in the documentation
    -and/or other materials provided with the distribution.
    -* Neither the name of the OpenTaal, Simon Brouwer e.a., or Nederlandstalige Tex
    -Gebruikersgroep nor the names of its contributors may be used to endorse or
    -promote products derived from this software without specific prior written
    -permission.
    -
    -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
    -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
    -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
    -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
    -CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
    -EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
    -PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
    -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
    -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
    -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
    -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    -
    - - -
    - #if defined(XP_WIN) || defined(XP_LINUX)

    Twemoji License

    @@ -2951,56 +2901,6 @@ publicity, privacy, or moral rights may limit how you use the material.
    #endif -

    Estonian Spellchecking Dictionary License

    - -

    This license applies to precursor works to certain files which are - part of the Estonian Spellchecking Dictionary. The - shipped versions are under the GNU Lesser General Public License. (This - code only ships in some localized versions of this product.)

    - -
    -Copyright © Institute of the Estonian Language
    -
    -E-mail: litsents@eki.ee
    -URL: http://www.eki.ee/tarkvara/
    -
    -The present Licence Agreement gives the user of this Software Product
    -(hereinafter: Product) the right to use the Product for whatever purpose
    -(incl. distribution, copying, altering, inclusion in other software, and
    -selling) on the following conditions:
    -
    -1. The present Licence Agreement should belong unaltered to each copy ever
    -   made of this Product;
    -2. Neither the Institute of the Estonian Language (hereinafter: IEL) nor the
    -   author(s) of the Product will take responsibility for any detriment, direct
    -   or indirect, possibly ensuing from the application of the Product;
    -3. The IEL is ready to share the Product with other users as we wish to
    -   advance research on the Estonian language and to promote the use of
    -   Estonian in rapidly developing infotechnology, yet we refuse to bind
    -   ourselves to any further obligation, which means that the IEL is not
    -   obliged either to warrant the suitability of the Product for a specific
    -   purpose, to improve the software, or to provide a more detailed description
    -   of the underlying algorithms. (Which does not mean, though, that we may not
    -   do it.)
    -
    -Notification Request:
    -
    -As a courtesy, we would appreciate being informed whenever our linguistic
    -products are used to create derivative works. If you modify our software or
    -include it in other products, please inform us by sending e-mail to
    -litsents@eki.ee or by letter to
    -
    -Institute of the Estonian Language
    -Roosikrantsi 6
    -10119 Tallinn
    -ESTONIA
    -
    -Phone & Fax: +372 6411443
    -
    - - - -

    Expat License

    @@ -3036,8 +2936,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
    - -

    Firebug License

    +#ifdef MOZ_DEVTOOLS_SERVER

    Firebug License

    This license applies to the code devtools/shared/webconsole/network-helper.js.

    @@ -3079,6 +2978,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    +#endif

    gfxFontList License

    @@ -3122,7 +3022,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

    Google BSD License

    This license applies to files in the directories - toolkit/crashreporter/google-breakpad/ and toolkit/components/protobuf/.

    @@ -3159,30 +3058,29 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     
         
    -

    Google VP8 License

    +

    VPX License

    -

    This license applies to certain files in the directory +

    This license applies to the files in the directory media/libvpx.

    -Copyright (c) 2010, Google, Inc.
    -
    -All rights reserved.
    +Copyright (c) 2010, The WebM Project authors. All rights reserved.
     
     Redistribution and use in source and binary forms, with or without
    -modification, are permitted provided that the following conditions
    -are met:
    +modification, are permitted provided that the following conditions are
    +met:
     
    -- Redistributions of source code must retain the above copyright
    -  notice, this list of conditions and the following disclaimer.
    +  * Redistributions of source code must retain the above copyright
    +    notice, this list of conditions and the following disclaimer.
     
    -- Redistributions in binary form must reproduce the above
    -  copyright notice, this list of conditions and the following
    -  disclaimer in the documentation and/or other materials provided
    -  with the distribution.
    +  * Redistributions in binary form must reproduce the above copyright
    +    notice, this list of conditions and the following disclaimer in
    +    the documentation and/or other materials provided with the
    +    distribution.
     
    -- Neither the name of Google nor the names of its contributors may
    -  be used to endorse or promote products derived from this software
    -  without specific prior written permission.
    +  * Neither the name of Google, nor the WebM Project, nor the names
    +    of its contributors may be used to endorse or promote products
    +    derived from this software without specific prior written
    +    permission.
     
     THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
     "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
    @@ -3196,22 +3094,29 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
     OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     
    -Subject to the terms and conditions of the above License, Google
    -hereby grants to You a perpetual, worldwide, non-exclusive,
    -no-charge, royalty-free, irrevocable (except as stated in this
    -section) patent license to make, have made, use, offer to sell, sell,
    -import, and otherwise transfer this implementation of VP8, where such
    -license applies only to those patent claims, both currently owned by
    -Google and acquired in the future, licensable by Google that are
    -necessarily infringed by this implementation of VP8. If You or your
    -agent or exclusive licensee institute or order or agree to the
    -institution of patent litigation against any entity (including a
    -cross-claim or counterclaim in a lawsuit) alleging that this
    -implementation of VP8 or any code incorporated within this
    -implementation of VP8 constitutes direct or contributory patent
    -infringement, or inducement of patent infringement, then any rights
    -granted to You under this License for this implementation of VP8
    -shall terminate as of the date such litigation is filed.
    +Additional IP Rights Grant (Patents)
    +------------------------------------
    +
    +"These implementations" means the copyrightable works that implement the WebM
    +codecs distributed by Google as part of the WebM Project.
    +
    +Google hereby grants to you a perpetual, worldwide, non-exclusive, no-charge,
    +royalty-free, irrevocable (except as stated in this section) patent license to
    +make, have made, use, offer to sell, sell, import, transfer, and otherwise
    +run, modify and propagate the contents of these implementations of WebM, where
    +such license applies only to those patent claims, both currently owned by
    +Google and acquired in the future, licensable by Google that are necessarily
    +infringed by these implementations of WebM. This grant does not include claims
    +that would be infringed only as a consequence of further modification of these
    +implementations. If you or your agent or exclusive licensee institute or order
    +or agree to the institution of patent litigation or any other patent
    +enforcement activity against any entity (including a cross-claim or
    +counterclaim in a lawsuit) alleging that any of these implementations of WebM
    +or any code incorporated within any of these implementations of WebM
    +constitute direct or contributory patent infringement, or inducement of
    +patent infringement, then any patent rights granted to you under this License
    +for these implementations of WebM shall terminate as of the date such
    +litigation is filed.
     

    @@ -3290,6 +3195,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     Copyright (c) 2015 Microsoft Corporation. All rights reserved.
    +Copyright (c) 2020 Moonchild Productions. All rights reserved.
     
     This code is licensed under the MIT License (MIT).
     
    @@ -3314,7 +3220,7 @@ THE SOFTWARE.
     
     
         
    - +#ifdef MOZ_WEBRTC

    gyp License

    This license applies to certain files in the directory @@ -3351,6 +3257,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


    +#endif

    halloc License

    @@ -3470,6 +3377,8 @@ All trademarks and registered trademarks mentioned herein are the property of their respective owners.

    + +#ifdef MOZ_DEVTOOLS

    Immutable.js License

    @@ -3506,6 +3415,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     

    +#endif

    Japan Network Information Center License

    This license applies to certain files in the @@ -3624,8 +3534,8 @@ SUCH DAMAGE.

    This license applies to the following files:

      -
    • openmax_dl/dl/api/omxtypes.h
    • -
    • openmax_dl/dl/sp/api/omxSP.h
    • +
    • media/openmax_dl/dl/api/omxtypes.h
    • +
    • media/openmax_dl/dl/sp/api/omxSP.h
    @@ -3663,6 +3573,7 @@ Khronos and OpenMAX are trademarks of the Khronos Group Inc.
     
     
     Copyright (c) 2003-2010 Mark Borgerding
    +Copyright (c) 2017 Mark Straver BASc
     
     All rights reserved.
     
    @@ -3945,43 +3856,6 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     
    -
    - -

    Lithuanian Spellchecking Dictionary License

    - -

    This license applies to the Lithuanian Spellchecking Dictionary. (This - code only ships in some localized versions of this product.)

    - -
    -Copyright (c) 2000-2013, Albertas Agejevas and contributors.
    -All rights reserved.
    -
    -Redistribution and use in source and binary forms, with or without
    -modification, are permitted provided that the following conditions
    -are met:
    -1. Redistributions of source code must retain the above copyright
    -   notice, this list of conditions and the following disclaimer.
    -2. Redistributions in binary form must reproduce the above copyright
    -   notice, this list of conditions and the following disclaimer in the
    -   documentation and/or other materials provided with the distribution.
    -3. Neither the name of the copyright holders nor the names of its contributors
    -   may be used to endorse or promote products derived from this software
    -   without specific prior written permission.
    -
    -THIS SOFTWARE IS PROVIDED BY COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND
    -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
    -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
    -ARE DISCLAIMED.  IN NO EVENT SHALL ALBERTAS AGEJEVAS OR CONTRIBUTORS BE LIABLE
    -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
    -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
    -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
    -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
    -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
    -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
    -SUCH DAMAGE.
    -
    - -

    MIT license — microformat-shiv

    @@ -4056,7 +3930,7 @@ SUCH DAMAGE.
    - +#ifdef MOZ_DEVTOOLS

    naturalSort License

    This license applies to devtools/client/shared/natural-sort.js.

    @@ -4086,7 +3960,8 @@ THE SOFTWARE.

    - +#endif +#ifdef MOZ_WEBRTC

    nICEr License

    This license applies to certain files in the directory @@ -4131,7 +4006,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


    - +#endif +#ifdef MOZ_EME

    OpenAES License

    This license applies to certain files in the directory @@ -4166,6 +4042,7 @@ POSSIBILITY OF SUCH DAMAGE.


    +#endif

    OpenVision License

    @@ -4195,7 +4072,7 @@ PERFORMANCE OF THIS SOFTWARE.

    - +#ifdef MOZ_DEVTOOLS_SERVER

    node-properties License

    This license applies to @@ -4226,7 +4103,8 @@ THE SOFTWARE.


    - +#endif +#ifdef MOZ_WEBRTC

    nrappkit License

    This license applies to certain files in the directory @@ -4373,6 +4251,7 @@ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


    +#endif

    praton License

    @@ -4444,41 +4323,6 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
    -
    - -

    pbkdf2_sha256 License

    - -

    This license applies to the code - mozglue/android/pbkdf2_sha256.c and - mozglue/android/pbkdf2_sha256.h. -

    - -
    -Copyright 2005,2007,2009 Colin Percival
    -All rights reserved.
    -
    -Redistribution and use in source and binary forms, with or without
    -modification, are permitted provided that the following conditions
    -are met:
    -1. Redistributions of source code must retain the above copyright
    -   notice, this list of conditions and the following disclaimer.
    -2. Redistributions in binary form must reproduce the above copyright
    -   notice, this list of conditions and the following disclaimer in the
    -   documentation and/or other materials provided with the distribution.
    -
    -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
    -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
    -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
    -ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
    -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
    -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
    -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
    -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
    -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
    -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
    -SUCH DAMAGE.
    -
    -

    qcms License

    @@ -4511,6 +4355,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
    +#ifdef MOZ_DEVTOOLS_SERVER

    QR Code Generator License

    This license applies to certain files in the directory @@ -4539,6 +4384,7 @@ THE SOFTWARE.


    +#endif

    React License

    @@ -4576,6 +4422,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    +#ifdef MOZ_DEVTOOLS

    React-Redux License

    This license applies to the file @@ -4631,6 +4478,7 @@ SOFTWARE.


    +#endif

    Red Hat xdg_user_dir_lookup License

    @@ -4663,7 +4511,7 @@ SOFTWARE.
    - +#ifdef MOZ_DEVTOOLS

    Redux License

    This license applies to the file @@ -4721,44 +4569,7 @@ SOFTWARE.


    - -

    Russian Spellchecking Dictionary License

    - -

    This license applies to the Russian Spellchecking Dictionary. (This - code only ships in some localized versions of this product.)

    - -
    -* Copyright (c) 1997-2008, Alexander I. Lebedev
    -
    -All rights reserved.
    -
    -Redistribution and use in source and binary forms, with or without
    -modification, are permitted provided that the following conditions
    -are met:
    -* Redistributions of source code must retain the above copyright
    -  notice, this list of conditions and the following disclaimer.
    -* Redistributions in binary form must reproduce the above copyright
    -  notice, this list of conditions and the following disclaimer in the
    -  documentation and/or other materials provided with the distribution.
    -* Modified versions must be clearly marked as such.
    -* The name of Alexander I. Lebedev may not be used to endorse or promote
    -  products derived from this software without specific prior written
    -  permission.
    -
    -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
    -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
    -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
    -ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
    -LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
    -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
    -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
    -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
    -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
    -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
    -POSSIBILITY OF SUCH DAMAGE.
    -
    - -
    +#endif

    SCTP Licenses

    @@ -4831,6 +4642,7 @@ THE POSSIBILITY OF SUCH DAMAGE.
    +#ifdef MOZ_ENABLE_SKIA

    Skia License

    This license applies to certain files in the directory @@ -4867,6 +4679,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


    +#endif

    Snappy License

    @@ -4905,7 +4718,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    - +#ifdef MOZ_DEVTOOLS_SERVER

    sprintf.js License

    This license applies to @@ -4939,6 +4752,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


    +#endif

    SunSoft License

    @@ -4978,42 +4792,6 @@ authorization from SunSoft Inc. -
    - -

    SuperFastHash License

    - -

    This license applies to files in the directory - security/sandbox/chromium/base/third_party/superfasthash/.

    - -
    -Copyright (c) 2010, Paul Hsieh
    -All rights reserved.
    -
    -Redistribution and use in source and binary forms, with or without modification,
    -are permitted provided that the following conditions are met:
    -
    -* Redistributions of source code must retain the above copyright notice, this
    -  list of conditions and the following disclaimer.
    -* Redistributions in binary form must reproduce the above copyright notice, this
    -  list of conditions and the following disclaimer in the documentation and/or
    -  other materials provided with the distribution.
    -* Neither my name, Paul Hsieh, nor the names of any other contributors to the
    -  code use may not be used to endorse or promote products derived from this
    -  software without specific prior written permission.
    -
    -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
    -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
    -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
    -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
    -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
    -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
    -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
    -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
    -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
    -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    -
    - -

    Unicode License

    @@ -5419,7 +5197,7 @@ Database section 7. directories, certain files in those directories:

      -
    • dbm/
    • +
    • security/nss/lib/dbm/
    • db/mork/src/morkQuickSort.cpp
    • xpcom/glue/nsQuickSort.cpp
    • nsprpub/pr/src/misc/praton.c
    • @@ -5600,44 +5378,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
      -

      Valve BSD License

      - -

      This license applies to certain files in the directory - gfx/vr/openvr.

      -
      -Copyright (c) 2015, Valve Corporation
      -All rights reserved.
      -
      -Redistribution and use in source and binary forms, with or without modification,
      -are permitted provided that the following conditions are met:
      -
      -1. Redistributions of source code must retain the above copyright notice, this
      -list of conditions and the following disclaimer.
      -
      -2. Redistributions in binary form must reproduce the above copyright notice,
      -this list of conditions and the following disclaimer in the documentation and/or
      -other materials provided with the distribution.
      -
      -3. Neither the name of the copyright holder nor the names of its contributors
      -may be used to endorse or promote products derived from this software without
      -specific prior written permission.
      -
      -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
      -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
      -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
      -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
      -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
      -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
      -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
      -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
      -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
      -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
      -
      - -#endif - -
      -

      VTune License

      This license applies to certain files in the directory @@ -5675,7 +5415,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


      - +#ifdef MOZ_WEBRTC

      WebRTC License

      This license applies to certain files in the directory @@ -5743,6 +5483,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.


      +#endif

      Xiph.org Foundation License

      @@ -5795,10 +5536,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
      • This software is based in part on the work of the Independent JPEG Group.
      • -
      • Portions of the OS/2 and Android versions - of this software are copyright ©1996-2012 - The FreeType Project. - All rights reserved.
      @@ -5825,16 +5562,14 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    - -#ifdef XP_WIN -
    +#ifdef XP_WIN

    Proprietary Operating System Components

    Under some circumstances, under our - binary components policy, - Mozilla may decide to include additional + Binary Component Policy, + we may decide to include additional operating system vendor code with the installer of our products designed for that vendor's proprietary platform, to make our products work well on that specific operating system. The following license statements @@ -5846,7 +5581,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. they are referred to below as "Distributable Code":

    • d3d*.dll (Direct3D libraries)
    • -
    • msvc*.dll (C and C++ runtime libraries)
    • +
    • msvc*.dll and vcruntime*.dll (C and C++ runtime libraries)
    • +
    • api-ms-win*.dll and ucrtbase.dll (Universal CRT runtime libraries)

    @@ -5870,10 +5606,8 @@ following terms: regulations that apply to the Distributable Code. -#endif - -
    +#endif

    Return to top.

    From d86d1256bc910d4e88e9d156f8d857f3656bde08 Mon Sep 17 00:00:00 2001 From: Moonchild Date: Wed, 24 Feb 2021 09:05:30 +0000 Subject: [PATCH 3/9] [dom] Update noscript serialization to the changed spec. Make