1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 15:48:12 +00:00

LibWeb: Use browsing context creator URL for about:blank documents

In about:blank documents, we should use the browsing context's creator
URL as the base URL, if it exists and there is no <base> element.
This means that any about:blank frames will have URLs parse relative to
their parent frame's URL.

Fixes #17394.
This commit is contained in:
Luke Wilde 2023-02-21 17:08:01 +00:00 committed by Linus Groh
parent e294c96aef
commit 2ca8cf49ca
2 changed files with 6 additions and 1 deletions

View file

@ -265,6 +265,8 @@ public:
// https://html.spec.whatwg.org/multipage/window-object.html#close-a-browsing-context
void close();
Optional<AK::URL> const& creator_url() const { return m_creator_url; }
private:
explicit BrowsingContext(Page&, HTML::BrowsingContextContainer*);