mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
If a mouse event is targeting an iframe, forward it to the iframe's inner window
Fixes #8759. This adds a slow path for cases where the compositor's layer-based hit testing is incorrect. To optimize for this case, we could instead replace the layer hit testing with display-list hit testing done in the paint task.
This commit is contained in:
parent
8c4fed42b0
commit
9551363bfb
4 changed files with 57 additions and 4 deletions
|
@ -613,6 +613,19 @@ impl<LTF: LayoutTaskFactory, STF: ScriptTaskFactory> Constellation<LTF, STF> {
|
|||
debug!("constellation got focus message");
|
||||
self.handle_focus_msg(pipeline_id);
|
||||
}
|
||||
Request::Script(FromScriptMsg::ForwardMouseButtonEvent(
|
||||
pipeline_id, event_type, button, point)) => {
|
||||
if let Some(pipeline) = self.pipelines.get(&pipeline_id) {
|
||||
pipeline.script_chan.send(ConstellationControlMsg::SendEvent(pipeline_id,
|
||||
CompositorEvent::MouseButtonEvent(event_type, button, point)));
|
||||
}
|
||||
}
|
||||
Request::Script(FromScriptMsg::ForwardMouseMoveEvent(pipeline_id, point)) => {
|
||||
if let Some(pipeline) = self.pipelines.get(&pipeline_id) {
|
||||
pipeline.script_chan.send(ConstellationControlMsg::SendEvent(pipeline_id,
|
||||
CompositorEvent::MouseMoveEvent(Some(point))));
|
||||
}
|
||||
}
|
||||
Request::Script(FromScriptMsg::GetClipboardContents(sender)) => {
|
||||
let result = self.clipboard_ctx.as_ref().map_or(
|
||||
"".to_owned(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue