mirror of
https://github.com/RGBCube/serenity
synced 2025-07-05 10:37:34 +00:00
LibWeb: Add BrowsingContext::container() to align with the spec
We already have a base class for frame elements that we call BrowsingContextContainer. This patch makes BrowsingContext::container() actually return one of those. This makes us match the spec names, and also solves a FIXME about having a shared base for <frame> and <iframe>. (We already had the shared base, but the pointer we had there wasn't tightly typed enough.)
This commit is contained in:
parent
5356de1c58
commit
d1100dd6bc
3 changed files with 18 additions and 19 deletions
|
@ -302,10 +302,8 @@ void FrameLoader::resource_did_load()
|
|||
else
|
||||
browsing_context().set_viewport_scroll_offset({ 0, 0 });
|
||||
|
||||
if (auto* host_element = browsing_context().host_element()) {
|
||||
// FIXME: Perhaps in the future we'll have a better common base class for <frame> and <iframe>
|
||||
verify_cast<HTML::HTMLIFrameElement>(*host_element).nested_browsing_context_did_load({});
|
||||
}
|
||||
if (auto* container = browsing_context().container())
|
||||
container->nested_browsing_context_did_load({});
|
||||
|
||||
if (auto* page = browsing_context().page())
|
||||
page->client().page_did_finish_loading(url);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue