mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-05 06:32:30 +02:00
LibWeb: Implement the document.cookie setter/getter according to spec
This ensures we cannot set or get cookies on non-HTTP(S) origins. Since this would prevent our ability to test cookies during LibWeb tests, this also adds an internals API to allow cookie access on file:// URLs.
This commit is contained in:
committed by
Andreas Kling
parent
86744449e3
commit
527218da19
Notes:
github-actions[bot]
2024-10-23 07:06:33 +00:00
Author: https://github.com/trflynn89 Commit: https://github.com/LadybirdBrowser/ladybird/commit/527218da19d Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1926
@@ -183,6 +183,11 @@ void Internals::simulate_drop(double x, double y)
|
||||
page.handle_drag_and_drop_event(DragEvent::Type::Drop, position, position, UIEvents::MouseButton::Primary, 0, 0, {});
|
||||
}
|
||||
|
||||
void Internals::enable_cookies_on_file_domains()
|
||||
{
|
||||
internals_window().associated_document().enable_cookies_on_file_domains({});
|
||||
}
|
||||
|
||||
void Internals::expire_cookies_with_time_offset(WebIDL::LongLong seconds)
|
||||
{
|
||||
internals_page().client().page_did_expire_cookies_with_time_offset(AK::Duration::from_seconds(seconds));
|
||||
|
||||
Reference in New Issue
Block a user