[CTW] Avoid redundant cache pushes for text
Categories
(Core :: Disability Access APIs, task)
Tracking
()
Tracking | Status | |
---|---|---|
firefox103 | --- | fixed |
People
(Reporter: Jamie, Assigned: Jamie)
References
(Blocks 1 open bug)
Details
(Whiteboard: [ctw-m2])
Attachments
(2 files)
When frames are reflowed, a11y gets text update notifications, even if the text hasn't changed. Currently, we push a cache update for such notifications without checking whether the text actually changed. We also implicitly push cache updates for line starts and text bounds whenever text cache pushes occur. This could mean many pointless, potentially expensive cache pushes if a large reflow occurs.
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Comment 1•2 years ago
|
||
I originally thought we didn't need to be explicitly notified about removals because a correction always triggers a text change and we push a cache update for spelling errors whenever the text changes.
However, it seems that even when a correction is made and the text changes, the spell check ranges aren't yet up to date.
Previously, we were pushing a cache update whenever text was reflowed, which was taking care of this.
Soon, we don't want to push text cache updates if the text doesn't actually change.
We remove the reliance on these redundant text updates by having an explicit notification for spell check removals.
Assignee | ||
Comment 2•2 years ago
|
||
Layout sends a11y text update notifications during reflow even if the text hasn't changed.
TextUpdater already detects this case, so just move our cache update calls to TextUpdater.
Comment 4•2 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/d45e8d496c43
https://hg.mozilla.org/mozilla-central/rev/6619f3ef5bcb
Description
•