summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/DOM
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Libraries/LibWeb/DOM')
-rw-r--r--Userland/Libraries/LibWeb/DOM/Document.cpp8
-rw-r--r--Userland/Libraries/LibWeb/DOM/Document.h5
2 files changed, 7 insertions, 6 deletions
diff --git a/Userland/Libraries/LibWeb/DOM/Document.cpp b/Userland/Libraries/LibWeb/DOM/Document.cpp
index 3cf3a18aa1..a4f77872a4 100644
--- a/Userland/Libraries/LibWeb/DOM/Document.cpp
+++ b/Userland/Libraries/LibWeb/DOM/Document.cpp
@@ -821,17 +821,17 @@ void Document::completely_finish_loading()
dispatch_event(DOM::Event::create(HTML::EventNames::load));
}
-String Document::cookie()
+String Document::cookie(Cookie::Source source)
{
if (auto* page = this->page())
- return page->client().page_did_request_cookie(m_url);
+ return page->client().page_did_request_cookie(m_url, source);
return {};
}
-void Document::set_cookie(String cookie)
+void Document::set_cookie(String cookie, Cookie::Source source)
{
if (auto* page = this->page())
- page->client().page_did_set_cookie(m_url, cookie);
+ page->client().page_did_set_cookie(m_url, cookie, source);
}
}
diff --git a/Userland/Libraries/LibWeb/DOM/Document.h b/Userland/Libraries/LibWeb/DOM/Document.h
index 27d350b256..5f63b4d408 100644
--- a/Userland/Libraries/LibWeb/DOM/Document.h
+++ b/Userland/Libraries/LibWeb/DOM/Document.h
@@ -40,6 +40,7 @@
#include <LibWeb/CSS/CSSStyleSheet.h>
#include <LibWeb/CSS/StyleResolver.h>
#include <LibWeb/CSS/StyleSheetList.h>
+#include <LibWeb/Cookie/Cookie.h>
#include <LibWeb/DOM/DOMImplementation.h>
#include <LibWeb/DOM/ExceptionOr.h>
#include <LibWeb/DOM/NonElementParentNode.h>
@@ -73,8 +74,8 @@ public:
virtual ~Document() override;
- String cookie();
- void set_cookie(String);
+ String cookie(Cookie::Source = Cookie::Source::NonHttp);
+ void set_cookie(String, Cookie::Source = Cookie::Source::NonHttp);
bool should_invalidate_styles_on_attribute_changes() const { return m_should_invalidate_styles_on_attribute_changes; }
void set_should_invalidate_styles_on_attribute_changes(bool b) { m_should_invalidate_styles_on_attribute_changes = b; }