www/waterfox: apply more FF57 fixes
This commit is contained in:
parent
8054a858ba
commit
7b4b9b2437
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=461026
50 changed files with 6231 additions and 0 deletions
|
@ -2,6 +2,7 @@
|
|||
|
||||
PORTNAME= waterfox
|
||||
DISTVERSION= 56.0.4
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= www ipv6
|
||||
|
||||
MAINTAINER= jbeich@FreeBSD.org
|
||||
|
|
28
www/waterfox/files/patch-bug1356854
Normal file
28
www/waterfox/files/patch-bug1356854
Normal file
|
@ -0,0 +1,28 @@
|
|||
commit 6435e5f65538
|
||||
Author: Thomas Nguyen <tnguyen@mozilla.com>
|
||||
Date: Thu Sep 21 16:39:36 2017 +0800
|
||||
|
||||
Bug 1356854 - Check mFD is not null before PR_Write. r=mcmanus, a=ritu
|
||||
|
||||
MozReview-Commit-ID: INoTUvPpPrs
|
||||
|
||||
--HG--
|
||||
extra : source : 638f326530b719ce386bb5d1701fed4ae4604690
|
||||
---
|
||||
netwerk/base/nsFileStreams.cpp | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git netwerk/base/nsFileStreams.cpp netwerk/base/nsFileStreams.cpp
|
||||
index ac259c1c7e94..6be501456656 100644
|
||||
--- netwerk/base/nsFileStreams.cpp
|
||||
+++ netwerk/base/nsFileStreams.cpp
|
||||
@@ -378,6 +378,9 @@ nsFileStreamBase::DoPendingOpen()
|
||||
|
||||
case eOpened:
|
||||
MOZ_ASSERT(mFD);
|
||||
+ if (NS_WARN_IF(!mFD)) {
|
||||
+ return NS_ERROR_FAILURE;
|
||||
+ }
|
||||
return NS_OK;
|
||||
|
||||
case eClosed:
|
96
www/waterfox/files/patch-bug1357523
Normal file
96
www/waterfox/files/patch-bug1357523
Normal file
|
@ -0,0 +1,96 @@
|
|||
commit ad103dfd3abe
|
||||
Author: Prathiksha <prathikshaprasadsuman@gmail.com>
|
||||
Date: Fri Sep 15 22:08:12 2017 +0530
|
||||
|
||||
Bug 1357523 - Make about:home and about:newtab search box search for the value in the search textbox when we use non-default search engines. r=nhnt11, a=ritu
|
||||
|
||||
MozReview-Commit-ID: CdgqghkmXau
|
||||
|
||||
--HG--
|
||||
extra : source : e029590936c56ac269d68610ab389ab25887b6e1
|
||||
---
|
||||
browser/base/content/contentSearchUI.js | 2 ++
|
||||
.../test/general/browser_contentSearchUI.js | 30 +++++-----------------
|
||||
2 files changed, 9 insertions(+), 23 deletions(-)
|
||||
|
||||
diff --git browser/base/content/contentSearchUI.js browser/base/content/contentSearchUI.js
|
||||
index bacb985fb6ee..ffada60c3571 100644
|
||||
--- browser/base/content/contentSearchUI.js
|
||||
+++ browser/base/content/contentSearchUI.js
|
||||
@@ -478,6 +478,8 @@ ContentSearchUIController.prototype = {
|
||||
_onMousemove(event) {
|
||||
let idx = this._indexOfTableItem(event.target);
|
||||
if (idx >= this.numSuggestions) {
|
||||
+ // Deselect any search suggestion that has been selected.
|
||||
+ this.selectedIndex = -1;
|
||||
this.selectedButtonIndex = idx - this.numSuggestions;
|
||||
return;
|
||||
}
|
||||
diff --git browser/base/content/test/general/browser_contentSearchUI.js browser/base/content/test/general/browser_contentSearchUI.js
|
||||
index 51538b29e27f..85b65d40bf0b 100644
|
||||
--- browser/base/content/test/general/browser_contentSearchUI.js
|
||||
+++ browser/base/content/test/general/browser_contentSearchUI.js
|
||||
@@ -300,13 +300,13 @@ add_task(async function mouse() {
|
||||
checkState(state, "x", ["xfoo", "xbar"], 1);
|
||||
|
||||
state = await msg("mousemove", 2);
|
||||
- checkState(state, "x", ["xfoo", "xbar"], 1, 0);
|
||||
+ checkState(state, "x", ["xfoo", "xbar"], 2, 0);
|
||||
|
||||
state = await msg("mousemove", 3);
|
||||
- checkState(state, "x", ["xfoo", "xbar"], 1, 1);
|
||||
+ checkState(state, "x", ["xfoo", "xbar"], 3, 1);
|
||||
|
||||
state = await msg("mousemove", -1);
|
||||
- checkState(state, "x", ["xfoo", "xbar"], 1);
|
||||
+ checkState(state, "x", ["xfoo", "xbar"], -1);
|
||||
|
||||
await msg("reset");
|
||||
await setUp();
|
||||
@@ -318,10 +318,10 @@ add_task(async function mouse() {
|
||||
checkState(state, "x", ["xfoo", "xbar"], 0);
|
||||
|
||||
state = await msg("mousemove", 2);
|
||||
- checkState(state, "x", ["xfoo", "xbar"], 0, 0);
|
||||
+ checkState(state, "x", ["xfoo", "xbar"], 2, 0);
|
||||
|
||||
state = await msg("mousemove", -1);
|
||||
- checkState(state, "x", ["xfoo", "xbar"], 0);
|
||||
+ checkState(state, "x", ["xfoo", "xbar"], -1);
|
||||
|
||||
await msg("reset");
|
||||
});
|
||||
@@ -510,24 +510,7 @@ add_task(async function search() {
|
||||
await setUp();
|
||||
|
||||
// Test selecting a suggestion, then clicking a one-off without deselecting the
|
||||
- // suggestion.
|
||||
- await msg("key", { key: "x", waitForSuggestions: true });
|
||||
- p = msg("waitForSearch");
|
||||
- await msg("mousemove", 1);
|
||||
- await msg("mousemove", 3);
|
||||
- await msg("click", { eltIdx: 3, modifiers });
|
||||
- mesg = await p;
|
||||
- eventData.searchString = "xfoo"
|
||||
- eventData.selection = {
|
||||
- index: 1,
|
||||
- kind: "mouse",
|
||||
- };
|
||||
- SimpleTest.isDeeply(eventData, mesg, "Search event data");
|
||||
-
|
||||
- await promiseTab();
|
||||
- await setUp();
|
||||
-
|
||||
- // Same as above, but with the keyboard.
|
||||
+ // suggestion, using the keyboard.
|
||||
delete modifiers.button;
|
||||
await msg("key", { key: "x", waitForSuggestions: true });
|
||||
p = msg("waitForSearch");
|
||||
@@ -536,6 +519,7 @@ add_task(async function search() {
|
||||
await msg("key", "VK_TAB");
|
||||
await msg("key", { key: "VK_RETURN", modifiers });
|
||||
mesg = await p;
|
||||
+ eventData.searchString = "xfoo";
|
||||
eventData.selection = {
|
||||
index: 1,
|
||||
kind: "key",
|
44
www/waterfox/files/patch-bug1373371
Normal file
44
www/waterfox/files/patch-bug1373371
Normal file
|
@ -0,0 +1,44 @@
|
|||
commit 94b1df91cc7f
|
||||
Author: Eric Rahm <erahm@mozilla.com>
|
||||
Date: Mon Jun 19 17:09:54 2017 -0700
|
||||
|
||||
Bug 1373371 - Properly convert index in RemoveElementsAt. r=froydnj, a=ritu
|
||||
|
||||
MozReview-Commit-ID: 2CRrUmOxA9B
|
||||
|
||||
--HG--
|
||||
extra : source : 337103b85c025be555c107c7710ebe25d2feb6ed
|
||||
---
|
||||
xpcom/ds/nsTArray.h | 12 +++++++++---
|
||||
1 file changed, 9 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git xpcom/ds/nsTArray.h xpcom/ds/nsTArray.h
|
||||
index 4e9b57126bfb..e0244846aca3 100644
|
||||
--- xpcom/ds/nsTArray.h
|
||||
+++ xpcom/ds/nsTArray.h
|
||||
@@ -13,6 +13,7 @@
|
||||
#include "mozilla/Assertions.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "mozilla/BinarySearch.h"
|
||||
+#include "mozilla/CheckedInt.h"
|
||||
#include "mozilla/fallible.h"
|
||||
#include "mozilla/MathAlgorithms.h"
|
||||
#include "mozilla/MemoryReporting.h"
|
||||
@@ -2053,9 +2054,14 @@ void
|
||||
nsTArray_Impl<E, Alloc>::RemoveElementsAt(index_type aStart, size_type aCount)
|
||||
{
|
||||
MOZ_ASSERT(aCount == 0 || aStart < Length(), "Invalid aStart index");
|
||||
- MOZ_ASSERT(aStart + aCount <= Length(), "Invalid length");
|
||||
- // Check that the previous assert didn't overflow
|
||||
- MOZ_ASSERT(aStart <= aStart + aCount, "Start index plus length overflows");
|
||||
+
|
||||
+ mozilla::CheckedInt<index_type> rangeEnd = aStart;
|
||||
+ rangeEnd += aCount;
|
||||
+
|
||||
+ if (MOZ_UNLIKELY(!rangeEnd.isValid() || rangeEnd.value() > Length())) {
|
||||
+ InvalidArrayIndex_CRASH(aStart, Length());
|
||||
+ }
|
||||
+
|
||||
DestructRange(aStart, aCount);
|
||||
this->template ShiftData<InfallibleAlloc>(aStart, aCount, 0,
|
||||
sizeof(elem_type),
|
92
www/waterfox/files/patch-bug1385013
Normal file
92
www/waterfox/files/patch-bug1385013
Normal file
|
@ -0,0 +1,92 @@
|
|||
commit 09e1ad759b21
|
||||
Author: Hiroyuki Ikezoe <hikezoe@mozilla.com>
|
||||
Date: Wed Oct 18 10:43:22 2017 +0900
|
||||
|
||||
Bug 1385013 - Check all vertexes for the target frame are outside of the parent frame if the target frame is empty. r=birtles, a=ritu
|
||||
|
||||
We create empty rectangle (zero-height or zero-width) frame for element which
|
||||
has no content inside it, e.g. '<p></p>'. And nsRect.Intersects returns false
|
||||
if either of the rectangles are empty, so if we check
|
||||
!transformedRect.Intersects(scrollableRect) and transformedRect is empty, we
|
||||
will end up returning true from IsFrameScrolledOutOfView even though the point
|
||||
represented by the empty transformedRect might be inside the
|
||||
scrollableRect.
|
||||
|
||||
The reftest causes timeout without this fix since the animation never updates
|
||||
after the initial paint.
|
||||
|
||||
MozReview-Commit-ID: FymFJfjxyGc
|
||||
|
||||
--HG--
|
||||
extra : source : 69e2ab081d3d71ef131f0ce878ee7830ae881d08
|
||||
---
|
||||
layout/generic/nsFrame.cpp | 11 +++++++++-
|
||||
.../animation-on-empty-height-frame.html | 25 ++++++++++++++++++++++
|
||||
layout/reftests/css-animations/reftest.list | 1 +
|
||||
3 files changed, 36 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git layout/generic/nsFrame.cpp layout/generic/nsFrame.cpp
|
||||
index dbfd61b7e142..991ccbceeb65 100644
|
||||
--- layout/generic/nsFrame.cpp
|
||||
+++ layout/generic/nsFrame.cpp
|
||||
@@ -10555,7 +10555,16 @@ IsFrameScrolledOutOfView(nsIFrame *aFrame)
|
||||
scrollableParent);
|
||||
|
||||
nsRect scrollableRect = scrollableParent->GetVisualOverflowRect();
|
||||
- if (!transformedRect.Intersects(scrollableRect)) {
|
||||
+ if (transformedRect.IsEmpty()) {
|
||||
+ // If the transformed rect is empty it represents a line or a point that we
|
||||
+ // should check is outside the the scrollable rect.
|
||||
+ if (transformedRect.x > scrollableRect.XMost() ||
|
||||
+ transformedRect.y > scrollableRect.YMost() ||
|
||||
+ scrollableRect.x > transformedRect.XMost() ||
|
||||
+ scrollableRect.y > transformedRect.YMost()) {
|
||||
+ return true;
|
||||
+ }
|
||||
+ } else if (!transformedRect.Intersects(scrollableRect)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
diff --git layout/reftests/css-animations/animation-on-empty-height-frame.html layout/reftests/css-animations/animation-on-empty-height-frame.html
|
||||
new file mode 100644
|
||||
index 000000000000..eb3f58127b16
|
||||
--- /dev/null
|
||||
+++ layout/reftests/css-animations/animation-on-empty-height-frame.html
|
||||
@@ -0,0 +1,25 @@
|
||||
+<!DOCTYPE html>
|
||||
+<html class="reftest-wait reftest-no-flush">
|
||||
+<style>
|
||||
+@keyframes anim {
|
||||
+ from { background-color: white; }
|
||||
+ to { background-color: red; }
|
||||
+}
|
||||
+</style>
|
||||
+<body>
|
||||
+</body>
|
||||
+<script>
|
||||
+window.addEventListener('load', () => {
|
||||
+ const body = document.querySelector('body');
|
||||
+ body.style.animation = 'anim 100s step-end reverse';
|
||||
+ body.addEventListener('animationstart', () => {
|
||||
+ // This MozAfterPaint event corresponds to the white background paint.
|
||||
+ // (The animation will initially paint the background red since it is playing
|
||||
+ // a step-end animation in reverse.)
|
||||
+ window.addEventListener('MozAfterPaint', () => {
|
||||
+ document.documentElement.classList.remove('reftest-wait');
|
||||
+ }, {once: true});
|
||||
+ });
|
||||
+});
|
||||
+</script>
|
||||
+</html>
|
||||
diff --git layout/reftests/css-animations/reftest.list layout/reftests/css-animations/reftest.list
|
||||
index 61e3e9ea6101..ed615645f707 100644
|
||||
--- layout/reftests/css-animations/reftest.list
|
||||
+++ layout/reftests/css-animations/reftest.list
|
||||
@@ -4,6 +4,7 @@ skip-if(stylo) fails == print-no-animations.html print-no-animations-ref.html #
|
||||
skip-if(stylo) fails != print-no-animations.html print-no-animations-notref.html # reftest harness doesn't actually make pres context non-dynamic for reftest-paged tests. Bug 1374154 for stylo
|
||||
== animate-opacity.html animate-opacity-ref.html
|
||||
== animate-preserves3d.html animate-preserves3d-ref.html
|
||||
+== animation-on-empty-height-frame.html about:blank
|
||||
== in-visibility-hidden-animation.html in-visibility-hidden-animation-ref.html
|
||||
== in-visibility-hidden-animation-pseudo-element.html in-visibility-hidden-animation-pseudo-element-ref.html
|
||||
== partially-out-of-view-animation.html partially-out-of-view-animation-ref.html
|
42
www/waterfox/files/patch-bug1387079
Normal file
42
www/waterfox/files/patch-bug1387079
Normal file
|
@ -0,0 +1,42 @@
|
|||
commit 8845b3243fcd
|
||||
Author: Lee Salzman <lsalzman@mozilla.com>
|
||||
Date: Tue Oct 10 15:49:13 2017 -0400
|
||||
|
||||
Bug 1387079 - Only use SkRasterPipeline when SkJumper is accelerated. r=jrmuizel, a=ritu
|
||||
|
||||
MozReview-Commit-ID: 13dd2Ap4sob
|
||||
|
||||
--HG--
|
||||
extra : source : 32227656b09dfb5d7c5412c799c7081dbc49346c
|
||||
---
|
||||
gfx/skia/skia/src/core/SkBlitter.cpp | 2 ++
|
||||
.../mozilla/mozilla-central-reftests/masking/mask-mode-d.html.ini | 4 +++-
|
||||
2 files changed, 5 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git gfx/skia/skia/src/core/SkBlitter.cpp gfx/skia/skia/src/core/SkBlitter.cpp
|
||||
index 0e8bd2db2249..3a824bb724f7 100644
|
||||
--- gfx/skia/skia/src/core/SkBlitter.cpp
|
||||
+++ gfx/skia/skia/src/core/SkBlitter.cpp
|
||||
@@ -847,9 +847,11 @@ SkBlitter* SkBlitter::Choose(const SkPixmap& device,
|
||||
return alloc->make<SkA8_Coverage_Blitter>(device, *paint);
|
||||
}
|
||||
|
||||
+#if (!defined(SK_JUMPER_USE_ASSEMBLY) || SK_JUMPER_USE_ASSEMBLY) && (defined(__aarch64__) || defined(__arm__) || defined(__x86_64__) || defined(_M_X64))
|
||||
if (SkBlitter* blitter = SkCreateRasterPipelineBlitter(device, *paint, matrix, alloc)) {
|
||||
return blitter;
|
||||
}
|
||||
+#endif
|
||||
|
||||
if (nullptr == shader) {
|
||||
if (mode != SkBlendMode::kSrcOver) {
|
||||
diff --git testing/web-platform/meta/css/vendor-imports/mozilla/mozilla-central-reftests/masking/mask-mode-d.html.ini testing/web-platform/meta/css/vendor-imports/mozilla/mozilla-central-reftests/masking/mask-mode-d.html.ini
|
||||
index c1246ddb4127..a02e049c3684 100644
|
||||
--- testing/web-platform/meta/css/vendor-imports/mozilla/mozilla-central-reftests/masking/mask-mode-d.html.ini
|
||||
+++ testing/web-platform/meta/css/vendor-imports/mozilla/mozilla-central-reftests/masking/mask-mode-d.html.ini
|
||||
@@ -1,3 +1,5 @@
|
||||
[mask-mode-d.html]
|
||||
type: reftest
|
||||
- expected: FAIL
|
||||
+ expected:
|
||||
+ if (processor == "x86") and (bits == 32): PASS
|
||||
+ FAIL
|
30
www/waterfox/files/patch-bug1393627
Normal file
30
www/waterfox/files/patch-bug1393627
Normal file
|
@ -0,0 +1,30 @@
|
|||
commit 7f3f4f7f6ad3
|
||||
Author: Francois Marier <francois@mozilla.com>
|
||||
Date: Fri Nov 3 11:44:43 2017 -0700
|
||||
|
||||
Bug 1393627 - Expose the full tracking protection UI preferences. r=mossop, a=ritu
|
||||
|
||||
MozReview-Commit-ID: KyDBuHyDPLP
|
||||
|
||||
--HG--
|
||||
extra : source : 516690579442aecc1bea191e905f019acfad5b48
|
||||
---
|
||||
browser/app/profile/firefox.js | 4 ----
|
||||
1 file changed, 4 deletions(-)
|
||||
|
||||
diff --git browser/app/profile/firefox.js browser/app/profile/firefox.js
|
||||
index 137462dc857e..9e08a0f166f9 100644
|
||||
--- browser/app/profile/firefox.js
|
||||
+++ browser/app/profile/firefox.js
|
||||
@@ -1511,11 +1511,7 @@ pref("browser.ping-centre.production.endpoint", "https://tiles.services.mozilla.
|
||||
// Enable GMP support in the addon manager.
|
||||
pref("media.gmp-provider.enabled", true);
|
||||
|
||||
-#ifdef NIGHTLY_BUILD
|
||||
pref("privacy.trackingprotection.ui.enabled", true);
|
||||
-#else
|
||||
-pref("privacy.trackingprotection.ui.enabled", false);
|
||||
-#endif
|
||||
pref("privacy.trackingprotection.introCount", 0);
|
||||
pref("privacy.trackingprotection.introURL", "https://www.mozilla.org/%LOCALE%/firefox/%VERSION%/tracking-protection/start/");
|
||||
|
42
www/waterfox/files/patch-bug1397989
Normal file
42
www/waterfox/files/patch-bug1397989
Normal file
|
@ -0,0 +1,42 @@
|
|||
commit f7c4ef799832
|
||||
Author: Mike de Boer <mdeboer@mozilla.com>
|
||||
Date: Tue Oct 10 19:14:01 2017 +0200
|
||||
|
||||
Bug 1397989 - Make sure to only set non-empty values as the content-type of a document in the remote browser binding. r=mconley, a=ritu
|
||||
|
||||
What happens is the following:
|
||||
- browser-child.js sends a statechange up to RemoteWebProgress.jsm that contains
|
||||
a `documentContentType` value of `null`, along with `requestURI` and `originalRequestURI`
|
||||
_after_ other state changes that did send a valid content-type.
|
||||
- The content-type is used by the WebProgressListener in browser.js to toggle the
|
||||
disabled state of the 'isImage' broadcaster.
|
||||
- The 'isImage' broadcaster is used by the 'cmd_find' and 'cmd_findAgain' commands to
|
||||
determine whether they should be enabled. In this case: not.
|
||||
The fix here is to _not_ set the documentContentType in the browser binding when
|
||||
it's `null`.
|
||||
|
||||
MozReview-Commit-ID: IELoCrnOH0j
|
||||
|
||||
--HG--
|
||||
extra : source : 4c86b1f93b8482ea3097a4edb51bb8c0e8dc67fc
|
||||
---
|
||||
toolkit/modules/RemoteWebProgress.jsm | 6 +++++-
|
||||
1 file changed, 5 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git toolkit/modules/RemoteWebProgress.jsm toolkit/modules/RemoteWebProgress.jsm
|
||||
index 04eb37d580f5..05e3dabda941 100644
|
||||
--- toolkit/modules/RemoteWebProgress.jsm
|
||||
+++ toolkit/modules/RemoteWebProgress.jsm
|
||||
@@ -222,7 +222,11 @@ RemoteWebProgressManager.prototype = {
|
||||
|
||||
if (isTopLevel) {
|
||||
this._browser._contentWindow = objects.contentWindow;
|
||||
- this._browser._documentContentType = json.documentContentType;
|
||||
+ // Setting a content-type back to `null` is quite nonsensical for the
|
||||
+ // frontend, especially since we're not expecting it.
|
||||
+ if (json.documentContentType !== null) {
|
||||
+ this._browser._documentContentType = json.documentContentType;
|
||||
+ }
|
||||
if (typeof json.inLoadURI != "undefined") {
|
||||
this._browser.inLoadURI = json.inLoadURI;
|
||||
}
|
438
www/waterfox/files/patch-bug1398806
Normal file
438
www/waterfox/files/patch-bug1398806
Normal file
|
@ -0,0 +1,438 @@
|
|||
commit 95d5501cd96b
|
||||
Author: Robert Longson <longsonr@gmail.com>
|
||||
Date: Tue Oct 10 07:58:34 2017 +0100
|
||||
|
||||
Bug 1398806 - GetCtx and GetNearestViewport should return the nearest svg or symbol element which is now an SVGViewportElement rather than only returning the nearest svg element because a symbol establishes a viewport too. r=dholbert, a=ritu
|
||||
|
||||
--HG--
|
||||
extra : source : 813d4e250712d296eb4b11b0b89e10ed6a94e3d4
|
||||
---
|
||||
dom/svg/SVGContentUtils.cpp | 12 ++++++----
|
||||
dom/svg/SVGContentUtils.h | 5 ++--
|
||||
dom/svg/SVGLength.cpp | 2 +-
|
||||
dom/svg/SVGMarkerElement.cpp | 2 +-
|
||||
dom/svg/SVGMarkerElement.h | 4 ++--
|
||||
dom/svg/SVGSVGElement.h | 9 -------
|
||||
dom/svg/SVGViewportElement.h | 9 +++++++
|
||||
dom/svg/nsSVGElement.cpp | 34 +++++++++++++--------------
|
||||
dom/svg/nsSVGElement.h | 3 ++-
|
||||
layout/base/nsLayoutUtils.cpp | 4 ++--
|
||||
layout/reftests/svg/reftest.list | 1 +
|
||||
layout/reftests/svg/viewBox-and-symbol-01.svg | 14 +++++++++++
|
||||
layout/svg/nsCSSClipPathInstance.cpp | 1 -
|
||||
layout/svg/nsSVGImageFrame.cpp | 1 -
|
||||
layout/svg/nsSVGImageFrame.h | 1 -
|
||||
layout/svg/nsSVGMarkerFrame.cpp | 4 ++--
|
||||
layout/svg/nsSVGMarkerFrame.h | 4 ++--
|
||||
layout/svg/nsSVGPatternFrame.cpp | 2 +-
|
||||
layout/svg/nsSVGUtils.cpp | 6 ++---
|
||||
19 files changed, 68 insertions(+), 50 deletions(-)
|
||||
|
||||
diff --git dom/svg/SVGContentUtils.cpp dom/svg/SVGContentUtils.cpp
|
||||
index 0f744ffd8dd1..a6bf6245e95e 100644
|
||||
--- dom/svg/SVGContentUtils.cpp
|
||||
+++ dom/svg/SVGContentUtils.cpp
|
||||
@@ -374,8 +374,8 @@ SVGContentUtils::EstablishesViewport(nsIContent *aContent)
|
||||
nsGkAtoms::symbol);
|
||||
}
|
||||
|
||||
-nsSVGElement*
|
||||
-SVGContentUtils::GetNearestViewportElement(nsIContent *aContent)
|
||||
+SVGViewportElement*
|
||||
+SVGContentUtils::GetNearestViewportElement(const nsIContent *aContent)
|
||||
{
|
||||
nsIContent *element = aContent->GetFlattenedTreeParent();
|
||||
|
||||
@@ -384,7 +384,11 @@ SVGContentUtils::GetNearestViewportElement(nsIContent *aContent)
|
||||
if (element->IsSVGElement(nsGkAtoms::foreignObject)) {
|
||||
return nullptr;
|
||||
}
|
||||
- return static_cast<nsSVGElement*>(element);
|
||||
+ MOZ_ASSERT(element->IsAnyOfSVGElements(nsGkAtoms::svg,
|
||||
+ nsGkAtoms::symbol),
|
||||
+ "upcoming static_cast is only valid for "
|
||||
+ "SVGViewportElement subclasses");
|
||||
+ return static_cast<SVGViewportElement*>(element);
|
||||
}
|
||||
element = element->GetFlattenedTreeParent();
|
||||
}
|
||||
@@ -828,7 +832,7 @@ SVGContentUtils::CoordToFloat(nsSVGElement *aContent,
|
||||
return nsPresContext::AppUnitsToFloatCSSPixels(aCoord.GetCoordValue());
|
||||
|
||||
case eStyleUnit_Percent: {
|
||||
- SVGSVGElement* ctx = aContent->GetCtx();
|
||||
+ SVGViewportElement* ctx = aContent->GetCtx();
|
||||
return ctx ? aCoord.GetPercentValue() * ctx->GetLength(SVGContentUtils::XY) : 0.0f;
|
||||
}
|
||||
default:
|
||||
diff --git dom/svg/SVGContentUtils.h dom/svg/SVGContentUtils.h
|
||||
index 36c74f47d75a..8ec309daf6f8 100644
|
||||
--- dom/svg/SVGContentUtils.h
|
||||
+++ dom/svg/SVGContentUtils.h
|
||||
@@ -32,6 +32,7 @@ class SVGPreserveAspectRatio;
|
||||
namespace dom {
|
||||
class Element;
|
||||
class SVGSVGElement;
|
||||
+class SVGViewportElement;
|
||||
} // namespace dom
|
||||
|
||||
} // namespace mozilla
|
||||
@@ -238,8 +239,8 @@ public:
|
||||
*/
|
||||
static bool EstablishesViewport(nsIContent *aContent);
|
||||
|
||||
- static nsSVGElement*
|
||||
- GetNearestViewportElement(nsIContent *aContent);
|
||||
+ static mozilla::dom::SVGViewportElement*
|
||||
+ GetNearestViewportElement(const nsIContent *aContent);
|
||||
|
||||
/* enum for specifying coordinate direction for ObjectSpace/UserSpace */
|
||||
enum ctxDirection { X, Y, XY };
|
||||
diff --git dom/svg/SVGLength.cpp dom/svg/SVGLength.cpp
|
||||
index 6c13e2e8d1a0..cecbbc8f5b40 100644
|
||||
--- dom/svg/SVGLength.cpp
|
||||
+++ dom/svg/SVGLength.cpp
|
||||
@@ -177,7 +177,7 @@ SVGLength::GetUserUnitsPerUnit(const nsSVGElement *aElement, uint8_t aAxis) cons
|
||||
SVGLength::GetUserUnitsPerPercent(const nsSVGElement *aElement, uint8_t aAxis)
|
||||
{
|
||||
if (aElement) {
|
||||
- dom::SVGSVGElement *viewportElement = aElement->GetCtx();
|
||||
+ dom::SVGViewportElement *viewportElement = aElement->GetCtx();
|
||||
if (viewportElement) {
|
||||
return std::max(viewportElement->GetLength(aAxis) / 100.0f, 0.0f);
|
||||
}
|
||||
diff --git dom/svg/SVGMarkerElement.cpp dom/svg/SVGMarkerElement.cpp
|
||||
index 9b0b2fcfab1e..c4cf29ae274f 100644
|
||||
--- dom/svg/SVGMarkerElement.cpp
|
||||
+++ dom/svg/SVGMarkerElement.cpp
|
||||
@@ -250,7 +250,7 @@ SVGMarkerElement::UnsetAttr(int32_t aNamespaceID, nsIAtom* aName,
|
||||
// nsSVGElement methods
|
||||
|
||||
void
|
||||
-SVGMarkerElement::SetParentCoordCtxProvider(SVGSVGElement *aContext)
|
||||
+SVGMarkerElement::SetParentCoordCtxProvider(SVGViewportElement *aContext)
|
||||
{
|
||||
mCoordCtx = aContext;
|
||||
mViewBoxToViewportTransform = nullptr;
|
||||
diff --git dom/svg/SVGMarkerElement.h dom/svg/SVGMarkerElement.h
|
||||
index 5d32de840b7a..ae08885c646e 100644
|
||||
--- dom/svg/SVGMarkerElement.h
|
||||
+++ dom/svg/SVGMarkerElement.h
|
||||
@@ -153,7 +153,7 @@ protected:
|
||||
const nsAString& aValue,
|
||||
nsAttrValue& aResult) override;
|
||||
|
||||
- void SetParentCoordCtxProvider(SVGSVGElement *aContext);
|
||||
+ void SetParentCoordCtxProvider(SVGViewportElement *aContext);
|
||||
|
||||
virtual LengthAttributesInfo GetLengthInfo() override;
|
||||
virtual AngleAttributesInfo GetAngleInfo() override;
|
||||
@@ -180,7 +180,7 @@ protected:
|
||||
// derived properties (from 'orient') handled separately
|
||||
nsSVGOrientType mOrientType;
|
||||
|
||||
- SVGSVGElement *mCoordCtx;
|
||||
+ SVGViewportElement* mCoordCtx;
|
||||
nsAutoPtr<gfx::Matrix> mViewBoxToViewportTransform;
|
||||
};
|
||||
|
||||
diff --git dom/svg/SVGSVGElement.h dom/svg/SVGSVGElement.h
|
||||
index fc3d7f3b55c5..431d70da2bef 100644
|
||||
--- dom/svg/SVGSVGElement.h
|
||||
+++ dom/svg/SVGSVGElement.h
|
||||
@@ -182,15 +182,6 @@ public:
|
||||
// SVG-as-an-image documents.)
|
||||
virtual void FlushImageTransformInvalidation();
|
||||
|
||||
- svgFloatSize GetViewportSize() const {
|
||||
- return svgFloatSize(mViewportWidth, mViewportHeight);
|
||||
- }
|
||||
-
|
||||
- void SetViewportSize(const svgFloatSize& aSize) {
|
||||
- mViewportWidth = aSize.width;
|
||||
- mViewportHeight = aSize.height;
|
||||
- }
|
||||
-
|
||||
private:
|
||||
// SVGViewportElement methods:
|
||||
|
||||
diff --git dom/svg/SVGViewportElement.h dom/svg/SVGViewportElement.h
|
||||
index fbc866e6a8d2..202797785131 100644
|
||||
--- dom/svg/SVGViewportElement.h
|
||||
+++ dom/svg/SVGViewportElement.h
|
||||
@@ -127,6 +127,15 @@ public:
|
||||
|
||||
gfx::Matrix GetViewBoxTransform() const;
|
||||
|
||||
+ svgFloatSize GetViewportSize() const {
|
||||
+ return svgFloatSize(mViewportWidth, mViewportHeight);
|
||||
+ }
|
||||
+
|
||||
+ void SetViewportSize(const svgFloatSize& aSize) {
|
||||
+ mViewportWidth = aSize.width;
|
||||
+ mViewportHeight = aSize.height;
|
||||
+ }
|
||||
+
|
||||
// WebIDL
|
||||
already_AddRefed<SVGAnimatedRect> ViewBox();
|
||||
already_AddRefed<DOMSVGAnimatedPreserveAspectRatio> PreserveAspectRatio();
|
||||
diff --git dom/svg/nsSVGElement.cpp dom/svg/nsSVGElement.cpp
|
||||
index 8757150c5925..a8aaa2fb5274 100644
|
||||
--- dom/svg/nsSVGElement.cpp
|
||||
+++ dom/svg/nsSVGElement.cpp
|
||||
@@ -1107,7 +1107,20 @@ nsSVGElement::GetOwnerSVGElement(nsIDOMSVGElement * *aOwnerSVGElement)
|
||||
SVGSVGElement*
|
||||
nsSVGElement::GetOwnerSVGElement()
|
||||
{
|
||||
- return GetCtx(); // this may return nullptr
|
||||
+ nsIContent* ancestor = GetFlattenedTreeParent();
|
||||
+
|
||||
+ while (ancestor && ancestor->IsSVGElement()) {
|
||||
+ if (ancestor->IsSVGElement(nsGkAtoms::foreignObject)) {
|
||||
+ return nullptr;
|
||||
+ }
|
||||
+ if (ancestor->IsSVGElement(nsGkAtoms::svg)) {
|
||||
+ return static_cast<SVGSVGElement*>(ancestor);
|
||||
+ }
|
||||
+ ancestor = ancestor->GetFlattenedTreeParent();
|
||||
+ }
|
||||
+
|
||||
+ // we don't have an ancestor <svg> element...
|
||||
+ return nullptr;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
@@ -1543,23 +1556,10 @@ nsIAtom* nsSVGElement::GetEventNameForAttr(nsIAtom* aAttr)
|
||||
return aAttr;
|
||||
}
|
||||
|
||||
-SVGSVGElement *
|
||||
+SVGViewportElement *
|
||||
nsSVGElement::GetCtx() const
|
||||
{
|
||||
- nsIContent* ancestor = GetFlattenedTreeParent();
|
||||
-
|
||||
- while (ancestor && ancestor->IsSVGElement()) {
|
||||
- if (ancestor->IsSVGElement(nsGkAtoms::foreignObject)) {
|
||||
- return nullptr;
|
||||
- }
|
||||
- if (ancestor->IsSVGElement(nsGkAtoms::svg)) {
|
||||
- return static_cast<SVGSVGElement*>(ancestor);
|
||||
- }
|
||||
- ancestor = ancestor->GetFlattenedTreeParent();
|
||||
- }
|
||||
-
|
||||
- // we don't have an ancestor <svg> element...
|
||||
- return nullptr;
|
||||
+ return SVGContentUtils::GetNearestViewportElement(this);
|
||||
}
|
||||
|
||||
/* virtual */ gfxMatrix
|
||||
@@ -1658,7 +1658,7 @@ nsSVGElement::GetAnimatedLengthValues(float *aFirst, ...)
|
||||
NS_ASSERTION(info.mLengthCount > 0,
|
||||
"GetAnimatedLengthValues on element with no length attribs");
|
||||
|
||||
- SVGSVGElement *ctx = nullptr;
|
||||
+ SVGViewportElement *ctx = nullptr;
|
||||
|
||||
float *f = aFirst;
|
||||
uint32_t i = 0;
|
||||
diff --git dom/svg/nsSVGElement.h dom/svg/nsSVGElement.h
|
||||
index 28c46188d4e4..955a327561d3 100644
|
||||
--- dom/svg/nsSVGElement.h
|
||||
+++ dom/svg/nsSVGElement.h
|
||||
@@ -44,6 +44,7 @@ class DeclarationBlock;
|
||||
|
||||
namespace dom {
|
||||
class SVGSVGElement;
|
||||
+class SVGViewportElement;
|
||||
|
||||
static const unsigned short SVG_UNIT_TYPE_UNKNOWN = 0;
|
||||
static const unsigned short SVG_UNIT_TYPE_USERSPACEONUSE = 1;
|
||||
@@ -145,7 +146,7 @@ public:
|
||||
// Gets the element that establishes the rectangular viewport against which
|
||||
// we should resolve percentage lengths (our "coordinate context"). Returns
|
||||
// nullptr for outer <svg> or SVG without an <svg> parent (invalid SVG).
|
||||
- mozilla::dom::SVGSVGElement* GetCtx() const;
|
||||
+ mozilla::dom::SVGViewportElement* GetCtx() const;
|
||||
|
||||
/**
|
||||
* Returns aMatrix pre-multiplied by (explicit or implicit) transforms that
|
||||
diff --git layout/base/nsLayoutUtils.cpp layout/base/nsLayoutUtils.cpp
|
||||
index f5ca2719e333..7f3f5354befc 100644
|
||||
--- layout/base/nsLayoutUtils.cpp
|
||||
+++ layout/base/nsLayoutUtils.cpp
|
||||
@@ -120,7 +120,7 @@
|
||||
#include "mozilla/StyleSetHandle.h"
|
||||
#include "mozilla/StyleSetHandleInlines.h"
|
||||
#include "RegionBuilder.h"
|
||||
-#include "SVGSVGElement.h"
|
||||
+#include "SVGViewportElement.h"
|
||||
#include "DisplayItemClip.h"
|
||||
#include "mozilla/layers/WebRenderLayerManager.h"
|
||||
#include "prenv.h"
|
||||
@@ -9479,7 +9479,7 @@ ComputeSVGReferenceRect(nsIFrame* aFrame,
|
||||
case StyleGeometryBox::ViewBox: {
|
||||
nsIContent* content = aFrame->GetContent();
|
||||
nsSVGElement* element = static_cast<nsSVGElement*>(content);
|
||||
- SVGSVGElement* svgElement = element->GetCtx();
|
||||
+ SVGViewportElement* svgElement = element->GetCtx();
|
||||
MOZ_ASSERT(svgElement);
|
||||
|
||||
if (svgElement && svgElement->HasViewBoxRect()) {
|
||||
diff --git layout/reftests/svg/reftest.list layout/reftests/svg/reftest.list
|
||||
index 2d3981f0b65e..0b96144724bb 100644
|
||||
--- layout/reftests/svg/reftest.list
|
||||
+++ layout/reftests/svg/reftest.list
|
||||
@@ -532,6 +532,7 @@ fuzzy-if(skiaContent,1,100) == tspan-xy-anchor-end-01.svg tspan-xy-anchor-end-re
|
||||
== viewBox-and-pattern-02.svg pass.svg
|
||||
== viewBox-and-pattern-03.svg pass.svg
|
||||
== viewBox-and-pattern-04.svg pass.svg
|
||||
+== viewBox-and-symbol-01.svg pass.svg
|
||||
== viewBox-invalid-01.svg pass.svg
|
||||
== viewBox-invalid-02.svg pass.svg
|
||||
== viewBox-valid-01.svg pass.svg
|
||||
diff --git layout/reftests/svg/viewBox-and-symbol-01.svg layout/reftests/svg/viewBox-and-symbol-01.svg
|
||||
new file mode 100644
|
||||
index 000000000000..5c8ebf7bc3ea
|
||||
--- /dev/null
|
||||
+++ layout/reftests/svg/viewBox-and-symbol-01.svg
|
||||
@@ -0,0 +1,14 @@
|
||||
+<svg xmlns="http://www.w3.org/2000/svg">
|
||||
+ <defs>
|
||||
+ <symbol id="mySymbol" viewBox="0 0 20 20">
|
||||
+ <rect fill="lime" x="50%" height="20px" width="3%"/>
|
||||
+ </symbol>
|
||||
+ </defs>
|
||||
+ <rect width="100%" height="100%" fill="lime"/>
|
||||
+ <svg viewBox="0 0 20 20">
|
||||
+ <rect fill="red" x="50%" height="20px" width="2%"/>
|
||||
+ </svg>
|
||||
+ <svg>
|
||||
+ <use href="#mySymbol"/>
|
||||
+ </svg>
|
||||
+</svg>
|
||||
diff --git layout/svg/nsCSSClipPathInstance.cpp layout/svg/nsCSSClipPathInstance.cpp
|
||||
index 09d3530c4ef0..0c25f7a21bb8 100644
|
||||
--- layout/svg/nsCSSClipPathInstance.cpp
|
||||
+++ layout/svg/nsCSSClipPathInstance.cpp
|
||||
@@ -9,7 +9,6 @@
|
||||
#include "gfx2DGlue.h"
|
||||
#include "gfxContext.h"
|
||||
#include "gfxPlatform.h"
|
||||
-#include "mozilla/dom/SVGSVGElement.h"
|
||||
#include "mozilla/gfx/2D.h"
|
||||
#include "mozilla/gfx/PathHelpers.h"
|
||||
#include "mozilla/ShapeUtils.h"
|
||||
diff --git layout/svg/nsSVGImageFrame.cpp layout/svg/nsSVGImageFrame.cpp
|
||||
index 074415854667..21834954721d 100644
|
||||
--- layout/svg/nsSVGImageFrame.cpp
|
||||
+++ layout/svg/nsSVGImageFrame.cpp
|
||||
@@ -16,7 +16,6 @@
|
||||
#include "nsLayoutUtils.h"
|
||||
#include "imgINotificationObserver.h"
|
||||
#include "nsSVGEffects.h"
|
||||
-#include "mozilla/dom/SVGSVGElement.h"
|
||||
#include "nsSVGUtils.h"
|
||||
#include "SVGContentUtils.h"
|
||||
#include "SVGGeometryFrame.h"
|
||||
diff --git layout/svg/nsSVGImageFrame.h layout/svg/nsSVGImageFrame.h
|
||||
index b2c90fd6402d..fe0ac33ac02a 100644
|
||||
--- layout/svg/nsSVGImageFrame.h
|
||||
+++ layout/svg/nsSVGImageFrame.h
|
||||
@@ -17,7 +17,6 @@
|
||||
#include "nsLayoutUtils.h"
|
||||
#include "imgINotificationObserver.h"
|
||||
#include "nsSVGEffects.h"
|
||||
-#include "mozilla/dom/SVGSVGElement.h"
|
||||
#include "nsSVGUtils.h"
|
||||
#include "SVGContentUtils.h"
|
||||
#include "SVGGeometryFrame.h"
|
||||
diff --git layout/svg/nsSVGMarkerFrame.cpp layout/svg/nsSVGMarkerFrame.cpp
|
||||
index dbeb02ea5b2d..365a0aa70a26 100644
|
||||
--- layout/svg/nsSVGMarkerFrame.cpp
|
||||
+++ layout/svg/nsSVGMarkerFrame.cpp
|
||||
@@ -194,7 +194,7 @@ nsSVGMarkerFrame::GetMarkBBoxContribution(const Matrix& aToBBoxUserspace,
|
||||
}
|
||||
|
||||
void
|
||||
-nsSVGMarkerFrame::SetParentCoordCtxProvider(SVGSVGElement *aContext)
|
||||
+nsSVGMarkerFrame::SetParentCoordCtxProvider(SVGViewportElement *aContext)
|
||||
{
|
||||
SVGMarkerElement *marker = static_cast<SVGMarkerElement*>(mContent);
|
||||
marker->SetParentCoordCtxProvider(aContext);
|
||||
@@ -219,7 +219,7 @@ nsSVGMarkerFrame::AutoMarkerReferencer::AutoMarkerReferencer(
|
||||
mFrame->mInUse = true;
|
||||
mFrame->mMarkedFrame = aMarkedFrame;
|
||||
|
||||
- SVGSVGElement *ctx =
|
||||
+ SVGViewportElement *ctx =
|
||||
static_cast<nsSVGElement*>(aMarkedFrame->GetContent())->GetCtx();
|
||||
mFrame->SetParentCoordCtxProvider(ctx);
|
||||
}
|
||||
diff --git layout/svg/nsSVGMarkerFrame.h layout/svg/nsSVGMarkerFrame.h
|
||||
index 95415e6dcc21..03099eab9324 100644
|
||||
--- layout/svg/nsSVGMarkerFrame.h
|
||||
+++ layout/svg/nsSVGMarkerFrame.h
|
||||
@@ -20,7 +20,7 @@ class gfxContext;
|
||||
namespace mozilla {
|
||||
class SVGGeometryFrame;
|
||||
namespace dom {
|
||||
-class SVGSVGElement;
|
||||
+class SVGViewportElement;
|
||||
} // namespace dom
|
||||
} // namespace mozilla
|
||||
|
||||
@@ -119,7 +119,7 @@ private:
|
||||
};
|
||||
|
||||
// nsSVGMarkerFrame methods:
|
||||
- void SetParentCoordCtxProvider(mozilla::dom::SVGSVGElement *aContext);
|
||||
+ void SetParentCoordCtxProvider(mozilla::dom::SVGViewportElement *aContext);
|
||||
|
||||
// recursion prevention flag
|
||||
bool mInUse;
|
||||
diff --git layout/svg/nsSVGPatternFrame.cpp layout/svg/nsSVGPatternFrame.cpp
|
||||
index 488ac2f5c783..5078fb1b5a31 100644
|
||||
--- layout/svg/nsSVGPatternFrame.cpp
|
||||
+++ layout/svg/nsSVGPatternFrame.cpp
|
||||
@@ -660,7 +660,7 @@ nsSVGPatternFrame::ConstructCTM(const nsSVGViewBox& aViewBox,
|
||||
const Matrix &callerCTM,
|
||||
nsIFrame *aTarget)
|
||||
{
|
||||
- SVGSVGElement *ctx = nullptr;
|
||||
+ SVGViewportElement *ctx = nullptr;
|
||||
nsIContent* targetContent = aTarget->GetContent();
|
||||
gfxFloat scaleX, scaleY;
|
||||
|
||||
diff --git layout/svg/nsSVGUtils.cpp layout/svg/nsSVGUtils.cpp
|
||||
index d53a3ede0be7..f21c23491285 100644
|
||||
--- layout/svg/nsSVGUtils.cpp
|
||||
+++ layout/svg/nsSVGUtils.cpp
|
||||
@@ -49,7 +49,7 @@
|
||||
#include "SVGGeometryElement.h"
|
||||
#include "SVGGeometryFrame.h"
|
||||
#include "nsSVGPaintServerFrame.h"
|
||||
-#include "mozilla/dom/SVGSVGElement.h"
|
||||
+#include "mozilla/dom/SVGViewportElement.h"
|
||||
#include "nsTextFrame.h"
|
||||
#include "SVGContentUtils.h"
|
||||
#include "SVGTextFrame.h"
|
||||
@@ -290,7 +290,7 @@ nsSVGUtils::GetContextSize(const nsIFrame* aFrame)
|
||||
MOZ_ASSERT(aFrame->GetContent()->IsSVGElement(), "bad cast");
|
||||
const nsSVGElement* element = static_cast<nsSVGElement*>(aFrame->GetContent());
|
||||
|
||||
- SVGSVGElement* ctx = element->GetCtx();
|
||||
+ SVGViewportElement* ctx = element->GetCtx();
|
||||
if (ctx) {
|
||||
size.width = ctx->GetLength(SVGContentUtils::X);
|
||||
size.height = ctx->GetLength(SVGContentUtils::Y);
|
||||
@@ -323,7 +323,7 @@ nsSVGUtils::ObjectSpace(const gfxRect &aRect, const nsSVGLength2 *aLength)
|
||||
// Multiply first to avoid precision errors:
|
||||
return axis * aLength->GetAnimValInSpecifiedUnits() / 100;
|
||||
}
|
||||
- return aLength->GetAnimValue(static_cast<SVGSVGElement*>(nullptr)) * axis;
|
||||
+ return aLength->GetAnimValue(static_cast<SVGViewportElement*>(nullptr)) * axis;
|
||||
}
|
||||
|
||||
float
|
70
www/waterfox/files/patch-bug1400674
Normal file
70
www/waterfox/files/patch-bug1400674
Normal file
|
@ -0,0 +1,70 @@
|
|||
commit c08bea16ab67 (HEAD)
|
||||
Author: JW Wang <jwwang@mozilla.com>
|
||||
Date: Fri Oct 13 17:24:24 2017 +0800
|
||||
|
||||
Bug 1400674 - Fix the algorithm of filling audio gaps with silence. r=jya, a=ritu
|
||||
|
||||
MozReview-Commit-ID: Hjsboq6PdlN
|
||||
|
||||
--HG--
|
||||
extra : source : aecaa85bb1d9d8b7d2cbd9ab84eb6dbc0ed9eee8
|
||||
---
|
||||
dom/media/mediasink/AudioSink.cpp | 37 +++++++++++++++----------------------
|
||||
1 file changed, 15 insertions(+), 22 deletions(-)
|
||||
|
||||
diff --git dom/media/mediasink/AudioSink.cpp dom/media/mediasink/AudioSink.cpp
|
||||
index 0dbb53a3387a..81be7ac0bd89 100644
|
||||
--- dom/media/mediasink/AudioSink.cpp
|
||||
+++ dom/media/mediasink/AudioSink.cpp
|
||||
@@ -426,28 +426,21 @@ AudioSink::NotifyAudioNeeded()
|
||||
missingFrames = std::min<int64_t>(INT32_MAX, missingFrames.value());
|
||||
mFramesParsed += missingFrames.value();
|
||||
|
||||
- // We need to calculate how many frames are missing at the output rate.
|
||||
- missingFrames =
|
||||
- SaferMultDiv(missingFrames.value(), mOutputRate, data->mRate);
|
||||
- if (!missingFrames.isValid()) {
|
||||
- NS_WARNING("Int overflow in AudioSink");
|
||||
- mErrored = true;
|
||||
- return;
|
||||
- }
|
||||
-
|
||||
- // We need to insert silence, first use drained frames if any.
|
||||
- missingFrames -= DrainConverter(missingFrames.value());
|
||||
- // Insert silence if still needed.
|
||||
- if (missingFrames.value()) {
|
||||
- AlignedAudioBuffer silenceData(missingFrames.value() * mOutputChannels);
|
||||
- if (!silenceData) {
|
||||
- NS_WARNING("OOM in AudioSink");
|
||||
- mErrored = true;
|
||||
- return;
|
||||
- }
|
||||
- RefPtr<AudioData> silence = CreateAudioFromBuffer(Move(silenceData), data);
|
||||
- PushProcessedAudio(silence);
|
||||
+ RefPtr<AudioData> silenceData;
|
||||
+ AlignedAudioBuffer silenceBuffer(missingFrames.value() * data->mChannels);
|
||||
+ if (!silenceBuffer) {
|
||||
+ NS_WARNING("OOM in AudioSink");
|
||||
+ mErrored = true;
|
||||
+ return;
|
||||
+ }
|
||||
+ if (mConverter->InputConfig() != mConverter->OutputConfig()) {
|
||||
+ AlignedAudioBuffer convertedData =
|
||||
+ mConverter->Process(AudioSampleBuffer(Move(silenceBuffer))).Forget();
|
||||
+ silenceData = CreateAudioFromBuffer(Move(convertedData), data);
|
||||
+ } else {
|
||||
+ silenceData = CreateAudioFromBuffer(Move(silenceBuffer), data);
|
||||
}
|
||||
+ PushProcessedAudio(silenceData);
|
||||
}
|
||||
|
||||
mLastEndTime = data->GetEndTime();
|
||||
@@ -488,7 +481,7 @@ AudioSink::PushProcessedAudio(AudioData* aData)
|
||||
|
||||
already_AddRefed<AudioData>
|
||||
AudioSink::CreateAudioFromBuffer(AlignedAudioBuffer&& aBuffer,
|
||||
- AudioData* aReference)
|
||||
+ AudioData* aReference)
|
||||
{
|
||||
uint32_t frames = aBuffer.Length() / mOutputChannels;
|
||||
if (!frames) {
|
34
www/waterfox/files/patch-bug1401522
Normal file
34
www/waterfox/files/patch-bug1401522
Normal file
|
@ -0,0 +1,34 @@
|
|||
commit e9d4b51968e0
|
||||
Author: Samael Wang <freesamael@gmail.com>
|
||||
Date: Thu Sep 28 11:16:53 2017 +0800
|
||||
|
||||
Bug 1401522 - Don't apply statusCode sent from parent if mCanceled or mStatus has been modified in the child. r=mayhemer, a=ritu
|
||||
|
||||
When a WyciwygChannel is canceled, but WyciwygChannelParent::RecvCancel happens
|
||||
after WyciwygChannelParent::SendOnStartRequest, it would send statusCode=NS_OK
|
||||
to WyciwygChannelChild::OnStartRequest. So we should not apply the statusCode
|
||||
if mCanceled, just like how HttpChannelChild handles it.
|
||||
|
||||
MozReview-Commit-ID: 5H3PUrlArIA
|
||||
|
||||
--HG--
|
||||
extra : source : 8ebfa90c4ebca44ac1c3829ef54de74d3b004dfc
|
||||
---
|
||||
netwerk/protocol/wyciwyg/WyciwygChannelChild.cpp | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git netwerk/protocol/wyciwyg/WyciwygChannelChild.cpp netwerk/protocol/wyciwyg/WyciwygChannelChild.cpp
|
||||
index d14b6f925e37..85d3ebf24439 100644
|
||||
--- netwerk/protocol/wyciwyg/WyciwygChannelChild.cpp
|
||||
+++ netwerk/protocol/wyciwyg/WyciwygChannelChild.cpp
|
||||
@@ -191,7 +191,9 @@ WyciwygChannelChild::OnStartRequest(const nsresult& statusCode,
|
||||
|
||||
mState = WCC_ONSTART;
|
||||
|
||||
- mStatus = statusCode;
|
||||
+ if (!mCanceled && NS_SUCCEEDED(mStatus)) {
|
||||
+ mStatus = statusCode;
|
||||
+ }
|
||||
mContentLength = contentLength;
|
||||
mCharsetSource = source;
|
||||
mCharset = charset;
|
48
www/waterfox/files/patch-bug1401876
Normal file
48
www/waterfox/files/patch-bug1401876
Normal file
|
@ -0,0 +1,48 @@
|
|||
commit 09ba71b3a5e9
|
||||
Author: Scott Wu <scottcwwu@gmail.com>
|
||||
Date: Thu Sep 21 15:37:25 2017 +0800
|
||||
|
||||
Bug 1401876 - Part 1: Close datetime picker on popuphidden. r=mconley, a=ritu
|
||||
|
||||
MozReview-Commit-ID: FUqbtAftQxh
|
||||
|
||||
--HG--
|
||||
extra : source : e238860e4943cd1bb4c2c5f7175a36d494f0e91b
|
||||
---
|
||||
toolkit/content/tests/browser/head.js | 1 +
|
||||
toolkit/content/widgets/datetimepopup.xml | 2 +-
|
||||
toolkit/modules/DateTimePickerHelper.jsm | 1 +
|
||||
3 files changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git toolkit/content/widgets/datetimepopup.xml toolkit/content/widgets/datetimepopup.xml
|
||||
index 7e4e5bcfe4e8..7397e1d310d4 100644
|
||||
--- toolkit/content/widgets/datetimepopup.xml
|
||||
+++ toolkit/content/widgets/datetimepopup.xml
|
||||
@@ -75,7 +75,6 @@
|
||||
this.dateTimePopupFrame.removeEventListener("load", this, true);
|
||||
this.dateTimePopupFrame.contentDocument.removeEventListener("message", this);
|
||||
this.dateTimePopupFrame.setAttribute("src", "");
|
||||
- this.hidePopup();
|
||||
this.hidden = true;
|
||||
]]></body>
|
||||
</method>
|
||||
@@ -320,6 +319,7 @@
|
||||
break;
|
||||
}
|
||||
case "ClosePopup": {
|
||||
+ this.hidePopup();
|
||||
this.closePicker();
|
||||
break;
|
||||
}
|
||||
diff --git toolkit/modules/DateTimePickerHelper.jsm toolkit/modules/DateTimePickerHelper.jsm
|
||||
index ced4e401815b..38e89bd0d160 100644
|
||||
--- toolkit/modules/DateTimePickerHelper.jsm
|
||||
+++ toolkit/modules/DateTimePickerHelper.jsm
|
||||
@@ -90,6 +90,7 @@ this.DateTimePickerHelper = {
|
||||
if (browser) {
|
||||
browser.messageManager.sendAsyncMessage("FormDateTime:PickerClosed");
|
||||
}
|
||||
+ this.picker.closePicker();
|
||||
this.close();
|
||||
break;
|
||||
}
|
28
www/waterfox/files/patch-bug1402871
Normal file
28
www/waterfox/files/patch-bug1402871
Normal file
|
@ -0,0 +1,28 @@
|
|||
commit 6f6ee3c5b2ad
|
||||
Author: Kearwood Gilbert <kgilbert@mozilla.com>
|
||||
Date: Wed Oct 11 14:25:51 2017 -0700
|
||||
|
||||
Bug 1402871 - Change VREventObserver::mWindow to a RefPtr. r=dveditz, a=ritu
|
||||
|
||||
MozReview-Commit-ID: 79MlNMAvIQD
|
||||
|
||||
--HG--
|
||||
extra : source : 84ff58454e222ce067ec27f8841ba684934b7666
|
||||
---
|
||||
dom/vr/VREventObserver.h | 3 +--
|
||||
1 file changed, 1 insertion(+), 2 deletions(-)
|
||||
|
||||
diff --git dom/vr/VREventObserver.h dom/vr/VREventObserver.h
|
||||
index 24a1065a18fe..cd2cf69469b5 100644
|
||||
--- dom/vr/VREventObserver.h
|
||||
+++ dom/vr/VREventObserver.h
|
||||
@@ -34,8 +34,7 @@ public:
|
||||
private:
|
||||
~VREventObserver();
|
||||
|
||||
- // Weak pointer, instance is owned by mWindow.
|
||||
- nsGlobalWindow* MOZ_NON_OWNING_REF mWindow;
|
||||
+ RefPtr<nsGlobalWindow> mWindow;
|
||||
// For WebVR telemetry for tracking users who view content
|
||||
// in the 2D view.
|
||||
TimeStamp mSpendTimeIn2DView;
|
1216
www/waterfox/files/patch-bug1403349
Normal file
1216
www/waterfox/files/patch-bug1403349
Normal file
File diff suppressed because it is too large
Load diff
50
www/waterfox/files/patch-bug1403466
Normal file
50
www/waterfox/files/patch-bug1403466
Normal file
|
@ -0,0 +1,50 @@
|
|||
commit 0d4a6317df44
|
||||
Author: Mike de Boer <mdeboer@mozilla.com>
|
||||
Date: Tue Oct 10 12:44:04 2017 +0200
|
||||
|
||||
Bug 1403466 - Don't set a max-height on panelviews used by WebExtensions, because it causes browser contents to be cut-off. r=Gijs, a=ritu
|
||||
|
||||
Setting a max-height caused the '_handleDOMChange' method in ext-browser-content.js
|
||||
to consistently lie about the scrollHeight, since it was never allowed to grow
|
||||
beyond the maxHeight - even when the document needs to be larger to fit its contents.
|
||||
We don't need this aggressiveness in Photon panels anyway, so that makes it
|
||||
doubly safe to remove this code.
|
||||
|
||||
MozReview-Commit-ID: HJVMXXHS4By
|
||||
|
||||
--HG--
|
||||
extra : source : cd62fb50fe61504937ff3d37db3852bae0d73d0c
|
||||
---
|
||||
browser/components/extensions/ExtensionPopups.jsm | 10 +---------
|
||||
1 file changed, 1 insertion(+), 9 deletions(-)
|
||||
|
||||
diff --git browser/components/extensions/ExtensionPopups.jsm browser/components/extensions/ExtensionPopups.jsm
|
||||
index 5ac4f43943f1..cc02e48b32dd 100644
|
||||
--- browser/components/extensions/ExtensionPopups.jsm
|
||||
+++ browser/components/extensions/ExtensionPopups.jsm
|
||||
@@ -123,7 +123,6 @@ class BasePopup {
|
||||
|
||||
if (this.viewNode) {
|
||||
this.viewNode.removeEventListener(this.DESTROY_EVENT, this);
|
||||
- this.viewNode.style.maxHeight = "";
|
||||
delete this.viewNode.customRectGetter;
|
||||
}
|
||||
|
||||
@@ -331,16 +330,9 @@ class BasePopup {
|
||||
height = Math.min(height, maxHeight);
|
||||
this.browser.style.height = `${height}px`;
|
||||
|
||||
- // Set a maximum height on the <panelview> element to our preferred
|
||||
- // maximum height, so that the PanelUI resizing code can make an accurate
|
||||
- // calculation. If we don't do this, the flex sizing logic will prevent us
|
||||
- // from ever reporting a preferred size smaller than the height currently
|
||||
- // available to us in the panel.
|
||||
- height = Math.max(height, this.viewHeight);
|
||||
- this.viewNode.style.maxHeight = `${height}px`;
|
||||
// Used by the panelmultiview code to figure out sizing without reparenting
|
||||
// (which would destroy the browser and break us).
|
||||
- this.lastCalculatedInViewHeight = height;
|
||||
+ this.lastCalculatedInViewHeight = Math.max(height, this.viewHeight);
|
||||
} else {
|
||||
this.browser.style.width = `${width}px`;
|
||||
this.browser.style.minWidth = `${width}px`;
|
120
www/waterfox/files/patch-bug1404568
Normal file
120
www/waterfox/files/patch-bug1404568
Normal file
|
@ -0,0 +1,120 @@
|
|||
commit 7d205a638012
|
||||
Author: Ian Moody <moz-ian@perix.co.uk>
|
||||
Date: Sun Oct 8 13:23:33 2017 +0100
|
||||
|
||||
Bug 1404568 - Improve webext browser_action icon fallbacks. r=mixedpuppy, a=ritu
|
||||
|
||||
Currently if there is no default icon at the specified size, the default icon
|
||||
falls back to the light text icon at that size. This is wrong in two ways:
|
||||
First, the default theme uses dark text, so it should fallback to the dark icon
|
||||
Secondly, authors expect the unsized default_icon to be used if specified
|
||||
|
||||
This patch fixes both of these issues, so that the default icon first falls back
|
||||
to the unsized default_icon, and then only if that is not specified falls back
|
||||
to the dark icon
|
||||
|
||||
MozReview-Commit-ID: C3RRTKhYq6r
|
||||
|
||||
--HG--
|
||||
extra : source : ca81275884eb6147bd1022779fcac81fa0930128
|
||||
---
|
||||
.../extensions/test/browser/browser_ext_browserAction_theme_icons.js | 4 ++--
|
||||
toolkit/components/extensions/ExtensionParent.jsm | 4 ++--
|
||||
2 files changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git browser/components/extensions/test/browser/browser_ext_browserAction_theme_icons.js browser/components/extensions/test/browser/browser_ext_browserAction_theme_icons.js
|
||||
index 05d8474ab2b6..b910568e0f78 100644
|
||||
--- browser/components/extensions/test/browser/browser_ext_browserAction_theme_icons.js
|
||||
+++ browser/components/extensions/test/browser/browser_ext_browserAction_theme_icons.js
|
||||
@@ -46,7 +46,7 @@ async function testStaticTheme(options) {
|
||||
await extension.startup();
|
||||
|
||||
// Confirm that the browser action has the correct default icon before a theme is loaded.
|
||||
- let expectedDefaultIcon = withDefaultIcon ? "default.png" : "light.png";
|
||||
+ let expectedDefaultIcon = withDefaultIcon ? "default.png" : "dark.png";
|
||||
await testBrowserAction(extension, expectedDefaultIcon);
|
||||
|
||||
let theme = ExtensionTestUtils.loadExtension({
|
||||
@@ -164,7 +164,7 @@ add_task(async function browseraction_theme_icons_dynamic_theme() {
|
||||
"theme_icons": [{
|
||||
"light": "light.png",
|
||||
"dark": "dark.png",
|
||||
- "size": 19,
|
||||
+ "size": 16,
|
||||
}],
|
||||
},
|
||||
},
|
||||
diff --git toolkit/components/extensions/ExtensionParent.jsm toolkit/components/extensions/ExtensionParent.jsm
|
||||
index e608ff2d19c6..75df6a285195 100644
|
||||
--- toolkit/components/extensions/ExtensionParent.jsm
|
||||
+++ toolkit/components/extensions/ExtensionParent.jsm
|
||||
@@ -1306,9 +1306,9 @@ let IconDetails = {
|
||||
this._checkURL(lightURL, extension);
|
||||
this._checkURL(darkURL, extension);
|
||||
|
||||
- let defaultURL = result[size];
|
||||
+ let defaultURL = result[size] || result[19]; // always fallback to default first
|
||||
result[size] = {
|
||||
- "default": defaultURL || lightURL, // Fallback to the light url if no default is specified.
|
||||
+ "default": defaultURL || darkURL, // Fallback to the dark url if no default is specified.
|
||||
"light": lightURL,
|
||||
"dark": darkURL,
|
||||
};
|
||||
|
||||
commit 1cceb370d13c
|
||||
Author: Ian Moody <moz-ian@perix.co.uk>
|
||||
Date: Wed Oct 4 01:40:45 2017 +0100
|
||||
|
||||
Bug 1404568 - Use the correct browser_action theme icons when the action is in a menu-panel. r=mixedpuppy, a=ritu
|
||||
|
||||
The patch adding support for specifying theme icons had a bug in the CSS: it
|
||||
added styles for the action in a menu-panel depending on theme, but missed out
|
||||
the theme pseudo-class selectors. Therefore the dark text icon was always used
|
||||
since it was last in the CSS.
|
||||
Additionally, the menu panels can't be styled, so still have light backgrounds
|
||||
and dark text even in light text themes. If a light icon is used in the menu
|
||||
panel in a light text theme it will be hard to see.
|
||||
|
||||
Thus, this patch adds the pseudo-class for dark text themes, but removes the
|
||||
selector entirely for light text themes.
|
||||
|
||||
MozReview-Commit-ID: AmKVDYwGGKj
|
||||
|
||||
--HG--
|
||||
extra : source : 38347dff77997359905b6efc1f6061e4103431d6
|
||||
---
|
||||
browser/base/content/browser.css | 6 ++----
|
||||
1 file changed, 2 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git browser/base/content/browser.css browser/base/content/browser.css
|
||||
index bbd7310f55d0..fe940cf58408 100644
|
||||
--- browser/base/content/browser.css
|
||||
+++ browser/base/content/browser.css
|
||||
@@ -377,12 +377,11 @@ toolbarpaletteitem > toolbaritem[sdkstylewidget="true"][cui-areatype="toolbar"]
|
||||
list-style-image: var(--webextension-menupanel-image, inherit);
|
||||
}
|
||||
|
||||
- .webextension-browser-action[cui-areatype="menu-panel"],
|
||||
toolbarpaletteitem[place="palette"] > .webextension-browser-action:-moz-lwtheme-brighttext {
|
||||
list-style-image: var(--webextension-menupanel-image-light, inherit);
|
||||
}
|
||||
|
||||
- .webextension-browser-action[cui-areatype="menu-panel"],
|
||||
+ .webextension-browser-action[cui-areatype="menu-panel"]:-moz-lwtheme-darktext,
|
||||
toolbarpaletteitem[place="palette"] > .webextension-browser-action:-moz-lwtheme-darktext {
|
||||
list-style-image: var(--webextension-menupanel-image-dark, inherit);
|
||||
}
|
||||
@@ -414,12 +413,11 @@ toolbarpaletteitem > toolbaritem[sdkstylewidget="true"][cui-areatype="toolbar"]
|
||||
list-style-image: var(--webextension-menupanel-image-2x, inherit);
|
||||
}
|
||||
|
||||
- .webextension-browser-action[cui-areatype="menu-panel"],
|
||||
toolbarpaletteitem[place="palette"] > .webextension-browser-action:-moz-lwtheme-brighttext {
|
||||
list-style-image: var(--webextension-menupanel-image-2x-light, inherit);
|
||||
}
|
||||
|
||||
- .webextension-browser-action[cui-areatype="menu-panel"],
|
||||
+ .webextension-browser-action[cui-areatype="menu-panel"]:-moz-lwtheme-darktext,
|
||||
toolbarpaletteitem[place="palette"] > .webextension-browser-action:-moz-lwtheme-darktext {
|
||||
list-style-image: var(--webextension-menupanel-image-2x-dark, inherit);
|
||||
}
|
39
www/waterfox/files/patch-bug1404651
Normal file
39
www/waterfox/files/patch-bug1404651
Normal file
|
@ -0,0 +1,39 @@
|
|||
commit 698e5f304f4b
|
||||
Author: Gijs Kruitbosch <gijskruitbosch@gmail.com>
|
||||
Date: Wed Oct 4 13:29:53 2017 +0100
|
||||
|
||||
Bug 1404651 - Keep focus in the tabstrip when the focus has shifted with the arrow keys. r=dao, a=ritu
|
||||
|
||||
MozReview-Commit-ID: Brm9jImW9bc
|
||||
|
||||
--HG--
|
||||
extra : source : 0304a90aee90618165af50193ea6255c54a6b9ea
|
||||
---
|
||||
browser/base/content/tabbrowser.xml | 13 +++++++------
|
||||
1 file changed, 7 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git browser/base/content/tabbrowser.xml browser/base/content/tabbrowser.xml
|
||||
index 37efdcc5bc0c..4f40e45f2446 100644
|
||||
--- browser/base/content/tabbrowser.xml
|
||||
+++ browser/base/content/tabbrowser.xml
|
||||
@@ -1417,13 +1417,14 @@
|
||||
findBar._findField.getAttribute("focused") == "true");
|
||||
}
|
||||
|
||||
- // If focus is in the tab bar, retain it there.
|
||||
- if (document.activeElement == oldTab) {
|
||||
- // We need to explicitly focus the new tab, because
|
||||
- // tabbox.xml does this only in some cases.
|
||||
+ let activeEl = document.activeElement;
|
||||
+ // If focus is on the old tab, move it to the new tab.
|
||||
+ if (activeEl == oldTab) {
|
||||
newTab.focus();
|
||||
- } else if (gMultiProcessBrowser && document.activeElement !== newBrowser) {
|
||||
-
|
||||
+ } else if (gMultiProcessBrowser && activeEl != newBrowser && activeEl != newTab) {
|
||||
+ // In e10s, if focus isn't already in the tabstrip or on the new browser,
|
||||
+ // and the new browser's previous focus wasn't in the url bar but focus is
|
||||
+ // there now, we need to adjust focus further.
|
||||
let keepFocusOnUrlBar = newBrowser &&
|
||||
newBrowser._urlbarFocused &&
|
||||
gURLBar &&
|
45
www/waterfox/files/patch-bug1405199
Normal file
45
www/waterfox/files/patch-bug1405199
Normal file
|
@ -0,0 +1,45 @@
|
|||
commit a8e2534607cc
|
||||
Author: Honza Bambas <honzab.moz@firemni.cz>
|
||||
Date: Mon Oct 9 07:50:00 2017 -0400
|
||||
|
||||
Bug 1405199 - Update result principal URI on the new channel when nsBaseChannel redirects. r=bz, a=ritu
|
||||
|
||||
--HG--
|
||||
extra : source : 41697bca82fb1cb74c3617f8c7496cebacf81efc
|
||||
---
|
||||
netwerk/base/nsBaseChannel.cpp | 22 ++++++++++++++++++++++
|
||||
1 file changed, 22 insertions(+)
|
||||
|
||||
diff --git netwerk/base/nsBaseChannel.cpp netwerk/base/nsBaseChannel.cpp
|
||||
index 07a12c8fa5b6..b839bc6e1b7e 100644
|
||||
--- netwerk/base/nsBaseChannel.cpp
|
||||
+++ netwerk/base/nsBaseChannel.cpp
|
||||
@@ -106,6 +106,28 @@ nsBaseChannel::Redirect(nsIChannel *newChannel, uint32_t redirectFlags,
|
||||
new nsRedirectHistoryEntry(uriPrincipal, nullptr, EmptyCString());
|
||||
|
||||
newLoadInfo->AppendRedirectHistoryEntry(entry, isInternalRedirect);
|
||||
+
|
||||
+ // Ensure the channel's loadInfo's result principal URI so that it's
|
||||
+ // either non-null or updated to the redirect target URI.
|
||||
+ // We must do this because in case the loadInfo's result principal URI
|
||||
+ // is null, it would be taken from OriginalURI of the channel. But we
|
||||
+ // overwrite it with the whole redirect chain first URI before opening
|
||||
+ // the target channel, hence the information would be lost.
|
||||
+ // If the protocol handler that created the channel wants to use
|
||||
+ // the originalURI of the channel as the principal URI, it has left
|
||||
+ // the result principal URI on the load info null.
|
||||
+ nsCOMPtr<nsIURI> resultPrincipalURI;
|
||||
+
|
||||
+ nsCOMPtr<nsILoadInfo> existingLoadInfo = newChannel->GetLoadInfo();
|
||||
+ if (existingLoadInfo) {
|
||||
+ existingLoadInfo->GetResultPrincipalURI(getter_AddRefs(resultPrincipalURI));
|
||||
+ }
|
||||
+ if (!resultPrincipalURI) {
|
||||
+ newChannel->GetOriginalURI(getter_AddRefs(resultPrincipalURI));
|
||||
+ }
|
||||
+
|
||||
+ newLoadInfo->SetResultPrincipalURI(resultPrincipalURI);
|
||||
+
|
||||
newChannel->SetLoadInfo(newLoadInfo);
|
||||
}
|
||||
else {
|
256
www/waterfox/files/patch-bug1405655
Normal file
256
www/waterfox/files/patch-bug1405655
Normal file
|
@ -0,0 +1,256 @@
|
|||
commit 5b5983d8528a
|
||||
Author: Felipe Gomes <felipc@gmail.com>
|
||||
Date: Tue Oct 17 12:10:31 2017 -0200
|
||||
|
||||
Bug 1405655 - Only hide Flash Activation overlay UI if the entire plugin is covered. r=dthayer, a=ritu
|
||||
|
||||
As opposed to right now where we hide if any of the corners or the center of the plugin is covered.
|
||||
|
||||
MozReview-Commit-ID: 9mOVXYyV1Il
|
||||
|
||||
--HG--
|
||||
extra : source : a6aaaf9cb7d3a4f3baa430cfa88671f0acabed6c
|
||||
---
|
||||
browser/base/content/test/plugins/browser.ini | 2 +
|
||||
.../test/plugins/browser_CTP_shouldShowOverlay.js | 56 ++++++++++
|
||||
.../test/plugins/plugin_shouldShowOverlay.html | 116 +++++++++++++++++++++
|
||||
browser/modules/PluginContent.jsm | 13 ++-
|
||||
4 files changed, 180 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git browser/base/content/test/plugins/browser.ini browser/base/content/test/plugins/browser.ini
|
||||
index 56f5fba1a9d0..9b3a518ecb7c 100644
|
||||
--- browser/base/content/test/plugins/browser.ini
|
||||
+++ browser/base/content/test/plugins/browser.ini
|
||||
@@ -29,6 +29,7 @@ support-files =
|
||||
plugin_overlayed.html
|
||||
plugin_positioned.html
|
||||
plugin_simple_blank.swf
|
||||
+ plugin_shouldShowOverlay.html
|
||||
plugin_small.html
|
||||
plugin_small_2.html
|
||||
plugin_syncRemoved.html
|
||||
@@ -76,6 +77,7 @@ tags = blocklist
|
||||
tags = blocklist
|
||||
[browser_CTP_resize.js]
|
||||
tags = blocklist
|
||||
+[browser_CTP_shouldShowOverlay.js]
|
||||
[browser_CTP_zoom.js]
|
||||
tags = blocklist
|
||||
[browser_blocking.js]
|
||||
diff --git browser/base/content/test/plugins/browser_CTP_shouldShowOverlay.js browser/base/content/test/plugins/browser_CTP_shouldShowOverlay.js
|
||||
new file mode 100644
|
||||
index 000000000000..6af674a0e5b2
|
||||
--- /dev/null
|
||||
+++ browser/base/content/test/plugins/browser_CTP_shouldShowOverlay.js
|
||||
@@ -0,0 +1,56 @@
|
||||
+/* 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/. */
|
||||
+
|
||||
+"use strict";
|
||||
+
|
||||
+/* This test ensures that the click-to-play "Activate Plugin" overlay
|
||||
+ * is shown when expected.
|
||||
+ * All testcases are in the plugin_shouldShowOverlay.html file.
|
||||
+ */
|
||||
+
|
||||
+var rootDir = getRootDirectory(gTestPath);
|
||||
+const gTestRoot = rootDir.replace("chrome://mochitests/content/", "http://127.0.0.1:8888/");
|
||||
+
|
||||
+var gTestBrowser = null;
|
||||
+
|
||||
+add_task(async function() {
|
||||
+ registerCleanupFunction(function() {
|
||||
+ clearAllPluginPermissions();
|
||||
+ setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Test Plug-in");
|
||||
+ gBrowser.removeCurrentTab();
|
||||
+ gTestBrowser = null;
|
||||
+ });
|
||||
+});
|
||||
+
|
||||
+add_task(async function() {
|
||||
+ gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser);
|
||||
+ gTestBrowser = gBrowser.selectedBrowser;
|
||||
+
|
||||
+ setTestPluginEnabledState(Ci.nsIPluginTag.STATE_CLICKTOPLAY, "Test Plug-in");
|
||||
+
|
||||
+ let popupNotification = PopupNotifications.getNotification("click-to-play-plugins", gTestBrowser);
|
||||
+ ok(!popupNotification, "Sanity check, should not have a click-to-play notification");
|
||||
+
|
||||
+ await promiseTabLoadEvent(gBrowser.selectedTab, gTestRoot + "plugin_shouldShowOverlay.html");
|
||||
+
|
||||
+ // Work around for delayed PluginBindingAttached
|
||||
+ await promiseUpdatePluginBindings(gTestBrowser);
|
||||
+
|
||||
+ await ContentTask.spawn(gTestBrowser, null, async function() {
|
||||
+ let doc = content.document;
|
||||
+ let testcases = doc.querySelectorAll(".testcase");
|
||||
+
|
||||
+ for (let testcase of testcases) {
|
||||
+ let plugin = testcase.querySelector("object");
|
||||
+ Assert.ok(plugin, `plugin exists in ${testcase.id}`);
|
||||
+
|
||||
+ let overlay = doc.getAnonymousElementByAttribute(plugin, "anonid", "main");
|
||||
+ Assert.ok(overlay, `overlay exists in ${testcase.id}`);
|
||||
+
|
||||
+ let expectedVisibility = (testcase.getAttribute("shouldshow") == "true");
|
||||
+ Assert.ok(overlay.classList.contains("visible") == expectedVisibility,
|
||||
+ `The expected visibility is correct in ${testcase.id}`);
|
||||
+ }
|
||||
+ })
|
||||
+});
|
||||
diff --git browser/base/content/test/plugins/plugin_shouldShowOverlay.html browser/base/content/test/plugins/plugin_shouldShowOverlay.html
|
||||
new file mode 100644
|
||||
index 000000000000..24d07d164260
|
||||
--- /dev/null
|
||||
+++ browser/base/content/test/plugins/plugin_shouldShowOverlay.html
|
||||
@@ -0,0 +1,116 @@
|
||||
+<!DOCTYPE html>
|
||||
+<html>
|
||||
+<head>
|
||||
+<meta charset="utf-8">
|
||||
+<style>
|
||||
+object {
|
||||
+ width: 200px;
|
||||
+ height: 200px;
|
||||
+}
|
||||
+
|
||||
+.testcase {
|
||||
+ position: relative;
|
||||
+ margin-bottom: 5px;
|
||||
+}
|
||||
+
|
||||
+.cover {
|
||||
+ position: absolute;
|
||||
+ width: 20px;
|
||||
+ height: 20px;
|
||||
+ background-color: green;
|
||||
+}
|
||||
+</style>
|
||||
+</head>
|
||||
+<body>
|
||||
+
|
||||
+ <div id="testcase1" class="testcase" shouldshow="true"
|
||||
+ style="top: -100px">
|
||||
+ <!-- Should show overlay even though the top part is outside
|
||||
+ of the page. -->
|
||||
+ <object type="application/x-test"></object>
|
||||
+ </div>
|
||||
+
|
||||
+ <div id="testcase2" class="testcase" shouldshow="true"
|
||||
+ style="left: -100px">
|
||||
+ <!-- Should show overlay even though the left part is outside
|
||||
+ of the page. -->
|
||||
+ <object type="application/x-test"></object>
|
||||
+ </div>
|
||||
+
|
||||
+ <div id="testcase3" class="testcase" shouldshow="false"
|
||||
+ style="left: -210px">
|
||||
+ <!-- The object is entirely outside of the page, so the overlay
|
||||
+ should NOT show. -->
|
||||
+ <object type="application/x-test"></object>
|
||||
+ </div>
|
||||
+
|
||||
+ <div id="testcase4" class="testcase" shouldshow="true">
|
||||
+ <!-- Should show overlay even though the top-left corner is covered. -->
|
||||
+ <div class="cover" style="top: 0; left: 0"></div>
|
||||
+ <object type="application/x-test"></object>
|
||||
+ </div>
|
||||
+
|
||||
+ <div id="testcase5" class="testcase" shouldshow="true">
|
||||
+ <!-- Should show overlay even though the top-right corner is covered. -->
|
||||
+ <div class="cover" style="top: 0; left: 180px"></div>
|
||||
+ <object type="application/x-test"></object>
|
||||
+ </div>
|
||||
+
|
||||
+ <div id="testcase6" class="testcase" shouldshow="true">
|
||||
+ <!-- Should show overlay even though the bottom-left corner is covered. -->
|
||||
+ <div class="cover" style="top: 180px; left: 0"></div>
|
||||
+ <object type="application/x-test"></object>
|
||||
+ </div>
|
||||
+
|
||||
+
|
||||
+ <div id="testcase7" class="testcase" shouldshow="true">
|
||||
+ <!-- Should show overlay even though the bottom-right corner is covered. -->
|
||||
+ <div class="cover" style="top: 180px; left: 180px"></div>
|
||||
+ <object type="application/x-test"></object>
|
||||
+ </div>
|
||||
+
|
||||
+ <div id="testcase8" class="testcase" shouldshow="true">
|
||||
+ <!-- Should show overlay even though the center is covered. -->
|
||||
+ <div class="cover" style="top: 90px; left: 90px"></div>
|
||||
+ <object type="application/x-test"></object>
|
||||
+ </div>
|
||||
+
|
||||
+ <div id="testcase9" class="testcase" shouldshow="true">
|
||||
+ <!-- Should show overlay even though multiple points are covered,
|
||||
+ but not all of them. -->
|
||||
+ <div class="cover" style="top: 0; left: 0"></div>
|
||||
+ <div class="cover" style="top: 0; left: 180px"></div>
|
||||
+ <div class="cover" style="top: 180px; left: 0"></div>
|
||||
+ <div class="cover" style="top: 180px; left: 180px"></div>
|
||||
+ <object type="application/x-test"></object>
|
||||
+ </div>
|
||||
+
|
||||
+ <div id="testcase10" class="testcase" shouldshow="true">
|
||||
+ <!-- Another case where 4 are covered, but not all. -->
|
||||
+ <div class="cover" style="top: 90px; left: 90px"></div>
|
||||
+ <div class="cover" style="top: 0; left: 180px"></div>
|
||||
+ <div class="cover" style="top: 180px; left: 0"></div>
|
||||
+ <div class="cover" style="top: 180px; left: 180px"></div>
|
||||
+ <object type="application/x-test"></object>
|
||||
+ </div>
|
||||
+
|
||||
+ <div id="testcase11" class="testcase" shouldshow="false">
|
||||
+ <!-- All corners and center are covered here, so in this
|
||||
+ case the overlay should NOT show. -->
|
||||
+ <div class="cover" style="top: 0; left: 0"></div>
|
||||
+ <div class="cover" style="top: 0; left: 180px"></div>
|
||||
+ <div class="cover" style="top: 180px; left: 0"></div>
|
||||
+ <div class="cover" style="top: 180px; left: 180px"></div>
|
||||
+ <div class="cover" style="top: 90px; left: 90px"></div>
|
||||
+ <object type="application/x-test"></object>
|
||||
+ </div>
|
||||
+
|
||||
+ <div id="testcase12" class="testcase" shouldshow="false">
|
||||
+ <!-- All corners and center are covered here, by a single
|
||||
+ element. In this case the overlay should NOT show. -->
|
||||
+ <div class="cover" style="width: 200px; height:200px"></div>
|
||||
+ <object type="application/x-test"></object>
|
||||
+ </div>
|
||||
+
|
||||
+</body>
|
||||
+</html>
|
||||
diff --git browser/modules/PluginContent.jsm browser/modules/PluginContent.jsm
|
||||
index 678369d7e3ec..6aec465a2955 100644
|
||||
--- browser/modules/PluginContent.jsm
|
||||
+++ browser/modules/PluginContent.jsm
|
||||
@@ -330,22 +330,21 @@ PluginContent.prototype = {
|
||||
[right, bottom],
|
||||
[centerX, centerY]];
|
||||
|
||||
- if (right <= 0 || top <= 0) {
|
||||
- return false;
|
||||
- }
|
||||
-
|
||||
let contentWindow = plugin.ownerGlobal;
|
||||
let cwu = contentWindow.QueryInterface(Ci.nsIInterfaceRequestor)
|
||||
.getInterface(Ci.nsIDOMWindowUtils);
|
||||
|
||||
for (let [x, y] of points) {
|
||||
+ if (x < 0 || y < 0) {
|
||||
+ continue;
|
||||
+ }
|
||||
let el = cwu.elementFromPoint(x, y, true, true);
|
||||
- if (el !== plugin) {
|
||||
- return false;
|
||||
+ if (el === plugin) {
|
||||
+ return true;
|
||||
}
|
||||
}
|
||||
|
||||
- return true;
|
||||
+ return false;
|
||||
},
|
||||
|
||||
addLinkClickCallback(linkNode, callbackName /* callbackArgs...*/) {
|
109
www/waterfox/files/patch-bug1405761
Normal file
109
www/waterfox/files/patch-bug1405761
Normal file
|
@ -0,0 +1,109 @@
|
|||
commit 0e2ac46fa12c
|
||||
Author: Dragana Damjanovic <dd.mozilla@gmail.com>
|
||||
Date: Wed Oct 11 03:20:00 2017 -0400
|
||||
|
||||
Bug 1405761 - If the preload pref is disabled rel=preload should be shown as not supported. r=smaug, a=ritu
|
||||
|
||||
--HG--
|
||||
extra : source : 1f4d35d137631cde34f318fac0c33421d5360dc3
|
||||
---
|
||||
dom/base/test/test_bug1222633.html | 4 +++-
|
||||
dom/base/test/test_bug1222633_link_update.html | 4 +++-
|
||||
dom/html/HTMLLinkElement.cpp | 19 ++++++++++++++++++-
|
||||
modules/libpref/init/all.js | 2 +-
|
||||
.../tools/wptrunner/wptrunner/browsers/firefox.py | 3 ++-
|
||||
5 files changed, 27 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git dom/base/test/test_bug1222633.html dom/base/test/test_bug1222633.html
|
||||
index 52fecff16e9b..099345dab0b7 100644
|
||||
--- dom/base/test/test_bug1222633.html
|
||||
+++ dom/base/test/test_bug1222633.html
|
||||
@@ -88,8 +88,10 @@ const CROSS_ORIGIN = "http://example.com" + SJS_PATH;
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
+SpecialPowers.pushPrefEnv({"set": [["network.preload", true]]})
|
||||
+
|
||||
// test same origin
|
||||
-testPreloadEvent(SAME_ORIGIN + "?statusCode=200&cacheControl=no-cache", false, false)
|
||||
+.then(() => testPreloadEvent(SAME_ORIGIN + "?statusCode=200&cacheControl=no-cache", false, false))
|
||||
.then(() => testPreloadEvent(SAME_ORIGIN + "?statusCode=404&cacheControl=no-cache", false, false))
|
||||
.then(() => testPreloadEvent(SAME_ORIGIN + "?statusCode=200&cacheControl=max-age%3D120", false, true))
|
||||
.then(() => testPreloadEvent(SAME_ORIGIN + "?statusCode=404&cacheControl=max-age%3D120", false, false))
|
||||
diff --git dom/base/test/test_bug1222633_link_update.html dom/base/test/test_bug1222633_link_update.html
|
||||
index 97508d3596cf..1f18284c9470 100644
|
||||
--- dom/base/test/test_bug1222633_link_update.html
|
||||
+++ dom/base/test/test_bug1222633_link_update.html
|
||||
@@ -122,8 +122,10 @@ const CROSS_ORIGIN = "http://example.com" + SJS_PATH;
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
+SpecialPowers.pushPrefEnv({"set": [["network.preload", true]]})
|
||||
+
|
||||
// Test changing as parameter from a wrong to a correct one.
|
||||
-testPreloadEventAsAttributeChange(SAME_ORIGIN + "?statusCode=200&cacheControl=max-age%3D120")
|
||||
+.then(() => testPreloadEventAsAttributeChange(SAME_ORIGIN + "?statusCode=200&cacheControl=max-age%3D120"))
|
||||
// Test changing type parameter from a wrong to a correct one for given as parameter.
|
||||
.then(() => testPreloadEventAttributeChange(SAME_ORIGIN + "?statusCode=200&cacheControl=max-age%3D120", "type", "text/vtt", "image/png", false, true))
|
||||
// Test changing media parameter from a wrong to a correct one.
|
||||
diff --git dom/html/HTMLLinkElement.cpp dom/html/HTMLLinkElement.cpp
|
||||
index 810b47aed670..37b45ca03636 100644
|
||||
--- dom/html/HTMLLinkElement.cpp
|
||||
+++ dom/html/HTMLLinkElement.cpp
|
||||
@@ -408,11 +408,28 @@ static const DOMTokenListSupportedToken sSupportedRelValues[] = {
|
||||
nullptr
|
||||
};
|
||||
|
||||
+static const DOMTokenListSupportedToken sSupportedRelValuesNoPreload[] = {
|
||||
+ // Keep this in sync with ToLinkMask in nsStyleLinkElement.cpp.
|
||||
+ // "import" must come first because it's conditional.
|
||||
+ "prefetch",
|
||||
+ "dns-prefetch",
|
||||
+ "stylesheet",
|
||||
+ "next",
|
||||
+ "alternate",
|
||||
+ "preconnect",
|
||||
+ "icon",
|
||||
+ "search",
|
||||
+ nullptr
|
||||
+};
|
||||
nsDOMTokenList*
|
||||
HTMLLinkElement::RelList()
|
||||
{
|
||||
if (!mRelList) {
|
||||
- mRelList = new nsDOMTokenList(this, nsGkAtoms::rel, sSupportedRelValues);
|
||||
+ if (Preferences::GetBool("network.preload")) {
|
||||
+ mRelList = new nsDOMTokenList(this, nsGkAtoms::rel, sSupportedRelValues);
|
||||
+ } else {
|
||||
+ mRelList = new nsDOMTokenList(this, nsGkAtoms::rel, sSupportedRelValuesNoPreload);
|
||||
+ }
|
||||
}
|
||||
return mRelList;
|
||||
}
|
||||
diff --git modules/libpref/init/all.js modules/libpref/init/all.js
|
||||
index e83781623803..79a0ea89d6de 100644
|
||||
--- modules/libpref/init/all.js
|
||||
+++ modules/libpref/init/all.js
|
||||
@@ -2105,7 +2105,7 @@ pref("network.dir.format", 2);
|
||||
// <link rel="prefetch"> URLs).
|
||||
pref("network.prefetch-next", true);
|
||||
// enables the preloading (i.e., preloading of <link rel="preload"> URLs).
|
||||
-pref("network.preload", true);
|
||||
+pref("network.preload", false);
|
||||
|
||||
// enables the predictive service
|
||||
pref("network.predictor.enabled", true);
|
||||
diff --git testing/web-platform/tests/tools/wptrunner/wptrunner/browsers/firefox.py testing/web-platform/tests/tools/wptrunner/wptrunner/browsers/firefox.py
|
||||
index f869c82a8ed0..43da63c7ca4e 100644
|
||||
--- testing/web-platform/tests/tools/wptrunner/wptrunner/browsers/firefox.py
|
||||
+++ testing/web-platform/tests/tools/wptrunner/wptrunner/browsers/firefox.py
|
||||
@@ -190,7 +190,8 @@ class FirefoxBrowser(Browser):
|
||||
"network.dns.localDomains": ",".join(hostnames),
|
||||
"network.proxy.type": 0,
|
||||
"places.history.enabled": False,
|
||||
- "dom.send_after_paint_to_content": True})
|
||||
+ "dom.send_after_paint_to_content": True,
|
||||
+ "network.preload": True})
|
||||
if self.e10s:
|
||||
self.profile.set_preferences({"browser.tabs.remote.autostart": True})
|
||||
|
120
www/waterfox/files/patch-bug1405878
Normal file
120
www/waterfox/files/patch-bug1405878
Normal file
|
@ -0,0 +1,120 @@
|
|||
commit 87f3d592d92f
|
||||
Author: Boris Zbarsky <bzbarsky@mit.edu>
|
||||
Date: Mon Oct 9 14:49:19 2017 -0400
|
||||
|
||||
Bug 1405878 - Make sure to notify for our kids, if needed, before calling DoneAddingChildren in the XML content sink. r=hsivonen, a=sledru
|
||||
|
||||
Once we call DoneAddingChildren, random code of various sorts will run, which
|
||||
can flush our notification state. If that happens before we've notified on our
|
||||
kids, but after we've popped the element we're closing off the element stack,
|
||||
we will fail to ever notify on the kids.
|
||||
|
||||
MozReview-Commit-ID: Ei7v5OobX8R
|
||||
|
||||
--HG--
|
||||
extra : source : f144e1434312485cf9ee16a36d6159dbcb13a07d
|
||||
---
|
||||
dom/xml/crashtests/1405878.xml | 11 +++++++++++
|
||||
dom/xml/crashtests/crashtests.list | 1 +
|
||||
dom/xml/nsXMLContentSink.cpp | 18 +++++++++++-------
|
||||
layout/reftests/bugs/1405878-1-ref.xml | 7 +++++++
|
||||
layout/reftests/bugs/1405878-1.xml | 6 ++++++
|
||||
layout/reftests/bugs/reftest.list | 1 +
|
||||
6 files changed, 37 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git dom/xml/crashtests/1405878.xml dom/xml/crashtests/1405878.xml
|
||||
new file mode 100644
|
||||
index 000000000000..12677ade938d
|
||||
--- /dev/null
|
||||
+++ dom/xml/crashtests/1405878.xml
|
||||
@@ -0,0 +1,11 @@
|
||||
+<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
+ <body>
|
||||
+ <select>
|
||||
+ <script>document.documentElement.offsetHeight</script>
|
||||
+ <option>Hello there</option>
|
||||
+ </select>
|
||||
+ <script>
|
||||
+ document.querySelector("body").style.display = "inline";
|
||||
+ </script>
|
||||
+ </body>
|
||||
+</html>
|
||||
diff --git dom/xml/crashtests/crashtests.list dom/xml/crashtests/crashtests.list
|
||||
index f18767d582c2..2c06ffc545ec 100644
|
||||
--- dom/xml/crashtests/crashtests.list
|
||||
+++ dom/xml/crashtests/crashtests.list
|
||||
@@ -10,3 +10,4 @@ load 453278.html
|
||||
load 803586.xhtml
|
||||
load 994740-1.xhtml
|
||||
load 1038887.xhtml
|
||||
+load 1405878.xml
|
||||
diff --git dom/xml/nsXMLContentSink.cpp dom/xml/nsXMLContentSink.cpp
|
||||
index 2593519aa44b..b04977d62cf1 100644
|
||||
--- dom/xml/nsXMLContentSink.cpp
|
||||
+++ dom/xml/nsXMLContentSink.cpp
|
||||
@@ -1071,6 +1071,17 @@ nsXMLContentSink::HandleEndElement(const char16_t *aName,
|
||||
isTemplateElement, "Wrong element being closed");
|
||||
#endif
|
||||
|
||||
+ // Make sure to notify on our kids before we call out to any other code that
|
||||
+ // might reenter us and call FlushTags, in a state in which we've already
|
||||
+ // popped "content" from the stack but haven't notified on its kids yet.
|
||||
+ int32_t stackLen = mContentStack.Length();
|
||||
+ if (mNotifyLevel >= stackLen) {
|
||||
+ if (numFlushed < content->GetChildCount()) {
|
||||
+ NotifyAppend(content, numFlushed);
|
||||
+ }
|
||||
+ mNotifyLevel = stackLen - 1;
|
||||
+ }
|
||||
+
|
||||
result = CloseElement(content);
|
||||
|
||||
if (mCurrentHead == content) {
|
||||
@@ -1086,13 +1097,6 @@ nsXMLContentSink::HandleEndElement(const char16_t *aName,
|
||||
MaybeStartLayout(false);
|
||||
}
|
||||
|
||||
- int32_t stackLen = mContentStack.Length();
|
||||
- if (mNotifyLevel >= stackLen) {
|
||||
- if (numFlushed < content->GetChildCount()) {
|
||||
- NotifyAppend(content, numFlushed);
|
||||
- }
|
||||
- mNotifyLevel = stackLen - 1;
|
||||
- }
|
||||
DidAddContent();
|
||||
|
||||
if (content->IsSVGElement(nsGkAtoms::svg)) {
|
||||
diff --git layout/reftests/bugs/1405878-1-ref.xml layout/reftests/bugs/1405878-1-ref.xml
|
||||
new file mode 100644
|
||||
index 000000000000..6d1dd199b41e
|
||||
--- /dev/null
|
||||
+++ layout/reftests/bugs/1405878-1-ref.xml
|
||||
@@ -0,0 +1,7 @@
|
||||
+<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
+ <select>
|
||||
+ <script>document.documentElement.offsetHeight</script>
|
||||
+ <option>Hello there</option>
|
||||
+ <script>document.documentElement.offsetHeight</script>
|
||||
+ </select>
|
||||
+</html>
|
||||
diff --git layout/reftests/bugs/1405878-1.xml layout/reftests/bugs/1405878-1.xml
|
||||
new file mode 100644
|
||||
index 000000000000..3915711b1103
|
||||
--- /dev/null
|
||||
+++ layout/reftests/bugs/1405878-1.xml
|
||||
@@ -0,0 +1,6 @@
|
||||
+<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
+ <select>
|
||||
+ <script>document.documentElement.offsetHeight</script>
|
||||
+ <option>Hello there</option>
|
||||
+ </select>
|
||||
+</html>
|
||||
diff --git layout/reftests/bugs/reftest.list layout/reftests/bugs/reftest.list
|
||||
index 52f8cb915cee..47c04cdf41d6 100644
|
||||
--- layout/reftests/bugs/reftest.list
|
||||
+++ layout/reftests/bugs/reftest.list
|
||||
@@ -2037,3 +2037,4 @@ needs-focus != 1377447-1.html 1377447-2.html
|
||||
== 1380224-1.html 1380224-1-ref.html
|
||||
== 1384065.html 1384065-ref.html
|
||||
== 1384275-1.html 1384275-1-ref.html
|
||||
+== 1405878-1.xml 1405878-1-ref.xml
|
39
www/waterfox/files/patch-bug1406222
Normal file
39
www/waterfox/files/patch-bug1406222
Normal file
|
@ -0,0 +1,39 @@
|
|||
commit 04dfc1bac3e0
|
||||
Author: Boris Zbarsky <bzbarsky@mit.edu>
|
||||
Date: Fri Oct 6 01:53:12 2017 -0500
|
||||
|
||||
Bug 1406222 - servo: Don't assume that inputs to compute_style_with_inputs have any rules. r=heycam, a=ritu
|
||||
|
||||
It could be a text style, which never has any rules attached to it.
|
||||
|
||||
Source-Repo: https://github.com/servo/servo
|
||||
Source-Revision: 117dbfaac20d8a388cf3cf5d2bc103b9d6249ee8
|
||||
|
||||
--HG--
|
||||
extra : source : 97fcd35b0d3792e7305bcb46b303ce409b30d23e
|
||||
extra : histedit_source : 72acaec12ed99fa306148b7679c682abc0abaeea
|
||||
---
|
||||
servo/components/style/stylist.rs | 8 ++++----
|
||||
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git servo/components/style/stylist.rs servo/components/style/stylist.rs
|
||||
index b40c5825a55c..e6feb6f26d15 100644
|
||||
--- servo/components/style/stylist.rs
|
||||
+++ servo/components/style/stylist.rs
|
||||
@@ -896,12 +896,12 @@ impl Stylist {
|
||||
// We need to compute visited values if we have visited rules or if our
|
||||
// parent has visited values.
|
||||
let visited_values = if inputs.visited_rules.is_some() || parent_style.get_visited_style().is_some() {
|
||||
- // Slightly annoying: we know that inputs has either rules or
|
||||
- // visited rules, but we can't do inputs.rules() up front because
|
||||
- // maybe it just has visited rules, so can't unwrap_or.
|
||||
+ // At this point inputs may have visited rules, or rules, or both,
|
||||
+ // or neither (e.g. if it's a text style it may have neither). So
|
||||
+ // we have to be a bit careful here.
|
||||
let rule_node = match inputs.visited_rules.as_ref() {
|
||||
Some(rules) => rules,
|
||||
- None => inputs.rules.as_ref().unwrap(),
|
||||
+ None => inputs.rules.as_ref().unwrap_or(self.rule_tree().root()),
|
||||
};
|
||||
let inherited_style;
|
||||
let inherited_style_ignoring_first_line;
|
32
www/waterfox/files/patch-bug1406229
Normal file
32
www/waterfox/files/patch-bug1406229
Normal file
|
@ -0,0 +1,32 @@
|
|||
commit 2e9ce146b6b5
|
||||
Author: Shane Caraveo <scaraveo@mozilla.com>
|
||||
Date: Fri Oct 6 16:58:15 2017 -0700
|
||||
|
||||
Bug 1406229 - Fix autocomplete crash in panels when window is closed during event. r=mak, a=ritu
|
||||
|
||||
MozReview-Commit-ID: 6TrLuwrk2nD
|
||||
|
||||
--HG--
|
||||
extra : source : 118b67c940dc554a4adf6fb397db775861962c68
|
||||
---
|
||||
toolkit/components/autocomplete/nsAutoCompleteController.cpp | 7 +++++++
|
||||
1 file changed, 7 insertions(+)
|
||||
|
||||
diff --git toolkit/components/autocomplete/nsAutoCompleteController.cpp toolkit/components/autocomplete/nsAutoCompleteController.cpp
|
||||
index 3876380201f6..ba5287f1fabd 100644
|
||||
--- toolkit/components/autocomplete/nsAutoCompleteController.cpp
|
||||
+++ toolkit/components/autocomplete/nsAutoCompleteController.cpp
|
||||
@@ -367,6 +367,13 @@ nsAutoCompleteController::HandleEnter(bool aIsPopupSelection,
|
||||
|
||||
// Stop the search, and handle the enter.
|
||||
StopSearch();
|
||||
+ // StopSearch() can call PostSearchCleanup() which might result
|
||||
+ // in a blur event, which could null out mInput, so we need to check it
|
||||
+ // again. See bug #408463 for more details
|
||||
+ if (!mInput) {
|
||||
+ return NS_OK;
|
||||
+ }
|
||||
+
|
||||
EnterMatch(aIsPopupSelection, aEvent);
|
||||
|
||||
return NS_OK;
|
155
www/waterfox/files/patch-bug1406254
Normal file
155
www/waterfox/files/patch-bug1406254
Normal file
|
@ -0,0 +1,155 @@
|
|||
commit e07fe5183b75
|
||||
Author: J. Ryan Stinnett <jryans@gmail.com>
|
||||
Date: Wed Oct 11 18:50:23 2017 -0500
|
||||
|
||||
Bug 1406254 - servo: Clear visited rules for text inheritance. r=emilio, a=ritu
|
||||
|
||||
Source-Repo: https://github.com/servo/servo
|
||||
Source-Revision: dbf0991f8cab54516c5b0211e1818a16cfbf9e19
|
||||
MozReview-Commit-ID: LP8VmxRopA4
|
||||
---
|
||||
servo/components/style/properties/gecko.mako.rs | 2 +-
|
||||
servo/components/style/properties/properties.mako.rs | 16 ++++++++++++++--
|
||||
2 files changed, 15 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git servo/components/style/properties/gecko.mako.rs servo/components/style/properties/gecko.mako.rs
|
||||
index d7e5496971e3..090a31ff9d4b 100644
|
||||
--- servo/components/style/properties/gecko.mako.rs
|
||||
+++ servo/components/style/properties/gecko.mako.rs
|
||||
@@ -323,7 +323,7 @@ impl ComputedValuesInner {
|
||||
}
|
||||
|
||||
/// Clone the visited style. Used for inheriting parent styles in
|
||||
- /// StyleBuilder::for_inheritance.
|
||||
+ /// StyleBuilder::for_derived_style.
|
||||
pub fn clone_visited_style(&self) -> Option<Arc<ComputedValues>> {
|
||||
self.visited_style.as_ref().map(|x| x.clone_arc())
|
||||
}
|
||||
diff --git servo/components/style/properties/properties.mako.rs servo/components/style/properties/properties.mako.rs
|
||||
index 269bf0dbbbb5..80238450a9c5 100644
|
||||
--- servo/components/style/properties/properties.mako.rs
|
||||
+++ servo/components/style/properties/properties.mako.rs
|
||||
@@ -2170,7 +2170,7 @@ impl ComputedValuesInner {
|
||||
}
|
||||
|
||||
/// Clone the visited style. Used for inheriting parent styles in
|
||||
- /// StyleBuilder::for_inheritance.
|
||||
+ /// StyleBuilder::for_derived_style.
|
||||
pub fn clone_visited_style(&self) -> Option<Arc<ComputedValues>> {
|
||||
self.visited_style.clone()
|
||||
}
|
||||
@@ -2830,6 +2830,18 @@ impl<'a> StyleBuilder<'a> {
|
||||
parent: &'a ComputedValues,
|
||||
pseudo: Option<<&'a PseudoElement>,
|
||||
) -> Self {
|
||||
+ // Rebuild the visited style from the parent, ensuring that it will also
|
||||
+ // not have rules. This matches the unvisited style that will be
|
||||
+ // produced by this builder. This assumes that the caller doesn't need
|
||||
+ // to adjust or process visited style, so we can just build visited
|
||||
+ // style here for simplicity.
|
||||
+ let visited_style = parent.get_visited_style().map(|style| {
|
||||
+ Self::for_inheritance(
|
||||
+ device,
|
||||
+ style,
|
||||
+ pseudo,
|
||||
+ ).build()
|
||||
+ });
|
||||
// FIXME(emilio): This Some(parent) here is inconsistent with what we
|
||||
// usually do if `parent` is the default computed values, but that's
|
||||
// fine, and we want to eventually get rid of it.
|
||||
@@ -2844,7 +2856,7 @@ impl<'a> StyleBuilder<'a> {
|
||||
parent.writing_mode,
|
||||
parent.font_computation_data,
|
||||
parent.flags,
|
||||
- parent.clone_visited_style()
|
||||
+ visited_style,
|
||||
)
|
||||
}
|
||||
|
||||
commit d8586d78bd43
|
||||
Author: J. Ryan Stinnett <jryans@gmail.com>
|
||||
Date: Wed Oct 11 15:33:14 2017 -0500
|
||||
|
||||
Bug 1406254 - Visited reftest for ::first-line inheritance. r=emilio, a=ritu
|
||||
|
||||
MozReview-Commit-ID: 4ZOlVvBuSfT
|
||||
---
|
||||
.../css-visited/color-on-visited-text-1-ref.html | 16 ++++++++++++++++
|
||||
.../css-visited/color-on-visited-text-1.html | 20 ++++++++++++++++++++
|
||||
layout/style/test/moz.build | 2 ++
|
||||
layout/style/test/test_visited_reftests.html | 1 +
|
||||
4 files changed, 39 insertions(+)
|
||||
|
||||
diff --git layout/reftests/css-visited/color-on-visited-text-1-ref.html layout/reftests/css-visited/color-on-visited-text-1-ref.html
|
||||
new file mode 100644
|
||||
index 000000000000..b144767ce76e
|
||||
--- /dev/null
|
||||
+++ layout/reftests/css-visited/color-on-visited-text-1-ref.html
|
||||
@@ -0,0 +1,16 @@
|
||||
+<!DOCTYPE html>
|
||||
+<style>
|
||||
+ .unvisited {
|
||||
+ color: blue;
|
||||
+ }
|
||||
+ .visited {
|
||||
+ color: purple;
|
||||
+ }
|
||||
+ .first-line {
|
||||
+ color: green;
|
||||
+ }
|
||||
+</style>
|
||||
+<div class="first-line">Visited</div>
|
||||
+<div class="first-line">Visited with span</div>
|
||||
+<div class="unvisited">Visited with inner unvisited</div>
|
||||
+<div class="visited">Visited with inner visited</div>
|
||||
diff --git layout/reftests/css-visited/color-on-visited-text-1.html layout/reftests/css-visited/color-on-visited-text-1.html
|
||||
new file mode 100644
|
||||
index 000000000000..d9dab8f3b8a7
|
||||
--- /dev/null
|
||||
+++ layout/reftests/css-visited/color-on-visited-text-1.html
|
||||
@@ -0,0 +1,20 @@
|
||||
+<!DOCTYPE html>
|
||||
+<style>
|
||||
+ a {
|
||||
+ display: block;
|
||||
+ text-decoration: none;
|
||||
+ }
|
||||
+ :link {
|
||||
+ color: blue;
|
||||
+ }
|
||||
+ :visited {
|
||||
+ color: purple;
|
||||
+ }
|
||||
+ .outer::first-line {
|
||||
+ color: green;
|
||||
+ }
|
||||
+</style>
|
||||
+<a class="outer" href>Visited</a>
|
||||
+<a class="outer" href><span>Visited with span</span></a>
|
||||
+<a class="outer" href><a href="unvisited-page.html">Visited with inner unvisited</a></a>
|
||||
+<a class="outer" href><a href>Visited with inner visited</a></a>
|
||||
diff --git layout/style/test/moz.build layout/style/test/moz.build
|
||||
index fa646ca16dd3..74fe23260aa7 100644
|
||||
--- layout/style/test/moz.build
|
||||
+++ layout/style/test/moz.build
|
||||
@@ -60,6 +60,8 @@ TEST_HARNESS_FILES.testing.mochitest.tests.layout.style.test['css-visited'] += [
|
||||
'/layout/reftests/css-visited/color-on-visited-1-ref.html',
|
||||
'/layout/reftests/css-visited/color-on-visited-1.html',
|
||||
'/layout/reftests/css-visited/color-on-visited-before-1.html',
|
||||
+ '/layout/reftests/css-visited/color-on-visited-text-1-ref.html',
|
||||
+ '/layout/reftests/css-visited/color-on-visited-text-1.html',
|
||||
'/layout/reftests/css-visited/column-rule-1-notref.html',
|
||||
'/layout/reftests/css-visited/column-rule-1-ref.html',
|
||||
'/layout/reftests/css-visited/column-rule-1.html',
|
||||
diff --git layout/style/test/test_visited_reftests.html layout/style/test/test_visited_reftests.html
|
||||
index aea857f031d2..850d35bae867 100644
|
||||
--- layout/style/test/test_visited_reftests.html
|
||||
+++ layout/style/test/test_visited_reftests.html
|
||||
@@ -38,6 +38,7 @@ var gTests = [
|
||||
"== color-on-link-before-1.html color-on-link-1-ref.html",
|
||||
"== color-on-visited-1.html color-on-visited-1-ref.html",
|
||||
"== color-on-visited-before-1.html color-on-visited-1-ref.html",
|
||||
+ "== color-on-visited-text-1.html color-on-visited-text-1-ref.html",
|
||||
"!= content-color-on-link-before-1-ref.html content-color-on-visited-before-1-ref.html",
|
||||
"== content-color-on-link-before-1.html content-color-on-link-before-1-ref.html",
|
||||
"== content-color-on-visited-before-1.html content-color-on-visited-before-1-ref.html",
|
211
www/waterfox/files/patch-bug1406396
Normal file
211
www/waterfox/files/patch-bug1406396
Normal file
|
@ -0,0 +1,211 @@
|
|||
commit 45ffbc50f1f2
|
||||
Author: David Keeler <dkeeler@mozilla.com>
|
||||
Date: Fri Oct 13 11:27:30 2017 -0700
|
||||
|
||||
Bug 1406396 - Work around NSS utils potentially loading spurious root cert modules. r=mgoodwin, a=ritu, l10n=flod
|
||||
|
||||
NSS command-line utilities may add a built-in root certificate module with the
|
||||
name "Root Certs" if run on a profile that has a copy of the module file (which
|
||||
is an unexpected configuration in general for Firefox). This can cause breakage.
|
||||
To work around this, PSM now simply deletes any module named "Root Certs" at
|
||||
startup. In an effort to prevent PSM from deleting unrelated modules
|
||||
coincidentally named "Root Certs", we also prevent the user from using the
|
||||
Firefox UI to name modules "Root Certs".
|
||||
|
||||
MozReview-Commit-ID: ABja3wpShO9
|
||||
|
||||
--HG--
|
||||
extra : histedit_source : 3f8a20980a1f7fbc838b610763369af3ddf95e16
|
||||
---
|
||||
security/certverifier/NSSCertDBTrustDomain.cpp | 6 +++++
|
||||
.../locales/en-US/chrome/pippki/pippki.properties | 5 ++++
|
||||
.../manager/pki/resources/content/load_device.js | 17 ++++++++++++
|
||||
.../manager/pki/resources/content/load_device.xul | 4 ++-
|
||||
security/manager/ssl/PKCS11ModuleDB.cpp | 11 ++++++++
|
||||
.../browser/browser_loadPKCS11Module_ui.js | 30 ++++++++++++++++++++++
|
||||
.../manager/ssl/tests/unit/test_pkcs11_moduleDB.js | 28 ++++++++++++++++++++
|
||||
.../manager/ssl/tests/unit/xpcshell-smartcards.ini | 1 +
|
||||
8 files changed, 101 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git security/certverifier/NSSCertDBTrustDomain.cpp security/certverifier/NSSCertDBTrustDomain.cpp
|
||||
index a352d928a3c9..229a0b5df28c 100644
|
||||
--- security/certverifier/NSSCertDBTrustDomain.cpp
|
||||
+++ security/certverifier/NSSCertDBTrustDomain.cpp
|
||||
@@ -1216,6 +1216,12 @@ LoadLoadableRoots(const nsCString& dir, const nsCString& modNameUTF8)
|
||||
// the return value would be detrimental in that case.
|
||||
int unusedModType;
|
||||
Unused << SECMOD_DeleteModule(modNameUTF8.get(), &unusedModType);
|
||||
+ // Some NSS command-line utilities will load a roots module under the name
|
||||
+ // "Root Certs" if there happens to be a `DLL_PREFIX "nssckbi" DLL_SUFFIX`
|
||||
+ // file in the directory being operated on. In some cases this can cause us to
|
||||
+ // fail to load our roots module. In these cases, deleting the "Root Certs"
|
||||
+ // module allows us to load the correct one. See bug 1406396.
|
||||
+ Unused << SECMOD_DeleteModule("Root Certs", &unusedModType);
|
||||
|
||||
nsAutoCString fullLibraryPath;
|
||||
if (!dir.IsEmpty()) {
|
||||
diff --git security/manager/locales/en-US/chrome/pippki/pippki.properties security/manager/locales/en-US/chrome/pippki/pippki.properties
|
||||
index 4bf67da7bab2..163384651067 100644
|
||||
--- security/manager/locales/en-US/chrome/pippki/pippki.properties
|
||||
+++ security/manager/locales/en-US/chrome/pippki/pippki.properties
|
||||
@@ -185,3 +185,8 @@ addExceptionCheckingShort=Checking Information
|
||||
addExceptionCheckingLong2=Attempting to identify this site…
|
||||
addExceptionNoCertShort=No Information Available
|
||||
addExceptionNoCertLong2=Unable to obtain identification status for this site.
|
||||
+
|
||||
+# Load Module Dialog
|
||||
+loadModuleHelp_emptyModuleName=The module name cannot be empty.
|
||||
+# LOCALIZATION NOTE(loadModuleHelp_rootCertsModuleName): Do not translate 'Root Certs'
|
||||
+loadModuleHelp_rootCertsModuleName=‘Root Certs‘ is reserved and cannot be used as the module name.
|
||||
diff --git security/manager/pki/resources/content/load_device.js security/manager/pki/resources/content/load_device.js
|
||||
index b3b020236b93..08831f16e27e 100644
|
||||
--- security/manager/pki/resources/content/load_device.js
|
||||
+++ security/manager/pki/resources/content/load_device.js
|
||||
@@ -51,3 +51,20 @@ function onDialogAccept() {
|
||||
|
||||
return true;
|
||||
}
|
||||
+
|
||||
+function validateModuleName() {
|
||||
+ let bundle = document.getElementById("pippki_bundle");
|
||||
+ let name = document.getElementById("device_name").value;
|
||||
+ let helpText = document.getElementById("helpText");
|
||||
+ helpText.value = "";
|
||||
+ let dialogNode = document.querySelector("dialog");
|
||||
+ dialogNode.removeAttribute("buttondisabledaccept");
|
||||
+ if (name == "") {
|
||||
+ helpText.value = bundle.getString("loadModuleHelp_emptyModuleName");
|
||||
+ dialogNode.setAttribute("buttondisabledaccept", true);
|
||||
+ }
|
||||
+ if (name == "Root Certs") {
|
||||
+ helpText.value = bundle.getString("loadModuleHelp_rootCertsModuleName");
|
||||
+ dialogNode.setAttribute("buttondisabledaccept", true);
|
||||
+ }
|
||||
+}
|
||||
diff --git security/manager/pki/resources/content/load_device.xul security/manager/pki/resources/content/load_device.xul
|
||||
index b3a82df7ac57..f7cfca3cacf7 100644
|
||||
--- security/manager/pki/resources/content/load_device.xul
|
||||
+++ security/manager/pki/resources/content/load_device.xul
|
||||
@@ -29,7 +29,8 @@
|
||||
<hbox align="center">
|
||||
<label value="&loaddevice.modname2;" accesskey="&loaddevice.modname2.accesskey;"
|
||||
control="device_name"/>
|
||||
- <textbox id="device_name" flex="1" value="&loaddevice.modname.default;"/>
|
||||
+ <textbox id="device_name" flex="1" value="&loaddevice.modname.default;"
|
||||
+ onchange="validateModuleName();"/>
|
||||
</hbox>
|
||||
<hbox align="center">
|
||||
<label value="&loaddevice.filename2;" accesskey="&loaddevice.filename2.accesskey;"
|
||||
@@ -39,5 +40,6 @@
|
||||
accesskey="&loaddevice.browse.accesskey;"
|
||||
oncommand="onBrowseBtnPress();"/>
|
||||
</hbox>
|
||||
+ <label id="helpText" value=""/>
|
||||
|
||||
</dialog>
|
||||
diff --git security/manager/ssl/PKCS11ModuleDB.cpp security/manager/ssl/PKCS11ModuleDB.cpp
|
||||
index f5fc4c8ce4ba..3e7f2586ff62 100644
|
||||
--- security/manager/ssl/PKCS11.cpp
|
||||
+++ security/manager/ssl/PKCS11.cpp
|
||||
@@ -118,6 +118,17 @@ PKCS11::AddModule(const nsAString& aModuleName,
|
||||
return NS_ERROR_INVALID_ARG;
|
||||
}
|
||||
|
||||
+ // "Root Certs" is the name some NSS command-line utilities will give the
|
||||
+ // roots module if they decide to load it when there happens to be a
|
||||
+ // `DLL_PREFIX "nssckbi" DLL_SUFFIX` file in the directory being operated on.
|
||||
+ // This causes failures, so as a workaround, the PSM initialization code will
|
||||
+ // unconditionally remove any module named "Root Certs". We should prevent the
|
||||
+ // user from adding an unrelated module named "Root Certs" in the first place
|
||||
+ // so PSM doesn't delete it. See bug 1406396.
|
||||
+ if (aModuleName.EqualsLiteral("Root Certs")) {
|
||||
+ return NS_ERROR_ILLEGAL_VALUE;
|
||||
+ }
|
||||
+
|
||||
NS_ConvertUTF16toUTF8 moduleName(aModuleName);
|
||||
nsCString fullPath;
|
||||
// NSS doesn't support Unicode path. Use native charset
|
||||
diff --git security/manager/ssl/tests/mochitest/browser/browser_loadPKCS11Module_ui.js security/manager/ssl/tests/mochitest/browser/browser_loadPKCS11Module_ui.js
|
||||
index c458181a0067..65649d453a6b 100644
|
||||
--- security/manager/ssl/tests/mochitest/browser/browser_loadPKCS11Module_ui.js
|
||||
+++ security/manager/ssl/tests/mochitest/browser/browser_loadPKCS11Module_ui.js
|
||||
@@ -231,3 +231,33 @@ add_task(async function testCancel() {
|
||||
|
||||
await BrowserTestUtils.windowClosed(win);
|
||||
});
|
||||
+
|
||||
+async function testModuleNameHelper(moduleName, acceptButtonShouldBeDisabled) {
|
||||
+ let win = await openLoadModuleDialog();
|
||||
+ resetCallCounts();
|
||||
+
|
||||
+ info(`Setting Module Name to '${moduleName}'`);
|
||||
+ let moduleNameBox = win.document.getElementById("device_name");
|
||||
+ moduleNameBox.value = moduleName;
|
||||
+ // this makes this not a great test, but it's the easiest way to simulate this
|
||||
+ moduleNameBox.onchange();
|
||||
+
|
||||
+ let dialogNode = win.document.querySelector("dialog");
|
||||
+ Assert.equal(dialogNode.getAttribute("buttondisabledaccept"),
|
||||
+ acceptButtonShouldBeDisabled ? "true" : "", // it's a string
|
||||
+ `dialog accept button should ${acceptButtonShouldBeDisabled ? "" : "not "}be disabled`);
|
||||
+
|
||||
+ return BrowserTestUtils.closeWindow(win);
|
||||
+}
|
||||
+
|
||||
+add_task(async function testEmptyModuleName() {
|
||||
+ await testModuleNameHelper("", true);
|
||||
+});
|
||||
+
|
||||
+add_task(async function testReservedModuleName() {
|
||||
+ await testModuleNameHelper("Root Certs", true);
|
||||
+});
|
||||
+
|
||||
+add_task(async function testAcceptableModuleName() {
|
||||
+ await testModuleNameHelper("Some Module Name", false);
|
||||
+});
|
||||
diff --git security/manager/ssl/tests/unit/test_pkcs11_moduleDB.js security/manager/ssl/tests/unit/test_pkcs11_moduleDB.js
|
||||
new file mode 100644
|
||||
index 000000000000..110f5a8461e5
|
||||
--- /dev/null
|
||||
+++ security/manager/ssl/tests/unit/test_pkcs11_moduleDB.js
|
||||
@@ -0,0 +1,28 @@
|
||||
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
|
||||
+// Any copyright is dedicated to the Public Domain.
|
||||
+// http://creativecommons.org/publicdomain/zero/1.0/
|
||||
+"use strict";
|
||||
+
|
||||
+// Tests that adding modules with invalid names are prevented.
|
||||
+
|
||||
+// Ensure that the appropriate initialization has happened.
|
||||
+do_get_profile();
|
||||
+
|
||||
+const gModuleDB = Cc["@mozilla.org/security/pkcs11moduledb;1"]
|
||||
+ .getService(Ci.nsIPKCS11ModuleDB);
|
||||
+
|
||||
+function run_test() {
|
||||
+ let libraryFile = Services.dirsvc.get("CurWorkD", Ci.nsIFile);
|
||||
+ libraryFile.append("pkcs11testmodule");
|
||||
+ libraryFile.append(ctypes.libraryName("pkcs11testmodule"));
|
||||
+ ok(libraryFile.exists(), "The pkcs11testmodule file should exist");
|
||||
+
|
||||
+ let pkcs11ModuleDB = Cc["@mozilla.org/security/pkcs11moduledb;1"]
|
||||
+ .getService(Ci.nsIPKCS11ModuleDB);
|
||||
+ throws(() => pkcs11ModuleDB.addModule("Root Certs", libraryFile.path, 0, 0),
|
||||
+ /NS_ERROR_ILLEGAL_VALUE/,
|
||||
+ "Adding a module named 'Root Certs' should fail");
|
||||
+ throws(() => pkcs11ModuleDB.addModule("", libraryFile.path, 0, 0),
|
||||
+ /NS_ERROR_ILLEGAL_VALUE/,
|
||||
+ "Adding a module with an empty name should fail.");
|
||||
+}
|
||||
diff --git security/manager/ssl/tests/unit/xpcshell-smartcards.ini security/manager/ssl/tests/unit/xpcshell-smartcards.ini
|
||||
index 66f4d842642f..eab7ee368e7c 100644
|
||||
--- security/manager/ssl/tests/unit/xpcshell-smartcards.ini
|
||||
+++ security/manager/ssl/tests/unit/xpcshell-smartcards.ini
|
||||
@@ -7,6 +7,7 @@ support-files =
|
||||
|
||||
[test_pkcs11_insert_remove.js]
|
||||
[test_pkcs11_module.js]
|
||||
+[test_pkcs11_moduleDB.js]
|
||||
[test_pkcs11_no_events_after_removal.js]
|
||||
[test_pkcs11_safe_mode.js]
|
||||
skip-if = coverage # bug 1336728
|
37
www/waterfox/files/patch-bug1406474
Normal file
37
www/waterfox/files/patch-bug1406474
Normal file
|
@ -0,0 +1,37 @@
|
|||
commit 78e3035e7b19
|
||||
Author: Nathan Froyd <froydnj@mozilla.com>
|
||||
Date: Mon Oct 9 16:11:10 2017 -0400
|
||||
|
||||
Bug 1406474 - Provide gfxUserFontSet::Entry with a move constructor. r=heycam, a=ritu
|
||||
|
||||
This change makes moving Entry around more efficient, and also copies
|
||||
the mAllowedFontSets member as a ride-along bonus fix.
|
||||
|
||||
--HG--
|
||||
extra : source : 2b181f6ba9d4c0e82d3abc947b31270114425b5c
|
||||
---
|
||||
gfx/thebes/gfxUserFontSet.h | 11 ++++++-----
|
||||
1 file changed, 6 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git gfx/thebes/gfxUserFontSet.h gfx/thebes/gfxUserFontSet.h
|
||||
index 1c84ceb128d5..b71219901ca9 100644
|
||||
--- gfx/thebes/gfxUserFontSet.h
|
||||
+++ gfx/thebes/gfxUserFontSet.h
|
||||
@@ -403,11 +403,12 @@ public:
|
||||
mPrivate(aKey->mPrivate)
|
||||
{ }
|
||||
|
||||
- Entry(const Entry& aOther)
|
||||
- : mURI(aOther.mURI),
|
||||
- mPrincipal(aOther.mPrincipal),
|
||||
- mFontEntry(aOther.mFontEntry),
|
||||
- mPrivate(aOther.mPrivate)
|
||||
+ Entry(Entry&& aOther)
|
||||
+ : mAllowedFontSets(mozilla::Move(aOther.mAllowedFontSets)),
|
||||
+ mURI(mozilla::Move(aOther.mURI)),
|
||||
+ mPrincipal(mozilla::Move(aOther.mPrincipal)),
|
||||
+ mFontEntry(mozilla::Move(aOther.mFontEntry)),
|
||||
+ mPrivate(mozilla::Move(aOther.mPrivate))
|
||||
{ }
|
||||
|
||||
~Entry() { }
|
50
www/waterfox/files/patch-bug1406859
Normal file
50
www/waterfox/files/patch-bug1406859
Normal file
|
@ -0,0 +1,50 @@
|
|||
commit ab3fe8821636
|
||||
Author: Jessica Jong <jjong@mozilla.com>
|
||||
Date: Thu Oct 19 09:14:56 2017 +0800
|
||||
|
||||
Bug 1406859 - [DateTimePicker] Let the first picker close gracefully before opening a second picker. r=mconley, a=ritu
|
||||
|
||||
If we're trying to open a picker while one is already open, we should let the
|
||||
first one close gracefully, that is, we should consume the popuphidden event,
|
||||
otherwise the event will be fired when we re-add the listeners.
|
||||
|
||||
MozReview-Commit-ID: CGy86le1F4g
|
||||
|
||||
--HG--
|
||||
extra : source : 629afbb52163b54ec832d8f83f90bb3bcbe929a2
|
||||
---
|
||||
toolkit/content/browser-content.js | 8 ++++++++
|
||||
toolkit/modules/DateTimePickerHelper.jsm | 1 +
|
||||
2 files changed, 9 insertions(+)
|
||||
|
||||
diff --git toolkit/content/browser-content.js toolkit/content/browser-content.js
|
||||
index ea830c8e8cdb..e5d01bb720f9 100644
|
||||
--- toolkit/content/browser-content.js
|
||||
+++ toolkit/content/browser-content.js
|
||||
@@ -1790,6 +1790,14 @@ let DateTimePickerListener = {
|
||||
(aEvent.originalTarget.type == "time" && !this.getTimePickerPref())) {
|
||||
return;
|
||||
}
|
||||
+
|
||||
+ if (this._inputElement) {
|
||||
+ // This happens when we're trying to open a picker when another picker
|
||||
+ // is still open. We ignore this request to let the first picker
|
||||
+ // close gracefully.
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
this._inputElement = aEvent.originalTarget;
|
||||
this._inputElement.setDateTimePickerState(true);
|
||||
this.addListeners();
|
||||
diff --git toolkit/modules/DateTimePickerHelper.jsm toolkit/modules/DateTimePickerHelper.jsm
|
||||
index 38e89bd0d160..ad187dab9fed 100644
|
||||
--- toolkit/modules/DateTimePickerHelper.jsm
|
||||
+++ toolkit/modules/DateTimePickerHelper.jsm
|
||||
@@ -63,6 +63,7 @@ this.DateTimePickerHelper = {
|
||||
return;
|
||||
}
|
||||
this.picker.closePicker();
|
||||
+ this.close();
|
||||
break;
|
||||
}
|
||||
case "FormDateTime:UpdatePicker": {
|
28
www/waterfox/files/patch-bug1407092
Normal file
28
www/waterfox/files/patch-bug1407092
Normal file
|
@ -0,0 +1,28 @@
|
|||
commit 573e1d05dfe1
|
||||
Author: Emilio Cobos Álvarez <emilio@crisal.io>
|
||||
Date: Tue Oct 10 14:13:29 2017 -0500
|
||||
|
||||
Bug 1407092 - style: Fix ex computation with more than one operand. r=jdm, a=ritu
|
||||
|
||||
Source-Repo: https://github.com/servo/servo
|
||||
Source-Revision: b1926b465671ce56474fc24827eb9562ff7b575b
|
||||
|
||||
--HG--
|
||||
extra : source : c75889c4efb4b22666b568304eb27fad37fd66b2
|
||||
---
|
||||
servo/components/style/values/specified/calc.rs | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git servo/components/style/values/specified/calc.rs servo/components/style/values/specified/calc.rs
|
||||
index 3ac81d5903c9..431248f704de 100644
|
||||
--- servo/components/style/values/specified/calc.rs
|
||||
+++ servo/components/style/values/specified/calc.rs
|
||||
@@ -372,7 +372,7 @@ impl CalcNode {
|
||||
ret.em = Some(ret.em.unwrap_or(0.) + em * factor);
|
||||
}
|
||||
FontRelativeLength::Ex(ex) => {
|
||||
- ret.ex = Some(ret.em.unwrap_or(0.) + ex * factor);
|
||||
+ ret.ex = Some(ret.ex.unwrap_or(0.) + ex * factor);
|
||||
}
|
||||
FontRelativeLength::Ch(ch) => {
|
||||
ret.ch = Some(ret.ch.unwrap_or(0.) + ch * factor);
|
31
www/waterfox/files/patch-bug1407243
Normal file
31
www/waterfox/files/patch-bug1407243
Normal file
|
@ -0,0 +1,31 @@
|
|||
commit fb2240799f3c
|
||||
Author: Jean-Yves Avenard <jyavenard@mozilla.com>
|
||||
Date: Tue Oct 10 16:14:24 2017 +0200
|
||||
|
||||
Bug 1407243 - Don't immediately fire canplaythrough for infinite/live streams. r=jwwang, a=ritu
|
||||
|
||||
MozReview-Commit-ID: 2LQFa8PHvO5
|
||||
|
||||
--HG--
|
||||
extra : source : 6f2fa0f0d78132f5411f648f7c787c2aeeffbd69
|
||||
---
|
||||
dom/media/mediasource/MediaSourceDecoder.cpp | 6 +-----
|
||||
1 file changed, 1 insertion(+), 5 deletions(-)
|
||||
|
||||
diff --git dom/media/mediasource/MediaSourceDecoder.cpp dom/media/mediasource/MediaSourceDecoder.cpp
|
||||
index d85f7ec51226..54c7d79e9bdd 100644
|
||||
--- dom/media/mediasource/MediaSourceDecoder.cpp
|
||||
+++ dom/media/mediasource/MediaSourceDecoder.cpp
|
||||
@@ -310,11 +310,7 @@ MediaSourceDecoder::CanPlayThroughImpl()
|
||||
}
|
||||
TimeUnit duration = TimeUnit::FromSeconds(mMediaSource->Duration());
|
||||
auto currentPosition = CurrentPosition();
|
||||
- if (duration.IsInfinite()) {
|
||||
- // We can't make an informed decision and just assume that it's a live
|
||||
- // stream
|
||||
- return true;
|
||||
- } else if (duration <= currentPosition) {
|
||||
+ if (duration <= currentPosition) {
|
||||
return true;
|
||||
}
|
||||
// If we have data up to the mediasource's duration or 10s ahead, we can
|
34
www/waterfox/files/patch-bug1407245
Normal file
34
www/waterfox/files/patch-bug1407245
Normal file
|
@ -0,0 +1,34 @@
|
|||
commit 3c4493ef2e44
|
||||
Author: Ben Kelly <ben@wanderview.com>
|
||||
Date: Tue Oct 10 13:50:36 2017 -0700
|
||||
|
||||
Bug 1407245 - Fix service worker update 24-hour time check conversion from microseconds. r=asuth, a=ritu
|
||||
|
||||
--HG--
|
||||
extra : source : 412da89cc8e754831e6942b55d3cfd0ea3f1c88b
|
||||
---
|
||||
dom/workers/ServiceWorkerRegistrationInfo.cpp | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git dom/workers/ServiceWorkerRegistrationInfo.cpp dom/workers/ServiceWorkerRegistrationInfo.cpp
|
||||
index 07b9726677cc..beca30d82387 100644
|
||||
--- dom/workers/ServiceWorkerRegistrationInfo.cpp
|
||||
+++ dom/workers/ServiceWorkerRegistrationInfo.cpp
|
||||
@@ -346,14 +346,14 @@ ServiceWorkerRegistrationInfo::IsLastUpdateCheckTimeOverOneDay() const
|
||||
}
|
||||
|
||||
const int64_t kSecondsPerDay = 86400;
|
||||
- const int64_t now =
|
||||
+ const int64_t nowMicros =
|
||||
mCreationTime + static_cast<PRTime>((TimeStamp::Now() -
|
||||
mCreationTimeStamp).ToMicroseconds());
|
||||
|
||||
// now < mLastUpdateTime if the system time is reset between storing
|
||||
// and loading mLastUpdateTime from ServiceWorkerRegistrar.
|
||||
- if (now < mLastUpdateTime ||
|
||||
- (now - mLastUpdateTime) / PR_MSEC_PER_SEC > kSecondsPerDay) {
|
||||
+ if (nowMicros < mLastUpdateTime ||
|
||||
+ (nowMicros - mLastUpdateTime) / PR_USEC_PER_SEC > kSecondsPerDay) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
25
www/waterfox/files/patch-bug1407414
Normal file
25
www/waterfox/files/patch-bug1407414
Normal file
|
@ -0,0 +1,25 @@
|
|||
commit 94ba7703f923
|
||||
Author: Jason Orendorff <jorendorff@mozilla.com>
|
||||
Date: Tue Oct 17 16:25:40 2017 +0100
|
||||
|
||||
Bug 1407414 - Crash in js::GetOwnPropertyDescriptor. r=bz, a=lizzard
|
||||
|
||||
--HG--
|
||||
extra : source : 0181d804e8bf9babc3e91f4fcd7d2cf6491372ab
|
||||
---
|
||||
js/xpconnect/wrappers/XrayWrapper.cpp | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git js/xpconnect/wrappers/XrayWrapper.cpp js/xpconnect/wrappers/XrayWrapper.cpp
|
||||
index c3385511da20..76b29483a020 100644
|
||||
--- js/xpconnect/wrappers/XrayWrapper.cpp
|
||||
+++ js/xpconnect/wrappers/XrayWrapper.cpp
|
||||
@@ -2167,6 +2167,8 @@ XrayWrapper<Base, Traits>::getOwnPropertyDescriptor(JSContext* cx, HandleObject
|
||||
BaseProxyHandler::GET_PROPERTY_DESCRIPTOR);
|
||||
RootedObject target(cx, XrayTraits::getTargetObject(wrapper));
|
||||
RootedObject holder(cx, Traits::singleton.ensureHolder(cx, wrapper));
|
||||
+ if (!holder)
|
||||
+ return false;
|
||||
|
||||
if (!Traits::singleton.resolveOwnProperty(cx, wrapper, target, holder, id, desc))
|
||||
return false;
|
115
www/waterfox/files/patch-bug1407680
Normal file
115
www/waterfox/files/patch-bug1407680
Normal file
|
@ -0,0 +1,115 @@
|
|||
commit 4fc0d0a89efa
|
||||
Author: Randell Jesup <rjesup@jesup.org>
|
||||
Date: Tue Oct 17 16:27:20 2017 -0400
|
||||
|
||||
Bug 1407680 - Set DelayAgnostic and ExtendedFilter options. r=dminor, a=ritu
|
||||
|
||||
This was lost due to API changes in the update to upstream v57
|
||||
|
||||
--HG--
|
||||
extra : source : 123965af3a606397e7b0f5705ae3365ad64a1258
|
||||
---
|
||||
dom/media/webrtc/MediaEngineWebRTC.cpp | 7 +++++--
|
||||
dom/media/webrtc/MediaEngineWebRTC.h | 8 +++++++-
|
||||
dom/media/webrtc/MediaEngineWebRTCAudio.cpp | 10 +++++++++-
|
||||
3 files changed, 21 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git dom/media/webrtc/MediaEngineWebRTC.cpp dom/media/webrtc/MediaEngineWebRTC.cpp
|
||||
index 772b9bb6e52f..e8429506dcae 100644
|
||||
--- dom/media/webrtc/MediaEngineWebRTC.cpp
|
||||
+++ dom/media/webrtc/MediaEngineWebRTC.cpp
|
||||
@@ -111,6 +111,8 @@ MediaEngineWebRTC::MediaEngineWebRTC(MediaEnginePrefs &aPrefs)
|
||||
mVoiceEngine(nullptr),
|
||||
mAudioInput(nullptr),
|
||||
mFullDuplex(aPrefs.mFullDuplex),
|
||||
+ mDelayAgnostic(aPrefs.mDelayAgnostic),
|
||||
+ mExtendedFilter(aPrefs.mExtendedFilter),
|
||||
mHasTabVideoSource(false)
|
||||
{
|
||||
nsCOMPtr<nsIComponentRegistrar> compMgr;
|
||||
@@ -294,7 +296,7 @@ MediaEngineWebRTC::EnumerateAudioDevices(dom::MediaSourceEnum aMediaSource,
|
||||
#endif
|
||||
|
||||
if (!mVoiceEngine) {
|
||||
- mVoiceEngine = webrtc::VoiceEngine::Create(/*mConfig*/);
|
||||
+ mVoiceEngine = webrtc::VoiceEngine::Create();
|
||||
if (!mVoiceEngine) {
|
||||
return;
|
||||
}
|
||||
@@ -367,7 +369,8 @@ MediaEngineWebRTC::EnumerateAudioDevices(dom::MediaSourceEnum aMediaSource,
|
||||
audioinput = new mozilla::AudioInputCubeb(mVoiceEngine, i);
|
||||
}
|
||||
aSource = new MediaEngineWebRTCMicrophoneSource(mVoiceEngine, audioinput,
|
||||
- i, deviceName, uniqueId);
|
||||
+ i, deviceName, uniqueId,
|
||||
+ mDelayAgnostic, mExtendedFilter);
|
||||
mAudioSources.Put(uuid, aSource); // Hashtable takes ownership.
|
||||
aASources->AppendElement(aSource);
|
||||
}
|
||||
diff --git dom/media/webrtc/MediaEngineWebRTC.h dom/media/webrtc/MediaEngineWebRTC.h
|
||||
index 6b636adf396d..4567a5c0211a 100644
|
||||
--- dom/media/webrtc/MediaEngineWebRTC.h
|
||||
+++ dom/media/webrtc/MediaEngineWebRTC.h
|
||||
@@ -501,7 +501,9 @@ public:
|
||||
mozilla::AudioInput* aAudioInput,
|
||||
int aIndex,
|
||||
const char* name,
|
||||
- const char* uuid);
|
||||
+ const char* uuid,
|
||||
+ bool aDelayAgnostic,
|
||||
+ bool aExtendedFilter);
|
||||
|
||||
void GetName(nsAString& aName) const override;
|
||||
void GetUUID(nsACString& aUUID) const override;
|
||||
@@ -624,6 +626,8 @@ private:
|
||||
|
||||
int mCapIndex;
|
||||
int mChannel;
|
||||
+ bool mDelayAgnostic;
|
||||
+ bool mExtendedFilter;
|
||||
MOZ_INIT_OUTSIDE_CTOR TrackID mTrackID;
|
||||
bool mStarted;
|
||||
|
||||
@@ -678,6 +682,8 @@ private:
|
||||
webrtc::VoiceEngine* mVoiceEngine;
|
||||
RefPtr<mozilla::AudioInput> mAudioInput;
|
||||
bool mFullDuplex;
|
||||
+ bool mDelayAgnostic;
|
||||
+ bool mExtendedFilter;
|
||||
bool mHasTabVideoSource;
|
||||
|
||||
// Store devices we've already seen in a hashtable for quick return.
|
||||
diff --git dom/media/webrtc/MediaEngineWebRTCAudio.cpp dom/media/webrtc/MediaEngineWebRTCAudio.cpp
|
||||
index ff77065b09fa..a8bd52f01b24 100644
|
||||
--- dom/media/webrtc/MediaEngineWebRTCAudio.cpp
|
||||
+++ dom/media/webrtc/MediaEngineWebRTCAudio.cpp
|
||||
@@ -191,13 +191,17 @@ MediaEngineWebRTCMicrophoneSource::MediaEngineWebRTCMicrophoneSource(
|
||||
mozilla::AudioInput* aAudioInput,
|
||||
int aIndex,
|
||||
const char* name,
|
||||
- const char* uuid)
|
||||
+ const char* uuid,
|
||||
+ bool aDelayAgnostic,
|
||||
+ bool aExtendedFilter)
|
||||
: MediaEngineAudioSource(kReleased)
|
||||
, mVoiceEngine(aVoiceEnginePtr)
|
||||
, mAudioInput(aAudioInput)
|
||||
, mMonitor("WebRTCMic.Monitor")
|
||||
, mCapIndex(aIndex)
|
||||
, mChannel(-1)
|
||||
+ , mDelayAgnostic(aDelayAgnostic)
|
||||
+ , mExtendedFilter(aExtendedFilter)
|
||||
, mTrackID(TRACK_NONE)
|
||||
, mStarted(false)
|
||||
, mSampleFrequency(MediaEngine::DEFAULT_SAMPLE_RATE)
|
||||
@@ -781,6 +785,10 @@ MediaEngineWebRTCMicrophoneSource::InitEngine()
|
||||
mVoEBase = webrtc::VoEBase::GetInterface(mVoiceEngine);
|
||||
|
||||
mVoEBase->Init();
|
||||
+ webrtc::Config config;
|
||||
+ config.Set<webrtc::ExtendedFilter>(new webrtc::ExtendedFilter(mExtendedFilter));
|
||||
+ config.Set<webrtc::DelayAgnostic>(new webrtc::DelayAgnostic(mDelayAgnostic));
|
||||
+ mVoEBase->audio_processing()->SetExtraOptions(config);
|
||||
|
||||
mVoERender = webrtc::VoEExternalMedia::GetInterface(mVoiceEngine);
|
||||
if (mVoERender) {
|
71
www/waterfox/files/patch-bug1407936
Normal file
71
www/waterfox/files/patch-bug1407936
Normal file
|
@ -0,0 +1,71 @@
|
|||
commit 50296b42e3e2
|
||||
Author: Andrea Marchesini <amarchesini@mozilla.com>
|
||||
Date: Thu Oct 19 19:06:18 2017 +0200
|
||||
|
||||
Bug 1407936 - Cleaning up QuotaManagar data only when ServiceWorkers are correctly unregistered. r=bkelly, a=ritu
|
||||
|
||||
--HG--
|
||||
extra : source : 3624656ebe465779d8ec8fa4103d477a0e725165
|
||||
extra : histedit_source : 4a0d0011a098a070d2da7c5288d51c2cbed01e1c
|
||||
---
|
||||
browser/base/content/sanitize.js | 19 ++++++++++++++++---
|
||||
dom/interfaces/base/nsIServiceWorkerManager.idl | 3 ---
|
||||
2 files changed, 16 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git browser/base/content/sanitize.js browser/base/content/sanitize.js
|
||||
index 25c56c47bc2e..27e1343bc89b 100644
|
||||
--- browser/base/content/sanitize.js
|
||||
+++ browser/base/content/sanitize.js
|
||||
@@ -297,15 +297,28 @@ Sanitizer.prototype = {
|
||||
Services.obs.notifyObservers(null, "extension:purge-localStorage");
|
||||
|
||||
// ServiceWorkers
|
||||
+ let promises = [];
|
||||
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);
|
||||
+
|
||||
+ promises.push(new Promise(resolve => {
|
||||
+ let unregisterCallback = {
|
||||
+ unregisterSucceeded: () => { resolve(true); },
|
||||
+ // We don't care about failures.
|
||||
+ unregisterFailed: () => { resolve(true); },
|
||||
+ QueryInterface: XPCOMUtils.generateQI(
|
||||
+ [Ci.nsIServiceWorkerUnregisterCallback])
|
||||
+ };
|
||||
+
|
||||
+ serviceWorkerManager.propagateUnregister(sw.principal, unregisterCallback, sw.scope);
|
||||
+ }));
|
||||
}
|
||||
|
||||
+ await Promise.all(promises);
|
||||
+
|
||||
// QuotaManager
|
||||
- let promises = [];
|
||||
+ promises = [];
|
||||
await new Promise(resolve => {
|
||||
quotaManagerService.getUsage(request => {
|
||||
if (request.resultCode != Cr.NS_OK) {
|
||||
diff --git dom/interfaces/base/nsIServiceWorkerManager.idl dom/interfaces/base/nsIServiceWorkerManager.idl
|
||||
index 6b4505f7e185..42e38f4afceb 100644
|
||||
--- dom/interfaces/base/nsIServiceWorkerManager.idl
|
||||
+++ dom/interfaces/base/nsIServiceWorkerManager.idl
|
||||
@@ -186,16 +186,13 @@ interface nsIServiceWorkerManager : nsISupports
|
||||
// Testing
|
||||
DOMString getScopeForUrl(in nsIPrincipal aPrincipal, in DOMString aPath);
|
||||
|
||||
- // Note: This is meant to be used only by about:serviceworkers.
|
||||
// It returns an array of nsIServiceWorkerRegistrationInfos.
|
||||
nsIArray getAllRegistrations();
|
||||
|
||||
- // Note: This is meant to be used only by about:serviceworkers.
|
||||
// It calls softUpdate() for each child process.
|
||||
[implicit_jscontext] void propagateSoftUpdate(in jsval aOriginAttributes,
|
||||
in DOMString aScope);
|
||||
|
||||
- // Note: This is meant to be used only by about:serviceworkers.
|
||||
// It calls unregister() in each child process. The callback is used to
|
||||
// inform when unregister() is completed on the current process.
|
||||
void propagateUnregister(in nsIPrincipal aPrincipal,
|
185
www/waterfox/files/patch-bug1408397
Normal file
185
www/waterfox/files/patch-bug1408397
Normal file
|
@ -0,0 +1,185 @@
|
|||
commit 97e7c363f664
|
||||
Author: Andrea Marchesini <amarchesini@mozilla.com>
|
||||
Date: Tue Oct 17 13:17:51 2017 +0200
|
||||
|
||||
Bug 1408397 - FileReader should not use a bufferStream together with an async inputStream. r=smaug, a=ritu
|
||||
|
||||
--HG--
|
||||
extra : source : 61118e8a62afbc51169515f50c3b12b334219aa3
|
||||
---
|
||||
dom/file/FileReader.cpp | 93 +++++++++++++++++++++++--------------------------
|
||||
dom/file/FileReader.h | 1 -
|
||||
2 files changed, 44 insertions(+), 50 deletions(-)
|
||||
|
||||
diff --git dom/file/FileReader.cpp dom/file/FileReader.cpp
|
||||
index 17d38f293519..ccd2a43986ef 100644
|
||||
--- dom/file/FileReader.cpp
|
||||
+++ dom/file/FileReader.cpp
|
||||
@@ -19,6 +19,7 @@
|
||||
#include "mozilla/dom/FileReaderBinding.h"
|
||||
#include "mozilla/dom/ProgressEvent.h"
|
||||
#include "mozilla/Encoding.h"
|
||||
+#include "nsAlgorithm.h"
|
||||
#include "nsCycleCollectionParticipant.h"
|
||||
#include "nsDOMJSUtils.h"
|
||||
#include "nsError.h"
|
||||
@@ -187,27 +188,6 @@ FileReader::GetResult(JSContext* aCx,
|
||||
}
|
||||
}
|
||||
|
||||
-static nsresult
|
||||
-ReadFuncBinaryString(nsIInputStream* in,
|
||||
- void* closure,
|
||||
- const char* fromRawSegment,
|
||||
- uint32_t toOffset,
|
||||
- uint32_t count,
|
||||
- uint32_t *writeCount)
|
||||
-{
|
||||
- char16_t* dest = static_cast<char16_t*>(closure) + toOffset;
|
||||
- char16_t* end = dest + count;
|
||||
- const unsigned char* source = (const unsigned char*)fromRawSegment;
|
||||
- while (dest != end) {
|
||||
- *dest = *source;
|
||||
- ++dest;
|
||||
- ++source;
|
||||
- }
|
||||
- *writeCount = count;
|
||||
-
|
||||
- return NS_OK;
|
||||
-}
|
||||
-
|
||||
void
|
||||
FileReader::OnLoadEndArrayBuffer()
|
||||
{
|
||||
@@ -290,32 +270,56 @@ FileReader::DoReadData(uint64_t aCount)
|
||||
|
||||
if (mDataFormat == FILE_AS_BINARY) {
|
||||
//Continuously update our binary string as data comes in
|
||||
- uint32_t oldLen = mResult.Length();
|
||||
- MOZ_ASSERT(mResult.Length() == mDataLen, "unexpected mResult length");
|
||||
- if (uint64_t(oldLen) + aCount > UINT32_MAX)
|
||||
+ CheckedInt<uint64_t> size = mResult.Length();
|
||||
+ size += aCount;
|
||||
+
|
||||
+ if (!size.isValid() ||
|
||||
+ size.value() > UINT32_MAX ||
|
||||
+ size.value() > mTotal) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
- char16_t *buf = nullptr;
|
||||
- mResult.GetMutableData(&buf, oldLen + aCount, fallible);
|
||||
- NS_ENSURE_TRUE(buf, NS_ERROR_OUT_OF_MEMORY);
|
||||
+ }
|
||||
|
||||
- nsresult rv;
|
||||
+ uint32_t oldLen = mResult.Length();
|
||||
+ MOZ_ASSERT(oldLen == mDataLen, "unexpected mResult length");
|
||||
+
|
||||
+ char16_t* dest = nullptr;
|
||||
+ mResult.GetMutableData(&dest, size.value(), fallible);
|
||||
+ NS_ENSURE_TRUE(dest, NS_ERROR_OUT_OF_MEMORY);
|
||||
+
|
||||
+ dest += oldLen;
|
||||
+
|
||||
+ while (aCount > 0) {
|
||||
+ char tmpBuffer[4096];
|
||||
+ uint32_t minCount =
|
||||
+ XPCOM_MIN(aCount, static_cast<uint64_t>(sizeof(tmpBuffer)));
|
||||
+ uint32_t read;
|
||||
+
|
||||
+ nsresult rv = mAsyncStream->Read(tmpBuffer, minCount, &read);
|
||||
+ if (rv == NS_BASE_STREAM_CLOSED) {
|
||||
+ rv = NS_OK;
|
||||
+ }
|
||||
|
||||
- // nsFileStreams do not implement ReadSegment. In case here we are dealing
|
||||
- // with a nsIAsyncInputStream, in content process, we need to wrap a
|
||||
- // nsIBufferedInputStream around it.
|
||||
- if (!mBufferedStream) {
|
||||
- rv = NS_NewBufferedInputStream(getter_AddRefs(mBufferedStream),
|
||||
- mAsyncStream, 8192);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
- }
|
||||
|
||||
- rv = mBufferedStream->ReadSegments(ReadFuncBinaryString, buf + oldLen,
|
||||
- aCount, &bytesRead);
|
||||
- if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||
- return rv;
|
||||
+ if (read == 0) {
|
||||
+ // The stream finished too early.
|
||||
+ return NS_ERROR_OUT_OF_MEMORY;
|
||||
+ }
|
||||
+
|
||||
+ char16_t* end = dest + read;
|
||||
+ const unsigned char* source = (const unsigned char*)tmpBuffer;
|
||||
+ while (dest != end) {
|
||||
+ *dest = *source;
|
||||
+ ++dest;
|
||||
+ ++source;
|
||||
+ }
|
||||
+
|
||||
+ aCount -= read;
|
||||
+ bytesRead += read;
|
||||
}
|
||||
|
||||
- mResult.Truncate(oldLen + bytesRead);
|
||||
+ MOZ_ASSERT(size.value() == oldLen + bytesRead);
|
||||
+ mResult.Truncate(size.value());
|
||||
}
|
||||
else {
|
||||
CheckedInt<uint64_t> size = mDataLen;
|
||||
@@ -363,7 +367,6 @@ FileReader::ReadFileContent(Blob& aBlob,
|
||||
mResultArrayBuffer = nullptr;
|
||||
|
||||
mAsyncStream = nullptr;
|
||||
- mBufferedStream = nullptr;
|
||||
|
||||
mTransferred = 0;
|
||||
mTotal = 0;
|
||||
@@ -557,7 +560,6 @@ FileReader::FreeDataAndDispatchSuccess()
|
||||
FreeFileData();
|
||||
mResult.SetIsVoid(false);
|
||||
mAsyncStream = nullptr;
|
||||
- mBufferedStream = nullptr;
|
||||
mBlob = nullptr;
|
||||
|
||||
// Dispatch event to signify end of a successful operation
|
||||
@@ -573,7 +575,6 @@ FileReader::FreeDataAndDispatchError()
|
||||
FreeFileData();
|
||||
mResult.SetIsVoid(true);
|
||||
mAsyncStream = nullptr;
|
||||
- mBufferedStream = nullptr;
|
||||
mBlob = nullptr;
|
||||
|
||||
// Dispatch error event to signify load failure
|
||||
@@ -768,7 +769,6 @@ FileReader::Abort()
|
||||
mResultArrayBuffer = nullptr;
|
||||
|
||||
mAsyncStream = nullptr;
|
||||
- mBufferedStream = nullptr;
|
||||
mBlob = nullptr;
|
||||
|
||||
//Clean up memory buffer
|
||||
@@ -822,11 +822,6 @@ FileReader::Shutdown()
|
||||
mAsyncStream = nullptr;
|
||||
}
|
||||
|
||||
- if (mBufferedStream) {
|
||||
- mBufferedStream->Close();
|
||||
- mBufferedStream = nullptr;
|
||||
- }
|
||||
-
|
||||
FreeFileData();
|
||||
mResultArrayBuffer = nullptr;
|
||||
|
||||
diff --git dom/file/FileReader.h dom/file/FileReader.h
|
||||
index 32ea1f9bc329..7aa52107dc46 100644
|
||||
--- dom/file/FileReader.h
|
||||
+++ dom/file/FileReader.h
|
||||
@@ -183,7 +183,6 @@ private:
|
||||
bool mTimerIsActive;
|
||||
|
||||
nsCOMPtr<nsIAsyncInputStream> mAsyncStream;
|
||||
- nsCOMPtr<nsIInputStream> mBufferedStream;
|
||||
|
||||
RefPtr<DOMError> mError;
|
||||
|
37
www/waterfox/files/patch-bug1408672
Normal file
37
www/waterfox/files/patch-bug1408672
Normal file
|
@ -0,0 +1,37 @@
|
|||
commit fe19ce17d4f9
|
||||
Author: Emilio Cobos Álvarez <emilio@crisal.io>
|
||||
Date: Sat Oct 14 10:50:00 2017 -0400
|
||||
|
||||
Bug 1408672 - Disable the hover / active quirk for invalidation. r=heycam, a=ritu
|
||||
|
||||
MozReview-Commit-ID: 6wlDm8cNEYD
|
||||
---
|
||||
servo/components/selectors/matching.rs | 8 +++++++-
|
||||
1 file changed, 7 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git servo/components/selectors/matching.rs servo/components/selectors/matching.rs
|
||||
index ff0dd40b484c..c6c2db3c4719 100644
|
||||
--- servo/components/selectors/matching.rs
|
||||
+++ servo/components/selectors/matching.rs
|
||||
@@ -393,7 +393,9 @@ pub fn matches_selector<E, F>(selector: &Selector<E::Impl>,
|
||||
let iter = if offset == 0 {
|
||||
selector.iter()
|
||||
} else {
|
||||
- selector.iter_from(offset)
|
||||
+ let iter = selector.iter_from(offset);
|
||||
+ local_context.note_position(&iter);
|
||||
+ iter
|
||||
};
|
||||
matches_complex_selector(iter, element, &mut local_context, flags_setter)
|
||||
}
|
||||
@@ -432,6 +434,10 @@ where
|
||||
}
|
||||
|
||||
let mut local_context = LocalMatchingContext::new(context, selector);
|
||||
+ // Disable the hover quirk here, since we're in a random position inside the
|
||||
+ // selector, and this is only used for invalidation, so incorrectly
|
||||
+ // returning true doesn't affect correctness, only does a bit more work.
|
||||
+ local_context.hover_active_quirk_disabled = true;
|
||||
for component in selector.iter_raw_parse_order_from(from_offset - 1) {
|
||||
if matches!(*component, Component::Combinator(..)) {
|
||||
return CompoundSelectorMatchingResult::Matched {
|
23
www/waterfox/files/patch-bug1409101
Normal file
23
www/waterfox/files/patch-bug1409101
Normal file
|
@ -0,0 +1,23 @@
|
|||
commit d4e320f4bf02
|
||||
Author: Jason Laster <jason.laster.11@gmail.com>
|
||||
Date: Thu Oct 19 07:57:00 2017 -0400
|
||||
|
||||
Bug 1409101 - Editor is occasionally empty. r=jdescottes, a=ritu
|
||||
---
|
||||
devtools/client/debugger/new/debugger.js | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git devtools/client/debugger/new/debugger.js devtools/client/debugger/new/debugger.js
|
||||
index a96351f65acf..dd8b81c06aec 100644
|
||||
--- devtools/client/debugger/new/debugger.js
|
||||
+++ devtools/client/debugger/new/debugger.js
|
||||
@@ -24187,6 +24187,9 @@ return /******/ (function(modules) { // webpackBootstrap
|
||||
var selectedSource = nextProps.selectedSource,
|
||||
selectedLocation = nextProps.selectedLocation;
|
||||
|
||||
+ if (!this.state.editor) {
|
||||
+ return;
|
||||
+ }
|
||||
|
||||
if (nextProps.startPanelSize !== this.props.startPanelSize || nextProps.endPanelSize !== this.props.endPanelSize) {
|
||||
this.state.editor.codeMirror.setSize();
|
38
www/waterfox/files/patch-bug1409277
Normal file
38
www/waterfox/files/patch-bug1409277
Normal file
|
@ -0,0 +1,38 @@
|
|||
commit 4a74980d5d86
|
||||
Author: J. Ryan Stinnett <jryans@gmail.com>
|
||||
Date: Fri Oct 20 15:24:51 2017 -0500
|
||||
|
||||
Bug 1409277 - Ignore non-URLs for background pres attr. r=manishearth, a=ritu
|
||||
|
||||
Check background attribute values for the same types (URL, image) in Stylo mode
|
||||
as we do in Gecko mode.
|
||||
|
||||
In particular, this ignores the edge case of the empty attribute, which comes
|
||||
through as a string value type, and leads Stylo to trigger a load of the page
|
||||
itself as the background image (since the empty URL is interpreted as relative
|
||||
to the page).
|
||||
|
||||
MozReview-Commit-ID: CUhq5nS8kVw
|
||||
|
||||
--HG--
|
||||
extra : source : 1fe7b56a29c6a2cac69fc986c5fb4b99a92d7781
|
||||
extra : histedit_source : cc3086f60235d56bb69368fb754fd61c3dffe86f
|
||||
---
|
||||
layout/style/ServoSpecifiedValues.cpp | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git layout/style/ServoSpecifiedValues.cpp layout/style/ServoSpecifiedValues.cpp
|
||||
index bb8d425316b0..c374a6061ac9 100644
|
||||
--- layout/style/ServoSpecifiedValues.cpp
|
||||
+++ layout/style/ServoSpecifiedValues.cpp
|
||||
@@ -121,6 +121,10 @@ ServoSpecifiedValues::SetTextDecorationColorOverride()
|
||||
void
|
||||
ServoSpecifiedValues::SetBackgroundImage(nsAttrValue& aValue)
|
||||
{
|
||||
+ if (aValue.Type() != nsAttrValue::eURL &&
|
||||
+ aValue.Type() != nsAttrValue::eImage) {
|
||||
+ return;
|
||||
+ }
|
||||
nsAutoString str;
|
||||
aValue.ToString(str);
|
||||
Servo_DeclarationBlock_SetBackgroundImage(
|
25
www/waterfox/files/patch-bug1409496
Normal file
25
www/waterfox/files/patch-bug1409496
Normal file
|
@ -0,0 +1,25 @@
|
|||
commit bd6a81ae5873
|
||||
Author: Andrea Marchesini <amarchesini@mozilla.com>
|
||||
Date: Wed Oct 25 19:14:34 2017 +0200
|
||||
|
||||
Bug 1409496 - Cleaning data per domain, must delete localStorage data. r=asuth, a=lizzard
|
||||
|
||||
--HG--
|
||||
extra : source : 6019c89b317d960c1c323dc2c037d5e65414fde2
|
||||
---
|
||||
browser/components/preferences/SiteDataManager.jsm | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git browser/components/preferences/SiteDataManager.jsm browser/components/preferences/SiteDataManager.jsm
|
||||
index 8f2ac2a34188..3f7cc19ffbaa 100644
|
||||
--- browser/components/preferences/SiteDataManager.jsm
|
||||
+++ browser/components/preferences/SiteDataManager.jsm
|
||||
@@ -217,6 +217,8 @@ this.SiteDataManager = {
|
||||
cookie.host, cookie.name, cookie.path, false, cookie.originAttributes);
|
||||
}
|
||||
}
|
||||
+
|
||||
+ Services.obs.notifyObservers(null, "browser:purge-domain-data", principal.URI.host);
|
||||
}
|
||||
},
|
||||
|
34
www/waterfox/files/patch-bug1409649
Normal file
34
www/waterfox/files/patch-bug1409649
Normal file
|
@ -0,0 +1,34 @@
|
|||
commit 259b43dfa9cd
|
||||
Author: JW Wang <jwwang@mozilla.com>
|
||||
Date: Wed Oct 18 16:08:33 2017 +0800
|
||||
|
||||
Bug 1409649 - Shut down the decoder when MEDIA_ERR_ABORTED is received. r=gerald, a=ritu
|
||||
|
||||
http://searchfox.org/mozilla-central/rev/dca019c94bf3a840ed7ff50261483410cfece24f/dom/html/HTMLMediaElement.cpp#1395-1400
|
||||
|
||||
We need to shut down the decoder after setting network state to EMPTY.
|
||||
Otherwise the decoder will keep loading and change ready state to HAVE_METADATA
|
||||
or greater and then fail the assertion in AssertReadyStateIsNothing().
|
||||
|
||||
MozReview-Commit-ID: FpMDVAJHTS5
|
||||
|
||||
--HG--
|
||||
extra : source : 6a815fb0b667075041404ebd0b1ee7b87f46e3a2
|
||||
---
|
||||
dom/html/HTMLMediaElement.cpp | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git dom/html/HTMLMediaElement.cpp dom/html/HTMLMediaElement.cpp
|
||||
index d1f12e7bceed..5d51851047cf 100644
|
||||
--- dom/html/HTMLMediaElement.cpp
|
||||
+++ dom/html/HTMLMediaElement.cpp
|
||||
@@ -1376,6 +1376,9 @@ public:
|
||||
mOwner->DispatchAsyncEvent(NS_LITERAL_STRING("abort"));
|
||||
mOwner->ChangeNetworkState(nsIDOMHTMLMediaElement::NETWORK_EMPTY);
|
||||
mOwner->DispatchAsyncEvent(NS_LITERAL_STRING("emptied"));
|
||||
+ if (mOwner->mDecoder) {
|
||||
+ mOwner->ShutdownDecoder();
|
||||
+ }
|
||||
} else if (aErrorCode == MEDIA_ERR_SRC_NOT_SUPPORTED) {
|
||||
mOwner->ChangeNetworkState(nsIDOMHTMLMediaElement::NETWORK_NO_SOURCE);
|
||||
} else {
|
27
www/waterfox/files/patch-bug1410146
Normal file
27
www/waterfox/files/patch-bug1410146
Normal file
|
@ -0,0 +1,27 @@
|
|||
commit a8fff8ff6df2
|
||||
Author: Dragana Damjanovic dd.mozilla@gmail.com <Dragana Damjanovic dd.mozilla@gmail.com>
|
||||
Date: Tue Oct 24 14:23:00 2017 -0400
|
||||
|
||||
Bug 1410146 - Fix UnknownDecoder. r=mayhemer, a=ritu
|
||||
|
||||
--HG--
|
||||
extra : source : 8e55fa4da0cb3213d24aca8326792f6346594ed6
|
||||
---
|
||||
netwerk/streamconv/converters/nsUnknownDecoder.cpp | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git netwerk/streamconv/converters/nsUnknownDecoder.cpp netwerk/streamconv/converters/nsUnknownDecoder.cpp
|
||||
index f3249942580c..ea69d4eb63a3 100644
|
||||
--- netwerk/streamconv/converters/nsUnknownDecoder.cpp
|
||||
+++ netwerk/streamconv/converters/nsUnknownDecoder.cpp
|
||||
@@ -75,6 +75,10 @@ nsUnknownDecoder::ConvertedStreamListener::
|
||||
{
|
||||
uint32_t read;
|
||||
nsAutoCString decodedData;
|
||||
+ {
|
||||
+ MutexAutoLock lock(mDecoder->mMutex);
|
||||
+ decodedData = mDecoder->mDecodedData;
|
||||
+ }
|
||||
nsresult rv = stream->ReadSegments(AppendDataToString, &decodedData, count,
|
||||
&read);
|
||||
if (NS_FAILED(rv)) {
|
140
www/waterfox/files/patch-bug1410420
Normal file
140
www/waterfox/files/patch-bug1410420
Normal file
|
@ -0,0 +1,140 @@
|
|||
commit 7bc1ff4cdf6e
|
||||
Author: Jan Varga <jan.varga@gmail.com>
|
||||
Date: Mon Oct 30 07:13:40 2017 +0100
|
||||
|
||||
Bug 1410420 - Clear database actor's strong reference to IDBDatabase when opening of a database fails. r=asuth, a=ritu
|
||||
|
||||
--HG--
|
||||
extra : source : d7a53e1454addc0d6bdda84e6c5125c88a14d5cc
|
||||
---
|
||||
dom/indexedDB/ActorsChild.cpp | 25 +++++++++++++++++++++++++
|
||||
dom/indexedDB/ActorsChild.h | 17 +++++++++++++++++
|
||||
2 files changed, 42 insertions(+)
|
||||
|
||||
diff --git dom/indexedDB/ActorsChild.cpp dom/indexedDB/ActorsChild.cpp
|
||||
index a720e9520e6e..0074956761e0 100644
|
||||
--- dom/indexedDB/ActorsChild.cpp
|
||||
+++ dom/indexedDB/ActorsChild.cpp
|
||||
@@ -1755,6 +1755,7 @@ BackgroundFactoryRequestChild::BackgroundFactoryRequestChild(
|
||||
uint64_t aRequestedVersion)
|
||||
: BackgroundRequestChildBase(aOpenRequest)
|
||||
, mFactory(aFactory)
|
||||
+ , mDatabaseActor(nullptr)
|
||||
, mRequestedVersion(aRequestedVersion)
|
||||
, mIsDeleteOp(aIsDeleteOp)
|
||||
{
|
||||
@@ -1779,6 +1780,15 @@ BackgroundFactoryRequestChild::GetOpenDBRequest() const
|
||||
return static_cast<IDBOpenDBRequest*>(mRequest.get());
|
||||
}
|
||||
|
||||
+void
|
||||
+BackgroundFactoryRequestChild::SetDatabaseActor(BackgroundDatabaseChild* aActor)
|
||||
+{
|
||||
+ AssertIsOnOwningThread();
|
||||
+ MOZ_ASSERT(!aActor || !mDatabaseActor);
|
||||
+
|
||||
+ mDatabaseActor = aActor;
|
||||
+}
|
||||
+
|
||||
bool
|
||||
BackgroundFactoryRequestChild::HandleResponse(nsresult aResponse)
|
||||
{
|
||||
@@ -1790,6 +1800,11 @@ BackgroundFactoryRequestChild::HandleResponse(nsresult aResponse)
|
||||
|
||||
DispatchErrorEvent(mRequest, aResponse);
|
||||
|
||||
+ if (mDatabaseActor) {
|
||||
+ mDatabaseActor->ReleaseDOMObject();
|
||||
+ MOZ_ASSERT(!mDatabaseActor);
|
||||
+ }
|
||||
+
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1808,6 +1823,7 @@ BackgroundFactoryRequestChild::HandleResponse(
|
||||
IDBDatabase* database = databaseActor->GetDOMObject();
|
||||
if (!database) {
|
||||
databaseActor->EnsureDOMObject();
|
||||
+ MOZ_ASSERT(mDatabaseActor);
|
||||
|
||||
database = databaseActor->GetDOMObject();
|
||||
MOZ_ASSERT(database);
|
||||
@@ -1815,6 +1831,8 @@ BackgroundFactoryRequestChild::HandleResponse(
|
||||
MOZ_ASSERT(!database->IsClosed());
|
||||
}
|
||||
|
||||
+ MOZ_ASSERT(mDatabaseActor == databaseActor);
|
||||
+
|
||||
if (database->IsClosed()) {
|
||||
// If the database was closed already, which is only possible if we fired an
|
||||
// "upgradeneeded" event, then we shouldn't fire a "success" event here.
|
||||
@@ -1827,6 +1845,7 @@ BackgroundFactoryRequestChild::HandleResponse(
|
||||
}
|
||||
|
||||
databaseActor->ReleaseDOMObject();
|
||||
+ MOZ_ASSERT(!mDatabaseActor);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -1847,6 +1866,8 @@ BackgroundFactoryRequestChild::HandleResponse(
|
||||
|
||||
DispatchSuccessEvent(&helper, successEvent);
|
||||
|
||||
+ MOZ_ASSERT(!mDatabaseActor);
|
||||
+
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -2095,6 +2116,8 @@ BackgroundDatabaseChild::EnsureDOMObject()
|
||||
|
||||
mDatabase = mTemporaryStrongDatabase;
|
||||
mSpec.forget();
|
||||
+
|
||||
+ mOpenRequestActor->SetDatabaseActor(this);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -2106,6 +2129,8 @@ BackgroundDatabaseChild::ReleaseDOMObject()
|
||||
MOZ_ASSERT(mOpenRequestActor);
|
||||
MOZ_ASSERT(mDatabase == mTemporaryStrongDatabase);
|
||||
|
||||
+ mOpenRequestActor->SetDatabaseActor(nullptr);
|
||||
+
|
||||
mOpenRequestActor = nullptr;
|
||||
|
||||
// This may be the final reference to the IDBDatabase object so we may end up
|
||||
diff --git dom/indexedDB/ActorsChild.h dom/indexedDB/ActorsChild.h
|
||||
index 866a405fb4e2..d82a188b8253 100644
|
||||
--- dom/indexedDB/ActorsChild.h
|
||||
+++ dom/indexedDB/ActorsChild.h
|
||||
@@ -253,6 +253,20 @@ class BackgroundFactoryRequestChild final
|
||||
friend class PermissionRequestParent;
|
||||
|
||||
RefPtr<IDBFactory> mFactory;
|
||||
+
|
||||
+ // Normally when opening of a database is successful, we receive a database
|
||||
+ // actor in request response, so we can use it to call ReleaseDOMObject()
|
||||
+ // which clears temporary strong reference to IDBDatabase.
|
||||
+ // However, when there's an error, we don't receive a database actor and
|
||||
+ // IDBRequest::mTransaction is already cleared (must be). So the only way how
|
||||
+ // to call ReleaseDOMObject() is to have a back-reference to database actor.
|
||||
+ // This creates a weak ref cycle between
|
||||
+ // BackgroundFactoryRequestChild (using mDatabaseActor member) and
|
||||
+ // BackgroundDatabaseChild actor (using mOpenRequestActor member).
|
||||
+ // mDatabaseActor is set in EnsureDOMObject() and cleared in
|
||||
+ // ReleaseDOMObject().
|
||||
+ BackgroundDatabaseChild* mDatabaseActor;
|
||||
+
|
||||
const uint64_t mRequestedVersion;
|
||||
const bool mIsDeleteOp;
|
||||
|
||||
@@ -270,6 +284,9 @@ private:
|
||||
// Only destroyed by BackgroundFactoryChild.
|
||||
~BackgroundFactoryRequestChild();
|
||||
|
||||
+ void
|
||||
+ SetDatabaseActor(BackgroundDatabaseChild* aActor);
|
||||
+
|
||||
bool
|
||||
HandleResponse(nsresult aResponse);
|
||||
|
117
www/waterfox/files/patch-bug1410457
Normal file
117
www/waterfox/files/patch-bug1410457
Normal file
|
@ -0,0 +1,117 @@
|
|||
commit 1b99cb80da51
|
||||
Author: Marco Bonardo <mbonardo@mozilla.com>
|
||||
Date: Fri Oct 20 17:14:17 2017 +0200
|
||||
|
||||
Bug 1410457 - Places.sqlite may be marked as corrupt if schema migration mixes up sync and async execution. r=Paolo, a=ritu
|
||||
|
||||
MozReview-Commit-ID: 7O18MLdHU08
|
||||
|
||||
--HG--
|
||||
extra : source : c7cab42203dfce68c8c4cd152055a22b4fdbc402
|
||||
extra : histedit_source : dbec7034f68805d1597e4577534de934be04af59
|
||||
---
|
||||
toolkit/components/places/Database.cpp | 45 +++++++++++++++++++++++++++++-----
|
||||
toolkit/components/places/Database.h | 3 +++
|
||||
2 files changed, 42 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git toolkit/components/places/Database.cpp toolkit/components/places/Database.cpp
|
||||
index 85e365ff3d9e..3ff9e0fa2078 100644
|
||||
--- toolkit/components/places/Database.cpp
|
||||
+++ toolkit/components/places/Database.cpp
|
||||
@@ -370,6 +370,7 @@ Database::Database()
|
||||
, mDBPageSize(0)
|
||||
, mDatabaseStatus(nsINavHistoryService::DATABASE_STATUS_OK)
|
||||
, mClosed(false)
|
||||
+ , mShouldConvertIconPayloads(false)
|
||||
, mClientsShutdown(new ClientsShutdownBlocker())
|
||||
, mConnectionShutdown(new ConnectionShutdownBlocker(this))
|
||||
, mMaxUrlLength(0)
|
||||
@@ -588,13 +589,31 @@ Database::EnsureConnection()
|
||||
bool databaseMigrated = false;
|
||||
rv = SetupDatabaseConnection(storage);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
- // Failing to initialize the schema always indicates a corruption.
|
||||
- if (NS_FAILED(InitSchema(&databaseMigrated))) {
|
||||
- rv = NS_ERROR_FILE_CORRUPTED;
|
||||
+ // Failing to initialize the schema may indicate a corruption.
|
||||
+ rv = InitSchema(&databaseMigrated);
|
||||
+ if (NS_FAILED(rv)) {
|
||||
+ if (rv == NS_ERROR_STORAGE_BUSY ||
|
||||
+ rv == NS_ERROR_FILE_IS_LOCKED ||
|
||||
+ rv == NS_ERROR_FILE_NO_DEVICE_SPACE ||
|
||||
+ rv == NS_ERROR_OUT_OF_MEMORY) {
|
||||
+ // The database is not corrupt, though some migration step failed.
|
||||
+ // This may be caused by concurrent use of sync and async Storage APIs
|
||||
+ // or by a system issue.
|
||||
+ // The best we can do is trying again. If it should still fail, Places
|
||||
+ // won't work properly and will be handled as LOCKED.
|
||||
+ rv = InitSchema(&databaseMigrated);
|
||||
+ if (NS_FAILED(rv)) {
|
||||
+ rv = NS_ERROR_FILE_IS_LOCKED;
|
||||
+ }
|
||||
+ } else {
|
||||
+ rv = NS_ERROR_FILE_CORRUPTED;
|
||||
+ }
|
||||
}
|
||||
}
|
||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||
- mDatabaseStatus = nsINavHistoryService::DATABASE_STATUS_CORRUPT;
|
||||
+ if (rv != NS_ERROR_FILE_IS_LOCKED) {
|
||||
+ mDatabaseStatus = nsINavHistoryService::DATABASE_STATUS_CORRUPT;
|
||||
+ }
|
||||
// Some errors may not indicate a database corruption, for those cases we
|
||||
// just bail out without throwing away a possibly valid places.sqlite.
|
||||
if (rv == NS_ERROR_FILE_CORRUPTED) {
|
||||
@@ -961,6 +980,14 @@ Database::InitSchema(bool* aDatabaseMigrated)
|
||||
return NS_ERROR_FILE_CORRUPTED;
|
||||
}
|
||||
|
||||
+ auto guard = MakeScopeExit([&]() {
|
||||
+ // This runs at the end of the migration, regardless of its success.
|
||||
+ if (mShouldConvertIconPayloads) {
|
||||
+ mShouldConvertIconPayloads = false;
|
||||
+ nsFaviconService::ConvertUnsupportedPayloads(mMainConn);
|
||||
+ }
|
||||
+ });
|
||||
+
|
||||
// Firefox 4 uses schema version 11.
|
||||
|
||||
// Firefox 8 uses schema version 12.
|
||||
@@ -1122,6 +1149,11 @@ Database::InitSchema(bool* aDatabaseMigrated)
|
||||
// Firefox 57 uses schema version 39.
|
||||
|
||||
// Schema Upgrades must add migration code here.
|
||||
+ // >>> IMPORTANT! <<<
|
||||
+ // NEVER MIX UP SYNC AND ASYNC EXECUTION IN MIGRATORS, YOU MAY LOCK THE
|
||||
+ // CONNECTION AND CAUSE FURTHER STEPS TO FAIL.
|
||||
+ // In case, set a bool and do the async work in the ScopeExit guard just
|
||||
+ // before the migration steps.
|
||||
|
||||
rv = UpdateBookmarkRootTitles();
|
||||
// We don't want a broken localization to cause us to think
|
||||
@@ -2304,8 +2336,9 @@ Database::MigrateV37Up() {
|
||||
));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
- // Start the async conversion
|
||||
- nsFaviconService::ConvertUnsupportedPayloads(mMainConn);
|
||||
+ // The async favicons conversion will happen at the end of the normal schema
|
||||
+ // migration.
|
||||
+ mShouldConvertIconPayloads = true;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
diff --git toolkit/components/places/Database.h toolkit/components/places/Database.h
|
||||
index 9000fb269dc2..6213678b3e47 100644
|
||||
--- toolkit/components/places/Database.h
|
||||
+++ toolkit/components/places/Database.h
|
||||
@@ -333,6 +333,9 @@ private:
|
||||
int32_t mDBPageSize;
|
||||
uint16_t mDatabaseStatus;
|
||||
bool mClosed;
|
||||
+ // Used to track whether icon payloads should be converted at the end of
|
||||
+ // schema migration.
|
||||
+ bool mShouldConvertIconPayloads;
|
||||
|
||||
/**
|
||||
* Phases for shutting down the Database.
|
145
www/waterfox/files/patch-bug1410634
Normal file
145
www/waterfox/files/patch-bug1410634
Normal file
|
@ -0,0 +1,145 @@
|
|||
commit a34cf3c8ad18
|
||||
Author: Ben Kelly <ben@wanderview.com>
|
||||
Date: Tue Oct 24 09:24:53 2017 -0400
|
||||
|
||||
Bug 1410634 - Part 1: Call channel IsFromCache() during OnStartRequest() to determine if update result came from http cache or network. r=tt, a=ritu
|
||||
|
||||
--HG--
|
||||
extra : source : 087e11c956e368c41e91bdc5d689d5e94f3ef7ef
|
||||
---
|
||||
dom/workers/ServiceWorkerScriptCache.cpp | 22 ++++++++++++----------
|
||||
1 file changed, 12 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git dom/workers/ServiceWorkerScriptCache.cpp dom/workers/ServiceWorkerScriptCache.cpp
|
||||
index a065a6fafbf8..f30bca95229c 100644
|
||||
--- dom/workers/ServiceWorkerScriptCache.cpp
|
||||
+++ dom/workers/ServiceWorkerScriptCache.cpp
|
||||
@@ -100,12 +100,13 @@ public:
|
||||
bool aIsMainScript)
|
||||
: mManager(aManager)
|
||||
, mRegistration(aRegistration)
|
||||
- , mIsMainScript(aIsMainScript)
|
||||
, mInternalHeaders(new InternalHeaders())
|
||||
, mLoadFlags(nsIChannel::LOAD_BYPASS_SERVICE_WORKER)
|
||||
, mState(WaitingForInitialization)
|
||||
, mNetworkResult(NS_OK)
|
||||
, mCacheResult(NS_OK)
|
||||
+ , mIsMainScript(aIsMainScript)
|
||||
+ , mIsFromCache(false)
|
||||
{
|
||||
MOZ_ASSERT(aManager);
|
||||
AssertIsOnMainThread();
|
||||
@@ -180,8 +181,6 @@ private:
|
||||
RefPtr<CompareCache> mCC;
|
||||
RefPtr<ServiceWorkerRegistrationInfo> mRegistration;
|
||||
|
||||
- bool mIsMainScript;
|
||||
-
|
||||
nsCOMPtr<nsIChannel> mChannel;
|
||||
nsString mBuffer;
|
||||
nsString mURL;
|
||||
@@ -202,6 +201,9 @@ private:
|
||||
|
||||
nsresult mNetworkResult;
|
||||
nsresult mCacheResult;
|
||||
+
|
||||
+ const bool mIsMainScript;
|
||||
+ bool mIsFromCache;
|
||||
};
|
||||
|
||||
NS_IMPL_ISUPPORTS(CompareNetwork, nsIStreamLoaderObserver,
|
||||
@@ -863,6 +865,12 @@ CompareNetwork::OnStartRequest(nsIRequest* aRequest, nsISupports* aContext)
|
||||
}
|
||||
|
||||
mInternalHeaders->FillResponseHeaders(mChannel);
|
||||
+
|
||||
+ nsCOMPtr<nsICacheInfoChannel> cacheChannel(do_QueryInterface(mChannel));
|
||||
+ if (cacheChannel) {
|
||||
+ cacheChannel->IsFromCache(&mIsFromCache);
|
||||
+ }
|
||||
+
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@@ -959,15 +967,9 @@ CompareNetwork::OnStreamComplete(nsIStreamLoader* aLoader, nsISupports* aContext
|
||||
NS_LITERAL_CSTRING("Service-Worker-Allowed"),
|
||||
mMaxScope);
|
||||
|
||||
- bool isFromCache = false;
|
||||
- nsCOMPtr<nsICacheInfoChannel> cacheChannel(do_QueryInterface(httpChannel));
|
||||
- if (cacheChannel) {
|
||||
- cacheChannel->IsFromCache(&isFromCache);
|
||||
- }
|
||||
-
|
||||
// [9.2 Update]4.13, If response's cache state is not "local",
|
||||
// set registration's last update check time to the current time
|
||||
- if (!isFromCache) {
|
||||
+ if (!mIsFromCache) {
|
||||
mRegistration->RefreshLastUpdateCheckTime();
|
||||
}
|
||||
|
||||
|
||||
commit 5aebe3f6b13b
|
||||
Author: Ben Kelly <ben@wanderview.com>
|
||||
Date: Tue Oct 24 09:24:53 2017 -0400
|
||||
|
||||
Bug 1410634 - Part 2: Verify ServiceWorkerInfo.lastUpdateTime is not changed when reading from http cache. r=tt, a=ritu
|
||||
|
||||
--HG--
|
||||
extra : source : 1abb70007b4c50a588b6a344879fd9efc3ef9ca5
|
||||
---
|
||||
.../test/serviceworkers/serviceworkerinfo_iframe.html | 3 ++-
|
||||
.../test_devtools_track_serviceworker_time.html | 12 ++++++++++++
|
||||
2 files changed, 14 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git dom/workers/test/serviceworkers/serviceworkerinfo_iframe.html dom/workers/test/serviceworkers/serviceworkerinfo_iframe.html
|
||||
index a0a2de76030e..16a175836981 100644
|
||||
--- dom/workers/test/serviceworkers/serviceworkerinfo_iframe.html
|
||||
+++ dom/workers/test/serviceworkers/serviceworkerinfo_iframe.html
|
||||
@@ -7,7 +7,8 @@
|
||||
if (event.data !== "register") {
|
||||
return;
|
||||
}
|
||||
- var promise = navigator.serviceWorker.register("worker.js");
|
||||
+ var promise = navigator.serviceWorker.register("worker.js",
|
||||
+ { updateViaCache: 'all' });
|
||||
window.onmessage = function (event) {
|
||||
if (event.data !== "unregister") {
|
||||
return;
|
||||
diff --git dom/workers/test/serviceworkers/test_devtools_track_serviceworker_time.html dom/workers/test/serviceworkers/test_devtools_track_serviceworker_time.html
|
||||
index 4b58d659f565..6b95d6b34fe1 100644
|
||||
--- dom/workers/test/serviceworkers/test_devtools_track_serviceworker_time.html
|
||||
+++ dom/workers/test/serviceworkers/test_devtools_track_serviceworker_time.html
|
||||
@@ -53,6 +53,8 @@ let expectedResults = [
|
||||
state: State.ACTIVATED, installedTimeRecorded: true,
|
||||
activatedTimeRecorded: true, redundantTimeRecorded: false
|
||||
},
|
||||
+
|
||||
+ // On unregister
|
||||
{
|
||||
state: State.REDUNDANT, installedTimeRecorded: true,
|
||||
activatedTimeRecorded: true, redundantTimeRecorded: true
|
||||
@@ -170,6 +172,15 @@ function testServiceWorkerInfo() {
|
||||
return promise;
|
||||
}
|
||||
|
||||
+async function testHttpCacheUpdateTime() {
|
||||
+ let iframe = document.querySelector("iframe");
|
||||
+ let reg = await iframe.contentWindow.navigator.serviceWorker.getRegistration();
|
||||
+ let lastUpdateTime = registrationInfo.lastUpdateTime;
|
||||
+ await reg.update();
|
||||
+ is(lastUpdateTime, registrationInfo.lastUpdateTime,
|
||||
+ "The update time should not change when SW script is read from http cache.");
|
||||
+}
|
||||
+
|
||||
function unregister() {
|
||||
info("Unregister the ServiceWorker");
|
||||
|
||||
@@ -196,6 +207,7 @@ function runTest() {
|
||||
return Promise.resolve()
|
||||
.then(register)
|
||||
.then(testServiceWorkerInfo)
|
||||
+ .then(testHttpCacheUpdateTime)
|
||||
.then(unregister)
|
||||
.catch(aError => ok(false, "Some test failed with error " + aError))
|
||||
.then(cleanAll)
|
27
www/waterfox/files/patch-bug1410808
Normal file
27
www/waterfox/files/patch-bug1410808
Normal file
|
@ -0,0 +1,27 @@
|
|||
commit 17ccad87f85c
|
||||
Author: Emilio Cobos Álvarez <emilio@crisal.io>
|
||||
Date: Mon Oct 23 17:17:13 2017 +0200
|
||||
|
||||
Bug 1410808. r=xidorn, a=ritu
|
||||
|
||||
MozReview-Commit-ID: 5uufVVEIw20
|
||||
|
||||
--HG--
|
||||
extra : source : d44c182148c233556f38d1c6dc61ab6098f44e85
|
||||
---
|
||||
layout/style/ServoKeyframeRule.cpp | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git layout/style/ServoKeyframeRule.cpp layout/style/ServoKeyframeRule.cpp
|
||||
index 4fe9f6440211..1be82c3100c5 100644
|
||||
--- layout/style/ServoKeyframeRule.cpp
|
||||
+++ layout/style/ServoKeyframeRule.cpp
|
||||
@@ -31,7 +31,7 @@ public:
|
||||
|
||||
NS_IMETHOD GetParentRule(nsIDOMCSSRule** aParent) final
|
||||
{
|
||||
- *aParent = mRule;
|
||||
+ NS_IF_ADDREF(*aParent = mRule);
|
||||
return NS_OK;
|
||||
}
|
||||
|
100
www/waterfox/files/patch-bug1412011
Normal file
100
www/waterfox/files/patch-bug1412011
Normal file
|
@ -0,0 +1,100 @@
|
|||
commit 4112ea0d8cb1
|
||||
Author: Emilio Cobos Álvarez <emilio@crisal.io>
|
||||
Date: Mon Oct 30 11:02:16 2017 -0400
|
||||
|
||||
Bug 1412011 - selectors: Be consistent about how we get a parent element for selector matching. r=xidorn, a=ritu
|
||||
|
||||
Source-Repo: https://github.com/servo/servo
|
||||
Source-Revision: de7595f16fa41c32ca5654aef53c60ad19bb108a
|
||||
|
||||
--HG--
|
||||
extra : rebase_source : fc932c8d05ec1861ee16d7a89bfe1da1228d1c08
|
||||
---
|
||||
servo/components/selectors/matching.rs | 49 +++++++++++++++++++++++-----------
|
||||
1 file changed, 33 insertions(+), 16 deletions(-)
|
||||
|
||||
diff --git servo/components/selectors/matching.rs servo/components/selectors/matching.rs
|
||||
index c6c2db3c4719..30586b27f457 100644
|
||||
--- servo/components/selectors/matching.rs
|
||||
+++ servo/components/selectors/matching.rs
|
||||
@@ -515,6 +515,32 @@ pub fn matches_complex_selector<E, F>(mut iter: SelectorIter<E::Impl>,
|
||||
}
|
||||
}
|
||||
|
||||
+#[inline(always)]
|
||||
+fn next_element_for_combinator<E>(
|
||||
+ element: &E,
|
||||
+ combinator: Combinator,
|
||||
+) -> Option<E>
|
||||
+where
|
||||
+ E: Element,
|
||||
+{
|
||||
+ match combinator {
|
||||
+ Combinator::NextSibling |
|
||||
+ Combinator::LaterSibling => {
|
||||
+ element.prev_sibling_element()
|
||||
+ }
|
||||
+ Combinator::Child |
|
||||
+ Combinator::Descendant => {
|
||||
+ if element.blocks_ancestor_combinators() {
|
||||
+ return None;
|
||||
+ }
|
||||
+ element.parent_element()
|
||||
+ }
|
||||
+ Combinator::PseudoElement => {
|
||||
+ element.pseudo_element_originating_element()
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
fn matches_complex_selector_internal<E, F>(mut selector_iter: SelectorIter<E::Impl>,
|
||||
element: &E,
|
||||
context: &mut LocalMatchingContext<E::Impl>,
|
||||
@@ -546,28 +572,23 @@ fn matches_complex_selector_internal<E, F>(mut selector_iter: SelectorIter<E::Im
|
||||
match combinator {
|
||||
None => SelectorMatchingResult::Matched,
|
||||
Some(c) => {
|
||||
- let (mut next_element, candidate_not_found) = match c {
|
||||
+ let candidate_not_found= match c {
|
||||
Combinator::NextSibling | Combinator::LaterSibling => {
|
||||
// Only ancestor combinators are allowed while looking for
|
||||
// relevant links, so switch to not looking.
|
||||
*relevant_link = RelevantLinkStatus::NotLooking;
|
||||
- (element.prev_sibling_element(),
|
||||
- SelectorMatchingResult::NotMatchedAndRestartFromClosestDescendant)
|
||||
+ SelectorMatchingResult::NotMatchedAndRestartFromClosestDescendant
|
||||
}
|
||||
Combinator::Child | Combinator::Descendant => {
|
||||
- if element.blocks_ancestor_combinators() {
|
||||
- (None, SelectorMatchingResult::NotMatchedGlobally)
|
||||
- } else {
|
||||
- (element.parent_element(),
|
||||
- SelectorMatchingResult::NotMatchedGlobally)
|
||||
- }
|
||||
+ SelectorMatchingResult::NotMatchedGlobally
|
||||
}
|
||||
Combinator::PseudoElement => {
|
||||
- (element.pseudo_element_originating_element(),
|
||||
- SelectorMatchingResult::NotMatchedGlobally)
|
||||
+ SelectorMatchingResult::NotMatchedGlobally
|
||||
}
|
||||
};
|
||||
|
||||
+ let mut next_element = next_element_for_combinator(element, c);
|
||||
+
|
||||
loop {
|
||||
let element = match next_element {
|
||||
None => return candidate_not_found,
|
||||
@@ -607,11 +628,7 @@ fn matches_complex_selector_internal<E, F>(mut selector_iter: SelectorIter<E::Im
|
||||
// can continue to matching on the next candidate element.
|
||||
_ => {},
|
||||
}
|
||||
- next_element = if siblings {
|
||||
- element.prev_sibling_element()
|
||||
- } else {
|
||||
- element.parent_element()
|
||||
- };
|
||||
+ next_element = next_element_for_combinator(&element, c);
|
||||
}
|
||||
}
|
||||
}
|
87
www/waterfox/files/patch-bug1412741
Normal file
87
www/waterfox/files/patch-bug1412741
Normal file
|
@ -0,0 +1,87 @@
|
|||
commit 9bfa45f5e083
|
||||
Author: Boris Zbarsky <bzbarsky@mit.edu>
|
||||
Date: Thu Nov 2 13:02:55 2017 -0400
|
||||
|
||||
Bug 1412741 - Back out the fix for bug 1381408, because that change doesn't look like it's web-compatible. r=peterv, a=ritu
|
||||
|
||||
MozReview-Commit-ID: LSYYAt0bAkT
|
||||
|
||||
--HG--
|
||||
extra : source : 1fdce3a0396c599ad52749e1650beeb8f455d891
|
||||
---
|
||||
js/xpconnect/tests/mochitest/test_bug862380.html | 23 +++++-----------------
|
||||
js/xpconnect/wrappers/FilteringWrapper.cpp | 5 +++--
|
||||
.../cross-origin-objects.html.ini | 10 ++++++++++
|
||||
3 files changed, 18 insertions(+), 20 deletions(-)
|
||||
|
||||
diff --git js/xpconnect/tests/mochitest/test_bug862380.html js/xpconnect/tests/mochitest/test_bug862380.html
|
||||
index 0f1611776320..0d3fb7329358 100644
|
||||
--- js/xpconnect/tests/mochitest/test_bug862380.html
|
||||
+++ js/xpconnect/tests/mochitest/test_bug862380.html
|
||||
@@ -13,29 +13,16 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=862380
|
||||
/** Test for Bug 862380 **/
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
function go() {
|
||||
- checkNotEnumerable($('ifr').contentWindow, true);
|
||||
- checkNotEnumerable($('ifr').contentWindow.location, false);
|
||||
+ checkNotEnumerable($('ifr').contentWindow);
|
||||
+ checkNotEnumerable($('ifr').contentWindow.location);
|
||||
SimpleTest.finish();
|
||||
}
|
||||
|
||||
-function checkNotEnumerable(obj, isWindow) {
|
||||
+ function checkNotEnumerable(obj) {
|
||||
try {
|
||||
- const expectedWindow = ["0", "window", "location", "top", "close",
|
||||
- "focus", "blur", "postMessage", "self", "closed",
|
||||
- "frames", "length", "opener", "parent"];
|
||||
- const expectedLocation = ["replace", "href"];
|
||||
- const expected = isWindow ? expectedWindow : expectedLocation;
|
||||
- is(Object.keys(obj).length, expected.length,
|
||||
- "Object.keys gives right array length");
|
||||
- var actual = [];
|
||||
+ is(Object.keys(obj).length, 0, "Object.keys gives empty array");
|
||||
for (var i in obj)
|
||||
- actual.push(i);
|
||||
- is(actual.length, expected.length,
|
||||
- "Enumeration sees the right number of props");
|
||||
- actual.sort();
|
||||
- expected.sort();
|
||||
- for (var i = 0; i < actual.length; ++i)
|
||||
- is(actual[i], expected[i], "Arrays should be the same " + i);
|
||||
+ ok(false, "Enumerated something: " + i);
|
||||
} catch (e) {
|
||||
ok(false, "threw: " + e);
|
||||
}
|
||||
diff --git js/xpconnect/wrappers/FilteringWrapper.cpp js/xpconnect/wrappers/FilteringWrapper.cpp
|
||||
index c35c3e896afc..1e986c734cde 100644
|
||||
--- js/xpconnect/wrappers/FilteringWrapper.cpp
|
||||
+++ js/xpconnect/wrappers/FilteringWrapper.cpp
|
||||
@@ -223,8 +223,9 @@ CrossOriginXrayWrapper::getPropertyDescriptor(JSContext* cx,
|
||||
// All properties on cross-origin DOM objects are |own|.
|
||||
desc.object().set(wrapper);
|
||||
|
||||
- // All properties on cross-origin DOM objects are "configurable". Any
|
||||
- // value attributes are read-only.
|
||||
+ // All properties on cross-origin DOM objects are non-enumerable and
|
||||
+ // "configurable". Any value attributes are read-only.
|
||||
+ desc.attributesRef() &= ~JSPROP_ENUMERATE;
|
||||
desc.attributesRef() &= ~JSPROP_PERMANENT;
|
||||
if (!desc.getter() && !desc.setter())
|
||||
desc.attributesRef() |= JSPROP_READONLY;
|
||||
diff --git testing/web-platform/meta/html/browsers/origin/cross-origin-objects/cross-origin-objects.html.ini testing/web-platform/meta/html/browsers/origin/cross-origin-objects/cross-origin-objects.html.ini
|
||||
new file mode 100644
|
||||
index 000000000000..6c5e683863e9
|
||||
--- /dev/null
|
||||
+++ testing/web-platform/meta/html/browsers/origin/cross-origin-objects/cross-origin-objects.html.ini
|
||||
@@ -0,0 +1,10 @@
|
||||
+[cross-origin-objects.html]
|
||||
+ type: testharness
|
||||
+ [[[GetOwnProperty\]\] - Property descriptors for cross-origin properties should be set up correctly]
|
||||
+ expected: FAIL
|
||||
+
|
||||
+ [Can only enumerate safelisted properties]
|
||||
+ expected: FAIL
|
||||
+
|
||||
+ [[[OwnPropertyKeys\]\] should return all properties from cross-origin objects]
|
||||
+ expected: FAIL
|
171
www/waterfox/files/patch-bug1414292
Normal file
171
www/waterfox/files/patch-bug1414292
Normal file
|
@ -0,0 +1,171 @@
|
|||
commit e66612be968f
|
||||
Author: Boris Zbarsky <bzbarsky@mit.edu>
|
||||
Date: Tue Nov 7 15:36:16 2017 -0500
|
||||
|
||||
Bug 1414292. Update to HTML spec changes for cross-origin object property enumerability. r=peterv
|
||||
|
||||
Updates to https://github.com/whatwg/html/pull/3186
|
||||
|
||||
Includes the changes from https://github.com/w3c/web-platform-tests/pull/8045
|
||||
|
||||
MozReview-Commit-ID: 5vEo1QGPufE
|
||||
---
|
||||
js/xpconnect/wrappers/FilteringWrapper.cpp | 9 ++++---
|
||||
.../cross-origin-objects.html.ini | 10 -------
|
||||
.../cross-origin-objects/cross-origin-objects.html | 31 +++++++++++-----------
|
||||
3 files changed, 22 insertions(+), 28 deletions(-)
|
||||
|
||||
diff --git js/xpconnect/wrappers/FilteringWrapper.cpp js/xpconnect/wrappers/FilteringWrapper.cpp
|
||||
index 1e986c734cde..4c9db40cdd5d 100644
|
||||
--- js/xpconnect/wrappers/FilteringWrapper.cpp
|
||||
+++ js/xpconnect/wrappers/FilteringWrapper.cpp
|
||||
@@ -223,9 +223,12 @@ CrossOriginXrayWrapper::getPropertyDescriptor(JSContext* cx,
|
||||
// All properties on cross-origin DOM objects are |own|.
|
||||
desc.object().set(wrapper);
|
||||
|
||||
- // All properties on cross-origin DOM objects are non-enumerable and
|
||||
- // "configurable". Any value attributes are read-only.
|
||||
- desc.attributesRef() &= ~JSPROP_ENUMERATE;
|
||||
+ // All properties on cross-origin DOM objects are "configurable". Any
|
||||
+ // value attributes are read-only. Indexed properties are enumerable,
|
||||
+ // but nothing else is.
|
||||
+ if (!JSID_IS_INT(id)) {
|
||||
+ desc.attributesRef() &= ~JSPROP_ENUMERATE;
|
||||
+ }
|
||||
desc.attributesRef() &= ~JSPROP_PERMANENT;
|
||||
if (!desc.getter() && !desc.setter())
|
||||
desc.attributesRef() |= JSPROP_READONLY;
|
||||
diff --git testing/web-platform/meta/html/browsers/origin/cross-origin-objects/cross-origin-objects.html.ini testing/web-platform/meta/html/browsers/origin/cross-origin-objects/cross-origin-objects.html.ini
|
||||
deleted file mode 100644
|
||||
index 6c5e683863e9..000000000000
|
||||
--- testing/web-platform/meta/html/browsers/origin/cross-origin-objects/cross-origin-objects.html.ini
|
||||
+++ /dev/null
|
||||
@@ -1,10 +0,0 @@
|
||||
-[cross-origin-objects.html]
|
||||
- type: testharness
|
||||
- [[[GetOwnProperty\]\] - Property descriptors for cross-origin properties should be set up correctly]
|
||||
- expected: FAIL
|
||||
-
|
||||
- [Can only enumerate safelisted properties]
|
||||
- expected: FAIL
|
||||
-
|
||||
- [[[OwnPropertyKeys\]\] should return all properties from cross-origin objects]
|
||||
- expected: FAIL
|
||||
diff --git testing/web-platform/tests/html/browsers/origin/cross-origin-objects/cross-origin-objects.html testing/web-platform/tests/html/browsers/origin/cross-origin-objects/cross-origin-objects.html
|
||||
index 06d96b11372d..f79f7ce4ae51 100644
|
||||
--- testing/web-platform/tests/html/browsers/origin/cross-origin-objects/cross-origin-objects.html
|
||||
+++ testing/web-platform/tests/html/browsers/origin/cross-origin-objects/cross-origin-objects.html
|
||||
@@ -184,17 +184,20 @@ addTest(function() {
|
||||
}, "[[GetOwnProperty]] - Properties on cross-origin objects should be reported |own|");
|
||||
|
||||
function checkPropertyDescriptor(desc, propName, expectWritable) {
|
||||
- var isSymbol = (typeof(propName) == "symbol");
|
||||
+ const isSymbol = typeof(propName) === "symbol";
|
||||
+ const isArrayIndexPropertyName = !isSymbol && !isNaN(parseInt(propName, 10));
|
||||
propName = String(propName);
|
||||
assert_true(isObject(desc), "property descriptor for " + propName + " should exist");
|
||||
assert_equals(desc.configurable, true, "property descriptor for " + propName + " should be configurable");
|
||||
- if (isSymbol) {
|
||||
- assert_equals(desc.enumerable, false, "symbol-property descriptor for " + propName + " should not be enumerable");
|
||||
- assert_true("value" in desc,
|
||||
- "property descriptor for " + propName + " should be a value descriptor");
|
||||
- assert_equals(desc.value, undefined,
|
||||
+ if (!isArrayIndexPropertyName) {
|
||||
+ assert_equals(desc.enumerable, false, "property descriptor for " + propName + " should not be enumerable");
|
||||
+ if(isSymbol) {
|
||||
+ assert_true("value" in desc,
|
||||
+ "property descriptor for " + propName + " should be a value descriptor");
|
||||
+ assert_equals(desc.value, undefined,
|
||||
"symbol-named cross-origin visible prop " + propName +
|
||||
" should come back as undefined");
|
||||
+ }
|
||||
} else {
|
||||
assert_equals(desc.enumerable, true, "property descriptor for " + propName + " should be enumerable");
|
||||
}
|
||||
@@ -265,16 +268,15 @@ addTest(function() {
|
||||
let i = 0;
|
||||
for (var prop in C) {
|
||||
i++;
|
||||
- assert_true(whitelistedWindowPropNames.includes(prop), prop + " is not safelisted for a cross-origin Window");
|
||||
+ assert_true(whitelistedWindowIndices.includes(prop), prop + " is not safelisted for a cross-origin Window");
|
||||
}
|
||||
- assert_equals(i, whitelistedWindowPropNames.length, "Enumerate all safelisted cross-origin Window properties");
|
||||
+ assert_equals(i, whitelistedWindowIndices.length, "Enumerate all enumerable safelisted cross-origin Window properties");
|
||||
i = 0;
|
||||
for (var prop in C.location) {
|
||||
i++;
|
||||
- assert_true(whitelistedLocationPropNames.includes(prop), prop + " is not safelisted for a cross-origin Location");
|
||||
}
|
||||
- assert_equals(i, whitelistedLocationPropNames.length, "Enumerate all safelisted cross-origin Location properties");
|
||||
-}, "Can only enumerate safelisted properties");
|
||||
+ assert_equals(i, 0, "There's nothing to enumerate for cross-origin Location properties");
|
||||
+}, "Can only enumerate safelisted enumerable properties");
|
||||
|
||||
/*
|
||||
* [[OwnPropertyKeys]]
|
||||
@@ -285,14 +287,13 @@ addTest(function() {
|
||||
whitelistedWindowPropNames,
|
||||
"Object.getOwnPropertyNames() gives the right answer for cross-origin Window");
|
||||
assert_array_equals(Object.keys(C).sort(),
|
||||
- whitelistedWindowPropNames,
|
||||
+ whitelistedWindowIndices,
|
||||
"Object.keys() gives the right answer for cross-origin Window");
|
||||
assert_array_equals(Object.getOwnPropertyNames(C.location).sort(),
|
||||
whitelistedLocationPropNames,
|
||||
"Object.getOwnPropertyNames() gives the right answer for cross-origin Location");
|
||||
- assert_array_equals(Object.keys(C.location).sort(),
|
||||
- whitelistedLocationPropNames,
|
||||
- "Object.keys() gives the right answer for cross-origin Location");
|
||||
+ assert_equals(Object.keys(C.location).length, 0,
|
||||
+ "Object.keys() gives the right answer for cross-origin Location");
|
||||
}, "[[OwnPropertyKeys]] should return all properties from cross-origin objects");
|
||||
|
||||
addTest(function() {
|
||||
commit 25f3d350f097
|
||||
Author: Boris Zbarsky <bzbarsky@mit.edu>
|
||||
Date: Tue Nov 7 16:55:29 2017 -0500
|
||||
|
||||
Bug 1414292 followup. Indexed properties are enumerable on Window per spec, and thus we fix the CLOSED TREE.
|
||||
|
||||
MozReview-Commit-ID: 6Q76VqwSiEx
|
||||
---
|
||||
js/xpconnect/tests/mochitest/test_bug862380.html | 21 ++++++++++++++++-----
|
||||
1 file changed, 16 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git js/xpconnect/tests/mochitest/test_bug862380.html js/xpconnect/tests/mochitest/test_bug862380.html
|
||||
index 0d3fb7329358..eb7cd99c3080 100644
|
||||
--- js/xpconnect/tests/mochitest/test_bug862380.html
|
||||
+++ js/xpconnect/tests/mochitest/test_bug862380.html
|
||||
@@ -13,16 +13,27 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=862380
|
||||
/** Test for Bug 862380 **/
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
function go() {
|
||||
- checkNotEnumerable($('ifr').contentWindow);
|
||||
- checkNotEnumerable($('ifr').contentWindow.location);
|
||||
+ checkNotEnumerable($('ifr').contentWindow, true);
|
||||
+ checkNotEnumerable($('ifr').contentWindow.location, false);
|
||||
SimpleTest.finish();
|
||||
}
|
||||
|
||||
- function checkNotEnumerable(obj) {
|
||||
+function checkNotEnumerable(obj, isWindow) {
|
||||
try {
|
||||
- is(Object.keys(obj).length, 0, "Object.keys gives empty array");
|
||||
+ const expectedWindow = ["0"];
|
||||
+ const expectedLocation = [];
|
||||
+ const expected = isWindow ? expectedWindow : expectedLocation;
|
||||
+ is(Object.keys(obj).length, expected.length,
|
||||
+ "Object.keys gives right array length");
|
||||
+ var actual = [];
|
||||
for (var i in obj)
|
||||
- ok(false, "Enumerated something: " + i);
|
||||
+ actual.push(i);
|
||||
+ is(actual.length, expected.length,
|
||||
+ "Enumeration sees the right number of props");
|
||||
+ actual.sort();
|
||||
+ expected.sort();
|
||||
+ for (var i = 0; i < actual.length; ++i)
|
||||
+ is(actual[i], expected[i], "Arrays should be the same " + i);
|
||||
} catch (e) {
|
||||
ok(false, "threw: " + e);
|
||||
}
|
36
www/waterfox/files/patch-bug1418152
Normal file
36
www/waterfox/files/patch-bug1418152
Normal file
|
@ -0,0 +1,36 @@
|
|||
commit d7441ef15616
|
||||
Author: Cameron McCormack <cam@mcc.id.au>
|
||||
Date: Sat Nov 18 00:47:57 2017 -0600
|
||||
|
||||
Bug 1418152 - servo: Merge #19263 - selectors: Allow white space in the brackets of an attribute selector (from heycam:attr-ws); r=SimonSapin a=sylvestre
|
||||
|
||||
Source-Repo: https://github.com/servo/servo
|
||||
Source-Revision: 7b886b4479763018ecad62aa6db96049732ca9ed
|
||||
|
||||
--HG--
|
||||
extra : amend_source : 67e691f8caf4bc07a9ea0e33bd31286ae123f5ff
|
||||
extra : transplant_source : %C6%FF%3A%13I%5E%B7%14%3C%F2%F7%CE%80%DB%08%16bh%60s
|
||||
---
|
||||
servo/components/selectors/parser.rs | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git servo/components/selectors/parser.rs servo/components/selectors/parser.rs
|
||||
index b020a04fd032..b7c421998530 100644
|
||||
--- servo/components/selectors/parser.rs
|
||||
+++ servo/components/selectors/parser.rs
|
||||
@@ -1306,6 +1306,15 @@ fn parse_attribute_selector<'i, 't, P, E, Impl>(parser: &P, input: &mut CssParse
|
||||
{
|
||||
let namespace;
|
||||
let local_name;
|
||||
+
|
||||
+ loop {
|
||||
+ let position = input.position();
|
||||
+ if !matches!(input.next_including_whitespace(), Ok(&Token::WhiteSpace(_))) {
|
||||
+ input.reset(position);
|
||||
+ break
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
match parse_qualified_name(parser, input, /* in_attr_selector = */ true)? {
|
||||
None => return Err(ParseError::Custom(SelectorParseError::NoQualifiedNameInAttributeSelector)),
|
||||
Some((_, None)) => unreachable!(),
|
29
www/waterfox/files/patch-bug1434580
Normal file
29
www/waterfox/files/patch-bug1434580
Normal file
|
@ -0,0 +1,29 @@
|
|||
commit dd8c13a8442d
|
||||
Author: Olli Pettay <Olli.Pettay@helsinki.fi>
|
||||
Date: Fri Feb 2 13:25:26 2018 +0200
|
||||
|
||||
Bug 1434580 - Ensure proper mouseover handling. r=masayuki, a=abillings
|
||||
|
||||
--HG--
|
||||
extra : source : bfd4bdfd40b43d0491c66af5b599659427e4e795
|
||||
---
|
||||
dom/events/EventStateManager.cpp | 5 +++--
|
||||
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git dom/events/EventStateManager.cpp dom/events/EventStateManager.cpp
|
||||
index 66b686dcf302..52f9f2313828 100644
|
||||
--- dom/events/EventStateManager.cpp
|
||||
+++ dom/events/EventStateManager.cpp
|
||||
@@ -4326,9 +4326,10 @@ EventStateManager::NotifyMouseOver(WidgetMouseEvent* aMouseEvent,
|
||||
// content associated with our subdocument.
|
||||
EnsureDocument(mPresContext);
|
||||
if (nsIDocument *parentDoc = mDocument->GetParentDocument()) {
|
||||
- if (nsIContent *docContent = parentDoc->FindContentForSubDocument(mDocument)) {
|
||||
+ if (nsCOMPtr<nsIContent> docContent =
|
||||
+ parentDoc->FindContentForSubDocument(mDocument)) {
|
||||
if (nsIPresShell *parentShell = parentDoc->GetShell()) {
|
||||
- EventStateManager* parentESM =
|
||||
+ RefPtr<EventStateManager> parentESM =
|
||||
parentShell->GetPresContext()->EventStateManager();
|
||||
parentESM->NotifyMouseOver(aMouseEvent, docContent);
|
||||
}
|
1234
www/waterfox/files/patch-bug895096
Normal file
1234
www/waterfox/files/patch-bug895096
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue