mirror of
https://github.com/webodf/WebODF.git
synced 2026-11-30 16:47:58 +01:00
Converting the cache to a damage-based approach improves the per-update efficiency immensely, but carries some additional risk as invalid bookmarks are deliberately left behind for performance reasons. This patch specifically fixes an issue where bookmarks between the undamaged step and the current iterator position were being treated as repaired bookmarks, when in fact they were still damaged (as they had never been seen during iteration in the document). The new logic will ensure these bookmarks stay in the damaged region until they are eventually iterated over in an updateCache call. A happy side effect of this is that all query functions now only ever return undamaged bookmarks, making the class itself easier to use and understand.