mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Fix scrolling on root element
eca0acf459
uncovered a bug in the way that the scrolling area of `window` was calculated and broke scrolling on the root element. This change does two things in order to fix that: 1. Does a partial revert ofeca0acf459
in order to get scrolling from script working again on the window object. 2. Has the compositor always generate a frame for scrolls starting from script and waits for them. This is speculative fix for flakiness in root scrolling tests on CI.
This commit is contained in:
parent
121b2c9871
commit
edeb24b30f
15 changed files with 55 additions and 20 deletions
|
@ -490,7 +490,8 @@ impl<Window: WindowMethods + ?Sized> IOCompositor<Window> {
|
|||
self.ready_to_save_state,
|
||||
ReadyState::WaitingForConstellationReply
|
||||
);
|
||||
if is_ready && !self.waiting_on_pending_frame {
|
||||
if is_ready && !self.waiting_on_pending_frame && !self.waiting_for_results_of_scroll
|
||||
{
|
||||
self.ready_to_save_state = ReadyState::ReadyToSaveImage;
|
||||
if self.is_running_problem_test {
|
||||
println!("ready to save image!");
|
||||
|
@ -623,8 +624,11 @@ impl<Window: WindowMethods + ?Sized> IOCompositor<Window> {
|
|||
scroll_id,
|
||||
clamping,
|
||||
)) => {
|
||||
self.waiting_for_results_of_scroll = true;
|
||||
|
||||
let mut txn = webrender_api::Transaction::new();
|
||||
txn.scroll_node_with_id(point, scroll_id, clamping);
|
||||
txn.generate_frame();
|
||||
self.webrender_api
|
||||
.send_transaction(self.webrender_document, txn);
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue