mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Support focus management and keyboard events for iframes.
This commit is contained in:
parent
f164cc253e
commit
18d465bcd2
6 changed files with 141 additions and 39 deletions
|
@ -194,6 +194,13 @@ bitflags! {
|
|||
}
|
||||
}
|
||||
|
||||
/// Specifies the type of focus event that is sent to a pipeline
|
||||
#[derive(Copy, PartialEq)]
|
||||
pub enum FocusType {
|
||||
Element, // The first focus message - focus the element itself
|
||||
Parent, // Focusing a parent element (an iframe)
|
||||
}
|
||||
|
||||
/// Messages from the compositor and script to the constellation.
|
||||
pub enum Msg {
|
||||
Exit,
|
||||
|
@ -219,7 +226,9 @@ pub enum Msg {
|
|||
/// Requests that the constellation instruct layout to begin a new tick of the animation.
|
||||
TickAnimation(PipelineId),
|
||||
// Request that the constellation send the current root pipeline id over a provided channel
|
||||
GetRootPipeline(Sender<Option<PipelineId>>)
|
||||
GetRootPipeline(Sender<Option<PipelineId>>),
|
||||
/// Notifies the constellation that this frame has received focus.
|
||||
FocusMsg(PipelineId),
|
||||
}
|
||||
|
||||
// https://developer.mozilla.org/en-US/docs/Web/API/Using_the_Browser_API#Events
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue