mirror of
https://github.com/servo/servo.git
synced 2025-07-24 15:50:21 +01:00
Properly handle scroll offsets in hit testing
Scroll roots are no longer nested containers holding items, so instead we need to track the offsets of each, carefully handling fixed position items and stacking contexts that create new reference frames. Additionally, we remove the complexity of the pre-computed page scroll offset, instead opting to send script scrolls to the layout task in order to more quickly have a ScrollState there that matches the script's idea of the scroll world. Fixes #16405.
This commit is contained in:
parent
7ca393a960
commit
9fd2df5c09
8 changed files with 221 additions and 178 deletions
|
@ -122,7 +122,7 @@ pub enum LayoutControlMsg {
|
|||
/// Asks layout to run another step in its animation.
|
||||
TickAnimations,
|
||||
/// Tells layout about the new scrolling offsets of each scrollable stacking context.
|
||||
SetStackingContextScrollStates(Vec<StackingContextScrollState>),
|
||||
SetScrollStates(Vec<ScrollState>),
|
||||
/// Requests the current load state of Web fonts. `true` is returned if fonts are still loading
|
||||
/// and `false` is returned if all fonts have loaded.
|
||||
GetWebFontLoadState(IpcSender<bool>),
|
||||
|
@ -673,7 +673,7 @@ pub enum AnimationTickType {
|
|||
|
||||
/// The scroll state of a stacking context.
|
||||
#[derive(Copy, Clone, Debug, Deserialize, Serialize)]
|
||||
pub struct StackingContextScrollState {
|
||||
pub struct ScrollState {
|
||||
/// The ID of the scroll root.
|
||||
pub scroll_root_id: ClipId,
|
||||
/// The scrolling offset of this stacking context.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue