Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cross origin opener policy reporting #5518

Merged
73 changes: 51 additions & 22 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -79948,8 +79948,8 @@ interface <dfn>BarProp</dfn> {

<li><p><span data-x="coop-check-access-report">Check if an access between two browsing contexts
should be reported</span>, given the <span>current global object</span>'s <span>browsing
context</span>, <var>W</var>'s <span>browsing context</span>, <var>P</var>, the <span>current
global object</span> and the <span>current settings object</span>.</p></li>
context</span>, <var>W</var>'s <span>browsing context</span>, <var>P</var>,
and the <span>current settings object</span>.</p></li>
domenic marked this conversation as resolved.
Show resolved Hide resolved

<li><p>If ! <span>IsPlatformObjectSameOrigin</span>(<var>W</var>) is true, then return ?
<span>OrdinarySet</span>(<b>this</b>, <var>P</var>, <var>V</var>, <var>Receiver</var>).</p></li>
Expand Down Expand Up @@ -81414,7 +81414,7 @@ interface <dfn>BarProp</dfn> {
<p>To <dfn data-x="coop-check-access-report">check if an access between two browsing contexts
should be reported</dfn>, given two <span data-x="browsing context">browsing contexts</span>
<var>accessor</var> and <var>accessed</var>, a JavaScript property name
<var>P</var>, and an <span>environment</span> <var>environment</var>:</p>
<var>P</var>, and an <span>environment settings object</span> <var>environment</var>:</p>
domenic marked this conversation as resolved.
Show resolved Hide resolved

<ol>
<li><p>If <var>P</var> is not part of <span>CrossOriginProperties</span>, then return.</p></li>
domenic marked this conversation as resolved.
Show resolved Hide resolved
Expand Down Expand Up @@ -81510,6 +81510,11 @@ interface <dfn>BarProp</dfn> {
<var>coopValue</var> to <var>coop</var>'s <span
data-x="coop-struct-report-only-value">report-only value</span>.</p></li>

<li><p>Let <var>serializedReferrer</var> be an empty string</p></li>

<li><p>If <var>referrer</var> is a <span>URL</span>, set <var>serializedReferrer</var> to the
<span data-x="concept-url-serializer">serialization</span> of <var>referrer</var>.

<li>
<p>Let <var>body</var> be a new object containing the following properties:</p>

Expand Down Expand Up @@ -81537,11 +81542,11 @@ interface <dfn>BarProp</dfn> {
</tr>
<tr>
domenic marked this conversation as resolved.
Show resolved Hide resolved
<td>referrer</td>
<td><var>referrer</var></td>
<td><var>serializedReferrer</var></td>
</tr>
<tr>
<td>type</td>
<td><code data-x="">navigation-to-response</code></td>
<td>"<code data-x="">navigation-to-response</code>"</td>
</tr>
</tbody>
</table>
Expand Down Expand Up @@ -81598,7 +81603,7 @@ interface <dfn>BarProp</dfn> {
</tr>
<tr>
<td>type</td>
<td><code data-x="">navigation-to-response</code></td>
<td>"<code data-x="">navigation-to-response</code>"</td>
</tr>
</tbody>
</table>
Expand Down Expand Up @@ -81696,6 +81701,11 @@ interface <dfn>BarProp</dfn> {
<li><p>Let <var>sourceFile</var>, <var>lineNumber</var> and <var>columnNumber</var> be the
relevant script URL and problematic position which triggered this report.</p></li>

<li><p>Let <var>serializedReferrer</var> be an empty string</p></li>

<li><p>If <var>referrer</var> is a <span>URL</span>, set <var>serializedReferrer</var> to the
<span data-x="concept-url-serializer">serialization</span> of <var>referrer</var>.

<li>
<p>Let <var>body</var> be a new object containing the following properties:</p>

Expand Down Expand Up @@ -81728,7 +81738,7 @@ interface <dfn>BarProp</dfn> {
</tr>
<tr>
<td>referrer</td>
<td><var>referrer</var></td>
<td><var>serializedReferrer</var></td>
</tr>
<tr>
<td>sourceFile</td>
Expand All @@ -81744,7 +81754,7 @@ interface <dfn>BarProp</dfn> {
</tr>
<tr>
<td>type</td>
<td><code data-x="">access-to-opener</code></td>
<td>"<code data-x="">access-to-opener</code>"</td>
</tr>
</tbody>
</table>
Expand Down Expand Up @@ -81817,7 +81827,7 @@ interface <dfn>BarProp</dfn> {
</tr>
<tr>
<td>type</td>
<td><code data-x="">access-to-opener</code></td>
<td>"<code data-x="">access-to-opener</code>"</td>
</tr>
</tbody>
</table>
Expand Down Expand Up @@ -81884,7 +81894,7 @@ interface <dfn>BarProp</dfn> {
</tr>
<tr>
<td>type</td>
<td><code data-x="">access-to-opener</code></td>
<td>"<code data-x="">access-to-opener</code>"</td>
</tr>
</tbody>
</table>
Expand All @@ -81906,6 +81916,11 @@ interface <dfn>BarProp</dfn> {
<li><p>If <var>coop</var>'s <span data-x="coop-struct-report-endpoint">reporting endpoint</span>
is null, return.</p></li>

<li><p>Let <var>serializedReferrer</var> be an empty string</p></li>

<li><p>If <var>referrer</var> is a <span>URL</span>, set <var>serializedReferrer</var> to the
<span data-x="concept-url-serializer">serialization</span> of <var>referrer</var>.

<li>
<p>Let <var>body</var> be a new object containing the following properties:</p>

Expand Down Expand Up @@ -81938,11 +81953,11 @@ interface <dfn>BarProp</dfn> {
</tr>
<tr>
<td>referrer</td>
<td><var>referrer</var></td>
<td><var>serializedReferrer</var></td>
</tr>
<tr>
<td>type</td>
<td><code data-x="">access-to-opener</code></td>
<td>"<code data-x="">access-to-opener</code>"</td>
</tr>
</tbody>
</table>
Expand Down Expand Up @@ -82002,7 +82017,7 @@ interface <dfn>BarProp</dfn> {
</tr>
<tr>
<td>type</td>
<td><code data-x="">access-to-opener</code></td>
<td>"<code data-x="">access-to-opener</code>"</td>
</tr>
</tbody>
</table>
Expand Down Expand Up @@ -84312,10 +84327,17 @@ interface <dfn>Location</dfn> { // but see also <a href="#the-location-interface

<li><p>Let <var>coop</var> be a new <span>cross-origin opener policy</span>.</p></li>

<li><p>Let <var>coopEnforcementResult</var> be a new is a new <span
data-x="coop-enforcement-result">cross-origin opener policy enforcement result</span> given
false, false, <var>resource</var>'s <span data-x="concept-response-url">url</span>,
<var>responseOrigin</var>, <var>coop</var> and false.</p></li>
<li><p>Let <var>coopEnforcementResult</var> be a new <span
data-x="coop-enforcement-result">cross-origin opener policy enforcement result</span> whose
<span data-x="coop-enforcement-bcg-switch">needs a browsing context group switch</span> is
false, <span data-x="coop-enforcement-bcg-switch-report-only">would need a browsing context
group switch due to report-only</span> is false,<span
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing space

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

data-x="coop-enforcement-url">url</span> is <var>resource</var>'s <span
data-x="concept-response-url">url</span>, <span data-x="coop-enforcement-origin">origin</span>
is <var>responseOrigin</var>, <span
data-x="coop-enforcement-coop">cross-origin opener policy</span> is <var>coop</var>, and
<span data-x="coop-enforcement-source">current context is navigation source</span> is
false.</p></li>

<li><p>Let <var>navigationParams</var> be a new <span>navigation params</span> whose <span
data-x="navigation-params-request">request</span> is null, <span
Expand Down Expand Up @@ -84353,11 +84375,18 @@ interface <dfn>Location</dfn> { // but see also <a href="#the-location-interface
<var>browsingContext</var>'s <span data-x="concept-bc-sandboxing-flags">sandboxing
flags</span> and <var>response</var>'s <span>forced sandboxing flag set</span>.</p></li>

<li><p>Let <var>coopEnforcementResult</var> be a new is a new <span
data-x="coop-enforcement-result">cross-origin opener policy enforcement result</span> given
false, false, <var>resource</var>'s <span data-x="concept-request-url">url</span>,
<var>activeDocumentNavigationOrigin</var>, <var>browsingContext</var>'s <span>active
document</span>'s <span data-x="concept-document-coop">cross-origin opener policy</span> and
<li><p>Let <var>coopEnforcementResult</var> be a new <span
data-x="coop-enforcement-result">cross-origin opener policy enforcement result</span> whose
<span data-x="coop-enforcement-bcg-switch">needs a browsing context group switch</span> is
false, <span data-x="coop-enforcement-bcg-switch-report-only">would need a browsing context
group switch due to report-only</span> is false,<span
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing space

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

data-x="coop-enforcement-url">url</span> is <var>resource</var>'s <span
data-x="concept-request-url">url</span>, <span data-x="coop-enforcement-origin">origin</span>
is <var>activeDocumentNavigationOrigin</var>, <span
data-x="coop-enforcement-coop">cross-origin opener policy</span> is
<var>browsingContext</var>'s <span>active document</span>'s <span
data-x="concept-document-coop">cross-origin opener policy</span>, and <span
data-x="coop-enforcement-source">current context is navigation source</span> is
false.</p></li>

<li><p>Let <var>navigationParams</var> be a new <span>navigation params</span> whose <span
Expand Down