mirror of
https://github.com/servo/servo.git
synced 2025-09-29 16:19:14 +01:00
script: Chain up keyboard scrolling to parent <iframe>
s (#39469)
When an `<iframe>` cannot scroll because the size of the frame is greater than or equal to the size of page contents, chain up the keyboard scroll operation to the parent frame. Testing: A new Servo-only WPT tests is added, though needs to be manually run with `--product servodriver`. Signed-off-by: Martin Robinson <mrobinson@igalia.com> Co-authored-by: Delan Azabani <dazabani@igalia.com>
This commit is contained in:
parent
75e32ba5a4
commit
ffdb7d3663
23 changed files with 406 additions and 132 deletions
|
@ -1985,6 +1985,20 @@ where
|
|||
warn!("No webdriver_input_command_reponse_sender");
|
||||
}
|
||||
},
|
||||
ScriptToConstellationMessage::ForwardKeyboardScroll(pipeline_id, scroll) => {
|
||||
if let Some(pipeline) = self.pipelines.get(&pipeline_id) {
|
||||
if let Err(error) =
|
||||
pipeline
|
||||
.event_loop
|
||||
.send(ScriptThreadMessage::ForwardKeyboardScroll(
|
||||
pipeline_id,
|
||||
scroll,
|
||||
))
|
||||
{
|
||||
warn!("Could not forward {scroll:?} to {pipeline_id}: {error:?}");
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -182,6 +182,7 @@ mod from_script {
|
|||
Self::ReportMemory(..) => target!("ReportMemory"),
|
||||
Self::WebDriverInputComplete(..) => target!("WebDriverInputComplete"),
|
||||
Self::FinishJavaScriptEvaluation(..) => target!("FinishJavaScriptEvaluation"),
|
||||
Self::ForwardKeyboardScroll(..) => target!("ForwardKeyboardScroll"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue