mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 14:27:35 +00:00
LibWeb: Add did_stop_being_active_document_in_navigable()
This commit is contained in:
parent
4532584b3a
commit
2fbb6ae520
2 changed files with 14 additions and 0 deletions
|
@ -2882,6 +2882,8 @@ void Document::unload(JS::GCPtr<Document>)
|
|||
|
||||
// FIXME: 21. If newDocument is given, newDocument's was created via cross-origin redirects is false, and newDocument's origin is the same as oldDocument's origin, then set
|
||||
// newDocument's previous document unload timing to unloadTimingInfo.
|
||||
|
||||
did_stop_being_active_document_in_navigable();
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/iframe-embed-object.html#allowed-to-use
|
||||
|
@ -2920,6 +2922,17 @@ void Document::did_stop_being_active_document_in_browsing_context(Badge<HTML::Br
|
|||
}
|
||||
}
|
||||
|
||||
void Document::did_stop_being_active_document_in_navigable()
|
||||
{
|
||||
tear_down_layout_tree();
|
||||
|
||||
auto observers_to_notify = m_document_observers.values();
|
||||
for (auto& document_observer : observers_to_notify) {
|
||||
if (document_observer->document_became_inactive)
|
||||
document_observer->document_became_inactive();
|
||||
}
|
||||
}
|
||||
|
||||
// https://w3c.github.io/editing/docs/execCommand/#querycommandsupported()
|
||||
bool Document::query_command_supported(String const& command) const
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue