Backed out 2 changesets (bug 1758689, bug 1772609) for causing nsRefreshDriver related failures. CLOSED TREE

Backed out changeset 05a9ffa21ad0 (bug 1772609)
Backed out changeset c2233b3830ef (bug 1758689)
This commit is contained in:
criss
2022-06-11 00:53:17 +03:00
parent f6c2082cc4
commit 426b21da35
13 changed files with 5 additions and 391 deletions

View File

@@ -83,8 +83,7 @@ NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(NotificationController, Release)
void NotificationController::Shutdown() {
if (mObservingState != eNotObservingRefresh &&
mPresShell->RemoveRefreshObserver(this, FlushType::Display) &&
mPresShell->RemovePostRefreshObserver(this)) {
mPresShell->RemoveRefreshObserver(this, FlushType::Display)) {
mObservingState = eNotObservingRefresh;
}
@@ -454,8 +453,7 @@ void NotificationController::ScheduleProcessing() {
// asynchronously (after style and layout).
if (mObservingState == eNotObservingRefresh) {
if (mPresShell->AddRefreshObserver(this, FlushType::Display,
"Accessibility notifications") &&
mPresShell->AddPostRefreshObserver(this)) {
"Accessibility notifications")) {
mObservingState = eRefreshObserving;
}
}
@@ -988,25 +986,6 @@ void NotificationController::WillRefresh(mozilla::TimeStamp aTime) {
}
}
void NotificationController::DidRefresh() {
mPresShell->RemovePostRefreshObserver(this);
if (IPCAccessibilityActive() && mDocument->IsViewportCacheDirty()) {
// It is now safe to send the viewport cache, because
// we know painting has finished.
RefPtr<AccAttributes> fields = mDocument->BundleFieldsForCache(
CacheDomain::Viewport, CacheUpdateType::Update);
if (fields->Count()) {
nsTArray<CacheData> data(1);
data.AppendElement(CacheData(0, fields));
MOZ_ASSERT(mDocument->IPCDoc());
mDocument->IPCDoc()->SendCache(CacheUpdateType::Update, data, true);
}
mDocument->SetViewportCacheDirty(false);
}
}
void NotificationController::EventMap::PutEvent(AccTreeMutationEvent* aEvent) {
EventType type = GetEventType(aEvent);
uint64_t addr = reinterpret_cast<uintptr_t>(aEvent->GetAccessible());