mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Remove most RootedReference uses
We can replace all uses of RootedReference for Option<T> by Option::deref calls.
This commit is contained in:
parent
7bdfad92a5
commit
5fe5e5d6de
34 changed files with 186 additions and 185 deletions
|
@ -5,7 +5,7 @@
|
|||
use crate::dom::bindings::codegen::Bindings::DocumentBinding::DocumentMethods;
|
||||
use crate::dom::bindings::codegen::Bindings::HTMLHeadElementBinding;
|
||||
use crate::dom::bindings::inheritance::Castable;
|
||||
use crate::dom::bindings::root::{DomRoot, RootedReference};
|
||||
use crate::dom::bindings::root::DomRoot;
|
||||
use crate::dom::document::{determine_policy_for_token, Document};
|
||||
use crate::dom::element::Element;
|
||||
use crate::dom::htmlelement::HTMLElement;
|
||||
|
@ -49,7 +49,7 @@ impl HTMLHeadElement {
|
|||
pub fn set_document_referrer(&self) {
|
||||
let doc = document_from_node(self);
|
||||
|
||||
if doc.GetHead().r() != Some(self) {
|
||||
if doc.GetHead().deref() != Some(self) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -65,7 +65,7 @@ impl HTMLHeadElement {
|
|||
});
|
||||
|
||||
for meta in candidates {
|
||||
if let Some(content) = meta.get_attribute(&ns!(), &local_name!("content")).r() {
|
||||
if let Some(ref content) = meta.get_attribute(&ns!(), &local_name!("content")) {
|
||||
let content = content.value();
|
||||
let content_val = content.trim();
|
||||
if !content_val.is_empty() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue