mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-09 00:22:36 +02:00
Add a cached m_in_editable_subtree flag to Node, updated on tree mutations and contenteditable/designMode changes. This replaces the recursive parent walk in is_editable() and is_editing_host() with an O(1) flag check. The flag is recomputed in inserted(), moved_from(), and cleared in removed_from(). Subtree walks recompute the flag when contenteditable attributes change or design mode is toggled. This was 4% of CPU time while playing a YouTube video.
152 KiB
152 KiB