Bug 1507604 - Remove nsPIDOMWindowInner::IsTopLevelWindowActive. r=smaug

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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Peter Van der Beken 2018-11-23 15:33:11 +00:00
parent 06b131e7c9
commit 3602a1b804
4 changed files with 3 additions and 16 deletions

View File

@ -4400,15 +4400,6 @@ nsGlobalWindowInner::GetLocation()
return mLocation;
}
bool
nsGlobalWindowInner::IsTopLevelWindowActive()
{
if (GetOuterWindowInternal()) {
return GetOuterWindowInternal()->IsTopLevelWindowActive();
}
return false;
}
void
nsGlobalWindowInner::MaybeUpdateTouchState()
{

View File

@ -339,9 +339,6 @@ public:
nsresult PostHandleEvent(mozilla::EventChainPostVisitor& aVisitor) override;
// Outer windows only.
virtual bool IsTopLevelWindowActive() override;
virtual PopupControlState GetPopupControlState() const override;
void Suspend();

View File

@ -371,8 +371,6 @@ public:
virtual nsresult UnregisterIdleObserver(
mozilla::dom::MozIdleObserver& aIdleObserver) = 0;
virtual bool IsTopLevelWindowActive() = 0;
mozilla::dom::EventTarget* GetParentTarget()
{
if (!mParentTarget) {

View File

@ -246,8 +246,9 @@ WindowCannotReceiveSensorEvent (nsPIDOMWindowInner* aWindow)
return true;
}
bool disabled = aWindow->GetOuterWindow()->IsBackground() ||
!aWindow->IsTopLevelWindowActive();
nsPIDOMWindowOuter* windowOuter = aWindow->GetOuterWindow();
bool disabled = windowOuter->IsBackground() ||
!windowOuter->IsTopLevelWindowActive();
if (disabled) {
return true;
}