Bug 1578355 - Part 1: Move user-activation code from EventStateManager to UserActivation; r=smaug

Differential Revision: https://phabricator.services.mozilla.com/D45168
This commit is contained in:
Edgar Chen
2019-09-20 20:51:25 +00:00
parent bd3e5b1051
commit 9ce65d9730
37 changed files with 311 additions and 251 deletions

View File

@@ -24,13 +24,13 @@
#include "mozilla/dom/MutableBlobStorage.h"
#include "mozilla/dom/XMLDocument.h"
#include "mozilla/dom/URLSearchParams.h"
#include "mozilla/dom/UserActivation.h"
#include "mozilla/dom/Promise.h"
#include "mozilla/dom/PromiseNativeHandler.h"
#include "mozilla/dom/WorkerError.h"
#include "mozilla/Encoding.h"
#include "mozilla/EventDispatcher.h"
#include "mozilla/EventListenerManager.h"
#include "mozilla/EventStateManager.h"
#include "mozilla/LoadInfo.h"
#include "mozilla/LoadContext.h"
#include "mozilla/MemoryReporting.h"
@@ -2559,7 +2559,7 @@ nsresult XMLHttpRequestMainThread::InitiateFetch(
// Mark channel as urgent-start if the XHR is triggered by user input
// events.
if (EventStateManager::IsHandlingUserInput()) {
if (UserActivation::IsHandlingUserInput()) {
cos->AddClassFlags(nsIClassOfService::UrgentStart);
}
}