mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-26 03:09:08 +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:
@@ -315,8 +315,7 @@ void HtmlView::reload()
|
||||
|
||||
static RefPtr<Document> create_image_document(const ByteBuffer& data, const URL& url)
|
||||
{
|
||||
auto document = adopt(*new Document);
|
||||
document->set_url(url);
|
||||
auto document = adopt(*new Document(url));
|
||||
|
||||
auto bitmap = Gfx::load_png_from_memory(data.data(), data.size());
|
||||
ASSERT(bitmap);
|
||||
|
||||
Reference in New Issue
Block a user