Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.

Commit 575bc2e

Browse files
committed
Bug 1942630, part 1 - Navigation API: Move UserNavigationInvolvement into its own header file. r=farre
Additionally, the enum values are now sorted by 'severity' (0=None, 1=Activation, 2=BrowserUI). Differential Revision: https://phabricator.services.mozilla.com/D234850
1 parent 8a566a1 commit 575bc2e

File tree

3 files changed

+22
-4
lines changed

3 files changed

+22
-4
lines changed

dom/navigation/Navigation.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,6 @@ struct NavigationUpdateCurrentEntryOptions;
2020
struct NavigationReloadOptions;
2121
struct NavigationResult;
2222

23-
// See https://bugzilla.mozilla.org/show_bug.cgi?id=1903552.
24-
// https://html.spec.whatwg.org/multipage/browsing-the-web.html#user-navigation-involvement
25-
enum class UserNavigationInvolvement : uint8_t { BrowserUI, Activation, None };
26-
2723
class Navigation final : public DOMEventTargetHelper {
2824
public:
2925
NS_DECL_ISUPPORTS_INHERITED
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2+
/* vim: set ts=2 sts=2 et sw=2 tw=80: */
3+
/* This Source Code Form is subject to the terms of the Mozilla Public
4+
* License, v. 2.0. If a copy of the MPL was not distributed with this
5+
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6+
7+
#ifndef mozilla_dom_UserNavigationInvolvement_h___
8+
#define mozilla_dom_UserNavigationInvolvement_h___
9+
#include <cstdint>
10+
namespace mozilla::dom {
11+
12+
// See https://bugzilla.mozilla.org/show_bug.cgi?id=1903552.
13+
// https://html.spec.whatwg.org/#user-navigation-involvement
14+
enum class UserNavigationInvolvement : uint8_t {
15+
None = 0,
16+
Activation = 1,
17+
BrowserUI = 2
18+
};
19+
} // namespace mozilla::dom
20+
21+
#endif

dom/navigation/moz.build

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ EXPORTS.mozilla.dom += [
1313
"NavigationDestination.h",
1414
"NavigationHistoryEntry.h",
1515
"NavigationTransition.h",
16+
"UserNavigationInvolvement.h",
1617
]
1718

1819
UNIFIED_SOURCES += [

0 commit comments

Comments
 (0)