Bug 1830820 - Introduce some delays to user input handling r=smaug

In some edge cases, we may start handling user input events that
are not supposed to be handled by the current document.

This patch introduces some delay to handle user input events.

Differential Revision: https://phabricator.services.mozilla.com/D180976
This commit is contained in:
Sean Feng
2023-08-15 13:55:57 +00:00
parent 036a480b6a
commit 5a3c7dad7d
11 changed files with 166 additions and 7 deletions

View File

@@ -1314,6 +1314,7 @@ void nsDocShell::FirePageHideShowNonRecursive(bool aShow) {
mScriptGlobal ? mScriptGlobal->GetCurrentInnerWindow() : nullptr;
if (mBrowsingContext->IsTop()) {
doc->NotifyPossibleTitleChange(false);
doc->SetLoadingOrRestoredFromBFCacheTimeStampToNow();
if (inner) {
// Now that we have found the inner window of the page restored
// from the history, we have to make sure that