Skip to content

Consider scroll offset in getBoundingBox() #35768

Closed
web-platform-tests/wpt
#54044

Description

@stevennovaryo

In getting the bounding box, currently it is only evaluates rectangle that is the output of box tree layout() "as is". But it will need to consider scroll offset of scrollable ancestor in containing block chain.

/// Get the vector of rectangles that surrounds the fragments of the node with the given address.
/// This function answers the `getClientRects()` query and the union of the rectangles answers
/// the `getBoundingClientRect()` query.
///
/// TODO: This function is supposed to handle scroll offsets, but that isn't happening at all.
pub fn get_content_boxes_for_node(&self, requested_node: OpaqueNode) -> Vec<Rect<Au>> {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions