diff options
author | Jan Beich <jbeich@FreeBSD.org> | 2018-05-13 19:59:12 +0000 |
---|---|---|
committer | Jan Beich <jbeich@FreeBSD.org> | 2018-05-13 19:59:12 +0000 |
commit | 0a2dc94d6598664b899b10e9cbfb8d2ba32c6dfd (patch) | |
tree | 71e791932862d174f7564b69fd3d2638783a3e12 | |
parent | devel/racer: update to 2.0.12 (diff) |
www/waterfox: update to 56.1.0.111172
- Apply some FF61 fixes
Changes: https://github.com/MrAlex94/Waterfox/compare/2bb1a86e5dbd6...941b28140102e
Notes
Notes:
svn path=/head/; revision=469813
-rw-r--r-- | www/waterfox/Makefile | 4 | ||||
-rw-r--r-- | www/waterfox/distinfo | 6 | ||||
-rw-r--r-- | www/waterfox/files/patch-bug1224396 | 146 | ||||
-rw-r--r-- | www/waterfox/files/patch-bug1387079 | 42 | ||||
-rw-r--r-- | www/waterfox/files/patch-bug1432323 | 102 | ||||
-rw-r--r-- | www/waterfox/files/patch-bug1436759 | 26 | ||||
-rw-r--r-- | www/waterfox/files/patch-bug1436983 | 52 | ||||
-rw-r--r-- | www/waterfox/files/patch-bug1439444 | 53 | ||||
-rw-r--r-- | www/waterfox/files/patch-bug1439723 | 26 | ||||
-rw-r--r-- | www/waterfox/files/patch-bug1441941 | 252 | ||||
-rw-r--r-- | www/waterfox/files/patch-bug1443110 | 25 | ||||
-rw-r--r-- | www/waterfox/files/patch-bug1454692 | 89 | ||||
-rw-r--r-- | www/waterfox/files/patch-bug1457912 | 169 | ||||
-rw-r--r-- | www/waterfox/files/patch-bug1458270 | 125 | ||||
-rw-r--r-- | www/waterfox/files/patch-bug847568 | 8 |
15 files changed, 587 insertions, 538 deletions
diff --git a/www/waterfox/Makefile b/www/waterfox/Makefile index e254673c34e5..e812f0570f0d 100644 --- a/www/waterfox/Makefile +++ b/www/waterfox/Makefile @@ -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@FreeBSD.org diff --git a/www/waterfox/distinfo b/www/waterfox/distinfo index 7220af0da95b..9225becaf95c 100644 --- a/www/waterfox/distinfo +++ b/www/waterfox/distinfo @@ -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 diff --git a/www/waterfox/files/patch-bug1224396 b/www/waterfox/files/patch-bug1224396 deleted file mode 100644 index 433bf755fb02..000000000000 --- a/www/waterfox/files/patch-bug1224396 +++ /dev/null @@ -1,146 +0,0 @@ -commit 94f55f3a6124 -Author: Lee Salzman <lsalzman@mozilla.com> -Date: Wed Nov 22 12:19:29 2017 -0500 - - Bug 1224396 - Skia path allocation cleanups. r=msreckovic a=gchang - - MozReview-Commit-ID: GAf2vC1Fucv - - --HG-- - extra : source : db4543ce21ce1e8a1c81b685a16e61f71db2f602 ---- - gfx/skia/skia/include/core/SkPathRef.h | 24 ++++++++++++++---------- - gfx/skia/skia/src/core/SkArenaAlloc.cpp | 23 ++++++++++++++++++----- - gfx/skia/skia/src/core/SkArenaAlloc.h | 5 ++++- - 3 files changed, 36 insertions(+), 16 deletions(-) - -diff --git gfx/skia/skia/include/core/SkPathRef.h gfx/skia/skia/include/core/SkPathRef.h -index 5e6fda7d85b2..24870c64fbc0 100644 ---- gfx/skia/skia/include/core/SkPathRef.h -+++ gfx/skia/skia/include/core/SkPathRef.h -@@ -16,7 +16,7 @@ - #include "SkRRect.h" - #include "SkRect.h" - #include "SkRefCnt.h" --#include <stddef.h> // ptrdiff_t -+#include "../private/SkTemplates.h" - - class SkRBuffer; - class SkWBuffer; -@@ -433,31 +433,35 @@ private: - */ - void makeSpace(size_t size) { - SkDEBUGCODE(this->validate();) -- ptrdiff_t growSize = size - fFreeSpace; -- if (growSize <= 0) { -+ if (size <= fFreeSpace) { - return; - } -+ size_t growSize = size - fFreeSpace; - size_t oldSize = this->currSize(); - // round to next multiple of 8 bytes - growSize = (growSize + 7) & ~static_cast<size_t>(7); - // we always at least double the allocation -- if (static_cast<size_t>(growSize) < oldSize) { -+ if (growSize < oldSize) { - growSize = oldSize; - } - if (growSize < kMinSize) { - growSize = kMinSize; - } -- size_t newSize = oldSize + growSize; -+ constexpr size_t maxSize = std::numeric_limits<size_t>::max(); -+ size_t newSize; -+ if (growSize <= maxSize - oldSize) { -+ newSize = oldSize + growSize; -+ } else { -+ SK_ABORT("Path too big."); -+ } - // Note that realloc could memcpy more than we need. It seems to be a win anyway. TODO: - // encapsulate this. - fPoints = reinterpret_cast<SkPoint*>(sk_realloc_throw(fPoints, newSize)); - size_t oldVerbSize = fVerbCnt * sizeof(uint8_t); -- void* newVerbsDst = reinterpret_cast<void*>( -- reinterpret_cast<intptr_t>(fPoints) + newSize - oldVerbSize); -- void* oldVerbsSrc = reinterpret_cast<void*>( -- reinterpret_cast<intptr_t>(fPoints) + oldSize - oldVerbSize); -+ void* newVerbsDst = SkTAddOffset<void>(fPoints, newSize - oldVerbSize); -+ void* oldVerbsSrc = SkTAddOffset<void>(fPoints, oldSize - oldVerbSize); - memmove(newVerbsDst, oldVerbsSrc, oldVerbSize); -- fVerbs = reinterpret_cast<uint8_t*>(reinterpret_cast<intptr_t>(fPoints) + newSize); -+ fVerbs = SkTAddOffset<uint8_t>(fPoints, newSize); - fFreeSpace += growSize; - SkDEBUGCODE(this->validate();) - } -diff --git gfx/skia/skia/src/core/SkArenaAlloc.cpp gfx/skia/skia/src/core/SkArenaAlloc.cpp -index eca3aa97d761..57a19093d065 100644 ---- gfx/skia/skia/src/core/SkArenaAlloc.cpp -+++ gfx/skia/skia/src/core/SkArenaAlloc.cpp -@@ -8,6 +8,7 @@ - #include <algorithm> - #include <cstddef> - #include "SkArenaAlloc.h" -+#include "SkTypes.h" - - static char* end_chain(char*) { return nullptr; } - -@@ -95,19 +96,31 @@ void SkArenaAlloc::ensureSpace(uint32_t size, uint32_t alignment) { - // This must be conservative to add the right amount of extra memory to handle the alignment - // padding. - constexpr uint32_t alignof_max_align_t = 8; -- uint32_t objSizeAndOverhead = size + headerSize + sizeof(Footer); -+ constexpr uint32_t maxSize = std::numeric_limits<uint32_t>::max(); -+ constexpr uint32_t overhead = headerSize + sizeof(Footer); -+ SkASSERT_RELEASE(size <= maxSize - overhead); -+ uint32_t objSizeAndOverhead = size + overhead; - if (alignment > alignof_max_align_t) { -- objSizeAndOverhead += alignment - 1; -+ uint32_t alignmentOverhead = alignment - 1; -+ SkASSERT_RELEASE(objSizeAndOverhead <= maxSize - alignmentOverhead); -+ objSizeAndOverhead += alignmentOverhead; - } - -- uint32_t allocationSize = std::max(objSizeAndOverhead, fExtraSize * fFib0); -- fFib0 += fFib1; -- std::swap(fFib0, fFib1); -+ uint32_t minAllocationSize; -+ if (fExtraSize <= maxSize / fFib0) { -+ minAllocationSize = fExtraSize * fFib0; -+ fFib0 += fFib1; -+ std::swap(fFib0, fFib1); -+ } else { -+ minAllocationSize = maxSize; -+ } -+ uint32_t allocationSize = std::max(objSizeAndOverhead, minAllocationSize); - - // Round up to a nice size. If > 32K align to 4K boundary else up to max_align_t. The > 32K - // heuristic is from the JEMalloc behavior. - { - uint32_t mask = allocationSize > (1 << 15) ? (1 << 12) - 1 : 16 - 1; -+ SkASSERT_RELEASE(allocationSize <= maxSize - mask); - allocationSize = (allocationSize + mask) & ~mask; - } - -diff --git gfx/skia/skia/src/core/SkArenaAlloc.h gfx/skia/skia/src/core/SkArenaAlloc.h -index 494696ce768d..05d3336684e9 100644 ---- gfx/skia/skia/src/core/SkArenaAlloc.h -+++ gfx/skia/skia/src/core/SkArenaAlloc.h -@@ -157,6 +157,7 @@ private: - template <typename T> - char* commonArrayAlloc(uint32_t count) { - char* objStart; -+ SkASSERT_RELEASE(count <= std::numeric_limits<uint32_t>::max() / sizeof(T)); - uint32_t arraySize = SkTo<uint32_t>(count * sizeof(T)); - uint32_t alignment = SkTo<uint32_t>(alignof(T)); - -@@ -164,7 +165,9 @@ private: - objStart = this->allocObject(arraySize, alignment); - fCursor = objStart + arraySize; - } else { -- uint32_t totalSize = arraySize + sizeof(Footer) + sizeof(uint32_t); -+ constexpr uint32_t overhead = sizeof(Footer) + sizeof(uint32_t); -+ SkASSERT_RELEASE(arraySize <= std::numeric_limits<uint32_t>::max() - overhead); -+ uint32_t totalSize = arraySize + overhead; - objStart = this->allocObjectWithFooter(totalSize, alignment); - - // Can never be UB because max value is alignof(T). diff --git a/www/waterfox/files/patch-bug1387079 b/www/waterfox/files/patch-bug1387079 deleted file mode 100644 index cea214cfa082..000000000000 --- a/www/waterfox/files/patch-bug1387079 +++ /dev/null @@ -1,42 +0,0 @@ -commit 8845b3243fcd -Author: Lee Salzman <lsalzman@mozilla.com> -Date: Tue Oct 10 15:49:13 2017 -0400 - - Bug 1387079 - Only use SkRasterPipeline when SkJumper is accelerated. r=jrmuizel, a=ritu - - MozReview-Commit-ID: 13dd2Ap4sob - - --HG-- - extra : source : 32227656b09dfb5d7c5412c799c7081dbc49346c ---- - gfx/skia/skia/src/core/SkBlitter.cpp | 2 ++ - .../mozilla/mozilla-central-reftests/masking/mask-mode-d.html.ini | 4 +++- - 2 files changed, 5 insertions(+), 1 deletion(-) - -diff --git gfx/skia/skia/src/core/SkBlitter.cpp gfx/skia/skia/src/core/SkBlitter.cpp -index 0e8bd2db2249..3a824bb724f7 100644 ---- gfx/skia/skia/src/core/SkBlitter.cpp -+++ gfx/skia/skia/src/core/SkBlitter.cpp -@@ -847,9 +847,11 @@ SkBlitter* SkBlitter::Choose(const SkPixmap& device, - return alloc->make<SkA8_Coverage_Blitter>(device, *paint); - } - -+#if (!defined(SK_JUMPER_USE_ASSEMBLY) || SK_JUMPER_USE_ASSEMBLY) && (defined(__aarch64__) || defined(__arm__) || defined(__x86_64__) || defined(_M_X64)) - if (SkBlitter* blitter = SkCreateRasterPipelineBlitter(device, *paint, matrix, alloc)) { - return blitter; - } -+#endif - - if (nullptr == shader) { - if (mode != SkBlendMode::kSrcOver) { -diff --git testing/web-platform/meta/css/vendor-imports/mozilla/mozilla-central-reftests/masking/mask-mode-d.html.ini testing/web-platform/meta/css/vendor-imports/mozilla/mozilla-central-reftests/masking/mask-mode-d.html.ini -index c1246ddb4127..a02e049c3684 100644 ---- testing/web-platform/meta/css/vendor-imports/mozilla/mozilla-central-reftests/masking/mask-mode-d.html.ini -+++ testing/web-platform/meta/css/vendor-imports/mozilla/mozilla-central-reftests/masking/mask-mode-d.html.ini -@@ -1,3 +1,5 @@ - [mask-mode-d.html] - type: reftest -- expected: FAIL -+ expected: -+ if (processor == "x86") and (bits == 32): PASS -+ FAIL diff --git a/www/waterfox/files/patch-bug1432323 b/www/waterfox/files/patch-bug1432323 new file mode 100644 index 000000000000..3f17cefce092 --- /dev/null +++ b/www/waterfox/files/patch-bug1432323 @@ -0,0 +1,102 @@ +commit 694ff7ca4925 +Author: Eric Rahm <erahm@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; + } diff --git a/www/waterfox/files/patch-bug1436759 b/www/waterfox/files/patch-bug1436759 new file mode 100644 index 000000000000..b3fc7e770608 --- /dev/null +++ b/www/waterfox/files/patch-bug1436759 @@ -0,0 +1,26 @@ +commit a9c9593126c7 +Author: Michael Froman <mfroman@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() { diff --git a/www/waterfox/files/patch-bug1436983 b/www/waterfox/files/patch-bug1436983 new file mode 100644 index 000000000000..ef1f7d18c238 --- /dev/null +++ b/www/waterfox/files/patch-bug1436983 @@ -0,0 +1,52 @@ +commit 7721a472b21b +Author: Jon Coppeard <jcoppeard@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; + diff --git a/www/waterfox/files/patch-bug1439444 b/www/waterfox/files/patch-bug1439444 new file mode 100644 index 000000000000..0589f1b331e1 --- /dev/null +++ b/www/waterfox/files/patch-bug1439444 @@ -0,0 +1,53 @@ +commit e8f515046724 +Author: Christoph Kerschbaumer <ckerschb@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); diff --git a/www/waterfox/files/patch-bug1439723 b/www/waterfox/files/patch-bug1439723 new file mode 100644 index 000000000000..322aca5528bf --- /dev/null +++ b/www/waterfox/files/patch-bug1439723 @@ -0,0 +1,26 @@ +commit 821df39aefc0 +Author: Nathan Froyd <froydnj@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(); + } diff --git a/www/waterfox/files/patch-bug1441941 b/www/waterfox/files/patch-bug1441941 deleted file mode 100644 index 14b1f9ec8e83..000000000000 --- a/www/waterfox/files/patch-bug1441941 +++ /dev/null @@ -1,252 +0,0 @@ -commit e75ef89e7d0f -Author: Lee Salzman <lsalzman@mozilla.com> -Date: Wed Mar 28 00:34:13 2018 -0400 - - Bug 1441941 - Limit allocations in SkTDArray. r=jrmuizel, a=RyanVM ---- - gfx/skia/skia/include/core/SkTypes.h | 6 ++ - gfx/skia/skia/include/private/SkTDArray.h | 8 ++- - gfx/skia/skia/src/core/SkMallocPixelRef.cpp | 13 ++++ - gfx/skia/skia/src/core/SkMath.cpp | 15 ++++ - gfx/skia/skia/src/core/SkSafeMath.h | 106 ++++++++++++++++++++++++++++ - 5 files changed, 145 insertions(+), 3 deletions(-) - -diff --git gfx/skia/skia/include/core/SkTypes.h gfx/skia/skia/include/core/SkTypes.h -index beb2be51432b..ed138f930fd3 100644 ---- gfx/skia/skia/include/core/SkTypes.h -+++ gfx/skia/skia/include/core/SkTypes.h -@@ -235,6 +235,7 @@ template <typename D, typename S> D SkTo(S s) { - #define SK_MaxU32 0xFFFFFFFF - #define SK_MinU32 0 - #define SK_NaN32 ((int) (1U << 31)) -+#define SK_MaxSizeT SIZE_MAX - - /** Returns true if the value can be represented with signed 16bits - */ -diff --git gfx/skia/skia/include/private/SkMalloc.h gfx/skia/skia/include/private/SkMalloc.h -index ee5590063bc8..19d29634bd70 100644 ---- gfx/skia/skia/include/private/SkMalloc.h -+++ gfx/skia/skia/include/private/SkMalloc.h -@@ -46,6 +46,11 @@ SK_API extern void* sk_calloc(size_t size); - */ - SK_API extern void* sk_calloc_throw(size_t size); - -+// Performs a safe multiply count * elemSize, checking for overflow -+SK_API extern void* sk_calloc_throw(size_t count, size_t elemSize); -+SK_API extern void* sk_malloc_throw(size_t count, size_t elemSize); -+SK_API extern void* sk_realloc_throw(void* buffer, size_t count, size_t elemSize); -+ - /** Called internally if we run out of memory. The platform implementation must - not return, but should either throw an exception or otherwise exit. - */ -diff --git gfx/skia/skia/include/private/SkTDArray.h gfx/skia/skia/include/private/SkTDArray.h -index 4c58d478fe63..36986d81e9fe 100644 ---- gfx/skia/skia/include/private/SkTDArray.h -+++ gfx/skia/skia/include/private/SkTDArray.h -@@ -22,7 +22,7 @@ public: - fReserve = fCount = 0; - fArray = NULL; - if (count) { -- fArray = (T*)sk_malloc_throw(count * sizeof(T)); -+ fArray = (T*)sk_malloc_throw(count, sizeof(T)); - memcpy(fArray, src, sizeof(T) * count); - fReserve = fCount = count; - } -@@ -353,7 +353,7 @@ public: - - void shrinkToFit() { - fReserve = fCount; -- fArray = (T*)sk_realloc_throw(fArray, fReserve * sizeof(T)); -+ fArray = (T*)sk_realloc_throw(fArray, fReserve, sizeof(T)); - } - - private: -@@ -366,6 +366,7 @@ private: - * This is the same as calling setCount(count() + delta). - */ - void adjustCount(int delta) { -+ SkASSERT_RELEASE(fCount <= std::numeric_limits<int>::max() - delta); - this->setCount(fCount + delta); - } - -@@ -379,9 +380,10 @@ private: - */ - void resizeStorageToAtLeast(int count) { - SkASSERT(count > fReserve); -+ SkASSERT_RELEASE(count <= std::numeric_limits<int>::max() - std::numeric_limits<int>::max() / 5 - 4); - fReserve = count + 4; - fReserve += fReserve / 4; -- fArray = (T*)sk_realloc_throw(fArray, fReserve * sizeof(T)); -+ fArray = (T*)sk_realloc_throw(fArray, fReserve, sizeof(T)); - } - }; - -diff --git gfx/skia/skia/src/core/SkMallocPixelRef.cpp gfx/skia/skia/src/core/SkMallocPixelRef.cpp -index ed3a97b7e0f5..c2da0ecec8bb 100644 ---- gfx/skia/skia/src/core/SkMallocPixelRef.cpp -+++ gfx/skia/skia/src/core/SkMallocPixelRef.cpp -@@ -8,8 +8,21 @@ - #include "SkMallocPixelRef.h" - #include "SkBitmap.h" - #include "SkReadBuffer.h" -+#include "SkSafeMath.h" - #include "SkWriteBuffer.h" - -+void* sk_calloc_throw(size_t count, size_t elemSize) { -+ return sk_calloc_throw(SkSafeMath::Mul(count, elemSize)); -+} -+ -+void* sk_malloc_throw(size_t count, size_t elemSize) { -+ return sk_malloc_throw(SkSafeMath::Mul(count, elemSize)); -+} -+ -+void* sk_realloc_throw(void* buffer, size_t count, size_t elemSize) { -+ return sk_realloc_throw(buffer, SkSafeMath::Mul(count, elemSize)); -+} -+ - // assumes ptr was allocated via sk_malloc - static void sk_free_releaseproc(void* ptr, void*) { - sk_free(ptr); -diff --git gfx/skia/skia/src/core/SkMath.cpp gfx/skia/skia/src/core/SkMath.cpp -index 6eff790c85c5..2196d6913c9c 100644 ---- gfx/skia/skia/src/core/SkMath.cpp -+++ gfx/skia/skia/src/core/SkMath.cpp -@@ -9,6 +9,7 @@ - #include "SkFixed.h" - #include "SkFloatBits.h" - #include "SkFloatingPoint.h" -+#include "SkSafeMath.h" - #include "SkScalar.h" - - #define sub_shift(zeros, x, n) \ -@@ -84,3 +85,18 @@ float SkScalarSinCos(float radians, float* cosValue) { - } - return sinValue; - } -+ -+/////////////////////////////////////////////////////////////////////////////////////////////////// -+ -+size_t SkSafeMath::Add(size_t x, size_t y) { -+ SkSafeMath tmp; -+ size_t sum = tmp.add(x, y); -+ return tmp.ok() ? sum : SK_MaxSizeT; -+} -+ -+size_t SkSafeMath::Mul(size_t x, size_t y) { -+ SkSafeMath tmp; -+ size_t prod = tmp.mul(x, y); -+ return tmp.ok() ? prod : SK_MaxSizeT; -+} -+ -diff --git gfx/skia/skia/src/core/SkSafeMath.h gfx/skia/skia/src/core/SkSafeMath.h -new file mode 100644 -index 000000000000..0bc0fbfac473 ---- /dev/null -+++ gfx/skia/skia/src/core/SkSafeMath.h -@@ -0,0 +1,106 @@ -+/* -+ * Copyright 2017 Google Inc. -+ * -+ * Use of this source code is governed by a BSD-style license that can be -+ * found in the LICENSE file. -+ */ -+ -+#ifndef SkSafeMath_DEFINED -+#define SkSafeMath_DEFINED -+ -+#include "SkTypes.h" -+ -+// SkSafeMath always check that a series of operations do not overflow. -+// This must be correct for all platforms, because this is a check for safety at runtime. -+ -+class SkSafeMath { -+public: -+ SkSafeMath() = default; -+ -+ bool ok() const { return fOK; } -+ explicit operator bool() const { return fOK; } -+ -+ size_t mul(size_t x, size_t y) { -+ return sizeof(size_t) == sizeof(uint64_t) ? mul64(x, y) : mul32(x, y); -+ } -+ -+ size_t add(size_t x, size_t y) { -+ size_t result = x + y; -+ fOK &= result >= x; -+ return result; -+ } -+ -+ /** -+ * Return a + b, unless this result is an overflow/underflow. In those cases, fOK will -+ * be set to false, and it is undefined what this returns. -+ */ -+ int addInt(int a, int b) { -+ if (b < 0 && a < std::numeric_limits<int>::min() - b) { -+ fOK = false; -+ return a; -+ } else if (b > 0 && a > std::numeric_limits<int>::max() - b) { -+ fOK = false; -+ return a; -+ } -+ return a + b; -+ } -+ -+ size_t alignUp(size_t x, size_t alignment) { -+ SkASSERT(alignment && !(alignment & (alignment - 1))); -+ return add(x, alignment - 1) & ~(alignment - 1); -+ } -+ -+ template <typename T> T castTo(size_t value) { -+ if (!SkTFitsIn<T>(value)) { -+ fOK = false; -+ } -+ return static_cast<T>(value); -+ } -+ -+ // These saturate to their results -+ static size_t Add(size_t x, size_t y); -+ static size_t Mul(size_t x, size_t y); -+ static size_t Align4(size_t x) { -+ SkSafeMath safe; -+ return safe.alignUp(x, 4); -+ } -+ -+private: -+ uint32_t mul32(uint32_t x, uint32_t y) { -+ uint64_t bx = x; -+ uint64_t by = y; -+ uint64_t result = bx * by; -+ fOK &= result >> 32 == 0; -+ return result; -+ } -+ -+ uint64_t mul64(uint64_t x, uint64_t y) { -+ if (x <= std::numeric_limits<uint64_t>::max() >> 32 -+ && y <= std::numeric_limits<uint64_t>::max() >> 32) { -+ return x * y; -+ } else { -+ auto hi = [](uint64_t x) { return x >> 32; }; -+ auto lo = [](uint64_t x) { return x & 0xFFFFFFFF; }; -+ -+ uint64_t lx_ly = lo(x) * lo(y); -+ uint64_t hx_ly = hi(x) * lo(y); -+ uint64_t lx_hy = lo(x) * hi(y); -+ uint64_t hx_hy = hi(x) * hi(y); -+ uint64_t result = 0; -+ result = this->add(lx_ly, (hx_ly << 32)); -+ result = this->add(result, (lx_hy << 32)); -+ fOK &= (hx_hy + (hx_ly >> 32) + (lx_hy >> 32)) == 0; -+ -+ #if defined(SK_DEBUG) && defined(__clang__) && defined(__x86_64__) -+ auto double_check = (unsigned __int128)x * y; -+ SkASSERT(result == (double_check & 0xFFFFFFFFFFFFFFFF)); -+ SkASSERT(!fOK || (double_check >> 64 == 0)); -+ #endif -+ -+ return result; -+ } -+ } -+ bool fOK = true; -+}; -+ -+#endif//SkSafeMath_DEFINED diff --git a/www/waterfox/files/patch-bug1443110 b/www/waterfox/files/patch-bug1443110 new file mode 100644 index 000000000000..949221521f6a --- /dev/null +++ b/www/waterfox/files/patch-bug1443110 @@ -0,0 +1,25 @@ +commit 425c5a6ff8fc +Author: Christoph Kerschbaumer <ckerschb@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; + } + diff --git a/www/waterfox/files/patch-bug1454692 b/www/waterfox/files/patch-bug1454692 deleted file mode 100644 index b25232580059..000000000000 --- a/www/waterfox/files/patch-bug1454692 +++ /dev/null @@ -1,89 +0,0 @@ -commit 0ce659a05fd3 -Author: Lee Salzman <lsalzman@mozilla.com> -Date: Sun Apr 29 20:10:51 2018 -0400 - - Bug 1454692 - Backport some upstream Skia fixes to ESR52. r=rhunt, a=abillings - - --HG-- - extra : histedit_source : 0fcd64cabe6f54a2286083d6518e4e6451183a19%2C37f5e7f9dbbfc01102631c33b23329d2af5aa71b ---- - gfx/skia/skia/src/core/SkMask.cpp | 7 ++++++- - gfx/skia/skia/src/gpu/GrBufferAllocPool.cpp | 5 +++-- - gfx/skia/skia/src/gpu/batches/GrAAHairLinePathRenderer.cpp | 9 ++++++++- - 3 files changed, 17 insertions(+), 4 deletions(-) - -diff --git gfx/skia/skia/src/core/SkMask.cpp gfx/skia/skia/src/core/SkMask.cpp -index 167d30d166b1..2a74cf4b2463 100644 ---- gfx/skia/skia/src/core/SkMask.cpp -+++ gfx/skia/skia/src/core/SkMask.cpp -@@ -45,7 +45,12 @@ uint8_t* SkMask::AllocImage(size_t size) { - #ifdef TRACK_SKMASK_LIFETIME - SkDebugf("SkMask::AllocImage %d\n", gCounter++); - #endif -- return (uint8_t*)sk_malloc_throw(SkAlign4(size)); -+ size_t aligned_size = std::numeric_limits<size_t>::max(); -+ size_t adjustment = 3; -+ if (size + adjustment > size) { -+ aligned_size = (size + adjustment) & ~adjustment; -+ } -+ return static_cast<uint8_t*>(sk_malloc_throw(aligned_size)); - } - - /** We explicitly use this allocator for SkBimap pixels, so that we can -diff --git gfx/skia/skia/src/gpu/GrBufferAllocPool.cpp gfx/skia/skia/src/gpu/GrBufferAllocPool.cpp -index 38bde0dc9a38..1556d2e27971 100644 ---- gfx/skia/skia/src/gpu/GrBufferAllocPool.cpp -+++ gfx/skia/skia/src/gpu/GrBufferAllocPool.cpp -@@ -14,6 +14,7 @@ - #include "GrResourceProvider.h" - #include "GrTypes.h" - -+#include "SkSafeMath.h" - #include "SkTraceEvent.h" - - #ifdef SK_DEBUG -@@ -335,7 +336,7 @@ void* GrVertexBufferAllocPool::makeSpace(size_t vertexSize, - SkASSERT(startVertex); - - size_t offset SK_INIT_TO_AVOID_WARNING; -- void* ptr = INHERITED::makeSpace(vertexSize * vertexCount, -+ void* ptr = INHERITED::makeSpace(SkSafeMath::Mul(vertexSize, vertexCount), - vertexSize, - buffer, - &offset); -@@ -360,7 +361,7 @@ void* GrIndexBufferAllocPool::makeSpace(int indexCount, - SkASSERT(startIndex); - - size_t offset SK_INIT_TO_AVOID_WARNING; -- void* ptr = INHERITED::makeSpace(indexCount * sizeof(uint16_t), -+ void* ptr = INHERITED::makeSpace(SkSafeMath::Mul(indexCount, sizeof(uint16_t)), - sizeof(uint16_t), - buffer, - &offset); -diff --git gfx/skia/skia/src/gpu/ops/GrAAHairLinePathRenderer.cpp gfx/skia/skia/src/gpu/ops/GrAAHairLinePathRenderer.cpp -index 274e30846571..3879fe3fcbba 100644 ---- gfx/skia/skia/src/gpu/ops/GrAAHairLinePathRenderer.cpp -+++ gfx/skia/skia/src/gpu/ops/GrAAHairLinePathRenderer.cpp -@@ -823,6 +823,13 @@ void AAHairlineOp::onPrepareDraws(Target* target) const { - - int lineCount = lines.count() / 2; - int conicCount = conics.count() / 3; -+ int quadAndConicCount = conicCount + quadCount; -+ -+ static constexpr int kMaxLines = SK_MaxS32 / kLineSegNumVertices; -+ static constexpr int kMaxQuadsAndConics = SK_MaxS32 / kQuadNumVertices; -+ if (lineCount > kMaxLines || quadAndConicCount > kMaxQuadsAndConics) { -+ return; -+ } - - // do lines first - if (lineCount) { -@@ -893,7 +900,7 @@ void AAHairlineOp::onPrepareDraws(Target* target) const { - ref_quads_index_buffer(target->resourceProvider())); - - size_t vertexStride = sizeof(BezierVertex); -- int vertexCount = kQuadNumVertices * quadCount + kQuadNumVertices * conicCount; -+ int vertexCount = kQuadNumVertices * quadAndConicCount; - void *vertices = target->makeVertexSpace(vertexStride, vertexCount, - &vertexBuffer, &firstVertex); - diff --git a/www/waterfox/files/patch-bug1457912 b/www/waterfox/files/patch-bug1457912 new file mode 100644 index 000000000000..8c6c39491eea --- /dev/null +++ b/www/waterfox/files/patch-bug1457912 @@ -0,0 +1,169 @@ +commit 695328ac742d +Author: Xidorn Quan <me@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); ++ }); ++}); diff --git a/www/waterfox/files/patch-bug1458270 b/www/waterfox/files/patch-bug1458270 new file mode 100644 index 000000000000..cefcf33c8a35 --- /dev/null +++ b/www/waterfox/files/patch-bug1458270 @@ -0,0 +1,125 @@ +commit df3a104363d4 +Author: David Major <dmajor@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; diff --git a/www/waterfox/files/patch-bug847568 b/www/waterfox/files/patch-bug847568 index c2c40cc26b26..da3f3d6b4c08 100644 --- a/www/waterfox/files/patch-bug847568 +++ b/www/waterfox/files/patch-bug847568 @@ -120,28 +120,28 @@ diff --git gfx/skia/generate_mozbuild.py gfx/skia/generate_mozbuild.py 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 |