mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-16 13:09:41 +00:00
LibWeb: Add initial CookieStore support
This commit is contained in:
parent
4a8c70b3a5
commit
d6c2893663
Notes:
github-actions[bot]
2025-08-08 17:12:40 +00:00
Author: https://github.com/IdanHo
Commit: d6c2893663
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5766
Reviewed-by: https://github.com/trflynn89 ✅
19 changed files with 134 additions and 2 deletions
|
@ -24,6 +24,7 @@
|
|||
#include <LibWeb/CSS/MediaQueryList.h>
|
||||
#include <LibWeb/CSS/Parser/Parser.h>
|
||||
#include <LibWeb/CSS/Screen.h>
|
||||
#include <LibWeb/CookieStore/CookieStore.h>
|
||||
#include <LibWeb/DOM/Document.h>
|
||||
#include <LibWeb/DOM/Element.h>
|
||||
#include <LibWeb/DOM/Event.h>
|
||||
|
@ -130,6 +131,7 @@ void Window::visit_edges(JS::Cell::Visitor& visitor)
|
|||
visitor.visit(m_pdf_viewer_plugin_objects);
|
||||
visitor.visit(m_pdf_viewer_mime_type_objects);
|
||||
visitor.visit(m_close_watcher_manager);
|
||||
visitor.visit(m_cookie_store);
|
||||
visitor.visit(m_locationbar);
|
||||
visitor.visit(m_menubar);
|
||||
visitor.visit(m_personalbar);
|
||||
|
@ -1121,6 +1123,17 @@ GC::Ref<CloseWatcherManager> Window::close_watcher_manager()
|
|||
return GC::Ref { *m_close_watcher_manager };
|
||||
}
|
||||
|
||||
// https://cookiestore.spec.whatwg.org/#Window
|
||||
GC::Ref<CookieStore::CookieStore> Window::cookie_store()
|
||||
{
|
||||
auto& realm = this->realm();
|
||||
|
||||
// The cookieStore getter steps are to return this’s associated CookieStore.
|
||||
if (!m_cookie_store)
|
||||
m_cookie_store = realm.create<CookieStore::CookieStore>(realm);
|
||||
return *m_cookie_store;
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#dom-alert
|
||||
void Window::alert(String const& message)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue