Index: branches/2018Q1/www/waterfox/Makefile =================================================================== --- branches/2018Q1/www/waterfox/Makefile (revision 464684) +++ branches/2018Q1/www/waterfox/Makefile (revision 464685) @@ -1,75 +1,75 @@ # $FreeBSD$ PORTNAME= waterfox DISTVERSION= 56.0.4-36 DISTVERSIONSUFFIX= -g79492ecca478 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= www ipv6 MAINTAINER= jbeich@FreeBSD.org COMMENT= Distilled fork of Firefox DEPRECATED= Temporary experiment EXPIRATION_DATE=2018-03-20 BUILD_DEPENDS= nspr>=4.16:devel/nspr \ nss>=3.32.1:security/nss \ icu>=59.1,1:devel/icu \ libevent>=2.1.8:devel/libevent \ harfbuzz>=1.4.7:print/harfbuzz \ graphite2>=1.3.10:graphics/graphite2 \ png>=1.6.31:graphics/png \ libvorbis>=1.3.5,3:audio/libvorbis \ libvpx>=1.5.0:multimedia/libvpx \ sqlite3>=3.19.3:databases/sqlite3 \ ${PYTHON_PKGNAMEPREFIX}sqlite3>0:databases/py-sqlite3@${PY_FLAVOR} \ v4l_compat>0:multimedia/v4l_compat \ autoconf-2.13:devel/autoconf213 \ yasm:devel/yasm \ zip:archivers/zip # soundtouch>=1.9.0:audio/soundtouch \ LIB_DEPENDS= libv4l2.so:multimedia/libv4l USE_GITHUB= yes GH_ACCOUNT= MrAlex94 GH_PROJECT= Waterfox USE_GECKO= gecko MOZ_PKGCONFIG_FILES= # empty USE_MOZILLA= -soundtouch MOZILLA_NAME= Waterfox USE_GL= gl WATERFOX_ICON= ${MOZILLA}.png WATERFOX_ICON_SRC= ${PREFIX}/lib/${MOZILLA}/browser/chrome/icons/default/default256.png WATERFOX_DESKTOP= ${MOZSRC}/taskcluster/docker/firefox-snap/firefox.desktop MOZ_OPTIONS= --enable-application=browser \ --with-app-name=${MOZILLA} \ --with-app-basename=${MOZILLA_NAME} \ --with-distribution-id=org.${MOZILLA}project OPTIONS_DEFAULT= BUNDLED_CAIRO .include "${.CURDIR}/../../www/firefox/Makefile.options" post-patch: @${REINPLACE_CMD} -e 's/%u/%U/' -e '/X-MultipleArgs/d' \ -e 's/firefox/${MOZILLA}/' \ -e 's/Firefox/${MOZILLA_NAME}/' \ ${WATERFOX_DESKTOP} @${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \ ${WRKSRC}/browser/app/nsBrowserApp.cpp pre-configure: (cd ${WRKSRC} && ${LOCALBASE}/bin/autoconf-2.13) (cd ${WRKSRC}/js/src/ && ${LOCALBASE}/bin/autoconf-2.13) post-install: ${INSTALL_DATA} ${WATERFOX_DESKTOP} \ ${STAGEDIR}${PREFIX}/share/applications/${MOZILLA}.desktop ${MKDIR} ${STAGEDIR}${PREFIX}/share/pixmaps ${LN} -sf ${WATERFOX_ICON_SRC} ${STAGEDIR}${PREFIX}/share/pixmaps/${WATERFOX_ICON} .include Index: branches/2018Q1/www/waterfox/files/patch-bug1366357 =================================================================== --- branches/2018Q1/www/waterfox/files/patch-bug1366357 (nonexistent) +++ branches/2018Q1/www/waterfox/files/patch-bug1366357 (revision 464685) @@ -0,0 +1,141 @@ +commit 15353262e8f3 +Author: Johann Hofmann +Date: Tue Jun 13 12:10:39 2017 +0200 + + Bug 1366357 - Use origin instead of documentURI for WebRTC permission requests. r=florian + + MozReview-Commit-ID: IkccA65Ma3a + + --HG-- + extra : rebase_source : 9c1f2c895949b1dae617b0c2a1039a5494cd8b2a +--- + .../test/popupNotifications/browser_displayURI.js | 79 ++++++++++++++++++---- + browser/modules/ContentWebRTC.jsm | 1 + + browser/modules/webrtcUI.jsm | 8 ++- + 3 files changed, 73 insertions(+), 15 deletions(-) + +diff --git browser/base/content/test/popupNotifications/browser_displayURI.js browser/base/content/test/popupNotifications/browser_displayURI.js +index 10a8199dab54..df2bfb54fe25 100644 +--- browser/base/content/test/popupNotifications/browser_displayURI.js ++++ browser/base/content/test/popupNotifications/browser_displayURI.js +@@ -1,19 +1,11 @@ + /* +- * Make sure that the origin is shown for ContentPermissionPrompt +- * consumers e.g. geolocation. +-*/ +- +-add_task(async function test_displayURI() { +- await BrowserTestUtils.withNewTab({ +- gBrowser, +- url: "https://test1.example.com/", +- }, async function(browser) { ++ * Make sure that the correct origin is shown for permission prompts. ++ */ ++ ++async function check(contentTask) { ++ await BrowserTestUtils.withNewTab("https://test1.example.com/", async function(browser) { + let popupShownPromise = waitForNotificationPanel(); +- await ContentTask.spawn(browser, null, async function() { +- content.navigator.geolocation.getCurrentPosition(function(pos) { +- // Do nothing +- }); +- }); ++ await ContentTask.spawn(browser, null, contentTask); + let panel = await popupShownPromise; + let notification = panel.children[0]; + let body = document.getAnonymousElementByAttribute(notification, +@@ -21,4 +13,63 @@ add_task(async function test_displayURI() { + "popup-notification-body"); + ok(body.innerHTML.includes("example.com"), "Check that at least the eTLD+1 is present in the markup"); + }); ++ ++ let channel = NetUtil.newChannel({ ++ uri: getRootDirectory(gTestPath), ++ loadUsingSystemPrincipal: true, ++ }); ++ channel = channel.QueryInterface(Ci.nsIFileChannel); ++ ++ return BrowserTestUtils.withNewTab(channel.file.path, async function(browser) { ++ let popupShownPromise = waitForNotificationPanel(); ++ await ContentTask.spawn(browser, null, contentTask); ++ let panel = await popupShownPromise; ++ let notification = panel.children[0]; ++ let body = document.getAnonymousElementByAttribute(notification, ++ "class", ++ "popup-notification-body"); ++ if (notification.id == "geolocation-notification") { ++ ok(body.innerHTML.includes("local file"), `file:// URIs should be displayed as local file.`); ++ } else { ++ ok(body.innerHTML.includes("Unknown origin"), "file:// URIs should be displayed as unknown origin."); ++ } ++ }); ++} ++ ++add_task(async function setup() { ++ await SpecialPowers.pushPrefEnv({set: [ ++ ["media.navigator.permission.fake", true], ++ ["media.navigator.permission.force", true], ++ ]}); + }); ++ ++add_task(async function test_displayURI_geo() { ++ await check(async function() { ++ content.navigator.geolocation.getCurrentPosition(() => {}); ++ }); ++}); ++ ++add_task(async function test_displayURI_camera() { ++ await check(async function() { ++ content.navigator.mediaDevices.getUserMedia({video: true, fake: true}); ++ }); ++}); ++ ++add_task(async function test_displayURI_geo_blob() { ++ await check(async function() { ++ let text = ""; ++ let blob = new Blob([text], {type: "text/html"}); ++ let url = content.URL.createObjectURL(blob); ++ content.location.href = url; ++ }); ++}); ++ ++add_task(async function test_displayURI_camera_blob() { ++ await check(async function() { ++ let text = ""; ++ let blob = new Blob([text], {type: "text/html"}); ++ let url = content.URL.createObjectURL(blob); ++ content.location.href = url; ++ }); ++}); ++ +diff --git browser/modules/ContentWebRTC.jsm browser/modules/ContentWebRTC.jsm +index f717f6abbc0a..1cbe0832cba1 100644 +--- browser/modules/ContentWebRTC.jsm ++++ browser/modules/ContentWebRTC.jsm +@@ -216,6 +216,7 @@ function prompt(aContentWindow, aWindowID, aCallID, aConstraints, aDevices, aSec + let request = { + callID: aCallID, + windowID: aWindowID, ++ origin: aContentWindow.origin, + documentURI: aContentWindow.document.documentURI, + secure: aSecure, + requestTypes, +diff --git browser/modules/webrtcUI.jsm browser/modules/webrtcUI.jsm +index 6bc97eb7305c..3efdf946352b 100644 +--- browser/modules/webrtcUI.jsm ++++ browser/modules/webrtcUI.jsm +@@ -368,7 +368,13 @@ function prompt(aBrowser, aRequest) { + aBrowser.dispatchEvent(new aBrowser.ownerGlobal + .CustomEvent("PermissionStateChange")); + +- let uri = Services.io.newURI(aRequest.documentURI); ++ let uri; ++ try { ++ // This fails for principals that serialize to "null", e.g. file URIs. ++ uri = Services.io.newURI(aRequest.origin); ++ } catch (e) { ++ uri = Services.io.newURI(aRequest.documentURI); ++ } + let host = getHost(uri); + let chromeDoc = aBrowser.ownerDocument; + let stringBundle = chromeDoc.defaultView.gNavigatorBundle; Property changes on: branches/2018Q1/www/waterfox/files/patch-bug1366357 ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: branches/2018Q1/www/waterfox/files/patch-bug1414768 =================================================================== --- branches/2018Q1/www/waterfox/files/patch-bug1414768 (nonexistent) +++ branches/2018Q1/www/waterfox/files/patch-bug1414768 (revision 464685) @@ -0,0 +1,325 @@ +commit cb494b100bfb +Author: Jason Orendorff +Date: Tue Nov 7 16:59:00 2017 -0600 + + Bug 1414768 - Handle same-compartment wrappers in TypedArray methods. r=bz + + CallTypedArrayMethodIfWrapped (and the CallNonGeneric machinery throughout + the engine) unwraps the `this` argument, but the other arguments are only + rewrapped for the target compartment. + + The pattern being used before this patch to get the length of a TypedArray + or possible TypedArray wrapper is: + + callFunction(CallTypedArrayMethodIfWrapped, O, O, "TypedArrayLength") + + The first O is the `this` value and the second is an argument. + If O is a cross-compartment wrapper, this works fine. The first O is unwrapped, + revealing the actual TypedArray object; the second O is rewrapped for that + TypedArray's compartment, producing the same TypedArray. + + However, if O is a same-compartment wrapper, this doesn't work. The first O + is unwrapped, revealing the actual TypedArray object in the same compartment; + rewrapping the other O does nothing to it, since it is already an object in the + target compartment. Thus TypedArrayLength receives a `this` value that's an + unwrapped TypedArray, but an argument that is still a wrapper. + + The fix is to have CallTypedArrayMethodIfWrapped targets only expect `this` + to be an unwrapped TypedArray. + + --HG-- + extra : rebase_source : 468453beebc9e48dcbc63162f400069a11f413b9 +--- + js/src/builtin/TypedArray.js | 73 ++++++++++------------ + .../jit-test/tests/proxy/testWrapWithProtoIter.js | 1 + + .../tests/proxy/testWrapWithProtoTypedArray.js | 19 ++++++ + 3 files changed, 54 insertions(+), 39 deletions(-) + +diff --git js/src/builtin/TypedArray.js js/src/builtin/TypedArray.js +index 0ee07634822d..8e29657f167e 100644 +--- js/src/builtin/TypedArray.js ++++ js/src/builtin/TypedArray.js +@@ -33,6 +33,10 @@ function IsDetachedBuffer(buffer) { + return (flags & JS_ARRAYBUFFER_DETACHED_FLAG) !== 0; + } + ++function TypedArrayLengthMethod() { ++ return TypedArrayLength(this); ++} ++ + function GetAttachedArrayBuffer(tarray) { + var buffer = ViewedArrayBufferIfReified(tarray); + if (IsDetachedBuffer(buffer)) +@@ -40,6 +44,10 @@ function GetAttachedArrayBuffer(tarray) { + return buffer; + } + ++function GetAttachedArrayBufferMethod() { ++ return GetAttachedArrayBuffer(this); ++} ++ + // A function which ensures that the argument is either a typed array or a + // cross-compartment wrapper for a typed array and that the typed array involved + // has an attached array buffer. If one of those conditions doesn't hold (wrong +@@ -52,10 +60,7 @@ function IsTypedArrayEnsuringArrayBuffer(arg) { + return true; + } + +- // This is a bit hacky but gets the job done: the first `arg` is used to +- // test for a wrapped typed array, the second as an argument to +- // GetAttachedArrayBuffer. +- callFunction(CallTypedArrayMethodIfWrapped, arg, arg, "GetAttachedArrayBuffer"); ++ callFunction(CallTypedArrayMethodIfWrapped, arg, "GetAttachedArrayBufferMethod"); + return false; + } + +@@ -96,8 +101,8 @@ function TypedArrayCreateWithLength(constructor, length) { + if (isTypedArray) { + len = TypedArrayLength(newTypedArray); + } else { +- len = callFunction(CallTypedArrayMethodIfWrapped, newTypedArray, newTypedArray, +- "TypedArrayLength"); ++ len = callFunction(CallTypedArrayMethodIfWrapped, newTypedArray, ++ "TypedArrayLengthMethod"); + } + + if (len < length) +@@ -257,15 +262,14 @@ function TypedArrayEvery(callbackfn/*, thisArg*/) { + // We want to make sure that we have an attached buffer, per spec prose. + var isTypedArray = IsTypedArrayEnsuringArrayBuffer(O); + +- // If we got here, `this` is either a typed array or a cross-compartment +- // wrapper for one. ++ // If we got here, `this` is either a typed array or a wrapper for one. + + // Steps 3-5. + var len; + if (isTypedArray) + len = TypedArrayLength(O); + else +- len = callFunction(CallTypedArrayMethodIfWrapped, O, O, "TypedArrayLength"); ++ len = callFunction(CallTypedArrayMethodIfWrapped, O, "TypedArrayLengthMethod"); + + // Step 6. + if (arguments.length === 0) +@@ -361,15 +365,14 @@ function TypedArrayFilter(callbackfn/*, thisArg*/) { + // We want to make sure that we have an attached buffer, per spec prose. + var isTypedArray = IsTypedArrayEnsuringArrayBuffer(O); + +- // If we got here, `this` is either a typed array or a cross-compartment +- // wrapper for one. ++ // If we got here, `this` is either a typed array or a wrapper for one. + + // Step 3. + var len; + if (isTypedArray) + len = TypedArrayLength(O); + else +- len = callFunction(CallTypedArrayMethodIfWrapped, O, O, "TypedArrayLength"); ++ len = callFunction(CallTypedArrayMethodIfWrapped, O, "TypedArrayLengthMethod"); + + // Step 4. + if (arguments.length === 0) +@@ -423,15 +426,14 @@ function TypedArrayFind(predicate/*, thisArg*/) { + // We want to make sure that we have an attached buffer, per spec prose. + var isTypedArray = IsTypedArrayEnsuringArrayBuffer(O); + +- // If we got here, `this` is either a typed array or a cross-compartment +- // wrapper for one. ++ // If we got here, `this` is either a typed array or a wrapper for one. + + // Steps 3-5. + var len; + if (isTypedArray) + len = TypedArrayLength(O); + else +- len = callFunction(CallTypedArrayMethodIfWrapped, O, O, "TypedArrayLength"); ++ len = callFunction(CallTypedArrayMethodIfWrapped, O, "TypedArrayLengthMethod"); + + // Step 6. + if (arguments.length === 0) +@@ -465,15 +467,14 @@ function TypedArrayFindIndex(predicate/*, thisArg*/) { + // We want to make sure that we have an attached buffer, per spec prose. + var isTypedArray = IsTypedArrayEnsuringArrayBuffer(O); + +- // If we got here, `this` is either a typed array or a cross-compartment +- // wrapper for one. ++ // If we got here, `this` is either a typed array or a wrapper for one. + + // Steps 3-5. + var len; + if (isTypedArray) + len = TypedArrayLength(O); + else +- len = callFunction(CallTypedArrayMethodIfWrapped, O, O, "TypedArrayLength"); ++ len = callFunction(CallTypedArrayMethodIfWrapped, O, "TypedArrayLengthMethod"); + + // Step 6. + if (arguments.length === 0) +@@ -505,15 +506,14 @@ function TypedArrayForEach(callbackfn/*, thisArg*/) { + // We want to make sure that we have an attached buffer, per spec prose. + var isTypedArray = IsTypedArrayEnsuringArrayBuffer(O); + +- // If we got here, `this` is either a typed array or a cross-compartment +- // wrapper for one. ++ // If we got here, `this` is either a typed array or a wrapper for one. + + // Step 3-4. + var len; + if (isTypedArray) + len = TypedArrayLength(O); + else +- len = callFunction(CallTypedArrayMethodIfWrapped, O, O, "TypedArrayLength"); ++ len = callFunction(CallTypedArrayMethodIfWrapped, O, "TypedArrayLengthMethod"); + + // Step 5. + if (arguments.length === 0) +@@ -703,15 +703,14 @@ function TypedArrayMap(callbackfn/*, thisArg*/) { + // We want to make sure that we have an attached buffer, per spec prose. + var isTypedArray = IsTypedArrayEnsuringArrayBuffer(O); + +- // If we got here, `this` is either a typed array or a cross-compartment +- // wrapper for one. ++ // If we got here, `this` is either a typed array or a wrapper for one. + + // Step 3. + var len; + if (isTypedArray) + len = TypedArrayLength(O); + else +- len = callFunction(CallTypedArrayMethodIfWrapped, O, O, "TypedArrayLength"); ++ len = callFunction(CallTypedArrayMethodIfWrapped, O, "TypedArrayLengthMethod"); + + // Step 4. + if (arguments.length === 0) +@@ -747,15 +746,14 @@ function TypedArrayReduce(callbackfn/*, initialValue*/) { + // We want to make sure that we have an attached buffer, per spec prose. + var isTypedArray = IsTypedArrayEnsuringArrayBuffer(O); + +- // If we got here, `this` is either a typed array or a cross-compartment +- // wrapper for one. ++ // If we got here, `this` is either a typed array or a wrapper for one. + + // Steps 3-5. + var len; + if (isTypedArray) + len = TypedArrayLength(O); + else +- len = callFunction(CallTypedArrayMethodIfWrapped, O, O, "TypedArrayLength"); ++ len = callFunction(CallTypedArrayMethodIfWrapped, O, "TypedArrayLengthMethod"); + + // Step 6. + if (arguments.length === 0) +@@ -793,15 +791,14 @@ function TypedArrayReduceRight(callbackfn/*, initialValue*/) { + // We want to make sure that we have an attached buffer, per spec prose. + var isTypedArray = IsTypedArrayEnsuringArrayBuffer(O); + +- // If we got here, `this` is either a typed array or a cross-compartment +- // wrapper for one. ++ // If we got here, `this` is either a typed array or a wrapper for one. + + // Steps 3-5. + var len; + if (isTypedArray) + len = TypedArrayLength(O); + else +- len = callFunction(CallTypedArrayMethodIfWrapped, O, O, "TypedArrayLength"); ++ len = callFunction(CallTypedArrayMethodIfWrapped, O, "TypedArrayLengthMethod"); + + // Step 6. + if (arguments.length === 0) +@@ -1066,15 +1063,14 @@ function TypedArraySome(callbackfn/*, thisArg*/) { + // We want to make sure that we have an attached buffer, per spec prose. + var isTypedArray = IsTypedArrayEnsuringArrayBuffer(O); + +- // If we got here, `this` is either a typed array or a cross-compartment +- // wrapper for one. ++ // If we got here, `this` is either a typed array or a wrapper for one. + + // Steps 3-5. + var len; + if (isTypedArray) + len = TypedArrayLength(O); + else +- len = callFunction(CallTypedArrayMethodIfWrapped, O, O, "TypedArrayLength"); ++ len = callFunction(CallTypedArrayMethodIfWrapped, O, "TypedArrayLengthMethod"); + + // Step 6. + if (arguments.length === 0) +@@ -1176,7 +1172,7 @@ function TypedArraySort(comparefn) { + if (isTypedArray) { + buffer = GetAttachedArrayBuffer(obj); + } else { +- buffer = callFunction(CallTypedArrayMethodIfWrapped, obj, obj, "GetAttachedArrayBuffer"); ++ buffer = callFunction(CallTypedArrayMethodIfWrapped, obj, "GetAttachedArrayBufferMethod"); + } + + // Step 4. +@@ -1184,7 +1180,7 @@ function TypedArraySort(comparefn) { + if (isTypedArray) { + len = TypedArrayLength(obj); + } else { +- len = callFunction(CallTypedArrayMethodIfWrapped, obj, obj, "TypedArrayLength"); ++ len = callFunction(CallTypedArrayMethodIfWrapped, obj, "TypedArrayLengthMethod"); + } + + // Arrays with less than two elements remain unchanged when sorted. +@@ -1221,7 +1217,7 @@ function TypedArraySort(comparefn) { + if (isTypedArray) { + length = TypedArrayLength(obj); + } else { +- length = callFunction(CallTypedArrayMethodIfWrapped, obj, obj, "TypedArrayLength"); ++ length = callFunction(CallTypedArrayMethodIfWrapped, obj, "TypedArrayLengthMethod"); + } + + // It's faster for us to check the typed array's length than to check +@@ -1253,15 +1249,14 @@ function TypedArrayToLocaleString(locales = undefined, options = undefined) { + // We want to make sure that we have an attached buffer, per spec prose. + var isTypedArray = IsTypedArrayEnsuringArrayBuffer(array); + +- // If we got here, `this` is either a typed array or a cross-compartment +- // wrapper for one. ++ // If we got here, `this` is either a typed array or a wrapper for one. + + // Step 2. + var len; + if (isTypedArray) + len = TypedArrayLength(array); + else +- len = callFunction(CallTypedArrayMethodIfWrapped, array, array, "TypedArrayLength"); ++ len = callFunction(CallTypedArrayMethodIfWrapped, array, "TypedArrayLengthMethod"); + + // Step 4. + if (len === 0) +diff --git js/src/jit-test/tests/proxy/testWrapWithProtoIter.js js/src/jit-test/tests/proxy/testWrapWithProtoIter.js +new file mode 100644 +index 000000000000..c6854b206786 +--- /dev/null ++++ js/src/jit-test/tests/proxy/testWrapWithProtoIter.js +@@ -0,0 +1 @@ ++[...wrapWithProto(new Int8Array(), new Int8Array())] +diff --git js/src/jit-test/tests/proxy/testWrapWithProtoTypedArray.js js/src/jit-test/tests/proxy/testWrapWithProtoTypedArray.js +new file mode 100644 +index 000000000000..1b805d30a119 +--- /dev/null ++++ js/src/jit-test/tests/proxy/testWrapWithProtoTypedArray.js +@@ -0,0 +1,19 @@ ++let a = wrapWithProto(new Int8Array([1, 3, 5, 6, 9]), new Int8Array()); ++ ++assertEq([...a].toString(), "1,3,5,6,9"); ++assertEq(a.every(e => e < 100), true); ++assertEq(a.filter(e => e % 2 == 1).toString(), "1,3,5,9"); ++assertEq(a.find(e => e > 3), 5); ++assertEq(a.findIndex(e => e % 2 == 0), 3); ++assertEq(a.map(e => e * 10).toString(), "10,30,50,60,90"); ++assertEq(a.reduce((a, b) => a + b, ""), "13569"); ++assertEq(a.reduceRight((acc, e) => "(" + e + acc + ")", ""), "(1(3(5(6(9)))))"); ++assertEq(a.some(e => e % 2 == 0), true); ++ ++let s = ""; ++assertEq(a.forEach(e => s += e), undefined); ++assertEq(s, "13569"); ++ ++a.sort((a, b) => b - a); ++assertEq(a.toString(), "9,6,5,3,1"); ++ Property changes on: branches/2018Q1/www/waterfox/files/patch-bug1414768 ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: branches/2018Q1/www/waterfox/files/patch-bug1419166 =================================================================== --- branches/2018Q1/www/waterfox/files/patch-bug1419166 (nonexistent) +++ branches/2018Q1/www/waterfox/files/patch-bug1419166 (revision 464685) @@ -0,0 +1,144 @@ +commit 2b3039c02109 +Author: Andrea Marchesini +Date: Mon Nov 27 17:07:39 2017 +0100 + + Bug 1419166 - Use nsIPrincipal to decide if a SharedWorker should be shared, r=bkelly +--- + dom/workers/RuntimeService.cpp | 80 +++++++++++++++++------------------------- + dom/workers/RuntimeService.h | 2 +- + 2 files changed, 33 insertions(+), 49 deletions(-) + +diff --git dom/workers/RuntimeService.cpp dom/workers/RuntimeService.cpp +index 452f623aef2d..8e34fb398e10 100644 +--- dom/workers/RuntimeService.cpp ++++ dom/workers/RuntimeService.cpp +@@ -253,26 +253,6 @@ GetWorkerPref(const nsACString& aPref, + return result; + } + +-// This fn creates a key for a SharedWorker that contains the name, script +-// spec, and the serialized origin attributes: +-// "name|scriptSpec^key1=val1&key2=val2&key3=val3" +-void +-GenerateSharedWorkerKey(const nsACString& aScriptSpec, +- const nsAString& aName, +- const OriginAttributes& aAttrs, +- nsCString& aKey) +-{ +- nsAutoCString suffix; +- aAttrs.CreateSuffix(suffix); +- +- aKey.Truncate(); +- aKey.SetCapacity(aName.Length() + aScriptSpec.Length() + suffix.Length() + 2); +- aKey.Append(NS_ConvertUTF16toUTF8(aName)); +- aKey.Append('|'); +- aKey.Append(aScriptSpec); +- aKey.Append(suffix); +-} +- + void + LoadContextOptions(const char* aPrefName, void* /* aClosure */) + { +@@ -1602,16 +1582,23 @@ RuntimeService::RegisterWorker(WorkerPrivate* aWorkerPrivate) + } + + if (isSharedWorker) { +- const nsString& sharedWorkerName(aWorkerPrivate->WorkerName()); +- nsAutoCString key; +- GenerateSharedWorkerKey(sharedWorkerScriptSpec, sharedWorkerName, +- aWorkerPrivate->GetOriginAttributes(), key); +- MOZ_ASSERT(!domainInfo->mSharedWorkerInfos.Get(key)); ++#ifdef DEBUG ++ for (const UniquePtr& data : domainInfo->mSharedWorkerInfos) { ++ if (data->mScriptSpec == sharedWorkerScriptSpec && ++ data->mName == aWorkerPrivate->WorkerName() && ++ // We want to be sure that the window's principal subsumes the ++ // SharedWorker's principal and vice versa. ++ data->mWorkerPrivate->GetPrincipal()->Subsumes(aWorkerPrivate->GetPrincipal()) && ++ aWorkerPrivate->GetPrincipal()->Subsumes(data->mWorkerPrivate->GetPrincipal())) { ++ MOZ_CRASH("We should not instantiate a new SharedWorker!"); ++ } ++ } ++#endif + +- SharedWorkerInfo* sharedWorkerInfo = ++ UniquePtr sharedWorkerInfo( + new SharedWorkerInfo(aWorkerPrivate, sharedWorkerScriptSpec, +- sharedWorkerName); +- domainInfo->mSharedWorkerInfos.Put(key, sharedWorkerInfo); ++ aWorkerPrivate->WorkerName())); ++ domainInfo->mSharedWorkerInfos.AppendElement(Move(sharedWorkerInfo)); + } + } + +@@ -1671,18 +1658,11 @@ void + RuntimeService::RemoveSharedWorker(WorkerDomainInfo* aDomainInfo, + WorkerPrivate* aWorkerPrivate) + { +- for (auto iter = aDomainInfo->mSharedWorkerInfos.Iter(); +- !iter.Done(); +- iter.Next()) { +- SharedWorkerInfo* data = iter.UserData(); ++ for (uint32_t i = 0; i < aDomainInfo->mSharedWorkerInfos.Length(); ++i) { ++ const UniquePtr& data = ++ aDomainInfo->mSharedWorkerInfos[i]; + if (data->mWorkerPrivate == aWorkerPrivate) { +-#ifdef DEBUG +- nsAutoCString key; +- GenerateSharedWorkerKey(data->mScriptSpec, data->mName, +- aWorkerPrivate->GetOriginAttributes(), key); +- MOZ_ASSERT(iter.Key() == key); +-#endif +- iter.Remove(); ++ aDomainInfo->mSharedWorkerInfos.RemoveElementAt(i); + break; + } + } +@@ -2499,21 +2479,25 @@ RuntimeService::CreateSharedWorkerFromLoadInfo(JSContext* aCx, + { + MutexAutoLock lock(mMutex); + +- WorkerDomainInfo* domainInfo; +- SharedWorkerInfo* sharedWorkerInfo; +- + nsCString scriptSpec; + nsresult rv = aLoadInfo->mResolvedScriptURI->GetSpec(scriptSpec); + NS_ENSURE_SUCCESS(rv, rv); + + MOZ_ASSERT(aLoadInfo->mPrincipal); +- nsAutoCString key; +- GenerateSharedWorkerKey(scriptSpec, aName, +- aLoadInfo->mPrincipal->OriginAttributesRef(), key); + +- if (mDomainMap.Get(aLoadInfo->mDomain, &domainInfo) && +- domainInfo->mSharedWorkerInfos.Get(key, &sharedWorkerInfo)) { +- workerPrivate = sharedWorkerInfo->mWorkerPrivate; ++ WorkerDomainInfo* domainInfo; ++ if (mDomainMap.Get(aLoadInfo->mDomain, &domainInfo)) { ++ for (const UniquePtr& data : domainInfo->mSharedWorkerInfos) { ++ if (data->mScriptSpec == scriptSpec && ++ data->mName == aName && ++ // We want to be sure that the window's principal subsumes the ++ // SharedWorker's principal and vice versa. ++ aLoadInfo->mPrincipal->Subsumes(data->mWorkerPrivate->GetPrincipal()) && ++ data->mWorkerPrivate->GetPrincipal()->Subsumes(aLoadInfo->mPrincipal)) { ++ workerPrivate = data->mWorkerPrivate; ++ break; ++ } ++ } + } + } + +diff --git dom/workers/RuntimeService.h dom/workers/RuntimeService.h +index f7334896cd4c..45c8642adc85 100644 +--- dom/workers/RuntimeService.h ++++ dom/workers/RuntimeService.h +@@ -45,7 +45,7 @@ class RuntimeService final : public nsIObserver + nsTArray mActiveWorkers; + nsTArray mActiveServiceWorkers; + nsTArray mQueuedWorkers; +- nsClassHashtable mSharedWorkerInfos; ++ nsTArray> mSharedWorkerInfos; + uint32_t mChildWorkerCount; + + WorkerDomainInfo() Property changes on: branches/2018Q1/www/waterfox/files/patch-bug1419166 ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: branches/2018Q1/www/waterfox/files/patch-bug1421963 =================================================================== --- branches/2018Q1/www/waterfox/files/patch-bug1421963 (nonexistent) +++ branches/2018Q1/www/waterfox/files/patch-bug1421963 (revision 464685) @@ -0,0 +1,39 @@ +commit edbe55cb9057 +Author: Randell Jesup +Date: Thu Dec 7 13:24:46 2017 -0500 + + Bug 1421963: lock around SCTP input processing, not just the receive callback r=drno +--- + netwerk/sctp/datachannel/DataChannel.cpp | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git netwerk/sctp/datachannel/DataChannel.cpp netwerk/sctp/datachannel/DataChannel.cpp +index 4a0432469a80..6f13826ed7c6 100644 +--- netwerk/sctp/datachannel/DataChannel.cpp ++++ netwerk/sctp/datachannel/DataChannel.cpp +@@ -817,6 +817,7 @@ DataChannelConnection::SctpDtlsInput(TransportFlow *flow, + } + } + // Pass the data to SCTP ++ MutexAutoLock lock(mLock); + usrsctp_conninput(static_cast(this), data, len, 0); + } + +@@ -1224,7 +1225,7 @@ DataChannelConnection::SendDeferredMessages() + RefPtr channel; // we may null out the refs to this + + // This may block while something is modifying channels, but should not block for IO +- MutexAutoLock lock(mLock); ++ mLock.AssertCurrentThreadOwns(); + + LOG(("SendDeferredMessages called, pending type: %d", mPendingType)); + if (!mPendingType) { +@@ -2307,7 +2308,7 @@ DataChannelConnection::ReceiveCallback(struct socket* sock, void *data, size_t d + if (!data) { + usrsctp_close(sock); // SCTP has finished shutting down + } else { +- MutexAutoLock lock(mLock); ++ mLock.AssertCurrentThreadOwns(); + if (flags & MSG_NOTIFICATION) { + HandleNotification(static_cast(data), datalen); + } else { Property changes on: branches/2018Q1/www/waterfox/files/patch-bug1421963 ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: branches/2018Q1/www/waterfox/files/patch-bug1422643 =================================================================== --- branches/2018Q1/www/waterfox/files/patch-bug1422643 (nonexistent) +++ branches/2018Q1/www/waterfox/files/patch-bug1422643 (revision 464685) @@ -0,0 +1,80 @@ +commit dd719e911e2c +Author: Gijs Kruitbosch +Date: Wed Dec 20 18:57:48 2017 +0000 + + Bug 1422643 - deal with tabs in the protocol in js paste detection code, r=florian,valentin + + MozReview-Commit-ID: Ax5LGkIedkY + + --HG-- + extra : rebase_source : 85a9871a4de44652fe3bbfd455af389fe27d7714 + extra : source : 6ad5ec88a8982d83b8097fd76a2383aae94711c6 +--- + browser/base/content/browser.js | 20 ++++++++++++-------- + .../browser_removeUnsafeProtocolsFromURLBarPaste.js | 15 +++++++++++++++ + 2 files changed, 27 insertions(+), 8 deletions(-) + +diff --git browser/base/content/browser.js browser/base/content/browser.js +index e6e60cd202a0..5306800ebaca 100755 +--- browser/base/content/browser.js ++++ browser/base/content/browser.js +@@ -6053,14 +6053,18 @@ function middleMousePaste(event) { + function stripUnsafeProtocolOnPaste(pasteData) { + // Don't allow pasting javascript URIs since we don't support + // LOAD_FLAGS_DISALLOW_INHERIT_PRINCIPAL for those. +- let changed = false; +- let pasteDataNoJS = pasteData.replace(/\r?\n/g, "") +- .replace(/^(?:\W*javascript:)+/i, +- () => { +- changed = true; +- return ""; +- }); +- return changed ? pasteDataNoJS : pasteData; ++ while (true) { ++ let scheme = ""; ++ try { ++ scheme = Services.io.extractScheme(pasteData); ++ } catch (ex) { } ++ if (scheme != "javascript") { ++ break; ++ } ++ ++ pasteData = pasteData.substring(pasteData.indexOf(":") + 1); ++ } ++ return pasteData; + } + + // handleDroppedLink has the following 2 overloads: +diff --git browser/base/content/test/urlbar/browser_removeUnsafeProtocolsFromURLBarPaste.js browser/base/content/test/urlbar/browser_removeUnsafeProtocolsFromURLBarPaste.js +index 27129297b0a3..70ecaa048626 100644 +--- browser/base/content/test/urlbar/browser_removeUnsafeProtocolsFromURLBarPaste.js ++++ browser/base/content/test/urlbar/browser_removeUnsafeProtocolsFromURLBarPaste.js +@@ -9,6 +9,7 @@ var pairs = [ + ["javascript:document.domain", "document.domain"], + [" \u0001\u0002\u0003\u0004\u0005\u0006\u0007\u0008\u0009javascript:document.domain", "document.domain"], + ["java\nscript:foo", "foo"], ++ ["java\tscript:foo", "foo"], + ["http://\nexample.com", "http://example.com"], + ["http://\nexample.com\n", "http://example.com"], + ["data:text/html,hi", "data:text/html,hi"], +@@ -20,6 +21,20 @@ var pairs = [ + ["data:data:text/html,javascript:alert('hi!')", "data:data:text/html,javascript:alert('hi!')"], + ]; + ++let supportsNullBytes = AppConstants.platform == "macosx"; ++// Note that \u000d (\r) is missing here; we test it separately because it ++// makes the test sad on Windows. ++let gobbledygook = "\u000a\u000b\u000c\u000e\u000f\u0010\u0011\u0012\u0013\u0014javascript:foo"; ++if (supportsNullBytes) { ++ gobbledygook = "\u0000" + gobbledygook; ++} ++pairs.push([gobbledygook, "foo"]); ++ ++let supportsReturnWithoutNewline = AppConstants.platform != "win"; ++if (supportsReturnWithoutNewline) { ++ pairs.push(["java\rscript:foo", "foo"]); ++} ++ + var clipboardHelper = Cc["@mozilla.org/widget/clipboardhelper;1"].getService(Ci.nsIClipboardHelper); + + function paste(input, cb) { Property changes on: branches/2018Q1/www/waterfox/files/patch-bug1422643 ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: branches/2018Q1/www/waterfox/files/patch-bug1423173 =================================================================== --- branches/2018Q1/www/waterfox/files/patch-bug1423173 (nonexistent) +++ branches/2018Q1/www/waterfox/files/patch-bug1423173 (revision 464685) @@ -0,0 +1,43 @@ +commit 46e3052bc347 +Author: Kannan Vijayan +Date: Thu Jan 4 14:36:07 2018 -0500 + + Bug 1423173 - Check for shadowing indexed properties when adding elements. r=jandem +--- + js/src/jit-test/tests/arrays/bug1423173.js | 13 +++++++++++++ + js/src/jit/CacheIR.cpp | 3 +++ + 2 files changed, 16 insertions(+) + +diff --git js/src/jit-test/tests/arrays/bug1423173.js js/src/jit-test/tests/arrays/bug1423173.js +new file mode 100644 +index 000000000000..38e584ce3655 +--- /dev/null ++++ js/src/jit-test/tests/arrays/bug1423173.js +@@ -0,0 +1,13 @@ ++// |jit-test| --baseline-eager ++Array.prototype.push(1); ++Object.freeze([].__proto__); ++var x = []; ++var c = 0; ++for (var j = 0; j < 5; ++j) { ++ try { ++ x.push(function() {}); ++ } catch (e) { ++ c++; ++ } ++} ++assertEq(c, j); +diff --git js/src/jit/CacheIR.cpp js/src/jit/CacheIR.cpp +index 507788a7c182..fa5fc6bc6f91 100644 +--- js/src/jit/CacheIR.cpp ++++ js/src/jit/CacheIR.cpp +@@ -3406,6 +3406,9 @@ CanAttachAddElement(JSObject* obj, bool isInit) + if (!proto->isNative()) + return false; + ++ if (proto->as().denseElementsAreFrozen()) ++ return false; ++ + obj = proto; + } while (true); + Property changes on: branches/2018Q1/www/waterfox/files/patch-bug1423173 ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: branches/2018Q1/www/waterfox/files/patch-bug1424261 =================================================================== --- branches/2018Q1/www/waterfox/files/patch-bug1424261 (nonexistent) +++ branches/2018Q1/www/waterfox/files/patch-bug1424261 (revision 464685) @@ -0,0 +1,66 @@ +commit 0d38343e3589 +Author: Gijs Kruitbosch +Date: Tue Dec 12 10:53:10 2017 -0600 + + Bug 1424261, r=bz + + --HG-- + extra : rebase_source : 2bead652bbfd4cd251b431e04e3002c38c1a7a7b +--- + caps/nsScriptSecurityManager.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git caps/nsScriptSecurityManager.cpp caps/nsScriptSecurityManager.cpp +index 736eab415b8d..e557f4f1a0b7 100644 +--- caps/nsScriptSecurityManager.cpp ++++ caps/nsScriptSecurityManager.cpp +@@ -840,7 +840,7 @@ nsScriptSecurityManager::CheckLoadURIFlags(nsIURI *aSourceURI, + + // Check for chrome target URI + bool hasFlags = false; +- rv = NS_URIChainHasFlags(aTargetBaseURI, ++ rv = NS_URIChainHasFlags(aTargetURI, + nsIProtocolHandler::URI_IS_UI_RESOURCE, + &hasFlags); + NS_ENSURE_SUCCESS(rv, rv); + +commit 3c59d5240166 +Author: Gijs Kruitbosch +Date: Tue Dec 12 10:53:50 2017 -0600 + + Bug 1424261, r=valentin + + --HG-- + extra : rebase_source : 9f4c9c619dbccc2575b2a9d3e4304a54d41acad5 +--- + image/decoders/icon/nsIconURI.cpp | 10 +++++++++- + 1 file changed, 9 insertions(+), 1 deletion(-) + +diff --git image/decoders/icon/nsIconURI.cpp image/decoders/icon/nsIconURI.cpp +index 5958bd9d1436..5f096674bd35 100644 +--- image/decoders/icon/nsIconURI.cpp ++++ image/decoders/icon/nsIconURI.cpp +@@ -218,7 +218,10 @@ nsMozIconURI::SetSpec(const nsACString& aSpec) + + nsAutoCString iconSpec(aSpec); + if (!Substring(iconSpec, 0, +- MOZICON_SCHEME_LEN).EqualsLiteral(MOZICON_SCHEME)) { ++ MOZICON_SCHEME_LEN).EqualsLiteral(MOZICON_SCHEME) || ++ (!Substring(iconSpec, MOZICON_SCHEME_LEN, 7).EqualsLiteral("file://") && ++ // Checking for the leading '//' will match both the '//stock/' and '//.foo' cases: ++ !Substring(iconSpec, MOZICON_SCHEME_LEN, 2).EqualsLiteral("//"))) { + return NS_ERROR_MALFORMED_URI; + } + +@@ -298,6 +301,11 @@ nsMozIconURI::SetSpec(const nsACString& aSpec) + ioService->NewURI(iconPath, nullptr, nullptr, getter_AddRefs(uri)); + mIconURL = do_QueryInterface(uri); + if (mIconURL) { ++ // The inner URI should be a 'file:' one. If not, bail. ++ bool isFile = false; ++ if (!NS_SUCCEEDED(mIconURL->SchemeIs("file", &isFile)) || !isFile) { ++ return NS_ERROR_MALFORMED_URI; ++ } + mFileName.Truncate(); + } else if (mFileName.IsEmpty()) { + return NS_ERROR_MALFORMED_URI; Property changes on: branches/2018Q1/www/waterfox/files/patch-bug1424261 ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: branches/2018Q1/www/waterfox/files/patch-bug1425780 =================================================================== --- branches/2018Q1/www/waterfox/files/patch-bug1425780 (revision 464684) +++ branches/2018Q1/www/waterfox/files/patch-bug1425780 (revision 464685) @@ -1,34 +1,34 @@ -commit e5fb39219394 (release/branches/default/tip, origin/release) +commit e5fb39219394 Author: Michael Froman Date: Thu Jan 11 21:38:36 2018 -0500 Bug 1425780 - Don't allow queue-jumping for gathering state change events. r=bwc, a=abillings --HG-- extra : source : 2fa8c2b1c9917c035e0d9cc7f7b18549d67e5ade --- .../signaling/src/peerconnection/PeerConnectionImpl.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp index edb07486b45a..6f9d92cde978 100644 --- media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp +++ media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp @@ -3585,12 +3585,11 @@ PeerConnectionImpl::IceGatheringStateChange( return; } WrappableJSErrorResult rv; - RUN_ON_THREAD(mThread, - WrapRunnable(pco, - &PeerConnectionObserver::OnStateChange, - PCObserverStateType::IceGatheringState, - rv, static_cast(nullptr)), - NS_DISPATCH_NORMAL); + mThread->Dispatch(WrapRunnable(pco, + &PeerConnectionObserver::OnStateChange, + PCObserverStateType::IceGatheringState, + rv, static_cast(nullptr)), + NS_DISPATCH_NORMAL); if (mIceGatheringState == PCImplIceGatheringState::Complete) { SendLocalIceCandidateToContent(0, "", ""); Index: branches/2018Q1/www/waterfox/files/patch-bug1426002 =================================================================== --- branches/2018Q1/www/waterfox/files/patch-bug1426002 (nonexistent) +++ branches/2018Q1/www/waterfox/files/patch-bug1426002 (revision 464685) @@ -0,0 +1,34 @@ +commit 7ee28da3b920 +Author: Boris Zbarsky +Date: Thu Dec 21 15:08:49 2017 -0500 + + Bug 1426002. Bail out of document.open if beforeunload tears things down. r=mystor + + MozReview-Commit-ID: GDozCq4Qbni +--- + dom/html/nsHTMLDocument.cpp | 12 ++++++++++++ + 1 file changed, 12 insertions(+) + +diff --git dom/html/nsHTMLDocument.cpp dom/html/nsHTMLDocument.cpp +index 5ad609c0802b..ce974748034f 100644 +--- dom/html/nsHTMLDocument.cpp ++++ dom/html/nsHTMLDocument.cpp +@@ -1598,6 +1598,18 @@ nsHTMLDocument::Open(JSContext* cx, + nsCOMPtr ret = this; + return ret.forget(); + } ++ ++ // Now double-check that our invariants still hold. ++ if (!mScriptGlobalObject) { ++ nsCOMPtr ret = this; ++ return ret.forget(); ++ } ++ ++ nsPIDOMWindowOuter* outer = GetWindow(); ++ if (!outer || (GetInnerWindow() != outer->GetCurrentInnerWindow())) { ++ nsCOMPtr ret = this; ++ return ret.forget(); ++ } + } + + nsCOMPtr webnav(do_QueryInterface(shell)); Property changes on: branches/2018Q1/www/waterfox/files/patch-bug1426002 ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: branches/2018Q1/www/waterfox/files/patch-bug1430511 =================================================================== --- branches/2018Q1/www/waterfox/files/patch-bug1430511 (nonexistent) +++ branches/2018Q1/www/waterfox/files/patch-bug1430511 (revision 464685) @@ -0,0 +1,72 @@ +commit 2050bcb92e39 +Author: Gijs Kruitbosch +Date: Wed Jan 17 00:08:32 2018 +0000 + + Bug 1430511, r=jaws + + --HG-- + extra : rebase_source : e5ecfb98c1bbd1cd5f9a71be13416a1d041350ef +--- + browser/components/preferences/in-content/findInPage.js | 16 +++++++++++++--- + .../chrome/browser/preferences/preferences.properties | 8 +++++--- + 2 files changed, 18 insertions(+), 6 deletions(-) + +diff --git browser/base/content/test/static/browser_misused_characters_in_strings.js browser/base/content/test/static/browser_misused_characters_in_strings.js +index 9a8168bdb360..10b6796d3580 100644 +--- browser/base/content/test/static/browser_misused_characters_in_strings.js ++++ browser/base/content/test/static/browser_misused_characters_in_strings.js +@@ -110,7 +110,7 @@ let gWhitelist = [{ + type: "single-quote" + }, { + file: "preferences.properties", +- key: "searchResults.needHelp2", ++ key: "searchResults.needHelp3", + type: "double-quote" + } + ]; +diff --git browser/components/preferences/in-content-new/findInPage.js browser/components/preferences/in-content-new/findInPage.js +index a822ec04e728..d54ba7b0e355 100644 +--- browser/components/preferences/in-content-new/findInPage.js ++++ browser/components/preferences/in-content-new/findInPage.js +@@ -264,9 +264,19 @@ var gSearchResultsPane = { + strings.getFormattedString("searchResults.sorryMessageUnix", [this.query]); + let helpUrl = Services.urlFormatter.formatURLPref("app.support.baseURL") + "preferences"; + let brandName = document.getElementById("bundleBrand").getString("brandShortName"); +- // eslint-disable-next-line no-unsanitized/property +- document.getElementById("need-help").innerHTML = +- strings.getFormattedString("searchResults.needHelp2", [helpUrl, brandName]); ++ let helpString = strings.getString("searchResults.needHelp3"); ++ let helpItems = helpString.split(/%(?:\$1)?S/); ++ let helpContainer = document.getElementById("need-help"); ++ helpContainer.innerHTML = ""; ++ helpContainer.appendChild(document.createTextNode(helpItems[0])); ++ let link = document.createElement("label"); ++ link.className = "text-link"; ++ link.setAttribute("href", helpUrl); ++ link.textContent = strings.getFormattedString("searchResults.needHelpSupportLink", [brandName]); ++ helpContainer.appendChild(link); ++ if (helpItems[1]) { ++ helpContainer.appendChild(document.createTextNode(helpItems[1])); ++ } + } else { + // Creating tooltips for all the instances found + this.listSearchTooltips.forEach((anchorNode) => this.createSearchTooltip(anchorNode, this.query)); +diff --git browser/locales/en-US/chrome/browser/preferences/preferences.properties browser/locales/en-US/chrome/browser/preferences/preferences.properties +index 9066145c3c48..73410a196ebf 100644 +--- browser/locales/en-US/chrome/browser/preferences/preferences.properties ++++ browser/locales/en-US/chrome/browser/preferences/preferences.properties +@@ -263,9 +263,11 @@ searchInput.labelUnix=Find in Preferences + # LOCALIZATION NOTE %S will be replaced by the word being searched + searchResults.sorryMessageWin=Sorry! There are no results in Options for ā€œ%Sā€. + searchResults.sorryMessageUnix=Sorry! There are no results in Preferences for ā€œ%Sā€. +-# LOCALIZATION NOTE (searchResults.needHelp2): %1$S is a link to SUMO, %2$S is +-# the browser name +-searchResults.needHelp2=Need help? Visit %2$S Support ++# LOCALIZATION NOTE (searchResults.needHelp3): %S will be replaced with a link to the support page. ++# The label of the link is in searchResults.needHelpSupportLink . ++searchResults.needHelp3=Need help? Visit %S ++# LOCALIZATION NOTE (searchResults.needHelpSupportLink): %S will be replaced with the browser name. ++searchResults.needHelpSupportLink=%S Support + + # LOCALIZATION NOTE %S is the default value of the `dom.ipc.processCount` pref. + defaultContentProcessCount=%S (default) Property changes on: branches/2018Q1/www/waterfox/files/patch-bug1430511 ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: branches/2018Q1/www/waterfox/files/patch-bug1438425 =================================================================== --- branches/2018Q1/www/waterfox/files/patch-bug1438425 (nonexistent) +++ branches/2018Q1/www/waterfox/files/patch-bug1438425 (revision 464685) @@ -0,0 +1,662 @@ +commit f324bee78e24 +Author: Jeff Muizelaar +Date: Wed Mar 7 11:54:01 2018 -0500 + + Bug 1438425 - Delete DocumentRenderer. r=jesup, r=jgilbert, a=RyanVM + + It is unused. +--- + dom/canvas/CanvasRenderingContext2D.cpp | 2 - + dom/canvas/DocumentRendererChild.cpp | 94 --------------------------------- + dom/canvas/DocumentRendererChild.h | 37 ------------- + dom/canvas/DocumentRendererParent.cpp | 63 ---------------------- + dom/canvas/DocumentRendererParent.h | 44 --------------- + dom/canvas/WebGL2ContextState.cpp | 1 + + dom/canvas/WebGLContextDraw.cpp | 1 + + dom/canvas/WebGLFramebuffer.cpp | 3 ++ + dom/canvas/WebGLObjectModel.h | 12 +++++ + dom/canvas/WebGLProgram.cpp | 1 + + dom/canvas/WebGLTransformFeedback.cpp | 1 + + dom/canvas/moz.build | 7 --- + dom/ipc/PBrowser.ipdl | 20 ------- + dom/ipc/PDocumentRenderer.ipdl | 25 --------- + dom/ipc/TabChild.cpp | 52 ------------------ + dom/ipc/TabChild.h | 21 -------- + dom/ipc/TabParent.cpp | 19 ------- + dom/ipc/TabParent.h | 11 ---- + dom/ipc/moz.build | 1 - + 19 files changed, 19 insertions(+), 396 deletions(-) + +diff --git dom/canvas/CanvasRenderingContext2D.cpp dom/canvas/CanvasRenderingContext2D.cpp +index 6c3f5878e724..f314f2022baf 100644 +--- dom/canvas/CanvasRenderingContext2D.cpp ++++ dom/canvas/CanvasRenderingContext2D.cpp +@@ -91,8 +91,6 @@ + #include "mozilla/gfx/DataSurfaceHelpers.h" + #include "mozilla/gfx/PatternHelpers.h" + #include "mozilla/gfx/Swizzle.h" +-#include "mozilla/ipc/DocumentRendererParent.h" +-#include "mozilla/ipc/PDocumentRendererParent.h" + #include "mozilla/layers/PersistentBufferProvider.h" + #include "mozilla/MathAlgorithms.h" + #include "mozilla/Preferences.h" +diff --git dom/canvas/DocumentRendererChild.cpp dom/canvas/DocumentRendererChild.cpp +deleted file mode 100644 +index edfc4746a72c..000000000000 +--- dom/canvas/DocumentRendererChild.cpp ++++ /dev/null +@@ -1,94 +0,0 @@ +-/* This Source Code Form is subject to the terms of the Mozilla Public +- * License, v. 2.0. If a copy of the MPL was not distributed with this +- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +- +-#include "mozilla/ipc/DocumentRendererChild.h" +- +-#include "base/basictypes.h" +- +-#include "gfx2DGlue.h" +-#include "gfxContext.h" +-#include "gfxPattern.h" +-#include "mozilla/gfx/2D.h" +-#include "mozilla/RefPtr.h" +-#include "nsPIDOMWindow.h" +-#include "nsIDOMWindow.h" +-#include "nsIDocShell.h" +-#include "nsIInterfaceRequestorUtils.h" +-#include "nsComponentManagerUtils.h" +-#include "nsCSSParser.h" +-#include "nsPresContext.h" +-#include "nsCOMPtr.h" +-#include "nsColor.h" +-#include "nsLayoutUtils.h" +-#include "nsContentUtils.h" +-#include "nsCSSValue.h" +-#include "nsRuleNode.h" +-#include "mozilla/gfx/Matrix.h" +- +-using namespace mozilla; +-using namespace mozilla::gfx; +-using namespace mozilla::ipc; +- +-DocumentRendererChild::DocumentRendererChild() +-{} +- +-DocumentRendererChild::~DocumentRendererChild() +-{} +- +-bool +-DocumentRendererChild::RenderDocument(nsPIDOMWindowOuter* window, +- const nsRect& documentRect, +- const mozilla::gfx::Matrix& transform, +- const nsString& aBGColor, +- uint32_t renderFlags, +- bool flushLayout, +- const nsIntSize& renderSize, +- nsCString& data) +-{ +- if (flushLayout) +- nsContentUtils::FlushLayoutForTree(window); +- +- RefPtr presContext; +- if (window) { +- nsIDocShell* docshell = window->GetDocShell(); +- if (docshell) { +- docshell->GetPresContext(getter_AddRefs(presContext)); +- } +- } +- if (!presContext) +- return false; +- +- nsCSSParser parser; +- nsCSSValue bgColorValue; +- if (!parser.ParseColorString(aBGColor, nullptr, 0, bgColorValue)) { +- return false; +- } +- +- nscolor bgColor; +- if (!nsRuleNode::ComputeColor(bgColorValue, presContext, nullptr, bgColor)) { +- return false; +- } +- +- // Draw directly into the output array. +- data.SetLength(renderSize.width * renderSize.height * 4); +- +- RefPtr dt = +- Factory::CreateDrawTargetForData(gfxPlatform::GetPlatform()->GetSoftwareBackend(), +- reinterpret_cast(data.BeginWriting()), +- IntSize(renderSize.width, renderSize.height), +- 4 * renderSize.width, +- SurfaceFormat::B8G8R8A8); +- if (!dt || !dt->IsValid()) { +- gfxWarning() << "DocumentRendererChild::RenderDocument failed to Factory::CreateDrawTargetForData"; +- return false; +- } +- RefPtr ctx = gfxContext::CreateOrNull(dt); +- MOZ_ASSERT(ctx); // already checked the draw target above +- ctx->SetMatrix(mozilla::gfx::ThebesMatrix(transform)); +- +- nsCOMPtr shell = presContext->PresShell(); +- shell->RenderDocument(documentRect, renderFlags, bgColor, ctx); +- +- return true; +-} +diff --git dom/canvas/DocumentRendererChild.h dom/canvas/DocumentRendererChild.h +deleted file mode 100644 +index 80fe0ddf64bc..000000000000 +--- dom/canvas/DocumentRendererChild.h ++++ /dev/null +@@ -1,37 +0,0 @@ +-/* This Source Code Form is subject to the terms of the Mozilla Public +- * License, v. 2.0. If a copy of the MPL was not distributed with this +- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +- +-#ifndef mozilla_dom_DocumentRendererChild +-#define mozilla_dom_DocumentRendererChild +- +-#include "gfxContext.h" +-#include "mozilla/ipc/PDocumentRendererChild.h" +-#include "nsString.h" +- +-class nsIDOMWindow; +- +-namespace mozilla { +-namespace ipc { +- +-class DocumentRendererChild : public PDocumentRendererChild +-{ +-public: +- DocumentRendererChild(); +- virtual ~DocumentRendererChild(); +- +- bool RenderDocument(nsPIDOMWindowOuter* window, +- const nsRect& documentRect, const gfx::Matrix& transform, +- const nsString& bgcolor, +- uint32_t renderFlags, bool flushLayout, +- const nsIntSize& renderSize, nsCString& data); +- +-private: +- +- DISALLOW_EVIL_CONSTRUCTORS(DocumentRendererChild); +-}; +- +-} // namespace ipc +-} // namespace mozilla +- +-#endif +diff --git dom/canvas/DocumentRendererParent.cpp dom/canvas/DocumentRendererParent.cpp +deleted file mode 100644 +index 0783dee1ab79..000000000000 +--- dom/canvas/DocumentRendererParent.cpp ++++ /dev/null +@@ -1,63 +0,0 @@ +-/* This Source Code Form is subject to the terms of the Mozilla Public +- * License, v. 2.0. If a copy of the MPL was not distributed with this +- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +- +-#include "mozilla/ipc/DocumentRendererParent.h" +- +-#include "gfx2DGlue.h" +-#include "mozilla/gfx/2D.h" +-#include "mozilla/gfx/PathHelpers.h" +-#include "mozilla/RefPtr.h" +-#include "nsICanvasRenderingContextInternal.h" +- +-using namespace mozilla; +-using namespace mozilla::gfx; +-using namespace mozilla::ipc; +- +-DocumentRendererParent::DocumentRendererParent() +-{} +- +-DocumentRendererParent::~DocumentRendererParent() +-{} +- +-void DocumentRendererParent::SetCanvasContext(nsICanvasRenderingContextInternal* aCanvas, +- gfxContext* ctx) +-{ +- mCanvas = aCanvas; +- mCanvasContext = ctx; +-} +- +-void DocumentRendererParent::DrawToCanvas(const nsIntSize& aSize, +- const nsCString& aData) +-{ +- if (!mCanvas || !mCanvasContext) +- return; +- +- DrawTarget* drawTarget = mCanvasContext->GetDrawTarget(); +- Rect rect(0, 0, aSize.width, aSize.height); +- MaybeSnapToDevicePixels(rect, *drawTarget, true); +- RefPtr dataSurface = +- Factory::CreateWrappingDataSourceSurface(reinterpret_cast(const_cast(aData).BeginWriting()), +- aSize.width * 4, +- IntSize(aSize.width, aSize.height), +- SurfaceFormat::B8G8R8A8); +- SurfacePattern pattern(dataSurface, ExtendMode::CLAMP); +- drawTarget->FillRect(rect, pattern); +- +- gfxRect damageRect = mCanvasContext->UserToDevice(ThebesRect(rect)); +- mCanvas->Redraw(damageRect); +-} +- +-void +-DocumentRendererParent::ActorDestroy(ActorDestroyReason aWhy) +-{ +- // Implement me! Bug 1005139 +-} +- +-mozilla::ipc::IPCResult +-DocumentRendererParent::Recv__delete__(const nsIntSize& renderedSize, +- const nsCString& data) +-{ +- DrawToCanvas(renderedSize, data); +- return IPC_OK(); +-} +diff --git dom/canvas/DocumentRendererParent.h dom/canvas/DocumentRendererParent.h +deleted file mode 100644 +index 7cfe5322795f..000000000000 +--- dom/canvas/DocumentRendererParent.h ++++ /dev/null +@@ -1,44 +0,0 @@ +-/* This Source Code Form is subject to the terms of the Mozilla Public +- * License, v. 2.0. If a copy of the MPL was not distributed with this +- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +- +-#ifndef mozilla_dom_DocumentRendererParent +-#define mozilla_dom_DocumentRendererParent +- +-#include "gfxContext.h" +-#include "mozilla/ipc/PDocumentRendererParent.h" +-#include "nsCOMPtr.h" +-#include "nsString.h" +- +-class nsICanvasRenderingContextInternal; +- +-namespace mozilla { +-namespace ipc { +- +-class DocumentRendererParent : public PDocumentRendererParent +-{ +-public: +- DocumentRendererParent(); +- virtual ~DocumentRendererParent(); +- +- void SetCanvasContext(nsICanvasRenderingContextInternal* aCanvas, +- gfxContext* ctx); +- void DrawToCanvas(const nsIntSize& renderedSize, +- const nsCString& aData); +- +- virtual void ActorDestroy(ActorDestroyReason aWhy) override; +- +- virtual mozilla::ipc::IPCResult Recv__delete__(const nsIntSize& renderedSize, +- const nsCString& data) override; +- +-private: +- nsCOMPtr mCanvas; +- RefPtr mCanvasContext; +- +- DISALLOW_EVIL_CONSTRUCTORS(DocumentRendererParent); +-}; +- +-} // namespace ipc +-} // namespace mozilla +- +-#endif +diff --git dom/canvas/WebGL2ContextState.cpp dom/canvas/WebGL2ContextState.cpp +index be0a7a3cbdea..e6283b12dd9e 100644 +--- dom/canvas/WebGL2ContextState.cpp ++++ dom/canvas/WebGL2ContextState.cpp +@@ -7,6 +7,7 @@ + #include "WebGL2Context.h" + + #include "GLContext.h" ++#include "GLScreenBuffer.h" + #include "WebGLBuffer.h" + #include "WebGLContextUtils.h" + #include "WebGLFramebuffer.h" +diff --git dom/canvas/WebGLFramebuffer.cpp dom/canvas/WebGLFramebuffer.cpp +index e5150d5ddd43..e2fdea239632 100644 +--- dom/canvas/WebGLFramebuffer.cpp ++++ dom/canvas/WebGLFramebuffer.cpp +@@ -17,7 +17,9 @@ + #include "WebGLContextUtils.h" + #include "WebGLExtensions.h" + #include "WebGLRenderbuffer.h" ++#include "WebGLShader.h" + #include "WebGLTexture.h" ++#include "WebGLObjectModel.h" + + namespace mozilla { + +@@ -1990,6 +1992,7 @@ ImplCycleCollectionTraverse(nsCycleCollectionTraversalCallback& callback, + } + } + ++ + NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(WebGLFramebuffer, + mDepthAttachment, + mStencilAttachment, +diff --git dom/canvas/WebGLObjectModel.h dom/canvas/WebGLObjectModel.h +index e19d2fd8e44d..b18b790c036e 100644 +--- dom/canvas/WebGLObjectModel.h ++++ dom/canvas/WebGLObjectModel.h +@@ -15,6 +15,7 @@ namespace mozilla { + template class LinkedList; + class WebGLContext; + ++ + //// + + // This class is a mixin for objects that are tied to a specific +@@ -352,6 +353,16 @@ ImplCycleCollectionUnlink(mozilla::WebGLRefPtr& field) + field = nullptr; + } + ++template ++inline void ++ImplCycleCollectionTraverse(nsCycleCollectionTraversalCallback& callback, ++ mozilla::WebGLRefPtr& field, ++ const char* name, ++ uint32_t flags = 0) ++{ ++ CycleCollectionNoteChild(callback, field.get(), name, flags); ++} ++ + template + inline void + ImplCycleCollectionTraverse(nsCycleCollectionTraversalCallback& callback, +@@ -362,4 +373,5 @@ ImplCycleCollectionTraverse(nsCycleCollectionTraversalCallback& callback, + CycleCollectionNoteChild(callback, field.get(), name, flags); + } + ++ + #endif +diff --git dom/canvas/WebGLProgram.cpp dom/canvas/WebGLProgram.cpp +index 365b8e178af8..9e48a240332c 100644 +--- dom/canvas/WebGLProgram.cpp ++++ dom/canvas/WebGLProgram.cpp +@@ -17,6 +17,7 @@ + #include "WebGLTransformFeedback.h" + #include "WebGLUniformLocation.h" + #include "WebGLValidateStrings.h" ++#include "WebGLObjectModel.h" + + namespace mozilla { + +diff --git dom/canvas/moz.build dom/canvas/moz.build +index ac4172318a7e..b33b09d7bc70 100644 +--- dom/canvas/moz.build ++++ dom/canvas/moz.build +@@ -49,11 +49,6 @@ EXPORTS += [ + 'nsICanvasRenderingContextInternal.h', + ] + +-EXPORTS.mozilla.ipc += [ +- 'DocumentRendererChild.h', +- 'DocumentRendererParent.h', +-] +- + EXPORTS.mozilla.dom += [ + 'BasicRenderingContext2D.h', + 'CanvasGradient.h', +@@ -78,8 +73,6 @@ UNIFIED_SOURCES += [ + 'CanvasRenderingContext2D.cpp', + 'CanvasRenderingContextHelper.cpp', + 'CanvasUtils.cpp', +- 'DocumentRendererChild.cpp', +- 'DocumentRendererParent.cpp', + 'ImageBitmap.cpp', + 'ImageBitmapColorUtils.cpp', + 'ImageBitmapRenderingContext.cpp', +diff --git dom/ipc/PBrowser.ipdl dom/ipc/PBrowser.ipdl +index 5525931e914f..90f559063c4d 100644 +--- dom/ipc/PBrowser.ipdl ++++ dom/ipc/PBrowser.ipdl +@@ -9,7 +9,6 @@ include protocol PColorPicker; + include protocol PContent; + include protocol PContentBridge; + include protocol PDocAccessible; +-include protocol PDocumentRenderer; + include protocol PFilePicker; + include protocol PIndexedDBPermissionRequest; + include protocol PRenderFrame; +@@ -110,7 +109,6 @@ nested(upto inside_cpow) sync protocol PBrowser + + manages PColorPicker; + manages PDocAccessible; +- manages PDocumentRenderer; + manages PFilePicker; + manages PIndexedDBPermissionRequest; + manages PRenderFrame; +@@ -698,24 +696,6 @@ child: + + async LoadRemoteScript(nsString aURL, bool aRunInGlobalScope); + +- /** +- * Create a asynchronous request to render whatever document is +- * loaded in the child when this message arrives. When the +- * request finishes, PDocumentRenderer:__delete__ is sent back to +- * this side to notify completion. +- * +- * |documentRect| is the area of the remote document to draw, +- * transformed by |transform|. The rendered area will have the +- * default background color |bgcolor|. |renderFlags| are the +- * nsIPresShell::RenderDocument() flags to use on the remote side, +- * and if true, |flushLayout| will do just that before rendering +- * the document. The rendered image will be of size |renderSize|. +- */ +- async PDocumentRenderer(nsRect documentRect, Matrix transform, +- nsString bgcolor, +- uint32_t renderFlags, bool flushLayout, +- IntSize renderSize); +- + /** + * Sent by the chrome process when it no longer wants this remote + * . The child side cleans up in response, then +diff --git dom/ipc/PDocumentRenderer.ipdl dom/ipc/PDocumentRenderer.ipdl +deleted file mode 100644 +index bdaed45d7414..000000000000 +--- dom/ipc/PDocumentRenderer.ipdl ++++ /dev/null +@@ -1,25 +0,0 @@ +-/* -*- Mode: C++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 8 -*- */ +-/* This Source Code Form is subject to the terms of the Mozilla Public +- * License, v. 2.0. If a copy of the MPL was not distributed with this +- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +- +-include protocol PBrowser; +- +-include "mozilla/GfxMessageUtils.h"; +- +-using nsIntSize from "nsSize.h"; +- +-namespace mozilla { +-namespace ipc { +- +-protocol PDocumentRenderer +-{ +- manager PBrowser; +- +-parent: +- // Returns the width and height, in pixels, of the returned ARGB32 data. +- async __delete__(nsIntSize renderedSize, nsCString data); +-}; +- +-} // namespace ipc +-} // namespace mozilla +diff --git dom/ipc/TabChild.cpp dom/ipc/TabChild.cpp +index 5a14fd9dc0ff..44f366056c2a 100644 +--- dom/ipc/TabChild.cpp ++++ dom/ipc/TabChild.cpp +@@ -23,7 +23,6 @@ + #include "mozilla/dom/PaymentRequestChild.h" + #include "mozilla/dom/TelemetryScrollProbe.h" + #include "mozilla/IMEStateManager.h" +-#include "mozilla/ipc/DocumentRendererChild.h" + #include "mozilla/ipc/URIUtils.h" + #include "mozilla/layers/APZChild.h" + #include "mozilla/layers/APZCCallbackHelper.h" +@@ -2027,60 +2026,6 @@ TabChild::DeallocPDocAccessibleChild(a11y::PDocAccessibleChild* aChild) + return true; + } + +-PDocumentRendererChild* +-TabChild::AllocPDocumentRendererChild(const nsRect& documentRect, +- const mozilla::gfx::Matrix& transform, +- const nsString& bgcolor, +- const uint32_t& renderFlags, +- const bool& flushLayout, +- const nsIntSize& renderSize) +-{ +- return new DocumentRendererChild(); +-} +- +-bool +-TabChild::DeallocPDocumentRendererChild(PDocumentRendererChild* actor) +-{ +- delete actor; +- return true; +-} +- +-mozilla::ipc::IPCResult +-TabChild::RecvPDocumentRendererConstructor(PDocumentRendererChild* actor, +- const nsRect& documentRect, +- const mozilla::gfx::Matrix& transform, +- const nsString& bgcolor, +- const uint32_t& renderFlags, +- const bool& flushLayout, +- const nsIntSize& renderSize) +-{ +- DocumentRendererChild *render = static_cast(actor); +- +- nsCOMPtr browser = do_QueryInterface(WebNavigation()); +- if (!browser) +- return IPC_OK(); // silently ignore +- nsCOMPtr window; +- if (NS_FAILED(browser->GetContentDOMWindow(getter_AddRefs(window))) || +- !window) +- { +- return IPC_OK(); // silently ignore +- } +- +- nsCString data; +- bool ret = render->RenderDocument(nsPIDOMWindowOuter::From(window), +- documentRect, transform, +- bgcolor, +- renderFlags, flushLayout, +- renderSize, data); +- if (!ret) +- return IPC_OK(); // silently ignore +- +- if (!PDocumentRendererChild::Send__delete__(actor, renderSize, data)) { +- return IPC_FAIL_NO_REASON(this); +- } +- return IPC_OK(); +-} +- + PColorPickerChild* + TabChild::AllocPColorPickerChild(const nsString&, const nsString&) + { +diff --git dom/ipc/TabChild.h dom/ipc/TabChild.h +index af01a50542ac..1b1e580b29e6 100644 +--- dom/ipc/TabChild.h ++++ dom/ipc/TabChild.h +@@ -456,27 +456,6 @@ public: + + virtual bool DeallocPDocAccessibleChild(PDocAccessibleChild*) override; + +- virtual PDocumentRendererChild* +- AllocPDocumentRendererChild(const nsRect& aDocumentRect, +- const gfx::Matrix& aTransform, +- const nsString& aBggcolor, +- const uint32_t& aRenderFlags, +- const bool& aFlushLayout, +- const nsIntSize& arenderSize) override; +- +- virtual bool +- DeallocPDocumentRendererChild(PDocumentRendererChild* aCctor) override; +- +- virtual mozilla::ipc::IPCResult +- RecvPDocumentRendererConstructor(PDocumentRendererChild* aActor, +- const nsRect& aDocumentRect, +- const gfx::Matrix& aTransform, +- const nsString& aBgcolor, +- const uint32_t& aRenderFlags, +- const bool& aFlushLayout, +- const nsIntSize& aRenderSize) override; +- +- + virtual PColorPickerChild* + AllocPColorPickerChild(const nsString& aTitle, + const nsString& aInitialColor) override; +diff --git dom/ipc/TabParent.cpp dom/ipc/TabParent.cpp +index e6eac09db4aa..8468343b8930 100644 +--- dom/ipc/TabParent.cpp ++++ dom/ipc/TabParent.cpp +@@ -26,7 +26,6 @@ + #include "mozilla/gfx/GPUProcessManager.h" + #include "mozilla/Hal.h" + #include "mozilla/IMEStateManager.h" +-#include "mozilla/ipc/DocumentRendererParent.h" + #include "mozilla/jsipc/CrossProcessObjectWrappers.h" + #include "mozilla/layers/AsyncDragMetrics.h" + #include "mozilla/layers/InputAPZContext.h" +@@ -982,24 +981,6 @@ TabParent::GetTopLevelDocAccessible() const + return nullptr; + } + +-PDocumentRendererParent* +-TabParent::AllocPDocumentRendererParent(const nsRect& documentRect, +- const gfx::Matrix& transform, +- const nsString& bgcolor, +- const uint32_t& renderFlags, +- const bool& flushLayout, +- const nsIntSize& renderSize) +-{ +- return new DocumentRendererParent(); +-} +- +-bool +-TabParent::DeallocPDocumentRendererParent(PDocumentRendererParent* actor) +-{ +- delete actor; +- return true; +-} +- + PFilePickerParent* + TabParent::AllocPFilePickerParent(const nsString& aTitle, const int16_t& aMode) + { +diff --git dom/ipc/TabParent.h dom/ipc/TabParent.h +index 1f75d188d92e..0472dad56e97 100644 +--- dom/ipc/TabParent.h ++++ dom/ipc/TabParent.h +@@ -468,17 +468,6 @@ public: + const ScrollableLayerGuid& aGuid, + uint64_t aInputBlockId); + +- virtual PDocumentRendererParent* +- AllocPDocumentRendererParent(const nsRect& documentRect, +- const gfx::Matrix& transform, +- const nsString& bgcolor, +- const uint32_t& renderFlags, +- const bool& flushLayout, +- const nsIntSize& renderSize) override; +- +- virtual bool +- DeallocPDocumentRendererParent(PDocumentRendererParent* actor) override; +- + virtual PFilePickerParent* + AllocPFilePickerParent(const nsString& aTitle, + const int16_t& aMode) override; +diff --git dom/ipc/moz.build dom/ipc/moz.build +index fa7d4a9ef549..4880a69f00ec 100644 +--- dom/ipc/moz.build ++++ dom/ipc/moz.build +@@ -91,7 +91,6 @@ IPDL_SOURCES += [ + 'PContentPermission.ipdlh', + 'PContentPermissionRequest.ipdl', + 'PCycleCollectWithLogs.ipdl', +- 'PDocumentRenderer.ipdl', + 'PFilePicker.ipdl', + 'PPluginWidget.ipdl', + 'PProcessHangMonitor.ipdl', Property changes on: branches/2018Q1/www/waterfox/files/patch-bug1438425 ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: branches/2018Q1/www/waterfox/files/patch-bug1439396 =================================================================== --- branches/2018Q1/www/waterfox/files/patch-bug1439396 (nonexistent) +++ branches/2018Q1/www/waterfox/files/patch-bug1439396 (revision 464685) @@ -0,0 +1,39 @@ +commit be067d6efbf4 +Author: Gijs Kruitbosch +Date: Wed Feb 21 12:18:40 2018 +0000 + + Bug 1439396, r=mak a=RyanVM + + --HG-- + extra : source : 2c38198fec8a7654862e491884db41b852ac367c +--- + browser/base/content/browser.js | 2 +- + .../content/test/urlbar/browser_removeUnsafeProtocolsFromURLBarPaste.js | 2 ++ + 2 files changed, 3 insertions(+), 1 deletion(-) + +diff --git browser/base/content/browser.js browser/base/content/browser.js +index efd1b6ef3a08..c74031c4e31d 100755 +--- browser/base/content/browser.js ++++ browser/base/content/browser.js +@@ -6038,7 +6038,7 @@ function stripUnsafeProtocolOnPaste(pasteData) { + try { + scheme = Services.io.extractScheme(pasteData); + } catch (ex) { } +- if (scheme != "javascript") { ++ if (scheme.toLowerCase() != "javascript") { + break; + } + +diff --git browser/base/content/test/urlbar/browser_removeUnsafeProtocolsFromURLBarPaste.js browser/base/content/test/urlbar/browser_removeUnsafeProtocolsFromURLBarPaste.js +index 70ecaa048626..94b417eb7435 100644 +--- browser/base/content/test/urlbar/browser_removeUnsafeProtocolsFromURLBarPaste.js ++++ browser/base/content/test/urlbar/browser_removeUnsafeProtocolsFromURLBarPaste.js +@@ -13,6 +13,8 @@ var pairs = [ + ["http://\nexample.com", "http://example.com"], + ["http://\nexample.com\n", "http://example.com"], + ["data:text/html,hi", "data:text/html,hi"], ++ ["javaScript:foopy", "foopy"], ++ ["javaScript:javaScript:alert('hi')", "alert('hi')"], + // Nested things get confusing because some things don't parse as URIs: + ["javascript:javascript:alert('hi!')", "alert('hi!')"], + ["data:data:text/html,hi", "data:data:text/html,hi"], Property changes on: branches/2018Q1/www/waterfox/files/patch-bug1439396 ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: branches/2018Q1/www/waterfox/files/patch-bug1440717 =================================================================== --- branches/2018Q1/www/waterfox/files/patch-bug1440717 (nonexistent) +++ branches/2018Q1/www/waterfox/files/patch-bug1440717 (revision 464685) @@ -0,0 +1,40 @@ +commit d6284e2e2fa3 +Author: Nicolas Silva +Date: Mon Mar 12 13:36:00 2018 +0100 + + Bug 1440717 - Use RefPtr for CompositingRenderTargetOGL::mGL. r=Bas a=jcristau + + --HG-- + extra : rebase_source : f3b0ec3793901a9546bb013f9e4271786dc1d9e2 + extra : source : b6d2d55223d2aa5cb85bbdf33075d1d38f2a9a30 +--- + gfx/layers/opengl/CompositingRenderTargetOGL.cpp | 2 +- + gfx/layers/opengl/CompositingRenderTargetOGL.h | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git gfx/layers/opengl/CompositingRenderTargetOGL.cpp gfx/layers/opengl/CompositingRenderTargetOGL.cpp +index 1f6357e114fc..2206df13d131 100644 +--- gfx/layers/opengl/CompositingRenderTargetOGL.cpp ++++ gfx/layers/opengl/CompositingRenderTargetOGL.cpp +@@ -61,7 +61,7 @@ CompositingRenderTargetOGL::BindRenderTarget() + msg.AppendPrintf("Framebuffer not complete -- CheckFramebufferStatus returned 0x%x, " + "GLContext=%p, IsOffscreen()=%d, mFBO=%d, aFBOTextureTarget=0x%x, " + "aRect.width=%d, aRect.height=%d", +- result, mGL, mGL->IsOffscreen(), mFBO, mInitParams.mFBOTextureTarget, ++ result, mGL.get(), mGL->IsOffscreen(), mFBO, mInitParams.mFBOTextureTarget, + mInitParams.mSize.width, mInitParams.mSize.height); + NS_WARNING(msg.get()); + } +diff --git gfx/layers/opengl/CompositingRenderTargetOGL.h gfx/layers/opengl/CompositingRenderTargetOGL.h +index 34cf95cd43ba..9b4959fbae4f 100644 +--- gfx/layers/opengl/CompositingRenderTargetOGL.h ++++ gfx/layers/opengl/CompositingRenderTargetOGL.h +@@ -185,7 +185,7 @@ private: + * the target is always cleared at the end of a frame. + */ + RefPtr mCompositor; +- GLContext* mGL; ++ RefPtr mGL; + GLuint mTextureHandle; + GLuint mFBO; + }; Property changes on: branches/2018Q1/www/waterfox/files/patch-bug1440717 ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: branches/2018Q1/www/waterfox/files/patch-bug1443865 =================================================================== --- branches/2018Q1/www/waterfox/files/patch-bug1443865 (nonexistent) +++ branches/2018Q1/www/waterfox/files/patch-bug1443865 (revision 464685) @@ -0,0 +1,27 @@ +commit 86eb4bcecfce +Author: Ralph Giles +Date: Wed Mar 7 16:02:30 2018 -0500 + + Bug 1443865 - Use 16-bit eobs count. r=kinetik, a=RyanVM + + MozReview-Commit-ID: 4lfBbvSTNPO + + --HG-- + extra : source : a628b2125a1b860c6d8124387040ec9589c219ab +--- + media/libvpx/libvpx/vp9/encoder/x86/vp9_quantize_ssse3_x86_64.asm | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git media/libvpx/libvpx/vp9/encoder/x86/vp9_quantize_ssse3_x86_64.asm media/libvpx/libvpx/vp9/encoder/x86/vp9_quantize_ssse3_x86_64.asm +index ec61c0c3a79a..9af6ccb7f633 100644 +--- media/libvpx/libvpx/vp9/encoder/x86/vp9_quantize_ssse3_x86_64.asm ++++ media/libvpx/libvpx/vp9/encoder/x86/vp9_quantize_ssse3_x86_64.asm +@@ -171,7 +171,7 @@ cglobal quantize_%1, 0, %2, 15, coeff, ncoeff, skip, zbin, round, quant, \ + pshuflw m7, m8, 0x1 + pmaxsw m8, m7 + pextrw r6, m8, 0 +- mov [r2], r6 ++ mov [r2], r6w + RET + + ; skip-block, i.e. just write all zeroes Property changes on: branches/2018Q1/www/waterfox/files/patch-bug1443865 ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: branches/2018Q1/www/waterfox/files/patch-bug1446062 =================================================================== --- branches/2018Q1/www/waterfox/files/patch-bug1446062 (nonexistent) +++ branches/2018Q1/www/waterfox/files/patch-bug1446062 (revision 464685) @@ -0,0 +1,177 @@ +commit 028c6e8c32ea +Author: Monty Montgomery +Date: Thu Mar 15 18:12:05 2018 -0400 + + Bug 1446062 - Vorbis fix. r=jmspeex, a=lizzard + + --HG-- + extra : source : 6b4e98424f0dcc024fcad48608ada351e4075e59 + extra : intermediate-source : 1dfbedb54c39abae38da9329f4a79571fee74661 +--- + media/libvorbis/lib/vorbis_codebook.c | 48 ++++++++--------------------------- + 1 file changed, 10 insertions(+), 38 deletions(-) + +diff --git media/libvorbis/lib/vorbis_codebook.c media/libvorbis/lib/vorbis_codebook.c +index 321a28faa0cc..78672e222d85 100644 +--- media/libvorbis/lib/vorbis_codebook.c ++++ media/libvorbis/lib/vorbis_codebook.c +@@ -386,7 +386,7 @@ long vorbis_book_decodevs_add(codebook *book,float *a,oggpack_buffer *b,int n){ + t[i] = book->valuelist+entry[i]*book->dim; + } + for(i=0,o=0;idim;i++,o+=step) +- for (j=0;jdim>8){ +- for(i=0;ivaluelist+entry*book->dim; +- for (j=0;jdim;) +- a[i++]+=t[j++]; +- } +- }else{ +- for(i=0;ivaluelist+entry*book->dim; +- j=0; +- switch((int)book->dim){ +- case 8: +- a[i++]+=t[j++]; +- case 7: +- a[i++]+=t[j++]; +- case 6: +- a[i++]+=t[j++]; +- case 5: +- a[i++]+=t[j++]; +- case 4: +- a[i++]+=t[j++]; +- case 3: +- a[i++]+=t[j++]; +- case 2: +- a[i++]+=t[j++]; +- case 1: +- a[i++]+=t[j++]; +- case 0: +- break; +- } +- } ++ for(i=0;ivaluelist+entry*book->dim; ++ for(j=0;idim;) ++ a[i++]+=t[j++]; + } + } + return(0); +@@ -470,12 +441,13 @@ long vorbis_book_decodevv_add(codebook *book,float **a,long offset,int ch, + long i,j,entry; + int chptr=0; + if(book->used_entries>0){ +- for(i=offset/ch;i<(offset+n)/ch;){ ++ int m=(offset+n)/ch; ++ for(i=offset/ch;ivaluelist+entry*book->dim; +- for (j=0;jdim;j++){ ++ for (j=0;idim;j++){ + a[chptr++][i]+=t[j]; + if(chptr==ch){ + chptr=0; + +commit fbddf2078fef +Author: Thomas Daede +Date: Thu Mar 15 21:47:09 2018 -0700 + + Bug 1446062: libtremor Vorbis fix. r=jmspeex a=dveditz + + --HG-- + extra : transplant_source : %D3%CE8%8D%D3%C0%D3%C7%BE%7D%F2m%5DM%E3%A0%E4%0CW%F3 +--- + media/libtremor/lib/tremor_codebook.c | 18 +++++++++--------- + 1 file changed, 9 insertions(+), 9 deletions(-) + +diff --git media/libtremor/lib/tremor_codebook.c media/libtremor/lib/tremor_codebook.c +index f8b798384134..1e1ae8a916b0 100644 +--- media/libtremor/lib/tremor_codebook.c ++++ media/libtremor/lib/tremor_codebook.c +@@ -258,7 +258,7 @@ long vorbis_book_decodevs_add(codebook *book,ogg_int32_t *a, + t[i] = book->valuelist+entry[i]*book->dim; + } + for(i=0,o=0;idim;i++,o+=step) +- for (j=0;j>shift; + }else{ + for (i = 0; i < step; i++) { +@@ -267,7 +267,7 @@ long vorbis_book_decodevs_add(codebook *book,ogg_int32_t *a, + t[i] = book->valuelist+entry[i]*book->dim; + } + for(i=0,o=0;idim;i++,o+=step) +- for (j=0;jvaluelist+entry*book->dim; +- for (j=0;jdim;) ++ for (j=0;idim;) + a[i++]+=t[j++]>>shift; + } + }else{ +@@ -295,7 +295,7 @@ long vorbis_book_decodev_add(codebook *book,ogg_int32_t *a, + entry = decode_packed_entry_number(book,b); + if(entry==-1)return(-1); + t = book->valuelist+entry*book->dim; +- for (j=0;jdim;) ++ for (j=0;idim;) + a[i++]+=t[j++]<<-shift; + } + } +@@ -352,15 +352,15 @@ long vorbis_book_decodevv_add(codebook *book,ogg_int32_t **a,\ + long i,j,entry; + int chptr=0; + int shift=point-book->binarypoint; +- ++ int m=offset+n; + if(shift>=0){ + +- for(i=offset;ivaluelist+entry*book->dim; +- for (j=0;jdim;j++){ ++ for (j=0;idim;j++){ + a[chptr++][i]+=t[j]>>shift; + if(chptr==ch){ + chptr=0; +@@ -371,12 +371,12 @@ long vorbis_book_decodevv_add(codebook *book,ogg_int32_t **a,\ + } + }else{ + +- for(i=offset;ivaluelist+entry*book->dim; +- for (j=0;jdim;j++){ ++ for (j=0;idim;j++){ + a[chptr++][i]+=t[j]<<-shift; + if(chptr==ch){ + chptr=0; Property changes on: branches/2018Q1/www/waterfox/files/patch-bug1446062 ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: branches/2018Q1 =================================================================== --- branches/2018Q1 (revision 464684) +++ branches/2018Q1 (revision 464685) Property changes on: branches/2018Q1 ___________________________________________________________________ Modified: svn:mergeinfo ## -0,0 +0,1 ## Merged /head:r464679