blob: eef47dc127f13c7a15298212867c96c9ed04a2d0 [file] [log] [blame]
{
// 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_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: "FontDisplay",
document_policy_name: "font-display-late-swap",
value_name: "",
value_type: "Bool",
default_value: "true",
depends_on: ["ExperimentalProductivityFeatures"],
},
{
name: "UnoptimizedLosslessImages",
document_policy_name: "unoptimized-lossless-images",
value_name: "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_name: "",
value_type: "Bool",
default_value: "false",
},
{
name: "UnoptimizedLosslessImagesStrict",
document_policy_name: "unoptimized-lossless-images-strict",
value_name: "bpp",
value_type: "DecDouble",
default_value: "max",
depends_on: ["UnoptimizedImagePolicies"],
},
{
name: "UnoptimizedLossyImages",
document_policy_name: "unoptimized-lossy-images",
value_name: "bpp",
value_type: "DecDouble",
default_value: "max",
depends_on: ["UnoptimizedImagePolicies"],
},
{
name: "OversizedImages",
document_policy_name: "oversized-images",
value_name: "scale",
value_type: "DecDouble",
default_value: "max",
depends_on: ["UnoptimizedImagePolicies"],
},
{
name: "UnsizedMedia",
document_policy_name: "unsized-media",
value_name: "",
value_type: "Bool",
default_value: "true",
depends_on: ["UnsizedMediaPolicy"],
},
{
name: "LayoutAnimations",
document_policy_name: "layout-animations",
value_name: "",
value_type: "Bool",
default_value: "true",
depends_on: ["ExperimentalProductivityFeatures"],
},],
}