[−][src]Function azul_core::display_list::get_nodes_that_need_scroll_clip
pub fn get_nodes_that_need_scroll_clip(
node_hierarchy: &NodeHierarchy,
display_list_rects: &NodeDataContainer<DisplayRectangle>,
dom_rects: &NodeDataContainer<NodeData>,
layouted_rects: &NodeDataContainer<PositionedRectangle>,
parents: &[(usize, NodeId)],
pipeline_id: PipelineId
) -> ScrolledNodes
Returns all node IDs where the children overflow the parent, together with the
(parent_rect, child_rect)
- the child rect is the sum of the children.
TODO: The performance of this function can be theoretically improved:
- Unioning the rectangles is heavier than just looping through the children and summing up their width / height / padding + margin.
- Scroll nodes only need to be inserted if the parent doesn't have
overflow: hidden
activated - Overflow for X and Y needs to be tracked seperately (for overflow-x / overflow-y separation), so there we'd need to track in which direction the inner_rect is overflowing.