diff options
author | Timothy Flynn <trflynn89@pm.me> | 2022-03-24 11:19:43 -0400 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-03-24 16:56:38 +0100 |
commit | d744f04a03aa15e1c55316b1626efdf84f45375f (patch) | |
tree | 849323a631ca7e2cf459b27728844449af32c004 | |
parent | 23915d0977d453c531cc827986520de120bb43b0 (diff) | |
download | serenity-d744f04a03aa15e1c55316b1626efdf84f45375f.zip |
LibWeb: Discard an object's nested browsing contexts when falling back
-rw-r--r-- | Userland/Libraries/LibWeb/HTML/HTMLObjectElement.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Userland/Libraries/LibWeb/HTML/HTMLObjectElement.cpp b/Userland/Libraries/LibWeb/HTML/HTMLObjectElement.cpp index 981a839477..2203681f9e 100644 --- a/Userland/Libraries/LibWeb/HTML/HTMLObjectElement.cpp +++ b/Userland/Libraries/LibWeb/HTML/HTMLObjectElement.cpp @@ -250,6 +250,11 @@ void HTMLObjectElement::run_object_representation_completed_steps(Representation void HTMLObjectElement::run_object_representation_fallback_steps() { // 6. Fallback: The object element represents the element's children, ignoring any leading param element children. This is the element's fallback content. If the element has an instantiated plugin, then unload it. If the element's nested browsing context is non-null, then it must be discarded and then set to null. + if (m_nested_browsing_context) { + discard_nested_browsing_context(); + m_nested_browsing_context = nullptr; + } + update_layout_and_child_objects(Representation::Children); } |