diff --git a/source b/source index a201eb97b91..0dd6276d1f2 100644 --- a/source +++ b/source @@ -87776,18 +87776,75 @@ dictionary DragEventInit : MouseEventInit {
To obtain a browsing context to use for a - navigation response, given a browsing context browsingContext, a - sandboxing flag set sandboxFlags, an opener policy - navigationCOOP, and an opener policy enforcement - result coopEnforcementResult:
+ navigation response, given navigation params navigationParams:Let browsingContext be navigationParams's navigable's active browsing + context.
If browsingContext is not a top-level browsing context, then return browsingContext.
Let coopEnforcementResult be navigationParams's COOP enforcement result.
Let swapGroup be coopEnforcementResult's needs a browsing context group switch.
Let sourceOrigin be browsingContext's + active document's origin.
Let destinationOrigin be navigationParams's origin.
If coopEnforcementResult's needs a - browsing context group switch is false, then:
+If sourceOrigin is not same site with + destinationOrigin:
+ +If either of sourceOrigin or destinationOrigin have a scheme that is not an HTTP(S) scheme and + the user agent considers it necessary for sourceOrigin and + destinationOrigin to be isolated from each other (for + implementation-defined reasons), optionally set swapGroup to true.
+ +For example, if a user navigates from about:settings
to
+ https://example.com
, the user agent could force a swap.
Issue #10842 tracks + settling on an interoperable behavior here, instead of letting this be optional.
+If navigationParams's user
+ involvement is "browser UI
", optionally set
+ swapGroup to true.
Issue #6356 tracks + settling on an interoperable behavior here, instead of letting this be optional.
+If browsingContext's group's browsing + context set's size is 1, optionally set + swapGroup to true.
+ +Some implementations swap browsing context groups here for performance + reasons.
+ +The check for other contexts that could script this one is not sufficient to + prevent differences in behavior that could affect a web page. Even if there are currently no + other contexts, the destination page could open a window, then if the user navigates back, the + previous page could expect to be able to script the opened window. Doing a swap here would break + that use case.
+If swapGroup is false, then:
If coopEnforcementResult's DragEventInit : MouseEventInit { might destroy it at this point.
Let navigationCOOP be navigationParams's cross-origin opener policy.
If navigationCOOP's value is "same-origin-plus-COEP
", then set
@@ -87827,6 +87887,10 @@ dictionary DragEventInit : MouseEventInit {
not.
Let sandboxFlags be a clone of + navigationParams's final sandboxing flag set.
If sandboxFlags is not empty, then:
Assert: newBrowsingContext's popup sandboxing flag set is empty.
Set newBrowsingContext's popup sandboxing flag set to a clone of sandboxFlags.
Set newBrowsingContext's popup sandboxing flag set to + sandboxFlags.
To find a navigable by target name given a string name and a + navigable currentNavigable:
+ +Let currentDocument be currentNavigable's active document.
Let sourceSnapshotParams be the result of snapshotting source snapshot + params given currentDocument.
Let subtreesToSearch be an implementation-defined choice of one of + the following:
+ +« currentNavigable's traversable + navigable, currentNavigable »
the inclusive ancestor navigables of currentDocument
Issue #10848 tracks + settling on one of these two possibilities, to achieve interoperability.
+For each subtreeToSearch of + subtreesToSearch, in reverse order:
+ +Let documentToSearch be subtreeToSearch's active document.
For each navigable of the inclusive + descendant navigables of documentToSearch:
+ +If currentNavigable is not allowed by sandboxing to navigate + navigable given sourceSnapshotParams, then optionally + continue.
+ +Issue #10849 tracks + making this check required, to achieve interoperability.
+If navigable's target name is + name, then return navigable.
Let currentTopLevelBrowsingContext be currentNavigable's active browsing context's top-level browsing + context.
Let group be currentTopLevelBrowsingContext's group.
For each topLevelBrowsingContext of + group's browsing context set, in an implementation-defined + order (the user agent should pick a consistent ordering, such as the most recently opened, most + recently focused, or more closely related):
+ +Issue #10850 tracks + picking a specific ordering, to achieve interoperability.
+ +If currentTopLevelBrowsingContext is topLevelBrowsingContext, then + continue.
Let documentToSearch be topLevelBrowsingContext's active + document.
For each navigable of the inclusive + descendant navigables of documentToSearch:
+ +If currentNavigable's active browsing context + is not familiar with navigable's active + browsing context, then continue.
If currentNavigable is not allowed by sandboxing to navigate + navigable given sourceSnapshotParams, then optionally + continue.
+ + +Issue #10849 tracks + making this check required, to achieve interoperability.
+If navigable's target name is + name, then return navigable.
Return null.
The rules for choosing a navigable, given a string name, a navigable currentNavigable, and a boolean noopener are as follows:
@@ -97817,21 +97987,11 @@ interface NotRestoredReasons { data-x="">_top", set chosen to currentNavigable's traversable navigable.Otherwise, if name is not an ASCII case-insensitive match for "_blank
", there exists a navigable whose target name is the same as name,
- currentNavigable's active browsing context is
- familiar with that navigable's active browsing
- context, and the user agent determines that the two browsing contexts are related enough
- that it is ok if they reach each other, set chosen to that navigable. If there are
- multiple matching navigables, the user agent should pick one in
- some arbitrary consistent manner, such as the most recently opened, most recently focused, or
- more closely related, and set chosen to it.
This will be made more precise in issue #313.
-Otherwise, if name is not an ASCII case-insensitive match for
+ "_blank
", and there exists a navigable that is the result of
+ finding a navigable by target name given
+ name and currentNavigable, set chosen to that
+ navigable.
Otherwise, a new top-level traversable is being requested, and what happens @@ -99559,6 +99719,11 @@ location.href = '#foo';
Document
's about base URLDocument
Once a navigation params struct is created, this standard does not @@ -99863,8 +100028,8 @@ location.href = '#foo';
Queue a global task on the navigation and traversal task
source given navigable's active window to
navigate to a javascript:
URL given navigable,
- url, historyHandling, initiatorOriginSnapshot, and
- cspNavigationType.
Return.
Attempt to populate the history entry's document for historyEntry,
given navigable, "navigate
", sourceSnapshotParams,
- targetSnapshotParams, navigationId, navigationParams,
- cspNavigationType, with allowPOST
- set to true and targetSnapshotParams, userInvolvement, navigationId,
+ navigationParams, cspNavigationType, with allowPOST set to true and completionSteps set to the following
step:
Append session history traversal steps to navigable's traversable to finalize a cross-document - navigation given navigable, historyHandling, and - historyEntry.
To finalize a cross-document navigation given a navigable - navigable, history handling behavior historyHandling, and - session history entry historyEntry:
+ navigable, a history handling behavior historyHandling, a + user navigation involvement userInvolvement, and a session history + entry historyEntry:Assert: this is running on navigable's
Apply the push/replace history step targetStep to - traversable given historyHandling.
To navigate to a javascript:
URL, given a navigable
targetNavigable, a URL url, a history handling
- behavior historyHandling, an origin initiatorOrigin,
- and a string cspNavigationType:
Assert: historyHandling is " Let newDocument be the result of evaluating a
javascript:
URL given targetNavigable,
- url, and initiatorOrigin.
If newDocument is null, then return.
@@ -100342,12 +100512,13 @@ location.href = '#foo';Append session history traversal steps to targetNavigable's traversable to finalize a cross-document navigation with targetNavigable, - historyHandling, and historyEntry.
To evaluate a javascript:
URL given a navigable
- targetNavigable, a URL url, and an origin
- newDocumentOrigin:
Let urlString be the result of running the
Finalize a same-document navigation given traversable, - navigable, historyEntry, entryToReplace, and - historyHandling.
Invoke WebDriver BiDi fragment navigated with navigable's active browsing context and a new WebDriver BiDi navigation
@@ -100639,8 +100813,8 @@ location.href = '#foo';
To finalize a same-document navigation given a traversable navigable
traversable, a navigable targetNavigable, a session
history entry targetEntry, a session history entry-or-null
- entryToReplace, and a history handling behavior
- historyHandling:
This is used by both fragment navigations and by the URL and history update steps, which are the only synchronous updates to @@ -100694,7 +100868,7 @@ location.href = '#foo';
Apply the push/replace history step targetStep to - traversable given historyHandling.
+ traversable given historyHandling and userInvolvement.This is done even for "replace
" navigations, as it resolves race
@@ -100747,7 +100921,13 @@ location.href = '#foo';
NavigationTimingType
used for creating the navigation timing entry for the new Document
Document
(if one is
+ created)
+
+ Document
(if one is created)Handle url by displaying some sort of inline content, e.g., an error message - because the specified scheme is not one of the supported protocols, or an inline prompt to - allow the user to select a registered + because the specified scheme is not one of the supported protocols, or an inline prompt to allow + the user to select a registered handler for the given scheme. Return the result of displaying the inline content given navigable, - navigationParams's id, and + navigationParams's id, navigationParams's navigation - timing type.
+ timing type, and navigationParams's user involvement.In the case of a registered handler being used, navigate will be invoked with a new URL.
@@ -100906,7 +101087,7 @@ location.href = '#foo'; canceled">check if unloading is canceled for a list of navigables navigablesThatNeedBeforeUnload, given an optional traversable navigable traversable, an optional integer - targetStep, and an optional user navigation involvement-or-null + targetStep, and an optional user navigation involvement userInvolvementForNavigateEvent, run these steps. They return "canceled-by-beforeunload
", "canceled-by-navigate
", or
"continue
".
@@ -100955,8 +101136,6 @@ location.href = '#foo';
Assert: userInvolvementForNavigateEvent is not null.
Let eventsFired be false.
Let needsBeforeunload be true if navigablesThatNeedBeforeUnload @@ -101208,7 +101387,8 @@ location.href = '#foo'; history traversal steps to traversable:
Apply the reload history step to traversable.
Apply the reload history step to traversable given + userInvolvement.
Finalize a same-document navigation given traversable, - navigable, newEntry, entryToReplace, and - historyHandling.
none
".Invoke WebDriver BiDi history updated with navigable.
NavigationTimingType
navTimingType, a source snapshot params
sourceSnapshotParams, a target snapshot params
- targetSnapshotParams, an optional navigation ID-or-null
- navigationId (default null), an optional navigation params-or-null
- navigationParams (default null), an optional string cspNavigationType
- (default "other
"), an optional boolean targetSnapshotParams, a user navigation involvement
+ userInvolvement, an optional navigation ID-or-null navigationId
+ (default null), an optional navigation params-or-null navigationParams
+ (default null), an optional string cspNavigationType (default "other
"), an optional boolean allowPOST (default false), and optional
algorithm steps completionSteps (default an empty
@@ -101444,7 +101625,7 @@ location.href = '#foo';
If documentResource is a string, then set navigationParams to the result of creating navigation params from a srcdoc resource given entry, navigable, - targetSnapshotParams, navigationId, and + targetSnapshotParams, userInvolvement, navigationId, and navTimingType.
then set navigationParams to the result of creating navigation params by fetching given entry, navigable, sourceSnapshotParams, targetSnapshotParams, - cspNavigationType, navigationId, and navTimingType.
+ cspNavigationType, userInvolvement, navigationId, and + navTimingType.Set entry's document state's document to the result of creating a document for inline content that doesn't have a - DOM, given navigable, null, and navTimingType. The inline - content should indicate to the user the sort of error that occurred.
Make document unsalvageable given entry's document state's
To create navigation params from a srcdoc resource given a session history
entry entry, a navigable navigable, a target
- snapshot params targetSnapshotParams, a navigation ID-or-null
- navigationId, and a NavigationTimingType
navTimingType:NavigationTimingType
navTimingType:
Let documentResource be entry's
NavigationTimingType
navTimingType, perform the following steps. They
return a navigation params, a non-fetch scheme navigation params, or
null.
@@ -102381,6 +102572,9 @@ location.href = '#foo';
At this point, request's
Otherwise, proceed onward.
@@ -102573,8 +102774,10 @@ location.href = '#foo'; data-x="navigate-ua-inline">creating a document for inline content that doesn't have a DOM given navigationParams's navigable, navigationParams's id, and navigationParams's navigation timing type. + data-x="navigation-params-id">id, navigationParams's navigation timing type, and + navigationParams's user + involvement.Otherwise, the document's type is such that the resource will not affect navigationParams's navigable, e.g., @@ -102641,18 +102844,19 @@ location.href = '#foo'; data-x="tn-current-session-history-step">current session history step.
Return the result of applying the history - step step to traversable given false, null, null, null, and - null.
none
", and null.
To apply the push/replace history step given a non-negative integer step - and a history handling behavior historyHandling to a - traversable navigable traversable:
+ to a traversable navigable traversable, given a history handling + behavior historyHandling and a user navigation involvement + userInvolvement:Return the result of applying the history - step step to traversable given false, null, null, null, and - historyHandling.
Apply the push/replace history step never passes source @@ -102661,15 +102865,17 @@ location.href = '#foo'; data-x="navigate">navigation algorithm.
To apply the reload history step to a traversable navigable - traversable:
+ traversable given user navigation involvement + userInvolvement:Let step be traversable's current session history step.
Return the result of applying the history
- step step to traversable given true, null, null, null,
- and "reload
".
reload
".
Apply the reload history step never passes source snapshot
@@ -102698,11 +102904,11 @@ location.href = '#foo';
non-negative integer step to a traversable navigable
traversable, with boolean checkForCancelation, source snapshot
params-or-null sourceSnapshotParams, navigable-or-null
- initiatorToCheck, user navigation involvement-or-null
- userInvolvementForNavigateEvents, and NavigationType
-or-null
- navigationType, perform the following steps. They return "initiator-disallowed
", "canceled-by-beforeunload
", "canceled-by-navigate
", or "applied
".
NavigationType
-or-null navigationType, perform the following steps.
+ They return "initiator-disallowed
", "canceled-by-beforeunload
", "canceled-by-navigate
", or
+ "applied
".
Assert: This is running within traversable's
If checkForCancelation is true, and the result of checking if unloading
is canceled given navigablesCrossingDocuments, traversable,
- targetStep, and userInvolvementForNavigateEvents is not "continue
", then return that result.continue
",
+ then return that result.
Let changingNavigables be the result of get all navigables whose current session history entry will change or reload given traversable and @@ -102881,16 +103087,12 @@ location.href = '#foo';
then:
Assert: userInvolvementForNavigateEvents is not - null.
Let navigation be navigable's active window's navigation API.
Fire a traverse navigate
event at
- navigation given targetEntry and
- userInvolvementForNavigateEvents.
In parallel, attempt to populate the history entry's document for targetEntry, given navigable, potentiallyTargetSpecificSourceSnapshotParams, targetSnapshotParams, - with allowPOST set to allowPOST - and completionSteps set to + userInvolvement, with allowPOST set + to allowPOST and completionSteps set to queue a global task on the navigation and traversal task source given navigable's active window to run afterDocumentPopulated.
Let browsingContext be navigationParams's navigable's active browsing - context.
Set browsingContext to the result of the Let browsingContext be the result of obtaining a browsing context to use for a - navigation response given browsingContext, navigationParams's - final sandboxing flag set, - navigationParams's cross-origin opener - policy, and navigationParams's COOP enforcement result.
+ navigation response given navigationParams.Let origin be a new opaque
@@ -105144,6 +105339,9 @@ new PaymentRequest(…); // Allowed to use