Closed Bug 1901676 Opened 1 year ago Closed 1 year ago

DocAccessibleParent::RecvShowEvent never sets lastParent

Categories

(Core :: Disability Access APIs, defect)

defect

Tracking

()

RESOLVED FIXED
129 Branch
Tracking Status
firefox-esr115 --- wontfix
firefox127 --- wontfix
firefox128 --- wontfix
firefox129 --- fixed

People

(Reporter: Jamie, Assigned: Jamie)

References

(Blocks 1 open bug, Regression)

Details

(Keywords: regression)

Attachments

(1 file)

In bug 1779578, I changed the way a11y trees are serialised such that the parent id is included for each Accessible. In order to avoid a theoretical performance regression caused by repeatedly looking up the same parent, I added an optimisation to use the last parent if it is the same as the current parent. Unfortunately, it seems I never actually set the lastParent variable, so this optimisation was a no-op!

This is a micro-optimisation: it doesn't seem to make any observable difference. However, it seems silly to have effectively dead code and it's a very straightforward fix.

Test case for reference:

data:text/html,
<body role="application">
<div id="container" hidden></div>
<button id="insert">insert</button>
<button id="done">done</button>
<script>
insert.addEventListener("click", () => {
  for (let i = 0; i < 500000; ++i) {
    const p = document.createElement("p");
    p.ariaLabel = i;
    container.append(p);
  }
  container.hidden = false;
  done.focus();
});
</script>
</body>

In bug 1779578, I changed the way a11y trees are serialised such that the parent id is included for each Accessible.
When de-serialising in DocAccessibleParent::RecvShowEvent, in order to avoid a theoretical performance regression caused by repeatedly looking up the same parent, I added an optimisation to use the last parent if it is the same as the current parent.
Unfortunately, it seems I never actually set the lastParent and lastParentID variables, so this optimisation was a no-op!

This is a micro-optimisation: it doesn't seem to make any observable difference.
However, it seems silly to have effectively dead code and it's a very straightforward fix.

Blocks: cleana11y

Set release status flags based on info from the regressing bug 1779578

Pushed by jteh@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/b4f2ae5678e6 Set lastParent and lastParentID in DocAccessibleParent::RecvShowEvent. r=eeejay
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 129 Branch

The patch landed in nightly and beta is affected.
:Jamie, is this bug important enough to require an uplift?

  • If yes, please nominate the patch for beta approval.
  • If no, please set status-firefox128 to wontfix.

For more information, please visit BugBot documentation.

Flags: needinfo?(jteh)

This is a micro-optimisation: it doesn't seem to make any observable difference. Uplifting for no perceivable user benefit doesn't seem worthwhile.

Flags: needinfo?(jteh)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: