Skip to content

Commit

Permalink
Bounce tracking traversable
Browse files Browse the repository at this point in the history
  • Loading branch information
domfarolino committed Dec 4, 2023
1 parent 0709a6e commit 86f7ec7
Showing 1 changed file with 17 additions and 7 deletions.
24 changes: 17 additions & 7 deletions compatibility.bs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@ urlPrefix: https://html.spec.whatwg.org/multipage/
for: browsing context
text: is popup
text: opener origin at creation
urlPrefix: https://privacycg.github.io/nav-tracking-mitigations/
type: dfn
for: top-level traversable
text: bounce tracking record; url: top-level-traversable-bounce-tracking-record
for: bounce tracking record
text: bounce set; url: #bounce-tracking-record-bounce-set
</pre>

<pre class="biblio">
Expand Down Expand Up @@ -937,24 +943,28 @@ perform the following steps:

<h3 id="sa-heuristics-redirect">Redirect Heuristic</h3>

Insert the following steps in the <a spec="html">load a document</a> algorithm,
before Step 5, "Return null", which is the point that the [=document=] is loaded.
Insert the following steps in [[!HTML]]'s <a spec="html">load a document</a> algorithm, before the
final step which returns null.

<div algorithm="loading-a-document-patch">

1. Run [=detect a redirect heuristic=] given <var ignore>navigable</var>.

</div>

<div algorithm>

To <dfn>detect a redirect heuristic</dfn> given a navigable |navigable|,
perform the following steps:
To <dfn>detect a redirect heuristic</dfn> given a [=/navigable=] |navigable|, perform the following
steps:

1. Let |topDocument| be |navigable|'s [=navigable/top-level traversable=]'s
[=navigable/active document=].
1. Let |firstPartyOrigin| be |topDocument|'s [=Document/origin=].
1. If |firstPartyOrigin| is an [=opaque origin=] then abort these steps.
1. If |firstPartyOrigin| is an [=opaque origin=] then return.
1. Let |firstPartySite| be the result of running [=obtain a site=] given |firstPartyOrigin|.
1. Let |firstPartyHost| be |firstPartySite|'s [=host=].
1. Let |bounceTrackingRecord| be |navigable|'s [=navigable/top-level traversable=]'s <var ignore>bounce tracking record</var>.
1. [=list/For each=] |bounceUrl| in |bounceTrackingRecord|'s <var ignore>bounce set</var>:
1. Let |bounceTrackingRecord| be |navigable|'s [=navigable/top-level traversable=]'s [=top-level traversable/bounce tracking record=].
1. [=list/For each=] |bounceUrl| in |bounceTrackingRecord|'s [=bounce tracking record/bounce set=]:
1. Let |bounceSite| be the result of running [=obtain a site=] given |bounceUrl|.
1. Let |bounceHost| be |bounceSite|'s [=host=].
1. If |bounceHost| [=host/equals=] |firstPartyHost|, [=iteration/continue=].
Expand Down

0 comments on commit 86f7ec7

Please sign in to comment.