mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-18 15:55:36 +00:00
Bug 1191148 - Don't count fullscreen request handled if we don't change the document state. r=smaug
--HG-- extra : source : 33ad58fdc763e3c6d647b6aec100d2ab9d893316
This commit is contained in:
parent
7237b2a3ff
commit
bf52d07f9d
@ -11650,8 +11650,9 @@ nsIDocument::HandlePendingFullscreenRequest(const FullscreenRequest& aRequest,
|
||||
return false;
|
||||
}
|
||||
|
||||
doc->ApplyFullscreen(aRequest);
|
||||
if (doc->ApplyFullscreen(aRequest)) {
|
||||
*aHandled = true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -11712,12 +11713,12 @@ ClearPendingFullscreenRequests(nsIDocument* aDoc)
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
bool
|
||||
nsDocument::ApplyFullscreen(const FullscreenRequest& aRequest)
|
||||
{
|
||||
Element* elem = aRequest.GetElement();
|
||||
if (!FullscreenElementReadyCheck(elem, aRequest.mIsCallerChrome)) {
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
|
||||
// Stash a reference to any existing fullscreen doc, we'll use this later
|
||||
@ -11813,6 +11814,7 @@ nsDocument::ApplyFullscreen(const FullscreenRequest& aRequest)
|
||||
for (uint32_t i = 0; i < changed.Length(); ++i) {
|
||||
DispatchFullScreenChange(changed[changed.Length() - i - 1]);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
@ -1529,8 +1529,10 @@ protected:
|
||||
|
||||
void NotifyStyleSheetApplicableStateChanged();
|
||||
|
||||
// Apply the fullscreen state to the document, and trigger related events.
|
||||
void ApplyFullscreen(const FullscreenRequest& aRequest);
|
||||
// Apply the fullscreen state to the document, and trigger related
|
||||
// events. It returns false if the fullscreen element ready check
|
||||
// fails and nothing gets changed.
|
||||
bool ApplyFullscreen(const FullscreenRequest& aRequest);
|
||||
|
||||
nsTArray<nsIObserver*> mCharSetObservers;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user