Bug 1643798 - Fix feature policy check for fullscreen so that it gets reflected properly in document.fullscreenEnabled. r=baku
See bug 1606660 comment 8 as to why checking it only in Element.requestFullscreen is wrong. Do you know how to test this? I'm not very familiar with feature-policy. Differential Revision: https://phabricator.services.mozilla.com/D78567
This commit is contained in:
@@ -3100,10 +3100,8 @@ static const char* GetFullscreenError(CallerType aCallerType,
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// Ensure feature policy allows using the fullscreen API
|
||||
if (!FeaturePolicyUtils::IsFeatureAllowed(aDocument,
|
||||
NS_LITERAL_STRING("fullscreen"))) {
|
||||
return "FullscreenDeniedFeaturePolicy";
|
||||
if (const char* error = aDocument->GetFullscreenError(aCallerType)) {
|
||||
return error;
|
||||
}
|
||||
|
||||
// Bypass user interaction checks if preference is set
|
||||
|
||||
Reference in New Issue
Block a user