diff options
Diffstat (limited to 'components/shared/script/lib.rs')
-rw-r--r-- | components/shared/script/lib.rs | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/components/shared/script/lib.rs b/components/shared/script/lib.rs index 7323907cba3..748c42400a8 100644 --- a/components/shared/script/lib.rs +++ b/components/shared/script/lib.rs @@ -27,8 +27,8 @@ use crossbeam_channel::{RecvTimeoutError, Sender}; use devtools_traits::ScriptToDevtoolsControlMsg; use embedder_traits::user_content_manager::UserContentManager; use embedder_traits::{ - CompositorHitTestResult, InputEvent, MediaSessionActionType, Theme, ViewportDetails, - WebDriverScriptCommand, + CompositorHitTestResult, FocusSequenceNumber, InputEvent, MediaSessionActionType, Theme, + ViewportDetails, WebDriverScriptCommand, }; use euclid::{Rect, Scale, Size2D, UnknownUnit}; use ipc_channel::ipc::{IpcReceiver, IpcSender}; @@ -191,7 +191,15 @@ pub enum ScriptThreadMessage { RemoveHistoryStates(PipelineId, Vec<HistoryStateId>), /// Set an iframe to be focused. Used when an element in an iframe gains focus. /// PipelineId is for the parent, BrowsingContextId is for the nested browsing context - FocusIFrame(PipelineId, BrowsingContextId), + FocusIFrame(PipelineId, BrowsingContextId, FocusSequenceNumber), + /// Focus the document. Used when the container gains focus. + FocusDocument(PipelineId, FocusSequenceNumber), + /// Notifies that the document's container (e.g., an iframe) is not included + /// in the top-level browsing context's focus chain (not considering system + /// focus) anymore. + /// + /// Obviously, this message is invalid for a top-level document. + Unfocus(PipelineId, FocusSequenceNumber), /// Passes a webdriver command to the script thread for execution WebDriverScriptCommand(PipelineId, WebDriverScriptCommand), /// Notifies script thread that all animations are done |