mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-10 13:00:29 +03:00
LibWeb: Add API for setting a document's referrer
This commit is contained in:
parent
6e71e400e6
commit
73f77969a6
Notes:
sideshowbarker
2024-07-17 14:36:19 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/73f77969a6
@ -1498,8 +1498,12 @@ bool Document::has_a_style_sheet_that_is_blocking_scripts() const
|
||||
|
||||
String Document::referrer() const
|
||||
{
|
||||
// FIXME: Return the document's actual referrer.
|
||||
return "";
|
||||
return m_referrer;
|
||||
}
|
||||
|
||||
void Document::set_referrer(String referrer)
|
||||
{
|
||||
m_referrer = referrer;
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/browsers.html#fully-active
|
||||
|
@ -64,6 +64,7 @@ public:
|
||||
void set_cookie(String const&, Cookie::Source = Cookie::Source::NonHttp);
|
||||
|
||||
String referrer() const;
|
||||
void set_referrer(String);
|
||||
|
||||
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; }
|
||||
@ -483,6 +484,9 @@ private:
|
||||
// https://html.spec.whatwg.org/multipage/dom.html#is-initial-about:blank
|
||||
bool m_is_initial_about_blank { false };
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/dom.html#the-document's-referrer
|
||||
String m_referrer { "" };
|
||||
|
||||
// https://dom.spec.whatwg.org/#concept-document-origin
|
||||
HTML::Origin m_origin;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user