Commit 57c58ccb authored by Sandor Molnar's avatar Sandor Molnar
Browse files

Backed out changeset 558b823bb68b (bug 1741780) on devs request. CLOSED TREE

parent 96d7010b
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -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.
+0 −25
Original line number Diff line number Diff line
@@ -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,