mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Implement browsing context discarding.
This commit is contained in:
parent
143dfc879e
commit
7c2de62124
12 changed files with 196 additions and 160 deletions
|
@ -184,6 +184,15 @@ pub struct NewLayoutInfo {
|
|||
pub layout_threads: usize,
|
||||
}
|
||||
|
||||
/// When a pipeline is closed, should its browsing context be discarded too?
|
||||
#[derive(Copy, Clone, PartialEq, Eq, Hash, Deserialize, Serialize)]
|
||||
pub enum DiscardBrowsingContext {
|
||||
/// Discard the browsing context
|
||||
Yes,
|
||||
/// Don't discard the browsing context
|
||||
No,
|
||||
}
|
||||
|
||||
/// Messages sent from the constellation or layout to the script thread.
|
||||
#[derive(Deserialize, Serialize)]
|
||||
pub enum ConstellationControlMsg {
|
||||
|
@ -194,7 +203,7 @@ pub enum ConstellationControlMsg {
|
|||
/// Notifies script that window has been resized but to not take immediate action.
|
||||
ResizeInactive(PipelineId, WindowSizeData),
|
||||
/// Notifies the script that a pipeline should be closed.
|
||||
ExitPipeline(PipelineId),
|
||||
ExitPipeline(PipelineId, DiscardBrowsingContext),
|
||||
/// Notifies the script that the whole thread should be closed.
|
||||
ExitScriptThread,
|
||||
/// Sends a DOM event.
|
||||
|
|
|
@ -102,7 +102,8 @@ pub enum ScriptMsg {
|
|||
/// Status message to be displayed in the chrome, eg. a link URL on mouseover.
|
||||
NodeStatus(Option<String>),
|
||||
/// Notification that this iframe should be removed.
|
||||
RemoveIFrame(PipelineId, Option<IpcSender<()>>),
|
||||
/// Returns a list of pipelines which were closed.
|
||||
RemoveIFrame(FrameId, IpcSender<Vec<PipelineId>>),
|
||||
/// Change pipeline visibility
|
||||
SetVisible(PipelineId, bool),
|
||||
/// Notifies constellation that an iframe's visibility has been changed.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue