Date: Thu, 15 Feb 2018 00:59:55 +0000 (UTC) From: Jan Beich <jbeich@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r461852 - in head/www/waterfox: . files Message-ID: <201802150059.w1F0xts1043277@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jbeich Date: Thu Feb 15 00:59:54 2018 New Revision: 461852 URL: https://svnweb.freebsd.org/changeset/ports/461852 Log: www/waterfox: apply FF59 fixes Added: head/www/waterfox/files/patch-bug1324042 (contents, props changed) head/www/waterfox/files/patch-bug1379148 (contents, props changed) head/www/waterfox/files/patch-bug1397686 (contents, props changed) head/www/waterfox/files/patch-bug1399091 (contents, props changed) head/www/waterfox/files/patch-bug1399177 (contents, props changed) head/www/waterfox/files/patch-bug1401256 (contents, props changed) head/www/waterfox/files/patch-bug1401726 (contents, props changed) head/www/waterfox/files/patch-bug1401878 (contents, props changed) head/www/waterfox/files/patch-bug1416307 (contents, props changed) head/www/waterfox/files/patch-bug1416529 (contents, props changed) head/www/waterfox/files/patch-bug1419508 (contents, props changed) head/www/waterfox/files/patch-bug1425257 (contents, props changed) head/www/waterfox/files/patch-bug1435320 (contents, props changed) head/www/waterfox/files/patch-bug1435530 (contents, props changed) head/www/waterfox/files/patch-z-bug1436267 (contents, props changed) Modified: head/www/waterfox/Makefile (contents, props changed) Modified: head/www/waterfox/Makefile ============================================================================== --- head/www/waterfox/Makefile Thu Feb 15 00:59:35 2018 (r461851) +++ head/www/waterfox/Makefile Thu Feb 15 00:59:54 2018 (r461852) @@ -2,7 +2,7 @@ PORTNAME= waterfox DISTVERSION= 56.0.4 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= www ipv6 MAINTAINER= jbeich@FreeBSD.org Added: head/www/waterfox/files/patch-bug1324042 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/www/waterfox/files/patch-bug1324042 Thu Feb 15 00:59:54 2018 (r461852) @@ -0,0 +1,33 @@ +commit ac0f7d653b1e +Author: Daniel Holbert <dholbert@cs.stanford.edu> +Date: Sat Feb 10 08:46:49 2018 -0800 + + Bug 1324042: Fix trimmedOffsets arithmetic in GetRenderedText(). r=mats a=abillings + + MozReview-Commit-ID: H4ngU8Juyln + + --HG-- + extra : source : fbf54020043bd09c162530907b2a1091a10f4f92 +--- + layout/generic/nsTextFrame.cpp | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git layout/generic/nsTextFrame.cpp layout/generic/nsTextFrame.cpp +index 42891e960eea..f8b49e4d07cf 100644 +--- layout/generic/nsTextFrame.cpp ++++ layout/generic/nsTextFrame.cpp +@@ -10116,9 +10116,13 @@ nsTextFrame::GetRenderedText(uint32_t aStartOffset, + startOffset = aStartOffset; + endOffset = std::min<uint32_t>(INT32_MAX, aEndOffset); + } ++ ++ // If startOffset and/or endOffset are inside of trimmedOffsets' range, ++ // then clamp the edges of trimmedOffsets accordingly. ++ int32_t origTrimmedOffsetsEnd = trimmedOffsets.GetEnd(); + trimmedOffsets.mStart = std::max<uint32_t>(trimmedOffsets.mStart, + startOffset); +- trimmedOffsets.mLength = std::min<uint32_t>(trimmedOffsets.GetEnd(), ++ trimmedOffsets.mLength = std::min<uint32_t>(origTrimmedOffsetsEnd, + endOffset) - trimmedOffsets.mStart; + if (trimmedOffsets.mLength <= 0) { + offsetInRenderedString = nextOffsetInRenderedString; Added: head/www/waterfox/files/patch-bug1379148 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/www/waterfox/files/patch-bug1379148 Thu Feb 15 00:59:54 2018 (r461852) @@ -0,0 +1,366 @@ +commit 708a5eba5908 +Author: Kris Maglione <maglione.k@gmail.com> +Date: Wed Sep 20 16:12:27 2017 -0700 + + Bug 1379148 - Part 1: Allow blocking only non-script-created parsers. r=hsivonen, a=sledru + + MozReview-Commit-ID: 8cGxywiUzWj + + --HG-- + extra : source : bee57767629862c4b4bfa6258918551ed7d82998 +--- + dom/base/nsDocument.cpp | 10 ++++++---- + dom/base/nsIDocument.h | 1 + + dom/webidl/Document.webidl | 11 ++++++++++- + 3 files changed, 17 insertions(+), 5 deletions(-) + +diff --git dom/base/nsDocument.cpp dom/base/nsDocument.cpp +index 086b386d35f0..d7d1428966f1 100644 +--- dom/base/nsDocument.cpp ++++ dom/base/nsDocument.cpp +@@ -10919,11 +10919,12 @@ public: + NS_DECL_CYCLE_COLLECTING_ISUPPORTS + NS_DECL_CYCLE_COLLECTION_CLASS(UnblockParsingPromiseHandler) + +- explicit UnblockParsingPromiseHandler(nsIDocument* aDocument, Promise* aPromise) ++ explicit UnblockParsingPromiseHandler(nsIDocument* aDocument, Promise* aPromise, ++ const BlockParsingOptions& aOptions) + : mPromise(aPromise) + { + nsCOMPtr<nsIParser> parser = aDocument->CreatorParserOrNull(); +- if (parser) { ++ if (parser && (aOptions.mBlockScriptCreated || !parser->IsScriptCreated())) { + parser->BlockParser(); + mParser = do_GetWeakReference(parser); + mDocument = aDocument; +@@ -10986,14 +10987,15 @@ NS_IMPL_CYCLE_COLLECTING_ADDREF(UnblockParsingPromiseHandler) + NS_IMPL_CYCLE_COLLECTING_RELEASE(UnblockParsingPromiseHandler) + + already_AddRefed<Promise> +-nsIDocument::BlockParsing(Promise& aPromise, ErrorResult& aRv) ++nsIDocument::BlockParsing(Promise& aPromise, const BlockParsingOptions& aOptions, ErrorResult& aRv) + { + RefPtr<Promise> resultPromise = Promise::Create(aPromise.GetParentObject(), aRv); + if (aRv.Failed()) { + return nullptr; + } + +- RefPtr<PromiseNativeHandler> promiseHandler = new UnblockParsingPromiseHandler(this, resultPromise); ++ RefPtr<PromiseNativeHandler> promiseHandler = new UnblockParsingPromiseHandler(this, resultPromise, ++ aOptions); + aPromise.AppendNativeHandler(promiseHandler); + + return resultPromise.forget(); +diff --git dom/base/nsIDocument.h dom/base/nsIDocument.h +index 2f287ae2ccb7..512de896fddf 100644 +--- dom/base/nsIDocument.h ++++ dom/base/nsIDocument.h +@@ -2952,6 +2952,7 @@ public: + void ObsoleteSheet(const nsAString& aSheetURI, mozilla::ErrorResult& rv); + + already_AddRefed<mozilla::dom::Promise> BlockParsing(mozilla::dom::Promise& aPromise, ++ const mozilla::dom::BlockParsingOptions& aOptions, + mozilla::ErrorResult& aRv); + + already_AddRefed<nsIURI> GetMozDocumentURIIfNotForErrorPages(); +diff --git dom/webidl/Document.webidl dom/webidl/Document.webidl +index 8a629502a6ce..f83874fa7315 100644 +--- dom/webidl/Document.webidl ++++ dom/webidl/Document.webidl +@@ -385,13 +385,22 @@ partial interface Document { + + // Blocks the initial document parser until the given promise is settled. + [ChromeOnly, Throws] +- Promise<any> blockParsing(Promise<any> promise); ++ Promise<any> blockParsing(Promise<any> promise, ++ optional BlockParsingOptions options); + + // like documentURI, except that for error pages, it returns the URI we were + // trying to load when we hit an error, rather than the error page's own URI. + [ChromeOnly] readonly attribute URI? mozDocumentURIIfNotForErrorPages; + }; + ++dictionary BlockParsingOptions { ++ /** ++ * If true, blocks script-created parsers (created via document.open()) in ++ * addition to network-created parsers. ++ */ ++ boolean blockScriptCreated = true; ++}; ++ + // Extension to give chrome JS the ability to determine when a document was + // created to satisfy an iframe with srcdoc attribute. + partial interface Document { + +commit 0947c7c07361 +Author: Kris Maglione <maglione.k@gmail.com> +Date: Wed Sep 20 16:13:03 2017 -0700 + + Bug 1379148 - Part 2: Don't block script-created parsers when executing content scripts. r=mixedpuppy, a=sledru + + MozReview-Commit-ID: GsqsaOVob4B + + --HG-- + extra : source : ba22a83959a06a457c8a22d0cd9521eaed220bac +--- + toolkit/components/extensions/ExtensionContent.jsm | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git toolkit/components/extensions/ExtensionContent.jsm toolkit/components/extensions/ExtensionContent.jsm +index 3429ae14daff..c05a00e95398 100644 +--- toolkit/components/extensions/ExtensionContent.jsm ++++ toolkit/components/extensions/ExtensionContent.jsm +@@ -324,7 +324,7 @@ class Script { + // until the scripts have been loaded. + let {document} = context.contentWindow; + if (this.runAt === "document_start" && document.readyState !== "complete") { +- document.blockParsing(scriptsPromise); ++ document.blockParsing(scriptsPromise, {blockScriptCreated: false}); + } + + let scripts = await scriptsPromise; + +commit 5f856a2ba599 +Author: Kris Maglione <maglione.k@gmail.com> +Date: Wed Sep 20 17:00:44 2017 -0700 + + Bug 1379148 - Part 3: Inject scripts synchronously if they're already available. r=mixedpuppy, a=sledru + + MozReview-Commit-ID: J6vheuxsqJR + + --HG-- + extra : source : 14ab0648ea9194b7ad84ecf7a330c9bbdadfb303 +--- + toolkit/components/extensions/ExtensionContent.jsm | 36 ++++++++++++++++------ + toolkit/components/extensions/ExtensionUtils.jsm | 12 +++++--- + 2 files changed, 34 insertions(+), 14 deletions(-) + +diff --git toolkit/components/extensions/ExtensionContent.jsm toolkit/components/extensions/ExtensionContent.jsm +index c05a00e95398..9af6870a829b 100644 +--- toolkit/components/extensions/ExtensionContent.jsm ++++ toolkit/components/extensions/ExtensionContent.jsm +@@ -137,8 +137,16 @@ class CacheMap extends DefaultMap { + + class ScriptCache extends CacheMap { + constructor(options) { +- super(SCRIPT_EXPIRY_TIMEOUT_MS, +- url => ChromeUtils.compileScript(url, options)); ++ super(SCRIPT_EXPIRY_TIMEOUT_MS); ++ this.options = options; ++ } ++ ++ defaultConstructor(url) { ++ let promise = ChromeUtils.compileScript(url, this.options); ++ promise.then(script => { ++ promise.script = script; ++ }); ++ return promise; + } + } + +@@ -317,17 +325,25 @@ class Script { + } + } + +- let scriptsPromise = Promise.all(this.compileScripts()); ++ let scriptPromises = this.compileScripts(); ++ ++ let scripts = scriptPromises.map(promise => promise.script); ++ // If not all scripts are already available in the cache, block ++ // parsing and wait all promises to resolve. ++ if (!scripts.every(script => script)) { ++ let promise = Promise.all(scriptPromises); ++ ++ // If we're supposed to inject at the start of the document load, ++ // and we haven't already missed that point, block further parsing ++ // until the scripts have been loaded. ++ let {document} = context.contentWindow; ++ if (this.runAt === "document_start" && document.readyState !== "complete") { ++ document.blockParsing(promise, {blockScriptCreated: false}); ++ } + +- // If we're supposed to inject at the start of the document load, +- // and we haven't already missed that point, block further parsing +- // until the scripts have been loaded. +- let {document} = context.contentWindow; +- if (this.runAt === "document_start" && document.readyState !== "complete") { +- document.blockParsing(scriptsPromise, {blockScriptCreated: false}); ++ scripts = await promise; + } + +- let scripts = await scriptsPromise; + let result; + + // The evaluations below may throw, in which case the promise will be +diff --git toolkit/components/extensions/ExtensionUtils.jsm toolkit/components/extensions/ExtensionUtils.jsm +index a3ed895de6df..4a5fcb19c58d 100644 +--- toolkit/components/extensions/ExtensionUtils.jsm ++++ toolkit/components/extensions/ExtensionUtils.jsm +@@ -67,9 +67,11 @@ function instanceOf(value, type) { + * constructor if one is not present. + */ + class DefaultWeakMap extends WeakMap { +- constructor(defaultConstructor, init) { ++ constructor(defaultConstructor = undefined, init = undefined) { + super(init); +- this.defaultConstructor = defaultConstructor; ++ if (defaultConstructor) { ++ this.defaultConstructor = defaultConstructor; ++ } + } + + get(key) { +@@ -83,9 +85,11 @@ class DefaultWeakMap extends WeakMap { + } + + class DefaultMap extends Map { +- constructor(defaultConstructor, init) { ++ constructor(defaultConstructor = undefined, init = undefined) { + super(init); +- this.defaultConstructor = defaultConstructor; ++ if (defaultConstructor) { ++ this.defaultConstructor = defaultConstructor; ++ } + } + + get(key) { + +commit 3ab96ab42d99 +Author: Kris Maglione <maglione.k@gmail.com> +Date: Wed Sep 20 17:01:33 2017 -0700 + + Bug 1379148 - Part 4: Add tests for document.write() with document_start content script present. r=mixedpuppy, a=sledru + + MozReview-Commit-ID: 5yxgpur1tvf + + --HG-- + extra : source : 14298b92236cfcfdd0b9dc43d8077e576f775b4d +--- + .../extensions/ExtensionXPCShellUtils.jsm | 5 +++ + .../test/xpcshell/data/file_document_write.html | 35 ++++++++++++++++ + .../test_ext_contentscript_scriptCreated.js | 49 ++++++++++++++++++++++ + .../extensions/test/xpcshell/xpcshell-content.ini | 1 + + 4 files changed, 90 insertions(+) + +diff --git toolkit/components/extensions/ExtensionXPCShellUtils.jsm toolkit/components/extensions/ExtensionXPCShellUtils.jsm +index d16003d79944..3420ce175d8a 100644 +--- toolkit/components/extensions/ExtensionXPCShellUtils.jsm ++++ toolkit/components/extensions/ExtensionXPCShellUtils.jsm +@@ -59,6 +59,11 @@ function frameScript() { + Components.utils.import("resource://gre/modules/Services.jsm"); + + Services.obs.notifyObservers(this, "tab-content-frameloader-created"); ++ ++ // eslint-disable-next-line mozilla/balanced-listeners ++ addEventListener("MozHeapMinimize", () => { ++ Services.obs.notifyObservers(null, "memory-pressure", "heap-minimize"); ++ }, true, true); + } + + const FRAME_SCRIPT = `data:text/javascript,(${encodeURI(frameScript)}).call(this)`; +diff --git toolkit/components/extensions/test/xpcshell/data/file_document_write.html toolkit/components/extensions/test/xpcshell/data/file_document_write.html +new file mode 100644 +index 000000000000..fbae3d6d763a +--- /dev/null ++++ toolkit/components/extensions/test/xpcshell/data/file_document_write.html +@@ -0,0 +1,35 @@ ++<!DOCTYPE HTML> ++<html> ++<head> ++<meta charset="utf-8"> ++</head> ++<body> ++ <iframe id="iframe"></iframe> ++ ++ <script type="text/javascript"> ++ "use strict"; ++ addEventListener("load", () => { ++ // Send a heap-minimize observer notification so our script cache is ++ // cleared, and our content script isn't available for synchronous ++ // insertion. ++ window.dispatchEvent(new CustomEvent("MozHeapMinimize")); ++ ++ let iframe = document.getElementById("iframe"); ++ let doc = iframe.contentDocument; ++ doc.open("text/html"); ++ // We need to do two writes here. The first creates the document element, ++ // which normally triggers parser blocking. The second triggers the ++ // creation of the element we're about to query for, which would normally ++ // happen asynchronously if the parser were blocked. ++ doc.write("<div id=meh>"); ++ doc.write("<div id=beer></div>"); ++ ++ let elem = doc.getElementById("beer"); ++ top.postMessage(elem instanceof HTMLDivElement ? "ok" : "fail", ++ "*"); ++ ++ doc.close(); ++ }, {once: true}); ++ </script> ++</body> ++</html> +diff --git toolkit/components/extensions/test/xpcshell/test_ext_contentscript_scriptCreated.js toolkit/components/extensions/test/xpcshell/test_ext_contentscript_scriptCreated.js +new file mode 100644 +index 000000000000..00407b914015 +--- /dev/null ++++ toolkit/components/extensions/test/xpcshell/test_ext_contentscript_scriptCreated.js +@@ -0,0 +1,49 @@ ++"use strict"; ++ ++const server = createHttpServer(); ++server.registerDirectory("/data/", do_get_file("data")); ++ ++const BASE_URL = `http://localhost:${server.identity.primaryPort}/data`; ++ ++// ExtensionContent.jsm needs to know when it's running from xpcshell, ++// to use the right timeout for content scripts executed at document_idle. ++ExtensionTestUtils.mockAppInfo(); ++ ++// Test that document_start content scripts don't block script-created ++// parsers. ++add_task(async function test_contentscript_scriptCreated() { ++ let extensionData = { ++ manifest: { ++ content_scripts: [{ ++ "matches": ["http://*/*/file_document_write.html"], ++ "js": ["content_script.js"], ++ "run_at": "document_start", ++ "match_about_blank": true, ++ "all_frames": true, ++ }], ++ }, ++ ++ files: { ++ "content_script.js": function() { ++ if (window === top) { ++ addEventListener("message", msg => { ++ browser.test.assertEq("ok", msg.data, "document.write() succeeded"); ++ browser.test.sendMessage("content-script-done"); ++ }, {once: true}); ++ } ++ }, ++ }, ++ }; ++ ++ let extension = ExtensionTestUtils.loadExtension(extensionData); ++ ++ await extension.startup(); ++ ++ let contentPage = await ExtensionTestUtils.loadContentPage(`${BASE_URL}/file_document_write.html`); ++ ++ await extension.awaitMessage("content-script-done"); ++ ++ await contentPage.close(); ++ ++ await extension.unload(); ++}); +diff --git toolkit/components/extensions/test/xpcshell/xpcshell-content.ini toolkit/components/extensions/test/xpcshell/xpcshell-content.ini +index e34ec0717691..65814ff5da97 100644 +--- toolkit/components/extensions/test/xpcshell/xpcshell-content.ini ++++ toolkit/components/extensions/test/xpcshell/xpcshell-content.ini +@@ -2,4 +2,5 @@ + skip-if = os == "android" || (os == "win" && debug) + [test_ext_i18n_css.js] + [test_ext_contentscript.js] ++[test_ext_contentscript_scriptCreated.js] + [test_ext_contentscript_xrays.js] Added: head/www/waterfox/files/patch-bug1397686 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/www/waterfox/files/patch-bug1397686 Thu Feb 15 00:59:54 2018 (r461852) @@ -0,0 +1,69 @@ +commit 21d6d91c77f1 +Author: Dragana Damjanovic <dd.mozilla@gmail.com> +Date: Fri Sep 22 09:09:57 2017 +0200 + + Bug 1397686 - The streams that cannot do 0RTT data need to be put in list and added to mReadyForWrite when 0RTT is done. r=hurley, a=sledru + + --HG-- + extra : source : 5cf7391a9825fda34241f6d7974940f8460804fd +--- + netwerk/protocol/http/Http2Session.cpp | 15 +++++++++++++++ + netwerk/protocol/http/Http2Session.h | 3 +++ + 2 files changed, 18 insertions(+) + +diff --git netwerk/protocol/http/Http2Session.cpp netwerk/protocol/http/Http2Session.cpp +index 42dd829dc73d..c652189a0e16 100644 +--- netwerk/protocol/http/Http2Session.cpp ++++ netwerk/protocol/http/Http2Session.cpp +@@ -2769,6 +2769,9 @@ Http2Session::ReadSegmentsAgain(nsAHttpSegmentReader *reader, + this, stream, stream->StreamID())); + FlushOutputQueue(); + SetWriteCallbacks(); ++ if (!mCannotDo0RTTStreams.Contains(stream)) { ++ mCannotDo0RTTStreams.AppendElement(stream); ++ } + // We can still send our preamble + *countRead = mOutputQueueUsed - mOutputQueueSent; + return *countRead ? NS_OK : NS_BASE_STREAM_WOULD_BLOCK; +@@ -3393,15 +3396,27 @@ Http2Session::Finish0RTT(bool aRestart, bool aAlpnChanged) + // This is the easy case - early data failed, but we're speaking h2, so + // we just need to rewind to the beginning of the preamble and try again. + mOutputQueueSent = 0; ++ ++ for (size_t i = 0; i < mCannotDo0RTTStreams.Length(); ++i) { ++ if (mCannotDo0RTTStreams[i] && VerifyStream(mCannotDo0RTTStreams[i])) { ++ TransactionHasDataToWrite(mCannotDo0RTTStreams[i]); ++ } ++ } + } + } else { + // 0RTT succeeded ++ for (size_t i = 0; i < mCannotDo0RTTStreams.Length(); ++i) { ++ if (mCannotDo0RTTStreams[i] && VerifyStream(mCannotDo0RTTStreams[i])) { ++ TransactionHasDataToWrite(mCannotDo0RTTStreams[i]); ++ } ++ } + // Make sure we look for any incoming data in repsonse to our early data. + Unused << ResumeRecv(); + } + + mAttemptingEarlyData = false; + m0RTTStreams.Clear(); ++ mCannotDo0RTTStreams.Clear(); + RealignOutputQueue(); + + return NS_OK; +diff --git netwerk/protocol/http/Http2Session.h netwerk/protocol/http/Http2Session.h +index 87c4e8b9fcb9..4fdc175ab166 100644 +--- netwerk/protocol/http/Http2Session.h ++++ netwerk/protocol/http/Http2Session.h +@@ -529,6 +529,9 @@ private: + bool mAttemptingEarlyData; + // The ID(s) of the stream(s) that we are getting 0RTT data from. + nsTArray<WeakPtr<Http2Stream>> m0RTTStreams; ++ // The ID(s) of the stream(s) that are not able to send 0RTT data. We need to ++ // remember them put them into mReadyForWrite queue when 0RTT finishes. ++ nsTArray<WeakPtr<Http2Stream>> mCannotDo0RTTStreams; + + bool RealJoinConnection(const nsACString &hostname, int32_t port, bool jk); + bool TestOriginFrame(const nsACString &name, int32_t port); Added: head/www/waterfox/files/patch-bug1399091 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/www/waterfox/files/patch-bug1399091 Thu Feb 15 00:59:54 2018 (r461852) @@ -0,0 +1,36 @@ +commit 4d1c939529c1 +Author: Catalin Badea <catalin.badea392@gmail.com> +Date: Sun Sep 24 16:44:51 2017 -0400 + + Bug 1399091 - Avoid adding the same range to multiple selections. r=mats, a=sledru + + --HG-- + extra : source : c3b24ef4281035ee00e09b3386fcbf2d672775c4 +--- + dom/base/nsRange.cpp | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git dom/base/nsRange.cpp dom/base/nsRange.cpp +index 1e95ec629f55..8221450b828b 100644 +--- dom/base/nsRange.cpp ++++ dom/base/nsRange.cpp +@@ -1048,12 +1048,19 @@ nsRange::SetSelection(mozilla::dom::Selection* aSelection) + if (mSelection == aSelection) { + return; + } ++ + // At least one of aSelection and mSelection must be null + // aSelection will be null when we are removing from a selection + // and a range can't be in more than one selection at a time, + // thus mSelection must be null too. + MOZ_ASSERT(!aSelection || !mSelection); + ++ // Extra step in case our parent failed to ensure the above ++ // invariant. ++ if (aSelection && mSelection) { ++ mSelection->RemoveRange(this); ++ } ++ + mSelection = aSelection; + if (mSelection) { + nsINode* commonAncestor = GetCommonAncestor(); Added: head/www/waterfox/files/patch-bug1399177 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/www/waterfox/files/patch-bug1399177 Thu Feb 15 00:59:54 2018 (r461852) @@ -0,0 +1,47 @@ +commit 376eb2d39f54 +Author: Doug Thayer <dothayer@mozilla.com> +Date: Wed Sep 20 15:58:25 2017 -0700 + + Bug 1399177 - Pull label out of description in update popups. r=Gijs, a=sledru + + The margin rules for labels mean that if the See what's new link + starts its own line, the alignment looks off. We could override this, + but matching the styling for "Learn more" links, which get their own + line, seemed the better option. + + MozReview-Commit-ID: 4WK9QtRMUQs + + --HG-- + extra : source : f81f645704e4cdfaeebeb21d53d5d749718c3959 +--- + browser/components/customizableui/content/panelUI.inc.xul | 10 ++++------ + 1 file changed, 4 insertions(+), 6 deletions(-) + +diff --git browser/components/customizableui/content/panelUI.inc.xul browser/components/customizableui/content/panelUI.inc.xul +index 86fc1fa5639f..e7c63f612dc6 100644 +--- browser/components/customizableui/content/panelUI.inc.xul ++++ browser/components/customizableui/content/panelUI.inc.xul +@@ -421,9 +421,8 @@ + buttonhighlight="true" + hidden="true"> + <popupnotificationcontent id="update-available-notification-content" orient="vertical"> +- <description id="update-available-description">&updateAvailable.message; +- <label id="update-available-whats-new" class="text-link" value="&updateAvailable.whatsnew.label;" /> +- </description> ++ <description id="update-available-description">&updateAvailable.message;</description> ++ <label id="update-available-whats-new" class="text-link" value="&updateAvailable.whatsnew.label;" /> + </popupnotificationcontent> + </popupnotification> + +@@ -440,9 +439,8 @@ + buttonhighlight="true" + hidden="true"> + <popupnotificationcontent id="update-manual-notification-content" orient="vertical"> +- <description id="update-manual-description">&updateManual.message; +- <label id="update-manual-whats-new" class="text-link" value="&updateManual.whatsnew.label;" /> +- </description> ++ <description id="update-manual-description">&updateManual.message;</description> ++ <label id="update-manual-whats-new" class="text-link" value="&updateManual.whatsnew.label;" /> + </popupnotificationcontent> + </popupnotification> + Added: head/www/waterfox/files/patch-bug1401256 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/www/waterfox/files/patch-bug1401256 Thu Feb 15 00:59:54 2018 (r461852) @@ -0,0 +1,69 @@ +commit fea2908c1cef +Author: J. Ryan Stinnett <jryans@gmail.com> +Date: Thu Sep 21 16:43:37 2017 -0500 + + Bug 1401256 - servo: Update inherited prop state for animation (from jryans:stylo-anim-inherit-context). r=heycam, a=sledru + + Source-Repo: https://github.com/servo/servo + Source-Revision: 83705a8fa8992a974b32acc6635c7dfeed1afa50 + + --HG-- + extra : source : 443fe7c5dd42bb6207fb778f58f94354d19fac28 +--- + .../components/style/properties/helpers/animated_properties.mako.rs | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git servo/components/style/properties/helpers/animated_properties.mako.rs servo/components/style/properties/helpers/animated_properties.mako.rs +index ee3f601cdb91..5f98b7e5c0aa 100644 +--- servo/components/style/properties/helpers/animated_properties.mako.rs ++++ servo/components/style/properties/helpers/animated_properties.mako.rs +@@ -576,6 +576,12 @@ impl AnimationValue { + % for prop in data.longhands: + % if prop.animatable: + PropertyDeclaration::${prop.camel_case}(ref val) => { ++ context.for_non_inherited_property = ++ % if prop.style_struct.inherited: ++ None; ++ % else: ++ Some(LonghandId::${prop.camel_case}); ++ % endif + % if prop.ident in SYSTEM_FONT_LONGHANDS and product == "gecko": + if let Some(sf) = val.get_system() { + longhands::system_font::resolve_system_font(sf, context); + +commit 8a2e8131e3a9 +Author: J. Ryan Stinnett <jryans@gmail.com> +Date: Wed Sep 20 13:11:40 2017 -0500 + + Bug 1401256 - Crashtest for animating lengths. r=heycam, a=sledru + + MozReview-Commit-ID: HiVfx9cg4ZZ + + --HG-- + extra : source : 34d60bb9e16bfc33223e9616ad3b6d664cb6d93a +--- + layout/style/crashtests/1401256.html | 5 +++++ + layout/style/crashtests/crashtests.list | 1 + + 2 files changed, 6 insertions(+) + +diff --git layout/style/crashtests/1401256.html layout/style/crashtests/1401256.html +new file mode 100644 +index 000000000000..2a25dedc7e6c +--- /dev/null ++++ layout/style/crashtests/1401256.html +@@ -0,0 +1,5 @@ ++<script> ++ let o1 = document.createElement('p'); ++ document.documentElement.appendChild(o1); ++ o1.animate({'minWidth':['-moz-max-content']}); ++</script> +\ No newline at end of file +diff --git layout/style/crashtests/crashtests.list layout/style/crashtests/crashtests.list +index 9a1412863e6a..7466eb298a8f 100644 +--- layout/style/crashtests/crashtests.list ++++ layout/style/crashtests/crashtests.list +@@ -202,3 +202,4 @@ load 1387481-1.html + load 1387499.html + load 1391577.html + load 1398581.html ++load 1401256.html Added: head/www/waterfox/files/patch-bug1401726 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/www/waterfox/files/patch-bug1401726 Thu Feb 15 00:59:54 2018 (r461852) @@ -0,0 +1,60 @@ +commit ccbee985a281 +Author: John Dai <jdai@mozilla.com> +Date: Thu Sep 21 16:32:18 2017 +0800 + + Bug 1401726 - Fix crash in nsLabelsNodeList::PopulateSelf. r=smaug, a=sledru + + From 045228df087f7612bde09d2f715ec33f2aaf777c Mon Sep 17 00:00:00 2001 +--- + dom/base/nsContentList.cpp | 4 +++- + dom/html/crashtests/1401726.html | 17 +++++++++++++++++ + dom/html/crashtests/crashtests.list | 1 + + 3 files changed, 21 insertions(+), 1 deletion(-) + +diff --git dom/base/nsContentList.cpp dom/base/nsContentList.cpp +index f943039e7fca..9b7bd6323aa8 100644 +--- dom/base/nsContentList.cpp ++++ dom/base/nsContentList.cpp +@@ -1266,7 +1266,9 @@ nsLabelsNodeList::MaybeResetRoot(nsINode* aRootNode) + void + nsLabelsNodeList::PopulateSelf(uint32_t aNeededLength) + { +- MOZ_ASSERT(mRootNode, "Must have root"); ++ if (!mRootNode) { ++ return; ++ } + + // Start searching at the root. + nsINode* cur = mRootNode; +diff --git dom/html/crashtests/1401726.html dom/html/crashtests/1401726.html +new file mode 100644 +index 000000000000..bf4b4918abd4 +--- /dev/null ++++ dom/html/crashtests/1401726.html +@@ -0,0 +1,17 @@ ++<!DOCTYPE HTML> ++<html> ++<head> ++<script> ++ try { o1 = document.createElement('button') } catch(e) { } ++ try { o2 = document.createElement('p') } catch(e) { } ++ try { o3 = o1.labels } catch(e) { } ++ try { o4 = document.createNSResolver(document.documentElement) } catch(e) { } ++ try { o5 = document.createRange(); } catch(e) { } ++ try { document.documentElement.appendChild(o1) } catch(e) { } ++ try { o5.selectNode(o4); } catch(e) { } ++ try { o5.surroundContents(o2) } catch(e) { } ++ try { o5.surroundContents(o2) } catch(e) { } ++ try { o1.labels.length } catch(e) { } ++</script> ++</head> ++</html> +diff --git dom/html/crashtests/crashtests.list dom/html/crashtests/crashtests.list +index a60cc9f99474..581ed10cefc8 100644 +--- dom/html/crashtests/crashtests.list ++++ dom/html/crashtests/crashtests.list +@@ -83,3 +83,4 @@ load 1343886-2.xml + load 1343886-3.xml + asserts(0-3) load 1350972.html + load 1386905.html ++asserts(0-4) load 1401726.html Added: head/www/waterfox/files/patch-bug1401878 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/www/waterfox/files/patch-bug1401878 Thu Feb 15 00:59:54 2018 (r461852) @@ -0,0 +1,70 @@ +commit 59e5b0881ec2 +Author: Andrea Marchesini <amarchesini@mozilla.com> +Date: Thu Sep 21 21:32:00 2017 +0200 + + Bug 1401878 - Remove ServiceWorkers in SiteDataManager.jsm. r=bkelly, a=sledru + + --HG-- + extra : source : 04888373f12bd5d86ec3f4057c3a2f0b2240c963 + extra : intermediate-source : e2b1cd9fd4a66fc932d8f74cfe2b38c55b9a7a1e +--- + browser/components/preferences/SiteDataManager.jsm | 26 ++++++++++++++++++++++ + 1 file changed, 26 insertions(+) + +diff --git browser/components/preferences/SiteDataManager.jsm browser/components/preferences/SiteDataManager.jsm +index d6dd5c78656a..8f2ac2a34188 100644 +--- browser/components/preferences/SiteDataManager.jsm ++++ browser/components/preferences/SiteDataManager.jsm +@@ -9,6 +9,9 @@ XPCOMUtils.defineLazyModuleGetter(this, "OfflineAppCacheHelper", + "resource:///modules/offlineAppCache.jsm"); + XPCOMUtils.defineLazyModuleGetter(this, "ContextualIdentityService", + "resource://gre/modules/ContextualIdentityService.jsm"); ++XPCOMUtils.defineLazyServiceGetter(this, "serviceWorkerManager", ++ "@mozilla.org/serviceworkers/manager;1", ++ "nsIServiceWorkerManager"); + + this.EXPORTED_SYMBOLS = [ + "SiteDataManager" +@@ -216,6 +219,19 @@ this.SiteDataManager = { + } + }, + ++ _removeServiceWorkers(site) { ++ let serviceWorkers = serviceWorkerManager.getAllRegistrations(); ++ for (let i = 0; i < serviceWorkers.length; i++) { ++ let sw = serviceWorkers.queryElementAt(i, Ci.nsIServiceWorkerRegistrationInfo); ++ for (let principal of site.principals) { ++ if (sw.principal.equals(principal)) { ++ serviceWorkerManager.removeAndPropagate(sw.principal.URI.host); ++ break; ++ } ++ } ++ } ++ }, ++ + remove(hosts) { + let promises = []; + let unknownHost = ""; +@@ -225,6 +241,7 @@ this.SiteDataManager = { + this._removePermission(site); + this._removeAppCache(site); + this._removeCookie(site); ++ this._removeServiceWorkers(site); + promises.push(this._removeQuotaUsage(site)); + } else { + unknownHost = host; +@@ -240,6 +257,14 @@ this.SiteDataManager = { + }, + + removeAll() { ++ // Iterate through the service workers and remove them. ++ let serviceWorkers = serviceWorkerManager.getAllRegistrations(); ++ for (let i = 0; i < serviceWorkers.length; i++) { ++ let sw = serviceWorkers.queryElementAt(i, Ci.nsIServiceWorkerRegistrationInfo); ++ let host = sw.principal.URI.host; ++ serviceWorkerManager.removeAndPropagate(host); ++ } ++ + let promises = []; + for (let site of this._sites.values()) { + this._removePermission(site); Added: head/www/waterfox/files/patch-bug1416307 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/www/waterfox/files/patch-bug1416307 Thu Feb 15 00:59:54 2018 (r461852) @@ -0,0 +1,94 @@ +commit 1159955c684f +Author: Samael Wang <freesamael@gmail.com> +Date: Tue Feb 6 13:28:30 2018 -0500 + + Bug 1416307 - Set triggeringPrincipal to current document's principal, if aPrincipal is not given. r=bz a=ritu + + MozReview-Commit-ID: 8lxKFeUlyzq + + --HG-- + extra : source : 9fcf48189000ab8ee16f236be57c9659c7243b42 +--- + docshell/base/nsDocShell.cpp | 21 +++++++++++---------- + docshell/base/nsIRefreshURI.idl | 15 ++++++--------- + 2 files changed, 17 insertions(+), 19 deletions(-) + +diff --git docshell/base/nsDocShell.cpp docshell/base/nsDocShell.cpp +index fa3707880772..84a9086a1a00 100644 +--- docshell/base/nsDocShell.cpp ++++ docshell/base/nsDocShell.cpp +@@ -6396,9 +6396,17 @@ nsDocShell::ForceRefreshURI(nsIURI* aURI, nsIPrincipal* aPrincipal, int32_t aDel + */ + loadInfo->SetReferrer(mCurrentURI); + +- /* Don't ever "guess" on which principal to use to avoid picking +- * the current principal. +- */ ++ // Set the triggering pricipal to aPrincipal if available, or current ++ // document's principal otherwise. ++ nsCOMPtr<nsIPrincipal> principal = aPrincipal; ++ if (!principal) { ++ nsCOMPtr<nsIDocument> doc = GetDocument(); ++ if (!doc) { ++ return NS_ERROR_FAILURE; ++ } ++ principal = doc->NodePrincipal(); ++ } ++ loadInfo->SetTriggeringPrincipal(principal); + loadInfo->SetPrincipalIsExplicit(true); + + /* Check if this META refresh causes a redirection +@@ -6426,13 +6434,6 @@ nsDocShell::ForceRefreshURI(nsIURI* aURI, nsIPrincipal* aPrincipal, int32_t aDel + loadInfo->SetLoadType(nsIDocShellLoadInfo::loadRefresh); + } + +- // If the principal is null, the refresh will have a triggeringPrincipal +- // derived from the referrer URI, or will be set to the system principal +- // if there is no refererrer. See LoadURI() +- if (aPrincipal) { +- loadInfo->SetTriggeringPrincipal(aPrincipal); +- } +- + /* + * LoadURI(...) will cancel all refresh timers... This causes the + * Timer and its refreshData instance to be released... +diff --git docshell/base/nsIRefreshURI.idl docshell/base/nsIRefreshURI.idl +index 3e85e4c516c6..77d8fd660674 100644 +--- docshell/base/nsIRefreshURI.idl ++++ docshell/base/nsIRefreshURI.idl +@@ -19,9 +19,8 @@ interface nsIRefreshURI : nsISupports { + * + * @param aUri The uri to refresh. + * @param aPrincipal The triggeringPrincipal for the refresh load +- * May be null, in which case a principal will be built based on the +- * referrer URI of the previous docshell load, or will use the system +- * principal when there is no referrer. ++ * May be null, in which case the principal of current document will be ++ * applied. + * @param aMillis The number of milliseconds to wait. + * @param aRepeat Flag to indicate if the uri is to be + * repeatedly refreshed every aMillis milliseconds. +@@ -36,9 +35,8 @@ interface nsIRefreshURI : nsISupports { + * + * @param aURI The URI to refresh. + * @param aPrincipal The triggeringPrincipal for the refresh load +- * May be null, in which case a principal will be built based on the +- * referrer URI of the previous docshell load, or will use the system +- * principal when there is no referrer. ++ * May be null, in which case the principal of current document will be ++ * applied. + * @param aMillis The number of milliseconds by which this refresh would + * be delayed if it were not being forced. + * @param aMetaRefresh Flag to indicate if this is a meta refresh. +@@ -68,9 +66,8 @@ interface nsIRefreshURI : nsISupports { + * + * @param aBaseURI base URI to resolve refresh uri with. + * @param aPrincipal The triggeringPrincipal for the refresh load +- * May be null, in which case a principal will be built based on the +- * referrer URI of the previous docshell load, or will use the system +- * principal when there is no referrer. ++ * May be null, in which case the principal of current document will be ++ * applied. + * @param aHeader The meta refresh header string. + */ + void setupRefreshURIFromHeader(in nsIURI aBaseURI, Added: head/www/waterfox/files/patch-bug1416529 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/www/waterfox/files/patch-bug1416529 Thu Feb 15 00:59:54 2018 (r461852) @@ -0,0 +1,101 @@ +commit 4cfa1b84d80c +Author: Nicholas Hurley <hurley@mozilla.com> +Date: Fri Feb 2 11:03:08 2018 -0800 + + Bug 1416529 r=mcmanus a=ritu + MozReview-Commit-ID: CD1l5vLB4yy + + --HG-- + extra : amend_source : 44c6368af20b158091a90c627ea4f206871dfa9d +--- + netwerk/protocol/http/Http2Session.cpp | 18 +++++++++--------- + netwerk/protocol/http/Http2Stream.cpp | 14 ++++++++++++++ + netwerk/protocol/http/Http2Stream.h | 1 + + 3 files changed, 24 insertions(+), 9 deletions(-) + +diff --git netwerk/protocol/http/Http2Session.cpp netwerk/protocol/http/Http2Session.cpp +index 9fd021065742..622c1657027a 100644 +--- netwerk/protocol/http/Http2Session.cpp ++++ netwerk/protocol/http/Http2Session.cpp +@@ -1136,6 +1136,15 @@ Http2Session::CleanupStream(Http2Stream *aStream, nsresult aResult, + return; + } + ++ Http2PushedStream *pushSource = aStream->PushSource(); ++ if (pushSource) { ++ // aStream is a synthetic attached to an even push ++ MOZ_ASSERT(pushSource->GetConsumerStream() == aStream); ++ MOZ_ASSERT(!aStream->StreamID()); ++ MOZ_ASSERT(!(pushSource->StreamID() & 0x1)); ++ aStream->ClearPushSource(); ++ } ++ + if (aStream->DeferCleanup(aResult)) { + LOG3(("Http2Session::CleanupStream 0x%X deferred\n", aStream->StreamID())); + return; +@@ -1146,15 +1155,6 @@ Http2Session::CleanupStream(Http2Stream *aStream, nsresult aResult, + return; + } + +- Http2PushedStream *pushSource = aStream->PushSource(); +- if (pushSource) { +- // aStream is a synthetic attached to an even push +- MOZ_ASSERT(pushSource->GetConsumerStream() == aStream); +- MOZ_ASSERT(!aStream->StreamID()); +- MOZ_ASSERT(!(pushSource->StreamID() & 0x1)); +- pushSource->SetConsumerStream(nullptr); +- } +- + // don't reset a stream that has recevied a fin or rst + if (!aStream->RecvdFin() && !aStream->RecvdReset() && aStream->StreamID() && + !(mInputFrameFinal && (aStream == mInputFrameDataStream))) { // !(recvdfin with mark pending) +diff --git netwerk/protocol/http/Http2Stream.cpp netwerk/protocol/http/Http2Stream.cpp +index d2f304b5ed7b..95674d018ab1 100644 +--- netwerk/protocol/http/Http2Stream.cpp ++++ netwerk/protocol/http/Http2Stream.cpp +@@ -112,12 +112,22 @@ Http2Stream::Http2Stream(nsAHttpTransaction *httpTransaction, + + Http2Stream::~Http2Stream() + { ++ ClearPushSource(); + ClearTransactionsBlockedOnTunnel(); + mStreamID = Http2Session::kDeadStreamID; + + LOG3(("Http2Stream::~Http2Stream %p", this)); + } + ++void ++Http2Stream::ClearPushSource() ++{ ++ if (mPushSource) { ++ mPushSource->SetConsumerStream(nullptr); ++ mPushSource = nullptr; ++ } ++} ++ + // ReadSegments() is used to write data down the socket. Generally, HTTP + // request data is pulled from the approriate transaction and + // converted to HTTP/2 data. Sometimes control data like a window-update is +@@ -1135,6 +1145,10 @@ Http2Stream::ConvertPushHeaders(Http2Decompressor *decompressor, + void + Http2Stream::Close(nsresult reason) + { ++ // In case we are connected to a push, make sure the push knows we are closed, ++ // so it doesn't try to give us any more DATA that comes on it after our close. ++ ClearPushSource(); ++ + mTransaction->Close(reason); + } + +diff --git netwerk/protocol/http/Http2Stream.h netwerk/protocol/http/Http2Stream.h +index 3412eb56f809..29f98163c4ac 100644 +--- netwerk/protocol/http/Http2Stream.h ++++ netwerk/protocol/http/Http2Stream.h +@@ -56,6 +56,7 @@ public: + + uint32_t StreamID() { return mStreamID; } + Http2PushedStream *PushSource() { return mPushSource; } ++ void ClearPushSource(); + + stateType HTTPState() { return mState; } + void SetHTTPState(stateType val) { mState = val; } Added: head/www/waterfox/files/patch-bug1419508 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/www/waterfox/files/patch-bug1419508 Thu Feb 15 00:59:54 2018 (r461852) @@ -0,0 +1,29 @@ +commit 4d25545cc673 +Author: Gerald Squelart <gsquelart@mozilla.com> +Date: Thu Jan 25 16:21:23 2018 +1100 + + Bug 1419508 - Return early from CreateMaskLayer if there is no visible data - r=mattwoodrow a=lizzard + + MozReview-Commit-ID: 9jWGXA2eGvv + + --HG-- + extra : source : c5d8b1ed27228f4bcf45b2746f78dba3795d0868 +--- *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201802150059.w1F0xts1043277>