mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-01 00:38:48 +00:00
LibWeb: Add Origin concept (protocol, host, port tuple)
Every Document now has an Origin, found via Document::origin(). It's based on the URL of the document. This will be used to implement things like the same-origin policy.
This commit is contained in:
parent
53f63058b9
commit
7382b27c22
Notes:
sideshowbarker
2024-07-19 07:49:11 +09:00
Author: https://github.com/awesomekling
Commit: 7382b27c22
6 changed files with 71 additions and 6 deletions
|
@ -386,8 +386,7 @@ RefPtr<DocumentFragment> parse_html_fragment(Document& document, const StringVie
|
|||
|
||||
RefPtr<Document> parse_html_document(const StringView& html, const URL& url)
|
||||
{
|
||||
auto document = adopt(*new Document);
|
||||
document->set_url(url);
|
||||
auto document = adopt(*new Document(url));
|
||||
document->set_source(html);
|
||||
|
||||
if (!parse_html_document(html, *document, *document))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue