More detach shadow changes

This commit is contained in:
Fernando Jiménez Moreno 2019-06-18 12:36:25 +02:00
parent d4be72d386
commit ef02196dd8
5 changed files with 32 additions and 9 deletions

View file

@ -1787,8 +1787,8 @@ impl HTMLMediaElement {
}
fn remove_controls(&self) {
if let Some(ref id) = *self.media_controls_id.borrow() {
document_from_node(self).unregister_media_controls(id);
if let Some(id) = self.media_controls_id.borrow_mut().take() {
document_from_node(self).unregister_media_controls(&id);
}
}
}