Backed out 2 changesets (bug 1888310, bug 1884625) for causing failures on browser_app.js. CLOSED TREE

Backed out changeset 8036a50c0751 (bug 1884625)
Backed out changeset 8c8df548d15d (bug 1888310)
This commit is contained in:
Natalia Csoregi 2024-04-17 22:37:32 +03:00
Родитель 55ef2de90f
Коммит df9e767660
2 изменённых файлов: 11 добавлений и 16 удалений

Просмотреть файл

@ -879,13 +879,10 @@ struct RoleDescrComparator {
// a random acc with the same ID) by checking:
// - The gecko acc is local, our a11y-announcement lives in browser.xhtml
// - The ID of the gecko acc is "a11y-announcement"
// - The native acc is a direct descendent of the chrome window (ChildView in
// a non-headless context, mozRootAccessible in a headless context).
// - The native acc is a direct descendent of the root
if (mGeckoAccessible->IsLocal() &&
[[self moxDOMIdentifier] isEqualToString:@"a11y-announcement"] &&
((gfxPlatform::IsHeadless() &&
[[self moxParent] isKindOfClass:[mozRootAccessible class]]) ||
[[self moxParent] isKindOfClass:[ChildView class]])) {
[[self moxParent] isKindOfClass:[mozRootAccessible class]]) {
// Our actual announcement should be stored as a child of the alert,
// so we verify a child exists, and then query that child below.
NSArray* children = [self moxChildren];
@ -899,24 +896,23 @@ struct RoleDescrComparator {
} else {
key = [announcement moxTitle];
}
NSDictionary* info = @{
NSAccessibilityAnnouncementKey : key ? key : @(""),
// High priority means VO will stop what it is currently speaking
// to speak our announcement.
NSAccessibilityPriorityKey : @(NSAccessibilityPriorityHigh)
NSAccessibilityPriorityKey : @(NSAccessibilityPriorityMedium)
};
id window = [self moxWindow];
// This sends events via nsIObserverService to be consumed by our
// mochitests. Normally we'd fire these events through moxPostNotification
// which takes care of this, but because NSApp isn't derived
// from MOXAccessibleBase, we do this (and post the notification) manually.
// We used to fire this on the window, but per Chrome and Safari these
// notifs get dropped if fired on any non-main window. We now fire on NSApp
// to avoid this.
// which takes care of this, but because the window we fetch above isn't
// derrived from MOXAccessibleBase, we do this (and post the notification)
// manually.
xpcAccessibleMacEvent::FireEvent(
NSApp, NSAccessibilityAnnouncementRequestedNotification, info);
window, NSAccessibilityAnnouncementRequestedNotification, info);
NSAccessibilityPostNotificationWithUserInfo(
NSApp, NSAccessibilityAnnouncementRequestedNotification, info);
window, NSAccessibilityAnnouncementRequestedNotification, info);
}
}

Просмотреть файл

@ -9058,7 +9058,6 @@ var ConfirmationHint = {
"popupshown",
() => {
this._animationBox.setAttribute("animate", "true");
A11yUtils.announce({ id: messageId });
this._timerID = setTimeout(() => {
this._panel.hidePopup(true);
}, DURATION + 120);