mirror of
https://github.com/servo/servo.git
synced 2025-09-30 00:29:14 +01:00
script: Remove absolute positioning workaround from scrollIntoView
implementation (#39441)
This isn't needed as the border box query already takes into account the containing block chain. Instead, consistently calculate the new scroll position for a scroller relative to its current scroll offset. In addition, fix a small bug where the border of a scroll container was considered part of scrollport. Testing: A new WPT test is added. Signed-off-by: Martin Robinson <mrobinson@igalia.com> Co-authored-by: Oriol Brufau <obrufau@igalia.com>
This commit is contained in:
parent
16d2e030eb
commit
c63311af02
5 changed files with 104 additions and 119 deletions
|
@ -956,6 +956,11 @@ impl Node {
|
|||
.box_area_query(self, BoxAreaType::Border)
|
||||
}
|
||||
|
||||
pub(crate) fn padding_box(&self) -> Option<Rect<Au>> {
|
||||
self.owner_window()
|
||||
.box_area_query(self, BoxAreaType::Padding)
|
||||
}
|
||||
|
||||
pub(crate) fn border_boxes(&self) -> Vec<Rect<Au>> {
|
||||
self.owner_window()
|
||||
.box_areas_query(self, BoxAreaType::Border)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue