mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-07 21:59:54 +00:00
LibWeb+LibWebView: Implement emitting CookieChangeEvents
This commit is contained in:
parent
a72a0b3c2d
commit
81e3afd1fd
Notes:
github-actions[bot]
2025-08-08 17:11:07 +00:00
Author: https://github.com/IdanHo
Commit: 81e3afd1fd
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5766
Reviewed-by: https://github.com/trflynn89 ✅
7 changed files with 213 additions and 1 deletions
|
|
@ -24,6 +24,7 @@
|
|||
#include <LibWeb/CSS/ComputedProperties.h>
|
||||
#include <LibWeb/CSS/Parser/ErrorReporter.h>
|
||||
#include <LibWeb/CSS/StyleComputer.h>
|
||||
#include <LibWeb/CookieStore/CookieStore.h>
|
||||
#include <LibWeb/DOM/Attr.h>
|
||||
#include <LibWeb/DOM/CharacterData.h>
|
||||
#include <LibWeb/DOM/Document.h>
|
||||
|
|
@ -1314,4 +1315,14 @@ void ConnectionFromClient::system_time_zone_changed()
|
|||
Unicode::clear_system_time_zone_cache();
|
||||
}
|
||||
|
||||
void ConnectionFromClient::cookies_changed(Vector<Web::Cookie::Cookie> cookies)
|
||||
{
|
||||
for (auto& navigable : Web::HTML::all_navigables()) {
|
||||
auto window = navigable->active_window();
|
||||
if (!window)
|
||||
return;
|
||||
window->cookie_store()->process_cookie_changes(cookies);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -156,6 +156,7 @@ private:
|
|||
virtual void paste(u64 page_id, String text) override;
|
||||
|
||||
virtual void system_time_zone_changed() override;
|
||||
virtual void cookies_changed(Vector<Web::Cookie::Cookie>) override;
|
||||
|
||||
NonnullOwnPtr<PageHost> m_page_host;
|
||||
|
||||
|
|
|
|||
|
|
@ -128,4 +128,5 @@ endpoint WebContentServer
|
|||
set_user_style(u64 page_id, String source) =|
|
||||
|
||||
system_time_zone_changed() =|
|
||||
cookies_changed(Vector<Web::Cookie::Cookie> cookies) =|
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue