mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
layout: When setting post-layout / renderer scroll offsets limit by scroll area (#37829)
Previously when scroll offsets were restored to a new scroll tree post-layout or when receiving scroll offsets from the compositor, they were not clamped to the available scroll area. This change fixes that. Testing: This change fixes some WPT subtests. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
parent
ec6ac0fced
commit
0db02702e7
2 changed files with 1 additions and 28 deletions
|
@ -397,7 +397,7 @@ impl ScrollTree {
|
|||
for node in self.nodes.iter_mut() {
|
||||
if let SpatialTreeNodeInfo::Scroll(ref mut scroll_info) = node.info {
|
||||
if let Some(offset) = offsets.get(&scroll_info.external_id) {
|
||||
scroll_info.offset = *offset;
|
||||
scroll_info.scroll_to_offset(*offset, ScrollType::Script);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue