mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-04 02:08:53 +00:00
LibWeb: Skip creating a navigable for <object> not connected to document
Navigation should not run for <object> element until it is inserted into a document. Spec deoes not seem to explicitely say that, but that matches other browsers behavior. Fixes hanging after reloading in Acid3 test.
This commit is contained in:
parent
68440ed02d
commit
d876f32e5d
Notes:
sideshowbarker
2024-07-17 11:30:54 +09:00
Author: https://github.com/kalenikaliaksandr
Commit: d876f32e5d
Pull-request: https://github.com/SerenityOS/serenity/pull/23996
3 changed files with 21 additions and 1 deletions
|
@ -258,7 +258,7 @@ void HTMLObjectElement::run_object_representation_handler_steps(Optional<ByteStr
|
|||
// * If the resource type is an XML MIME type, or if the resource type does not start with "image/"
|
||||
if (mime_type.has_value() && can_load_document_with_type(*mime_type) && (mime_type->is_xml() || !mime_type->is_image())) {
|
||||
// If the object element's content navigable is null, then create a new child navigable for the element.
|
||||
if (!m_content_navigable) {
|
||||
if (!m_content_navigable && in_a_document_tree()) {
|
||||
MUST(create_new_child_navigable());
|
||||
set_content_navigable_initialized();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue