mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-27 11:48:32 +00:00
LibWeb: Add SessionHistoryEntry::document()
No behaviour change intended.
This commit is contained in:
committed by
Andreas Kling
parent
b590d1b48b
commit
ce325a9912
@@ -59,7 +59,7 @@ WebIDL::ExceptionOr<Optional<String>> NavigationHistoryEntry::url() const
|
||||
|
||||
// 4. If she's document does not equal document, and she's document state's request referrer policy
|
||||
// is "no-referrer" or "origin", then return null.
|
||||
if ((she->document_state()->document() != &document)
|
||||
if ((she->document() != &document)
|
||||
&& (she->document_state()->request_referrer_policy() == ReferrerPolicy::ReferrerPolicy::NoReferrer
|
||||
|| she->document_state()->request_referrer_policy() == ReferrerPolicy::ReferrerPolicy::Origin))
|
||||
return OptionalNone {};
|
||||
@@ -120,7 +120,7 @@ bool NavigationHistoryEntry::same_document() const
|
||||
return false;
|
||||
|
||||
// 3. Return true if this's session history entry's document equals document, and false otherwise.
|
||||
return m_session_history_entry->document_state()->document() == &document;
|
||||
return m_session_history_entry->document() == &document;
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/nav-history-apis.html#dom-navigationhistoryentry-getstate
|
||||
|
||||
Reference in New Issue
Block a user