LibWeb/HTML: Pass user_involvement through navigables code

This corresponds to part of https://github.com/whatwg/html/pull/10818
This commit is contained in:
Sam Atkins 2025-01-07 14:58:48 +00:00 committed by Andreas Kling
parent 8b5e9c2a1d
commit c6a18f795d
Notes: github-actions[bot] 2025-01-11 10:11:59 +00:00
7 changed files with 110 additions and 94 deletions

View file

@ -20,6 +20,13 @@
namespace Web::HTML {
// https://html.spec.whatwg.org/multipage/browsing-the-web.html#user-navigation-involvement
enum class UserNavigationInvolvement {
BrowserUI,
Activation,
None,
};
// https://html.spec.whatwg.org/multipage/browsing-the-web.html#navigation-params
struct NavigationParams : JS::Cell {
GC_CELL(NavigationParams, JS::Cell);
@ -66,6 +73,9 @@ struct NavigationParams : JS::Cell {
// a URL or null used to populate the new Document's about base URL
Optional<URL::URL> about_base_url;
// a user navigation involvement used when obtaining a browsing context for the new Document
UserNavigationInvolvement user_involvement;
void visit_edges(Visitor& visitor) override;
};
@ -94,6 +104,9 @@ struct NonFetchSchemeNavigationParams : JS::Cell {
// FIXME: a NavigationTimingType used for creating the navigation timing entry for the new Document
// a user navigation involvement used when obtaining a browsing context for the new Document (if one is created)
UserNavigationInvolvement user_involvement;
void visit_edges(Visitor& visitor) override;
};