Find
C
ase-sensitive
R
egexp search
Path
Showing
a4d4f7ec
from
2026-09-21
:
Merge autoland to mozilla-central
firefox-main
/
dom
/
security
/
permissionspolicy
Navigation
Enable keyboard shortcuts
Revision control
Coverage:
100 %
2026-09-14
:
100 %
2026-09-14
:
100 %
2026-09-14
:
100 %
2026-09-16
:
100 %
2026-09-17
:
100 %
2026-09-17
:
100 %
2026-09-18
:
100 %
2026-09-18
:
100 %
2026-09-18
:
100 %
2026-09-18
:
100 %
2026-09-18
:
100 %
2026-09-19
:
100 %
2026-09-19
:
100 %
2026-09-20
:
100 %
2026-09-20
:
100 %
2026-09-21
:
100 %
2026-09-21
:
100 %
Name
Description
Size
Coverage
Feature.cpp
1719
-
Feature.h
1248
-
fuzztest
-
moz.build
919
-
PermissionsPolicy.cpp
12429
-
PermissionsPolicy.h
PermissionsPolicy ~~~~~~~~~~~~~ Each document and each HTMLIFrameElement have a PermissionsPolicy object which is used to allow or deny features in their contexts. PermissionsPolicy is composed by a set of directives configured by the 'Permissions-Policy' HTTP Header and the 'allow' attribute in HTMLIFrameElements. Both header and attribute are parsed by the PermissionsPolicyParser, which returns an array of Feature objects. Each Feature object has a feature name and one of these policies: - eNone - the feature is fully disabled. - eAll - the feature is allowed. - eAllowList - the feature is allowed for a list of origins. An interesting element of PermissionsPolicy is the inheritance: each context inherits the permissions-policy directives from the parent context, if it exists. When a context inherits a policy for feature X, it only knows if that feature is allowed or denied (it ignores the list of allowed origins for instance). This information is stored in an array of inherited feature strings because we care only to know when they are denied. PermissionsPolicy can be reset if the 'allow' or 'src' attributes change in HTMLIFrameElements. 'src' attribute is important to compute correcly the features via PermissionsPolicy 'src' keyword. When PermissionsPolicy must decide if feature X is allowed or denied for the current origin, it checks if the parent context denied that feature. If not, it checks if there is a Feature object for that feature named X and if the origin is allowed or not. From a C++ point of view, use PermissionsPolicyUtils to obtain the list of features and to check if they are allowed in the current context. dom.security.permissionsPolicy.header.enabled pref can be used to disable the HTTP header support.
8633
100 %
PermissionsPolicyParser.cpp
static
8016
-
PermissionsPolicyParser.h
1250
-
PermissionsPolicyUtils.cpp
IMPORTANT: Do not change this list without review from a DOM peer _AND_ a DOM Security peer!
9468
-
PermissionsPolicyUtils.h
2756
-
test
-