Merge inbound to mozilla-central r=merge a=merge

This commit is contained in:
Gurzau Raul 2017-12-18 23:57:42 +02:00
commit b5548f6fbb
85 changed files with 966 additions and 273 deletions

View File

@ -419,8 +419,7 @@ NotificationController::ScheduleContentInsertion(Accessible* aContainer,
nsIContent* aStartChildNode,
nsIContent* aEndChildNode)
{
nsTArray<nsCOMPtr<nsIContent>>* list =
mContentInsertions.LookupOrAdd(aContainer);
nsTArray<nsCOMPtr<nsIContent>> list;
bool needsProcessing = false;
nsIContent* node = aStartChildNode;
@ -429,13 +428,14 @@ NotificationController::ScheduleContentInsertion(Accessible* aContainer,
// actually inserted, check if the given content has a frame to discard
// this case early.
if (node->GetPrimaryFrame()) {
if (list->AppendElement(node))
if (list.AppendElement(node))
needsProcessing = true;
}
node = node->GetNextSibling();
}
if (needsProcessing) {
mContentInsertions.LookupOrAdd(aContainer)->AppendElements(list);
ScheduleProcessing();
}
}
@ -459,11 +459,31 @@ NotificationController::IsUpdatePending()
{
return mPresShell->IsLayoutFlushObserver() ||
mObservingState == eRefreshProcessingForUpdate ||
WaitingForParent() ||
mContentInsertions.Count() != 0 || mNotifications.Length() != 0 ||
mTextHash.Count() != 0 ||
!mDocument->HasLoadState(DocAccessible::eTreeConstructed);
}
bool
NotificationController::WaitingForParent()
{
DocAccessible* parentdoc = mDocument->ParentDocument();
if (!parentdoc) {
return false;
}
NotificationController* parent = parentdoc->mNotificationController;
if (!parent || parent == this) {
// Do not wait for nothing or ourselves
return false;
}
// Wait for parent's notifications processing
return parent->mContentInsertions.Count() != 0 ||
parent->mNotifications.Length() != 0;
}
void
NotificationController::ProcessMutationEvents()
{
@ -592,6 +612,8 @@ NotificationController::ProcessMutationEvents()
void
NotificationController::WillRefresh(mozilla::TimeStamp aTime)
{
Telemetry::AutoTimer<Telemetry::A11Y_TREE_UPDATE_TIMING_MS> timer;
AUTO_PROFILER_LABEL("NotificationController::WillRefresh", OTHER);
// If the document accessible that notification collector was created for is
@ -609,6 +631,12 @@ NotificationController::WillRefresh(mozilla::TimeStamp aTime)
return;
}
// Wait for parent's notifications, to get proper ordering between e.g. tab
// event and content event.
if (WaitingForParent()) {
return;
}
// Any generic notifications should be queued if we're processing content
// insertions or generic notifications.
mObservingState = eRefreshProcessingForUpdate;

View File

@ -274,6 +274,12 @@ protected:
*/
bool IsUpdatePending();
/**
* Return true if we should wait for processing from the parent before we can
* process our own queue.
*/
bool WaitingForParent();
private:
NotificationController(const NotificationController&);
NotificationController& operator = (const NotificationController&);

View File

@ -303,6 +303,7 @@ var AboutTabCrashed = {
includeURL,
URL,
autoSubmit,
hasReport: this.hasReport,
});
},
};

View File

@ -138,9 +138,11 @@ add_task(async function() {
await promiseTabLoadEvent(tab1, "data:text/html," + escape(testPage1));
await promiseTabLoadEvent(tab2, "data:text/html," + escape(testPage2));
var childFocusScript = "data:,(" + escape(focusInChild.toString()) + ")();";
browser1.messageManager.loadFrameScript(childFocusScript, true);
browser2.messageManager.loadFrameScript(childFocusScript, true);
if (gMultiProcessBrowser) {
var childFocusScript = "data:,(" + escape(focusInChild.toString()) + ")();";
browser1.messageManager.loadFrameScript(childFocusScript, true);
browser2.messageManager.loadFrameScript(childFocusScript, true);
}
gURLBar.focus();
await SimpleTest.promiseFocus();

View File

@ -4,7 +4,7 @@
"use strict";
const DUMMY = "browser/browser/base/content/test/general/dummy_page.html";
const DUMMY = "browser/browser/base/content/test/siteIdentity/dummy_page.html";
const INSECURE_ICON_PREF = "security.insecure_connection_icon.enabled";
const INSECURE_PBMODE_ICON_PREF = "security.insecure_connection_icon.pbmode.enabled";
@ -233,6 +233,34 @@ add_task(async function test_about_net_error_uri() {
await noCertErrorTest(false);
});
async function noCertErrorFromNavigationTest(secureCheck) {
await SpecialPowers.pushPrefEnv({set: [[INSECURE_ICON_PREF, secureCheck]]});
let newTab = await loadNewTab("http://example.com/" + DUMMY);
let promise = BrowserTestUtils.waitForErrorPage(gBrowser.selectedBrowser);
await ContentTask.spawn(gBrowser.selectedBrowser, {}, function() {
content.document.getElementById("no-cert").click();
});
await promise;
await ContentTask.spawn(gBrowser.selectedBrowser, {}, function() {
is(content.window.location.href, "https://nocert.example.com/", "Should be the cert error URL");
});
is(newTab.linkedBrowser.documentURI.spec.startsWith("about:certerror?"), true, "Should be an about:certerror");
is(getIdentityMode(), "unknownIdentity", "Identity should be unknown");
is(getConnectionState(), "not-secure", "Connection should be file");
gBrowser.removeTab(newTab);
await SpecialPowers.popPrefEnv();
}
add_task(async function test_about_net_error_uri_from_navigation_tab() {
await noCertErrorFromNavigationTest(true);
await noCertErrorFromNavigationTest(false);
});
async function aboutUriTest(secureCheck) {
let oldTab = gBrowser.selectedTab;
await SpecialPowers.pushPrefEnv({set: [[INSECURE_ICON_PREF, secureCheck]]});

View File

@ -4,6 +4,7 @@
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"></meta>
</head>
<body>
<a href="https://nocert.example.com" id="no-cert">No Cert page</a>
<p>Dummy test page</p>
</body>
</html>

View File

@ -21,7 +21,7 @@ add_task(async function test_show_form() {
set: [[AUTOSUBMIT_PREF, false]],
});
return BrowserTestUtils.withNewTab({
await BrowserTestUtils.withNewTab({
gBrowser,
url: PAGE,
}, async function(browser) {
@ -69,7 +69,7 @@ add_task(async function test_show_form() {
set: [[AUTOSUBMIT_PREF, true]],
});
return BrowserTestUtils.withNewTab({
await BrowserTestUtils.withNewTab({
gBrowser,
url: PAGE,
}, async function(browser) {
@ -97,3 +97,58 @@ add_task(async function test_show_form() {
"Autosubmission pref should have been set.");
});
});
/**
* Tests that we properly set the autoSubmit preference if the user is
* presented with a tabcrashed page without a crash report.
*/
add_task(async function test_no_offer() {
// We should default to sending the report.
Assert.ok(TabCrashHandler.prefs.getBoolPref("sendReport"));
await SpecialPowers.pushPrefEnv({
set: [[AUTOSUBMIT_PREF, false]],
});
await BrowserTestUtils.withNewTab({
gBrowser,
url: PAGE,
}, async function(browser) {
await TabStateFlusher.flush(browser);
// Make it so that it seems like no dump is available for the next crash.
prepareNoDump();
// Now crash the browser.
await BrowserTestUtils.crashBrowser(browser);
// eslint-disable-next-line mozilla/no-cpows-in-tests
let doc = browser.contentDocument;
// Ensure the request to autosubmit is invisible, since there's no report.
let requestRect = doc.getElementById("requestAutoSubmit")
.getBoundingClientRect();
Assert.equal(0, requestRect.height,
"Request for autosubmission has no height");
Assert.equal(0, requestRect.width,
"Request for autosubmission has no width");
// Since the pref is set to false, the checkbox should be
// unchecked.
let autoSubmit = doc.getElementById("autoSubmit");
Assert.ok(!autoSubmit.checked,
"Checkbox for autosubmission is not checked.");
let restoreButton = doc.getElementById("restoreTab");
restoreButton.click();
await BrowserTestUtils.browserLoaded(browser, false, PAGE);
// The autosubmission pref should now be set.
Assert.ok(!Services.prefs.getBoolPref(AUTOSUBMIT_PREF),
"Autosubmission pref should not have changed.");
});
// We should not have changed the default value for sending the report.
Assert.ok(TabCrashHandler.prefs.getBoolPref("sendReport"));
});

View File

@ -2,16 +2,8 @@
const PAGE = "data:text/html,<html><body>A%20regular,%20everyday,%20normal%20page.";
/**
* Monkey patches TabCrashHandler.getDumpID to return null in order to test
* about:tabcrashed when a dump is not available.
*/
add_task(async function setup() {
let originalGetDumpID = TabCrashHandler.getDumpID;
TabCrashHandler.getDumpID = function(browser) { return null; };
registerCleanupFunction(() => {
TabCrashHandler.getDumpID = originalGetDumpID;
});
prepareNoDump();
});
/**

View File

@ -121,3 +121,15 @@ async function setupLocalCrashReportServer() {
env.set("MOZ_CRASHREPORTER_URL", serverUrl);
});
}
/**
* Monkey patches TabCrashHandler.getDumpID to return null in order to test
* about:tabcrashed when a dump is not available.
*/
function prepareNoDump() {
let originalGetDumpID = TabCrashHandler.getDumpID;
TabCrashHandler.getDumpID = function(browser) { return null; };
registerCleanupFunction(() => {
TabCrashHandler.getDumpID = originalGetDumpID;
});
}

View File

@ -11,7 +11,7 @@ add_task(async function() {
await BrowserTestUtils.browserLoaded(tab.linkedBrowser);
let awaitDrop = BrowserTestUtils.waitForEvent(gBrowser.tabContainer, "drop");
let newTabPromise = BrowserTestUtils.waitForNewTab(gBrowser, "http://test1.example.com/");
let newTabPromise = BrowserTestUtils.waitForNewTab(gBrowser, "http://test1.example.com/", true);
// A drop type of "link" onto an existing tab would normally trigger a
// load in that same tab, but tabbrowser code in _getDragTargetTab treats
@ -32,8 +32,6 @@ add_task(async function() {
let tab2 = await newTabPromise;
Assert.ok(!tab2.hasAttribute("usercontextid"), "Tab shouldn't have usercontextid attribute");
await BrowserTestUtils.browserLoaded(tab2.linkedBrowser);
await ContentTask.spawn(tab2.linkedBrowser, {}, async function() {
Assert.equal(content.document.documentURI, "http://test1.example.com/");
Assert.equal(content.document.nodePrincipal.originAttributes.userContextId, 0);
@ -58,7 +56,7 @@ add_task(async function() {
await BrowserTestUtils.browserLoaded(tab.linkedBrowser);
let awaitDrop = BrowserTestUtils.waitForEvent(gBrowser.tabContainer, "drop");
let newTabPromise = BrowserTestUtils.waitForNewTab(gBrowser, "http://test1.example.com/");
let newTabPromise = BrowserTestUtils.waitForNewTab(gBrowser, "http://test1.example.com/", true);
// A drop type of "link" onto an existing tab would normally trigger a
// load in that same tab, but tabbrowser code in _getDragTargetTab treats
@ -79,8 +77,6 @@ add_task(async function() {
let tab2 = await newTabPromise;
Assert.equal(tab2.getAttribute("usercontextid"), 1);
await BrowserTestUtils.browserLoaded(tab2.linkedBrowser);
await ContentTask.spawn(tab2.linkedBrowser, {}, async function() {
Assert.equal(content.document.documentURI, "http://test1.example.com/");
Assert.equal(content.document.nodePrincipal.originAttributes.userContextId, 1);

View File

@ -286,7 +286,7 @@ function promisePanelElementHidden(win, aPanel) {
function onPanelClose(e) {
aPanel.removeEventListener("popuphidden", onPanelClose);
win.clearTimeout(timeoutId);
resolve();
executeSoon(resolve);
}
aPanel.addEventListener("popuphidden", onPanelClose);
});

View File

@ -368,8 +368,14 @@ this.TabCrashHandler = {
* even if they are empty.
*/
maybeSendCrashReport(message) {
if (!AppConstants.MOZ_CRASHREPORTER)
if (!AppConstants.MOZ_CRASHREPORTER) {
return;
}
if (!message.data.hasReport) {
// There was no report, so nothing to do.
return;
}
let browser = message.target.browser;
@ -381,8 +387,9 @@ this.TabCrashHandler = {
let childID = this.browserMap.get(browser);
let dumpID = this.childMap.get(childID);
if (!dumpID)
if (!dumpID) {
return;
}
if (!message.data.sendReport) {
Services.telemetry.getHistogramById("FX_CONTENT_CRASH_NOT_SUBMITTED").add(1);

View File

@ -799,7 +799,9 @@ endif
define syms_template
syms:: $(2)
$(2): $(1)
ifdef MOZ_CRASHREPORTER
$$(call py_action,dumpsymbols,$$(abspath $$<) $$(abspath $$@))
endif
endef
ifndef MOZ_PROFILE_GENERATE
@ -814,7 +816,15 @@ DUMP_SYMS_TARGETS :=
endif
endif
ifdef MOZ_CRASHREPORTER
$(foreach file,$(DUMP_SYMS_TARGETS),$(eval $(call syms_template,$(file),$(file)_syms.track)))
else ifneq (,$(and $(LLVM_SYMBOLIZER),$(filter WINNT,$(OS_ARCH)),$(MOZ_AUTOMATION)))
$(foreach file,$(DUMP_SYMS_TARGETS),$(eval $(call syms_template,$(file),$(addsuffix .pdb,$(basename $(file))))))
PDB_FILES = $(addsuffix .pdb,$(basename $(DUMP_SYMS_TARGETS)))
PDB_DEST ?= $(FINAL_TARGET)
PDB_TARGET = target
INSTALL_TARGETS += PDB
endif
cargo_host_flag := --target=$(RUST_HOST_TARGET)
cargo_target_flag := --target=$(RUST_TARGET)

View File

@ -9394,6 +9394,9 @@ nsDocShell::CreateContentViewer(const nsACString& aContentType,
// OnLoadingSite(), but don't fire OnLocationChange()
// notifications before we've called Embed(). See bug 284993.
mURIResultedInDocument = true;
bool errorOnLocationChangeNeeded = false;
nsCOMPtr<nsIChannel> failedChannel = mFailedChannel;
nsCOMPtr<nsIURI> failedURI;
if (mLoadType == LOAD_ERROR_PAGE) {
// We need to set the SH entry and our current URI here and not
@ -9404,17 +9407,15 @@ nsDocShell::CreateContentViewer(const nsACString& aContentType,
// following function calls need it.
mLoadType = mFailedLoadType;
nsCOMPtr<nsIChannel> failedChannel = mFailedChannel;
nsIDocument* doc = viewer->GetDocument();
if (doc) {
doc->SetFailedChannel(failedChannel);
}
// Make sure we have a URI to set currentURI.
nsCOMPtr<nsIURI> failedURI;
nsCOMPtr<nsIPrincipal> triggeringPrincipal;
if (failedChannel) {
// Make sure we have a URI to set currentURI.
NS_GetFinalChannelURI(failedChannel, getter_AddRefs(failedURI));
}
else {
@ -9440,14 +9441,9 @@ nsDocShell::CreateContentViewer(const nsACString& aContentType,
// Create an shistory entry for the old load.
if (failedURI) {
bool errorOnLocationChangeNeeded = OnNewURI(
errorOnLocationChangeNeeded = OnNewURI(
failedURI, failedChannel, triggeringPrincipal,
nullptr, mLoadType, false, false, false);
if (errorOnLocationChangeNeeded) {
FireOnLocationChange(this, failedChannel, failedURI,
LOCATION_CHANGE_ERROR_PAGE);
}
}
// Be sure to have a correct mLSHE, it may have been cleared by
@ -9538,7 +9534,10 @@ nsDocShell::CreateContentViewer(const nsACString& aContentType,
FavorPerformanceHint(true);
}
if (onLocationChangeNeeded) {
if (errorOnLocationChangeNeeded){
FireOnLocationChange(this, failedChannel, failedURI,
LOCATION_CHANGE_ERROR_PAGE);
} else if (onLocationChangeNeeded) {
FireOnLocationChange(this, aRequest, mCurrentURI, 0);
}

View File

@ -16,7 +16,12 @@ add_task(async function() {
];
});
info("Page that loaded: " + contentURL);
ok(contentURL.startsWith("about:neterror?"), "Should be on an error page");
const errorURI = "about:neterror?";
ok(contentURL.startsWith(errorURI), "Should be on an error page");
const contentPrincipal = tab.linkedBrowser.contentPrincipal;
ok(contentPrincipal.URI.spec.startsWith(errorURI), "Principal should be for the error page");
originalURL = new URL(originalURL);
is(originalURL.host, "example", "Should be an error for http://example, not http://www.example.com/");

View File

@ -980,6 +980,7 @@ nsIContent::GetEventTargetParent(EventChainPreVisitor& aVisitor)
// Don't propagate mouseover and mouseout events when mouse is moving
// inside chrome access only content.
bool isAnonForEvents = IsRootOfChromeAccessOnlySubtree();
aVisitor.mRootOfClosedTree = isAnonForEvents;
if ((aVisitor.mEvent->mMessage == eMouseOver ||
aVisitor.mEvent->mMessage == eMouseOut ||
aVisitor.mEvent->mMessage == ePointerOver ||
@ -1001,7 +1002,7 @@ nsIContent::GetEventTargetParent(EventChainPreVisitor& aVisitor)
nsIContent* adjustedTarget =
Event::GetShadowRelatedTarget(this, relatedTarget);
if (this == adjustedTarget) {
aVisitor.mParentTarget = nullptr;
aVisitor.SetParentTarget(nullptr, false);
aVisitor.mCanHandle = false;
return NS_OK;
}
@ -1058,7 +1059,7 @@ nsIContent::GetEventTargetParent(EventChainPreVisitor& aVisitor)
originalTarget->FindFirstNonChromeOnlyAccessContent())
? "" : "Wrong event propagation!?!\n");
#endif
aVisitor.mParentTarget = nullptr;
aVisitor.SetParentTarget(nullptr, false);
// Event should not propagate to non-anon content.
aVisitor.mCanHandle = isAnonForEvents;
return NS_OK;
@ -1110,11 +1111,17 @@ nsIContent::GetEventTargetParent(EventChainPreVisitor& aVisitor)
if (!aVisitor.mEvent->mFlags.mComposedInNativeAnonymousContent &&
IsRootOfNativeAnonymousSubtree() && OwnerDoc() &&
OwnerDoc()->GetWindow()) {
aVisitor.mParentTarget = OwnerDoc()->GetWindow()->GetParentTarget();
aVisitor.SetParentTarget(OwnerDoc()->GetWindow()->GetParentTarget(), true);
} else if (parent) {
aVisitor.mParentTarget = parent;
aVisitor.SetParentTarget(parent, false);
if (slot) {
ShadowRoot* root = slot->GetContainingShadow();
if (root && root->IsClosed()) {
aVisitor.mParentIsSlotInClosedTree = true;
}
}
} else {
aVisitor.mParentTarget = GetComposedDoc();
aVisitor.SetParentTarget(GetComposedDoc(), false);
}
return NS_OK;
}

View File

@ -307,6 +307,7 @@ nsresult
ShadowRoot::GetEventTargetParent(EventChainPreVisitor& aVisitor)
{
aVisitor.mCanHandle = true;
aVisitor.mRootOfClosedTree = IsClosed();
// https://dom.spec.whatwg.org/#ref-for-get-the-parent%E2%91%A6
if (!aVisitor.mEvent->mFlags.mComposed) {
@ -321,13 +322,13 @@ ShadowRoot::GetEventTargetParent(EventChainPreVisitor& aVisitor)
EventTarget* parentTarget = win && aVisitor.mEvent->mMessage != eLoad
? win->GetParentTarget() : nullptr;
aVisitor.mParentTarget = parentTarget;
aVisitor.SetParentTarget(parentTarget, true);
return NS_OK;
}
}
nsIContent* shadowHost = GetHost();
aVisitor.mParentTarget = shadowHost;
aVisitor.SetParentTarget(shadowHost, false);
if (aVisitor.mOriginalTargetIsInAnon) {
nsCOMPtr<nsIContent> content(do_QueryInterface(aVisitor.mEvent->mTarget));

View File

@ -8209,8 +8209,8 @@ nsDocument::GetEventTargetParent(EventChainPreVisitor& aVisitor)
// Load events must not propagate to |window| object, see bug 335251.
if (aVisitor.mEvent->mMessage != eLoad) {
nsGlobalWindowOuter* window = nsGlobalWindowOuter::Cast(GetWindow());
aVisitor.mParentTarget =
window ? window->GetTargetForEventTargetChain() : nullptr;
aVisitor.SetParentTarget(
window ? window->GetTargetForEventTargetChain() : nullptr, false);
}
return NS_OK;
}

View File

@ -1949,7 +1949,7 @@ nsGlobalWindowInner::GetEventTargetParent(EventChainPreVisitor& aVisitor)
}
}
aVisitor.mParentTarget = GetParentTarget();
aVisitor.SetParentTarget(GetParentTarget(), true);
// Handle 'active' event.
if (!mIdleObservers.IsEmpty() &&

View File

@ -277,7 +277,7 @@ nsInProcessTabChildGlobal::GetEventTargetParent(EventChainPreVisitor& aVisitor)
#endif
if (mPreventEventsEscaping) {
aVisitor.mParentTarget = nullptr;
aVisitor.SetParentTarget(nullptr, false);
return NS_OK;
}
@ -285,11 +285,13 @@ nsInProcessTabChildGlobal::GetEventTargetParent(EventChainPreVisitor& aVisitor)
(!mOwner || !nsContentUtils::IsInChromeDocshell(mOwner->OwnerDoc()))) {
if (mOwner) {
if (nsPIDOMWindowInner* innerWindow = mOwner->OwnerDoc()->GetInnerWindow()) {
aVisitor.mParentTarget = innerWindow->GetParentTarget();
// 'this' is already a "chrome handler", so we consider window's
// parent target to be part of that same part of the event path.
aVisitor.SetParentTarget(innerWindow->GetParentTarget(), false);
}
}
} else {
aVisitor.mParentTarget = mOwner;
aVisitor.SetParentTarget(mOwner, false);
}
return NS_OK;

View File

@ -174,7 +174,7 @@ nsWindowRoot::GetEventTargetParent(EventChainPreVisitor& aVisitor)
aVisitor.mForceContentDispatch = true; //FIXME! Bug 329119
// To keep mWindow alive
aVisitor.mItemData = static_cast<nsISupports *>(mWindow);
aVisitor.mParentTarget = mParent;
aVisitor.SetParentTarget(mParent, false);
return NS_OK;
}

View File

@ -8,6 +8,7 @@
#include "ClientInfo.h"
#include "ClientState.h"
#include "mozilla/SystemGroup.h"
#include "nsContentUtils.h"
#include "nsIBrowserDOMWindow.h"
#include "nsIDocShell.h"
@ -425,7 +426,7 @@ ClientOpenWindowInCurrentProcess(const ClientOpenWindowArgs& aArgs)
// until the launch completes and then try to open the window again.
if (rv == NS_ERROR_NOT_AVAILABLE && launchObserver) {
RefPtr<GenericPromise> p = launchObserver->Promise();
p->Then(outerWindow->EventTargetFor(TaskCategory::Other), __func__,
p->Then(SystemGroup::EventTargetFor(TaskCategory::Other), __func__,
[aArgs, promise] (bool aResult) {
nsCOMPtr<nsPIDOMWindowOuter> outerWindow;
nsresult rv = OpenWindow(aArgs, getter_AddRefs(outerWindow));

View File

@ -307,7 +307,7 @@ nsresult
DOMEventTargetHelper::GetEventTargetParent(EventChainPreVisitor& aVisitor)
{
aVisitor.mCanHandle = true;
aVisitor.mParentTarget = nullptr;
aVisitor.SetParentTarget(nullptr, false);
return NS_OK;
}

View File

@ -273,6 +273,12 @@ Event::GetCurrentTarget() const
return mEvent->GetCurrentDOMEventTarget();
}
void
Event::ComposedPath(nsTArray<RefPtr<EventTarget>>& aPath)
{
EventDispatcher::GetComposedPathFor(mEvent, aPath);
}
NS_IMETHODIMP
Event::GetCurrentTarget(nsIDOMEventTarget** aCurrentTarget)
{

View File

@ -158,6 +158,8 @@ public:
EventTarget* GetTarget() const;
EventTarget* GetCurrentTarget() const;
void ComposedPath(nsTArray<RefPtr<EventTarget>>& aPath);
uint16_t EventPhase() const;
// xpidl implementation

View File

@ -246,6 +246,36 @@ public:
return mFlags.mPreHandleEventOnly;
}
void SetRootOfClosedTree(bool aSet)
{
mFlags.mRootOfClosedTree = aSet;
}
bool IsRootOfClosedTree()
{
return mFlags.mRootOfClosedTree;
}
void SetIsSlotInClosedTree(bool aSet)
{
mFlags.mIsSlotInClosedTree = aSet;
}
bool IsSlotInClosedTree()
{
return mFlags.mIsSlotInClosedTree;
}
void SetIsChromeHandler(bool aSet)
{
mFlags.mIsChromeHandler = aSet;
}
bool IsChromeHandler()
{
return mFlags.mIsChromeHandler;
}
void SetMayHaveListenerManager(bool aMayHave)
{
mFlags.mMayHaveManager = aMayHave;
@ -344,6 +374,9 @@ private:
bool mIsChromeContent : 1;
bool mWantsPreHandleEvent : 1;
bool mPreHandleEventOnly : 1;
bool mRootOfClosedTree : 1;
bool mIsSlotInClosedTree : 1;
bool mIsChromeHandler : 1;
private:
typedef uint32_t RawFlags;
void SetRawFlags(RawFlags aRawFlags)
@ -390,6 +423,7 @@ EventTargetChainItem::GetEventTargetParent(EventChainPreVisitor& aVisitor)
SetMayHaveListenerManager(aVisitor.mMayHaveListenerManager);
SetWantsPreHandleEvent(aVisitor.mWantsPreHandleEvent);
SetPreHandleEventOnly(aVisitor.mWantsPreHandleEvent && !aVisitor.mCanHandle);
SetRootOfClosedTree(aVisitor.mRootOfClosedTree);
mItemFlags = aVisitor.mItemFlags;
mItemData = aVisitor.mItemData;
}
@ -770,16 +804,19 @@ EventDispatcher::Dispatch(nsISupports* aTarget,
targetEtci->SetNewTarget(t);
EventTargetChainItem* topEtci = targetEtci;
targetEtci = nullptr;
while (preVisitor.mParentTarget) {
EventTarget* parentTarget = preVisitor.mParentTarget;
while (preVisitor.GetParentTarget()) {
EventTarget* parentTarget = preVisitor.GetParentTarget();
EventTargetChainItem* parentEtci =
EventTargetChainItem::Create(chain, preVisitor.mParentTarget, topEtci);
EventTargetChainItem::Create(chain, parentTarget, topEtci);
if (!parentEtci->IsValid()) {
EventTargetChainItem::DestroyLast(chain, parentEtci);
rv = NS_ERROR_FAILURE;
break;
}
parentEtci->SetIsSlotInClosedTree(preVisitor.mParentIsSlotInClosedTree);
parentEtci->SetIsChromeHandler(preVisitor.mParentIsChromeHandler);
// Item needs event retargetting.
if (preVisitor.mEventTargetAtParent) {
// Need to set the target of the event
@ -823,8 +860,11 @@ EventDispatcher::Dispatch(nsISupports* aTarget,
}
// Handle the chain.
EventChainPostVisitor postVisitor(preVisitor);
MOZ_RELEASE_ASSERT(!aEvent->mPath);
aEvent->mPath = &chain;
EventTargetChainItem::HandleEventTargetChain(chain, postVisitor,
aCallback, cd);
aEvent->mPath = nullptr;
preVisitor.mEventStatus = postVisitor.mEventStatus;
// If the DOM event was created during event flow.
@ -1117,4 +1157,64 @@ EventDispatcher::CreateEvent(EventTarget* aOwner,
return nullptr;
}
// static
void
EventDispatcher::GetComposedPathFor(WidgetEvent* aEvent,
nsTArray<RefPtr<EventTarget>>& aPath)
{
nsTArray<EventTargetChainItem>* path = aEvent->mPath;
if (!path || path->IsEmpty() || !aEvent->mCurrentTarget) {
return;
}
EventTarget* currentTarget =
aEvent->mCurrentTarget->GetTargetForEventTargetChain();
if (!currentTarget) {
return;
}
AutoTArray<EventTarget*, 128> reversedComposedPath;
bool hasSeenCurrentTarget = false;
uint32_t hiddenSubtreeLevel = 0;
for (uint32_t i = path->Length(); i; ) {
--i;
EventTargetChainItem& item = path->ElementAt(i);
if (item.PreHandleEventOnly()) {
continue;
}
if (!hasSeenCurrentTarget && currentTarget == item.CurrentTarget()) {
hasSeenCurrentTarget = true;
} else if (hasSeenCurrentTarget && item.IsRootOfClosedTree()) {
++hiddenSubtreeLevel;
}
if (hiddenSubtreeLevel == 0) {
reversedComposedPath.AppendElement(item.CurrentTarget());
}
if (item.IsSlotInClosedTree() && hiddenSubtreeLevel > 0) {
--hiddenSubtreeLevel;
}
if (item.IsChromeHandler()) {
if (hasSeenCurrentTarget) {
// The current behavior is to include only EventTargets from
// either chrome side of event path or content side, not from both.
break;
}
// Need to start all over to collect the composed path on content side.
reversedComposedPath.Clear();
}
}
aPath.SetCapacity(reversedComposedPath.Length());
for (uint32_t i = reversedComposedPath.Length(); i; ) {
--i;
aPath.AppendElement(reversedComposedPath[i]->GetTargetForDOMEvent());
}
}
} // namespace mozilla

View File

@ -125,6 +125,9 @@ public:
, mWantsWillHandleEvent(false)
, mMayHaveListenerManager(true)
, mWantsPreHandleEvent(false)
, mRootOfClosedTree(false)
, mParentIsSlotInClosedTree(false)
, mParentIsChromeHandler(false)
, mParentTarget(nullptr)
, mEventTargetAtParent(nullptr)
{
@ -140,10 +143,26 @@ public:
mWantsWillHandleEvent = false;
mMayHaveListenerManager = true;
mWantsPreHandleEvent = false;
mRootOfClosedTree = false;
mParentIsSlotInClosedTree = false;
mParentIsChromeHandler = false;
mParentTarget = nullptr;
mEventTargetAtParent = nullptr;
}
dom::EventTarget* GetParentTarget()
{
return mParentTarget;
}
void SetParentTarget(dom::EventTarget* aParentTarget, bool aIsChromeHandler)
{
mParentTarget = aParentTarget;
if (mParentTarget) {
mParentIsChromeHandler = aIsChromeHandler;
}
}
/**
* Member that must be set in GetEventTargetParent by event targets. If set to
* false, indicates that this event target will not be handling the event and
@ -195,11 +214,30 @@ public:
*/
bool mWantsPreHandleEvent;
/**
* True if the current target is either closed ShadowRoot or root of
* chrome only access tree (for example native anonymous content).
*/
bool mRootOfClosedTree;
/**
* True if mParentTarget is HTMLSlotElement in a closed shadow tree and the
* current target is assigned to that slot.
*/
bool mParentIsSlotInClosedTree;
/**
* True if mParentTarget is a chrome handler in the event path.
*/
bool mParentIsChromeHandler;
private:
/**
* Parent item in the event target chain.
*/
dom::EventTarget* mParentTarget;
public:
/**
* If the event needs to be retargeted, this is the event target,
* which should be used when the event is handled at mParentTarget.
@ -284,6 +322,9 @@ public:
dom::CallerType aCallerType =
dom::CallerType::System);
static void GetComposedPathFor(WidgetEvent* aEvent,
nsTArray<RefPtr<dom::EventTarget>>& aPath);
/**
* Called at shutting down.
*/

View File

@ -7,6 +7,7 @@
* Portions Copyright 2013 Microsoft Open Technologies, Inc. */
#include "mozilla/dom/PointerEvent.h"
#include "mozilla/dom/PointerEventBinding.h"
#include "mozilla/MouseEvents.h"
#include "prtime.h"
@ -37,6 +38,13 @@ PointerEvent::PointerEvent(EventTarget* aOwner,
mDetail = 0;
}
JSObject*
PointerEvent::WrapObjectInternal(JSContext* aCx,
JS::Handle<JSObject*> aGivenProto)
{
return PointerEventBinding::Wrap(aCx, this, aGivenProto);
}
static uint16_t
ConvertStringToPointerType(const nsAString& aPointerTypeArg)
{
@ -101,6 +109,9 @@ PointerEvent::Constructor(EventTarget* aOwner,
widgetEvent->mIsPrimary = aParam.mIsPrimary;
widgetEvent->buttons = aParam.mButtons;
if (!aParam.mCoalescedEvents.IsEmpty()) {
e->mCoalescedEvents.AppendElements(aParam.mCoalescedEvents);
}
e->SetTrusted(trusted);
e->SetComposed(aParam.mComposed);
return e.forget();
@ -117,6 +128,22 @@ PointerEvent::Constructor(const GlobalObject& aGlobal,
return Constructor(owner, aType, aParam);
}
NS_IMPL_CYCLE_COLLECTION_CLASS(PointerEvent)
NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(PointerEvent, MouseEvent)
NS_IMPL_CYCLE_COLLECTION_UNLINK(mCoalescedEvents)
NS_IMPL_CYCLE_COLLECTION_UNLINK_END
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(PointerEvent, MouseEvent)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mCoalescedEvents)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(PointerEvent)
NS_INTERFACE_MAP_END_INHERITING(MouseEvent)
NS_IMPL_ADDREF_INHERITED(PointerEvent, MouseEvent)
NS_IMPL_RELEASE_INHERITED(PointerEvent, MouseEvent)
void
PointerEvent::GetPointerType(nsAString& aPointerType)
{
@ -177,6 +204,50 @@ PointerEvent::IsPrimary()
return mEvent->AsPointerEvent()->mIsPrimary;
}
void
PointerEvent::GetCoalescedEvents(nsTArray<RefPtr<PointerEvent>>& aPointerEvents)
{
WidgetPointerEvent* widgetEvent = mEvent->AsPointerEvent();
if (mCoalescedEvents.IsEmpty() && widgetEvent &&
widgetEvent->mCoalescedWidgetEvents &&
!widgetEvent->mCoalescedWidgetEvents->mEvents.IsEmpty()) {
for (WidgetPointerEvent& event :
widgetEvent->mCoalescedWidgetEvents->mEvents) {
RefPtr<PointerEvent> domEvent =
NS_NewDOMPointerEvent(nullptr, nullptr, &event);
// The dom event is derived from an OS generated widget event. Setup
// mWidget and mPresContext since they are necessary to calculate
// offsetX / offsetY.
domEvent->mEvent->AsGUIEvent()->mWidget = widgetEvent->mWidget;
domEvent->mPresContext = mPresContext;
// The coalesced widget mouse events shouldn't have been dispatched.
MOZ_ASSERT(!domEvent->mEvent->mTarget);
// The event target should be the same as the dispatched event's target.
domEvent->mEvent->mTarget = mEvent->mTarget;
// JS could hold reference to dom events. We have to ask dom event to
// duplicate its private data to avoid the widget event is destroyed.
domEvent->DuplicatePrivateData();
// Setup mPresContext again after DuplicatePrivateData since it clears
// mPresContext.
domEvent->mPresContext = mPresContext;
mCoalescedEvents.AppendElement(domEvent);
}
}
if (mEvent->mTarget) {
for (RefPtr<PointerEvent>& pointerEvent : mCoalescedEvents) {
// Only set event target when it's null.
if (!pointerEvent->mEvent->mTarget) {
pointerEvent->mEvent->mTarget = mEvent->mTarget;
}
}
}
aPointerEvents.AppendElements(mCoalescedEvents);
}
} // namespace dom
} // namespace mozilla

View File

@ -17,6 +17,8 @@ class nsPresContext;
namespace mozilla {
namespace dom {
struct PointerEventInit;
class PointerEvent : public MouseEvent
{
public:
@ -24,10 +26,12 @@ public:
nsPresContext* aPresContext,
WidgetPointerEvent* aEvent);
virtual JSObject* WrapObjectInternal(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override
{
return PointerEventBinding::Wrap(aCx, this, aGivenProto);
}
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(PointerEvent, MouseEvent)
virtual JSObject* WrapObjectInternal(
JSContext* aCx,
JS::Handle<JSObject*> aGivenProto) override;
static already_AddRefed<PointerEvent>
Constructor(const GlobalObject& aGlobal,
@ -50,6 +54,13 @@ public:
int32_t Twist();
bool IsPrimary();
void GetPointerType(nsAString& aPointerType);
void GetCoalescedEvents(nsTArray<RefPtr<PointerEvent>>& aPointerEvents);
protected:
~PointerEvent() {}
private:
nsTArray<RefPtr<PointerEvent>> mCoalescedEvents;
};
void ConvertPointerTypeToString(uint16_t aPointerTypeSrc, nsAString& aPointerTypeDest);

View File

@ -8,6 +8,7 @@ support-files =
bug602962.xul
file_bug679494.html
window_bug617528.xul
window_bug1412775.xul
test_bug336682.js
[test_bug336682_2.xul]
@ -23,5 +24,6 @@ support-files =
[test_bug1128787-1.html]
[test_bug1128787-2.html]
[test_bug1128787-3.html]
[test_bug1412775.xul]
[test_eventctors.xul]
[test_DataTransferItemList.html]

View File

@ -135,3 +135,7 @@ support-files =
support-files =
file_test_trigger_fullscreen.html
[test_trigger_popup_by_pointer_events.html]
[test_getCoalescedEvents.html]
skip-if = !e10s
support-files =
../../../../gfx/layers/apz/test/mochitest/apz_test_native_event_utils.js

View File

@ -0,0 +1,93 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=1303957
-->
<head>
<meta charset="utf-8">
<title>Test for Bug 1303957</title>
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="text/javascript" src="apz_test_native_event_utils.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1303957">Mozilla Bug 1303957</a>
<p id="display"></p>
<div id="target0" style="width: 50px; height: 50px; background: green"></div>
<script type="text/javascript">
/** Test for Bug 1303957 **/
SimpleTest.waitForExplicitFinish();
function runTests() {
let target0 = window.document.getElementById("target0");
let utils = SpecialPowers.getDOMWindowUtils(window);
utils.advanceTimeAndRefresh(0);
SimpleTest.executeSoon(() => {
// Flush all pending mouse events before synthesizing events.
target0.addEventListener("pointermove", (ev) => {
let length = ev.getCoalescedEvents().length;
ok(length >= 1, "Coalesced events should >= 1, got " + length);
let rect = target0.getBoundingClientRect();
let prevOffsetX = 0;
let prevOffsetY = 0;
for (let i = 0; i < length; ++i) {
let coalescedEvent = ev.getCoalescedEvents()[i];
is(coalescedEvent.pointerId, ev.pointerId, "getCoalescedEvents()[" + i + "].pointerId");
is(coalescedEvent.pointerType, ev.pointerType, "getCoalescedEvents()[" + i + "].pointerType");
is(coalescedEvent.isPrimary, ev.isPrimary, "getCoalescedEvents()[" + i + "].isPrimary");
is(coalescedEvent.target, ev.target, "getCoalescedEvents()[" + i + "].target");
is(coalescedEvent.currentTarget, null, "getCoalescedEvents()[" + i + "].currentTarget");
is(coalescedEvent.eventPhase, Event.NONE, "getCoalescedEvents()[" + i + "].eventPhase");
is(coalescedEvent.cancelable, false, "getCoalescedEvents()[" + i + "].cancelable");
is(coalescedEvent.bubbles, false, "getCoalescedEvents()[" + i + "].bubbles");
let offsetX = 20 - (length - i - 1) * 5;
let offsetY = 20 - (length - i - 1) * 5;
ok(coalescedEvent.offsetX > prevOffsetX, "getCoalescedEvents()[" + i + "].offsetX = " + coalescedEvent.offsetX);
ok(coalescedEvent.offsetX == 5 || coalescedEvent.offsetX == 10 ||
coalescedEvent.offsetX == 15 || coalescedEvent.offsetX == 20, "expected offsetX");
ok(coalescedEvent.offsetY > prevOffsetY, "getCoalescedEvents()[" + i + "].offsetY = " + coalescedEvent.offsetY);
ok(coalescedEvent.offsetY == 5 || coalescedEvent.offsetY == 10 ||
coalescedEvent.offsetY == 15 || coalescedEvent.offsetY == 20, "expected offsetY");
prevOffsetX = coalescedEvent.offsetX;
prevOffsetY = coalescedEvent.offsetY;
let x = rect.left + prevOffsetX;
let y = rect.top + prevOffsetY;
// coordinates may change slightly due to rounding
ok((coalescedEvent.clientX <= x+2) && (coalescedEvent.clientX >= x-2), "getCoalescedEvents()[" + i + "].clientX");
ok((coalescedEvent.clientY <= y+2) && (coalescedEvent.clientY >= y-2), "getCoalescedEvents()[" + i + "].clientY");
}
}, { once: true });
target0.addEventListener("pointerup", (ev) => {
utils.restoreNormalRefresh();
SimpleTest.finish();
}, { once: true });
synthesizeNativeMouseEvent(target0, 5, 5, nativeMouseMoveEventMsg(), () => {
synthesizeNativeMouseEvent(target0, 10, 10, nativeMouseMoveEventMsg(), () => {
synthesizeNativeMouseEvent(target0, 15, 15, nativeMouseMoveEventMsg(), () => {
synthesizeNativeMouseEvent(target0, 20, 20, nativeMouseMoveEventMsg(), () => {
synthesizeNativeClick(target0, 20, 20);
});
});
});
});
});
}
SimpleTest.waitForFocus(() => {
SpecialPowers.pushPrefEnv({"set": [["dom.w3c_pointer_events.enabled", true],
["dom.event.coalesce_mouse_move", true]]}, runTests);
});
</script>
</body>
</html>

View File

@ -0,0 +1,71 @@
<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="chrome://global/skin"?>
<?xml-stylesheet type="text/css" href="/tests/SimpleTest/test.css"?>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=1412775
-->
<window title="Mozilla Bug 1412775"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="init()">
<script type="application/javascript"
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
<script type="application/javascript"
src="chrome://mochikit/content/chrome-harness.js"></script>
<!-- test code goes here -->
<script type="application/javascript">
<![CDATA[
/** Test for Bug 1412775 **/
const { classes: Cc, interfaces: Ci, utils: Cu } = Components;
var win;
function init() {
SimpleTest.waitForExplicitFinish();
win = window.open("window_bug1412775.xul", "_new", "chrome");
win.onload = function() {
var b = win.document.getElementById("browser");
var d = b.contentWindow.document;
var e = new d.defaultView.Event("foo");
var didCallChromeSide = false;
var didCallContentSide = false;
b.addEventListener("foo", function(e) {
didCallChromeSide = true;
var path = e.composedPath();
var mm = d.defaultView.QueryInterface(Ci.nsIInterfaceRequestor)
.getInterface(Ci.nsIWebNavigation)
.QueryInterface(Ci.nsIInterfaceRequestor)
.getInterface(Ci.nsIContentFrameMessageManager);
is(path.length, 5, "Should have 5 items in composedPath in chrome.");
is(path[0], mm, "TabChildGlobal is the chrome handler.");
is(path[1], b, "browser element should be in the path.");
is(path[2], b.parentNode, "window element should be in the path.");
is(path[3], win.document, "Document object should be in the path.");
is(path[4], win, "Window object should be in the path.");
}, true, true);
d.addEventListener("foo", function(e) {
didCallContentSide = true;;
var path = e.composedPath();
is(path.length, 4, "Should have 4 items in composedPath in content.");
is(path[0], d.body, "body element should be in the path.");
is(path[1], d.documentElement, "html element should be in the path.");
is(path[2], d, "Document object should be in the path.");
is(path[3], d.defaultView, "Window object should be in the path.");
}, true, true);
d.body.dispatchEvent(e);
ok(didCallChromeSide, "didCallChromeSide");
ok(didCallContentSide, "didCallContentSide");
win.close();
SimpleTest.finish();
}
}
]]>
</script>
<!-- test results are displayed in the html:body -->
<body xmlns="http://www.w3.org/1999/xhtml">
<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1412775"
target="_blank">Mozilla Bug 1412775</a>
</body>
</window>

View File

@ -0,0 +1,8 @@
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
width="640" height="480">
<browser id="browser" type="content" primary="true" flex="1" src="about:blank"/>
</window>

View File

@ -786,7 +786,7 @@ IDBFileHandle::GetEventTargetParent(EventChainPreVisitor& aVisitor)
AssertIsOnOwningThread();
aVisitor.mCanHandle = true;
aVisitor.mParentTarget = mMutableFile;
aVisitor.SetParentTarget(mMutableFile, false);
return NS_OK;
}

View File

@ -113,7 +113,7 @@ IDBFileRequest::GetEventTargetParent(EventChainPreVisitor& aVisitor)
AssertIsOnOwningThread();
aVisitor.mCanHandle = true;
aVisitor.mParentTarget = mFileHandle;
aVisitor.SetParentTarget(mFileHandle, false);
return NS_OK;
}

View File

@ -411,7 +411,7 @@ IDBRequest::GetEventTargetParent(EventChainPreVisitor& aVisitor)
AssertIsOnOwningThread();
aVisitor.mCanHandle = true;
aVisitor.mParentTarget = mTransaction;
aVisitor.SetParentTarget(mTransaction, false);
return NS_OK;
}

View File

@ -1054,7 +1054,7 @@ IDBTransaction::GetEventTargetParent(EventChainPreVisitor& aVisitor)
AssertIsOnOwningThread();
aVisitor.mCanHandle = true;
aVisitor.mParentTarget = mDatabase;
aVisitor.SetParentTarget(mDatabase, false);
return NS_OK;
}

View File

@ -20,6 +20,7 @@ CoalescedMouseData::Coalesce(const WidgetMouseEvent& aEvent,
mCoalescedInputEvent = MakeUnique<WidgetMouseEvent>(aEvent);
mGuid = aGuid;
mInputBlockId = aInputBlockId;
MOZ_ASSERT(!mCoalescedInputEvent->mCoalescedWidgetEvents);
} else {
MOZ_ASSERT(mGuid == aGuid);
MOZ_ASSERT(mInputBlockId == aInputBlockId);
@ -33,6 +34,22 @@ CoalescedMouseData::Coalesce(const WidgetMouseEvent& aEvent,
mCoalescedInputEvent->pressure = aEvent.pressure;
mCoalescedInputEvent->AssignPointerHelperData(aEvent);
}
if (aEvent.mMessage == eMouseMove &&
PointerEventHandler::IsPointerEventEnabled()) {
// PointerEvent::getCoalescedEvents is only applied to pointermove events.
if (!mCoalescedInputEvent->mCoalescedWidgetEvents) {
mCoalescedInputEvent->mCoalescedWidgetEvents =
new WidgetPointerEventHolder();
}
// Append current event in mCoalescedWidgetEvents. We use them to generate
// DOM events when content calls PointerEvent::getCoalescedEvents.
WidgetPointerEvent* event = mCoalescedInputEvent->mCoalescedWidgetEvents
->mEvents.AppendElement(aEvent);
event->mFlags.mBubbles = false;
event->mFlags.mCancelable = false;
}
}
bool
@ -40,6 +57,7 @@ CoalescedMouseData::CanCoalesce(const WidgetMouseEvent& aEvent,
const ScrollableLayerGuid& aGuid,
const uint64_t& aInputBlockId)
{
MOZ_ASSERT(aEvent.mMessage == eMouseMove);
return !mCoalescedInputEvent ||
(mCoalescedInputEvent->mModifiers == aEvent.mModifiers &&
mCoalescedInputEvent->inputSource == aEvent.inputSource &&

View File

@ -20,6 +20,8 @@ interface Event {
[Pure]
readonly attribute EventTarget? currentTarget;
sequence<EventTarget> composedPath();
const unsigned short NONE = 0;
const unsigned short CAPTURING_PHASE = 1;
const unsigned short AT_TARGET = 2;

View File

@ -23,6 +23,7 @@ interface PointerEvent : MouseEvent
readonly attribute long twist;
readonly attribute DOMString pointerType;
readonly attribute boolean isPrimary;
sequence<PointerEvent> getCoalescedEvents();
};
dictionary PointerEventInit : MouseEventInit
@ -37,5 +38,5 @@ dictionary PointerEventInit : MouseEventInit
long twist = 0;
DOMString pointerType = "";
boolean isPrimary = false;
sequence<PointerEvent> coalescedEvents = [];
};

View File

@ -44,6 +44,7 @@
#include "mozilla/dom/FetchUtil.h"
#include "mozilla/dom/MessageChannel.h"
#include "mozilla/dom/MessageEventBinding.h"
#include "mozilla/dom/PerformanceService.h"
#include "mozilla/dom/WorkerBinding.h"
#include "mozilla/dom/ScriptSettings.h"
#include "mozilla/dom/IndexedDatabaseManager.h"
@ -992,6 +993,8 @@ public:
// The CC is shut down, and the superclass destructor will GC, so make sure
// we don't try to CC again.
mWorkerPrivate = nullptr;
CycleCollectedJSRuntime::Shutdown(cx);
}
~WorkerJSRuntime()
@ -2022,6 +2025,9 @@ RuntimeService::Init()
return NS_ERROR_UNEXPECTED;
}
// PerformanceService must be initialized on the main-thread.
PerformanceService::GetOrCreate();
return NS_OK;
}

View File

@ -201,7 +201,7 @@ SharedWorker::GetEventTargetParent(EventChainPreVisitor& aVisitor)
QueueEvent(event);
aVisitor.mCanHandle = false;
aVisitor.mParentTarget = nullptr;
aVisitor.SetParentTarget(nullptr, false);
return NS_OK;
}

View File

@ -1929,7 +1929,7 @@ WorkerLoadInfo::GetPrincipalAndLoadGroupFromChannel(nsIChannel* aChannel,
MOZ_DIAGNOSTIC_ASSERT(aLoadGroupOut);
// Initial triggering principal should be set
MOZ_DIAGNOSTIC_ASSERT(mLoadingPrincipal);
NS_ENSURE_TRUE(mLoadingPrincipal, NS_ERROR_DOM_INVALID_STATE_ERR);
nsIScriptSecurityManager* ssm = nsContentUtils::GetSecurityManager();
MOZ_DIAGNOSTIC_ASSERT(ssm);

View File

@ -1291,7 +1291,7 @@ nsXULElement::GetEventTargetParent(EventChainPreVisitor& aVisitor)
if (IsEventStoppedFromAnonymousScrollbar(aVisitor.mEvent->mMessage)) {
// Don't propagate these events from native anonymous scrollbar.
aVisitor.mCanHandle = true;
aVisitor.mParentTarget = nullptr;
aVisitor.SetParentTarget(nullptr, false);
return NS_OK;
}
if (aVisitor.mEvent->mMessage == eXULCommand &&

View File

@ -9,7 +9,6 @@
#include "nsExpirationTracker.h"
#include "nsClassHashtable.h"
#include "mozilla/SystemGroup.h"
#include "mozilla/Telemetry.h"
#include "gfxGradientCache.h"
#include <time.h>
@ -127,8 +126,6 @@ class GradientCache final : public nsExpirationTracker<GradientCacheData,4>
SystemGroup::EventTargetFor(TaskCategory::Other))
{
srand(time(nullptr));
mTimerPeriod = rand() % MAX_GENERATION_MS + 1;
Telemetry::Accumulate(Telemetry::GRADIENT_RETENTION_TIME, mTimerPeriod);
}
virtual void NotifyExpired(GradientCacheData* aObject)
@ -168,7 +165,6 @@ class GradientCache final : public nsExpirationTracker<GradientCacheData,4>
}
protected:
uint32_t mTimerPeriod;
static const uint32_t MAX_GENERATION_MS = 10000;
/**
* FIXME use nsTHashtable to avoid duplicating the GradientCacheKey.

View File

@ -56,6 +56,7 @@ ProxyObject::New(JSContext* cx, const BaseProxyHandler* handler, HandleValue pri
MOZ_ASSERT(clasp->shouldDelayMetadataBuilder());
MOZ_ASSERT_IF(proto.isObject(), cx->compartment() == proto.toObject()->compartment());
MOZ_ASSERT(clasp->hasFinalize());
MOZ_ASSERT_IF(priv.isGCThing(), !JS::GCThingIsMarkedGray(JS::GCCellPtr(priv)));
/*
* Eagerly mark properties unknown for proxies, so we don't try to track

View File

@ -995,8 +995,6 @@ class Shape : public gc::TenuredCell
return flags & OVERWRITTEN;
}
void update(GetterOp getter, SetterOp setter, uint8_t attrs);
bool matches(const Shape* other) const {
return propid_.get() == other->propid_.get() &&
matchesParamsAfterId(other->base(), other->maybeSlot(), other->attrs,

View File

@ -24,7 +24,6 @@
#include "gfxContext.h"
#include "nsStyleStructInlines.h"
#include "nsCSSProps.h"
#include "mozilla/Telemetry.h"
#include "gfxUtils.h"
#include "gfxGradientCache.h"
@ -661,7 +660,6 @@ nsCSSGradientRenderer::Paint(gfxContext& aContext,
float aOpacity)
{
AUTO_PROFILER_LABEL("nsCSSGradientRenderer::Paint", GRAPHICS);
Telemetry::AutoTimer<Telemetry::GRADIENT_DURATION, Telemetry::Microsecond> gradientTimer;
if (aDest.IsEmpty() || aFillArea.IsEmpty()) {
return;

View File

@ -557,14 +557,15 @@ public:
// It's ok to drop the audio still in the packetizer here.
mPacketizer = MakeUnique<AudioPacketizer<int16_t, int16_t>>(
audio_10ms, outputChannels);
mPacket = MakeUnique<int16_t[]>(audio_10ms * outputChannels);
}
mPacketizer->Input(samples, chunk.mDuration);
while (mPacketizer->PacketsAvailable()) {
mPacketizer->Output(mPacket);
mPacketizer->Output(mPacket.get());
mConduit->SendAudioFrame(
mPacket, mPacketizer->PacketSize(), rate, mPacketizer->Channels(), 0);
mPacket.get(), mPacketizer->PacketSize(), rate, mPacketizer->Channels(), 0);
}
}
@ -594,7 +595,7 @@ protected:
// Only accessed on mTaskQueue
UniquePtr<AudioPacketizer<int16_t, int16_t>> mPacketizer;
// A buffer to hold a single packet of audio.
int16_t mPacket[AUDIO_SAMPLE_BUFFER_MAX_BYTES / sizeof(int16_t)];
UniquePtr<int16_t[]> mPacket;
};
static char kDTLSExporterLabel[] = "EXTRACTOR-dtls_srtp";

View File

@ -39,7 +39,7 @@ class FakeAudioDeviceModule : public AudioDeviceModule {
virtual int32_t SetStereoRecording(bool enable) { return 0; }
virtual int32_t SetAGC(bool enable) { return 0; }
virtual int32_t StopRecording() { return 0; }
virtual int64_t TimeUntilNextProcess() { return 0; }
virtual int64_t TimeUntilNextProcess() { return 100; }
virtual void Process() {}
virtual int32_t Terminate() { return 0; }

View File

@ -119,6 +119,8 @@
//-----------------------------------------------------------------------------
using mozilla::Telemetry::LABELS_NETWORK_HTTP_REDIRECT_TO_SCHEME;
namespace mozilla {
namespace net {
@ -828,14 +830,28 @@ nsHttpHandler::AsyncOnChannelRedirect(nsIChannel* oldChan,
uint32_t flags,
nsIEventTarget* mainThreadEventTarget)
{
// TODO E10S This helper has to be initialized on the other process
RefPtr<nsAsyncRedirectVerifyHelper> redirectCallbackHelper =
new nsAsyncRedirectVerifyHelper();
MOZ_ASSERT(NS_IsMainThread() && (oldChan && newChan));
return redirectCallbackHelper->Init(oldChan,
newChan,
flags,
mainThreadEventTarget);
nsCOMPtr<nsIURI> newURI;
newChan->GetURI(getter_AddRefs(newURI));
MOZ_ASSERT(newURI);
nsAutoCString scheme;
newURI->GetScheme(scheme);
MOZ_ASSERT(!scheme.IsEmpty());
Telemetry::AccumulateCategoricalKeyed(
scheme,
oldChan->IsDocument()
? LABELS_NETWORK_HTTP_REDIRECT_TO_SCHEME::topLevel
: LABELS_NETWORK_HTTP_REDIRECT_TO_SCHEME::subresource);
// TODO E10S This helper has to be initialized on the other process
RefPtr<nsAsyncRedirectVerifyHelper> redirectCallbackHelper =
new nsAsyncRedirectVerifyHelper();
return redirectCallbackHelper->Init(
oldChan, newChan, flags, mainThreadEventTarget);
}
/* static */ nsresult

View File

@ -1 +1 @@
NSPR_4_18_BETA3
NSPR_4_18_BETA4

View File

@ -10,3 +10,4 @@
*/
#error "Do not include this header file."

View File

@ -27,6 +27,9 @@ PRUint32 _nt_idleCount;
extern __declspec(thread) PRThread *_pr_io_restarted_io;
extern DWORD _pr_io_restartedIOIndex;
typedef HRESULT (WINAPI *SETTHREADDESCRIPTION)(HANDLE, PCWSTR);
static SETTHREADDESCRIPTION sSetThreadDescription = NULL;
/* Must check the restarted_io *before* decrementing no_sched to 0 */
#define POST_SWITCH_WORK() \
PR_BEGIN_MACRO \
@ -79,6 +82,8 @@ _nt_handle_restarted_io(PRThread *restarted_io)
void
_PR_MD_EARLY_INIT()
{
HMODULE hModule;
_MD_NEW_LOCK( &_nt_idleLock );
_nt_idleCount = 0;
PR_INIT_CLIST(&_nt_idleList);
@ -98,6 +103,15 @@ _PR_MD_EARLY_INIT()
_pr_intsOffIndex = TlsAlloc();
_pr_io_restartedIOIndex = TlsAlloc();
}
// SetThreadDescription is Windows 10 build 1607+
hModule = GetModuleHandleW(L"kernel32.dll");
if (hModule) {
sSetThreadDescription =
(SETTHREADDESCRIPTION) GetProcAddress(
hModule,
"SetThreadDescription");
}
}
void _PR_MD_CLEANUP_BEFORE_EXIT(void)
@ -293,7 +307,16 @@ _PR_MD_SET_CURRENT_THREAD_NAME(const char *name)
{
#ifdef _MSC_VER
THREADNAME_INFO info;
#endif
if (sSetThreadDescription) {
WCHAR wideName[MAX_PATH];
if (MultiByteToWideChar(CP_ACP, 0, name, -1, wideName, MAX_PATH)) {
sSetThreadDescription(GetCurrentThread(), wideName);
}
}
#ifdef _MSC_VER
if (!IsDebuggerPresent())
return;

View File

@ -1,3 +1,4 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@ -27,9 +28,14 @@ DWORD _pr_currentCPUIndex;
int _pr_intsOff = 0;
_PRInterruptTable _pr_interruptTable[] = { { 0 } };
typedef HRESULT (WINAPI *SETTHREADDESCRIPTION)(HANDLE, PCWSTR);
static SETTHREADDESCRIPTION sSetThreadDescription = NULL;
void
_PR_MD_EARLY_INIT()
{
HMODULE hModule;
#ifndef _PR_USE_STATIC_TLS
_pr_currentThreadIndex = TlsAlloc();
_pr_lastThreadIndex = TlsAlloc();
@ -39,6 +45,15 @@ _PR_MD_EARLY_INIT()
#if defined(_WIN64) && defined(WIN95)
_fd_waiting_for_overlapped_done_lock = PR_NewLock();
#endif
// SetThreadDescription is Windows 10 build 1607+
hModule = GetModuleHandleW(L"kernel32.dll");
if (hModule) {
sSetThreadDescription =
(SETTHREADDESCRIPTION) GetProcAddress(
hModule,
"SetThreadDescription");
}
}
void _PR_MD_CLEANUP_BEFORE_EXIT(void)
@ -217,7 +232,16 @@ _PR_MD_SET_CURRENT_THREAD_NAME(const char *name)
{
#ifdef _MSC_VER
THREADNAME_INFO info;
#endif
if (sSetThreadDescription) {
WCHAR wideName[MAX_PATH];
if (MultiByteToWideChar(CP_ACP, 0, name, -1, wideName, MAX_PATH)) {
sSetThreadDescription(GetCurrentThread(), wideName);
}
}
#ifdef _MSC_VER
if (!IsDebuggerPresent())
return;

View File

@ -9,7 +9,7 @@ transforms:
- taskgraph.transforms.task:transforms
kind-dependencies:
- beetmover-checksums
- post-beetmover-dummy
- release-bouncer-sub
job-defaults:

View File

@ -6,7 +6,7 @@ loader: taskgraph.loader.transform:loader
kind-dependencies:
# For the $platform_info.txt files.
- beetmover-repackage
- post-beetmover-dummy
transforms:
- taskgraph.transforms.release_deps:transforms

View File

@ -21,6 +21,10 @@ VSWINPATH="$(cd ${MSVC_DIR} && pwd)"
echo vswinpath ${VSWINPATH}
# LLVM_ENABLE_DIA_SDK is set if the directory "$ENV{VSINSTALLDIR}DIA SDK"
# exists.
export VSINSTALLDIR="${VSWINPATH}/"
export WINDOWSSDKDIR="${VSWINPATH}/SDK"
export WIN32_REDIST_DIR="${VSWINPATH}/VC/redist/x86/Microsoft.VC141.CRT"
export WIN_UCRT_REDIST_DIR="${VSWINPATH}/SDK/Redist/ucrt/DLLs/x86"

View File

@ -21,6 +21,10 @@ VSWINPATH="$(cd ${MSVC_DIR} && pwd)"
echo vswinpath ${VSWINPATH}
# LLVM_ENABLE_DIA_SDK is set if the directory "$ENV{VSINSTALLDIR}DIA SDK"
# exists.
export VSINSTALLDIR="${VSWINPATH}/"
export WINDOWSSDKDIR="${VSWINPATH}/SDK"
export WIN32_REDIST_DIR="${VSWINPATH}/VC/redist/x64/Microsoft.VC141.CRT"
export WIN_UCRT_REDIST_DIR="${VSWINPATH}/SDK/Redist/ucrt/DLLs/x64"

View File

@ -229,33 +229,37 @@ def release_promotion_action(parameters, input, task_group_id, task_id, task):
"targets." % ', '.join(VERSION_BUMP_FLAVORS)
)
if release_promotion_flavor in PARTIAL_UPDATES_FLAVORS:
partial_updates = json.dumps(input.get('partial_updates', {}))
if partial_updates == "{}":
raise Exception(
"`partial_updates` property needs to be provided for %s "
"targets." % ', '.join(PARTIAL_UPDATES_FLAVORS)
)
os.environ['PARTIAL_UPDATES'] = partial_updates
release_history = populate_release_history(
'Firefox', parameters['project'], partial_updates=input['partial_updates']
)
if release_promotion_flavor in UPTAKE_MONITORING_PLATFORMS_FLAVORS:
uptake_monitoring_platforms = json.dumps(input.get('uptake_monitoring_platforms', []))
if partial_updates == "[]":
raise Exception(
"`uptake_monitoring_platforms` property needs to be provided for %s "
"targets." % ', '.join(UPTAKE_MONITORING_PLATFORMS_FLAVORS)
)
os.environ['UPTAKE_MONITORING_PLATFORMS'] = uptake_monitoring_platforms
if release_promotion_flavor in DESKTOP_RELEASE_TYPE_FLAVORS:
desktop_release_type = input.get('desktop_release_type', None)
if desktop_release_type not in VALID_DESKTOP_RELEASE_TYPES:
raise Exception("`desktop_release_type` must be one of: %s" %
", ".join(VALID_DESKTOP_RELEASE_TYPES))
if release_promotion_flavor in PARTIAL_UPDATES_FLAVORS:
partial_updates = json.dumps(input.get('partial_updates', {}))
if partial_updates == "{}":
raise Exception(
"`partial_updates` property needs to be provided for %s "
"targets." % ', '.join(PARTIAL_UPDATES_FLAVORS)
)
balrog_prefix = 'Firefox'
if desktop_release_type == 'devedition':
balrog_prefix = 'Devedition'
os.environ['PARTIAL_UPDATES'] = partial_updates
release_history = populate_release_history(
balrog_prefix, parameters['project'],
partial_updates=input['partial_updates']
)
if release_promotion_flavor in UPTAKE_MONITORING_PLATFORMS_FLAVORS:
uptake_monitoring_platforms = json.dumps(input.get('uptake_monitoring_platforms', []))
if partial_updates == "[]":
raise Exception(
"`uptake_monitoring_platforms` property needs to be provided for %s "
"targets." % ', '.join(UPTAKE_MONITORING_PLATFORMS_FLAVORS)
)
os.environ['UPTAKE_MONITORING_PLATFORMS'] = uptake_monitoring_platforms
promotion_config = RELEASE_PROMOTION_CONFIG[release_promotion_flavor]
target_tasks_method = input.get(

View File

@ -32,16 +32,46 @@ buildbot_run_schema = Schema({
})
def _get_balrog_api_root(branch):
if branch in ('mozilla-beta', 'mozilla-release') or branch.startswith('mozilla-esr'):
return 'https://aus4-admin.mozilla.org/api'
else:
return 'https://balrog-admin.stage.mozaws.net/api'
def _get_balrog_channel(product, branch):
if product == 'devedition':
return 'aurora'
elif product == 'firefox':
if branch in ('mozilla-beta', 'maple'):
return 'beta'
elif branch == 'mozilla-release':
return 'release'
elif branch.startswith('mozilla-esr'):
return 'esr'
# Unsupported channels are filtered out after the task is generated. Then, we must
# provide a dummy value for them, otherwise the Decision task breaks.
return 'unknown'
def bb_release_worker(config, worker, run):
# props
release_props = get_release_config(config)
repo_path = urlparse(config.params['head_repository']).path.lstrip('/')
revision = config.params['head_rev']
branch = config.params['project']
product = run['product']
release_props.update({
'release_promotion': True,
'repo_path': repo_path,
'revision': revision,
})
if product in ('devedition', 'firefox'):
release_props['balrog_api_root'] = _get_balrog_api_root(branch)
release_props['channels'] = _get_balrog_channel(product, branch)
worker['properties'].update(release_props)
# Setting script_repo_revision to the gecko revision doesn't work for
# jobs that clone build/tools or other repos instead of gecko.

View File

@ -4,7 +4,7 @@
import mozunit
import pytest
from marionette_harness.runtests import MarionetteArguments
from marionette_harness.runtests import MarionetteArguments, MarionetteTestRunner
@pytest.mark.parametrize("socket_timeout", ['A', '10', '1B-', '1C2', '44.35'])
@ -28,5 +28,39 @@ def test_parse_arg_socket_timeout(socket_timeout):
assert hasattr(args, 'socket_timeout') and args.socket_timeout == float(socket_timeout)
@pytest.mark.parametrize("arg_name, arg_dest, arg_value, expected_value",
[('app-arg', 'app_args', 'samplevalue', ['samplevalue']),
('symbols-path', 'symbols_path', 'samplevalue', 'samplevalue'),
('gecko-log', 'gecko_log', 'samplevalue', 'samplevalue'),
('app', 'app', 'samplevalue', 'samplevalue')])
def test_parsing_optional_arguments(mach_parsed_kwargs, arg_name, arg_dest, arg_value,
expected_value):
parser = MarionetteArguments()
parsed_args = parser.parse_args(['--' + arg_name, arg_value])
result = vars(parsed_args)
assert result.get(arg_dest) == expected_value
mach_parsed_kwargs[arg_dest] = result[arg_dest]
runner = MarionetteTestRunner(**mach_parsed_kwargs)
built_kwargs = runner._build_kwargs()
assert built_kwargs[arg_dest] == expected_value
@pytest.mark.parametrize("arg_name, arg_dest, arg_value, expected_value",
[('adb', 'adb_path', 'samplevalue', 'samplevalue'),
('avd', 'avd', 'samplevalue', 'samplevalue'),
('avd-home', 'avd_home', 'samplevalue', 'samplevalue'),
('package', 'package_name', 'samplevalue', 'samplevalue')])
def test_parse_opt_args_emulator(mach_parsed_kwargs, arg_name, arg_dest, arg_value, expected_value):
parser = MarionetteArguments()
parsed_args = parser.parse_args(['--' + arg_name, arg_value])
result = vars(parsed_args)
assert result.get(arg_dest) == expected_value
mach_parsed_kwargs[arg_dest] = result[arg_dest]
mach_parsed_kwargs["emulator"] = True
runner = MarionetteTestRunner(**mach_parsed_kwargs)
built_kwargs = runner._build_kwargs()
assert built_kwargs[arg_dest] == expected_value
if __name__ == '__main__':
mozunit.main('--log-tbpl=-')

View File

@ -34,4 +34,6 @@ config = {
"taskcluster-upload",
"summary",
],
"update_channel": "aurora",
}

View File

@ -73,4 +73,6 @@ config = {
('/builds/relengapi.tok', '/builds/relengapi.tok'),
('/usr/local/lib/hgext', '/usr/local/lib/hgext'),
],
"update_channel": "aurora",
}

View File

@ -93,4 +93,6 @@ config = {
('/builds/relengapi.tok', '/builds/relengapi.tok'),
('/usr/local/lib/hgext', '/usr/local/lib/hgext'),
],
"update_channel": "aurora",
}

View File

@ -43,4 +43,6 @@ config = {
"mar": "mar",
"mbsdiff": "mbsdiff",
"localized_mar": "firefox-%(version)s.%(locale)s.mac.complete.mar",
"update_channel": "aurora",
}

View File

@ -55,5 +55,7 @@ config = {
sys.executable,
'c:/mozilla-build/buildbotve/virtualenv.py'
],
}
},
"update_channel": "aurora",
}

View File

@ -55,5 +55,7 @@ config = {
sys.executable,
'c:/mozilla-build/buildbotve/virtualenv.py'
],
}
},
"update_channel": "aurora",
}

View File

@ -1,6 +1,3 @@
[idlharness.html]
type: testharness
prefs: [dom.w3c_pointer_events.enabled:true]
[PointerEvent interface: operation getCoalescedEvents()]
expected: FAIL

View File

@ -1,5 +1,4 @@
[pointerevent_constructor.html]
type: testharness
[PointerEvent: Constructor test]
expected: FAIL
prefs: [dom.w3c_pointer_events.enabled:true]

View File

@ -1,13 +1,5 @@
[Extensions-to-Event-Interface.html]
type: testharness
[composedPath() must exist on Event]
expected: FAIL
[composedPath() must return an empty array when the event has not been dispatched]
expected: FAIL
[composedPath() must return an empty array when the event is no longer dispatched]
expected: FAIL
[The event must propagate out of open mode shadow boundaries when the composed flag is set]
expected: FAIL

View File

@ -1,7 +0,0 @@
[event-composed-path-after-dom-mutation.html]
[Event.composedPath() should return the same result even if DOM is mutated (1/2)]
expected: FAIL
[Event.composedPath() should return the same result even if DOM is mutated (2/2)]
expected: FAIL

View File

@ -1,9 +1,5 @@
[event-composed-path-with-related-target.html]
type: testharness
expected: ERROR
[Event path for an event with a relatedTarget. relatedTarget != target.]
expected: FAIL
[Event path for an event with a relatedTarget. Event shoul be dispatched if 1) target and relatedTarget are same, and 2) they are not in a shadow tree.]
expected: FAIL
@ -40,9 +36,6 @@
[Event path for an event with a relatedTarget. Event should be dispatched at every slots. relatedTarget should be correctly retargeted.]
expected: FAIL
[Event path for an event with a relatedTarget. Event should be dispatched even when target and relatedTarget are same.]
expected: FAIL
[Event path for an event with a relatedTarget which is identical to target. Event should be dispatched and should stop at the shadow root.]
expected: FAIL

View File

@ -1,36 +1,9 @@
[event-composed-path.html]
type: testharness
expected: ERROR
[Event Path without ShadowRoots.]
expected: FAIL
[Event Path with an open ShadowRoot.]
expected: FAIL
[Event Path with a closed ShadowRoot.]
expected: FAIL
[Event Path with nested ShadowRoots: open > open.]
expected: FAIL
[Event Path with nested ShadowRoots: open > closed.]
expected: FAIL
[Event Path with nested ShadowRoots: closed > open.]
expected: FAIL
[Event Path with nested ShadowRoots: closed > closed.]
expected: FAIL
[Event Path with a slot in an open Shadow Root.]
expected: FAIL
[Event Path with a slot in a closed Shadow Root.]
expected: FAIL
[Event Path with slots in nested ShadowRoots: open > open.]
expected: FAIL
[Event Path with slots in nested ShadowRoots: closed > closed.]
expected: FAIL

View File

@ -1,24 +0,0 @@
[event-composed.html]
type: testharness
expected: ERROR
[An event should be scoped by default]
expected: FAIL
[An event should not be scoped if composed is specified]
expected: FAIL
[A synthetic MouseEvent should be scoped by default]
expected: FAIL
[A synthetic MouseEvent with composed=true should not be scoped]
expected: FAIL
[A synthetic FocusEvent should be scoped by default]
expected: FAIL
[A synthetic FocusEvent with composed=true should not be scoped]
expected: FAIL
[A UA click event should not be scoped]
expected: FAIL

View File

@ -1,25 +1,11 @@
[event-post-dispatch.html]
[Event properties post dispatch without ShadowRoots (composed: true).]
expected: FAIL
[Event properties post dispatch without ShadowRoots (composed: false).]
expected: FAIL
[Event properties post dispatch with an open ShadowRoot (composed: true).]
expected: FAIL
[Event properties post dispatch with an open ShadowRoot (composed: false).]
expected: FAIL
[Event properties post dispatch with a closed ShadowRoot (composed: true).]
expected: FAIL
[Event properties post dispatch with a closed ShadowRoot (composed: false).]
expected: FAIL
[Event properties post dispatch with nested ShadowRoots (composed: true).]
expected: FAIL
[Event properties post dispatch with nested ShadowRoots (composed: false).]
expected: FAIL
@ -29,9 +15,6 @@
[Event properties post dispatch with relatedTarget in the same shadow tree. (composed: false)]
expected: FAIL
[Event properties post dispatch with relatedTarget in the document tree and the shadow tree. (composed: true)]
expected: FAIL
[Event properties post dispatch with relatedTarget in the document tree and the shadow tree. (composed: false)]
expected: FAIL

View File

@ -43,6 +43,16 @@
"bug_numbers": [1423989],
"alert_emails": ["dbolter@mozilla.com"]
},
"A11Y_TREE_UPDATE_TIMING_MS" : {
"record_in_processes": ["main", "content"],
"alert_emails": ["asurkov@mozilla.com"],
"bug_numbers": [1424768],
"expires_in_version": "never",
"description": "The amount of time taken to update the accessibility tree (ms)",
"kind" : "exponential",
"high": 60000,
"n_buckets": 50
},
"ADDON_CONTENT_POLICY_SHIM_BLOCKING_LOADING_MS": {
"record_in_processes": ["main", "content"],
"expires_in_version": "58",
@ -1625,22 +1635,6 @@
"n_values": 110,
"description": "System font fallback script"
},
"GRADIENT_DURATION": {
"record_in_processes": ["main", "content"],
"expires_in_version": "default",
"kind": "exponential",
"high": 50000000,
"n_buckets": 20,
"description": "Gradient generation time (us)"
},
"GRADIENT_RETENTION_TIME": {
"record_in_processes": ["main", "content"],
"expires_in_version": "never",
"kind": "linear",
"high": 10000,
"n_buckets": 20,
"description": "Maximum retention time for the gradient cache. (ms)"
},
"FONT_CACHE_HIT": {
"record_in_processes": ["main", "content"],
"expires_in_version": "never",
@ -2399,6 +2393,16 @@
"labels": ["NotSent", "CachedContentUsed", "CachedContentNotUsed"],
"description": "Stats for validation requests when cache won the race."
},
"NETWORK_HTTP_REDIRECT_TO_SCHEME" :{
"record_in_processes": ["main"],
"alert_emails": ["necko@mozilla.com", "seceng-telemetry@mozilla.com", "jkt@mozilla.com"],
"bug_numbers": [1413512],
"expires_in_version": "64",
"kind": "categorical",
"keyed": true,
"description": "Count of the HTTP redirection that triggered by top-level document or by subresource, keyed by the URL scheme redirected to.",
"labels": ["topLevel", "subresource"]
},
"HTTP_AUTH_DIALOG_STATS_3": {
"record_in_processes": ["main", "content"],
"expires_in_version": "61",
@ -7078,7 +7082,7 @@
"description": "Number of histograms with total count low errors"
},
"TELEMETRY_ARCHIVE_DIRECTORIES_COUNT": {
"record_in_processes": ["main", "content"],
"record_in_processes": ["main"],
"alert_emails": ["telemetry-client-dev@mozilla.com"],
"expires_in_version": "never",
"kind": "linear",
@ -7088,7 +7092,7 @@
"description": "Number of directories in the archive at scan"
},
"TELEMETRY_ARCHIVE_OLDEST_DIRECTORY_AGE": {
"record_in_processes": ["main", "content"],
"record_in_processes": ["main"],
"alert_emails": ["telemetry-client-dev@mozilla.com"],
"expires_in_version": "never",
"kind": "linear",
@ -7098,7 +7102,7 @@
"description": "The age of the oldest Telemetry archive directory in months"
},
"TELEMETRY_ARCHIVE_SCAN_PING_COUNT": {
"record_in_processes": ["main", "content"],
"record_in_processes": ["main"],
"alert_emails": ["telemetry-client-dev@mozilla.com"],
"expires_in_version": "never",
"kind": "exponential",
@ -7108,7 +7112,7 @@
"description": "Number of Telemetry pings in the archive at scan"
},
"TELEMETRY_ARCHIVE_SESSION_PING_COUNT": {
"record_in_processes": ["main", "content"],
"record_in_processes": ["main"],
"alert_emails": ["telemetry-client-dev@mozilla.com"],
"expires_in_version": "never",
"kind": "count",
@ -7116,7 +7120,7 @@
"description": "Number of Telemetry pings added to the archive during the session"
},
"TELEMETRY_ARCHIVE_SIZE_MB": {
"record_in_processes": ["main", "content"],
"record_in_processes": ["main"],
"alert_emails": ["telemetry-client-dev@mozilla.com"],
"expires_in_version": "never",
"kind": "linear",
@ -7126,7 +7130,7 @@
"description": "The size of the Telemetry archive (MB)"
},
"TELEMETRY_ARCHIVE_EVICTED_OVER_QUOTA": {
"record_in_processes": ["main", "content"],
"record_in_processes": ["main"],
"alert_emails": ["telemetry-client-dev@mozilla.com"],
"expires_in_version": "never",
"kind": "exponential",
@ -7136,7 +7140,7 @@
"description": "Number of Telemetry pings evicted from the archive during cleanup, because they were over the quota"
},
"TELEMETRY_ARCHIVE_EVICTED_OLD_DIRS": {
"record_in_processes": ["main", "content"],
"record_in_processes": ["main"],
"alert_emails": ["telemetry-client-dev@mozilla.com"],
"expires_in_version": "never",
"kind": "linear",
@ -7146,7 +7150,7 @@
"description": "Number of Telemetry directories evicted from the archive during cleanup, because they were too old"
},
"TELEMETRY_ARCHIVE_EVICTING_DIRS_MS": {
"record_in_processes": ["main", "content"],
"record_in_processes": ["main"],
"alert_emails": ["telemetry-client-dev@mozilla.com"],
"expires_in_version": "never",
"kind": "exponential",
@ -7156,7 +7160,7 @@
"description": "Time (ms) it takes for evicting old directories"
},
"TELEMETRY_ARCHIVE_CHECKING_OVER_QUOTA_MS": {
"record_in_processes": ["main", "content"],
"record_in_processes": ["main"],
"alert_emails": ["telemetry-client-dev@mozilla.com"],
"expires_in_version": "never",
"kind": "exponential",
@ -7166,7 +7170,7 @@
"description": "Time (ms) it takes for checking if the archive is over-quota"
},
"TELEMETRY_ARCHIVE_EVICTING_OVER_QUOTA_MS": {
"record_in_processes": ["main", "content"],
"record_in_processes": ["main"],
"alert_emails": ["telemetry-client-dev@mozilla.com"],
"expires_in_version": "never",
"kind": "exponential",
@ -7176,21 +7180,21 @@
"description": "Time (ms) it takes for evicting over-quota pings"
},
"TELEMETRY_PENDING_LOAD_FAILURE_READ": {
"record_in_processes": ["main", "content"],
"record_in_processes": ["main"],
"alert_emails": ["telemetry-client-dev@mozilla.com"],
"expires_in_version": "never",
"kind": "count",
"description": "Number of pending Telemetry pings that failed to load from the disk"
},
"TELEMETRY_PENDING_LOAD_FAILURE_PARSE": {
"record_in_processes": ["main", "content"],
"record_in_processes": ["main"],
"alert_emails": ["telemetry-client-dev@mozilla.com"],
"expires_in_version": "never",
"kind": "count",
"description": "Number of pending Telemetry pings that failed to parse once loaded from the disk"
},
"TELEMETRY_PENDING_PINGS_SIZE_MB": {
"record_in_processes": ["main", "content"],
"record_in_processes": ["main"],
"alert_emails": ["telemetry-client-dev@mozilla.com"],
"expires_in_version": "never",
"kind": "linear",
@ -7199,7 +7203,7 @@
"description": "The size of the Telemetry pending pings directory (MB). The special value 17 is used to indicate over quota pings."
},
"TELEMETRY_PENDING_PINGS_AGE": {
"record_in_processes": ["main", "content"],
"record_in_processes": ["main"],
"alert_emails": ["telemetry-client-dev@mozilla.com"],
"expires_in_version": "never",
"kind": "exponential",
@ -7208,7 +7212,7 @@
"description": "The age, in days, of the pending pings."
},
"TELEMETRY_PENDING_PINGS_EVICTED_OVER_QUOTA": {
"record_in_processes": ["main", "content"],
"record_in_processes": ["main"],
"alert_emails": ["telemetry-client-dev@mozilla.com"],
"expires_in_version": "never",
"kind": "exponential",
@ -7217,7 +7221,7 @@
"description": "Number of Telemetry pings evicted from the pending pings directory during cleanup, because they were over the quota"
},
"TELEMETRY_PENDING_EVICTING_OVER_QUOTA_MS": {
"record_in_processes": ["main", "content"],
"record_in_processes": ["main"],
"alert_emails": ["telemetry-client-dev@mozilla.com"],
"expires_in_version": "never",
"kind": "exponential",
@ -7226,7 +7230,7 @@
"description": "Time (ms) it takes for evicting over-quota pending pings"
},
"TELEMETRY_PENDING_CHECKING_OVER_QUOTA_MS": {
"record_in_processes": ["main", "content"],
"record_in_processes": ["main"],
"alert_emails": ["telemetry-client-dev@mozilla.com"],
"expires_in_version": "never",
"kind": "exponential",
@ -7277,28 +7281,28 @@
"description": "The size (KB) of the Telemetry unsuccessfully sent pings"
},
"TELEMETRY_PING_SIZE_EXCEEDED_SEND": {
"record_in_processes": ["main", "content"],
"record_in_processes": ["main"],
"alert_emails": ["telemetry-client-dev@mozilla.com"],
"expires_in_version": "never",
"kind": "count",
"description": "Number of Telemetry pings discarded before sending because they exceeded the maximum size"
},
"TELEMETRY_PING_SIZE_EXCEEDED_PENDING": {
"record_in_processes": ["main", "content"],
"record_in_processes": ["main"],
"alert_emails": ["telemetry-client-dev@mozilla.com"],
"expires_in_version": "never",
"kind": "count",
"description": "Number of Telemetry pending pings discarded because they exceeded the maximum size"
},
"TELEMETRY_PING_SIZE_EXCEEDED_ARCHIVED": {
"record_in_processes": ["main", "content"],
"record_in_processes": ["main"],
"alert_emails": ["telemetry-client-dev@mozilla.com"],
"expires_in_version": "never",
"kind": "count",
"description": "Number of archived Telemetry pings discarded because they exceeded the maximum size"
},
"TELEMETRY_PING_SUBMISSION_WAITING_CLIENTID": {
"record_in_processes": ["main", "content"],
"record_in_processes": ["main"],
"alert_emails": ["telemetry-client-dev@mozilla.com"],
"expires_in_version": "never",
"kind": "count",
@ -7307,7 +7311,7 @@
"description": "The number of pings that were submitted and had to wait for a client id (i.e. before it was cached or loaded from disk)"
},
"TELEMETRY_DISCARDED_PENDING_PINGS_SIZE_MB": {
"record_in_processes": ["main", "content"],
"record_in_processes": ["main"],
"alert_emails": ["telemetry-client-dev@mozilla.com"],
"expires_in_version": "never",
"kind": "linear",
@ -7316,7 +7320,7 @@
"description": "The size (MB) of the Telemetry pending pings exceeding the maximum file size"
},
"TELEMETRY_DISCARDED_ARCHIVED_PINGS_SIZE_MB": {
"record_in_processes": ["main", "content"],
"record_in_processes": ["main"],
"alert_emails": ["telemetry-client-dev@mozilla.com"],
"expires_in_version": "never",
"kind": "linear",
@ -7334,14 +7338,14 @@
"description": "The size (MB) of the ping data submitted to Telemetry exceeding the maximum size"
},
"TELEMETRY_DISCARDED_CONTENT_PINGS_COUNT": {
"record_in_processes": ["main", "content"],
"record_in_processes": ["main"],
"alert_emails": ["telemetry-client-dev@mozilla.com"],
"expires_in_version": "never",
"kind": "count",
"description": "Count of discarded content payloads."
},
"TELEMETRY_COMPRESS": {
"record_in_processes": ["main", "content"],
"record_in_processes": ["main"],
"alert_emails": ["telemetry-client-dev@mozilla.com"],
"expires_in_version": "never",
"kind": "exponential",
@ -7350,7 +7354,7 @@
"description": "Time taken to compress telemetry object (ms)"
},
"TELEMETRY_SEND_SUCCESS" : {
"record_in_processes": ["main", "content"],
"record_in_processes": ["main"],
"alert_emails": ["telemetry-client-dev@mozilla.com"],
"bug_numbers": [1318284],
"expires_in_version": "never",
@ -7360,7 +7364,7 @@
"description": "Time needed (in ms) for a successful send of a Telemetry ping to the servers and getting a reply back."
},
"TELEMETRY_SEND_FAILURE" : {
"record_in_processes": ["main", "content"],
"record_in_processes": ["main"],
"alert_emails": ["telemetry-client-dev@mozilla.com"],
"bug_numbers": [1318284],
"expires_in_version": "never",
@ -7388,7 +7392,7 @@
"description": "Counts of the different ways sending a Telemetry ping can fail."
},
"TELEMETRY_STRINGIFY" : {
"record_in_processes": ["main", "content"],
"record_in_processes": ["main"],
"alert_emails": ["telemetry-client-dev@mozilla.com"],
"expires_in_version": "never",
"kind": "exponential",
@ -7397,7 +7401,7 @@
"description": "Time to stringify telemetry object (ms)"
},
"TELEMETRY_SUCCESS": {
"record_in_processes": ["main", "content"],
"record_in_processes": ["main"],
"alert_emails": ["telemetry-client-dev@mozilla.com"],
"expires_in_version": "never",
"kind": "boolean",
@ -7420,42 +7424,42 @@
"description": "Count of individual invalid payloads that were submitted to Telemetry."
},
"TELEMETRY_PING_EVICTED_FOR_SERVER_ERRORS": {
"record_in_processes": ["main", "content"],
"record_in_processes": ["main"],
"alert_emails": ["telemetry-client-dev@mozilla.com"],
"expires_in_version": "never",
"kind": "count",
"description": "Number of Telemetry ping files evicted due to server errors (4XX HTTP code received)"
},
"TELEMETRY_SESSIONDATA_FAILED_LOAD": {
"record_in_processes": ["main", "content"],
"record_in_processes": ["main"],
"alert_emails": ["telemetry-client-dev@mozilla.com"],
"expires_in_version": "never",
"kind": "flag",
"description": "Set if Telemetry failed to load the session data from disk."
},
"TELEMETRY_SESSIONDATA_FAILED_PARSE": {
"record_in_processes": ["main", "content"],
"record_in_processes": ["main"],
"alert_emails": ["telemetry-client-dev@mozilla.com"],
"expires_in_version": "never",
"kind": "flag",
"description": "Set if Telemetry failed to parse the session data loaded from disk."
},
"TELEMETRY_SESSIONDATA_FAILED_VALIDATION": {
"record_in_processes": ["main", "content"],
"record_in_processes": ["main"],
"alert_emails": ["telemetry-client-dev@mozilla.com"],
"expires_in_version": "never",
"kind": "flag",
"description": "Set if Telemetry failed to validate the session data loaded from disk."
},
"TELEMETRY_SESSIONDATA_FAILED_SAVE": {
"record_in_processes": ["main", "content"],
"record_in_processes": ["main"],
"alert_emails": ["telemetry-client-dev@mozilla.com"],
"expires_in_version": "never",
"kind": "flag",
"description": "Set if Telemetry failed to save the session data to disk."
},
"TELEMETRY_ASSEMBLE_PAYLOAD_EXCEPTION": {
"record_in_processes": ["main", "content"],
"record_in_processes": ["main"],
"alert_emails": ["telemetry-client-dev@mozilla.com"],
"bug_numbers": [1250640],
"expires_in_version": "53",
@ -7463,7 +7467,7 @@
"description": "Count of exceptions in TelemetrySession.getSessionPayload()."
},
"TELEMETRY_SCHEDULER_TICK_EXCEPTION": {
"record_in_processes": ["main", "content"],
"record_in_processes": ["main"],
"alert_emails": ["telemetry-client-dev@mozilla.com"],
"bug_numbers": [1250640],
"expires_in_version": "53",
@ -7471,7 +7475,7 @@
"description": "Count of exceptions during executing the TelemetrySession scheduler tick logic."
},
"TELEMETRY_SCHEDULER_WAKEUP": {
"record_in_processes": ["main", "content"],
"record_in_processes": ["main"],
"alert_emails": ["telemetry-client-dev@mozilla.com"],
"bug_numbers": [1250640],
"expires_in_version": "53",

View File

@ -243,8 +243,6 @@
"GEOLOCATION_OSX_SOURCE_IS_MLS",
"GEOLOCATION_WIN8_SOURCE_IS_MLS",
"GFX_CRASH",
"GRADIENT_DURATION",
"GRADIENT_RETENTION_TIME",
"HISTORY_LASTVISITED_TREE_QUERY_TIME_MS",
"HTTPCONNMGR_TOTAL_SPECULATIVE_CONN",
"HTTPCONNMGR_UNUSED_SPECULATIVE_CONN",
@ -897,8 +895,6 @@
"GFX_CONTENT_FAILED_TO_ACQUIRE_DEVICE",
"GFX_CRASH",
"GHOST_WINDOWS",
"GRADIENT_DURATION",
"GRADIENT_RETENTION_TIME",
"GRAPHICS_DRIVER_STARTUP_TEST",
"GRAPHICS_SANITY_TEST",
"GRAPHICS_SANITY_TEST_OS_SNAPSHOT",
@ -1593,7 +1589,6 @@
"TRANSLATED_CHARACTERS",
"WEAVE_CONFIGURED",
"NEWTAB_PAGE_ENABLED",
"GRADIENT_DURATION",
"MOZ_SQLITE_OPEN_MS",
"SHOULD_TRANSLATION_UI_APPEAR",
"NEWTAB_PAGE_LIFE_SPAN",

View File

@ -512,7 +512,7 @@ AddThreatSourceFromChannel(ThreatHit& aHit, nsIChannel *aChannel,
matchingSource->set_type(aType);
nsCOMPtr<nsIURI> uri;
rv = aChannel->GetURI(getter_AddRefs(uri));
rv = NS_GetFinalChannelURI(aChannel, getter_AddRefs(uri));
NS_ENSURE_SUCCESS(rv, rv);
nsCString spec;
@ -634,12 +634,12 @@ AddTabThreatSources(ThreatHit& aHit, nsIChannel *aChannel)
}
}
// Set top level tab_url threatshource
// Set top level tab_url threat source
rv = AddThreatSourceFromChannel(aHit, topChannel,
ThreatHit_ThreatSourceType_TAB_URL);
Unused << NS_WARN_IF(NS_FAILED(rv));
// Set tab_redirect threatshources if there's any
// Set tab_redirect threat sources if there's any
nsCOMPtr<nsILoadInfo> topLoadInfo = topChannel->GetLoadInfo();
if (!topLoadInfo) {
return NS_OK;

View File

@ -23,6 +23,7 @@ from mozpack.copier import (
Jarrer,
)
from mozpack.errors import errors
from mozpack.files import ExecutableFile
from mozpack.mozjar import JAR_BROTLI
import mozpack.path as mozpath
import buildconfig
@ -313,6 +314,14 @@ def main():
LibSignFile(os.path.join(args.destination,
libname)))
# Include pdb files for llvm-symbolizer to resolve symbols.
if buildconfig.substs.get('LLVM_SYMBOLIZER') and mozinfo.isWin:
for p, f in copier:
if isinstance(f, ExecutableFile):
pdbname = os.path.splitext(f.inputs()[0])[0] + '.pdb'
if os.path.exists(pdbname):
copier.add(os.path.basename(pdbname), File(pdbname))
# Setup preloading
if args.jarlog and os.path.exists(args.jarlog):
from mozpack.mozjar import JarLog

View File

@ -29,6 +29,8 @@ struct ParamTraits;
namespace mozilla {
class EventTargetChainItem;
/******************************************************************************
* mozilla::BaseEventFlags
*
@ -514,6 +516,7 @@ protected:
, mLastRefPoint(0, 0)
, mFocusSequenceNumber(0)
, mSpecifiedEventType(nullptr)
, mPath(nullptr)
{
MOZ_COUNT_CTOR(WidgetEvent);
mFlags.Clear();
@ -525,6 +528,7 @@ protected:
WidgetEvent()
: WidgetEventTime()
, mPath(nullptr)
{
MOZ_COUNT_CTOR(WidgetEvent);
}
@ -588,6 +592,8 @@ public:
nsCOMPtr<dom::EventTarget> mCurrentTarget;
nsCOMPtr<dom::EventTarget> mOriginalTarget;
nsTArray<EventTargetChainItem>* mPath;
dom::EventTarget* GetDOMEventTarget() const;
dom::EventTarget* GetCurrentDOMEventTarget() const;
dom::EventTarget* GetOriginalDOMEventTarget() const;

View File

@ -36,6 +36,17 @@ namespace dom {
class PBrowserChild;
} // namespace dom
class WidgetPointerEvent;
class WidgetPointerEventHolder final
{
public:
nsTArray<WidgetPointerEvent> mEvents;
NS_INLINE_DECL_REFCOUNTING(WidgetPointerEventHolder)
private:
virtual ~WidgetPointerEventHolder() {}
};
/******************************************************************************
* mozilla::WidgetPointerHelper
******************************************************************************/
@ -49,6 +60,7 @@ public:
uint32_t twist;
float tangentialPressure;
bool convertToPointer;
RefPtr<WidgetPointerEventHolder> mCoalescedWidgetEvents;
WidgetPointerHelper()
: pointerId(0)
@ -71,7 +83,19 @@ public:
{
}
void AssignPointerHelperData(const WidgetPointerHelper& aEvent)
explicit WidgetPointerHelper(const WidgetPointerHelper& aHelper)
: pointerId(aHelper.pointerId)
, tiltX(aHelper.tiltX)
, tiltY(aHelper.tiltY)
, twist(aHelper.twist)
, tangentialPressure(aHelper.tangentialPressure)
, convertToPointer(aHelper.convertToPointer)
, mCoalescedWidgetEvents(aHelper.mCoalescedWidgetEvents)
{
}
void AssignPointerHelperData(const WidgetPointerHelper& aEvent,
bool aCopyCoalescedEvents = false)
{
pointerId = aEvent.pointerId;
tiltX = aEvent.tiltX;
@ -79,6 +103,9 @@ public:
twist = aEvent.twist;
tangentialPressure = aEvent.tangentialPressure;
convertToPointer = aEvent.convertToPointer;
if (aCopyCoalescedEvents) {
mCoalescedWidgetEvents = aEvent.mCoalescedWidgetEvents;
}
}
};
@ -318,7 +345,7 @@ public:
void AssignMouseEventData(const WidgetMouseEvent& aEvent, bool aCopyTargets)
{
AssignMouseEventBaseData(aEvent, aCopyTargets);
AssignPointerHelperData(aEvent);
AssignPointerHelperData(aEvent, /* aCopyCoalescedEvents */ true);
mIgnoreRootScrollFrame = aEvent.mIgnoreRootScrollFrame;
mClickCount = aEvent.mClickCount;

View File

@ -513,6 +513,9 @@ CycleCollectedJSRuntime::CycleCollectedJSRuntime(JSContext* aCx)
, mJSHolderMap(256)
, mOutOfMemoryState(OOMState::OK)
, mLargeAllocationFailureState(OOMState::OK)
#ifdef DEBUG
, mShutdownCalled(false)
#endif
{
MOZ_COUNT_CTOR(CycleCollectedJSRuntime);
MOZ_ASSERT(aCx);
@ -560,12 +563,16 @@ CycleCollectedJSRuntime::Shutdown(JSContext* cx)
{
JS_RemoveExtraGCRootsTracer(cx, TraceBlackJS, this);
JS_RemoveExtraGCRootsTracer(cx, TraceGrayJS, this);
#ifdef DEBUG
mShutdownCalled = true;
#endif
}
CycleCollectedJSRuntime::~CycleCollectedJSRuntime()
{
MOZ_COUNT_DTOR(CycleCollectedJSRuntime);
MOZ_ASSERT(!mDeferredFinalizerTable.Count());
MOZ_ASSERT(mShutdownCalled);
}
void

View File

@ -368,6 +368,10 @@ private:
void invoke(JS::HandleObject scope, Closure& closure) override;
};
EnvironmentPreparer mEnvironmentPreparer;
#ifdef DEBUG
bool mShutdownCalled;
#endif
};
void TraceScriptHolder(nsISupports* aHolder, JSTracer* aTracer);