mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 01:35:08 +02: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:
committed by
Andrew Kaster
parent
a2419b5f4e
commit
68164aa7ec
Notes:
github-actions[bot]
2024-12-12 00:39:30 +00:00
Author: https://github.com/trflynn89 Commit: https://github.com/LadybirdBrowser/ladybird/commit/68164aa7eca Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2881 Reviewed-by: https://github.com/ADKaster ✅
@@ -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;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user