mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-26 14:28:49 +00:00
LibWeb: Run the object representation task when the active state changes
Currently, the following JS snippet will hang indefinitely: new DOMParser().parseFromString("<object>", "text/html"); Because the document into which the object is inserted is not active. So the task queued to run the representation steps will never run. This patch implements the spec steps to rerun the representation steps when the active state changes, and avoid the hang when the object is created in an inactive document.
This commit is contained in:
parent
a2419b5f4e
commit
68164aa7ec
Notes:
github-actions[bot]
2024-12-12 00:39:30 +00:00
Author: https://github.com/trflynn89
Commit: 68164aa7ec
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2881
Reviewed-by: https://github.com/ADKaster ✅
5 changed files with 681 additions and 0 deletions
|
@ -90,6 +90,8 @@ private:
|
|||
|
||||
GC::Ptr<SharedResourceRequest> m_resource_request;
|
||||
|
||||
GC::Ptr<DOM::DocumentObserver> m_document_observer;
|
||||
|
||||
Optional<DOM::DocumentLoadEventDelayer> m_document_load_event_delayer_for_object_representation_task;
|
||||
Optional<DOM::DocumentLoadEventDelayer> m_document_load_event_delayer_for_resource_load;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue