1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
|
{
// All document policy (https://w3c.github.io/webappsec-feature-policy/document-policy.html)
// features are defined here.
// All Features have to be defined in FeaturePolicyFeature enum as well
// (defined in third_party/blink/public/mojom/feature_policy/feature_policy.mojom).
// The enum value has to have the same name as the feature name here.
parameters: {
// document_policy_name: "FEATURE_NAME" is used to specify the policy name
// which gets parsed from the header or the policy attribute.
document_policy_name: {},
// value type allowed in mojom::PolicyValueType which is defined in
// third_party/blink/public/mojom/feature_policy/policy_value.mojom.
value_type: {},
// valid c++ expression strings, e.g. true/false, 1.0, -1.
// or use reserved keyword 'min'/'max'.
default_value: {},
// "depends_on" specifies relationship to runtime features defined
// in "runtime_enabled_features.json5":
// depends_on: ["feature1", "feature2", ...]
// * If the depends_on features are *only* runtime features, the feature is
// available if any of the runtime features are enabled.
// * If the depends_on list includes origin trial features, the feature is
// available if any of the origin trial features are enabled.
depends_on: {
default: [],
valid_type: "list",
},
},
data: [
{
name: "Default",
document_policy_name: "*",
value_type: "Bool",
default_value: "true",
depends_on: []
},
{
name: "FontDisplay",
document_policy_name: "font-display-late-swap",
value_type: "Bool",
default_value: "true",
depends_on: ["ExperimentalProductivityFeatures"],
},
{
name: "LosslessImagesMaxBpp",
document_policy_name: "lossless-images-max-bpp",
value_type: "DecDouble",
default_value: "max",
depends_on: ["UnoptimizedImagePolicies"],
},
{
// The ForceLoadAtTop policy lets pages opt-out of scrolling that
// automatically happens on page load. This includes fragment scrolls,
// text fragment scrolls (i.e. this provides an opt-out for the Scroll To
// Text feature), and scroll restoration.
name: "ForceLoadAtTop",
document_policy_name: "force-load-at-top",
value_type: "Bool",
default_value: "false",
},
{
name: "LosslessImagesStrictMaxBpp",
document_policy_name: "lossless-images-strict-max-bpp",
value_type: "DecDouble",
default_value: "max",
depends_on: ["UnoptimizedImagePolicies"],
},
{
name: "LossyImagesMaxBpp",
document_policy_name: "lossy-images-max-bpp",
value_type: "DecDouble",
default_value: "max",
depends_on: ["UnoptimizedImagePolicies"],
},
{
name: "OversizedImages",
document_policy_name: "oversized-images",
value_type: "DecDouble",
default_value: "max",
depends_on: ["UnoptimizedImagePolicies"],
},
{
name: "UnsizedMedia",
document_policy_name: "unsized-media",
value_type: "Bool",
default_value: "true",
depends_on: ["UnsizedMediaPolicy"],
},
{
name: "LayoutAnimations",
document_policy_name: "layout-animations",
value_type: "Bool",
default_value: "true",
depends_on: ["ExperimentalProductivityFeatures"],
},
{
name: "DocumentWrite",
document_policy_name: "document-write",
value_type: "Bool",
default_value: "true",
depends_on: ["ExperimentalProductivityFeatures"],
},
{
name: "SyncScript",
document_policy_name: "sync-script",
value_type: "Bool",
default_value: "true",
depends_on: ["ExperimentalProductivityFeatures"],
},
],
}
|