mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-26 09:30:24 +00:00
LibWeb: Update Document::completely_finish_loading() to use navigables
This commit is contained in:
parent
9b16e5373d
commit
76a97d8863
Notes:
sideshowbarker
2024-07-18 00:41:35 +09:00
Author: https://github.com/kalenikaliaksandr Commit: https://github.com/SerenityOS/serenity/commit/76a97d8863 Pull-request: https://github.com/SerenityOS/serenity/pull/18219
1 changed files with 7 additions and 1 deletions
|
@ -1932,6 +1932,9 @@ bool Document::is_completely_loaded() const
|
|||
// https://html.spec.whatwg.org/multipage/browsing-the-web.html#completely-finish-loading
|
||||
void Document::completely_finish_loading()
|
||||
{
|
||||
if (!navigable())
|
||||
return;
|
||||
|
||||
// 1. Assert: document's browsing context is non-null.
|
||||
VERIFY(browsing_context());
|
||||
|
||||
|
@ -1943,7 +1946,10 @@ void Document::completely_finish_loading()
|
|||
m_active_refresh_timer->start();
|
||||
|
||||
// 3. Let container be document's browsing context's container.
|
||||
auto container = JS::make_handle(browsing_context()->container());
|
||||
if (!navigable()->container())
|
||||
return;
|
||||
|
||||
auto container = JS::make_handle(navigable()->container());
|
||||
|
||||
// 4. If container is an iframe element, then queue an element task on the DOM manipulation task source given container to run the iframe load event steps given container.
|
||||
if (container && is<HTML::HTMLIFrameElement>(*container)) {
|
||||
|
|
Loading…
Reference in a new issue