Bug 1520912 - remove 'mUserGestureActivated' from Document. r=nika

We've changed the way to set `userGestureActivation` flag which will be set in `BrowsingContext`, so we should remove `mUserGestureActivated` flag from Document.

Differential Revision: https://phabricator.services.mozilla.com/D16900

--HG--
extra : moz-landing-system : lando
This commit is contained in:
alwu 2019-01-18 02:41:15 +00:00
Родитель b93f9fb7c3
Коммит 80d152a07a
2 изменённых файлов: 7 добавлений и 14 удалений

Просмотреть файл

@ -1323,7 +1323,6 @@ Document::Document(const char* aContentType)
mNotifiedPageForUseCounter(0),
mUserHasInteracted(false),
mHasUserInteractionTimerScheduled(false),
mUserGestureActivated(false),
mStackRefCnt(0),
mUpdateNestLevel(0),
mViewportType(Unknown),
@ -11717,13 +11716,14 @@ void Document::MaybeNotifyAutoplayBlocked() {
}
void Document::ClearUserGestureActivation() {
Document* doc = this;
while (doc) {
MOZ_LOG(gUserInteractionPRLog, LogLevel::Debug,
("Reset user activation flag for document %p.", this));
doc->mUserGestureActivated = false;
doc = doc->GetSameTypeParentDocument();
if (!HasBeenUserGestureActivated()) {
return;
}
RefPtr<BrowsingContext> bc = GetBrowsingContext();
if (!bc) {
return;
}
bc->NotifyResetUserGestureActivation();
}
void Document::SetDocTreeHadAudibleMedia() {

Просмотреть файл

@ -4250,13 +4250,6 @@ class Document : public nsINode,
// timer is scheduled.
bool mHasUserInteractionTimerScheduled;
// Whether the user has interacted with the document via a restricted
// set of gestures which are likely to be interaction with the document,
// and not events that are fired as a byproduct of the user interacting
// with the browser (events for like scrolling the page, keyboard short
// cuts, etc).
bool mUserGestureActivated;
mozilla::TimeStamp mPageUnloadingEventTimeStamp;
RefPtr<mozilla::dom::DocGroup> mDocGroup;