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
commit 2ca8cf49ca
Notes: sideshowbarker 2024-07-17 03:35:16 +09:00
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*);