mirror of
https://github.com/RGBCube/serenity
synced 2025-05-23 18:55:08 +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
|
@ -34,7 +34,7 @@ void BrowsingContextContainer::create_new_nested_browsing_context()
|
|||
|
||||
// 2. Let browsingContext be the result of creating a new browsing context with element's node document, element, and group.
|
||||
// 3. Set element's nested browsing context to browsingContext.
|
||||
m_nested_browsing_context = BrowsingContext::create_nested(*group->page(), *this);
|
||||
m_nested_browsing_context = BrowsingContext::create_a_new_browsing_context(*group->page(), document(), *this);
|
||||
group->append_child(*m_nested_browsing_context);
|
||||
m_nested_browsing_context->set_frame_nesting_levels(group->frame_nesting_levels());
|
||||
m_nested_browsing_context->register_frame_nesting(document().url());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue