Bug 1793941: Don't fire EVENT_TABLE_STYLING_CHANGED when the cache is enabled r=Jamie

Differential Revision: https://phabricator.services.mozilla.com/D166117
This commit is contained in:
Morgan Rae Reschenberg
2023-01-11 22:34:04 +00:00
parent 1e2d542f56
commit 20d53bf7ee
6 changed files with 64 additions and 22 deletions

View File

@@ -573,8 +573,13 @@ void nsAccessibilityService::TableLayoutGuessMaybeChanged(
if (DocAccessible* document = GetDocAccessible(aPresShell)) {
if (LocalAccessible* acc = document->GetAccessible(aContent)) {
if (LocalAccessible* table = nsAccUtils::TableFor(acc)) {
document->FireDelayedEvent(
nsIAccessibleEvent::EVENT_TABLE_STYLING_CHANGED, table);
if (!StaticPrefs::accessibility_cache_enabled_AtStartup()) {
// Only fire this event when the cache is off -- we don't
// need to maintain the mac table cache otherwise, since
// we'll use the core cache instead.
document->FireDelayedEvent(
nsIAccessibleEvent::EVENT_TABLE_STYLING_CHANGED, table);
}
document->QueueCacheUpdate(table, CacheDomain::Table);
}
}