mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-23 10:50:49 +00:00
LibWeb: Implement Range's extension method
This patch implements `Range::getClientRects` and `Range::getBoundingClientRect`. Since the rects returned by invoking getClientRects can be accessed without adding them to the Selection, `ViewportPaintable::recompute_selection_states` has been updated to accept a Range as a parameter, rather than acquiring it through the Document's Selection. With this change, the following tests now pass: - wpt[css/cssom-view/range-bounding-client-rect-with-nested-text.html] - wpt[css/cssom-view/DOMRectList.html] Note: The test "css/cssom-view/range-bounding-client-rect-with-display-contents.html" still fails due to an issue with Element::getClientRects, which will be addressed in a future commit.
This commit is contained in:
parent
a3472aef24
commit
75c7dbc5d2
Notes:
github-actions[bot]
2024-09-20 17:59:18 +00:00
Author: https://github.com/An-n-ya
Commit: 75c7dbc5d2
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1417
Reviewed-by: https://github.com/kalenikaliaksandr
12 changed files with 225 additions and 38 deletions
|
@ -1194,7 +1194,7 @@ void Document::update_layout()
|
|||
page().client().page_did_layout();
|
||||
}
|
||||
|
||||
paintable()->recompute_selection_states();
|
||||
paintable()->update_selection();
|
||||
|
||||
m_needs_layout = false;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue