mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 815561 - Limit Web Activities to the foreground application [r=sicking]
This commit is contained in:
parent
9247e18290
commit
6f0283dfd3
@ -6,7 +6,7 @@
|
|||||||
#include "nsDOMClassInfo.h"
|
#include "nsDOMClassInfo.h"
|
||||||
#include "nsContentUtils.h"
|
#include "nsContentUtils.h"
|
||||||
#include "nsIDOMActivityOptions.h"
|
#include "nsIDOMActivityOptions.h"
|
||||||
#include "nsEventStateManager.h"
|
#include "nsIDocShell.h"
|
||||||
#include "nsIConsoleService.h"
|
#include "nsIConsoleService.h"
|
||||||
|
|
||||||
using namespace mozilla::dom;
|
using namespace mozilla::dom;
|
||||||
@ -53,9 +53,12 @@ Activity::Initialize(nsISupports* aOwner,
|
|||||||
|
|
||||||
Init(window);
|
Init(window);
|
||||||
|
|
||||||
nsCOMPtr<nsIDocument> document = do_QueryInterface(window->GetExtantDocument());
|
nsCOMPtr<nsIDocument> document = do_QueryInterface(window->GetExtantDoc());
|
||||||
|
|
||||||
if (!nsEventStateManager::IsHandlingUserInput() &&
|
bool isActive;
|
||||||
|
window->GetDocShell()->GetIsActive(&isActive);
|
||||||
|
|
||||||
|
if (!isActive &&
|
||||||
!nsContentUtils::IsChromeDoc(document)) {
|
!nsContentUtils::IsChromeDoc(document)) {
|
||||||
nsCOMPtr<nsIDOMRequestService> rs =
|
nsCOMPtr<nsIDOMRequestService> rs =
|
||||||
do_GetService("@mozilla.org/dom/dom-request-service;1");
|
do_GetService("@mozilla.org/dom/dom-request-service;1");
|
||||||
|
Loading…
Reference in New Issue
Block a user