diff --git a/Userland/Libraries/LibWeb/HTML/BrowsingContext.cpp b/Userland/Libraries/LibWeb/HTML/BrowsingContext.cpp index e45dba2e6d..f9aedf8563 100644 --- a/Userland/Libraries/LibWeb/HTML/BrowsingContext.cpp +++ b/Userland/Libraries/LibWeb/HTML/BrowsingContext.cpp @@ -52,7 +52,8 @@ static HTML::Origin url_origin(AK::URL const& url) if (url.scheme() == "file"sv) { // Unfortunate as it is, this is left as an exercise to the reader. When in doubt, return a new opaque origin. - return HTML::Origin {}; + // Note: We must return an origin with the `file://' protocol for `file://' iframes to work from `file://' pages. + return HTML::Origin(url.protocol(), String(), 0); } return HTML::Origin {};