mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Don't create unneeded temporaries in style traversals.
This commit is contained in:
parent
d1090065f7
commit
9b8eac000f
2 changed files with 7 additions and 19 deletions
|
@ -17,12 +17,7 @@ pub fn traverse_dom<N, C>(root: N,
|
|||
C: DomTraversalContext<N>
|
||||
{
|
||||
debug_assert!(context.should_process(node));
|
||||
let should_stop = match context.process_preorder(node) {
|
||||
RestyleResult::Stop => true,
|
||||
RestyleResult::Continue => false,
|
||||
};
|
||||
|
||||
if !should_stop {
|
||||
if let RestyleResult::Continue = context.process_preorder(node) {
|
||||
for kid in node.children() {
|
||||
context.pre_process_child_hook(node, kid);
|
||||
if context.should_process(kid) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue