aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Beich <jbeich@FreeBSD.org>2018-03-24 08:20:47 +0800
committerJan Beich <jbeich@FreeBSD.org>2018-03-24 08:20:47 +0800
commit71704178ebd5e8d280d126ab0e82856ec3f635ee (patch)
tree36d0aa375c869a329a3121bf205c32418d452477
parent9b6b838a93bdf6151f71653e0f5e9e8af6e4155b (diff)
downloadfreebsd-ports-71704178ebd5e8d280d126ab0e82856ec3f635ee.tar.gz
freebsd-ports-71704178ebd5e8d280d126ab0e82856ec3f635ee.tar.zst
freebsd-ports-71704178ebd5e8d280d126ab0e82856ec3f635ee.zip
www/waterfox: apply more FF60 fixes
Notes
Notes: svn path=/head/; revision=465417
-rw-r--r--www/waterfox/Makefile2
-rw-r--r--www/waterfox/files/patch-bug139779561
-rw-r--r--www/waterfox/files/patch-bug143503697
-rw-r--r--www/waterfox/files/patch-bug144452126
-rw-r--r--www/waterfox/files/patch-bug144454163
5 files changed, 248 insertions, 1 deletions
diff --git a/www/waterfox/Makefile b/www/waterfox/Makefile
index d5c5a1840018..4ab5b0de94b5 100644
--- a/www/waterfox/Makefile
+++ b/www/waterfox/Makefile
@@ -3,7 +3,7 @@
PORTNAME= waterfox
DISTVERSION= 56.0.4-72
DISTVERSIONSUFFIX= -ga9c77bbb9f25
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= www ipv6
PATCH_SITES= https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/commit/
diff --git a/www/waterfox/files/patch-bug1397795 b/www/waterfox/files/patch-bug1397795
new file mode 100644
index 000000000000..61b6e2c82978
--- /dev/null
+++ b/www/waterfox/files/patch-bug1397795
@@ -0,0 +1,61 @@
+commit fc56d498fd83
+Author: Jonathan Watt <jwatt@jwatt.org>
+Date: Fri Feb 23 10:40:12 2018 +0000
+
+ Bug 1397795 - Fix stack overflow crash due to box-shadow. r=mstange, a=jcristau
+
+ GetBoxShadowRectForFrame is called while we're calculating the visual
+ overflow bounds for a frame. So it is not valid for it to use the frame's
+ "current" visual overflow rect (which may be uninitialized or stale).
+
+ MozReview-Commit-ID: J52dxIMrMg5
+
+ --HG--
+ extra : source : d7c420c8dc2a6b28500eae0e35cd9f17a22908ec
+---
+ layout/base/nsLayoutUtils.cpp | 22 +++++++++++++---------
+ 1 file changed, 13 insertions(+), 9 deletions(-)
+
+diff --git layout/base/nsLayoutUtils.cpp layout/base/nsLayoutUtils.cpp
+index 53c43f6b3546..f85273fbf232 100644
+--- layout/base/nsLayoutUtils.cpp
++++ layout/base/nsLayoutUtils.cpp
+@@ -8747,25 +8747,29 @@ nsLayoutUtils::GetBoxShadowRectForFrame(nsIFrame* aFrame,
+ return nsRect();
+ }
+
+- bool nativeTheme;
++ nsRect inputRect(nsPoint(0, 0), aFrameSize);
++
++ // According to the CSS spec, box-shadow should be based on the border box.
++ // However, that looks broken when the background extends outside the border
++ // box, as can be the case with native theming. To fix that we expand the
++ // area that we shadow to include the bounds of any native theme drawing.
+ const nsStyleDisplay* styleDisplay = aFrame->StyleDisplay();
+ nsITheme::Transparency transparency;
+ if (aFrame->IsThemed(styleDisplay, &transparency)) {
+ // For opaque (rectangular) theme widgets we can take the generic
+ // border-box path with border-radius disabled.
+- nativeTheme = transparency != nsITheme::eOpaque;
+- } else {
+- nativeTheme = false;
++ if (transparency != nsITheme::eOpaque) {
++ nsPresContext *presContext = aFrame->PresContext();
++ presContext->GetTheme()->
++ GetWidgetOverflow(presContext->DeviceContext(), aFrame,
++ styleDisplay->mAppearance, &inputRect);
++ }
+ }
+
+- nsRect frameRect = nativeTheme ?
+- aFrame->GetVisualOverflowRectRelativeToSelf() :
+- nsRect(nsPoint(0, 0), aFrameSize);
+-
+ nsRect shadows;
+ int32_t A2D = aFrame->PresContext()->AppUnitsPerDevPixel();
+ for (uint32_t i = 0; i < boxShadows->Length(); ++i) {
+- nsRect tmpRect = frameRect;
++ nsRect tmpRect = inputRect;
+ nsCSSShadowItem* shadow = boxShadows->ShadowAt(i);
+
+ // inset shadows are never painted outside the frame
diff --git a/www/waterfox/files/patch-bug1435036 b/www/waterfox/files/patch-bug1435036
new file mode 100644
index 000000000000..4cb2b39fd1de
--- /dev/null
+++ b/www/waterfox/files/patch-bug1435036
@@ -0,0 +1,97 @@
+commit a857f1b964fc
+Author: Andreas Pehrson <pehrsons@mozilla.com>
+Date: Mon Mar 19 09:40:38 2018 +0100
+
+ Bug 1435036 - Improve window checks. r=jib, a=RyanVM
+
+ --HG--
+ extra : source : 37039eaf524823ed3157fafbdfcfbc450b67b4ab
+---
+ dom/media/MediaManager.cpp | 30 +++++++++++++++++++-----------
+ dom/media/MediaManager.h | 1 +
+ 2 files changed, 20 insertions(+), 11 deletions(-)
+
+diff --git dom/media/MediaManager.cpp dom/media/MediaManager.cpp
+index e96509db4ce0..f2862dc0b23c 100644
+--- dom/media/MediaManager.cpp
++++ dom/media/MediaManager.cpp
+@@ -1013,14 +1013,17 @@ public:
+ public:
+ TracksAvailableCallback(MediaManager* aManager,
+ already_AddRefed<nsIDOMGetUserMediaSuccessCallback> aSuccess,
+- uint64_t aWindowID,
++ const RefPtr<GetUserMediaWindowListener>& aWindowListener,
+ DOMMediaStream* aStream)
+- : mWindowID(aWindowID), mOnSuccess(aSuccess), mManager(aManager),
+- mStream(aStream) {}
++ : mWindowListener(aWindowListener),
++ mOnSuccess(aSuccess),
++ mManager(aManager),
++ mStream(aStream)
++ {}
+ void NotifyTracksAvailable(DOMMediaStream* aStream) override
+ {
+- // We're in the main thread, so no worries here.
+- if (!(mManager->IsWindowStillActive(mWindowID))) {
++ // We're on the main thread, so no worries here.
++ if (!mManager->IsWindowListenerStillActive(mWindowListener)) {
+ return;
+ }
+
+@@ -1033,7 +1036,7 @@ public:
+ LOG(("Returning success for getUserMedia()"));
+ mOnSuccess->OnSuccess(aStream);
+ }
+- uint64_t mWindowID;
++ RefPtr<GetUserMediaWindowListener> mWindowListener;
+ nsCOMPtr<nsIDOMGetUserMediaSuccessCallback> mOnSuccess;
+ RefPtr<MediaManager> mManager;
+ // Keep the DOMMediaStream alive until the NotifyTracksAvailable callback
+@@ -1056,10 +1059,8 @@ public:
+
+ // We're on main-thread, and the windowlist can only
+ // be invalidated from the main-thread (see OnNavigation)
+- GetUserMediaWindowListener* listener =
+- mManager->GetWindowListener(mWindowID);
+- if (!listener || !window || !window->GetExtantDoc()) {
+- // This window is no longer live. mListener has already been removed
++ if (!mManager->IsWindowListenerStillActive(mWindowListener)) {
++ // This window is no longer live. mListener has already been removed.
+ return NS_OK;
+ }
+
+@@ -1219,7 +1220,7 @@ public:
+
+ // Note: includes JS callbacks; must be released on MainThread
+ auto callback = MakeRefPtr<Refcountable<UniquePtr<OnTracksAvailableCallback>>>(
+- new TracksAvailableCallback(mManager, mOnSuccess.forget(), mWindowID, domStream));
++ new TracksAvailableCallback(mManager, mOnSuccess.forget(), mWindowListener, domStream));
+
+ // Dispatch to the media thread to ask it to start the sources,
+ // because that can take a while.
+@@ -3015,6 +3016,13 @@ MediaManager::RemoveWindowID(uint64_t aWindowId)
+ aWindowId, outerID));
+ }
+
++bool
++MediaManager::IsWindowListenerStillActive(GetUserMediaWindowListener* aListener)
++{
++ MOZ_DIAGNOSTIC_ASSERT(aListener);
++ return aListener && aListener == GetWindowListener(aListener->WindowID());
++}
++
+ void
+ MediaManager::GetPref(nsIPrefBranch *aBranch, const char *aPref,
+ const char *aData, int32_t *aVal)
+diff --git dom/media/MediaManager.h dom/media/MediaManager.h
+index 3d9d9e55f8ec..f9c5b0647f64 100644
+--- dom/media/MediaManager.h
++++ dom/media/MediaManager.h
+@@ -237,6 +237,7 @@ public:
+ bool IsWindowStillActive(uint64_t aWindowId) {
+ return !!GetWindowListener(aWindowId);
+ }
++ bool IsWindowListenerStillActive(GetUserMediaWindowListener* aListener);
+ // Note: also calls aListener->Remove(), even if inactive
+ void RemoveFromWindowList(uint64_t aWindowID,
+ GetUserMediaWindowListener *aListener);
diff --git a/www/waterfox/files/patch-bug1444521 b/www/waterfox/files/patch-bug1444521
new file mode 100644
index 000000000000..600f6a0d1d95
--- /dev/null
+++ b/www/waterfox/files/patch-bug1444521
@@ -0,0 +1,26 @@
+commit 4694ff76f300
+Author: Punam <pdahiya@mozilla.com>
+Date: Tue Mar 13 17:54:18 2018 -0700
+
+ Bug 1444521 - Preferences UI save to cloud downloads event listener. r=jaws, a=jcristau
+
+ MozReview-Commit-ID: LbKr1rpXn4q
+
+ --HG--
+ extra : source : 2cab87e3a891fcdf4ef78b1dc01a6b7b5e69c853
+---
+ browser/components/preferences/in-content/main.js | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git browser/components/preferences/in-content-new/main.js browser/components/preferences/in-content-new/main.js
+index 711a9e2cc424..5a579f4a49db 100644
+--- browser/components/preferences/in-content-new/main.js
++++ browser/components/preferences/in-content-new/main.js
+@@ -410,6 +410,7 @@ var gMainPane = {
+ setEventListener("typeColumn", "click", gMainPane.sort);
+ setEventListener("actionColumn", "click", gMainPane.sort);
+ setEventListener("chooseFolder", "command", gMainPane.chooseFolder);
++ setEventListener("saveWhere", "command", gMainPane.handleSaveToCommand);
+ setEventListener("browser.download.dir", "change", gMainPane.displayDownloadDirPref);
+ setEventListener("saveWhere", "command", gMainPane.handleSaveToCommand);
+
diff --git a/www/waterfox/files/patch-bug1444541 b/www/waterfox/files/patch-bug1444541
new file mode 100644
index 000000000000..674bab18c65b
--- /dev/null
+++ b/www/waterfox/files/patch-bug1444541
@@ -0,0 +1,63 @@
+commit 2b33d877cb03
+Author: Andreas Pehrson <pehrsons@mozilla.com>
+Date: Mon Mar 19 15:52:36 2018 +0100
+
+ Bug 1444541 - Don't stop recorder on pagehide during frameswap. r=smaug, a=jcristau
+
+ MozReview-Commit-ID: AZec0yXM1FI
+
+ --HG--
+ extra : source : bcdb264028e930756222a756e83bdca8574278e2
+---
+ dom/media/MediaRecorder.cpp | 18 +++++++++++++++---
+ dom/media/moz.build | 1 +
+ 2 files changed, 16 insertions(+), 3 deletions(-)
+
+diff --git dom/media/MediaRecorder.cpp dom/media/MediaRecorder.cpp
+index 60fe1ea0dae2..a229e4c38d73 100644
+--- dom/media/MediaRecorder.cpp
++++ dom/media/MediaRecorder.cpp
+@@ -30,6 +30,7 @@
+ #include "nsCharSeparatedTokenizer.h"
+ #include "nsContentTypeParser.h"
+ #include "nsContentUtils.h"
++#include "nsDocShell.h"
+ #include "nsError.h"
+ #include "nsIDocument.h"
+ #include "nsIPermissionManager.h"
+@@ -1699,9 +1700,20 @@ MediaRecorder::NotifyOwnerDocumentActivityChanged()
+ nsIDocument* doc = window->GetExtantDoc();
+ NS_ENSURE_TRUE_VOID(doc);
+
+- LOG(LogLevel::Debug, ("MediaRecorder %p document IsActive %d isVisible %d\n",
+- this, doc->IsActive(), doc->IsVisible()));
+- if (!doc->IsActive() || !doc->IsVisible()) {
++ bool inFrameSwap = false;
++ if (nsDocShell* docShell = static_cast<nsDocShell*>(doc->GetDocShell())) {
++ inFrameSwap = docShell->InFrameSwap();
++ }
++
++ LOG(LogLevel::Debug, ("MediaRecorder %p NotifyOwnerDocumentActivityChanged "
++ "IsActive=%d, "
++ "IsVisible=%d, "
++ "InFrameSwap=%d",
++ this,
++ doc->IsActive(),
++ doc->IsVisible(),
++ inFrameSwap));
++ if (!doc->IsActive() || !(inFrameSwap || doc->IsVisible())) {
+ // Stop the session.
+ ErrorResult result;
+ Stop(result);
+diff --git dom/media/moz.build dom/media/moz.build
+index 194c73fd2f4c..4b1ca538f927 100644
+--- dom/media/moz.build
++++ dom/media/moz.build
+@@ -312,6 +312,7 @@ EXTRA_JS_MODULES.media += [
+
+ LOCAL_INCLUDES += [
+ '/caps',
++ '/docshell/base',
+ '/dom/base',
+ '/layout/generic',
+ '/layout/xul',