mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Use internal mutability for Document::{quirks_mode, encoding_name}.
This commit is contained in:
parent
e9b64dc361
commit
23a6b6823b
2 changed files with 16 additions and 16 deletions
|
@ -1284,8 +1284,8 @@ impl Node {
|
|||
match node.type_id() {
|
||||
DocumentNodeTypeId => {
|
||||
let node_doc: &JSRef<Document> = DocumentCast::to_ref(node).unwrap();
|
||||
let copy_doc: &mut JSRef<Document> = DocumentCast::to_mut_ref(&mut *copy).unwrap();
|
||||
copy_doc.set_encoding_name(node_doc.encoding_name.clone());
|
||||
let copy_doc: &JSRef<Document> = DocumentCast::to_ref(&*copy).unwrap();
|
||||
copy_doc.set_encoding_name(node_doc.encoding_name.deref().borrow().clone());
|
||||
copy_doc.set_quirks_mode(node_doc.quirks_mode());
|
||||
},
|
||||
ElementNodeTypeId(..) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue