mirror of
https://github.com/RGBCube/serenity
synced 2025-07-03 00:52:12 +00:00
LibWeb: Bring browsing context creation closer to spec
This patch implements the "create a new browsing context" function from the HTML spec and replaces our existing logic with it. The big difference is that browsing contexts now initially navigate to "about:blank" instead of starting out in a strange "empty" state. This makes it possible for websites to create a new iframe and start scripting inside it right away, without having to load an URL into it.
This commit is contained in:
parent
73f77969a6
commit
2a7924f96c
8 changed files with 242 additions and 5 deletions
|
@ -659,7 +659,6 @@ void Document::set_title(String const& title)
|
|||
void Document::attach_to_browsing_context(Badge<HTML::BrowsingContext>, HTML::BrowsingContext& browsing_context)
|
||||
{
|
||||
m_browsing_context = browsing_context;
|
||||
update_layout();
|
||||
}
|
||||
|
||||
void Document::detach_from_browsing_context(Badge<HTML::BrowsingContext>, HTML::BrowsingContext& browsing_context)
|
||||
|
@ -1833,4 +1832,9 @@ void Document::check_favicon_after_loading_link_resource()
|
|||
dbgln_if(SPAM_DEBUG, "No favicon found to be used");
|
||||
}
|
||||
|
||||
void Document::set_window(Badge<HTML::BrowsingContext>, HTML::Window& window)
|
||||
{
|
||||
m_window = window;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue