Bug 1737919 Comment 3 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

I implemented this fully by storing the ranges on the document/text fields. This works... until you insert or remove text from a node within one of the ranges without a spelling error changing as a result. This causes the offsets in the range to become invalid, but because no spelling errors changed, there's no cache update for them. So, this approach can't work.

(In reply to James Teh [:Jamie] from comment #2)
> Doing this per-node would still be a bit awkward, since we probably want to iterate the ranges once and cache the data on all the impacted leaf nodes

We can't do this for the same reason as above. This has to be done per-node.
I implemented this fully by storing the ranges on the document/text fields. This works... until you insert or remove text from a node within one of the ranges without a spelling error changing as a result. This causes the offsets in the range to become invalid, but because no spelling errors changed, there's no cache update for them. So, this approach can't work. We need to update the spelling error ranges for a single node when the text of that node changes, which means we have to cache spelling errors per-node.

(In reply to James Teh [:Jamie] from comment #2)
> Doing this per-node would still be a bit awkward, since we probably want to iterate the ranges once and cache the data on all the impacted leaf nodes

We can't do this for the same reason as above. This has to be done per-node.
I implemented this fully by storing the ranges on the document/text fields. This works... until you insert or remove text from a node within one of the ranges without a spelling error changing as a result. This causes the offsets in the range to become invalid, but because no spelling errors changed, there's no cache update for them. So, this approach can't work. We need to update the spelling error ranges for a specific leaf node when the text of that node changes, which means we have to cache spelling errors per leaf node.

(In reply to James Teh [:Jamie] from comment #2)
> Doing this per-node would still be a bit awkward, since we probably want to iterate the ranges once and cache the data on all the impacted leaf nodes

We can't do this for the same reason as above. This has to be done per leaf node.

Back to Bug 1737919 Comment 3