diff options
author | Bobby Holley <bobbyholley@gmail.com> | 2015-11-20 09:51:05 -0800 |
---|---|---|
committer | Bobby Holley <bobbyholley@gmail.com> | 2015-11-28 18:01:02 -0800 |
commit | cf33f00018c7dc44a09086d6bb68b253153635ae (patch) | |
tree | efa655a0967756601963042f0b321e18ed37ed02 /components/layout/layout_task.rs | |
parent | 77a80919967446639141321ba83b3b0b6d1d1665 (diff) | |
download | servo-cf33f00018c7dc44a09086d6bb68b253153635ae.tar.gz servo-cf33f00018c7dc44a09086d6bb68b253153635ae.zip |
Generalize the rest of layout to operate on generic Layout*.
There wasn't a good way to split this up, unfortunately.
With this change, the only remaining usage of the Servo-specific structures is
in layout_task, where the root node is received from the script task. \o/
Diffstat (limited to 'components/layout/layout_task.rs')
-rw-r--r-- | components/layout/layout_task.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/components/layout/layout_task.rs b/components/layout/layout_task.rs index 9aac21f7a88..cf7ca56da00 100644 --- a/components/layout/layout_task.rs +++ b/components/layout/layout_task.rs @@ -758,7 +758,7 @@ impl LayoutTask { possibly_locked_rw_data.block(rw_data); } - fn try_get_layout_root(&self, node: ServoLayoutNode) -> Option<FlowRef> { + fn try_get_layout_root<'ln, N: LayoutNode<'ln>>(&self, node: N) -> Option<FlowRef> { let mut layout_data_ref = node.mutate_layout_data(); let layout_data = match layout_data_ref.as_mut() { @@ -1271,7 +1271,7 @@ impl LayoutTask { } } - unsafe fn dirty_all_nodes(node: ServoLayoutNode) { + unsafe fn dirty_all_nodes<'ln, N: LayoutNode<'ln>>(node: N) { for node in node.traverse_preorder() { // TODO(cgaebel): mark nodes which are sensitive to media queries as // "changed": |