fixes dereferencing on an immutable reference (#31864)

This commit is contained in:
Aarya Khandelwal 2024-03-26 14:07:44 +05:30 committed by GitHub
parent 585e0d69cd
commit f7669b5238
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
32 changed files with 76 additions and 77 deletions

View file

@ -1079,7 +1079,7 @@ impl Document {
return;
}
self.request_focus(
self.GetBody().as_ref().map(|e| &*e.upcast()),
self.GetBody().as_ref().map(|e| e.upcast()),
FocusType::Element,
)
}
@ -1837,7 +1837,7 @@ impl Document {
pub fn ime_dismissed(&self) {
self.request_focus(
self.GetBody().as_ref().map(|e| &*e.upcast()),
self.GetBody().as_ref().map(|e| e.upcast()),
FocusType::Element,
)
}
@ -5264,7 +5264,7 @@ impl DocumentMethods for Document {
// media element matching the given id.
fn ServoGetMediaControls(&self, id: DOMString) -> Fallible<DomRoot<ShadowRoot>> {
match self.media_controls.borrow().get(&*id) {
Some(m) => Ok(DomRoot::from_ref(&*m)),
Some(m) => Ok(DomRoot::from_ref(m)),
None => Err(Error::InvalidAccess),
}
}