mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1174966 part 2 - Replace mAsyncFullscreenPending flag with mPendingFullscreenRequests counter. r=smaug
This commit is contained in:
parent
75ad362d04
commit
6f6102976b
@ -11295,19 +11295,16 @@ public:
|
||||
const FullScreenOptions& aOptions)
|
||||
: mElement(aElement),
|
||||
mDoc(aElement->OwnerDoc()),
|
||||
mOptions(aOptions),
|
||||
mHadRequestPending(static_cast<nsDocument*>(mDoc.get())->
|
||||
mAsyncFullscreenPending)
|
||||
mOptions(aOptions)
|
||||
{
|
||||
static_cast<nsDocument*>(mDoc.get())->
|
||||
mAsyncFullscreenPending = true;
|
||||
auto doc = static_cast<nsDocument*>(mDoc.get());
|
||||
doc->mPendingFullscreenRequests++;
|
||||
}
|
||||
|
||||
NS_IMETHOD Run()
|
||||
{
|
||||
static_cast<nsDocument*>(mDoc.get())->
|
||||
mAsyncFullscreenPending = mHadRequestPending;
|
||||
nsDocument* doc = static_cast<nsDocument*>(mDoc.get());
|
||||
doc->mPendingFullscreenRequests--;
|
||||
doc->RequestFullScreen(mElement, mOptions);
|
||||
return NS_OK;
|
||||
}
|
||||
@ -11315,7 +11312,6 @@ public:
|
||||
nsRefPtr<Element> mElement;
|
||||
nsCOMPtr<nsIDocument> mDoc;
|
||||
FullScreenOptions mOptions;
|
||||
bool mHadRequestPending;
|
||||
};
|
||||
|
||||
void
|
||||
@ -12011,7 +12007,7 @@ public:
|
||||
|
||||
// We're about to enter fullscreen mode.
|
||||
nsDocument* doc = static_cast<nsDocument*>(d.get());
|
||||
if (doc->mAsyncFullscreenPending ||
|
||||
if (doc->mPendingFullscreenRequests > 0 ||
|
||||
(doc->mHasFullscreenApprovedObserver && !doc->mIsApprovedForFullscreen)) {
|
||||
// We're still waiting for approval.
|
||||
return NS_OK;
|
||||
|
@ -1663,8 +1663,6 @@ public:
|
||||
// user.
|
||||
bool mAllowRelocking:1;
|
||||
|
||||
bool mAsyncFullscreenPending:1;
|
||||
|
||||
// Whether we're observing the "app-theme-changed" observer service
|
||||
// notification. We need to keep track of this because we might get multiple
|
||||
// OnPageShow notifications in a row without an OnPageHide in between, if
|
||||
@ -1679,6 +1677,8 @@ public:
|
||||
// The value is saturated to kPointerLockRequestLimit+1 = 3.
|
||||
uint8_t mCancelledPointerLockRequests:2;
|
||||
|
||||
uint8_t mPendingFullscreenRequests;
|
||||
|
||||
uint8_t mXMLDeclarationBits;
|
||||
|
||||
nsInterfaceHashtable<nsPtrHashKey<nsIContent>, nsPIBoxObject> *mBoxObjectTable;
|
||||
|
Loading…
Reference in New Issue
Block a user