Pass a LayoutNode to LayoutTask::dirty_all_nodes.

There is no point in passing a mutable reference to what is essentially
already a pointer.
This commit is contained in:
Ms2ger 2015-10-25 11:22:27 +01:00
parent 06f9a2bc34
commit ee0b0c81d1

View file

@ -1144,7 +1144,7 @@ impl LayoutTask {
transmute(&mut doc)
};
let mut node: LayoutNode = match doc.root_node() {
let node: LayoutNode = match doc.root_node() {
None => return,
Some(x) => x,
};
@ -1190,7 +1190,7 @@ impl LayoutTask {
let needs_reflow = screen_size_changed && !needs_dirtying;
unsafe {
if needs_dirtying {
LayoutTask::dirty_all_nodes(&mut node);
LayoutTask::dirty_all_nodes(node);
}
}
if needs_reflow {
@ -1466,7 +1466,7 @@ impl LayoutTask {
}
}
unsafe fn dirty_all_nodes(node: &mut LayoutNode) {
unsafe fn dirty_all_nodes(node: LayoutNode) {
for node in node.traverse_preorder() {
// TODO(cgaebel): mark nodes which are sensitive to media queries as
// "changed":