script: Implement Range::getClientRects and Range::getBoundingClientRect (#35993)

* Add doc comments to boundary point

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

* Allow querying content box of text fragments

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

* Implement Range::getBoundingClientRect

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

* Update WPT expectations

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

---------

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
This commit is contained in:
Simon Wülker 2025-03-19 09:33:11 +01:00 committed by GitHub
parent 07e06f5635
commit 6be7612d16
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 73 additions and 29 deletions

View file

@ -94,10 +94,13 @@ impl AbstractRangeMethods<crate::DomTypeHolder> for AbstractRange {
}
}
/// <https://dom.spec.whatwg.org/#concept-range-bp>
#[derive(DenyPublicFields, JSTraceable, MallocSizeOf)]
#[cfg_attr(crown, crown::unrooted_must_root_lint::must_root)]
pub(crate) struct BoundaryPoint {
/// <https://dom.spec.whatwg.org/#boundary-point-node>
node: MutDom<Node>,
/// <https://dom.spec.whatwg.org/#concept-range-bp-offset>
offset: Cell<u32>,
}