mirror of
https://github.com/servo/servo.git
synced 2025-07-24 15:50:21 +01:00
Auto merge of #9257 - fmmartins:refactor-scripttraits, r=jdm
Move IFrameLoadInfo and IFrameSandboxState to script_traits Hi, this should fix #8841! Any change that might be needed please tell me <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9257) <!-- Reviewable:end -->
This commit is contained in:
commit
fed41a42da
5 changed files with 37 additions and 30 deletions
|
@ -49,6 +49,7 @@ use net_traits::image_cache_thread::ImageCacheThread;
|
|||
use net_traits::storage_thread::StorageThread;
|
||||
use profile_traits::mem;
|
||||
use std::any::Any;
|
||||
use url::Url;
|
||||
use util::ipc::OptionalOpaqueIpcSender;
|
||||
use util::mem::HeapSizeOf;
|
||||
|
||||
|
@ -325,3 +326,29 @@ pub enum EventResult {
|
|||
/// Prevented by web content
|
||||
DefaultPrevented,
|
||||
}
|
||||
|
||||
/// Whether the sandbox attribute is present for an iframe element
|
||||
#[derive(PartialEq, Eq, Copy, Clone, Debug, Deserialize, Serialize)]
|
||||
pub enum IFrameSandboxState {
|
||||
/// Sandbox attribute is present
|
||||
IFrameSandboxed,
|
||||
/// Sandbox attribute is not present
|
||||
IFrameUnsandboxed
|
||||
}
|
||||
|
||||
/// Specifies the information required to load a URL in an iframe.
|
||||
#[derive(Deserialize, Serialize)]
|
||||
pub struct IFrameLoadInfo {
|
||||
/// Url to load
|
||||
pub url: Option<Url>,
|
||||
/// Pipeline ID of the parent of this iframe
|
||||
pub containing_pipeline_id: PipelineId,
|
||||
/// The new subpage ID for this load
|
||||
pub new_subpage_id: SubpageId,
|
||||
/// The old subpage ID for this iframe, if a page was previously loaded.
|
||||
pub old_subpage_id: Option<SubpageId>,
|
||||
/// The new pipeline ID that the iframe has generated.
|
||||
pub new_pipeline_id: PipelineId,
|
||||
/// Sandbox type of this iframe
|
||||
pub sandbox: IFrameSandboxState,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue