mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-24 02:09:28 +00:00
When parsing relative URLs, we have to check the first <base href> in tree order (if one is available). This was getting *very* costly on large DOMs with many relative urls. This patch avoids all that repeated traversal by letting Document cache the first <base href> and invalidating the cache whenever a <base> element is added/removed/edited in the DOM. The browser was stuck doing this for a *very* long time when loading the ECMA-262 spec, and this removes that problem entirely.
4.1 KiB
4.1 KiB