mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Factored out permission_state_invocation_results API to GlobalScope
Instead of Window
This commit is contained in:
parent
ad9bfc2a62
commit
24c14ac94e
3 changed files with 11 additions and 17 deletions
|
@ -143,7 +143,6 @@ impl Permissions {
|
|||
// (Revoke) Step 3.
|
||||
let globalscope = self.global();
|
||||
globalscope
|
||||
.as_window()
|
||||
.permission_state_invocation_results()
|
||||
.borrow_mut()
|
||||
.remove(&root_desc.name.to_string());
|
||||
|
@ -176,7 +175,6 @@ impl Permissions {
|
|||
// (Revoke) Step 3.
|
||||
let globalscope = self.global();
|
||||
globalscope
|
||||
.as_window()
|
||||
.permission_state_invocation_results()
|
||||
.borrow_mut()
|
||||
.remove(&root_desc.name.to_string());
|
||||
|
@ -269,7 +267,6 @@ impl PermissionAlgorithm for Permissions {
|
|||
);
|
||||
|
||||
globalscope
|
||||
.as_window()
|
||||
.permission_state_invocation_results()
|
||||
.borrow_mut()
|
||||
.insert(perm_name.to_string(), state);
|
||||
|
@ -309,7 +306,6 @@ pub fn get_descriptor_permission_state(
|
|||
PermissionState::Granted
|
||||
} else {
|
||||
settings
|
||||
.as_window()
|
||||
.permission_state_invocation_results()
|
||||
.borrow_mut()
|
||||
.remove(&permission_name.to_string());
|
||||
|
@ -323,7 +319,6 @@ pub fn get_descriptor_permission_state(
|
|||
|
||||
// Step 3.
|
||||
if let Some(prev_result) = settings
|
||||
.as_window()
|
||||
.permission_state_invocation_results()
|
||||
.borrow()
|
||||
.get(&permission_name.to_string())
|
||||
|
@ -333,7 +328,6 @@ pub fn get_descriptor_permission_state(
|
|||
|
||||
// Store the invocation result
|
||||
settings
|
||||
.as_window()
|
||||
.permission_state_invocation_results()
|
||||
.borrow_mut()
|
||||
.insert(permission_name.to_string(), state);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue