From fe5e6f1b1a0ab81a4bd84486438be4b9ed726a7f Mon Sep 17 00:00:00 2001 From: Ian Clelland Date: Thu, 14 May 2020 10:41:50 -0400 Subject: [PATCH] Rename reporting concepts and interfaces --- index.bs | 83 +++++++++++++++++++++++++++++--------------------------- 1 file changed, 43 insertions(+), 40 deletions(-) diff --git a/index.bs b/index.bs index f3377f86..359c5314 100644 --- a/index.bs +++ b/index.bs @@ -655,21 +655,21 @@ partial interface HTMLIFrameElement {

Reporting

-

Feature policy violation reports indicate that some behavior of - the Document has violated a permissions policy. It is up to the - specification of each individual policy-controlled feature to define/determine - when a violation of that - policy has occurred.

+

Permissions policy violation reports indicate that some behavior + of the Document has violated a permissions policy. It is up to + the specification of each individual policy-controlled feature to define what + it means to violate that + policy, and how to determine when such a violation has occurred.

-

Feature policy violation reports have the report type - "feature-policy-violation".

+

Permissions policy violation reports have the report type + "permissions-policy-violation".

-

Feature policy violation reports are visible to +

Permissions policy violation reports are visible to ReportingObservers.

     [Exposed=Window]
-    interface FeaturePolicyViolationReportBody : ReportBody {
+    interface PermissionsPolicyViolationReportBody : ReportBody {
       readonly attribute DOMString featureId;
       readonly attribute DOMString? sourceFile;
       readonly attribute long? lineNumber;
@@ -678,36 +678,39 @@ partial interface HTMLIFrameElement {
     };
   
- A feature policy violation report's [=report/body=], represented in - JavaScript by {{FeaturePolicyViolationReportBody}}, contains the following + A permissions policy violation report's [=report/body=], represented in + JavaScript by {{PermissionsPolicyViolationReportBody}}, contains the following fields: - - featureId: The string - identifying the policy-controlled feature whose policy has been - violated. This string can be used for grouping and counting related - reports. + - featureId: The + string identifying the policy-controlled feature whose policy has + been violated. This string can be used for grouping and counting + related reports. - - sourceFile: If known, - the file where the violation occured, or null otherwise. + - sourceFile: If + known, the file where the violation occured, or null otherwise. - - lineNumber: If known, - the line number in [=FeaturePolicyViolationReportBody/sourceFile=] where - the violation occured, or null otherwise. + - lineNumber: If + known, the line number in + [=PermissionsPolicyViolationReportBody/sourceFile=] where the + violation occured, or null otherwise. - - columnNumber: If known, - the column number in [=FeaturePolicyViolationReportBody/sourceFile=] where - the violation occured, or null otherwise. + - columnNumber: If + known, the column number in + [=PermissionsPolicyViolationReportBody/sourceFile=] where the + violation occured, or null otherwise. - - disposition: A string - indicating whether the violated permissions policy was enforced in - this case. [=FeaturePolicyViolationReportBody/disposition=] will be set to + - disposition: A + string indicating whether the violated permissions policy was + enforced in this case. + [=PermissionsPolicyViolationReportBody/disposition=] will be set to "enforce" if the policy was enforced, or "report" if the violation resulted only in this report being generated (with no further action taken by the user agent in response to the violation). Note: There is currently no mechanism in place for enabling report-only - mode, so [=FeaturePolicyViolationReportBody/disposition=] will always be - set to "enforce". + mode, so [=PermissionsPolicyViolationReportBody/disposition=] will always + be set to "enforce".
@@ -1021,38 +1024,38 @@ partial interface HTMLIFrameElement {
-

Generate report for violation of +

Generate report for violation of permissions policy on |settings|

Given a feature (|feature|), an environment settings object (|settings|), and an optional string (|group|), this algorithm generates a report about the violation of the policy for |feature|.

- 1. Let |body| be a new {{FeaturePolicyViolationReportBody}}, initialized + 1. Let |body| be a new {{PermissionsPolicyViolationReportBody}}, initialized as follows: - : [=FeaturePolicyViolationReportBody/featureId=] + : [=PermissionsPolicyViolationReportBody/featureId=] :: |feature|'s string representation. - : [=FeaturePolicyViolationReportBody/sourceFile=] + : [=PermissionsPolicyViolationReportBody/sourceFile=] :: null - : [=FeaturePolicyViolationReportBody/lineNumber=] + : [=PermissionsPolicyViolationReportBody/lineNumber=] :: null - : [=FeaturePolicyViolationReportBody/columnNumber=] + : [=PermissionsPolicyViolationReportBody/columnNumber=] :: null - : [=FeaturePolicyViolationReportBody/disposition=] + : [=PermissionsPolicyViolationReportBody/disposition=] :: "enforce" 2. If the user agent is currently executing script, and can extract the source file's URL, line number, and column number from |settings|, then - set |body|'s [=FeaturePolicyViolationReportBody/sourceFile=], - [=FeaturePolicyViolationReportBody/lineNumber=], and - [=FeaturePolicyViolationReportBody/columnNumber=] accordingly. + set |body|'s [=PermissionsPolicyViolationReportBody/sourceFile=], + [=PermissionsPolicyViolationReportBody/lineNumber=], and + [=PermissionsPolicyViolationReportBody/columnNumber=] accordingly. 3. If |group| is omitted, set |group| to "default". 4. Execute [[reporting#queue-report]] with |body|, - "feature-policy-violation", |group|, and |settings|. + "permissions-policy-violation", |group|, and |settings|. Note: This algorithm should be called when a permissions policy has been violated.