mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Fix several bugs related to scrolling
* scrollLeft/scrollTop returned values of parent or even document root Only the scroll of the node itself is returned. Otherwise 0.0. * Scrolling via script had set viewport. This resulted in other nodes appearing scrolled. Now scroll_offsets are updated with correct node id. These bugs caused other odd behavior like both body and document.documentElement being scrolled or the view for scrolled elements jumping.
This commit is contained in:
parent
effd6f2f87
commit
284cb8aae8
6 changed files with 33 additions and 25 deletions
|
@ -703,6 +703,7 @@ impl Document {
|
|||
// Step 3
|
||||
let global_scope = self.window.upcast::<GlobalScope>();
|
||||
let webrender_pipeline_id = global_scope.pipeline_id().to_webrender();
|
||||
self.window.update_viewport_for_scroll(x, y);
|
||||
self.window.perform_a_scroll(x,
|
||||
y,
|
||||
ClipId::root_scroll_node(webrender_pipeline_id),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue