зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset 558b823bb68b (bug 1741780) on devs request. CLOSED TREE
This commit is contained in:
Родитель
96d7010bce
Коммит
57c58ccb99
|
@ -2178,8 +2178,6 @@ fn add_clip_node_to_current_chain(
|
|||
};
|
||||
}
|
||||
ClipSpaceConversion::Transform(..) => {
|
||||
assert!(spatial_tree.is_ancestor(node.spatial_node_index, prim_spatial_node_index));
|
||||
|
||||
// Map the local clip rect directly into the same space as the picture
|
||||
// surface. This will often be the same space as the clip itself, which
|
||||
// results in a reduction in allocated clip mask size.
|
||||
|
|
|
@ -755,31 +755,6 @@ impl SpatialTree {
|
|||
}
|
||||
}
|
||||
|
||||
/// Check if a given spatial node is an ancestor of another spatial node.
|
||||
pub fn is_ancestor(
|
||||
&self,
|
||||
maybe_parent: SpatialNodeIndex,
|
||||
maybe_child: SpatialNodeIndex,
|
||||
) -> bool {
|
||||
// Early out if same node
|
||||
if maybe_parent == maybe_child {
|
||||
return false;
|
||||
}
|
||||
|
||||
let mut current_node = maybe_child;
|
||||
|
||||
while current_node != self.root_reference_frame_index {
|
||||
let node = self.get_node_info(current_node);
|
||||
current_node = node.parent.expect("bug: no parent");
|
||||
|
||||
if current_node == maybe_parent {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
false
|
||||
}
|
||||
|
||||
fn visit_node_impl_mut<F>(
|
||||
&mut self,
|
||||
index: SpatialNodeIndex,
|
||||
|
|
Загрузка…
Ссылка в новой задаче