mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-22 04:25:13 +00:00
LibWeb: Don't begin link element fetch until browsing-context connected
Note that "becomes browsing-context connected" is defined as: > When the insertion steps are invoked with it as the argument and it is > now browsing-context connected. This fixes an issue where WPT editing tests would clone the entire DOM thousands of times and re-fetch all the linked CSS files once per clone.
This commit is contained in:
parent
6cb0f41c57
commit
fe2b752083
Notes:
github-actions[bot]
2025-03-03 13:50:23 +00:00
Author: https://github.com/awesomekling Commit: https://github.com/LadybirdBrowser/ladybird/commit/fe2b7520834 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3778 Reviewed-by: https://github.com/tcl3 ✅
1 changed files with 2 additions and 1 deletions
|
@ -73,7 +73,8 @@ void HTMLLinkElement::inserted()
|
|||
// The appropriate times to fetch and process this type of link are:
|
||||
// - When the external resource link is created on a link element that is already browsing-context connected.
|
||||
// - When the external resource link's link element becomes browsing-context connected.
|
||||
fetch_and_process_linked_resource();
|
||||
if (is_browsing_context_connected())
|
||||
fetch_and_process_linked_resource();
|
||||
}
|
||||
|
||||
// FIXME: Follow spec for fetching and processing these attributes as well
|
||||
|
|
Loading…
Add table
Reference in a new issue