mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
script: When using WebRender, keep the DOM-side scroll positions for
elements with `overflow: scroll` up to date, and take them into account when doing hit testing. Closes #11648.
This commit is contained in:
parent
ce88b8ed30
commit
041cfe6d0a
14 changed files with 259 additions and 47 deletions
|
@ -1686,13 +1686,18 @@ impl BlockFlowDisplayListBuilding for BlockFlow {
|
|||
return parent_id;
|
||||
}
|
||||
|
||||
let stacking_context_id =
|
||||
let has_scrolling_overflow = self.has_scrolling_overflow();
|
||||
let stacking_context_id = if has_scrolling_overflow {
|
||||
StackingContextId::new_outer(self.fragment.fragment_type())
|
||||
} else {
|
||||
StackingContextId::new_of_type(self.fragment.node.id() as usize,
|
||||
self.fragment.fragment_type());
|
||||
self.fragment.fragment_type())
|
||||
};
|
||||
self.base.stacking_context_id = stacking_context_id;
|
||||
|
||||
let inner_stacking_context_id = if self.has_scrolling_overflow() {
|
||||
StackingContextId::new_of_type(self.base.flow_id(), self.fragment.fragment_type())
|
||||
let inner_stacking_context_id = if has_scrolling_overflow {
|
||||
StackingContextId::new_of_type(self.fragment.node.id() as usize,
|
||||
self.fragment.fragment_type())
|
||||
} else {
|
||||
stacking_context_id
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue