mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
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/
This commit is contained in:
parent
77a8091996
commit
cf33f00018
10 changed files with 198 additions and 156 deletions
|
@ -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":
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue