mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-17 15:25:52 +00:00
Merge mozilla-central to autoland r=merge a=merge on a CLOSED TREE
This commit is contained in:
commit
68f2d0d8de
@ -1213,6 +1213,25 @@ var gBrowserInit = {
|
|||||||
initBrowser.removeAttribute("blank");
|
initBrowser.removeAttribute("blank");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Set a sane starting width/height for all resolutions on new profiles.
|
||||||
|
if (Services.prefs.getBoolPref("privacy.resistFingerprinting")) {
|
||||||
|
// When the fingerprinting resistance is enabled, making sure that we don't
|
||||||
|
// have a maximum window to interfere with generating rounded window dimensions.
|
||||||
|
document.documentElement.setAttribute("sizemode", "normal");
|
||||||
|
} else if (!document.documentElement.hasAttribute("width")) {
|
||||||
|
const TARGET_WIDTH = 1280;
|
||||||
|
const TARGET_HEIGHT = 1040;
|
||||||
|
let width = Math.min(screen.availWidth * .9, TARGET_WIDTH);
|
||||||
|
let height = Math.min(screen.availHeight * .9, TARGET_HEIGHT);
|
||||||
|
|
||||||
|
document.documentElement.setAttribute("width", width);
|
||||||
|
document.documentElement.setAttribute("height", height);
|
||||||
|
|
||||||
|
if (width < TARGET_WIDTH && height < TARGET_HEIGHT) {
|
||||||
|
document.documentElement.setAttribute("sizemode", "maximized");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
gBrowser.updateBrowserRemoteness(initBrowser, isRemote, {
|
gBrowser.updateBrowserRemoteness(initBrowser, isRemote, {
|
||||||
remoteType, sameProcessAsFrameLoader
|
remoteType, sameProcessAsFrameLoader
|
||||||
});
|
});
|
||||||
@ -1275,27 +1294,6 @@ var gBrowserInit = {
|
|||||||
gDragSpaceObserver.init();
|
gDragSpaceObserver.init();
|
||||||
}
|
}
|
||||||
|
|
||||||
let isResistFingerprintingEnabled = Services.prefs.getBoolPref("privacy.resistFingerprinting");
|
|
||||||
|
|
||||||
// Set a sane starting width/height for all resolutions on new profiles.
|
|
||||||
if (isResistFingerprintingEnabled) {
|
|
||||||
// When the fingerprinting resistance is enabled, making sure that we don't
|
|
||||||
// have a maximum window to interfere with generating rounded window dimensions.
|
|
||||||
document.documentElement.setAttribute("sizemode", "normal");
|
|
||||||
} else if (!document.documentElement.hasAttribute("width")) {
|
|
||||||
const TARGET_WIDTH = 1280;
|
|
||||||
const TARGET_HEIGHT = 1040;
|
|
||||||
let width = Math.min(screen.availWidth * .9, TARGET_WIDTH);
|
|
||||||
let height = Math.min(screen.availHeight * .9, TARGET_HEIGHT);
|
|
||||||
|
|
||||||
document.documentElement.setAttribute("width", width);
|
|
||||||
document.documentElement.setAttribute("height", height);
|
|
||||||
|
|
||||||
if (width < TARGET_WIDTH && height < TARGET_HEIGHT) {
|
|
||||||
document.documentElement.setAttribute("sizemode", "maximized");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!window.toolbar.visible) {
|
if (!window.toolbar.visible) {
|
||||||
// adjust browser UI for popups
|
// adjust browser UI for popups
|
||||||
gURLBar.setAttribute("readonly", "true");
|
gURLBar.setAttribute("readonly", "true");
|
||||||
|
@ -28,6 +28,7 @@ skip-if = !e10s
|
|||||||
[browser_urlbar_keyed_search_reflows.js]
|
[browser_urlbar_keyed_search_reflows.js]
|
||||||
skip-if = (os == 'linux') || (os == 'win' && debug) # Disabled on Linux and Windows debug due to perma failures. Bug 1392320.
|
skip-if = (os == 'linux') || (os == 'win' && debug) # Disabled on Linux and Windows debug due to perma failures. Bug 1392320.
|
||||||
[browser_urlbar_search_reflows.js]
|
[browser_urlbar_search_reflows.js]
|
||||||
|
skip-if = debug && (os == 'linux' || os == 'win') # Disabled on Linux and Windows debug due to intermittent timeouts. Bug 1414126.
|
||||||
[browser_windowclose_reflows.js]
|
[browser_windowclose_reflows.js]
|
||||||
[browser_windowopen_flicker.js]
|
[browser_windowopen_flicker.js]
|
||||||
skip-if = (debug && os == 'win') # Disabled on windows debug for intermittent leaks
|
skip-if = (debug && os == 'win') # Disabled on windows debug for intermittent leaks
|
||||||
|
@ -48,13 +48,6 @@ add_task(async function() {
|
|||||||
inRange(r.x1, width * .75, width * .9)
|
inRange(r.x1, width * .75, width * .9)
|
||||||
},
|
},
|
||||||
|
|
||||||
{name: "bug 1394914 - sidebar toolbar icon should be visible at first paint",
|
|
||||||
condition: r => r.h == 13 && inRange(r.w, 14, 16) && // icon size
|
|
||||||
inRange(r.y1, 40, 80) && // in the toolbar
|
|
||||||
// near the right end of screen
|
|
||||||
inRange(r.x1, width - 100, width - 50)
|
|
||||||
},
|
|
||||||
|
|
||||||
{name: "bug 1403648 - urlbar should be focused at first paint",
|
{name: "bug 1403648 - urlbar should be focused at first paint",
|
||||||
condition: r => inRange(r.y2, 60, 80) && // in the toolbar
|
condition: r => inRange(r.y2, 60, 80) && // in the toolbar
|
||||||
// taking 50% to 75% of the window width
|
// taking 50% to 75% of the window width
|
||||||
@ -62,13 +55,6 @@ add_task(async function() {
|
|||||||
// starting at 15 to 25% of the window width
|
// starting at 15 to 25% of the window width
|
||||||
inRange(r.x1, width * .15, width * .25)
|
inRange(r.x1, width * .15, width * .25)
|
||||||
},
|
},
|
||||||
|
|
||||||
{name: "bug 1421460 - restore icon should be visible at first paint",
|
|
||||||
condition: r => r.w == 9 && r.h == 9 && // 9x9 icon
|
|
||||||
AppConstants.platform == "win" &&
|
|
||||||
// near the right end of the screen
|
|
||||||
inRange(r.x1, width - 80, width - 70)
|
|
||||||
},
|
|
||||||
];
|
];
|
||||||
|
|
||||||
let rectText = `${rect.toSource()}, window width: ${width}`;
|
let rectText = `${rect.toSource()}, window width: ${width}`;
|
||||||
|
@ -98,13 +98,6 @@ add_task(async function() {
|
|||||||
inRange(r.x1, width * .75, width * .9)
|
inRange(r.x1, width * .75, width * .9)
|
||||||
},
|
},
|
||||||
|
|
||||||
{name: "bug 1394914 - sidebar toolbar icon should be visible at first paint",
|
|
||||||
condition: r => r.h == 13 && inRange(r.w, 14, 16) && // icon size
|
|
||||||
inRange(r.y1, 40, 80) && // in the toolbar
|
|
||||||
// near the right end of screen
|
|
||||||
inRange(r.x1, width - 100, width - 50)
|
|
||||||
},
|
|
||||||
|
|
||||||
{name: "bug 1403648 - urlbar should be focused at first paint",
|
{name: "bug 1403648 - urlbar should be focused at first paint",
|
||||||
condition: r => inRange(r.y2, 60, 80) && // in the toolbar
|
condition: r => inRange(r.y2, 60, 80) && // in the toolbar
|
||||||
// taking 50% to 75% of the window width
|
// taking 50% to 75% of the window width
|
||||||
|
@ -12,7 +12,17 @@
|
|||||||
* See https://developer.mozilla.org/en-US/Firefox/Performance_best_practices_for_Firefox_fe_engineers
|
* See https://developer.mozilla.org/en-US/Firefox/Performance_best_practices_for_Firefox_fe_engineers
|
||||||
* for tips on how to do that.
|
* for tips on how to do that.
|
||||||
*/
|
*/
|
||||||
const EXPECTED_REFLOWS = [];
|
const EXPECTED_REFLOWS = [
|
||||||
|
{
|
||||||
|
stack: [
|
||||||
|
"onOverflow@resource:///modules/CustomizableUI.jsm",
|
||||||
|
"init@resource:///modules/CustomizableUI.jsm",
|
||||||
|
"observe@resource:///modules/CustomizableUI.jsm",
|
||||||
|
"_delayedStartup@chrome://browser/content/browser.js",
|
||||||
|
],
|
||||||
|
times: 2, // This number should only ever go down - never up.
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
if (Services.appinfo.OS == "WINNT") {
|
if (Services.appinfo.OS == "WINNT") {
|
||||||
EXPECTED_REFLOWS.push(
|
EXPECTED_REFLOWS.push(
|
||||||
|
@ -18,33 +18,14 @@
|
|||||||
<constructor><![CDATA[
|
<constructor><![CDATA[
|
||||||
let scope = {};
|
let scope = {};
|
||||||
Cu.import("resource:///modules/CustomizableUI.jsm", scope);
|
Cu.import("resource:///modules/CustomizableUI.jsm", scope);
|
||||||
|
let CustomizableUI = scope.CustomizableUI;
|
||||||
// Add an early overflow event listener that will mark if the
|
// Add an early overflow event listener that will mark if the
|
||||||
// toolbar overflowed during construction.
|
// toolbar overflowed during construction.
|
||||||
if (scope.CustomizableUI.isAreaOverflowable(this.id)) {
|
if (CustomizableUI.isAreaOverflowable(this.id)) {
|
||||||
this.addEventListener("overflow", this);
|
this.addEventListener("overflow", this);
|
||||||
this.addEventListener("underflow", this);
|
this.addEventListener("underflow", this);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (document.readyState == "complete") {
|
|
||||||
this._init();
|
|
||||||
} else {
|
|
||||||
// Need to wait until XUL overlays are loaded. See bug 554279.
|
|
||||||
let self = this;
|
|
||||||
document.addEventListener("readystatechange", function onReadyStateChange() {
|
|
||||||
if (document.readyState != "complete")
|
|
||||||
return;
|
|
||||||
document.removeEventListener("readystatechange", onReadyStateChange);
|
|
||||||
self._init();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
]]></constructor>
|
|
||||||
|
|
||||||
<method name="_init">
|
|
||||||
<body><![CDATA[
|
|
||||||
let scope = {};
|
|
||||||
Cu.import("resource:///modules/CustomizableUI.jsm", scope);
|
|
||||||
let CustomizableUI = scope.CustomizableUI;
|
|
||||||
|
|
||||||
// Bug 989289: Forcibly set the now unsupported "mode" and "iconsize"
|
// Bug 989289: Forcibly set the now unsupported "mode" and "iconsize"
|
||||||
// attributes, just in case they accidentally get restored from
|
// attributes, just in case they accidentally get restored from
|
||||||
// persistence from a user that's been upgrading and downgrading.
|
// persistence from a user that's been upgrading and downgrading.
|
||||||
@ -83,8 +64,7 @@
|
|||||||
.filter(node => node.getAttribute("skipintoolbarset") != "true" && node.id)
|
.filter(node => node.getAttribute("skipintoolbarset") != "true" && node.id)
|
||||||
.map(node => node.id);
|
.map(node => node.id);
|
||||||
CustomizableUI.registerToolbarNode(this, children);
|
CustomizableUI.registerToolbarNode(this, children);
|
||||||
]]></body>
|
]]></constructor>
|
||||||
</method>
|
|
||||||
|
|
||||||
<method name="handleEvent">
|
<method name="handleEvent">
|
||||||
<parameter name="aEvent"/>
|
<parameter name="aEvent"/>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
"size": 996696,
|
"size": 2156788,
|
||||||
"digest": "7c09f6144c84a6dd9bdb8d817e7957b432e72138ecb4a2adf6f5754b7ef2a2bd5c53ba113659283644f510a1aab87a1efc09851bc07457978eb0c0a63f4c29a4",
|
"digest": "8e3b50c4879f1321655a7b2b613dc6c981580fb5e14af585eda1f79020e98378f67bfdf46bf49c060635b283b1892d0e5ca23ab219af83de0456fbee3e276983",
|
||||||
"algorithm": "sha512",
|
"algorithm": "sha512",
|
||||||
"filename": "breakpad-tools.tar.xz",
|
"filename": "breakpad-tools.tar.xz",
|
||||||
"unpack": true
|
"unpack": true
|
||||||
|
@ -1017,7 +1017,7 @@ def compiler(language, host_or_target, c_compiler=None, other_compiler=None,
|
|||||||
def is_msvc(compiler):
|
def is_msvc(compiler):
|
||||||
return compiler.type == 'msvc'
|
return compiler.type == 'msvc'
|
||||||
|
|
||||||
imply_option('LINK', linker, reason='LD', when=is_msvc)
|
imply_option('LINKER', linker, reason='LD', when=is_msvc)
|
||||||
|
|
||||||
return valid_compiler
|
return valid_compiler
|
||||||
|
|
||||||
|
@ -429,9 +429,9 @@ def valid_mt(path):
|
|||||||
set_config('MSMANIFEST_TOOL', depends(valid_mt)(lambda x: bool(x)))
|
set_config('MSMANIFEST_TOOL', depends(valid_mt)(lambda x: bool(x)))
|
||||||
|
|
||||||
|
|
||||||
link = check_prog('LINK', ('link.exe',), paths=vc_compiler_path)
|
link = check_prog('LINKER', ('link.exe',), paths=vc_compiler_path)
|
||||||
|
|
||||||
add_old_configure_assignment('LINK', link)
|
add_old_configure_assignment('LINKER', link)
|
||||||
|
|
||||||
|
|
||||||
# Normally, we'd just have CC, etc. set to absolute paths, but the build system
|
# Normally, we'd just have CC, etc. set to absolute paths, but the build system
|
||||||
|
@ -418,7 +418,7 @@ EXPAND_LIBS_GEN = $(PYTHON) $(MOZILLA_DIR)/config/expandlibs_gen.py
|
|||||||
EXPAND_AR = $(EXPAND_LIBS_EXEC) --extract -- $(AR)
|
EXPAND_AR = $(EXPAND_LIBS_EXEC) --extract -- $(AR)
|
||||||
EXPAND_CC = $(EXPAND_LIBS_EXEC) --uselist -- $(CC)
|
EXPAND_CC = $(EXPAND_LIBS_EXEC) --uselist -- $(CC)
|
||||||
EXPAND_CCC = $(EXPAND_LIBS_EXEC) --uselist -- $(CCC)
|
EXPAND_CCC = $(EXPAND_LIBS_EXEC) --uselist -- $(CCC)
|
||||||
EXPAND_LINK = $(EXPAND_LIBS_EXEC) --uselist -- $(LINK)
|
EXPAND_LINK = $(EXPAND_LIBS_EXEC) --uselist -- $(LINKER)
|
||||||
EXPAND_MKSHLIB_ARGS = --uselist
|
EXPAND_MKSHLIB_ARGS = --uselist
|
||||||
ifdef SYMBOL_ORDER
|
ifdef SYMBOL_ORDER
|
||||||
EXPAND_MKSHLIB_ARGS += --symbol-order $(SYMBOL_ORDER)
|
EXPAND_MKSHLIB_ARGS += --symbol-order $(SYMBOL_ORDER)
|
||||||
|
@ -591,7 +591,7 @@ endif
|
|||||||
$(HOST_PROGRAM): $(HOST_PROGOBJS) $(HOST_LIBS) $(HOST_EXTRA_DEPS) $(GLOBAL_DEPS)
|
$(HOST_PROGRAM): $(HOST_PROGOBJS) $(HOST_LIBS) $(HOST_EXTRA_DEPS) $(GLOBAL_DEPS)
|
||||||
$(REPORT_BUILD)
|
$(REPORT_BUILD)
|
||||||
ifeq (_WINNT,$(GNU_CC)_$(HOST_OS_ARCH))
|
ifeq (_WINNT,$(GNU_CC)_$(HOST_OS_ARCH))
|
||||||
$(EXPAND_LIBS_EXEC) -- $(LINK) -NOLOGO -OUT:$@ -PDB:$(HOST_PDBFILE) $(HOST_OBJS) $(WIN32_EXE_LDFLAGS) $(HOST_LDFLAGS) $(HOST_LIBS) $(HOST_EXTRA_LIBS)
|
$(EXPAND_LIBS_EXEC) -- $(LINKER) -NOLOGO -OUT:$@ -PDB:$(HOST_PDBFILE) $(HOST_OBJS) $(WIN32_EXE_LDFLAGS) $(HOST_LDFLAGS) $(HOST_LIBS) $(HOST_EXTRA_LIBS)
|
||||||
ifdef MSMANIFEST_TOOL
|
ifdef MSMANIFEST_TOOL
|
||||||
@if test -f $@.manifest; then \
|
@if test -f $@.manifest; then \
|
||||||
if test -f '$(srcdir)/$@.manifest'; then \
|
if test -f '$(srcdir)/$@.manifest'; then \
|
||||||
@ -650,7 +650,7 @@ endif
|
|||||||
$(HOST_SIMPLE_PROGRAMS): host_%$(HOST_BIN_SUFFIX): host_%.$(OBJ_SUFFIX) $(HOST_LIBS) $(HOST_EXTRA_DEPS) $(GLOBAL_DEPS)
|
$(HOST_SIMPLE_PROGRAMS): host_%$(HOST_BIN_SUFFIX): host_%.$(OBJ_SUFFIX) $(HOST_LIBS) $(HOST_EXTRA_DEPS) $(GLOBAL_DEPS)
|
||||||
$(REPORT_BUILD)
|
$(REPORT_BUILD)
|
||||||
ifeq (WINNT_,$(HOST_OS_ARCH)_$(GNU_CC))
|
ifeq (WINNT_,$(HOST_OS_ARCH)_$(GNU_CC))
|
||||||
$(EXPAND_LIBS_EXEC) -- $(LINK) -NOLOGO -OUT:$@ -PDB:$(HOST_PDBFILE) $< $(WIN32_EXE_LDFLAGS) $(HOST_LIBS) $(HOST_EXTRA_LIBS)
|
$(EXPAND_LIBS_EXEC) -- $(LINKER) -NOLOGO -OUT:$@ -PDB:$(HOST_PDBFILE) $< $(WIN32_EXE_LDFLAGS) $(HOST_LIBS) $(HOST_EXTRA_LIBS)
|
||||||
else
|
else
|
||||||
ifneq (,$(HOST_CPPSRCS)$(USE_HOST_CXX))
|
ifneq (,$(HOST_CPPSRCS)$(USE_HOST_CXX))
|
||||||
$(EXPAND_LIBS_EXEC) -- $(HOST_CXX) $(HOST_OUTOPTION)$@ $(HOST_CXX_LDFLAGS) $< $(HOST_LIBS) $(HOST_EXTRA_LIBS)
|
$(EXPAND_LIBS_EXEC) -- $(HOST_CXX) $(HOST_OUTOPTION)$@ $(HOST_CXX_LDFLAGS) $< $(HOST_LIBS) $(HOST_EXTRA_LIBS)
|
||||||
|
@ -15222,7 +15222,7 @@ nsDocShell::ShouldPrepareForIntercept(nsIURI* aURI, bool aIsNonSubresourceReques
|
|||||||
}
|
}
|
||||||
|
|
||||||
ErrorResult rv;
|
ErrorResult rv;
|
||||||
*aShouldIntercept = swm->IsControlled(doc, rv);
|
*aShouldIntercept = doc->GetController().isSome();
|
||||||
if (NS_WARN_IF(rv.Failed())) {
|
if (NS_WARN_IF(rv.Failed())) {
|
||||||
return rv.StealNSResult();
|
return rv.StealNSResult();
|
||||||
}
|
}
|
||||||
|
@ -48,6 +48,7 @@
|
|||||||
#include "nsHTMLDNSPrefetch.h"
|
#include "nsHTMLDNSPrefetch.h"
|
||||||
#include "nsIObserverService.h"
|
#include "nsIObserverService.h"
|
||||||
#include "mozilla/Preferences.h"
|
#include "mozilla/Preferences.h"
|
||||||
|
#include "mozilla/dom/ServiceWorkerDescriptor.h"
|
||||||
#include "mozilla/dom/ScriptLoader.h"
|
#include "mozilla/dom/ScriptLoader.h"
|
||||||
#include "nsParserConstants.h"
|
#include "nsParserConstants.h"
|
||||||
#include "nsSandboxFlags.h"
|
#include "nsSandboxFlags.h"
|
||||||
@ -1109,7 +1110,7 @@ nsContentSink::ProcessOfflineManifest(const nsAString& aManifestSpec)
|
|||||||
|
|
||||||
// If this document has been interecepted, let's skip the processing of the
|
// If this document has been interecepted, let's skip the processing of the
|
||||||
// manifest.
|
// manifest.
|
||||||
if (nsContentUtils::IsControlledByServiceWorker(mDocument)) {
|
if (mDocument->GetController().isSome()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1978,28 +1978,6 @@ nsContentUtils::ParseLegacyFontSize(const nsAString& aValue)
|
|||||||
return clamped(value, 1, 7);
|
return clamped(value, 1, 7);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* static */
|
|
||||||
bool
|
|
||||||
nsContentUtils::IsControlledByServiceWorker(nsIDocument* aDocument)
|
|
||||||
{
|
|
||||||
if (nsContentUtils::IsInPrivateBrowsing(aDocument)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
RefPtr<workers::ServiceWorkerManager> swm =
|
|
||||||
workers::ServiceWorkerManager::GetInstance();
|
|
||||||
MOZ_ASSERT(swm);
|
|
||||||
|
|
||||||
ErrorResult rv;
|
|
||||||
bool controlled = swm->IsControlled(aDocument, rv);
|
|
||||||
if (NS_WARN_IF(rv.Failed())) {
|
|
||||||
rv.SuppressException();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return controlled;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* static */
|
/* static */
|
||||||
void
|
void
|
||||||
nsContentUtils::GetOfflineAppManifest(nsIDocument *aDocument, nsIURI **aURI)
|
nsContentUtils::GetOfflineAppManifest(nsIDocument *aDocument, nsIURI **aURI)
|
||||||
@ -2008,7 +1986,7 @@ nsContentUtils::GetOfflineAppManifest(nsIDocument *aDocument, nsIURI **aURI)
|
|||||||
MOZ_ASSERT(aDocument);
|
MOZ_ASSERT(aDocument);
|
||||||
*aURI = nullptr;
|
*aURI = nullptr;
|
||||||
|
|
||||||
if (IsControlledByServiceWorker(aDocument)) {
|
if (aDocument->GetController().isSome()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2396,11 +2396,6 @@ public:
|
|||||||
return sIsScopedStyleEnabled;
|
return sIsScopedStyleEnabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Return true if this doc is controlled by a ServiceWorker.
|
|
||||||
*/
|
|
||||||
static bool IsControlledByServiceWorker(nsIDocument* aDocument);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fire mutation events for changes caused by parsing directly into a
|
* Fire mutation events for changes caused by parsing directly into a
|
||||||
* context node.
|
* context node.
|
||||||
|
@ -212,6 +212,8 @@
|
|||||||
#include "mozilla/dom/AnimatableBinding.h"
|
#include "mozilla/dom/AnimatableBinding.h"
|
||||||
#include "mozilla/dom/AnonymousContent.h"
|
#include "mozilla/dom/AnonymousContent.h"
|
||||||
#include "mozilla/dom/BindingUtils.h"
|
#include "mozilla/dom/BindingUtils.h"
|
||||||
|
#include "mozilla/dom/ClientInfo.h"
|
||||||
|
#include "mozilla/dom/ClientState.h"
|
||||||
#include "mozilla/dom/DocumentFragment.h"
|
#include "mozilla/dom/DocumentFragment.h"
|
||||||
#include "mozilla/dom/DocumentTimeline.h"
|
#include "mozilla/dom/DocumentTimeline.h"
|
||||||
#include "mozilla/dom/Event.h"
|
#include "mozilla/dom/Event.h"
|
||||||
@ -225,6 +227,7 @@
|
|||||||
#include "mozilla/dom/WebComponentsBinding.h"
|
#include "mozilla/dom/WebComponentsBinding.h"
|
||||||
#include "mozilla/dom/CustomElementRegistryBinding.h"
|
#include "mozilla/dom/CustomElementRegistryBinding.h"
|
||||||
#include "mozilla/dom/CustomElementRegistry.h"
|
#include "mozilla/dom/CustomElementRegistry.h"
|
||||||
|
#include "mozilla/dom/ServiceWorkerDescriptor.h"
|
||||||
#include "mozilla/dom/TimeoutManager.h"
|
#include "mozilla/dom/TimeoutManager.h"
|
||||||
#include "mozilla/ExtensionPolicyService.h"
|
#include "mozilla/ExtensionPolicyService.h"
|
||||||
#include "nsFrame.h"
|
#include "nsFrame.h"
|
||||||
@ -5052,7 +5055,7 @@ nsDocument::SetScriptGlobalObject(nsIScriptGlobalObject *aScriptGlobalObject)
|
|||||||
RefPtr<ServiceWorkerManager> swm = ServiceWorkerManager::GetInstance();
|
RefPtr<ServiceWorkerManager> swm = ServiceWorkerManager::GetInstance();
|
||||||
if (swm) {
|
if (swm) {
|
||||||
ErrorResult error;
|
ErrorResult error;
|
||||||
if (swm->IsControlled(this, error)) {
|
if (GetController().isSome()) {
|
||||||
imgLoader* loader = nsContentUtils::GetImgLoaderForDocument(this);
|
imgLoader* loader = nsContentUtils::GetImgLoaderForDocument(this);
|
||||||
if (loader) {
|
if (loader) {
|
||||||
loader->ClearCacheForControlledDocument(this);
|
loader->ClearCacheForControlledDocument(this);
|
||||||
@ -5842,6 +5845,36 @@ nsIDocument::GetAnonRootIfInAnonymousContentContainer(nsINode* aNode) const
|
|||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Maybe<ClientInfo>
|
||||||
|
nsIDocument::GetClientInfo() const
|
||||||
|
{
|
||||||
|
nsPIDOMWindowInner* inner = GetInnerWindow();
|
||||||
|
if (inner) {
|
||||||
|
return Move(inner->GetClientInfo());
|
||||||
|
}
|
||||||
|
return Move(Maybe<ClientInfo>());
|
||||||
|
}
|
||||||
|
|
||||||
|
Maybe<ClientState>
|
||||||
|
nsIDocument::GetClientState() const
|
||||||
|
{
|
||||||
|
nsPIDOMWindowInner* inner = GetInnerWindow();
|
||||||
|
if (inner) {
|
||||||
|
return Move(inner->GetClientState());
|
||||||
|
}
|
||||||
|
return Move(Maybe<ClientState>());
|
||||||
|
}
|
||||||
|
|
||||||
|
Maybe<ServiceWorkerDescriptor>
|
||||||
|
nsIDocument::GetController() const
|
||||||
|
{
|
||||||
|
nsPIDOMWindowInner* inner = GetInnerWindow();
|
||||||
|
if (inner) {
|
||||||
|
return Move(inner->GetController());
|
||||||
|
}
|
||||||
|
return Move(Maybe<ServiceWorkerDescriptor>());
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// nsIDOMDocument interface
|
// nsIDOMDocument interface
|
||||||
//
|
//
|
||||||
|
@ -7412,7 +7412,7 @@ nsGlobalWindowInner::Orientation(CallerType aCallerType) const
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
Console*
|
already_AddRefed<Console>
|
||||||
nsGlobalWindowInner::GetConsole(ErrorResult& aRv)
|
nsGlobalWindowInner::GetConsole(ErrorResult& aRv)
|
||||||
{
|
{
|
||||||
if (!mConsole) {
|
if (!mConsole) {
|
||||||
@ -7422,7 +7422,8 @@ nsGlobalWindowInner::GetConsole(ErrorResult& aRv)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return mConsole;
|
RefPtr<Console> console = mConsole;
|
||||||
|
return console.forget();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
|
@ -684,7 +684,7 @@ public:
|
|||||||
int16_t Orientation(mozilla::dom::CallerType aCallerType) const;
|
int16_t Orientation(mozilla::dom::CallerType aCallerType) const;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
mozilla::dom::Console* GetConsole(mozilla::ErrorResult& aRv);
|
already_AddRefed<mozilla::dom::Console> GetConsole(mozilla::ErrorResult& aRv);
|
||||||
|
|
||||||
// https://w3c.github.io/webappsec-secure-contexts/#dom-window-issecurecontext
|
// https://w3c.github.io/webappsec-secure-contexts/#dom-window-issecurecontext
|
||||||
bool IsSecureContext() const;
|
bool IsSecureContext() const;
|
||||||
|
@ -128,6 +128,8 @@ class Animation;
|
|||||||
class AnonymousContent;
|
class AnonymousContent;
|
||||||
class Attr;
|
class Attr;
|
||||||
class BoxObject;
|
class BoxObject;
|
||||||
|
class ClientInfo;
|
||||||
|
class ClientState;
|
||||||
class CDATASection;
|
class CDATASection;
|
||||||
class Comment;
|
class Comment;
|
||||||
struct CustomElementDefinition;
|
struct CustomElementDefinition;
|
||||||
@ -159,6 +161,7 @@ class ProcessingInstruction;
|
|||||||
class Promise;
|
class Promise;
|
||||||
class ScriptLoader;
|
class ScriptLoader;
|
||||||
class Selection;
|
class Selection;
|
||||||
|
class ServiceWorkerDescriptor;
|
||||||
class StyleSheetList;
|
class StyleSheetList;
|
||||||
class SVGDocument;
|
class SVGDocument;
|
||||||
class SVGSVGElement;
|
class SVGSVGElement;
|
||||||
@ -1124,6 +1127,10 @@ public:
|
|||||||
// Resolve all SVG pres attrs scheduled in ScheduleSVGForPresAttrEvaluation
|
// Resolve all SVG pres attrs scheduled in ScheduleSVGForPresAttrEvaluation
|
||||||
virtual void ResolveScheduledSVGPresAttrs() = 0;
|
virtual void ResolveScheduledSVGPresAttrs() = 0;
|
||||||
|
|
||||||
|
mozilla::Maybe<mozilla::dom::ClientInfo> GetClientInfo() const;
|
||||||
|
mozilla::Maybe<mozilla::dom::ClientState> GetClientState() const;
|
||||||
|
mozilla::Maybe<mozilla::dom::ServiceWorkerDescriptor> GetController() const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual Element *GetRootElementInternal() const = 0;
|
virtual Element *GetRootElementInternal() const = 0;
|
||||||
|
|
||||||
|
@ -11,6 +11,8 @@
|
|||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
namespace dom {
|
namespace dom {
|
||||||
|
|
||||||
|
using mozilla::ipc::PrincipalInfo;
|
||||||
|
|
||||||
ClientInfo::ClientInfo(const nsID& aId,
|
ClientInfo::ClientInfo(const nsID& aId,
|
||||||
ClientType aType,
|
ClientType aType,
|
||||||
const mozilla::ipc::PrincipalInfo& aPrincipalInfo,
|
const mozilla::ipc::PrincipalInfo& aPrincipalInfo,
|
||||||
@ -110,5 +112,31 @@ ClientInfo::ToIPC() const
|
|||||||
return *mData;
|
return *mData;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool
|
||||||
|
ClientInfo::IsPrivateBrowsing() const
|
||||||
|
{
|
||||||
|
switch(PrincipalInfo().type()) {
|
||||||
|
case PrincipalInfo::TContentPrincipalInfo:
|
||||||
|
{
|
||||||
|
auto& p = PrincipalInfo().get_ContentPrincipalInfo();
|
||||||
|
return p.attrs().mPrivateBrowsingId != 0;
|
||||||
|
}
|
||||||
|
case PrincipalInfo::TSystemPrincipalInfo:
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
case PrincipalInfo::TNullPrincipalInfo:
|
||||||
|
{
|
||||||
|
auto& p = PrincipalInfo().get_NullPrincipalInfo();
|
||||||
|
return p.attrs().mPrivateBrowsingId != 0;
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
{
|
||||||
|
// clients should never be expanded principals
|
||||||
|
MOZ_CRASH("unexpected principal type!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace dom
|
} // namespace dom
|
||||||
} // namespace mozilla
|
} // namespace mozilla
|
||||||
|
@ -91,6 +91,10 @@ public:
|
|||||||
// Convert to the ipdl generated type.
|
// Convert to the ipdl generated type.
|
||||||
const IPCClientInfo&
|
const IPCClientInfo&
|
||||||
ToIPC() const;
|
ToIPC() const;
|
||||||
|
|
||||||
|
// Determine if the client is in private browsing mode.
|
||||||
|
bool
|
||||||
|
IsPrivateBrowsing() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace dom
|
} // namespace dom
|
||||||
|
@ -80,15 +80,8 @@ public:
|
|||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
nsPIDOMWindowInner* innerWindow = doc->GetInnerWindow();
|
Maybe<ClientInfo> info(doc->GetClientInfo());
|
||||||
if (NS_WARN_IF(!innerWindow)) {
|
Maybe<ClientState> state(doc->GetClientState());
|
||||||
mPromise->Reject(NS_ERROR_FAILURE, __func__);
|
|
||||||
mPromise = nullptr;
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
Maybe<ClientInfo> info = innerWindow->GetClientInfo();
|
|
||||||
Maybe<ClientState> state = innerWindow->GetClientState();
|
|
||||||
|
|
||||||
if (NS_WARN_IF(info.isNothing() || state.isNothing())) {
|
if (NS_WARN_IF(info.isNothing() || state.isNothing())) {
|
||||||
mPromise->Reject(NS_ERROR_FAILURE, __func__);
|
mPromise->Reject(NS_ERROR_FAILURE, __func__);
|
||||||
|
@ -355,6 +355,11 @@ ClientSource::SetController(const ServiceWorkerDescriptor& aServiceWorker)
|
|||||||
{
|
{
|
||||||
NS_ASSERT_OWNINGTHREAD(ClientSource);
|
NS_ASSERT_OWNINGTHREAD(ClientSource);
|
||||||
|
|
||||||
|
// A client in private browsing mode should never be controlled by
|
||||||
|
// a service worker. The principal origin attributes should guarantee
|
||||||
|
// this invariant.
|
||||||
|
MOZ_DIAGNOSTIC_ASSERT(!mClientInfo.IsPrivateBrowsing());
|
||||||
|
|
||||||
if (mController.isSome() && mController.ref() == aServiceWorker) {
|
if (mController.isSome() && mController.ref() == aServiceWorker) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -817,9 +817,8 @@ Console::Console(nsPIDOMWindowInner* aWindow)
|
|||||||
, mOuterID(0)
|
, mOuterID(0)
|
||||||
, mInnerID(0)
|
, mInnerID(0)
|
||||||
, mStatus(eUnknown)
|
, mStatus(eUnknown)
|
||||||
|
, mCreationTimeStamp(TimeStamp::Now())
|
||||||
{
|
{
|
||||||
MOZ_ASSERT_IF(NS_IsMainThread(), aWindow);
|
|
||||||
|
|
||||||
if (mWindow) {
|
if (mWindow) {
|
||||||
mInnerID = mWindow->WindowID();
|
mInnerID = mWindow->WindowID();
|
||||||
|
|
||||||
@ -855,9 +854,11 @@ Console::Initialize(ErrorResult& aRv)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
aRv = obs->AddObserver(this, "inner-window-destroyed", true);
|
if (mWindow) {
|
||||||
if (NS_WARN_IF(aRv.Failed())) {
|
aRv = obs->AddObserver(this, "inner-window-destroyed", true);
|
||||||
return;
|
if (NS_WARN_IF(aRv.Failed())) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
aRv = obs->AddObserver(this, "memory-pressure", true);
|
aRv = obs->AddObserver(this, "memory-pressure", true);
|
||||||
@ -1223,36 +1224,38 @@ Console::MethodInternal(JSContext* aCx, MethodName aMethodName,
|
|||||||
|
|
||||||
OriginAttributes oa;
|
OriginAttributes oa;
|
||||||
|
|
||||||
if (mWindow) {
|
if (NS_IsMainThread()) {
|
||||||
// Save the principal's OriginAttributes in the console event data
|
if (mWindow) {
|
||||||
// so that we will be able to filter messages by origin attributes.
|
// Save the principal's OriginAttributes in the console event data
|
||||||
nsCOMPtr<nsIScriptObjectPrincipal> sop = do_QueryInterface(mWindow);
|
// so that we will be able to filter messages by origin attributes.
|
||||||
if (NS_WARN_IF(!sop)) {
|
nsCOMPtr<nsIScriptObjectPrincipal> sop = do_QueryInterface(mWindow);
|
||||||
return;
|
if (NS_WARN_IF(!sop)) {
|
||||||
}
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
nsCOMPtr<nsIPrincipal> principal = sop->GetPrincipal();
|
nsCOMPtr<nsIPrincipal> principal = sop->GetPrincipal();
|
||||||
if (NS_WARN_IF(!principal)) {
|
if (NS_WARN_IF(!principal)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
oa = principal->OriginAttributesRef();
|
oa = principal->OriginAttributesRef();
|
||||||
callData->SetAddonId(principal);
|
callData->SetAddonId(principal);
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
if (!nsContentUtils::IsSystemPrincipal(principal)) {
|
if (!nsContentUtils::IsSystemPrincipal(principal)) {
|
||||||
nsCOMPtr<nsIWebNavigation> webNav = do_GetInterface(mWindow);
|
nsCOMPtr<nsIWebNavigation> webNav = do_GetInterface(mWindow);
|
||||||
if (webNav) {
|
if (webNav) {
|
||||||
nsCOMPtr<nsILoadContext> loadContext = do_QueryInterface(webNav);
|
nsCOMPtr<nsILoadContext> loadContext = do_QueryInterface(webNav);
|
||||||
MOZ_ASSERT(loadContext);
|
MOZ_ASSERT(loadContext);
|
||||||
|
|
||||||
bool pb;
|
bool pb;
|
||||||
if (NS_SUCCEEDED(loadContext->GetUsePrivateBrowsing(&pb))) {
|
if (NS_SUCCEEDED(loadContext->GetUsePrivateBrowsing(&pb))) {
|
||||||
MOZ_ASSERT(pb == !!oa.mPrivateBrowsingId);
|
MOZ_ASSERT(pb == !!oa.mPrivateBrowsingId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
WorkerPrivate* workerPrivate = GetCurrentThreadWorkerPrivate();
|
WorkerPrivate* workerPrivate = GetCurrentThreadWorkerPrivate();
|
||||||
MOZ_ASSERT(workerPrivate);
|
MOZ_ASSERT(workerPrivate);
|
||||||
@ -1290,67 +1293,11 @@ Console::MethodInternal(JSContext* aCx, MethodName aMethodName,
|
|||||||
DOMHighResTimeStamp monotonicTimer;
|
DOMHighResTimeStamp monotonicTimer;
|
||||||
|
|
||||||
// Monotonic timer for 'time' and 'timeEnd'
|
// Monotonic timer for 'time' and 'timeEnd'
|
||||||
if (aMethodName == MethodTime ||
|
if ((aMethodName == MethodTime ||
|
||||||
aMethodName == MethodTimeEnd ||
|
aMethodName == MethodTimeEnd ||
|
||||||
aMethodName == MethodTimeStamp) {
|
aMethodName == MethodTimeStamp) &&
|
||||||
if (mWindow) {
|
!MonotonicTimer(aCx, aMethodName, aData, &monotonicTimer)) {
|
||||||
nsGlobalWindowInner *win = nsGlobalWindowInner::Cast(mWindow);
|
return;
|
||||||
MOZ_ASSERT(win);
|
|
||||||
|
|
||||||
RefPtr<Performance> performance = win->GetPerformance();
|
|
||||||
if (!performance) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
monotonicTimer = performance->Now();
|
|
||||||
|
|
||||||
nsDocShell* docShell = static_cast<nsDocShell*>(mWindow->GetDocShell());
|
|
||||||
RefPtr<TimelineConsumers> timelines = TimelineConsumers::Get();
|
|
||||||
bool isTimelineRecording = timelines && timelines->HasConsumer(docShell);
|
|
||||||
|
|
||||||
// The 'timeStamp' recordings do not need an argument; use empty string
|
|
||||||
// if no arguments passed in.
|
|
||||||
if (isTimelineRecording && aMethodName == MethodTimeStamp) {
|
|
||||||
JS::Rooted<JS::Value> value(aCx, aData.Length() == 0
|
|
||||||
? JS_GetEmptyStringValue(aCx)
|
|
||||||
: aData[0]);
|
|
||||||
JS::Rooted<JSString*> jsString(aCx, JS::ToString(aCx, value));
|
|
||||||
if (!jsString) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
nsAutoJSString key;
|
|
||||||
if (!key.init(aCx, jsString)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
timelines->AddMarkerForDocShell(docShell, Move(
|
|
||||||
MakeUnique<TimestampTimelineMarker>(key)));
|
|
||||||
}
|
|
||||||
// For `console.time(foo)` and `console.timeEnd(foo)`.
|
|
||||||
else if (isTimelineRecording && aData.Length() == 1) {
|
|
||||||
JS::Rooted<JS::Value> value(aCx, aData[0]);
|
|
||||||
JS::Rooted<JSString*> jsString(aCx, JS::ToString(aCx, value));
|
|
||||||
if (!jsString) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
nsAutoJSString key;
|
|
||||||
if (!key.init(aCx, jsString)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
timelines->AddMarkerForDocShell(docShell, Move(
|
|
||||||
MakeUnique<ConsoleTimelineMarker>(
|
|
||||||
key, aMethodName == MethodTime ? MarkerTracingType::START
|
|
||||||
: MarkerTracingType::END)));
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
WorkerPrivate* workerPrivate = GetCurrentThreadWorkerPrivate();
|
|
||||||
MOZ_ASSERT(workerPrivate);
|
|
||||||
|
|
||||||
monotonicTimer = workerPrivate->TimeStampToDOMHighRes(TimeStamp::Now());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (aMethodName == MethodTime && !aData.IsEmpty()) {
|
if (aMethodName == MethodTime && !aData.IsEmpty()) {
|
||||||
@ -1375,7 +1322,17 @@ Console::MethodInternal(JSContext* aCx, MethodName aMethodName,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (NS_IsMainThread()) {
|
if (NS_IsMainThread()) {
|
||||||
callData->SetIDs(mOuterID, mInnerID);
|
if (mWindow) {
|
||||||
|
callData->SetIDs(mOuterID, mInnerID);
|
||||||
|
} else {
|
||||||
|
nsAutoString filename;
|
||||||
|
if (callData->mTopStackFrame.isSome()) {
|
||||||
|
filename = callData->mTopStackFrame->mFilename;
|
||||||
|
}
|
||||||
|
|
||||||
|
callData->SetIDs(NS_LITERAL_STRING("jsm"), filename);
|
||||||
|
}
|
||||||
|
|
||||||
ProcessCallData(aCx, callData, aData);
|
ProcessCallData(aCx, callData, aData);
|
||||||
|
|
||||||
// Just because we don't want to expose
|
// Just because we don't want to expose
|
||||||
@ -2436,7 +2393,7 @@ Console::GetConsole(const GlobalObject& aGlobal)
|
|||||||
return console.forget();
|
return console.forget();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* static */ Console*
|
/* static */ already_AddRefed<Console>
|
||||||
Console::GetConsoleInternal(const GlobalObject& aGlobal, ErrorResult& aRv)
|
Console::GetConsoleInternal(const GlobalObject& aGlobal, ErrorResult& aRv)
|
||||||
{
|
{
|
||||||
// Worklet
|
// Worklet
|
||||||
@ -2452,8 +2409,16 @@ Console::GetConsoleInternal(const GlobalObject& aGlobal, ErrorResult& aRv)
|
|||||||
if (NS_IsMainThread()) {
|
if (NS_IsMainThread()) {
|
||||||
nsCOMPtr<nsPIDOMWindowInner> innerWindow =
|
nsCOMPtr<nsPIDOMWindowInner> innerWindow =
|
||||||
do_QueryInterface(aGlobal.GetAsSupports());
|
do_QueryInterface(aGlobal.GetAsSupports());
|
||||||
if (NS_WARN_IF(!innerWindow)) {
|
|
||||||
return nullptr;
|
// we are probably running a chrome script.
|
||||||
|
if (!innerWindow) {
|
||||||
|
RefPtr<Console> console = new Console(nullptr);
|
||||||
|
console->Initialize(aRv);
|
||||||
|
if (NS_WARN_IF(aRv.Failed())) {
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
return console.forget();
|
||||||
}
|
}
|
||||||
|
|
||||||
nsGlobalWindowInner* window = nsGlobalWindowInner::Cast(innerWindow);
|
nsGlobalWindowInner* window = nsGlobalWindowInner::Cast(innerWindow);
|
||||||
@ -2492,5 +2457,85 @@ Console::GetConsoleInternal(const GlobalObject& aGlobal, ErrorResult& aRv)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool
|
||||||
|
Console::MonotonicTimer(JSContext* aCx, MethodName aMethodName,
|
||||||
|
const Sequence<JS::Value>& aData,
|
||||||
|
DOMHighResTimeStamp* aTimeStamp)
|
||||||
|
{
|
||||||
|
if (mWindow) {
|
||||||
|
nsGlobalWindowInner *win = nsGlobalWindowInner::Cast(mWindow);
|
||||||
|
MOZ_ASSERT(win);
|
||||||
|
|
||||||
|
RefPtr<Performance> performance = win->GetPerformance();
|
||||||
|
if (!performance) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
*aTimeStamp = performance->Now();
|
||||||
|
|
||||||
|
nsDocShell* docShell = static_cast<nsDocShell*>(mWindow->GetDocShell());
|
||||||
|
RefPtr<TimelineConsumers> timelines = TimelineConsumers::Get();
|
||||||
|
bool isTimelineRecording = timelines && timelines->HasConsumer(docShell);
|
||||||
|
|
||||||
|
// The 'timeStamp' recordings do not need an argument; use empty string
|
||||||
|
// if no arguments passed in.
|
||||||
|
if (isTimelineRecording && aMethodName == MethodTimeStamp) {
|
||||||
|
JS::Rooted<JS::Value> value(aCx, aData.Length() == 0
|
||||||
|
? JS_GetEmptyStringValue(aCx)
|
||||||
|
: aData[0]);
|
||||||
|
JS::Rooted<JSString*> jsString(aCx, JS::ToString(aCx, value));
|
||||||
|
if (!jsString) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
nsAutoJSString key;
|
||||||
|
if (!key.init(aCx, jsString)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
timelines->AddMarkerForDocShell(docShell, Move(
|
||||||
|
MakeUnique<TimestampTimelineMarker>(key)));
|
||||||
|
}
|
||||||
|
// For `console.time(foo)` and `console.timeEnd(foo)`.
|
||||||
|
else if (isTimelineRecording && aData.Length() == 1) {
|
||||||
|
JS::Rooted<JS::Value> value(aCx, aData[0]);
|
||||||
|
JS::Rooted<JSString*> jsString(aCx, JS::ToString(aCx, value));
|
||||||
|
if (!jsString) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
nsAutoJSString key;
|
||||||
|
if (!key.init(aCx, jsString)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
timelines->AddMarkerForDocShell(docShell, Move(
|
||||||
|
MakeUnique<ConsoleTimelineMarker>(
|
||||||
|
key, aMethodName == MethodTime ? MarkerTracingType::START
|
||||||
|
: MarkerTracingType::END)));
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (NS_IsMainThread()) {
|
||||||
|
double duration = (TimeStamp::Now() - mCreationTimeStamp).ToMilliseconds();
|
||||||
|
|
||||||
|
// Round down to the nearest 5us, because if the timer is too accurate
|
||||||
|
// people can do nasty timing attacks with it. See similar code in the
|
||||||
|
// worker Performance implementation.
|
||||||
|
const double maxResolutionMs = 0.005;
|
||||||
|
return nsRFPService::ReduceTimePrecisionAsMSecs(
|
||||||
|
floor(duration / maxResolutionMs) * maxResolutionMs);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
WorkerPrivate* workerPrivate = GetCurrentThreadWorkerPrivate();
|
||||||
|
MOZ_ASSERT(workerPrivate);
|
||||||
|
|
||||||
|
*aTimeStamp = workerPrivate->TimeStampToDOMHighRes(TimeStamp::Now());
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace dom
|
} // namespace dom
|
||||||
} // namespace mozilla
|
} // namespace mozilla
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
#include "mozilla/dom/BindingDeclarations.h"
|
#include "mozilla/dom/BindingDeclarations.h"
|
||||||
#include "mozilla/ErrorResult.h"
|
#include "mozilla/ErrorResult.h"
|
||||||
#include "mozilla/JSObjectHolder.h"
|
#include "mozilla/JSObjectHolder.h"
|
||||||
|
#include "mozilla/TimeStamp.h"
|
||||||
#include "nsCycleCollectionParticipant.h"
|
#include "nsCycleCollectionParticipant.h"
|
||||||
#include "nsDataHashtable.h"
|
#include "nsDataHashtable.h"
|
||||||
#include "nsHashKeys.h"
|
#include "nsHashKeys.h"
|
||||||
@ -159,7 +160,7 @@ private:
|
|||||||
static already_AddRefed<Console>
|
static already_AddRefed<Console>
|
||||||
GetConsole(const GlobalObject& aGlobal);
|
GetConsole(const GlobalObject& aGlobal);
|
||||||
|
|
||||||
static Console*
|
static already_AddRefed<Console>
|
||||||
GetConsoleInternal(const GlobalObject& aGlobal, ErrorResult &aRv);
|
GetConsoleInternal(const GlobalObject& aGlobal, ErrorResult &aRv);
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -370,6 +371,11 @@ private:
|
|||||||
bool
|
bool
|
||||||
IsShuttingDown() const;
|
IsShuttingDown() const;
|
||||||
|
|
||||||
|
bool
|
||||||
|
MonotonicTimer(JSContext* aCx, MethodName aMethodName,
|
||||||
|
const Sequence<JS::Value>& aData,
|
||||||
|
DOMHighResTimeStamp* aTimeStamp);
|
||||||
|
|
||||||
// All these nsCOMPtr are touched on main thread only.
|
// All these nsCOMPtr are touched on main thread only.
|
||||||
nsCOMPtr<nsPIDOMWindowInner> mWindow;
|
nsCOMPtr<nsPIDOMWindowInner> mWindow;
|
||||||
nsCOMPtr<nsIConsoleAPIStorage> mStorage;
|
nsCOMPtr<nsIConsoleAPIStorage> mStorage;
|
||||||
@ -406,6 +412,10 @@ private:
|
|||||||
eShuttingDown
|
eShuttingDown
|
||||||
} mStatus;
|
} mStatus;
|
||||||
|
|
||||||
|
// This is used when Console is created and it's used only for JSM custom
|
||||||
|
// console instance.
|
||||||
|
mozilla::TimeStamp mCreationTimeStamp;
|
||||||
|
|
||||||
friend class ConsoleCallData;
|
friend class ConsoleCallData;
|
||||||
friend class ConsoleRunnable;
|
friend class ConsoleRunnable;
|
||||||
friend class ConsoleCallDataRunnable;
|
friend class ConsoleCallDataRunnable;
|
||||||
|
@ -44,5 +44,6 @@ LOCAL_INCLUDES += [
|
|||||||
|
|
||||||
MOCHITEST_MANIFESTS += [ 'tests/mochitest.ini' ]
|
MOCHITEST_MANIFESTS += [ 'tests/mochitest.ini' ]
|
||||||
MOCHITEST_CHROME_MANIFESTS += [ 'tests/chrome.ini' ]
|
MOCHITEST_CHROME_MANIFESTS += [ 'tests/chrome.ini' ]
|
||||||
|
XPCSHELL_TESTS_MANIFESTS += ['tests/xpcshell/xpcshell.ini']
|
||||||
|
|
||||||
FINAL_LIBRARY = 'xul'
|
FINAL_LIBRARY = 'xul'
|
||||||
|
@ -2,5 +2,7 @@
|
|||||||
skip-if = os == 'android'
|
skip-if = os == 'android'
|
||||||
support-files =
|
support-files =
|
||||||
file_empty.html
|
file_empty.html
|
||||||
|
console.jsm
|
||||||
|
|
||||||
[test_console.xul]
|
[test_console.xul]
|
||||||
|
[test_jsm.xul]
|
||||||
|
11
dom/console/tests/console.jsm
Normal file
11
dom/console/tests/console.jsm
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
/**
|
||||||
|
* Any copyright is dedicated to the Public Domain.
|
||||||
|
* http://creativecommons.org/publicdomain/zero/1.0/
|
||||||
|
*/
|
||||||
|
this.EXPORTED_SYMBOLS = [ "ConsoleTest" ];
|
||||||
|
|
||||||
|
this.ConsoleTest = {
|
||||||
|
go: function() {
|
||||||
|
console.log("Hello world!");
|
||||||
|
}
|
||||||
|
};
|
51
dom/console/tests/test_jsm.xul
Normal file
51
dom/console/tests/test_jsm.xul
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<!--
|
||||||
|
Any copyright is dedicated to the Public Domain.
|
||||||
|
http://creativecommons.org/publicdomain/zero/1.0/
|
||||||
|
-->
|
||||||
|
<window title="Console + JSM"
|
||||||
|
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||||
|
onload="test();">
|
||||||
|
|
||||||
|
<script type="application/javascript"
|
||||||
|
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
|
||||||
|
<script type="application/javascript"
|
||||||
|
src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"/>
|
||||||
|
|
||||||
|
<script type="application/javascript">
|
||||||
|
<![CDATA[
|
||||||
|
|
||||||
|
const JSM = "chrome://mochitests/content/chrome/dom/console/tests/console.jsm";
|
||||||
|
|
||||||
|
function consoleListener() {
|
||||||
|
SpecialPowers.addObserver(this, "console-api-log-event");
|
||||||
|
}
|
||||||
|
|
||||||
|
consoleListener.prototype = {
|
||||||
|
observe: function(aSubject, aTopic, aData) {
|
||||||
|
if (aTopic == "console-api-log-event") {
|
||||||
|
var obj = aSubject.wrappedJSObject;
|
||||||
|
if (obj.innerID == JSM) {
|
||||||
|
is(obj.ID, "jsm", "ID and InnerID are correctly set.");
|
||||||
|
is (obj.arguments[0], "Hello world!", "Message matches");
|
||||||
|
|
||||||
|
SpecialPowers.removeObserver(this, "console-api-log-event");
|
||||||
|
SimpleTest.finish();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function test() {
|
||||||
|
SimpleTest.waitForExplicitFinish();
|
||||||
|
|
||||||
|
var cl = new consoleListener();
|
||||||
|
Components.utils.import(JSM);
|
||||||
|
ConsoleTest.go();
|
||||||
|
}
|
||||||
|
|
||||||
|
]]>
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<body xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
</body>
|
||||||
|
</window>
|
31
dom/console/tests/xpcshell/test_basic.js
Normal file
31
dom/console/tests/xpcshell/test_basic.js
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
/* Any copyright is dedicated to the Public Domain.
|
||||||
|
http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||||
|
|
||||||
|
Components.utils.import("resource://gre/modules/Services.jsm");
|
||||||
|
|
||||||
|
add_task(async function() {
|
||||||
|
do_check_true("console" in this);
|
||||||
|
|
||||||
|
let p = new Promise(resolve => {
|
||||||
|
function consoleListener() {
|
||||||
|
Services.obs.addObserver(this, "console-api-log-event");
|
||||||
|
}
|
||||||
|
|
||||||
|
consoleListener.prototype = {
|
||||||
|
observe: function(aSubject, aTopic, aData) {
|
||||||
|
let obj = aSubject.wrappedJSObject;
|
||||||
|
do_check_true(obj.arguments[0] === 42, "Message received!");
|
||||||
|
do_check_true(obj.ID === "jsm", "The ID is JSM");
|
||||||
|
do_check_true(obj.innerID.endsWith("test_basic.js"), "The innerID matches");
|
||||||
|
|
||||||
|
Services.obs.removeObserver(this, "console-api-log-event");
|
||||||
|
resolve();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
new consoleListener();
|
||||||
|
});
|
||||||
|
|
||||||
|
console.log(42);
|
||||||
|
await p;
|
||||||
|
});
|
5
dom/console/tests/xpcshell/xpcshell.ini
Normal file
5
dom/console/tests/xpcshell/xpcshell.ini
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
[DEFAULT]
|
||||||
|
head =
|
||||||
|
support-files =
|
||||||
|
|
||||||
|
[test_basic.js]
|
@ -290,6 +290,8 @@ bool EventStateManager::WheelPrefs::sWheelEventsEnabledOnPlugins = true;
|
|||||||
EventStateManager::DeltaAccumulator*
|
EventStateManager::DeltaAccumulator*
|
||||||
EventStateManager::DeltaAccumulator::sInstance = nullptr;
|
EventStateManager::DeltaAccumulator::sInstance = nullptr;
|
||||||
|
|
||||||
|
bool EventStateManager::sIsInputEventsSuppressed = false;
|
||||||
|
|
||||||
EventStateManager::EventStateManager()
|
EventStateManager::EventStateManager()
|
||||||
: mLockCursor(0)
|
: mLockCursor(0)
|
||||||
, mLastFrameConsumedSetCursor(false)
|
, mLastFrameConsumedSetCursor(false)
|
||||||
|
@ -315,6 +315,22 @@ public:
|
|||||||
// wheel (as opposed to, say, a selection or touch scroll).
|
// wheel (as opposed to, say, a selection or touch scroll).
|
||||||
static bool CanVerticallyScrollFrameWithWheel(nsIFrame* aFrame);
|
static bool CanVerticallyScrollFrameWithWheel(nsIFrame* aFrame);
|
||||||
|
|
||||||
|
static void SuppressInputEvents()
|
||||||
|
{
|
||||||
|
MOZ_ASSERT(!sIsInputEventsSuppressed);
|
||||||
|
sIsInputEventsSuppressed = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void UnsuppressInputEvents()
|
||||||
|
{
|
||||||
|
sIsInputEventsSuppressed = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
static bool IsInputEventsSuppressed()
|
||||||
|
{
|
||||||
|
return sIsInputEventsSuppressed;
|
||||||
|
}
|
||||||
|
|
||||||
// Holds the point in screen coords that a mouse event was dispatched to,
|
// Holds the point in screen coords that a mouse event was dispatched to,
|
||||||
// before we went into pointer lock mode. This is constantly updated while
|
// before we went into pointer lock mode. This is constantly updated while
|
||||||
// the pointer is not locked, but we don't update it while the pointer is
|
// the pointer is not locked, but we don't update it while the pointer is
|
||||||
@ -1088,6 +1104,8 @@ private:
|
|||||||
// at the end of the input.
|
// at the end of the input.
|
||||||
static TimeStamp sLatestUserInputStart;
|
static TimeStamp sLatestUserInputStart;
|
||||||
|
|
||||||
|
static bool sIsInputEventsSuppressed;
|
||||||
|
|
||||||
RefPtr<OverOutElementsWrapper> mMouseEnterLeaveHelper;
|
RefPtr<OverOutElementsWrapper> mMouseEnterLeaveHelper;
|
||||||
nsRefPtrHashtable<nsUint32HashKey, OverOutElementsWrapper> mPointersEnterLeaveHelper;
|
nsRefPtrHashtable<nsUint32HashKey, OverOutElementsWrapper> mPointersEnterLeaveHelper;
|
||||||
|
|
||||||
|
@ -2300,7 +2300,7 @@ nsEventStatus nsPluginInstanceOwner::ProcessEvent(const WidgetGUIEvent& anEvent)
|
|||||||
rootPoint = anEvent.mRefPoint + widget->WidgetToScreenOffset();
|
rootPoint = anEvent.mRefPoint + widget->WidgetToScreenOffset();
|
||||||
}
|
}
|
||||||
#ifdef MOZ_WIDGET_GTK
|
#ifdef MOZ_WIDGET_GTK
|
||||||
Window root = GDK_ROOT_WINDOW();
|
Window root = gfxPlatform::IsHeadless() ? X11None : GDK_ROOT_WINDOW();
|
||||||
#else
|
#else
|
||||||
Window root = X11None; // Could XQueryTree, but this is not important.
|
Window root = X11None; // Could XQueryTree, but this is not important.
|
||||||
#endif
|
#endif
|
||||||
@ -2387,7 +2387,7 @@ nsEventStatus nsPluginInstanceOwner::ProcessEvent(const WidgetGUIEvent& anEvent)
|
|||||||
{
|
{
|
||||||
XKeyEvent &event = pluginEvent.xkey;
|
XKeyEvent &event = pluginEvent.xkey;
|
||||||
#ifdef MOZ_WIDGET_GTK
|
#ifdef MOZ_WIDGET_GTK
|
||||||
event.root = GDK_ROOT_WINDOW();
|
event.root = gfxPlatform::IsHeadless() ? X11None : GDK_ROOT_WINDOW();
|
||||||
event.time = anEvent.mTime;
|
event.time = anEvent.mTime;
|
||||||
const GdkEventKey* gdkEvent =
|
const GdkEventKey* gdkEvent =
|
||||||
static_cast<const GdkEventKey*>(anEvent.mPluginEvent);
|
static_cast<const GdkEventKey*>(anEvent.mPluginEvent);
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* https://console.spec.whatwg.org/#console-namespace
|
* https://console.spec.whatwg.org/#console-namespace
|
||||||
*/
|
*/
|
||||||
|
|
||||||
[Exposed=(Window,Worker,WorkerDebugger,Worklet),
|
[Exposed=(Window,Worker,WorkerDebugger,Worklet,System),
|
||||||
ClassString="Console",
|
ClassString="Console",
|
||||||
ProtoObjectHack]
|
ProtoObjectHack]
|
||||||
namespace console {
|
namespace console {
|
||||||
|
@ -2372,15 +2372,12 @@ ServiceWorkerManager::StartControllingADocument(ServiceWorkerRegistrationInfo* a
|
|||||||
// document here, our goal is to move ServiceWorkerManager to a separate
|
// document here, our goal is to move ServiceWorkerManager to a separate
|
||||||
// process. Using the ClientHandle supports this remote operation.
|
// process. Using the ClientHandle supports this remote operation.
|
||||||
ServiceWorkerInfo* activeWorker = aRegistration->GetActive();
|
ServiceWorkerInfo* activeWorker = aRegistration->GetActive();
|
||||||
nsPIDOMWindowInner* innerWindow = aDoc->GetInnerWindow();
|
Maybe<ClientInfo> clientInfo = aDoc->GetClientInfo();
|
||||||
if (activeWorker && innerWindow) {
|
if (activeWorker && clientInfo.isSome()) {
|
||||||
Maybe<ClientInfo> clientInfo = innerWindow->GetClientInfo();
|
RefPtr<ClientHandle> clientHandle =
|
||||||
if (clientInfo.isSome()) {
|
ClientManager::CreateHandle(clientInfo.ref(),
|
||||||
RefPtr<ClientHandle> clientHandle =
|
SystemGroup::EventTargetFor(TaskCategory::Other));
|
||||||
ClientManager::CreateHandle(clientInfo.ref(),
|
ref = Move(clientHandle->Control(activeWorker->Descriptor()));
|
||||||
SystemGroup::EventTargetFor(TaskCategory::Other));
|
|
||||||
ref = Move(clientHandle->Control(activeWorker->Descriptor()));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Telemetry::Accumulate(Telemetry::SERVICE_WORKER_CONTROLLED_DOCUMENTS, 1);
|
Telemetry::Accumulate(Telemetry::SERVICE_WORKER_CONTROLLED_DOCUMENTS, 1);
|
||||||
@ -2787,28 +2784,6 @@ ServiceWorkerManager::IsAvailable(nsIPrincipal* aPrincipal,
|
|||||||
return registration && registration->GetActive();
|
return registration && registration->GetActive();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
|
||||||
ServiceWorkerManager::IsControlled(nsIDocument* aDoc, ErrorResult& aRv)
|
|
||||||
{
|
|
||||||
MOZ_ASSERT(aDoc);
|
|
||||||
|
|
||||||
if (nsContentUtils::IsInPrivateBrowsing(aDoc)) {
|
|
||||||
// Handle the case where a service worker was previously registered in
|
|
||||||
// a non-private window (bug 1255621).
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
RefPtr<ServiceWorkerRegistrationInfo> registration;
|
|
||||||
nsresult rv = GetDocumentRegistration(aDoc, getter_AddRefs(registration));
|
|
||||||
if (NS_WARN_IF(NS_FAILED(rv) && rv != NS_ERROR_NOT_AVAILABLE)) {
|
|
||||||
// It's OK to ignore the case where we don't have a registration.
|
|
||||||
aRv.Throw(rv);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return !!registration;
|
|
||||||
}
|
|
||||||
|
|
||||||
nsresult
|
nsresult
|
||||||
ServiceWorkerManager::GetDocumentRegistration(nsIDocument* aDoc,
|
ServiceWorkerManager::GetDocumentRegistration(nsIDocument* aDoc,
|
||||||
ServiceWorkerRegistrationInfo** aRegistrationInfo)
|
ServiceWorkerRegistrationInfo** aRegistrationInfo)
|
||||||
@ -3273,7 +3248,7 @@ ServiceWorkerManager::UpdateClientControllers(ServiceWorkerRegistrationInfo* aRe
|
|||||||
RefPtr<ServiceWorkerInfo> activeWorker = aRegistration->GetActive();
|
RefPtr<ServiceWorkerInfo> activeWorker = aRegistration->GetActive();
|
||||||
MOZ_DIAGNOSTIC_ASSERT(activeWorker);
|
MOZ_DIAGNOSTIC_ASSERT(activeWorker);
|
||||||
|
|
||||||
AutoTArray<nsCOMPtr<nsPIDOMWindowInner>, 16> innerWindows;
|
AutoTArray<nsCOMPtr<nsIDocument>, 16> docList;
|
||||||
for (auto iter = mControlledDocuments.Iter(); !iter.Done(); iter.Next()) {
|
for (auto iter = mControlledDocuments.Iter(); !iter.Done(); iter.Next()) {
|
||||||
if (iter.UserData() != aRegistration) {
|
if (iter.UserData() != aRegistration) {
|
||||||
continue;
|
continue;
|
||||||
@ -3284,24 +3259,20 @@ ServiceWorkerManager::UpdateClientControllers(ServiceWorkerRegistrationInfo* aRe
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
nsPIDOMWindowInner* innerWindow = doc->GetInnerWindow();
|
docList.AppendElement(doc.forget());
|
||||||
if (NS_WARN_IF(!innerWindow)) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
innerWindows.AppendElement(innerWindow);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fire event after iterating mControlledDocuments is done to prevent
|
// Fire event after iterating mControlledDocuments is done to prevent
|
||||||
// modification by reentering from the event handlers during iteration.
|
// modification by reentering from the event handlers during iteration.
|
||||||
for (auto& innerWindow : innerWindows) {
|
for (auto& doc : docList) {
|
||||||
Maybe<ClientInfo> clientInfo = innerWindow->GetClientInfo();
|
Maybe<ClientInfo> clientInfo = doc->GetClientInfo();
|
||||||
if (clientInfo.isSome()) {
|
if (clientInfo.isNothing()) {
|
||||||
RefPtr<ClientHandle> clientHandle =
|
continue;
|
||||||
ClientManager::CreateHandle(clientInfo.ref(),
|
|
||||||
innerWindow->EventTargetFor(TaskCategory::Other));
|
|
||||||
clientHandle->Control(activeWorker->Descriptor());
|
|
||||||
}
|
}
|
||||||
|
RefPtr<ClientHandle> clientHandle =
|
||||||
|
ClientManager::CreateHandle(clientInfo.ref(),
|
||||||
|
SystemGroup::EventTargetFor(TaskCategory::Other));
|
||||||
|
clientHandle->Control(activeWorker->Descriptor());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -125,9 +125,6 @@ public:
|
|||||||
bool
|
bool
|
||||||
IsAvailable(nsIPrincipal* aPrincipal, nsIURI* aURI);
|
IsAvailable(nsIPrincipal* aPrincipal, nsIURI* aURI);
|
||||||
|
|
||||||
bool
|
|
||||||
IsControlled(nsIDocument* aDocument, ErrorResult& aRv);
|
|
||||||
|
|
||||||
// Return true if the given content process could potentially be executing
|
// Return true if the given content process could potentially be executing
|
||||||
// service worker code with the given principal. At the current time, this
|
// service worker code with the given principal. At the current time, this
|
||||||
// just means that we have any registration for the origin, regardless of
|
// just means that we have any registration for the origin, regardless of
|
||||||
|
@ -136,7 +136,7 @@ WorkerGlobalScope::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
|
|||||||
MOZ_CRASH("We should never get here!");
|
MOZ_CRASH("We should never get here!");
|
||||||
}
|
}
|
||||||
|
|
||||||
Console*
|
already_AddRefed<Console>
|
||||||
WorkerGlobalScope::GetConsole(ErrorResult& aRv)
|
WorkerGlobalScope::GetConsole(ErrorResult& aRv)
|
||||||
{
|
{
|
||||||
mWorkerPrivate->AssertIsOnWorkerThread();
|
mWorkerPrivate->AssertIsOnWorkerThread();
|
||||||
@ -148,7 +148,8 @@ WorkerGlobalScope::GetConsole(ErrorResult& aRv)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return mConsole;
|
RefPtr<Console> console = mConsole;
|
||||||
|
return console.forget();
|
||||||
}
|
}
|
||||||
|
|
||||||
Crypto*
|
Crypto*
|
||||||
@ -1045,7 +1046,7 @@ WorkerDebuggerGlobalScope::SetConsoleEventHandler(JSContext* aCx,
|
|||||||
console->SetConsoleEventHandler(aHandler);
|
console->SetConsoleEventHandler(aHandler);
|
||||||
}
|
}
|
||||||
|
|
||||||
Console*
|
already_AddRefed<Console>
|
||||||
WorkerDebuggerGlobalScope::GetConsole(ErrorResult& aRv)
|
WorkerDebuggerGlobalScope::GetConsole(ErrorResult& aRv)
|
||||||
{
|
{
|
||||||
mWorkerPrivate->AssertIsOnWorkerThread();
|
mWorkerPrivate->AssertIsOnWorkerThread();
|
||||||
@ -1058,7 +1059,8 @@ WorkerDebuggerGlobalScope::GetConsole(ErrorResult& aRv)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return mConsole;
|
RefPtr<Console> console = mConsole;
|
||||||
|
return console.forget();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -92,7 +92,7 @@ public:
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
Console*
|
already_AddRefed<Console>
|
||||||
GetConsole(ErrorResult& aRv);
|
GetConsole(ErrorResult& aRv);
|
||||||
|
|
||||||
Console*
|
Console*
|
||||||
@ -410,7 +410,7 @@ public:
|
|||||||
SetConsoleEventHandler(JSContext* aCx, AnyCallback* aHandler,
|
SetConsoleEventHandler(JSContext* aCx, AnyCallback* aHandler,
|
||||||
ErrorResult& aRv);
|
ErrorResult& aRv);
|
||||||
|
|
||||||
Console*
|
already_AddRefed<Console>
|
||||||
GetConsole(ErrorResult& aRv);
|
GetConsole(ErrorResult& aRv);
|
||||||
|
|
||||||
Console*
|
Console*
|
||||||
|
@ -54,7 +54,7 @@ WorkletGlobalScope::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto
|
|||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
Console*
|
already_AddRefed<Console>
|
||||||
WorkletGlobalScope::GetConsole(ErrorResult& aRv)
|
WorkletGlobalScope::GetConsole(ErrorResult& aRv)
|
||||||
{
|
{
|
||||||
if (!mConsole) {
|
if (!mConsole) {
|
||||||
@ -64,7 +64,8 @@ WorkletGlobalScope::GetConsole(ErrorResult& aRv)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return mConsole;
|
RefPtr<Console> console = mConsole;
|
||||||
|
return console.forget();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -54,7 +54,7 @@ public:
|
|||||||
return GetWrapper();
|
return GetWrapper();
|
||||||
}
|
}
|
||||||
|
|
||||||
Console*
|
already_AddRefed<Console>
|
||||||
GetConsole(ErrorResult& aRv);
|
GetConsole(ErrorResult& aRv);
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -168,7 +168,7 @@ ImageCacheKey::GetControlledDocumentToken(nsIDocument* aDocument)
|
|||||||
RefPtr<ServiceWorkerManager> swm = ServiceWorkerManager::GetInstance();
|
RefPtr<ServiceWorkerManager> swm = ServiceWorkerManager::GetInstance();
|
||||||
if (aDocument && swm) {
|
if (aDocument && swm) {
|
||||||
ErrorResult rv;
|
ErrorResult rv;
|
||||||
if (swm->IsControlled(aDocument, rv)) {
|
if (aDocument->GetController().isSome()) {
|
||||||
pointer = aDocument;
|
pointer = aDocument;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -13,6 +13,8 @@
|
|||||||
#include "mozilla/EndianUtils.h"
|
#include "mozilla/EndianUtils.h"
|
||||||
#include "mozilla/Move.h"
|
#include "mozilla/Move.h"
|
||||||
|
|
||||||
|
#include "mozilla/gfx/Swizzle.h"
|
||||||
|
|
||||||
#include "RasterImage.h"
|
#include "RasterImage.h"
|
||||||
|
|
||||||
using namespace mozilla::gfx;
|
using namespace mozilla::gfx;
|
||||||
@ -618,6 +620,13 @@ nsICODecoder::FinishMask()
|
|||||||
for (size_t i = 3 ; i < bmpDecoder->GetImageDataLength() ; i += 4) {
|
for (size_t i = 3 ; i < bmpDecoder->GetImageDataLength() ; i += 4) {
|
||||||
imageData[i] = mMaskBuffer[i];
|
imageData[i] = mMaskBuffer[i];
|
||||||
}
|
}
|
||||||
|
int32_t stride = mDownscaler->TargetSize().width * sizeof(uint32_t);
|
||||||
|
DebugOnly<bool> ret =
|
||||||
|
// We know the format is B8G8R8A8 because we always assume bmp's inside
|
||||||
|
// ico's are transparent.
|
||||||
|
PremultiplyData(imageData, stride, SurfaceFormat::B8G8R8A8,
|
||||||
|
imageData, stride, SurfaceFormat::B8G8R8A8, mDownscaler->TargetSize());
|
||||||
|
MOZ_ASSERT(ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
return Transition::To(ICOState::FINISHED_RESOURCE, 0);
|
return Transition::To(ICOState::FINISHED_RESOURCE, 0);
|
||||||
|
14
image/test/reftest/downscaling/1404366-1.html
Normal file
14
image/test/reftest/downscaling/1404366-1.html
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<body>
|
||||||
|
<!--
|
||||||
|
1404366-1.ico is an ico file that contains a 32x32 0RGB (0 for all alpha values) bmp
|
||||||
|
where the color values are all white. It also contains a mask. The mask alternates
|
||||||
|
one pixel fully transparent, one pixel fully opaque. The result of drawing this on
|
||||||
|
a white background should be white. This is testing that we premultiply the color
|
||||||
|
values by the alpha derived from the mark when downscaling. If we do not skia will
|
||||||
|
get confused and likely draw non white pixels.
|
||||||
|
-->
|
||||||
|
<img src="1404366-1.ico" style="width: 12px; height: 12px;">
|
||||||
|
</body>
|
||||||
|
</html>
|
BIN
image/test/reftest/downscaling/1404366-1.ico
Normal file
BIN
image/test/reftest/downscaling/1404366-1.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.2 KiB |
@ -210,5 +210,6 @@ fuzzy(18,128) == downscale-32px.html?-png-in.ico downscale-32px-ref.html
|
|||||||
== huge-1.html?32768x100.jpg,100,100 huge-1.html?100x100.jpg,100,100
|
== huge-1.html?32768x100.jpg,100,100 huge-1.html?100x100.jpg,100,100
|
||||||
== huge-1.html?32768x100.jpg,32768,100 huge-1.html?100x100.jpg,32768,100
|
== huge-1.html?32768x100.jpg,32768,100 huge-1.html?100x100.jpg,32768,100
|
||||||
|
|
||||||
# Only need to run this with downscaling on
|
# Only need to run these with downscaling on
|
||||||
!= 1421191-1.html about:blank
|
!= 1421191-1.html about:blank
|
||||||
|
== 1404366-1.html about:blank
|
||||||
|
@ -23,14 +23,16 @@ available on linux64, and is built via the following procedure:
|
|||||||
% export PATH=$PATH:$(pwd)/depot_tools
|
% export PATH=$PATH:$(pwd)/depot_tools
|
||||||
% mkdir breakpad
|
% mkdir breakpad
|
||||||
% cd breakpad
|
% cd breakpad
|
||||||
|
# python must be python2.7
|
||||||
% fetch breakpad
|
% fetch breakpad
|
||||||
% cd src
|
% cd src
|
||||||
% git fetch https://github.com/hotsphink/breakpad injector
|
% git fetch https://github.com/hotsphink/breakpad injector
|
||||||
% git checkout injector
|
% git checkout FETCH_HEAD
|
||||||
% cd ..
|
% cd ..
|
||||||
% mkdir obj
|
% mkdir obj
|
||||||
% cd obj
|
% cd obj
|
||||||
% ../src/configure
|
# Possibly set $PATH to include a recent gcc
|
||||||
|
% ../src/configure --enable-static
|
||||||
% mkdir ../root
|
% mkdir ../root
|
||||||
% make install DESTDIR=$(pwd)/../root
|
% make install DESTDIR=$(pwd)/../root
|
||||||
|
|
||||||
|
@ -367,14 +367,17 @@ if not args.nobuild:
|
|||||||
if use_minidump:
|
if use_minidump:
|
||||||
# Convert symbols to breakpad format.
|
# Convert symbols to breakpad format.
|
||||||
hostdir = os.path.join(OBJDIR, "dist", "host", "bin")
|
hostdir = os.path.join(OBJDIR, "dist", "host", "bin")
|
||||||
os.makedirs(hostdir)
|
if not os.path.isdir(hostdir):
|
||||||
|
os.makedirs(hostdir)
|
||||||
shutil.copy(os.path.join(DIR.tooltool, "breakpad-tools", "dump_syms"),
|
shutil.copy(os.path.join(DIR.tooltool, "breakpad-tools", "dump_syms"),
|
||||||
os.path.join(hostdir, 'dump_syms'))
|
os.path.join(hostdir, 'dump_syms'))
|
||||||
run_command([
|
run_command([
|
||||||
'make',
|
'make',
|
||||||
'recurse_syms',
|
'recurse_syms',
|
||||||
'MOZ_SOURCE_REPO=file://' + DIR.source,
|
'MOZ_SOURCE_REPO=file://' + DIR.source,
|
||||||
'RUST_TARGET=0', 'RUSTC_COMMIT=0'
|
'RUST_TARGET=0', 'RUSTC_COMMIT=0',
|
||||||
|
'MOZ_CRASHREPORTER=1',
|
||||||
|
'MOZ_AUTOMATION_BUILD_SYMBOLS=1',
|
||||||
], check=True)
|
], check=True)
|
||||||
|
|
||||||
COMMAND_PREFIX = []
|
COMMAND_PREFIX = []
|
||||||
|
@ -206,12 +206,18 @@ case "$target" in
|
|||||||
AC_SUBST(MSVC_C_RUNTIME_DLL)
|
AC_SUBST(MSVC_C_RUNTIME_DLL)
|
||||||
AC_SUBST(MSVC_CXX_RUNTIME_DLL)
|
AC_SUBST(MSVC_CXX_RUNTIME_DLL)
|
||||||
|
|
||||||
# Check linker version
|
# Check linker version, except in lld builds
|
||||||
_LD_FULL_VERSION=`"${LINK}" -v 2>&1 | sed -nre "$_MSVC_VER_FILTER"`
|
case "$LINKER" in
|
||||||
_LD_MAJOR_VERSION=`echo ${_LD_FULL_VERSION} | $AWK -F\. '{ print $1 }'`
|
*lld*)
|
||||||
if test "$_LD_MAJOR_VERSION" != "$_CC_SUITE"; then
|
;;
|
||||||
AC_MSG_ERROR([The linker major version, $_LD_FULL_VERSION, does not match the compiler suite version, $_CC_SUITE.])
|
*)
|
||||||
fi
|
_LD_FULL_VERSION=`"${LINKER}" -v 2>&1 | sed -nre "$_MSVC_VER_FILTER"`
|
||||||
|
_LD_MAJOR_VERSION=`echo ${_LD_FULL_VERSION} | $AWK -F\. '{ print $1 }'`
|
||||||
|
if test "$_LD_MAJOR_VERSION" != "$_CC_SUITE"; then
|
||||||
|
AC_MSG_ERROR([The linker major version, $_LD_FULL_VERSION, does not match the compiler suite version, $_CC_SUITE.])
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
INCREMENTAL_LINKER=1
|
INCREMENTAL_LINKER=1
|
||||||
|
|
||||||
@ -675,8 +681,8 @@ case "$target" in
|
|||||||
RANLIB='echo not_ranlib'
|
RANLIB='echo not_ranlib'
|
||||||
STRIP='echo not_strip'
|
STRIP='echo not_strip'
|
||||||
PKG_SKIP_STRIP=1
|
PKG_SKIP_STRIP=1
|
||||||
MKSHLIB='$(LINK) -NOLOGO -DLL -OUT:$@ -PDB:$(LINK_PDBFILE) $(DSO_LDOPTS)'
|
MKSHLIB='$(LINKER) -NOLOGO -DLL -OUT:$@ -PDB:$(LINK_PDBFILE) $(DSO_LDOPTS)'
|
||||||
MKCSHLIB='$(LINK) -NOLOGO -DLL -OUT:$@ -PDB:$(LINK_PDBFILE) $(DSO_LDOPTS)'
|
MKCSHLIB='$(LINKER) -NOLOGO -DLL -OUT:$@ -PDB:$(LINK_PDBFILE) $(DSO_LDOPTS)'
|
||||||
WIN32_SUBSYSTEM_VERSION=6.01
|
WIN32_SUBSYSTEM_VERSION=6.01
|
||||||
WIN32_CONSOLE_EXE_LDFLAGS=-SUBSYSTEM:CONSOLE,$WIN32_SUBSYSTEM_VERSION
|
WIN32_CONSOLE_EXE_LDFLAGS=-SUBSYSTEM:CONSOLE,$WIN32_SUBSYSTEM_VERSION
|
||||||
WIN32_GUI_EXE_LDFLAGS=-SUBSYSTEM:WINDOWS,$WIN32_SUBSYSTEM_VERSION
|
WIN32_GUI_EXE_LDFLAGS=-SUBSYSTEM:WINDOWS,$WIN32_SUBSYSTEM_VERSION
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
# waitpid to dispatch tasks. This avoids several deadlocks that are possible
|
# waitpid to dispatch tasks. This avoids several deadlocks that are possible
|
||||||
# with fork/exec + threads + Python.
|
# with fork/exec + threads + Python.
|
||||||
|
|
||||||
import errno, os, select, sys
|
import errno, os, select, signal, sys
|
||||||
from datetime import datetime, timedelta
|
from datetime import datetime, timedelta
|
||||||
from progressbar import ProgressBar
|
from progressbar import ProgressBar
|
||||||
from results import NullTestOutput, TestOutput, escape_cmdline
|
from results import NullTestOutput, TestOutput, escape_cmdline
|
||||||
@ -131,14 +131,16 @@ def remove_task(tasks, pid):
|
|||||||
|
|
||||||
def timed_out(task, timeout):
|
def timed_out(task, timeout):
|
||||||
"""
|
"""
|
||||||
Return True if the given task has been running for longer than |timeout|.
|
Return a timedelta with the amount we are overdue, or False if the timeout
|
||||||
|timeout| may be falsy, indicating an infinite timeout (in which case
|
has not yet been reached (or timeout is falsy, indicating there is no
|
||||||
timed_out always returns False).
|
timeout.)
|
||||||
"""
|
"""
|
||||||
if timeout:
|
if not timeout:
|
||||||
now = datetime.now()
|
return False
|
||||||
return (now - task.start) > timedelta(seconds=timeout)
|
|
||||||
return False
|
elapsed = datetime.now() - task.start
|
||||||
|
over = elapsed - timedelta(seconds=timeout)
|
||||||
|
return over if over.total_seconds() > 0 else False
|
||||||
|
|
||||||
def reap_zombies(tasks, timeout):
|
def reap_zombies(tasks, timeout):
|
||||||
"""
|
"""
|
||||||
@ -181,11 +183,17 @@ def reap_zombies(tasks, timeout):
|
|||||||
|
|
||||||
def kill_undead(tasks, timeout):
|
def kill_undead(tasks, timeout):
|
||||||
"""
|
"""
|
||||||
Signal all children that are over the given timeout.
|
Signal all children that are over the given timeout. Use SIGABRT first to
|
||||||
|
generate a stack dump. If it still doesn't die for another 30 seconds, kill
|
||||||
|
with SIGKILL.
|
||||||
"""
|
"""
|
||||||
for task in tasks:
|
for task in tasks:
|
||||||
if timed_out(task, timeout):
|
over = timed_out(task, timeout)
|
||||||
os.kill(task.pid, 9)
|
if over:
|
||||||
|
if over.total_seconds() < 30:
|
||||||
|
os.kill(task.pid, signal.SIGABRT)
|
||||||
|
else:
|
||||||
|
os.kill(task.pid, signal.SIGKILL)
|
||||||
|
|
||||||
def run_all_tests(tests, prefix, pb, options):
|
def run_all_tests(tests, prefix, pb, options):
|
||||||
# Copy and reverse for fast pop off end.
|
# Copy and reverse for fast pop off end.
|
||||||
|
@ -6931,6 +6931,16 @@ PresShell::HandleEvent(nsIFrame* aFrame,
|
|||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (EventStateManager::IsInputEventsSuppressed() &&
|
||||||
|
(aEvent->mClass == eMouseEventClass ||
|
||||||
|
aEvent->mClass == eWheelEventClass ||
|
||||||
|
aEvent->mClass == ePointerEventClass ||
|
||||||
|
aEvent->mClass == eTouchEventClass ||
|
||||||
|
aEvent->mClass == eKeyboardEventClass ||
|
||||||
|
aEvent->mClass == eCompositionEventClass)) {
|
||||||
|
return NS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
RecordMouseLocation(aEvent);
|
RecordMouseLocation(aEvent);
|
||||||
|
|
||||||
if (AccessibleCaretEnabled(mDocument->GetDocShell())) {
|
if (AccessibleCaretEnabled(mDocument->GetDocShell())) {
|
||||||
|
@ -27,7 +27,7 @@ function doShiftDrag(){
|
|||||||
// key, follows by two mouse move events.
|
// key, follows by two mouse move events.
|
||||||
|
|
||||||
// Press on left-top corner of the canvas element.
|
// Press on left-top corner of the canvas element.
|
||||||
wu.sendMouseEvent('mousedown', canvasRect.left, canvasRect.top, 0, 1, 4);
|
wu.sendMouseEvent('mousedown', canvasRect.left + 1, canvasRect.top + 1, 0, 1, 4);
|
||||||
// Move to the center of this cavas element.
|
// Move to the center of this cavas element.
|
||||||
wu.sendMouseEvent('mousemove', canvasRect.left + (canvasRect.width / 2),
|
wu.sendMouseEvent('mousemove', canvasRect.left + (canvasRect.width / 2),
|
||||||
canvasRect.top + (canvasRect.height / 2), 0, 0, 4);
|
canvasRect.top + (canvasRect.height / 2), 0, 0, 4);
|
||||||
|
@ -315,7 +315,7 @@ add_task(async function test_activeTab_pageAction_popup() {
|
|||||||
const popupTabId = popupTab.id;
|
const popupTabId = popupTab.id;
|
||||||
|
|
||||||
let onceTabClosed = new Promise(resolve => {
|
let onceTabClosed = new Promise(resolve => {
|
||||||
BrowserApp.deck.addEventListener("TabClose", resolve, {once: true});
|
BrowserApp.deck.addEventListener("TabClose", () => setTimeout(resolve, 0), {once: true});
|
||||||
});
|
});
|
||||||
|
|
||||||
// Switch to the parent tab of the popup tab.
|
// Switch to the parent tab of the popup tab.
|
||||||
@ -444,7 +444,7 @@ add_task(async function test_activeTab_browserAction_popup() {
|
|||||||
const popupTabId = popupTab.id;
|
const popupTabId = popupTab.id;
|
||||||
|
|
||||||
let onceTabClosed = new Promise(resolve => {
|
let onceTabClosed = new Promise(resolve => {
|
||||||
BrowserApp.deck.addEventListener("TabClose", resolve, {once: true});
|
BrowserApp.deck.addEventListener("TabClose", () => setTimeout(resolve, 0), {once: true});
|
||||||
});
|
});
|
||||||
|
|
||||||
// Switch to the parent tab of the popup tab.
|
// Switch to the parent tab of the popup tab.
|
||||||
|
@ -45,12 +45,10 @@ public class GeckoDisplay {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Optional callback. The display's coordinates on the screen has changed. Must be
|
* Optional callback. The display's coordinates on the screen has changed. Must be
|
||||||
* called on the application main thread. Together with the transformation matrix, the
|
* called on the application main thread.
|
||||||
* screen origin determines how a point on the display maps to a point on the screen.
|
|
||||||
*
|
*
|
||||||
* @param left The X coordinate of the display on the screen, in screen pixels.
|
* @param left The X coordinate of the display on the screen, in screen pixels.
|
||||||
* @param top The Y coordinate of the display on the screen, in screen pixels.
|
* @param top The Y coordinate of the display on the screen, in screen pixels.
|
||||||
* @see #transformationMatrixChanged(Matrix)
|
|
||||||
*/
|
*/
|
||||||
public void screenOriginChanged(final int left, final int top) {
|
public void screenOriginChanged(final int left, final int top) {
|
||||||
mSession.onScreenOriginChanged(left, top);
|
mSession.onScreenOriginChanged(left, top);
|
||||||
|
@ -117,11 +117,7 @@ LoadInfo::LoadInfo(nsIPrincipal* aLoadingPrincipal,
|
|||||||
// Ensure that all network requests for a window client have the ClientInfo
|
// Ensure that all network requests for a window client have the ClientInfo
|
||||||
// properly set.
|
// properly set.
|
||||||
// TODO: The ClientInfo is not set properly for worker initiated requests yet.
|
// TODO: The ClientInfo is not set properly for worker initiated requests yet.
|
||||||
nsCOMPtr<nsPIDOMWindowInner> contextInner =
|
mClientInfo = aLoadingContext->OwnerDoc()->GetClientInfo();
|
||||||
aLoadingContext->OwnerDoc()->GetInnerWindow();
|
|
||||||
if (contextInner) {
|
|
||||||
mClientInfo = contextInner->GetClientInfo();
|
|
||||||
}
|
|
||||||
|
|
||||||
nsCOMPtr<nsPIDOMWindowOuter> contextOuter = aLoadingContext->OwnerDoc()->GetWindow();
|
nsCOMPtr<nsPIDOMWindowOuter> contextOuter = aLoadingContext->OwnerDoc()->GetWindow();
|
||||||
if (contextOuter) {
|
if (contextOuter) {
|
||||||
|
@ -395,6 +395,7 @@ TCPFastOpenFinish(PRFileDesc *fd, PRErrorCode &err,
|
|||||||
// We will disable Fast Open.
|
// We will disable Fast Open.
|
||||||
SOCKET_LOG(("TCPFastOpenFinish - sendto not implemented.\n"));
|
SOCKET_LOG(("TCPFastOpenFinish - sendto not implemented.\n"));
|
||||||
fastOpenNotSupported = true;
|
fastOpenNotSupported = true;
|
||||||
|
tfoStatus = TFO_DISABLED;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// We have some data ready in the buffer we will send it with the syn
|
// We have some data ready in the buffer we will send it with the syn
|
||||||
@ -432,6 +433,7 @@ TCPFastOpenFinish(PRFileDesc *fd, PRErrorCode &err,
|
|||||||
} else {
|
} else {
|
||||||
result = PR_GetError();
|
result = PR_GetError();
|
||||||
}
|
}
|
||||||
|
tfoStatus = TFO_DISABLED;
|
||||||
} else {
|
} else {
|
||||||
tfoStatus = TFO_TRIED;
|
tfoStatus = TFO_TRIED;
|
||||||
}
|
}
|
||||||
|
@ -20,17 +20,51 @@ namespace net {
|
|||||||
**/
|
**/
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
TFO_NOT_TRIED,
|
TFO_NOT_SET, // This is only as a control.
|
||||||
TFO_TRIED,
|
// A connection not using TFO will have the TFO state set upon
|
||||||
TFO_DATA_SENT,
|
// connection creation (in nsHalfOpenSocket::SetupConn).
|
||||||
|
// A connection using TFO will have the TFO state set after
|
||||||
|
// the connection is established or canceled.
|
||||||
|
TFO_UNKNOWN, // This is before the primary socket is built, i.e. before
|
||||||
|
// TCPFastOpenFinish is called.
|
||||||
|
TFO_DISABLED, // tfo is disabled because of a tfo error on a previous
|
||||||
|
// connection to the host (i.e. !mEnt->mUseFastOpen).
|
||||||
|
// If TFO is not supported by the OS, it is disabled by
|
||||||
|
// the pref or too many consecutive errors occurred, this value
|
||||||
|
// is not reported. This is set before StartFastOpen is called.
|
||||||
|
TFO_DISABLED_CONNECT, // Connection is using CONNECT. This is set before
|
||||||
|
// StartFastOpen is called.
|
||||||
|
// The following 3 are set just after TCPFastOpenFinish.
|
||||||
|
TFO_NOT_TRIED, // For some reason TCPFastOpenLayer does not have any data to
|
||||||
|
// send with the syn packet. This should never happen.
|
||||||
|
TFO_TRIED, // TCP has sent a TFO cookie request.
|
||||||
|
TFO_DATA_SENT, // On Linux, TCP has send data as well. (On Linux we do not
|
||||||
|
// know whether data has been accepted).
|
||||||
|
// On Windows, TCP has send data or only a TFO cookie request
|
||||||
|
// and the data or TFO cookie has been accepted by the server.
|
||||||
|
// The following value is only used on windows and is set after
|
||||||
|
// PR_ConnectContinue. That is the point when we know if TFO data was been
|
||||||
|
// accepted.
|
||||||
|
TFO_DATA_COOKIE_NOT_ACCEPTED, // This is only on Windows. TFO data or TFO
|
||||||
|
// cookie request has not been accepted.
|
||||||
|
// The following 3 are set during socket error recover
|
||||||
|
// (nsSocketTransport::RecoverFromError).
|
||||||
TFO_FAILED_CONNECTION_REFUSED,
|
TFO_FAILED_CONNECTION_REFUSED,
|
||||||
TFO_FAILED_NET_TIMEOUT,
|
TFO_FAILED_NET_TIMEOUT,
|
||||||
TFO_FAILED_UNKNOW_ERROR,
|
TFO_FAILED_UNKNOW_ERROR,
|
||||||
TFO_FAILED_BACKUP_CONNECTION,
|
// The following 4 are set when backup connection finishes before the primary
|
||||||
|
// connection.
|
||||||
|
TFO_FAILED_BACKUP_CONNECTION_TFO_NOT_TRIED,
|
||||||
|
TFO_FAILED_BACKUP_CONNECTION_TFO_TRIED,
|
||||||
|
TFO_FAILED_BACKUP_CONNECTION_TFO_DATA_SENT,
|
||||||
|
TFO_FAILED_BACKUP_CONNECTION_TFO_DATA_COOKIE_NOT_ACCEPTED,
|
||||||
|
// The following 4 are set when the recovery connection fails as well.
|
||||||
TFO_FAILED_CONNECTION_REFUSED_NO_TFO_FAILED_TOO,
|
TFO_FAILED_CONNECTION_REFUSED_NO_TFO_FAILED_TOO,
|
||||||
TFO_FAILED_NET_TIMEOUT__NO_TFO_FAILED_TOO,
|
TFO_FAILED_NET_TIMEOUT_NO_TFO_FAILED_TOO,
|
||||||
TFO_FAILED_UNKNOW_ERROR_NO_TFO_FAILED_TOO,
|
TFO_FAILED_UNKNOW_ERROR_NO_TFO_FAILED_TOO,
|
||||||
TFO_FAILED_BACKUP_CONNECTION_NO_TFO_FAILED_TOO,
|
TFO_FAILED_BACKUP_CONNECTION_NO_TFO_FAILED_TOO,
|
||||||
|
TFO_BACKUP_CONN, // This is a backup conn, for a halfOpenSock that was used
|
||||||
|
// TFO.
|
||||||
TFO_FAILED,
|
TFO_FAILED,
|
||||||
TFO_HTTP // TFO is disabled for non-secure connections.
|
TFO_HTTP // TFO is disabled for non-secure connections.
|
||||||
} TFOResult;
|
} TFOResult;
|
||||||
|
@ -799,7 +799,7 @@ nsSocketTransport::nsSocketTransport()
|
|||||||
, mKeepaliveProbeCount(-1)
|
, mKeepaliveProbeCount(-1)
|
||||||
, mFastOpenCallback(nullptr)
|
, mFastOpenCallback(nullptr)
|
||||||
, mFastOpenLayerHasBufferedData(false)
|
, mFastOpenLayerHasBufferedData(false)
|
||||||
, mFastOpenStatus(TFO_NOT_TRIED)
|
, mFastOpenStatus(TFO_NOT_SET)
|
||||||
, mFirstRetryError(NS_OK)
|
, mFirstRetryError(NS_OK)
|
||||||
, mDoNotRetryToConnect(false)
|
, mDoNotRetryToConnect(false)
|
||||||
{
|
{
|
||||||
@ -2214,9 +2214,9 @@ nsSocketTransport::OnSocketReady(PRFileDesc *fd, int16_t outFlags)
|
|||||||
BOOL option = 0;
|
BOOL option = 0;
|
||||||
int len = sizeof(option);
|
int len = sizeof(option);
|
||||||
PRInt32 rv = getsockopt((SOCKET)osfd, IPPROTO_TCP, TCP_FASTOPEN, (char*)&option, &len);
|
PRInt32 rv = getsockopt((SOCKET)osfd, IPPROTO_TCP, TCP_FASTOPEN, (char*)&option, &len);
|
||||||
if ((rv != 0) && !option) {
|
if (!rv && !option) {
|
||||||
// On error, I will let the normal necko paths pickup the error.
|
// On error, I will let the normal necko paths pickup the error.
|
||||||
mFastOpenCallback->SetFastOpenStatus(TFO_NOT_TRIED);
|
mFastOpenCallback->SetFastOpenStatus(TFO_DATA_COOKIE_NOT_ACCEPTED);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -1100,6 +1100,19 @@ HttpChannelChild::OnStopRequest(const nsresult& channelStatus,
|
|||||||
// DoOnStopRequest() calls ReleaseListeners()
|
// DoOnStopRequest() calls ReleaseListeners()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If unknownDecoder is involved and the received content is short we will
|
||||||
|
// know whether we need to divert to parent only after OnStopRequest of the
|
||||||
|
// listeners chain is called in DoOnStopRequest. At that moment
|
||||||
|
// unknownDecoder will call OnStartRequest of the real listeners of the
|
||||||
|
// channel including the OnStopRequest of UrlLoader which decides whether we
|
||||||
|
// need to divert to parent.
|
||||||
|
// If we are diverting to parent we should not do a cleanup.
|
||||||
|
if (mDivertingToParent) {
|
||||||
|
LOG(("HttpChannelChild::OnStopRequest - We are diverting to parent, "
|
||||||
|
"postpone cleaning up."));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
CleanupBackgroundChannel();
|
CleanupBackgroundChannel();
|
||||||
|
|
||||||
// If there is a possibility we might want to write alt data to the cache
|
// If there is a possibility we might want to write alt data to the cache
|
||||||
|
@ -87,7 +87,7 @@ nsHttpConnection::nsHttpConnection()
|
|||||||
, mEarlyDataNegotiated(false)
|
, mEarlyDataNegotiated(false)
|
||||||
, mDid0RTTSpdy(false)
|
, mDid0RTTSpdy(false)
|
||||||
, mFastOpen(false)
|
, mFastOpen(false)
|
||||||
, mFastOpenStatus(TFO_NOT_TRIED)
|
, mFastOpenStatus(TFO_NOT_SET)
|
||||||
, mForceSendDuringFastOpenPending(false)
|
, mForceSendDuringFastOpenPending(false)
|
||||||
, mReceivedSocketWouldBlockDuringFastOpen(false)
|
, mReceivedSocketWouldBlockDuringFastOpen(false)
|
||||||
{
|
{
|
||||||
@ -127,12 +127,12 @@ nsHttpConnection::~nsHttpConnection()
|
|||||||
|
|
||||||
if ((mFastOpenStatus != TFO_FAILED) &&
|
if ((mFastOpenStatus != TFO_FAILED) &&
|
||||||
(mFastOpenStatus != TFO_HTTP) &&
|
(mFastOpenStatus != TFO_HTTP) &&
|
||||||
((mFastOpenStatus != TFO_NOT_TRIED) ||
|
((mFastOpenStatus != TFO_DISABLED) ||
|
||||||
gHttpHandler->UseFastOpen())) {
|
gHttpHandler->UseFastOpen())) {
|
||||||
// TFO_FAILED will be reported in the replacement connection with more
|
// TFO_FAILED will be reported in the replacement connection with more
|
||||||
// details.
|
// details.
|
||||||
// Otherwise report only if TFO is enabled and supported.
|
// Otherwise report only if TFO is enabled and supported.
|
||||||
Telemetry::Accumulate(Telemetry::TCP_FAST_OPEN_2, mFastOpenStatus);
|
Telemetry::Accumulate(Telemetry::TCP_FAST_OPEN_3, mFastOpenStatus);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2446,11 +2446,20 @@ void
|
|||||||
nsHttpConnection::SetFastOpenStatus(uint8_t tfoStatus) {
|
nsHttpConnection::SetFastOpenStatus(uint8_t tfoStatus) {
|
||||||
mFastOpenStatus = tfoStatus;
|
mFastOpenStatus = tfoStatus;
|
||||||
if ((mFastOpenStatus >= TFO_FAILED_CONNECTION_REFUSED) &&
|
if ((mFastOpenStatus >= TFO_FAILED_CONNECTION_REFUSED) &&
|
||||||
|
(mFastOpenStatus <= TFO_FAILED_BACKUP_CONNECTION_TFO_DATA_COOKIE_NOT_ACCEPTED) &&
|
||||||
mSocketTransport) {
|
mSocketTransport) {
|
||||||
nsresult firstRetryError;
|
nsresult firstRetryError;
|
||||||
if (NS_SUCCEEDED(mSocketTransport->GetFirstRetryError(&firstRetryError)) &&
|
if (NS_SUCCEEDED(mSocketTransport->GetFirstRetryError(&firstRetryError)) &&
|
||||||
(NS_FAILED(firstRetryError))) {
|
(NS_FAILED(firstRetryError))) {
|
||||||
mFastOpenStatus = tfoStatus + 4;
|
if ((mFastOpenStatus >= TFO_FAILED_BACKUP_CONNECTION_TFO_NOT_TRIED) &&
|
||||||
|
(mFastOpenStatus <= TFO_FAILED_BACKUP_CONNECTION_TFO_DATA_COOKIE_NOT_ACCEPTED)) {
|
||||||
|
mFastOpenStatus = TFO_FAILED_BACKUP_CONNECTION_NO_TFO_FAILED_TOO;
|
||||||
|
} else {
|
||||||
|
// We add +7 to tranform TFO_FAILED_CONNECTION_REFUSED into
|
||||||
|
// TFO_FAILED_CONNECTION_REFUSED_NO_TFO_FAILED_TOO, etc.
|
||||||
|
// If the list in TCPFastOpenLayer.h changes please addapt +7.
|
||||||
|
mFastOpenStatus = tfoStatus + 7;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3855,6 +3855,7 @@ nsHalfOpenSocket::nsHalfOpenSocket(nsConnectionEntry *ent,
|
|||||||
, mHasConnected(false)
|
, mHasConnected(false)
|
||||||
, mPrimaryConnectedOK(false)
|
, mPrimaryConnectedOK(false)
|
||||||
, mBackupConnectedOK(false)
|
, mBackupConnectedOK(false)
|
||||||
|
, mBackupConnStatsSet(false)
|
||||||
, mFreeToUse(true)
|
, mFreeToUse(true)
|
||||||
, mPrimaryStreamStatus(NS_OK)
|
, mPrimaryStreamStatus(NS_OK)
|
||||||
, mFastOpenInProgress(false)
|
, mFastOpenInProgress(false)
|
||||||
@ -3875,7 +3876,7 @@ nsHalfOpenSocket::nsHalfOpenSocket(nsConnectionEntry *ent,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (mEnt->mConnInfo->FirstHopSSL()) {
|
if (mEnt->mConnInfo->FirstHopSSL()) {
|
||||||
mFastOpenStatus = TFO_NOT_TRIED;
|
mFastOpenStatus = TFO_UNKNOWN;
|
||||||
} else {
|
} else {
|
||||||
mFastOpenStatus = TFO_HTTP;
|
mFastOpenStatus = TFO_HTTP;
|
||||||
}
|
}
|
||||||
@ -3985,8 +3986,12 @@ nsHalfOpenSocket::SetupStreams(nsISocketTransport **transport,
|
|||||||
tmpFlags |= nsISocketTransport::DISABLE_RFC1918;
|
tmpFlags |= nsISocketTransport::DISABLE_RFC1918;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isBackup && mEnt->mUseFastOpen) {
|
if (!isBackup) {
|
||||||
socketTransport->SetFastOpenCallback(this);
|
if (mEnt->mUseFastOpen) {
|
||||||
|
socketTransport->SetFastOpenCallback(this);
|
||||||
|
} else {
|
||||||
|
mFastOpenStatus = TFO_DISABLED;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
socketTransport->SetConnectionFlags(tmpFlags);
|
socketTransport->SetConnectionFlags(tmpFlags);
|
||||||
@ -4310,9 +4315,30 @@ nsHalfOpenSocket::OnOutputStreamReady(nsIAsyncOutputStream *out)
|
|||||||
|
|
||||||
mFastOpenInProgress = false;
|
mFastOpenInProgress = false;
|
||||||
mConnectionNegotiatingFastOpen = nullptr;
|
mConnectionNegotiatingFastOpen = nullptr;
|
||||||
mFastOpenStatus = TFO_FAILED_BACKUP_CONNECTION;
|
if (mFastOpenStatus == TFO_NOT_TRIED) {
|
||||||
|
mFastOpenStatus = TFO_FAILED_BACKUP_CONNECTION_TFO_NOT_TRIED;
|
||||||
|
} else if (mFastOpenStatus == TFO_TRIED) {
|
||||||
|
mFastOpenStatus = TFO_FAILED_BACKUP_CONNECTION_TFO_TRIED;
|
||||||
|
} else if (mFastOpenStatus == TFO_DATA_SENT) {
|
||||||
|
mFastOpenStatus = TFO_FAILED_BACKUP_CONNECTION_TFO_DATA_SENT;
|
||||||
|
} else {
|
||||||
|
// This is TFO_DATA_COOKIE_NOT_ACCEPTED (I think this cannot
|
||||||
|
// happened, because the primary connection will be already
|
||||||
|
// connected or in recovery and mFastOpenInProgress==false).
|
||||||
|
mFastOpenStatus = TFO_FAILED_BACKUP_CONNECTION_TFO_DATA_COOKIE_NOT_ACCEPTED;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (((mFastOpenStatus == TFO_DISABLED) ||
|
||||||
|
(mFastOpenStatus == TFO_HTTP)) && !mBackupConnStatsSet) {
|
||||||
|
// Collect telemetry for backup connection being faster than primary
|
||||||
|
// connection. We want to collect this telemetry only for cases where
|
||||||
|
// TFO is not used.
|
||||||
|
mBackupConnStatsSet = true;
|
||||||
|
Telemetry::ScalarSet(Telemetry::ScalarID::NETWORK_HTTP_BACKUP_CONN_WON,
|
||||||
|
(out == mBackupStreamOut));
|
||||||
|
}
|
||||||
|
|
||||||
nsresult rv = SetupConn(out, false);
|
nsresult rv = SetupConn(out, false);
|
||||||
if (mEnt) {
|
if (mEnt) {
|
||||||
mEnt->mDoNotDestroy = false;
|
mEnt->mDoNotDestroy = false;
|
||||||
@ -4332,6 +4358,8 @@ nsHalfOpenSocket::FastOpenEnabled()
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MOZ_ASSERT(mEnt->mConnInfo->FirstHopSSL());
|
||||||
|
|
||||||
// If mEnt is present this HalfOpen must be in the mHalfOpens,
|
// If mEnt is present this HalfOpen must be in the mHalfOpens,
|
||||||
// but we want to be sure!!!
|
// but we want to be sure!!!
|
||||||
if (!mEnt->mHalfOpens.Contains(this)) {
|
if (!mEnt->mHalfOpens.Contains(this)) {
|
||||||
@ -4342,6 +4370,7 @@ nsHalfOpenSocket::FastOpenEnabled()
|
|||||||
// fast open was turned off.
|
// fast open was turned off.
|
||||||
LOG(("nsHalfOpenSocket::FastEnabled - fast open was turned off.\n"));
|
LOG(("nsHalfOpenSocket::FastEnabled - fast open was turned off.\n"));
|
||||||
mEnt->mUseFastOpen = false;
|
mEnt->mUseFastOpen = false;
|
||||||
|
mFastOpenStatus = TFO_DISABLED;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// We can use FastOpen if we have a transaction or if it is ssl
|
// We can use FastOpen if we have a transaction or if it is ssl
|
||||||
@ -4350,25 +4379,11 @@ nsHalfOpenSocket::FastOpenEnabled()
|
|||||||
// the connection will be 100% ready for the next transaction to use it.
|
// the connection will be 100% ready for the next transaction to use it.
|
||||||
// Make an exception for SSL tunneled HTTP proxy as the NullHttpTransaction
|
// Make an exception for SSL tunneled HTTP proxy as the NullHttpTransaction
|
||||||
// does not know how to drive Connect.
|
// does not know how to drive Connect.
|
||||||
RefPtr<PendingTransactionInfo> info = FindTransactionHelper(false);
|
if (mEnt->mConnInfo->UsingConnect()) {
|
||||||
|
LOG(("nsHalfOpenSocket::FastOpenEnabled - It is using Connect."));
|
||||||
if ((!info) &&
|
mFastOpenStatus = TFO_DISABLED_CONNECT;
|
||||||
(!mEnt->mConnInfo->FirstHopSSL() || mEnt->mConnInfo->UsingConnect())) {
|
|
||||||
LOG(("nsHalfOpenSocket::FastOpenEnabled - It is a connection without "
|
|
||||||
"transaction and first hop is not ssl.\n"));
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((info) && !mEnt->mConnInfo->FirstHopSSL()) {
|
|
||||||
// The following function call will check whether is possible to send
|
|
||||||
// data during fast open
|
|
||||||
if (!info->mTransaction->CanDo0RTT()) {
|
|
||||||
LOG(("nsHalfOpenSocket::FastOpenEnabled - it is not safe to restart "
|
|
||||||
"transaction.\n"));
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4556,7 +4571,13 @@ nsHalfOpenSocket::SetFastOpenConnected(nsresult aError, bool aWillRetry)
|
|||||||
mStreamOut = nullptr;
|
mStreamOut = nullptr;
|
||||||
mStreamIn = nullptr;
|
mStreamIn = nullptr;
|
||||||
|
|
||||||
Abandon();
|
// If backup transport has already started put this HalfOpen back to
|
||||||
|
// mEnt list.
|
||||||
|
if (mBackupTransport) {
|
||||||
|
mFastOpenStatus = TFO_BACKUP_CONN;
|
||||||
|
mEnt->mHalfOpens.AppendElement(this);
|
||||||
|
gHttpHandler->ConnMgr()->mNumHalfOpenConns++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
mFastOpenInProgress = false;
|
mFastOpenInProgress = false;
|
||||||
@ -4576,6 +4597,7 @@ nsHttpConnectionMgr::
|
|||||||
nsHalfOpenSocket::SetFastOpenStatus(uint8_t tfoStatus)
|
nsHalfOpenSocket::SetFastOpenStatus(uint8_t tfoStatus)
|
||||||
{
|
{
|
||||||
MOZ_ASSERT(mFastOpenInProgress);
|
MOZ_ASSERT(mFastOpenInProgress);
|
||||||
|
mFastOpenStatus = tfoStatus;
|
||||||
mConnectionNegotiatingFastOpen->SetFastOpenStatus(tfoStatus);
|
mConnectionNegotiatingFastOpen->SetFastOpenStatus(tfoStatus);
|
||||||
mConnectionNegotiatingFastOpen->Transaction()->SetFastOpenStatus(tfoStatus);
|
mConnectionNegotiatingFastOpen->Transaction()->SetFastOpenStatus(tfoStatus);
|
||||||
}
|
}
|
||||||
@ -4804,6 +4826,10 @@ nsHalfOpenSocket::SetupConn(nsIAsyncOutputStream *out,
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
conn->SetFastOpenStatus(mFastOpenStatus);
|
conn->SetFastOpenStatus(mFastOpenStatus);
|
||||||
|
mFastOpenStatus = TFO_BACKUP_CONN; // Set this to TFO_BACKUP_CONN so
|
||||||
|
// that if a backup connection is
|
||||||
|
// established we do not report
|
||||||
|
// values twice.
|
||||||
}
|
}
|
||||||
|
|
||||||
// If this halfOpenConn was speculative, but at the ende the conn got a
|
// If this halfOpenConn was speculative, but at the ende the conn got a
|
||||||
|
@ -476,6 +476,7 @@ private:
|
|||||||
|
|
||||||
bool mPrimaryConnectedOK;
|
bool mPrimaryConnectedOK;
|
||||||
bool mBackupConnectedOK;
|
bool mBackupConnectedOK;
|
||||||
|
bool mBackupConnStatsSet;
|
||||||
|
|
||||||
// A nsHalfOpenSocket can be made for a concrete non-null transaction,
|
// A nsHalfOpenSocket can be made for a concrete non-null transaction,
|
||||||
// but the transaction can be dispatch to another connection. In that
|
// but the transaction can be dispatch to another connection. In that
|
||||||
|
@ -78,6 +78,7 @@
|
|||||||
|
|
||||||
#if defined(XP_WIN)
|
#if defined(XP_WIN)
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
#include "mozilla/WindowsVersion.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(XP_MACOSX)
|
#if defined(XP_MACOSX)
|
||||||
@ -308,6 +309,8 @@ nsHttpHandler::SetFastOpenOSSupport()
|
|||||||
mFastOpenSupported = false;
|
mFastOpenSupported = false;
|
||||||
#if !defined(XP_WIN) && !defined(XP_LINUX) && !defined(ANDROID) && !defined(HAS_CONNECTX)
|
#if !defined(XP_WIN) && !defined(XP_LINUX) && !defined(ANDROID) && !defined(HAS_CONNECTX)
|
||||||
return;
|
return;
|
||||||
|
#elif defined(XP_WIN)
|
||||||
|
mFastOpenSupported = IsWindows10BuildOrLater(16299);
|
||||||
#else
|
#else
|
||||||
|
|
||||||
nsAutoCString version;
|
nsAutoCString version;
|
||||||
@ -332,9 +335,7 @@ nsHttpHandler::SetFastOpenOSSupport()
|
|||||||
|
|
||||||
if (NS_SUCCEEDED(rv)) {
|
if (NS_SUCCEEDED(rv)) {
|
||||||
// set min version minus 1.
|
// set min version minus 1.
|
||||||
#ifdef XP_WIN
|
#if XP_MACOSX
|
||||||
int min_version[] = {10, 0};
|
|
||||||
#elif XP_MACOSX
|
|
||||||
int min_version[] = {15, 0};
|
int min_version[] = {15, 0};
|
||||||
#elif ANDROID
|
#elif ANDROID
|
||||||
int min_version[] = {4, 4};
|
int min_version[] = {4, 4};
|
||||||
@ -366,16 +367,6 @@ nsHttpHandler::SetFastOpenOSSupport()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef XP_WIN
|
|
||||||
if (mFastOpenSupported) {
|
|
||||||
// We have some problems with lavasoft software and tcp fast open.
|
|
||||||
if (GetModuleHandleW(L"pmls64.dll") || GetModuleHandleW(L"rlls64.dll")) {
|
|
||||||
mFastOpenSupported = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
LOG(("nsHttpHandler::SetFastOpenOSSupport %s supported.\n",
|
LOG(("nsHttpHandler::SetFastOpenOSSupport %s supported.\n",
|
||||||
mFastOpenSupported ? "" : "not"));
|
mFastOpenSupported ? "" : "not"));
|
||||||
}
|
}
|
||||||
|
@ -27,6 +27,8 @@ server.start(-1);
|
|||||||
var baseURL = "http://localhost:" + server.identity.primaryPort + "/";
|
var baseURL = "http://localhost:" + server.identity.primaryPort + "/";
|
||||||
var maxConnections = 0;
|
var maxConnections = 0;
|
||||||
var debug = false;
|
var debug = false;
|
||||||
|
var dummyResponseQueue = new Array();
|
||||||
|
var responseQueue = new Array();
|
||||||
|
|
||||||
function log(msg) {
|
function log(msg) {
|
||||||
if (!debug) {
|
if (!debug) {
|
||||||
@ -48,10 +50,10 @@ function serverStopListener() {
|
|||||||
server.stop();
|
server.stop();
|
||||||
}
|
}
|
||||||
|
|
||||||
function createHttpRequest(requestId, priority, isBlocking) {
|
function createHttpRequest(requestId, priority, isBlocking, callback) {
|
||||||
let uri = baseURL;
|
let uri = baseURL;
|
||||||
var chan = make_channel(uri);
|
var chan = make_channel(uri);
|
||||||
var listner = new HttpResponseListener(requestId);
|
var listner = new HttpResponseListener(requestId, callback);
|
||||||
chan.setRequestHeader("X-ID", requestId, false);
|
chan.setRequestHeader("X-ID", requestId, false);
|
||||||
chan.setRequestHeader("Cache-control", "no-store", false);
|
chan.setRequestHeader("Cache-control", "no-store", false);
|
||||||
chan.QueryInterface(Ci.nsISupportsPriority).priority = priority;
|
chan.QueryInterface(Ci.nsISupportsPriority).priority = priority;
|
||||||
@ -63,10 +65,10 @@ function createHttpRequest(requestId, priority, isBlocking) {
|
|||||||
log("Create http request id=" + requestId);
|
log("Create http request id=" + requestId);
|
||||||
}
|
}
|
||||||
|
|
||||||
function setup_dummyHttpRequests() {
|
function setup_dummyHttpRequests(callback) {
|
||||||
log("setup_dummyHttpRequests");
|
log("setup_dummyHttpRequests");
|
||||||
for (var i = 0; i < maxConnections ; i++) {
|
for (var i = 0; i < maxConnections ; i++) {
|
||||||
createHttpRequest(i, i, false);
|
createHttpRequest(i, i, false, callback);
|
||||||
do_test_pending();
|
do_test_pending();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -99,9 +101,10 @@ function check_response_id(responses)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function HttpResponseListener(id)
|
function HttpResponseListener(id, onStopCallback)
|
||||||
{
|
{
|
||||||
this.id = id
|
this.id = id
|
||||||
|
this.stopCallback = onStopCallback;
|
||||||
};
|
};
|
||||||
|
|
||||||
HttpResponseListener.prototype =
|
HttpResponseListener.prototype =
|
||||||
@ -115,10 +118,12 @@ HttpResponseListener.prototype =
|
|||||||
onStopRequest: function (request, ctx, status) {
|
onStopRequest: function (request, ctx, status) {
|
||||||
log("STOP id=" + this.id);
|
log("STOP id=" + this.id);
|
||||||
do_test_finished();
|
do_test_finished();
|
||||||
|
if (this.stopCallback) {
|
||||||
|
this.stopCallback();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
var responseQueue = new Array();
|
|
||||||
function setup_http_server()
|
function setup_http_server()
|
||||||
{
|
{
|
||||||
log("setup_http_server");
|
log("setup_http_server");
|
||||||
@ -134,13 +139,18 @@ function setup_http_server()
|
|||||||
|
|
||||||
response.processAsync();
|
response.processAsync();
|
||||||
response.setHeader("X-ID", id);
|
response.setHeader("X-ID", id);
|
||||||
responseQueue.push(response);
|
|
||||||
|
|
||||||
if (responseQueue.length == maxConnections && !allDummyHttpRequestReceived) {
|
if (!allDummyHttpRequestReceived) {
|
||||||
|
dummyResponseQueue.push(response);
|
||||||
|
} else {
|
||||||
|
responseQueue.push(response);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (dummyResponseQueue.length == maxConnections) {
|
||||||
log("received all dummy http requets");
|
log("received all dummy http requets");
|
||||||
allDummyHttpRequestReceived = true;
|
allDummyHttpRequestReceived = true;
|
||||||
setup_HttpRequests();
|
setup_HttpRequests();
|
||||||
processResponses();
|
processDummyResponse();
|
||||||
} else if (responseQueue.length == maxConnections) {
|
} else if (responseQueue.length == maxConnections) {
|
||||||
log("received all http requets");
|
log("received all http requets");
|
||||||
check_response_id(responseQueue);
|
check_response_id(responseQueue);
|
||||||
@ -155,6 +165,14 @@ function setup_http_server()
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function processDummyResponse() {
|
||||||
|
if (!dummyResponseQueue.length) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
var resposne = dummyResponseQueue.pop();
|
||||||
|
resposne.finish();
|
||||||
|
}
|
||||||
|
|
||||||
function processResponses() {
|
function processResponses() {
|
||||||
while (responseQueue.length) {
|
while (responseQueue.length) {
|
||||||
var resposne = responseQueue.pop();
|
var resposne = responseQueue.pop();
|
||||||
@ -164,5 +182,5 @@ function processResponses() {
|
|||||||
|
|
||||||
function run_test() {
|
function run_test() {
|
||||||
setup_http_server();
|
setup_http_server();
|
||||||
setup_dummyHttpRequests();
|
setup_dummyHttpRequests(processDummyResponse);
|
||||||
}
|
}
|
||||||
|
@ -242,12 +242,18 @@ case "$target" in
|
|||||||
WIN32_REDIST_DIR=`cd "$WIN32_REDIST_DIR" && pwd -W`
|
WIN32_REDIST_DIR=`cd "$WIN32_REDIST_DIR" && pwd -W`
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check linker version
|
# Check linker version, except in lld builds
|
||||||
_LD_FULL_VERSION=`"${LINK}" -v 2>&1 | sed -nre "$_MSVC_VER_FILTER"`
|
case "$LINKER" in
|
||||||
_LD_MAJOR_VERSION=`echo ${_LD_FULL_VERSION} | $AWK -F\. '{ print $1 }'`
|
*lld*)
|
||||||
if test "$_LD_MAJOR_VERSION" != "$_CC_SUITE"; then
|
;;
|
||||||
AC_MSG_ERROR([The linker major version, $_LD_FULL_VERSION, does not match the compiler suite version, $_CC_SUITE.])
|
*)
|
||||||
fi
|
_LD_FULL_VERSION=`"${LINKER}" -v 2>&1 | sed -nre "$_MSVC_VER_FILTER"`
|
||||||
|
_LD_MAJOR_VERSION=`echo ${_LD_FULL_VERSION} | $AWK -F\. '{ print $1 }'`
|
||||||
|
if test "$_LD_MAJOR_VERSION" != "$_CC_SUITE"; then
|
||||||
|
AC_MSG_ERROR([The linker major version, $_LD_FULL_VERSION, does not match the compiler suite version, $_CC_SUITE.])
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
INCREMENTAL_LINKER=1
|
INCREMENTAL_LINKER=1
|
||||||
|
|
||||||
@ -901,8 +907,8 @@ case "$target" in
|
|||||||
RANLIB='echo not_ranlib'
|
RANLIB='echo not_ranlib'
|
||||||
STRIP='echo not_strip'
|
STRIP='echo not_strip'
|
||||||
PKG_SKIP_STRIP=1
|
PKG_SKIP_STRIP=1
|
||||||
MKSHLIB='$(LINK) -NOLOGO -DLL -OUT:$@ -PDB:$(LINK_PDBFILE) $(DSO_LDOPTS)'
|
MKSHLIB='$(LINKER) -NOLOGO -DLL -OUT:$@ -PDB:$(LINK_PDBFILE) $(DSO_LDOPTS)'
|
||||||
MKCSHLIB='$(LINK) -NOLOGO -DLL -OUT:$@ -PDB:$(LINK_PDBFILE) $(DSO_LDOPTS)'
|
MKCSHLIB='$(LINKER) -NOLOGO -DLL -OUT:$@ -PDB:$(LINK_PDBFILE) $(DSO_LDOPTS)'
|
||||||
WIN32_SUBSYSTEM_VERSION=6.01
|
WIN32_SUBSYSTEM_VERSION=6.01
|
||||||
WIN32_CONSOLE_EXE_LDFLAGS=-SUBSYSTEM:CONSOLE,$WIN32_SUBSYSTEM_VERSION
|
WIN32_CONSOLE_EXE_LDFLAGS=-SUBSYSTEM:CONSOLE,$WIN32_SUBSYSTEM_VERSION
|
||||||
WIN32_GUI_EXE_LDFLAGS=-SUBSYSTEM:WINDOWS,$WIN32_SUBSYSTEM_VERSION
|
WIN32_GUI_EXE_LDFLAGS=-SUBSYSTEM:WINDOWS,$WIN32_SUBSYSTEM_VERSION
|
||||||
|
@ -1159,4 +1159,4 @@ static const TransportSecurityPreload kPublicKeyPinningPreloadList[] = {
|
|||||||
|
|
||||||
static const int32_t kUnknownId = -1;
|
static const int32_t kUnknownId = -1;
|
||||||
|
|
||||||
static const PRTime kPreloadPKPinsExpirationTime = INT64_C(1522175596241000);
|
static const PRTime kPreloadPKPinsExpirationTime = INT64_C(1522262045635000);
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -8,7 +8,7 @@
|
|||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
const PRTime gPreloadListExpirationTime = INT64_C(1524594783507000);
|
const PRTime gPreloadListExpirationTime = INT64_C(1524681233383000);
|
||||||
%%
|
%%
|
||||||
0-1.party, 1
|
0-1.party, 1
|
||||||
0.me.uk, 1
|
0.me.uk, 1
|
||||||
@ -1695,6 +1695,7 @@ angelinahair.com, 1
|
|||||||
angeloventuri.com, 1
|
angeloventuri.com, 1
|
||||||
anginf.de, 1
|
anginf.de, 1
|
||||||
anglertanke.de, 1
|
anglertanke.de, 1
|
||||||
|
anglesya.win, 1
|
||||||
anglictina-sojcak.cz, 1
|
anglictina-sojcak.cz, 1
|
||||||
anglictinasojcak.cz, 1
|
anglictinasojcak.cz, 1
|
||||||
anglingactive.co.uk, 1
|
anglingactive.co.uk, 1
|
||||||
@ -1726,6 +1727,7 @@ anime1.pw, 1
|
|||||||
anime1.top, 1
|
anime1.top, 1
|
||||||
animeai.com, 1
|
animeai.com, 1
|
||||||
animefluxxx.com, 1
|
animefluxxx.com, 1
|
||||||
|
animesharp.com, 1
|
||||||
animorphsfanforum.com, 1
|
animorphsfanforum.com, 1
|
||||||
anipassion.com, 1
|
anipassion.com, 1
|
||||||
anita-mukorom.hu, 1
|
anita-mukorom.hu, 1
|
||||||
@ -2466,6 +2468,7 @@ augustiner-kantorei-erfurt.de, 1
|
|||||||
augustiner-kantorei.de, 1
|
augustiner-kantorei.de, 1
|
||||||
aukaraoke.su, 1
|
aukaraoke.su, 1
|
||||||
aulaschrank.gq, 1
|
aulaschrank.gq, 1
|
||||||
|
aulo.in, 0
|
||||||
aunali1.com, 1
|
aunali1.com, 1
|
||||||
auntie-eileens.com.au, 1
|
auntie-eileens.com.au, 1
|
||||||
auplidespages.fr, 1
|
auplidespages.fr, 1
|
||||||
@ -2963,7 +2966,7 @@ bazos.cz, 1
|
|||||||
bazos.sk, 1
|
bazos.sk, 1
|
||||||
bazziergraphik.com, 1
|
bazziergraphik.com, 1
|
||||||
bb37roma.it, 1
|
bb37roma.it, 1
|
||||||
bbb1991.me, 1
|
bbb1991.me, 0
|
||||||
bbcastles.com, 1
|
bbcastles.com, 1
|
||||||
bbdos.ru, 1
|
bbdos.ru, 1
|
||||||
bbgeschenke.ch, 1
|
bbgeschenke.ch, 1
|
||||||
@ -3781,6 +3784,7 @@ blockmetry.com, 1
|
|||||||
blockstream.com, 1
|
blockstream.com, 1
|
||||||
blockxit.de, 1
|
blockxit.de, 1
|
||||||
bloemendal.me, 1
|
bloemendal.me, 1
|
||||||
|
blog-grupom2.es, 1
|
||||||
blog.gov.uk, 1
|
blog.gov.uk, 1
|
||||||
blog.gparent.org, 1
|
blog.gparent.org, 1
|
||||||
blog.linode.com, 0
|
blog.linode.com, 0
|
||||||
@ -3942,7 +3946,7 @@ bondskampeerder.nl, 1
|
|||||||
bonesserver.com, 1
|
bonesserver.com, 1
|
||||||
bonfi.net, 1
|
bonfi.net, 1
|
||||||
bonifacius.be, 1
|
bonifacius.be, 1
|
||||||
bonigo.de, 0
|
bonigo.de, 1
|
||||||
bonita.com.br, 1
|
bonita.com.br, 1
|
||||||
bonnant-associes.ch, 1
|
bonnant-associes.ch, 1
|
||||||
bonnant-partners.ch, 1
|
bonnant-partners.ch, 1
|
||||||
@ -4354,6 +4358,7 @@ brightonbank.com, 1
|
|||||||
brightonbouncycastles.net, 1
|
brightonbouncycastles.net, 1
|
||||||
brightonchilli.org.uk, 1
|
brightonchilli.org.uk, 1
|
||||||
brightstarkids.co.uk, 0
|
brightstarkids.co.uk, 0
|
||||||
|
brightstarkids.com.au, 0
|
||||||
brightstarkids.net, 0
|
brightstarkids.net, 0
|
||||||
brightstarkids.sg, 0
|
brightstarkids.sg, 0
|
||||||
brigidaarie.com, 1
|
brigidaarie.com, 1
|
||||||
@ -4626,6 +4631,7 @@ buypapercheap.net, 1
|
|||||||
buyseo.store, 1
|
buyseo.store, 1
|
||||||
buyshoe.org, 1
|
buyshoe.org, 1
|
||||||
buytheway.co.za, 1
|
buytheway.co.za, 1
|
||||||
|
buzz.tools, 1
|
||||||
buzzconf.io, 1
|
buzzconf.io, 1
|
||||||
buzzdeck.com, 1
|
buzzdeck.com, 1
|
||||||
buzzprint.it, 1
|
buzzprint.it, 1
|
||||||
@ -5639,7 +5645,6 @@ chronoproject.com, 1
|
|||||||
chronoshop.cz, 1
|
chronoshop.cz, 1
|
||||||
chrpaul.de, 1
|
chrpaul.de, 1
|
||||||
chrstn.eu, 1
|
chrstn.eu, 1
|
||||||
chs.us, 1
|
|
||||||
chsh.moe, 1
|
chsh.moe, 1
|
||||||
chsterz.de, 1
|
chsterz.de, 1
|
||||||
chua.family, 1
|
chua.family, 1
|
||||||
@ -5722,7 +5727,7 @@ cirugiasplasticas.com.mx, 1
|
|||||||
cirujanooral.com, 1
|
cirujanooral.com, 1
|
||||||
cirurgicagervasio.com.br, 1
|
cirurgicagervasio.com.br, 1
|
||||||
cirurgicalucena.com.br, 1
|
cirurgicalucena.com.br, 1
|
||||||
ciscodude.net, 0
|
ciscodude.net, 1
|
||||||
cisoaid.com, 1
|
cisoaid.com, 1
|
||||||
ciss.ltd, 1
|
ciss.ltd, 1
|
||||||
cisy.me, 1
|
cisy.me, 1
|
||||||
@ -6030,7 +6035,6 @@ coda.moe, 1
|
|||||||
coda.today, 1
|
coda.today, 1
|
||||||
coda.world, 1
|
coda.world, 1
|
||||||
code-golf.io, 1
|
code-golf.io, 1
|
||||||
code-judge.tk, 1
|
|
||||||
code-poets.co.uk, 1
|
code-poets.co.uk, 1
|
||||||
code-well.com, 1
|
code-well.com, 1
|
||||||
code.facebook.com, 0
|
code.facebook.com, 0
|
||||||
@ -7107,6 +7111,7 @@ dandymrsb.com, 1
|
|||||||
daneandthepain.com, 1
|
daneandthepain.com, 1
|
||||||
dango.in, 1
|
dango.in, 1
|
||||||
daniel-baumann.ch, 1
|
daniel-baumann.ch, 1
|
||||||
|
daniel-du.com, 1
|
||||||
daniel-kulbe.de, 1
|
daniel-kulbe.de, 1
|
||||||
daniel-ruf.de, 1
|
daniel-ruf.de, 1
|
||||||
daniel-seifert.com, 1
|
daniel-seifert.com, 1
|
||||||
@ -7822,7 +7827,6 @@ diamondyze.nl, 1
|
|||||||
diamorphine.com, 1
|
diamorphine.com, 1
|
||||||
diamsmedia.ch, 1
|
diamsmedia.ch, 1
|
||||||
dianefriedli.ch, 1
|
dianefriedli.ch, 1
|
||||||
diannaobos.com, 1
|
|
||||||
dianurse.com, 1
|
dianurse.com, 1
|
||||||
diare-na-miru.cz, 1
|
diare-na-miru.cz, 1
|
||||||
diario-egipto.com, 1
|
diario-egipto.com, 1
|
||||||
@ -7848,7 +7852,6 @@ dicionarioetimologico.com.br, 1
|
|||||||
dick.red, 1
|
dick.red, 1
|
||||||
dickieslife.com, 1
|
dickieslife.com, 1
|
||||||
dickpics.ru, 1
|
dickpics.ru, 1
|
||||||
dicoding.com, 1
|
|
||||||
didacte.com, 1
|
didacte.com, 1
|
||||||
didche.net, 1
|
didche.net, 1
|
||||||
diddens.de, 1
|
diddens.de, 1
|
||||||
@ -7990,6 +7993,7 @@ dipling.de, 1
|
|||||||
dipulse.it, 1
|
dipulse.it, 1
|
||||||
dir2epub.com, 1
|
dir2epub.com, 1
|
||||||
dir2epub.org, 1
|
dir2epub.org, 1
|
||||||
|
direct2uk.com, 1
|
||||||
directebanking.com, 1
|
directebanking.com, 1
|
||||||
directinsure.in, 1
|
directinsure.in, 1
|
||||||
directlinkfunding.co.uk, 1
|
directlinkfunding.co.uk, 1
|
||||||
@ -8023,7 +8027,7 @@ disconformity.net, 1
|
|||||||
discord-chan.net, 1
|
discord-chan.net, 1
|
||||||
discordapp.com, 1
|
discordapp.com, 1
|
||||||
discordghost.space, 1
|
discordghost.space, 1
|
||||||
discotek.club, 1
|
discotek.club, 0
|
||||||
discount24.de, 1
|
discount24.de, 1
|
||||||
discountmania.eu, 1
|
discountmania.eu, 1
|
||||||
discountmetaux.fr, 1
|
discountmetaux.fr, 1
|
||||||
@ -8647,7 +8651,6 @@ dustygroove.com, 1
|
|||||||
dustyspokesbnb.ca, 1
|
dustyspokesbnb.ca, 1
|
||||||
dutch.desi, 1
|
dutch.desi, 1
|
||||||
dutch1.nl, 1
|
dutch1.nl, 1
|
||||||
dutchessuganda.com, 1
|
|
||||||
dutchrank.nl, 1
|
dutchrank.nl, 1
|
||||||
dutchwanderers.nl, 1
|
dutchwanderers.nl, 1
|
||||||
dutchweballiance.nl, 1
|
dutchweballiance.nl, 1
|
||||||
@ -9459,7 +9462,7 @@ epiteugma.com, 1
|
|||||||
epizentrum.work, 1
|
epizentrum.work, 1
|
||||||
epizentrum.works, 1
|
epizentrum.works, 1
|
||||||
epmcentroitalia.it, 1
|
epmcentroitalia.it, 1
|
||||||
epoch.com, 0
|
epoch.com, 1
|
||||||
epolitiker.com, 1
|
epolitiker.com, 1
|
||||||
epos-distributor.co.uk, 1
|
epos-distributor.co.uk, 1
|
||||||
eposbirmingham.co.uk, 1
|
eposbirmingham.co.uk, 1
|
||||||
@ -9939,7 +9942,6 @@ exploit.party, 1
|
|||||||
exploit.ph, 1
|
exploit.ph, 1
|
||||||
exploited.cz, 1
|
exploited.cz, 1
|
||||||
exploodo.rocks, 1
|
exploodo.rocks, 1
|
||||||
exploravacations.in, 1
|
|
||||||
expo-america.ru, 1
|
expo-america.ru, 1
|
||||||
expo-asia.ru, 1
|
expo-asia.ru, 1
|
||||||
expo-europe.ru, 1
|
expo-europe.ru, 1
|
||||||
@ -10111,6 +10113,7 @@ fallenangeldrinks.eu, 1
|
|||||||
fallenangelspirits.co.uk, 1
|
fallenangelspirits.co.uk, 1
|
||||||
fallenangelspirits.com, 1
|
fallenangelspirits.com, 1
|
||||||
fallenspirits.co.uk, 1
|
fallenspirits.co.uk, 1
|
||||||
|
fallofthecitadel.com, 1
|
||||||
falsum.net, 1
|
falsum.net, 1
|
||||||
fam-kreibich.de, 1
|
fam-kreibich.de, 1
|
||||||
fam-stemmer.de, 1
|
fam-stemmer.de, 1
|
||||||
@ -11436,7 +11439,6 @@ gamingreinvented.com, 1
|
|||||||
gamingwithcromulent.com, 1
|
gamingwithcromulent.com, 1
|
||||||
gamingzoneservers.com, 1
|
gamingzoneservers.com, 1
|
||||||
gamishou.fr, 1
|
gamishou.fr, 1
|
||||||
gamoice.com, 1
|
|
||||||
gamoloco.com, 1
|
gamoloco.com, 1
|
||||||
ganado.org, 1
|
ganado.org, 1
|
||||||
gancedo.com.es, 1
|
gancedo.com.es, 1
|
||||||
@ -11850,7 +11852,6 @@ gillmanandsoame.co.uk, 1
|
|||||||
gillyscastles.co.uk, 1
|
gillyscastles.co.uk, 1
|
||||||
gilmoreid.com.au, 1
|
gilmoreid.com.au, 1
|
||||||
gilnet.be, 1
|
gilnet.be, 1
|
||||||
gilroywestwood.org, 1
|
|
||||||
gina-architektur.design, 1
|
gina-architektur.design, 1
|
||||||
ginie.de, 1
|
ginie.de, 1
|
||||||
ginionusedcars.be, 1
|
ginionusedcars.be, 1
|
||||||
@ -14950,7 +14951,6 @@ jamstatic.fr, 0
|
|||||||
jamyeprice.com, 1
|
jamyeprice.com, 1
|
||||||
jan-and-maaret.de, 1
|
jan-and-maaret.de, 1
|
||||||
jan-bucher.ch, 1
|
jan-bucher.ch, 1
|
||||||
jan-cermak.cz, 1
|
|
||||||
jan-rieger.de, 1
|
jan-rieger.de, 1
|
||||||
jan-von.de, 1
|
jan-von.de, 1
|
||||||
janada.cz, 1
|
janada.cz, 1
|
||||||
@ -15528,6 +15528,7 @@ julianickel.de, 1
|
|||||||
julianmeyer.de, 1
|
julianmeyer.de, 1
|
||||||
juliansimioni.com, 1
|
juliansimioni.com, 1
|
||||||
julianskitchen.ch, 1
|
julianskitchen.ch, 1
|
||||||
|
julianvmodesto.com, 1
|
||||||
julianwallmeroth.de, 1
|
julianwallmeroth.de, 1
|
||||||
julianweigle.de, 1
|
julianweigle.de, 1
|
||||||
julianxhokaxhiu.com, 1
|
julianxhokaxhiu.com, 1
|
||||||
@ -15538,7 +15539,6 @@ julico.nl, 1
|
|||||||
julie-and-stevens-wedding.com, 1
|
julie-and-stevens-wedding.com, 1
|
||||||
juliedecubber.com, 1
|
juliedecubber.com, 1
|
||||||
juliekoubova.net, 1
|
juliekoubova.net, 1
|
||||||
juliemaurel.fr, 1
|
|
||||||
julienc.io, 1
|
julienc.io, 1
|
||||||
julienpaterne.com, 1
|
julienpaterne.com, 1
|
||||||
julientartarin.com, 1
|
julientartarin.com, 1
|
||||||
@ -16127,7 +16127,6 @@ kingofthecastlecoventry.co.uk, 1
|
|||||||
kingofthecastlesentertainments.co.uk, 1
|
kingofthecastlesentertainments.co.uk, 1
|
||||||
kingofthecastlesouthwales.co.uk, 1
|
kingofthecastlesouthwales.co.uk, 1
|
||||||
kingofthecastlesrhyl.co.uk, 1
|
kingofthecastlesrhyl.co.uk, 1
|
||||||
kingopen.cn, 1
|
|
||||||
kingpincages.com, 1
|
kingpincages.com, 1
|
||||||
kingqueen.org.uk, 1
|
kingqueen.org.uk, 1
|
||||||
kingstclinic.com, 1
|
kingstclinic.com, 1
|
||||||
@ -17475,7 +17474,6 @@ lionlyrics.com, 1
|
|||||||
lionsdeal.com, 1
|
lionsdeal.com, 1
|
||||||
lipartydepot.com, 1
|
lipartydepot.com, 1
|
||||||
lipex.com, 1
|
lipex.com, 1
|
||||||
lipo.lol, 1
|
|
||||||
lipoabaltimore.org, 1
|
lipoabaltimore.org, 1
|
||||||
liqd.net, 1
|
liqd.net, 1
|
||||||
liquid.cz, 1
|
liquid.cz, 1
|
||||||
@ -17774,7 +17772,6 @@ loritaboegl.de, 1
|
|||||||
losebellyfat.pro, 1
|
losebellyfat.pro, 1
|
||||||
losless.fr, 1
|
losless.fr, 1
|
||||||
loss.no, 1
|
loss.no, 1
|
||||||
lostandcash.com, 1
|
|
||||||
lostarq.com, 1
|
lostarq.com, 1
|
||||||
lostingames.de, 1
|
lostingames.de, 1
|
||||||
lostkeys.co.uk, 1
|
lostkeys.co.uk, 1
|
||||||
@ -17951,7 +17948,6 @@ lunar6.ch, 1
|
|||||||
lunarshark.com, 1
|
lunarshark.com, 1
|
||||||
lunarsoft.net, 1
|
lunarsoft.net, 1
|
||||||
lunartail.nl, 1
|
lunartail.nl, 1
|
||||||
lunasqu.ee, 1
|
|
||||||
lunchbunch.me, 1
|
lunchbunch.me, 1
|
||||||
lune-indigo.ch, 1
|
lune-indigo.ch, 1
|
||||||
lungdoc.us, 0
|
lungdoc.us, 0
|
||||||
@ -18507,7 +18503,6 @@ martingansler.de, 1
|
|||||||
martinkup.cz, 1
|
martinkup.cz, 1
|
||||||
martinkus.eu, 1
|
martinkus.eu, 1
|
||||||
martinmuc.de, 1
|
martinmuc.de, 1
|
||||||
martinreed.net, 1
|
|
||||||
martins.im, 1
|
martins.im, 1
|
||||||
martinsfamilyappliance.com, 1
|
martinsfamilyappliance.com, 1
|
||||||
martonmihaly.hu, 1
|
martonmihaly.hu, 1
|
||||||
@ -18779,6 +18774,7 @@ mdek.at, 1
|
|||||||
mdewendt.de, 1
|
mdewendt.de, 1
|
||||||
mdf-bis.com, 1
|
mdf-bis.com, 1
|
||||||
mdiv.pl, 1
|
mdiv.pl, 1
|
||||||
|
mdkr.nl, 1
|
||||||
mdma.net, 1
|
mdma.net, 1
|
||||||
mdmed.clinic, 1
|
mdmed.clinic, 1
|
||||||
mdoering.de, 1
|
mdoering.de, 1
|
||||||
@ -18840,6 +18836,7 @@ mediatorzy.waw.pl, 1
|
|||||||
mediawiki.org, 1
|
mediawiki.org, 1
|
||||||
mediawin.pl, 1
|
mediawin.pl, 1
|
||||||
medic-world.com, 1
|
medic-world.com, 1
|
||||||
|
medicalcountermeasures.gov, 1
|
||||||
medicinesfast.com, 0
|
medicinesfast.com, 0
|
||||||
medicinia.com.br, 1
|
medicinia.com.br, 1
|
||||||
medicinskavranje.edu.rs, 1
|
medicinskavranje.edu.rs, 1
|
||||||
@ -19335,7 +19332,6 @@ minipainting.net, 1
|
|||||||
miniskipper.at, 1
|
miniskipper.at, 1
|
||||||
minitruckin.net, 1
|
minitruckin.net, 1
|
||||||
minitrucktalk.com, 1
|
minitrucktalk.com, 1
|
||||||
minkondom.nu, 1
|
|
||||||
minkymoon.jp, 1
|
minkymoon.jp, 1
|
||||||
minnesotakinkyyouth.org, 1
|
minnesotakinkyyouth.org, 1
|
||||||
minnesotamathcorps.org, 1
|
minnesotamathcorps.org, 1
|
||||||
@ -19674,7 +19670,6 @@ montsaintaignan.fr, 1
|
|||||||
montychristie.com, 1
|
montychristie.com, 1
|
||||||
moo.la, 1
|
moo.la, 1
|
||||||
moobo.co.jp, 1
|
moobo.co.jp, 1
|
||||||
moobo.xyz, 1
|
|
||||||
moodfoods.com, 1
|
moodfoods.com, 1
|
||||||
moodifiers.com, 1
|
moodifiers.com, 1
|
||||||
moodzshop.com, 1
|
moodzshop.com, 1
|
||||||
@ -20166,7 +20161,6 @@ myicare.org, 1
|
|||||||
myimds.com, 1
|
myimds.com, 1
|
||||||
myimmitracker.com, 1
|
myimmitracker.com, 1
|
||||||
myjumparoo.co.uk, 1
|
myjumparoo.co.uk, 1
|
||||||
myjumpsuit.de, 1
|
|
||||||
mykeepsake.xyz, 0
|
mykeepsake.xyz, 0
|
||||||
myki.co, 1
|
myki.co, 1
|
||||||
mykontool.de, 1
|
mykontool.de, 1
|
||||||
@ -21121,7 +21115,6 @@ noop.ch, 1
|
|||||||
noordsee.de, 1
|
noordsee.de, 1
|
||||||
noorsolidarity.com, 1
|
noorsolidarity.com, 1
|
||||||
nootropic.com, 1
|
nootropic.com, 1
|
||||||
nootropicsource.com, 1
|
|
||||||
noovell.com, 1
|
noovell.com, 1
|
||||||
nopaste.xyz, 1
|
nopaste.xyz, 1
|
||||||
nopaynocure.com, 1
|
nopaynocure.com, 1
|
||||||
@ -21420,6 +21413,7 @@ oc-sa.ch, 1
|
|||||||
ocad.com.au, 1
|
ocad.com.au, 1
|
||||||
ocapic.com, 1
|
ocapic.com, 1
|
||||||
occasion-impro.com, 1
|
occasion-impro.com, 1
|
||||||
|
occentus.net, 1
|
||||||
occmon.net, 1
|
occmon.net, 1
|
||||||
ocd2016.com, 1
|
ocd2016.com, 1
|
||||||
oceandns.eu, 1
|
oceandns.eu, 1
|
||||||
@ -22623,6 +22617,7 @@ peterfolta.net, 1
|
|||||||
peterhuetz.at, 1
|
peterhuetz.at, 1
|
||||||
peterhuetz.com, 1
|
peterhuetz.com, 1
|
||||||
peterjohnson.io, 1
|
peterjohnson.io, 1
|
||||||
|
peterlew.is, 1
|
||||||
peternagy.ie, 1
|
peternagy.ie, 1
|
||||||
petersontoscano.com, 1
|
petersontoscano.com, 1
|
||||||
pethelpers.org, 1
|
pethelpers.org, 1
|
||||||
@ -23162,7 +23157,6 @@ pokemontabletopadventures.com, 1
|
|||||||
pokemori.jp, 1
|
pokemori.jp, 1
|
||||||
pokepon.center, 1
|
pokepon.center, 1
|
||||||
pokl.cz, 1
|
pokl.cz, 1
|
||||||
pokomichi.com, 1
|
|
||||||
pol-expo.ru, 1
|
pol-expo.ru, 1
|
||||||
polaire.org, 1
|
polaire.org, 1
|
||||||
polandb2b.directory, 1
|
polandb2b.directory, 1
|
||||||
@ -23288,6 +23282,7 @@ post.io, 1
|
|||||||
post4me.at, 1
|
post4me.at, 1
|
||||||
postal.dk, 1
|
postal.dk, 1
|
||||||
postal3.es, 1
|
postal3.es, 1
|
||||||
|
postback.io, 1
|
||||||
postblue.info, 1
|
postblue.info, 1
|
||||||
postbox.life, 1
|
postbox.life, 1
|
||||||
postcardpayment.com, 1
|
postcardpayment.com, 1
|
||||||
@ -23805,7 +23800,6 @@ puli.com.br, 1
|
|||||||
pulledporkheaven.com, 1
|
pulledporkheaven.com, 1
|
||||||
pulsedursley.co.uk, 1
|
pulsedursley.co.uk, 1
|
||||||
pumperszene.com, 1
|
pumperszene.com, 1
|
||||||
punchkickinteractive.com, 1
|
|
||||||
puneflowermall.com, 1
|
puneflowermall.com, 1
|
||||||
punikonta.de, 1
|
punikonta.de, 1
|
||||||
punitsheth.com, 1
|
punitsheth.com, 1
|
||||||
@ -24682,6 +24676,7 @@ rezultant.ru, 1
|
|||||||
rezun.cloud, 1
|
rezun.cloud, 1
|
||||||
rf.tn, 1
|
rf.tn, 1
|
||||||
rfeif.org, 1
|
rfeif.org, 1
|
||||||
|
rgavmf.ru, 1
|
||||||
rgbinnovation.com, 1
|
rgbinnovation.com, 1
|
||||||
rgcomportement.fr, 1
|
rgcomportement.fr, 1
|
||||||
rgservers.com, 1
|
rgservers.com, 1
|
||||||
@ -24778,6 +24773,7 @@ rio-weimar.de, 1
|
|||||||
rioshop.com.br, 1
|
rioshop.com.br, 1
|
||||||
rip-sport.cz, 1
|
rip-sport.cz, 1
|
||||||
ripmixmake.org, 1
|
ripmixmake.org, 1
|
||||||
|
ripple.com, 1
|
||||||
ris.fi, 1
|
ris.fi, 1
|
||||||
risada.nl, 1
|
risada.nl, 1
|
||||||
risaphuketproperty.com, 1
|
risaphuketproperty.com, 1
|
||||||
@ -25297,6 +25293,7 @@ sabahattin-gucukoglu.com, 1
|
|||||||
sabatek.pl, 1
|
sabatek.pl, 1
|
||||||
sabine-forschbach.de, 1
|
sabine-forschbach.de, 1
|
||||||
sabineforschbach.de, 1
|
sabineforschbach.de, 1
|
||||||
|
sabrinajoiasprontaentrega.com.br, 1
|
||||||
sacaentradas.com, 1
|
sacaentradas.com, 1
|
||||||
saccani.net, 1
|
saccani.net, 1
|
||||||
sackers.com, 1
|
sackers.com, 1
|
||||||
@ -26172,6 +26169,7 @@ serverlog.net, 1
|
|||||||
serveroffline.net, 0
|
serveroffline.net, 0
|
||||||
serverpedia.de, 1
|
serverpedia.de, 1
|
||||||
servers4all.co.uk, 1
|
servers4all.co.uk, 1
|
||||||
|
serversftw.com, 1
|
||||||
serverstuff.info, 1
|
serverstuff.info, 1
|
||||||
serversuit.com, 1
|
serversuit.com, 1
|
||||||
servertastic.com, 1
|
servertastic.com, 1
|
||||||
@ -26691,6 +26689,7 @@ simpte.com, 1
|
|||||||
simpul.nl, 1
|
simpul.nl, 1
|
||||||
sims4hub.ga, 1
|
sims4hub.ga, 1
|
||||||
simsnieuws.nl, 1
|
simsnieuws.nl, 1
|
||||||
|
simtin-net.de, 1
|
||||||
simukti.net, 1
|
simukti.net, 1
|
||||||
simumiehet.com, 1
|
simumiehet.com, 1
|
||||||
simus.fr, 1
|
simus.fr, 1
|
||||||
@ -27876,7 +27875,6 @@ stonewuu.com, 1
|
|||||||
stony.com, 1
|
stony.com, 1
|
||||||
stonystratford.org, 1
|
stonystratford.org, 1
|
||||||
stopakwardhandshakes.org, 1
|
stopakwardhandshakes.org, 1
|
||||||
stopbreakupnow.org, 1
|
|
||||||
stopbullying.gov, 1
|
stopbullying.gov, 1
|
||||||
stopfraud.gov, 1
|
stopfraud.gov, 1
|
||||||
stopthethyroidmadness.com, 1
|
stopthethyroidmadness.com, 1
|
||||||
@ -29409,7 +29407,6 @@ tintencenter.com, 1
|
|||||||
tintenfix.net, 1
|
tintenfix.net, 1
|
||||||
tintenfux.de, 1
|
tintenfux.de, 1
|
||||||
tintenland.de, 1
|
tintenland.de, 1
|
||||||
tintenprofi.de, 1
|
|
||||||
tinyhousefinance.com.au, 1
|
tinyhousefinance.com.au, 1
|
||||||
tinylan.com, 1
|
tinylan.com, 1
|
||||||
tinyspeck.com, 1
|
tinyspeck.com, 1
|
||||||
@ -30799,6 +30796,7 @@ vapesense.co.uk, 1
|
|||||||
vapeshopsupply.com, 0
|
vapeshopsupply.com, 0
|
||||||
vaphone.co, 1
|
vaphone.co, 1
|
||||||
vapor.cloud, 0
|
vapor.cloud, 0
|
||||||
|
vapordepot.jp, 1
|
||||||
varcare.jp, 1
|
varcare.jp, 1
|
||||||
varden.info, 1
|
varden.info, 1
|
||||||
vareillefoundation.fr, 1
|
vareillefoundation.fr, 1
|
||||||
@ -31004,6 +31002,7 @@ victornet.de, 1
|
|||||||
victornilsson.pw, 1
|
victornilsson.pw, 1
|
||||||
vicyu.com, 1
|
vicyu.com, 1
|
||||||
vid-immobilien.de, 1
|
vid-immobilien.de, 1
|
||||||
|
vida-it.com, 1
|
||||||
vida.es, 1
|
vida.es, 1
|
||||||
vidbooster.com, 1
|
vidbooster.com, 1
|
||||||
vide-dressing.org, 0
|
vide-dressing.org, 0
|
||||||
@ -31280,7 +31279,7 @@ vorodevops.com, 1
|
|||||||
vos-fleurs.ch, 1
|
vos-fleurs.ch, 1
|
||||||
vos-fleurs.com, 1
|
vos-fleurs.com, 1
|
||||||
vosgym.jp, 1
|
vosgym.jp, 1
|
||||||
voshod.org, 0
|
voshod.org, 1
|
||||||
vosky.fr, 1
|
vosky.fr, 1
|
||||||
vostronet.com, 1
|
vostronet.com, 1
|
||||||
voter-info.uk, 1
|
voter-info.uk, 1
|
||||||
@ -31503,6 +31502,7 @@ waterschaplimburg.nl, 1
|
|||||||
watertrails.io, 1
|
watertrails.io, 1
|
||||||
waterworkscondos.com, 1
|
waterworkscondos.com, 1
|
||||||
watsonwork.me, 1
|
watsonwork.me, 1
|
||||||
|
wattechweb.com, 1
|
||||||
wave-ola.es, 1
|
wave-ola.es, 1
|
||||||
wavesboardshop.com, 1
|
wavesboardshop.com, 1
|
||||||
wavesoftime.com, 1
|
wavesoftime.com, 1
|
||||||
@ -31597,6 +31597,7 @@ webdesigneauclaire.com, 1
|
|||||||
webdesignerinwarwickshire.co.uk, 1
|
webdesignerinwarwickshire.co.uk, 1
|
||||||
webdesignplay.com, 1
|
webdesignplay.com, 1
|
||||||
webdesignplayground.io, 1
|
webdesignplayground.io, 1
|
||||||
|
webdesignssussex.co.uk, 1
|
||||||
webdev-quiz.de, 1
|
webdev-quiz.de, 1
|
||||||
webdevops.io, 1
|
webdevops.io, 1
|
||||||
webdosh.com, 1
|
webdosh.com, 1
|
||||||
@ -32741,7 +32742,6 @@ xn--vck8crc655y34ioha.net, 1
|
|||||||
xn--vck8crcu789ajtaj92eura.xyz, 1
|
xn--vck8crcu789ajtaj92eura.xyz, 1
|
||||||
xn--w22a.jp, 1
|
xn--w22a.jp, 1
|
||||||
xn--werner-schffer-fib.de, 1
|
xn--werner-schffer-fib.de, 1
|
||||||
xn--wmq.jp, 0
|
|
||||||
xn--xz1a.jp, 1
|
xn--xz1a.jp, 1
|
||||||
xn--y8j148r.xn--q9jyb4c, 1
|
xn--y8j148r.xn--q9jyb4c, 1
|
||||||
xn--y8j2eb5631a4qf5n0h.com, 1
|
xn--y8j2eb5631a4qf5n0h.com, 1
|
||||||
@ -33014,7 +33014,6 @@ yotilab.com, 1
|
|||||||
yotilabs.com, 1
|
yotilabs.com, 1
|
||||||
yotta-zetta.com, 1
|
yotta-zetta.com, 1
|
||||||
yotubaiotona.net, 1
|
yotubaiotona.net, 1
|
||||||
youcaitian.com, 1
|
|
||||||
youcancraft.de, 1
|
youcancraft.de, 1
|
||||||
youcanfuckoff.xyz, 1
|
youcanfuckoff.xyz, 1
|
||||||
youcanmakeit.at, 1
|
youcanmakeit.at, 1
|
||||||
|
@ -2170,11 +2170,12 @@ function synthesizeDragOver(aSrcElement, aDestElement, aDragData, aDropEffect, a
|
|||||||
|
|
||||||
const obs = _EU_Cc["@mozilla.org/observer-service;1"].getService(_EU_Ci.nsIObserverService);
|
const obs = _EU_Cc["@mozilla.org/observer-service;1"].getService(_EU_Ci.nsIObserverService);
|
||||||
const ds = _EU_Cc["@mozilla.org/widget/dragservice;1"].getService(_EU_Ci.nsIDragService);
|
const ds = _EU_Cc["@mozilla.org/widget/dragservice;1"].getService(_EU_Ci.nsIDragService);
|
||||||
var sess = ds.getCurrentSession();
|
|
||||||
|
|
||||||
// This method runs before other callbacks, and acts as a way to inject the
|
// This method runs before other callbacks, and acts as a way to inject the
|
||||||
// initial drag data into the DataTransfer.
|
// initial drag data into the DataTransfer.
|
||||||
function fillDrag(event) {
|
function fillDrag(event) {
|
||||||
|
ds.startDragSession();
|
||||||
|
|
||||||
if (aDragData) {
|
if (aDragData) {
|
||||||
for (var i = 0; i < aDragData.length; i++) {
|
for (var i = 0; i < aDragData.length; i++) {
|
||||||
var item = aDragData[i];
|
var item = aDragData[i];
|
||||||
@ -2189,13 +2190,15 @@ function synthesizeDragOver(aSrcElement, aDestElement, aDragData, aDropEffect, a
|
|||||||
|
|
||||||
function trapDrag(subject, topic) {
|
function trapDrag(subject, topic) {
|
||||||
if (topic == "on-datatransfer-available") {
|
if (topic == "on-datatransfer-available") {
|
||||||
|
var sess = ds.getCurrentSession();
|
||||||
sess.dataTransfer = _EU_maybeUnwrap(_EU_maybeWrap(subject).mozCloneForEvent("drop"));
|
sess.dataTransfer = _EU_maybeUnwrap(_EU_maybeWrap(subject).mozCloneForEvent("drop"));
|
||||||
sess.dataTransfer.dropEffect = subject.dropEffect;
|
sess.dataTransfer.dropEffect = subject.dropEffect;
|
||||||
|
obs.removeObserver(trapDrag, "on-datatransfer-available");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// need to use real mouse action
|
// need to use real mouse action
|
||||||
aWindow.addEventListener("dragstart", fillDrag, true);
|
aWindow.addEventListener("dragstart", fillDrag, { capture: true, once: true });
|
||||||
obs.addObserver(trapDrag, "on-datatransfer-available");
|
obs.addObserver(trapDrag, "on-datatransfer-available");
|
||||||
synthesizeMouseAtCenter(aSrcElement, { type: "mousedown" }, aWindow);
|
synthesizeMouseAtCenter(aSrcElement, { type: "mousedown" }, aWindow);
|
||||||
|
|
||||||
@ -2204,10 +2207,8 @@ function synthesizeDragOver(aSrcElement, aDestElement, aDragData, aDropEffect, a
|
|||||||
var y = rect.height / 2;
|
var y = rect.height / 2;
|
||||||
synthesizeMouse(aSrcElement, x, y, { type: "mousemove" }, aWindow);
|
synthesizeMouse(aSrcElement, x, y, { type: "mousemove" }, aWindow);
|
||||||
synthesizeMouse(aSrcElement, x+10, y+10, { type: "mousemove" }, aWindow);
|
synthesizeMouse(aSrcElement, x+10, y+10, { type: "mousemove" }, aWindow);
|
||||||
aWindow.removeEventListener("dragstart", fillDrag, true);
|
|
||||||
obs.removeObserver(trapDrag, "on-datatransfer-available");
|
|
||||||
|
|
||||||
var dataTransfer = sess.dataTransfer;
|
var dataTransfer = ds.getCurrentSession().dataTransfer;
|
||||||
|
|
||||||
// The EventStateManager will fire our dragenter event if it needs to.
|
// The EventStateManager will fire our dragenter event if it needs to.
|
||||||
var event = createDragEventObject("dragover", aDestElement, aDestWindow,
|
var event = createDragEventObject("dragover", aDestElement, aDestWindow,
|
||||||
@ -2283,11 +2284,6 @@ function synthesizeDrop(aSrcElement, aDestElement, aDragData, aDropEffect, aWind
|
|||||||
aDestWindow = aWindow;
|
aDestWindow = aWindow;
|
||||||
}
|
}
|
||||||
|
|
||||||
var ds = _EU_Cc["@mozilla.org/widget/dragservice;1"]
|
|
||||||
.getService(_EU_Ci.nsIDragService);
|
|
||||||
|
|
||||||
ds.startDragSession();
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
var [result, dataTransfer] = synthesizeDragOver(aSrcElement, aDestElement,
|
var [result, dataTransfer] = synthesizeDragOver(aSrcElement, aDestElement,
|
||||||
aDragData, aDropEffect,
|
aDragData, aDropEffect,
|
||||||
@ -2296,6 +2292,7 @@ function synthesizeDrop(aSrcElement, aDestElement, aDragData, aDropEffect, aWind
|
|||||||
return synthesizeDropAfterDragOver(result, dataTransfer, aDestElement,
|
return synthesizeDropAfterDragOver(result, dataTransfer, aDestElement,
|
||||||
aDestWindow, aDragEvent);
|
aDestWindow, aDragEvent);
|
||||||
} finally {
|
} finally {
|
||||||
|
var ds = _EU_Cc["@mozilla.org/widget/dragservice;1"].getService(_EU_Ci.nsIDragService);
|
||||||
ds.endDragSession(true, _parseModifiers(aDragEvent));
|
ds.endDragSession(true, _parseModifiers(aDragEvent));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
[border-image-slice-percentage.html]
|
[border-image-slice-001.xht]
|
||||||
type: reftest
|
type: reftest
|
||||||
disabled: if (os == "linux") and debug: https://bugzilla.mozilla.org/show_bug.cgi?id=1383061
|
disabled: if (os == "linux") and debug: https://bugzilla.mozilla.org/show_bug.cgi?id=1383061
|
||||||
|
@ -1,28 +0,0 @@
|
|||||||
[execorder.html]
|
|
||||||
type: testharness
|
|
||||||
expected:
|
|
||||||
if not debug and not e10s and (os == "mac") and (version == "OS X 10.10.5"): OK
|
|
||||||
[Unordered module script execution (parsed, unordered #1)]
|
|
||||||
expected:
|
|
||||||
if not debug and not e10s and (os == "mac") and (version == "OS X 10.10.5"): PASS
|
|
||||||
|
|
||||||
[Unordered module script execution (parsed, unordered #2)]
|
|
||||||
expected:
|
|
||||||
if not debug and not e10s and (os == "mac") and (version == "OS X 10.10.5"): PASS
|
|
||||||
|
|
||||||
[Unordered module script execution (dynamic, unordered #1)]
|
|
||||||
expected:
|
|
||||||
if not debug and not e10s and (os == "mac") and (version == "OS X 10.10.5"): PASS
|
|
||||||
|
|
||||||
[Unordered module script execution (dynamic, unordered #2)]
|
|
||||||
expected:
|
|
||||||
if not debug and not e10s and (os == "mac") and (version == "OS X 10.10.5"): PASS
|
|
||||||
|
|
||||||
[Interlaced module/non-module script execution (parsed, async-ordered)]
|
|
||||||
expected:
|
|
||||||
if not debug and not e10s and (os == "mac") and (version == "OS X 10.10.5"): PASS
|
|
||||||
|
|
||||||
[Interlaced module/non-module script execution (dynamic, async-ordered)]
|
|
||||||
expected:
|
|
||||||
if not debug and not e10s and (os == "mac") and (version == "OS X 10.10.5"): PASS
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
|||||||
[instantiation-error-1.html]
|
|
||||||
[Test that missing exports lead to SyntaxError events on window and load events on script, and that exceptions are remembered]
|
|
||||||
expected: FAIL
|
|
@ -1,3 +0,0 @@
|
|||||||
[instantiation-error-2.html]
|
|
||||||
[Test that missing exports lead to SyntaxError events on window and load events on script, and that exceptions are remembered]
|
|
||||||
expected: FAIL
|
|
@ -1,3 +1,2 @@
|
|||||||
[instantiation-error-3.html]
|
[instantiation-error-3.html]
|
||||||
[Test that unresolvable cycles lead to SyntaxError events on window and load events on script, and that exceptions are remembered]
|
disabled: bug 1426195
|
||||||
expected: FAIL
|
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
[instantiation-error-4.html]
|
|
||||||
[Test that loading a graph in which a module is already errored results in that module's error.]
|
|
||||||
expected: FAIL
|
|
@ -1,3 +0,0 @@
|
|||||||
[instantiation-error-5.html]
|
|
||||||
[Test that loading a graph in which a module is already errored results in that module's error.]
|
|
||||||
expected: FAIL
|
|
@ -6,17 +6,19 @@
|
|||||||
<script>
|
<script>
|
||||||
setup({allow_uncaught_exception: true});
|
setup({allow_uncaught_exception: true});
|
||||||
|
|
||||||
window.log = [];
|
|
||||||
|
|
||||||
window.addEventListener("error", ev => log.push(ev.error));
|
|
||||||
|
|
||||||
const test_load = async_test(
|
const test_load = async_test(
|
||||||
"Test that missing exports lead to SyntaxError events on window and " +
|
"Test that missing exports lead to SyntaxError events on window and " +
|
||||||
"load events on script, and that exceptions are remembered");
|
"load events on script");
|
||||||
|
|
||||||
|
window.log = [];
|
||||||
|
window.addEventListener("error", ev => {
|
||||||
|
test_load.step(() => assert_equals(ev.error.constructor, SyntaxError));
|
||||||
|
log.push(ev.message);
|
||||||
|
});
|
||||||
|
|
||||||
window.addEventListener("load", test_load.step_func_done(ev => {
|
window.addEventListener("load", test_load.step_func_done(ev => {
|
||||||
const exn = log[0];
|
const msg = log[0];
|
||||||
assert_array_equals(log, [exn, 1, exn, 2, exn, 3, exn, 4, exn, 5]);
|
assert_array_equals(log, [msg, 1, msg, 2, msg, 3, msg, 4, msg, 5]);
|
||||||
assert_equals(exn.constructor, SyntaxError);
|
|
||||||
}));
|
}));
|
||||||
|
|
||||||
function unreachable() { log.push("unexpected"); }
|
function unreachable() { log.push("unexpected"); }
|
||||||
|
@ -6,17 +6,19 @@
|
|||||||
<script>
|
<script>
|
||||||
setup({allow_uncaught_exception: true});
|
setup({allow_uncaught_exception: true});
|
||||||
|
|
||||||
window.log = [];
|
|
||||||
|
|
||||||
window.addEventListener("error", ev => log.push(ev.error));
|
|
||||||
|
|
||||||
const test_load = async_test(
|
const test_load = async_test(
|
||||||
"Test that missing exports lead to SyntaxError events on window and " +
|
"Test that missing exports lead to SyntaxError events on window and " +
|
||||||
"load events on script, and that exceptions are remembered");
|
"load events on script");
|
||||||
|
|
||||||
|
window.log = [];
|
||||||
|
window.addEventListener("error", ev => {
|
||||||
|
test_load.step(() => assert_equals(ev.error.constructor, SyntaxError));
|
||||||
|
log.push(ev.message);
|
||||||
|
});
|
||||||
|
|
||||||
window.addEventListener("load", test_load.step_func_done(ev => {
|
window.addEventListener("load", test_load.step_func_done(ev => {
|
||||||
const exn = log[0];
|
const msg = log[0];
|
||||||
assert_array_equals(log, [exn, 1, exn, 2, exn, 3, exn, 4, exn, 5]);
|
assert_array_equals(log, [msg, 1, msg, 2, msg, 3, msg, 4, msg, 5]);
|
||||||
assert_equals(exn.constructor, SyntaxError);
|
|
||||||
}));
|
}));
|
||||||
|
|
||||||
function unreachable() { log.push("unexpected"); }
|
function unreachable() { log.push("unexpected"); }
|
||||||
|
@ -6,17 +6,19 @@
|
|||||||
<script>
|
<script>
|
||||||
setup({allow_uncaught_exception: true});
|
setup({allow_uncaught_exception: true});
|
||||||
|
|
||||||
window.log = [];
|
|
||||||
|
|
||||||
window.addEventListener("error", ev => log.push(ev.error));
|
|
||||||
|
|
||||||
const test_load = async_test(
|
const test_load = async_test(
|
||||||
"Test that unresolvable cycles lead to SyntaxError events on window " +
|
"Test that unresolvable cycles lead to SyntaxError events on window " +
|
||||||
"and load events on script, and that exceptions are remembered");
|
"and load events on script");
|
||||||
|
|
||||||
|
window.log = [];
|
||||||
|
window.addEventListener("error", ev => {
|
||||||
|
test_load.step(() => assert_equals(ev.error.constructor, SyntaxError));
|
||||||
|
log.push(ev.message);
|
||||||
|
});
|
||||||
|
|
||||||
window.addEventListener("load", test_load.step_func_done(ev => {
|
window.addEventListener("load", test_load.step_func_done(ev => {
|
||||||
const exn = log[0];
|
const msg = log[0];
|
||||||
assert_array_equals(log, [exn, 1, exn, 2, exn, 3]);
|
assert_array_equals(log, [msg, 1, msg, 2, msg, 3]);
|
||||||
assert_equals(exn.constructor, SyntaxError);
|
|
||||||
}));
|
}));
|
||||||
|
|
||||||
function unreachable() { log.push("unexpected"); }
|
function unreachable() { log.push("unexpected"); }
|
||||||
|
@ -7,16 +7,18 @@
|
|||||||
setup({allow_uncaught_exception: true});
|
setup({allow_uncaught_exception: true});
|
||||||
|
|
||||||
window.log = [];
|
window.log = [];
|
||||||
|
|
||||||
window.addEventListener("error", ev => log.push(ev.error));
|
|
||||||
|
|
||||||
const test_load = async_test(
|
const test_load = async_test(
|
||||||
"Test that loading a graph in which a module is already " +
|
"Test that loading a graph in which a module is already " +
|
||||||
"errored results in that module's error.");
|
"errored results in an error.");
|
||||||
|
|
||||||
|
window.addEventListener("error", ev => {
|
||||||
|
test_load.step(() => assert_equals(ev.error.constructor, SyntaxError));
|
||||||
|
log.push(ev.message);
|
||||||
|
});
|
||||||
|
|
||||||
window.addEventListener("load", test_load.step_func_done(ev => {
|
window.addEventListener("load", test_load.step_func_done(ev => {
|
||||||
const exn = log[0];
|
const msg = log[0];
|
||||||
assert_array_equals(log, [exn, 1, exn, 2]);
|
assert_array_equals(log, [msg, 1, msg, 2]);
|
||||||
assert_equals(exn.constructor, SyntaxError);
|
|
||||||
}));
|
}));
|
||||||
|
|
||||||
function unreachable() { log.push("unexpected"); }
|
function unreachable() { log.push("unexpected"); }
|
||||||
|
@ -6,17 +6,19 @@
|
|||||||
<script>
|
<script>
|
||||||
setup({allow_uncaught_exception: true});
|
setup({allow_uncaught_exception: true});
|
||||||
|
|
||||||
window.log = [];
|
|
||||||
|
|
||||||
window.addEventListener("error", ev => log.push(ev.error));
|
|
||||||
|
|
||||||
const test_load = async_test(
|
const test_load = async_test(
|
||||||
"Test that loading a graph in which a module is already " +
|
"Test that loading a graph in which a module is already " +
|
||||||
"errored results in that module's error.");
|
"errored results an error.");
|
||||||
|
|
||||||
|
window.log = [];
|
||||||
|
window.addEventListener("error", ev => {
|
||||||
|
test_load.step(() => assert_equals(ev.error.constructor, SyntaxError));
|
||||||
|
log.push(ev.message);
|
||||||
|
});
|
||||||
|
|
||||||
window.addEventListener("load", test_load.step_func_done(ev => {
|
window.addEventListener("load", test_load.step_func_done(ev => {
|
||||||
const exn = log[0];
|
const msg = log[0];
|
||||||
assert_array_equals(log, [exn, 1, exn, 2]);
|
assert_array_equals(log, [msg, 1, msg, 2]);
|
||||||
assert_equals(exn.constructor, SyntaxError);
|
|
||||||
}));
|
}));
|
||||||
|
|
||||||
function unreachable() { log.push("unexpected"); }
|
function unreachable() { log.push("unexpected"); }
|
||||||
|
@ -2423,14 +2423,14 @@
|
|||||||
"description": "Stats about success rate of HTTP OMT request in content process, keyed by content policy.",
|
"description": "Stats about success rate of HTTP OMT request in content process, keyed by content policy.",
|
||||||
"labels": ["success", "successMainThread", "failListener", "failListenerChain", "notRequested"]
|
"labels": ["success", "successMainThread", "failListener", "failListenerChain", "notRequested"]
|
||||||
},
|
},
|
||||||
"TCP_FAST_OPEN_2": {
|
"TCP_FAST_OPEN_3": {
|
||||||
"record_in_processes": ["main", "content"],
|
"record_in_processes": ["main"],
|
||||||
"expires_in_version": "61",
|
"expires_in_version": "61",
|
||||||
"kind": "enumerated",
|
"kind": "enumerated",
|
||||||
"n_values": 16,
|
"n_values": 32,
|
||||||
"description": "When a http connection is closed, track whether or not TCP Fast Open was used: 0=TFO_NOT_TRIED(There was no http connection and it was not TLS), 1=TFO_TRIED_NEGOTIATING, 2=TFO_DATA_SENT, 3=TFO_FAILED_CONNECTION_REFUSED, 4=TFO_FAILED_NET_TIMEOUT, 5=TFO_FAILED_UNKNOW_ERROR, 6=TFO_FAILED_BACKUP_CONNECTION, 7=TFO_FAILED_CONNECTION_REFUSED_NO_TFO_FAILED_TOO, 8=TFO_FAILED_NET_TIMEOUT__NO_TFO_FAILED_TOO, 9=TFO_FAILED_UNKNOW_ERROR_NO_TFO_FAILED_TOO, 10=TFO_FAILED_BACKUP_CONNECTION_NO_TFO_FAILED_TOO.",
|
"description": "When a http connection is closed, track whether or not TCP Fast Open was used: 0=TFO_NOT_SET, 1=TFO_UNKNOWN, 2=TFO_DISABLED, 3=TFO_DISABLED_CONNECT, 4=TFO_NOT_TRIED, 5=TFO_TRIED, 6=TFO_DATA_SENT, 7=TFO_DATA_COOKIE_NOT_ACCEPTED, 8=TFO_FAILED_CONNECTION_REFUSED, 9=TFO_FAILED_NET_TIMEOUT, 10=TFO_FAILED_UNKNOW_ERROR, 11=TFO_FAILED_BACKUP_CONNECTION_TFO_NOT_TRIED, 12=TFO_FAILED_BACKUP_CONNECTION_TFO_TRIED, 13=TFO_FAILED_BACKUP_CONNECTION_TFO_DATA_SENT, 14=TFO_FAILED_BACKUP_CONNECTION_TFO_DATA_COOKIE_NOT_ACCEPTED, 15=TFO_FAILED_CONNECTION_REFUSED_NO_TFO_FAILED_TOO, 16=TFO_FAILED_NET_TIMEOUT__NO_TFO_FAILED_TOO, 17=TFO_FAILED_UNKNOW_ERROR_NO_TFO_FAILED_TOO, 18=TFO_FAILED_BACKUP_CONNECTION_NO_TFO_FAILED_TOO, 19=TFO_BACKUP_CONN. Please look at netwerk/base/TCPFastOpenLayer.h for more info",
|
||||||
"alert_emails": ["necko@mozilla.com", "ddamjanovic@mozilla.com"],
|
"alert_emails": ["necko@mozilla.com", "ddamjanovic@mozilla.com"],
|
||||||
"bug_numbers": [1390881]
|
"bug_numbers": [1402879]
|
||||||
},
|
},
|
||||||
"TCP_FAST_OPEN_STATUS": {
|
"TCP_FAST_OPEN_STATUS": {
|
||||||
"record_in_processes": ["main", "content"],
|
"record_in_processes": ["main", "content"],
|
||||||
|
@ -1267,6 +1267,21 @@ screenshots:
|
|||||||
record_in_processes:
|
record_in_processes:
|
||||||
- 'main'
|
- 'main'
|
||||||
|
|
||||||
|
network.http:
|
||||||
|
backup_conn_won:
|
||||||
|
bug_numbers:
|
||||||
|
- 1402811
|
||||||
|
description: >
|
||||||
|
For connection where TFO has not be use, collect telemetry on whether the
|
||||||
|
backup connection or the primary connection was faster.
|
||||||
|
expires: "61"
|
||||||
|
kind: boolean
|
||||||
|
notification_emails:
|
||||||
|
- necko@mozilla.com
|
||||||
|
- ddamjanovic@mozilla.com
|
||||||
|
record_in_processes:
|
||||||
|
- 'main'
|
||||||
|
|
||||||
idb.type:
|
idb.type:
|
||||||
persistent_count:
|
persistent_count:
|
||||||
bug_numbers:
|
bug_numbers:
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
#include "nsISupportsPrimitives.h"
|
#include "nsISupportsPrimitives.h"
|
||||||
#include "mozilla/dom/TabChild.h"
|
#include "mozilla/dom/TabChild.h"
|
||||||
#include "mozilla/gfx/2D.h"
|
#include "mozilla/gfx/2D.h"
|
||||||
|
#include "mozilla/EventStateManager.h"
|
||||||
#include "mozilla/UniquePtr.h"
|
#include "mozilla/UniquePtr.h"
|
||||||
#include "mozilla/Unused.h"
|
#include "mozilla/Unused.h"
|
||||||
#include "nsContentUtils.h"
|
#include "nsContentUtils.h"
|
||||||
@ -88,3 +89,21 @@ nsDragServiceProxy::InvokeDragSessionImpl(nsIArray* aArrayTransferables,
|
|||||||
StartDragSession();
|
StartDragSession();
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
NS_IMETHODIMP
|
||||||
|
nsDragServiceProxy::StartDragSession()
|
||||||
|
{
|
||||||
|
// Normally, OS stops firing input events when a drag operation starts. But
|
||||||
|
// there may be some pending input events queued in the content process. We
|
||||||
|
// have to suppress them since spec says that input events must be suppressed
|
||||||
|
// when there is a dnd session.
|
||||||
|
EventStateManager::SuppressInputEvents();
|
||||||
|
return nsBaseDragService::StartDragSession();
|
||||||
|
}
|
||||||
|
|
||||||
|
NS_IMETHODIMP
|
||||||
|
nsDragServiceProxy::EndDragSession(bool aDoneDrag, uint32_t aKeyModifiers)
|
||||||
|
{
|
||||||
|
EventStateManager::UnsuppressInputEvents();
|
||||||
|
return nsBaseDragService::EndDragSession(aDoneDrag, aKeyModifiers);
|
||||||
|
}
|
||||||
|
@ -19,6 +19,11 @@ public:
|
|||||||
virtual nsresult InvokeDragSessionImpl(nsIArray* anArrayTransferables,
|
virtual nsresult InvokeDragSessionImpl(nsIArray* anArrayTransferables,
|
||||||
nsIScriptableRegion* aRegion,
|
nsIScriptableRegion* aRegion,
|
||||||
uint32_t aActionType) override;
|
uint32_t aActionType) override;
|
||||||
|
|
||||||
|
// nsIDragService
|
||||||
|
NS_IMETHOD StartDragSession() override;
|
||||||
|
NS_IMETHOD EndDragSession(bool aDoneDrag, uint32_t aKeyModifiers) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
virtual ~nsDragServiceProxy();
|
virtual ~nsDragServiceProxy();
|
||||||
};
|
};
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
#include "nsCRT.h"
|
#include "nsCRT.h"
|
||||||
#include "nsNativeCharsetUtils.h"
|
#include "nsNativeCharsetUtils.h"
|
||||||
#include "nsUTF8Utils.h"
|
#include "nsUTF8Utils.h"
|
||||||
|
#include "nsArray.h"
|
||||||
|
|
||||||
#ifdef XP_WIN
|
#ifdef XP_WIN
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
Loading…
Reference in New Issue
Block a user