svn commit: r469814 - in branches/2018Q2/www/waterfox: . files
Jan Beich
jbeich at FreeBSD.org
Sun May 13 20:00:43 UTC 2018
Author: jbeich
Date: Sun May 13 20:00:40 2018
New Revision: 469814
URL: https://svnweb.freebsd.org/changeset/ports/469814
Log:
MFH: r469813
www/waterfox: update to 56.1.0.111172
- Apply some FF61 fixes
Changes: https://github.com/MrAlex94/Waterfox/compare/2bb1a86e5dbd6...941b28140102e
Approved by: ports-secteam blanket
Added:
branches/2018Q2/www/waterfox/files/patch-bug1432323
- copied unchanged from r469813, head/www/waterfox/files/patch-bug1432323
branches/2018Q2/www/waterfox/files/patch-bug1436759
- copied unchanged from r469813, head/www/waterfox/files/patch-bug1436759
branches/2018Q2/www/waterfox/files/patch-bug1436983
- copied unchanged from r469813, head/www/waterfox/files/patch-bug1436983
branches/2018Q2/www/waterfox/files/patch-bug1439444
- copied unchanged from r469813, head/www/waterfox/files/patch-bug1439444
branches/2018Q2/www/waterfox/files/patch-bug1439723
- copied unchanged from r469813, head/www/waterfox/files/patch-bug1439723
branches/2018Q2/www/waterfox/files/patch-bug1443110
- copied unchanged from r469813, head/www/waterfox/files/patch-bug1443110
branches/2018Q2/www/waterfox/files/patch-bug1457912
- copied unchanged from r469813, head/www/waterfox/files/patch-bug1457912
branches/2018Q2/www/waterfox/files/patch-bug1458270
- copied unchanged from r469813, head/www/waterfox/files/patch-bug1458270
Deleted:
branches/2018Q2/www/waterfox/files/patch-bug1224396
branches/2018Q2/www/waterfox/files/patch-bug1387079
branches/2018Q2/www/waterfox/files/patch-bug1441941
branches/2018Q2/www/waterfox/files/patch-bug1454692
Modified:
branches/2018Q2/www/waterfox/Makefile
branches/2018Q2/www/waterfox/distinfo
branches/2018Q2/www/waterfox/files/patch-bug847568
Directory Properties:
branches/2018Q2/ (props changed)
Modified: branches/2018Q2/www/waterfox/Makefile
==============================================================================
--- branches/2018Q2/www/waterfox/Makefile Sun May 13 19:59:12 2018 (r469813)
+++ branches/2018Q2/www/waterfox/Makefile Sun May 13 20:00:40 2018 (r469814)
@@ -1,8 +1,8 @@
# $FreeBSD$
PORTNAME= waterfox
-DISTVERSION= 56.1.0-89
-DISTVERSIONSUFFIX= -g2bb1a86e5dbd6
+DISTVERSION= 56.1.0-111172
+DISTVERSIONSUFFIX= -g941b28140102e
CATEGORIES= www ipv6
MAINTAINER= jbeich at FreeBSD.org
Modified: branches/2018Q2/www/waterfox/distinfo
==============================================================================
--- branches/2018Q2/www/waterfox/distinfo Sun May 13 19:59:12 2018 (r469813)
+++ branches/2018Q2/www/waterfox/distinfo Sun May 13 20:00:40 2018 (r469814)
@@ -1,3 +1,3 @@
-TIMESTAMP = 1526056588
-SHA256 (MrAlex94-Waterfox-56.1.0-89-g2bb1a86e5dbd6_GH0.tar.gz) = ab20b2392440e321ce7a3ecbd8b77eae40110b387094488cec95c57f2a6853bc
-SIZE (MrAlex94-Waterfox-56.1.0-89-g2bb1a86e5dbd6_GH0.tar.gz) = 394172045
+TIMESTAMP = 1526148821
+SHA256 (MrAlex94-Waterfox-56.1.0-111172-g941b28140102e_GH0.tar.gz) = a9cedc302e81667f75e46e971ad8e165761f3bed2e1a4a27f6fdb6bc4a812bf1
+SIZE (MrAlex94-Waterfox-56.1.0-111172-g941b28140102e_GH0.tar.gz) = 394958117
Copied: branches/2018Q2/www/waterfox/files/patch-bug1432323 (from r469813, head/www/waterfox/files/patch-bug1432323)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/2018Q2/www/waterfox/files/patch-bug1432323 Sun May 13 20:00:40 2018 (r469814, copy of r469813, head/www/waterfox/files/patch-bug1432323)
@@ -0,0 +1,102 @@
+commit 694ff7ca4925
+Author: Eric Rahm <erahm at mozilla.com>
+Date: Thu Feb 22 12:38:15 2018 -0800
+
+ Bug 1432323 - Refactor operator new in nsArrayEnumerator. r=froydnj
+
+ --HG--
+ extra : rebase_source : 9df6db9f17e14eff2f79cd29599b03619068cef3
+---
+ xpcom/ds/nsArrayEnumerator.cpp | 44 ++++++++++++++++++++++++++++--------------
+ 1 file changed, 29 insertions(+), 15 deletions(-)
+
+diff --git xpcom/ds/nsArrayEnumerator.cpp xpcom/ds/nsArrayEnumerator.cpp
+index 54951222ae954..2e7d1f9af43a5 100644
+--- xpcom/ds/nsArrayEnumerator.cpp
++++ xpcom/ds/nsArrayEnumerator.cpp
+@@ -13,6 +13,7 @@
+
+ #include "nsCOMArray.h"
+ #include "nsCOMPtr.h"
++#include "mozilla/OperatorNewExtensions.h"
+ #include "mozilla/RefPtr.h"
+
+ class nsSimpleArrayEnumerator final : public nsISimpleEnumerator
+@@ -112,14 +113,21 @@ public:
+ // nsISimpleEnumerator interface
+ NS_DECL_NSISIMPLEENUMERATOR
+
+- // nsSimpleArrayEnumerator methods
+- nsCOMArrayEnumerator() : mIndex(0) {}
++ // Use this instead of `new`.
++ static nsCOMArrayEnumerator* Allocate(const nsCOMArray_base& aArray);
+
+ // specialized operator to make sure we make room for mValues
+- void* operator new(size_t aSize, const nsCOMArray_base& aArray) CPP_THROW_NEW;
+- void operator delete(void* aPtr) { ::operator delete(aPtr); }
++ void operator delete(void* aPtr) { free(aPtr); }
+
+ private:
++ // nsSimpleArrayEnumerator methods
++ nsCOMArrayEnumerator()
++ : mIndex(0)
++ , mArraySize(0)
++ {
++ mValueArray[0] = nullptr;
++ }
++
+ ~nsCOMArrayEnumerator(void);
+
+ protected:
+@@ -176,26 +184,32 @@ nsCOMArrayEnumerator::GetNext(nsISupports** aResult)
+ return NS_OK;
+ }
+
+-void*
+-nsCOMArrayEnumerator::operator new(size_t aSize,
+- const nsCOMArray_base& aArray) CPP_THROW_NEW
++nsCOMArrayEnumerator*
++nsCOMArrayEnumerator::Allocate(const nsCOMArray_base& aArray)
+ {
+ // create enough space such that mValueArray points to a large
+ // enough value. Note that the initial value of aSize gives us
+ // space for mValueArray[0], so we must subtract
+- aSize += (aArray.Count() - 1) * sizeof(aArray[0]);
++ size_t size = sizeof(nsCOMArrayEnumerator);
++ uint32_t count;
++ if (aArray.Count() > 0) {
++ count = static_cast<uint32_t>(aArray.Count());
++ size += (count - 1) * sizeof(aArray[0]);
++ } else {
++ count = 0;
++ }
++
++ // Allocate a buffer large enough to contain our object and its array.
++ void* mem = moz_xmalloc(size);
++ auto result = new (mozilla::KnownNotNull, mem) nsCOMArrayEnumerator();
+
+- // do the actual allocation
+- nsCOMArrayEnumerator* result =
+- static_cast<nsCOMArrayEnumerator*>(::operator new(aSize));
++ result->mArraySize = count;
+
+ // now need to copy over the values, and addref each one
+ // now this might seem like a lot of work, but we're actually just
+ // doing all our AddRef's ahead of time since GetNext() doesn't
+ // need to AddRef() on the way out
+- uint32_t i;
+- uint32_t max = result->mArraySize = aArray.Count();
+- for (i = 0; i < max; ++i) {
++ for (uint32_t i = 0; i < count; ++i) {
+ result->mValueArray[i] = aArray[i];
+ NS_IF_ADDREF(result->mValueArray[i]);
+ }
+@@ -207,7 +221,7 @@ nsresult
+ NS_NewArrayEnumerator(nsISimpleEnumerator** aResult,
+ const nsCOMArray_base& aArray)
+ {
+- RefPtr<nsCOMArrayEnumerator> enumerator = new (aArray) nsCOMArrayEnumerator();
++ RefPtr<nsCOMArrayEnumerator> enumerator = nsCOMArrayEnumerator::Allocate(aArray);
+ enumerator.forget(aResult);
+ return NS_OK;
+ }
Copied: branches/2018Q2/www/waterfox/files/patch-bug1436759 (from r469813, head/www/waterfox/files/patch-bug1436759)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/2018Q2/www/waterfox/files/patch-bug1436759 Sun May 13 20:00:40 2018 (r469814, copy of r469813, head/www/waterfox/files/patch-bug1436759)
@@ -0,0 +1,26 @@
+commit a9c9593126c7
+Author: Michael Froman <mfroman at mozilla.com>
+Date: Wed Feb 14 14:24:50 2018 -0600
+
+ Bug 1436759 - Release NrIceMediaStreams on sts thread in transport_unittests.cpp. r=bwc
+
+ MozReview-Commit-ID: BLasqfQJxw
+
+ --HG--
+ extra : rebase_source : bca09672917ce5fc4a5450864c9f461952847b3f
+---
+ media/mtransport/test/transport_unittests.cpp | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git media/mtransport/test/transport_unittests.cpp media/mtransport/test/transport_unittests.cpp
+index 167a14be1fd52..4bf6195122182 100644
+--- media/mtransport/test/transport_unittests.cpp
++++ media/mtransport/test/transport_unittests.cpp
+@@ -481,6 +481,7 @@ class TransportTestPeer : public sigslot::has_slots<> {
+ flow_ = nullptr;
+ }
+ ice_ctx_ = nullptr;
++ streams_.clear();
+ }
+
+ void DisconnectDestroyFlow() {
Copied: branches/2018Q2/www/waterfox/files/patch-bug1436983 (from r469813, head/www/waterfox/files/patch-bug1436983)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/2018Q2/www/waterfox/files/patch-bug1436983 Sun May 13 20:00:40 2018 (r469814, copy of r469813, head/www/waterfox/files/patch-bug1436983)
@@ -0,0 +1,52 @@
+commit 7721a472b21b
+Author: Jon Coppeard <jcoppeard at mozilla.com>
+Date: Mon Feb 12 10:34:21 2018 +0000
+
+ Bug 1436983 - Don't GC while linking JIT code r=nbp
+
+ --HG--
+ extra : rebase_source : b096346182b263753414e1ef7aa4cb86d57d7386
+---
+ js/src/jit-test/tests/ion/getprop-primitive.js | 3 ++-
+ js/src/jit/CodeGenerator.cpp | 7 ++++++-
+ 2 files changed, 8 insertions(+), 2 deletions(-)
+
+diff --git js/src/jit-test/tests/ion/getprop-primitive.js js/src/jit-test/tests/ion/getprop-primitive.js
+index 2cb912d7d4d42..bf59e35b5702b 100644
+--- js/src/jit-test/tests/ion/getprop-primitive.js
++++ js/src/jit-test/tests/ion/getprop-primitive.js
+@@ -35,7 +35,8 @@ var template = function (set) {
+ // If we bailout in the inner loop, then x will have a smaller value
+ // than the number of iterations.
+ cont = assertEqIf(lastX > 0, x, set.length);
+- lastX = x;
++ if (inIon())
++ lastX = x;
+ x = 0;
+ }
+ return y;
+diff --git js/src/jit/CodeGenerator.cpp js/src/jit/CodeGenerator.cpp
+index 1b275a75cfd7e..6677d6cee443c 100644
+--- js/src/jit/CodeGenerator.cpp
++++ js/src/jit/CodeGenerator.cpp
+@@ -9838,6 +9838,11 @@ CodeGenerator::linkSharedStubs(JSContext* cx)
+ bool
+ CodeGenerator::link(JSContext* cx, CompilerConstraintList* constraints)
+ {
++ // We cancel off-thread Ion compilations in a few places during GC, but if
++ // this compilation was performed off-thread it will already have been
++ // removed from the relevant lists by this point. Don't allow GC here.
++ JS::AutoAssertNoGC nogc(cx);
++
+ RootedScript script(cx, gen->info().script());
+ OptimizationLevel optimizationLevel = gen->optimizationInfo().level();
+
+@@ -9918,7 +9923,7 @@ CodeGenerator::link(JSContext* cx, CompilerConstraintList* constraints)
+ // read barriers which were skipped while compiling the script off thread.
+ Linker linker(masm);
+ AutoFlushICache afc("IonLink");
+- JitCode* code = linker.newCode<CanGC>(cx, ION_CODE, !patchableBackedges_.empty());
++ JitCode* code = linker.newCode<NoGC>(cx, ION_CODE, !patchableBackedges_.empty());
+ if (!code)
+ return false;
+
Copied: branches/2018Q2/www/waterfox/files/patch-bug1439444 (from r469813, head/www/waterfox/files/patch-bug1439444)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/2018Q2/www/waterfox/files/patch-bug1439444 Sun May 13 20:00:40 2018 (r469814, copy of r469813, head/www/waterfox/files/patch-bug1439444)
@@ -0,0 +1,53 @@
+commit e8f515046724
+Author: Christoph Kerschbaumer <ckerschb at christophkerschbaumer.com>
+Date: Thu Mar 1 13:45:04 2018 +0100
+
+ Bug 1439444: resource and chrome images and styles should not be subject to CSP. r=gijs
+---
+ dom/security/nsCSPService.cpp | 18 +++++++++++++-----
+ 1 file changed, 13 insertions(+), 5 deletions(-)
+
+diff --git dom/security/nsCSPService.cpp dom/security/nsCSPService.cpp
+index 6e6f02c585fb7..f0d733454fc2a 100644
+--- dom/security/nsCSPService.cpp
++++ dom/security/nsCSPService.cpp
+@@ -43,13 +43,17 @@ NS_IMPL_ISUPPORTS(CSPService, nsIContentPolicy, nsIChannelEventSink)
+ // Helper function to identify protocols and content types not subject to CSP.
+ bool
+ subjectToCSP(nsIURI* aURI, nsContentPolicyType aContentType) {
++
++ nsContentPolicyType contentType =
++ nsContentUtils::InternalContentPolicyTypeToExternal(aContentType);
++
+ // These content types are not subject to CSP content policy checks:
+ // TYPE_CSP_REPORT -- csp can't block csp reports
+ // TYPE_REFRESH -- never passed to ShouldLoad (see nsIContentPolicy.idl)
+ // TYPE_DOCUMENT -- used for frame-ancestors
+- if (aContentType == nsIContentPolicy::TYPE_CSP_REPORT ||
+- aContentType == nsIContentPolicy::TYPE_REFRESH ||
+- aContentType == nsIContentPolicy::TYPE_DOCUMENT) {
++ if (contentType == nsIContentPolicy::TYPE_CSP_REPORT ||
++ contentType == nsIContentPolicy::TYPE_REFRESH ||
++ contentType == nsIContentPolicy::TYPE_DOCUMENT) {
+ return false;
+ }
+
+@@ -90,12 +94,16 @@ subjectToCSP(nsIURI* aURI, nsContentPolicyType aContentType) {
+ // hence we use protocol flags to accomplish that, but we also
+ // want resource:, chrome: and moz-icon to be subject to CSP
+ // (which also use URI_IS_LOCAL_RESOURCE).
++ // Exception to the rule are images and styles using a scheme
++ // of resource: or chrome:
++ bool isImgOrStyle = contentType == nsIContentPolicy::TYPE_IMAGE ||
++ contentType == nsIContentPolicy::TYPE_STYLESHEET;
+ rv = aURI->SchemeIs("resource", &match);
+- if (NS_SUCCEEDED(rv) && match) {
++ if (NS_SUCCEEDED(rv) && match && !isImgOrStyle) {
+ return true;
+ }
+ rv = aURI->SchemeIs("chrome", &match);
+- if (NS_SUCCEEDED(rv) && match) {
++ if (NS_SUCCEEDED(rv) && match && !isImgOrStyle) {
+ return true;
+ }
+ rv = aURI->SchemeIs("moz-icon", &match);
Copied: branches/2018Q2/www/waterfox/files/patch-bug1439723 (from r469813, head/www/waterfox/files/patch-bug1439723)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/2018Q2/www/waterfox/files/patch-bug1439723 Sun May 13 20:00:40 2018 (r469814, copy of r469813, head/www/waterfox/files/patch-bug1439723)
@@ -0,0 +1,26 @@
+commit 821df39aefc0
+Author: Nathan Froyd <froydnj at mozilla.com>
+Date: Mon Feb 26 11:08:55 2018 -0500
+
+ Bug 1439723 - use a temporary in Animation::Tick(); r=mattwoodrow
+---
+ dom/animation/Animation.cpp | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git dom/animation/Animation.cpp dom/animation/Animation.cpp
+index 6c5a55f0baf6e..7b89365f86811 100644
+--- dom/animation/Animation.cpp
++++ dom/animation/Animation.cpp
+@@ -693,8 +693,10 @@ Animation::Tick()
+ // during the *previous* tick of the refresh driver, it can still be
+ // ahead of the *current* timeline time when we are using the
+ // vsync timer so we need to clamp it to the timeline time.
+- mPendingReadyTime.SetValue(std::min(mTimeline->GetCurrentTime().Value(),
+- mPendingReadyTime.Value()));
++ TimeDuration currentTime = mTimeline->GetCurrentTime().Value();
++ if (currentTime < mPendingReadyTime.Value()) {
++ mPendingReadyTime.SetValue(currentTime);
++ }
+ FinishPendingAt(mPendingReadyTime.Value());
+ mPendingReadyTime.SetNull();
+ }
Copied: branches/2018Q2/www/waterfox/files/patch-bug1443110 (from r469813, head/www/waterfox/files/patch-bug1443110)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/2018Q2/www/waterfox/files/patch-bug1443110 Sun May 13 20:00:40 2018 (r469814, copy of r469813, head/www/waterfox/files/patch-bug1443110)
@@ -0,0 +1,25 @@
+commit 425c5a6ff8fc
+Author: Christoph Kerschbaumer <ckerschb at christophkerschbaumer.com>
+Date: Fri Mar 9 15:54:02 2018 +0100
+
+ Bug 1443110: Add NullCheck for loadinfo within InitCSP. r=smaug a=jcristau
+
+ --HG--
+ extra : source : 25ade148226d93650b653c62e2f4b15cbc51caef
+---
+ dom/base/nsDocument.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git dom/base/nsDocument.cpp dom/base/nsDocument.cpp
+index 88f3aea3b6255..5519dd662df31 100644
+--- dom/base/nsDocument.cpp
++++ dom/base/nsDocument.cpp
+@@ -2939,7 +2939,7 @@ nsDocument::InitCSP(nsIChannel* aChannel)
+ // In case this channel was instrument to discard the CSP, then
+ // there is nothing for us to do here.
+ nsCOMPtr<nsILoadInfo> loadInfo = aChannel->GetLoadInfo();
+- if (loadInfo->GetAllowDocumentToBeAgnosticToCSP()) {
++ if (loadInfo && loadInfo->GetAllowDocumentToBeAgnosticToCSP()) {
+ return NS_OK;
+ }
+
Copied: branches/2018Q2/www/waterfox/files/patch-bug1457912 (from r469813, head/www/waterfox/files/patch-bug1457912)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/2018Q2/www/waterfox/files/patch-bug1457912 Sun May 13 20:00:40 2018 (r469814, copy of r469813, head/www/waterfox/files/patch-bug1457912)
@@ -0,0 +1,169 @@
+commit 695328ac742d
+Author: Xidorn Quan <me at upsuper.org>
+Date: Mon May 7 10:40:34 2018 +1000
+
+ Bug 1457912 - Don't disable scrollbars when the window feature isn't listed explicitly. r=smaug, a=RyanVM
+
+ MozReview-Commit-ID: CB0PVroA86L
+
+ --HG--
+ extra : source : f8876cbee5fa17c374115ed04404a3a3fc61ba40
+---
+ .../components/windowwatcher/nsWindowWatcher.cpp | 5 +-
+ .../test/browser_new_content_window_chromeflags.js | 100 ++++++++++++++-------
+ 2 files changed, 73 insertions(+), 32 deletions(-)
+
+diff --git toolkit/components/windowwatcher/nsWindowWatcher.cpp toolkit/components/windowwatcher/nsWindowWatcher.cpp
+index 44f06554b26fd..34706cd92b44e 100644
+--- toolkit/components/windowwatcher/nsWindowWatcher.cpp
++++ toolkit/components/windowwatcher/nsWindowWatcher.cpp
+@@ -1700,9 +1700,12 @@ nsWindowWatcher::CalculateChromeFlagsHelper(uint32_t aInitialFlags,
+ nsIWebBrowserChrome::CHROME_WINDOW_MIN);
+
+ // default scrollbar to "on," unless explicitly turned off
+- if (WinHasOption(aFeatures, "scrollbars", 1, &presenceFlag) || !presenceFlag) {
++ bool scrollbarsPresent = false;
++ if (WinHasOption(aFeatures, "scrollbars", 1, &scrollbarsPresent) ||
++ !scrollbarsPresent) {
+ chromeFlags |= nsIWebBrowserChrome::CHROME_SCROLLBARS;
+ }
++ presenceFlag = presenceFlag || scrollbarsPresent;
+
+ return chromeFlags;
+ }
+diff --git toolkit/components/windowwatcher/test/browser_new_content_window_chromeflags.js toolkit/components/windowwatcher/test/browser_new_content_window_chromeflags.js
+index 871a4376f5671..2ea08da989467 100644
+--- toolkit/components/windowwatcher/test/browser_new_content_window_chromeflags.js
++++ toolkit/components/windowwatcher/test/browser_new_content_window_chromeflags.js
+@@ -126,18 +126,6 @@ const DISALLOWED = {
+ },
+ };
+
+-// Construct a features string that flips all DISALLOWED features
+-// to not be their defaults.
+-const DISALLOWED_STRING = Object.keys(DISALLOWED).map(feature => {
+- let toValue = DISALLOWED[feature].defaults_to ? "no" : "yes";
+- return `${feature}=${toValue}`;
+-}).join(",");
+-
+-const FEATURES = [ALLOWED_STRING, DISALLOWED_STRING].join(",");
+-
+-const SCRIPT_PAGE = `data:text/html,<script>window.open("about:blank", "_blank", "${FEATURES}");</script>`;
+-const SCRIPT_PAGE_FOR_CHROME_ALL = `data:text/html,<script>window.open("about:blank", "_blank", "all");</script>`;
+-
+ // This magic value of 2 means that by default, when content tries
+ // to open a new window, it'll actually open in a new window instead
+ // of a new tab.
+@@ -165,6 +153,35 @@ function getParentChromeFlags(win) {
+ .chromeFlags;
+ }
+
++/**
++ * Given some nsIDOMWindow for a window running in the parent process,
++ * asynchronously return the nsIWebBrowserChrome chrome flags for the
++ * associated content window.
++ *
++ * @param win (nsIDOMWindow)
++ * @returns int
++ */
++function getContentChromeFlags(win) {
++ let b = win.gBrowser.selectedBrowser;
++ return ContentTask.spawn(b, null, async function() {
++ // Content scripts provide docShell as a global.
++ /* global docShell */
++ docShell.QueryInterface(Ci.nsIInterfaceRequestor);
++ try {
++ // This will throw if we're not a remote browser.
++ return docShell.getInterface(Ci.nsITabChild)
++ .QueryInterface(Ci.nsIWebBrowserChrome)
++ .chromeFlags;
++ } catch (e) {
++ // This must be a non-remote browser...
++ return docShell.QueryInterface(Ci.nsIDocShellTreeItem)
++ .treeOwner
++ .QueryInterface(Ci.nsIWebBrowserChrome)
++ .chromeFlags;
++ }
++ });
++}
++
+ /**
+ * For some chromeFlags, ensures that flags that are in the
+ * ALLOWED group were modified, and that flags in the DISALLOWED
+@@ -214,6 +231,18 @@ function assertContentFlags(chromeFlags) {
+ * default.
+ */
+ add_task(async function test_new_remote_window_flags() {
++ // Construct a features string that flips all DISALLOWED features
++ // to not be their defaults.
++ const DISALLOWED_STRING = Object.keys(DISALLOWED).map(feature => {
++ let toValue = DISALLOWED[feature].defaults_to ? "no" : "yes";
++ return `${feature}=${toValue}`;
++ }).join(",");
++
++ const FEATURES = [ALLOWED_STRING, DISALLOWED_STRING].join(",");
++
++ const SCRIPT_PAGE = `data:text/html,<script>window.open("about:blank", "_blank", "${FEATURES}");</script>`;
++ const SCRIPT_PAGE_FOR_CHROME_ALL = `data:text/html,<script>window.open("about:blank", "_blank", "all");</script>`;
++
+ let newWinPromise = BrowserTestUtils.waitForNewWindow();
+
+ await BrowserTestUtils.withNewTab({
+@@ -236,25 +265,7 @@ add_task(async function test_new_remote_window_flags() {
+
+ // Confusingly, chromeFlags also exist in the content process
+ // as part of the TabChild, so we have to check those too.
+- let b = win.gBrowser.selectedBrowser;
+- let contentChromeFlags = await ContentTask.spawn(b, null, async function() {
+- // Content scripts provide docShell as a global.
+- /* global docShell */
+- docShell.QueryInterface(Ci.nsIInterfaceRequestor);
+- try {
+- // This will throw if we're not a remote browser.
+- return docShell.getInterface(Ci.nsITabChild)
+- .QueryInterface(Ci.nsIWebBrowserChrome)
+- .chromeFlags;
+- } catch (e) {
+- // This must be a non-remote browser...
+- return docShell.QueryInterface(Ci.nsIDocShellTreeItem)
+- .treeOwner
+- .QueryInterface(Ci.nsIWebBrowserChrome)
+- .chromeFlags;
+- }
+- });
+-
++ let contentChromeFlags = await getContentChromeFlags(win);
+ assertContentFlags(contentChromeFlags);
+ Assert.ok(!(contentChromeFlags &
+ Ci.nsIWebBrowserChrome.CHROME_REMOTE_WINDOW),
+@@ -279,3 +290,30 @@ add_task(async function test_new_remote_window_flags() {
+ await BrowserTestUtils.closeWindow(win);
+ });
+ });
++
++/**
++ * Opens a window with some chrome flags specified, which should not affect
++ * scrollbars flag which defaults to true when not disabled explicitly.
++ */
++add_task(async function test_scrollbars_flag() {
++ const SCRIPT = 'window.open("about:blank", "_blank", "toolbar=0");';
++ const SCRIPT_PAGE = `data:text/html,<script>${SCRIPT}</script>`;
++
++ let newWinPromise = BrowserTestUtils.waitForNewWindow();
++ await BrowserTestUtils.withNewTab({
++ gBrowser,
++ url: SCRIPT_PAGE,
++ }, async function(browser) {
++ let win = await newWinPromise;
++
++ let parentChromeFlags = getParentChromeFlags(win);
++ Assert.ok(parentChromeFlags & Ci.nsIWebBrowserChrome.CHROME_SCROLLBARS,
++ "Should have scrollbars when not disabled explicitly");
++
++ let contentChromeFlags = await getContentChromeFlags(win);
++ Assert.ok(contentChromeFlags & Ci.nsIWebBrowserChrome.CHROME_SCROLLBARS,
++ "Should have scrollbars when not disabled explicitly");
++
++ await BrowserTestUtils.closeWindow(win);
++ });
++});
Copied: branches/2018Q2/www/waterfox/files/patch-bug1458270 (from r469813, head/www/waterfox/files/patch-bug1458270)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/2018Q2/www/waterfox/files/patch-bug1458270 Sun May 13 20:00:40 2018 (r469814, copy of r469813, head/www/waterfox/files/patch-bug1458270)
@@ -0,0 +1,125 @@
+commit df3a104363d4
+Author: David Major <dmajor at mozilla.com>
+Date: Tue May 8 17:37:25 2018 -0400
+
+ Bug 1458270 - Clean up in the shutdown observer. r=milan, a=RyanVM
+
+ --HG--
+ extra : source : 74cb61ae46eec86a761dfd8b245dff06bbf14634
+---
+ widget/GfxInfoBase.cpp | 8 ++++++--
+ widget/GfxInfoX11.cpp | 8 ++++++--
+ widget/android/GfxInfo.cpp | 4 ++++
+ widget/cocoa/GfxInfo.mm | 4 ++++
+ widget/uikit/GfxInfo.cpp | 4 ++++
+ widget/windows/GfxInfo.cpp | 4 ++++
+ 6 files changed, 28 insertions(+), 4 deletions(-)
+
+diff --git widget/GfxInfoBase.cpp widget/GfxInfoBase.cpp
+index 560a49e4d237b..d407acb3e611b 100644
+--- widget/GfxInfoBase.cpp
++++ widget/GfxInfoBase.cpp
+@@ -65,11 +65,15 @@ public:
+ delete GfxInfoBase::mFeatureStatus;
+ GfxInfoBase::mFeatureStatus = nullptr;
+
+- for (uint32_t i = 0; i < DeviceFamilyMax; i++)
++ for (uint32_t i = 0; i < DeviceFamilyMax; i++) {
+ delete GfxDriverInfo::mDeviceFamilies[i];
++ GfxDriverInfo::mDeviceFamilies[i] = nullptr;
++ }
+
+- for (uint32_t i = 0; i < DeviceVendorMax; i++)
++ for (uint32_t i = 0; i < DeviceVendorMax; i++) {
+ delete GfxDriverInfo::mDeviceVendors[i];
++ GfxDriverInfo::mDeviceVendors[i] = nullptr;
++ }
+
+ GfxInfoBase::mShutdownOccurred = true;
+
+diff --git widget/GfxInfoX11.cpp widget/GfxInfoX11.cpp
+index 098f82d2976d2..6d48a88c57c5f 100644
+--- widget/GfxInfoX11.cpp
++++ widget/GfxInfoX11.cpp
+@@ -275,8 +275,6 @@ GfxInfo::GetFeatureStatusImpl(int32_t aFeature,
+ OperatingSystem* aOS /* = nullptr */)
+
+ {
+- GetData();
+-
+ NS_ENSURE_ARG_POINTER(aStatus);
+ *aStatus = nsIGfxInfo::FEATURE_STATUS_UNKNOWN;
+ aSuggestedDriverVersion.SetIsVoid(true);
+@@ -284,6 +282,12 @@ GfxInfo::GetFeatureStatusImpl(int32_t aFeature,
+ if (aOS)
+ *aOS = os;
+
++ if (mShutdownOccurred) {
++ return NS_OK;
++ }
++
++ GetData();
++
+ if (mGLMajorVersion == 1) {
+ // We're on OpenGL 1. In most cases that indicates really old hardware.
+ // We better block them, rather than rely on them to fail gracefully, because they don't!
+diff --git widget/android/GfxInfo.cpp widget/android/GfxInfo.cpp
+index 13d097e380c1a..4fc2c0919447c 100644
+--- widget/android/GfxInfo.cpp
++++ widget/android/GfxInfo.cpp
+@@ -392,6 +392,10 @@ GfxInfo::GetFeatureStatusImpl(int32_t aFeature,
+ if (aOS)
+ *aOS = os;
+
++ if (mShutdownOccurred) {
++ return NS_OK;
++ }
++
+ // OpenGL layers are never blacklisted on Android.
+ // This early return is so we avoid potentially slow
+ // GLStrings initialization on startup when we initialize GL layers.
+diff --git widget/cocoa/GfxInfo.mm widget/cocoa/GfxInfo.mm
+index f0cc36a18847d..bf6092488beab 100644
+--- widget/cocoa/GfxInfo.mm
++++ widget/cocoa/GfxInfo.mm
+@@ -338,6 +338,10 @@ GfxInfo::GetFeatureStatusImpl(int32_t aFeature,
+ if (aOS)
+ *aOS = os;
+
++ if (mShutdownOccurred) {
++ return NS_OK;
++ }
++
+ // Don't evaluate special cases when we're evaluating the downloaded blocklist.
+ if (!aDriverInfo.Length()) {
+ if (aFeature == nsIGfxInfo::FEATURE_WEBGL_MSAA) {
+diff --git widget/uikit/GfxInfo.cpp widget/uikit/GfxInfo.cpp
+index 2aea3b5eaba0d..cabe993dd06f1 100644
+--- widget/uikit/GfxInfo.cpp
++++ widget/uikit/GfxInfo.cpp
+@@ -175,6 +175,10 @@ GfxInfo::GetFeatureStatusImpl(int32_t aFeature,
+ if (aOS)
+ *aOS = OperatingSystem::Ios;
+
++ if (mShutdownOccurred) {
++ return NS_OK;
++ }
++
+ // OpenGL layers are never blacklisted on iOS.
+ // This early return is so we avoid potentially slow
+ // GLStrings initialization on startup when we initialize GL layers.
+diff --git widget/windows/GfxInfo.cpp widget/windows/GfxInfo.cpp
+index dd2798803449f..409c428b493f7 100644
+--- widget/windows/GfxInfo.cpp
++++ widget/windows/GfxInfo.cpp
+@@ -1453,6 +1453,10 @@ GfxInfo::GetFeatureStatusImpl(int32_t aFeature,
+ if (aOS)
+ *aOS = os;
+
++ if (mShutdownOccurred) {
++ return NS_OK;
++ }
++
+ // Don't evaluate special cases if we're checking the downloaded blocklist.
+ if (!aDriverInfo.Length()) {
+ nsAutoString adapterVendorID;
Modified: branches/2018Q2/www/waterfox/files/patch-bug847568
==============================================================================
--- branches/2018Q2/www/waterfox/files/patch-bug847568 Sun May 13 19:59:12 2018 (r469813)
+++ branches/2018Q2/www/waterfox/files/patch-bug847568 Sun May 13 20:00:40 2018 (r469814)
@@ -120,28 +120,28 @@ diff --git gfx/skia/generate_mozbuild.py gfx/skia/gene
index e06ae3457a47..93faa61594a3 100755
--- gfx/skia/generate_mozbuild.py
+++ gfx/skia/generate_mozbuild.py
-@@ -143,6 +143,9 @@ if CONFIG['CLANG_CXX'] or CONFIG['CLANG_CL']:
+@@ -148,6 +148,9 @@ if CONFIG['CC_TYPE'] in ('clang', 'clang-cl'):
'-Wno-unused-private-field',
]
+if CONFIG['MOZ_SYSTEM_HARFBUZZ']:
+ CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS']
+
- if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk2', 'gtk3', 'android'):
+ if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk3', 'android'):
CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS']
CXXFLAGS += CONFIG['CAIRO_FT_CFLAGS']
diff --git gfx/skia/moz.build gfx/skia/moz.build
index 2118677ca3a8..e4978b413784 100644
--- gfx/skia/moz.build
+++ gfx/skia/moz.build
-@@ -753,6 +753,9 @@ if CONFIG['CLANG_CXX'] or CONFIG['CLANG_CL']:
+@@ -822,6 +822,9 @@ if CONFIG['CC_TYPE'] in ('clang', 'clang-cl'):
'-Wno-unused-private-field',
]
+if CONFIG['MOZ_SYSTEM_HARFBUZZ']:
+ CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS']
+
- if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk2', 'gtk3', 'android'):
+ if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk3', 'android'):
CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS']
CXXFLAGS += CONFIG['CAIRO_FT_CFLAGS']
diff --git gfx/thebes/moz.build gfx/thebes/moz.build
More information about the svn-ports-all
mailing list