mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
parent
d34641dc3f
commit
e4db0715e1
2 changed files with 28 additions and 1 deletions
|
@ -317,7 +317,7 @@ impl CompositorLayer for Layer<CompositorData> {
|
|||
// Allow children to scroll.
|
||||
let scroll_offset = self.extra_data.borrow().scroll_offset;
|
||||
let new_cursor = cursor - scroll_offset;
|
||||
for child in &*self.children() {
|
||||
for child in self.children().iter().rev() {
|
||||
let child_bounds = child.bounds.borrow();
|
||||
if child_bounds.contains(&new_cursor) {
|
||||
let result = child.handle_scroll_event(delta, new_cursor - child_bounds.origin);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue