Bug 1787274: Use mCachedFields viewport cache for determining offscreen state r=Jamie,geckoview-reviewers,owlish

Differential Revision: https://phabricator.services.mozilla.com/D155903
This commit is contained in:
Morgan Rae Reschenberg
2022-10-18 22:30:10 +00:00
parent 13803a5ee0
commit bf7515d46c
13 changed files with 379 additions and 136 deletions

View File

@@ -889,6 +889,18 @@ void NotificationController::WillRefresh(mozilla::TimeStamp aTime) {
CoalesceMutationEvents();
ProcessMutationEvents();
// When firing mutation events, mObservingState is set to
// eRefreshProcessing. Any calls to ScheduleProcessing() that
// occur before mObservingState is reset will be dropped because we only
// schedule a tick if mObservingState == eNotObservingRefresh.
// This sometimes results in our viewport cache being out-of-date after
// processing mutation events. Call ProcessQueuedCacheUpdates again to
// ensure it is updated.
if (IPCAccessibilityActive() && mDocument) {
mDocument->ProcessQueuedCacheUpdates();
}
mEventGeneration = 0;
// Now that we are done with them get rid of the events we fired.