mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-25 09:00:22 +00:00
LibWeb: Set Cookie header on remaining resource requests
This commit is contained in:
parent
0cacc52990
commit
0f47a23e8e
Notes:
sideshowbarker
2024-07-18 20:18:56 +09:00
Author: https://github.com/trflynn89 Commit: https://github.com/SerenityOS/serenity/commit/0f47a23e8ed Pull-request: https://github.com/SerenityOS/serenity/pull/6321
4 changed files with 5 additions and 9 deletions
|
@ -175,8 +175,7 @@ ImageStyleValue::ImageStyleValue(const URL& url, DOM::Document& document)
|
|||
, m_url(url)
|
||||
, m_document(document)
|
||||
{
|
||||
LoadRequest request;
|
||||
request.set_url(url);
|
||||
auto request = LoadRequest::create_for_url_on_page(url, document.page());
|
||||
set_resource(ResourceLoader::the().load_resource(Resource::Type::Image, request));
|
||||
}
|
||||
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
#include <LibWeb/CSS/CSSImportRule.h>
|
||||
#include <LibWeb/CSS/Parser/DeprecatedCSSParser.h>
|
||||
#include <LibWeb/CSS/StyleSheet.h>
|
||||
#include <LibWeb/DOM/Document.h>
|
||||
#include <LibWeb/DOM/Element.h>
|
||||
#include <LibWeb/Loader/CSSLoader.h>
|
||||
#include <LibWeb/Loader/ResourceLoader.h>
|
||||
|
@ -56,8 +57,7 @@ void CSSLoader::load_from_url(const URL& url)
|
|||
m_style_sheet = CSS::CSSStyleSheet::create({});
|
||||
m_style_sheet->set_owner_node(&m_owner_element);
|
||||
|
||||
LoadRequest request;
|
||||
request.set_url(url);
|
||||
auto request = LoadRequest::create_for_url_on_page(url, m_owner_element.document().page());
|
||||
set_resource(ResourceLoader::the().load_resource(Resource::Type::Generic, request));
|
||||
}
|
||||
|
||||
|
|
|
@ -204,9 +204,7 @@ bool FrameLoader::load(const URL& url, Type type)
|
|||
return false;
|
||||
}
|
||||
|
||||
LoadRequest request;
|
||||
request.set_url(url);
|
||||
|
||||
auto request = LoadRequest::create_for_url_on_page(url, frame().page());
|
||||
return load(request, type);
|
||||
}
|
||||
|
||||
|
|
|
@ -202,9 +202,8 @@ DOM::ExceptionOr<void> XMLHttpRequest::send()
|
|||
return {};
|
||||
}
|
||||
|
||||
LoadRequest request;
|
||||
auto request = LoadRequest::create_for_url_on_page(request_url, m_window->document().page());
|
||||
request.set_method(m_method);
|
||||
request.set_url(request_url);
|
||||
for (auto& it : m_request_headers)
|
||||
request.set_header(it.key, it.value);
|
||||
|
||||
|
|
Loading…
Reference in a new issue