Skip to content

Commit

Permalink
App history to navigation API rename (7/n)
Browse files Browse the repository at this point in the history
See WICG/navigation-api#83 and
WICG/navigation-api#203 for context.

This CL renames the Blink RuntimeEnabledFeature from AppHistory to
NavigationApi.

While here, we remove the origin_trial_feature_name key since the origin
trial is no longer relevant to tip-of-trunk code.

Bug: 1300246
Change-Id: I66dd86dce6d8bef7fa38353009fe6cea0cdbcf8b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3537549
Reviewed-by: Nate Chapin <[email protected]>
Commit-Queue: Domenic Denicola <[email protected]>
Cr-Commit-Position: refs/heads/main@{#982891}
NOKEYCHECK=True
GitOrigin-RevId: 2e04818e615a118c8461ce53f3fc29dbf5526873
  • Loading branch information
domenic authored and copybara-github committed Mar 18, 2022
1 parent c1cda62 commit 320b50a
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 14 deletions.
2 changes: 1 addition & 1 deletion blink/renderer/core/navigation_api/navigate_event.idl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// https://wicg.github.io/navigation-api/
[
Exposed=Window,
RuntimeEnabled=AppHistory
RuntimeEnabled=NavigationApi
] interface NavigateEvent : Event {
[CallWith=ExecutionContext] constructor(DOMString type, NavigateEventInit eventInit);

Expand Down
2 changes: 1 addition & 1 deletion blink/renderer/core/navigation_api/navigation.idl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// https://wicg.github.io/navigation-api/
[
Exposed=Window,
RuntimeEnabled=AppHistory,
RuntimeEnabled=NavigationApi,
ImplementedAs=NavigationApi
] interface Navigation : EventTarget {
readonly attribute NavigationHistoryEntry? currentEntry;
Expand Down
4 changes: 2 additions & 2 deletions blink/renderer/core/navigation_api/navigation_api.cc
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,8 @@ String DetermineNavigationType(WebFrameLoadType type) {
const char NavigationApi::kSupplementName[] = "NavigationApi";

NavigationApi* NavigationApi::navigation(LocalDOMWindow& window) {
return RuntimeEnabledFeatures::AppHistoryEnabled(&window) ? From(window)
: nullptr;
return RuntimeEnabledFeatures::NavigationApiEnabled(&window) ? From(window)
: nullptr;
}

NavigationApi* NavigationApi::From(LocalDOMWindow& window) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// https://wicg.github.io/navigation-api/
[
Exposed=Window,
RuntimeEnabled=AppHistory
RuntimeEnabled=NavigationApi
] interface NavigationCurrentEntryChangeEvent : Event {
constructor(DOMString type, NavigationCurrentEntryChangeEventInit eventInit);
readonly attribute NavigationNavigationType? navigationType;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// https://wicg.github.io/navigation-api/
[
Exposed=Window,
RuntimeEnabled=AppHistory
RuntimeEnabled=NavigationApi
] interface NavigationDestination {
readonly attribute DOMString? key;
readonly attribute DOMString? id;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// https://wicg.github.io/navigation-api/
[
Exposed=Window,
RuntimeEnabled=AppHistory
RuntimeEnabled=NavigationApi
] interface NavigationHistoryEntry : EventTarget {
readonly attribute DOMString key;
readonly attribute DOMString id;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[Exposed=Window,
RuntimeEnabled=AppHistory]
RuntimeEnabled=NavigationApi]
interface NavigationTransition {
readonly attribute NavigationNavigationType navigationType;
readonly attribute NavigationHistoryEntry from;
Expand Down
2 changes: 1 addition & 1 deletion blink/renderer/core/navigation_api/window_navigation.idl
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
[
ImplementedAs=NavigationApi
] partial interface Window {
[RuntimeEnabled=AppHistory, Replaceable] readonly attribute Navigation navigation;
[RuntimeEnabled=NavigationApi, Replaceable] readonly attribute Navigation navigation;
};
9 changes: 4 additions & 5 deletions blink/renderer/platform/runtime_enabled_features.json5
Original file line number Diff line number Diff line change
Expand Up @@ -195,11 +195,6 @@
name: "AOMAriaRelationshipProperties",
status: "experimental",
},
{
name: "AppHistory",
origin_trial_feature_name: "AppHistory",
status: "experimental",
},
{
name: "AriaTouchPassthrough",
status: "experimental",
Expand Down Expand Up @@ -1578,6 +1573,10 @@
name: "NamedPages",
status: "stable",
},
{
name: "NavigationApi",
status: "experimental",
},
{
name: "NavigationId",
status: "experimental",
Expand Down

0 comments on commit 320b50a

Please sign in to comment.