diff options
Diffstat (limited to 'components/shared')
-rw-r--r-- | components/shared/constellation/structured_data/serializable.rs | 4 | ||||
-rw-r--r-- | components/shared/devtools/lib.rs | 2 | ||||
-rw-r--r-- | components/shared/net/filemanager_thread.rs | 2 | ||||
-rw-r--r-- | components/shared/net/image_cache.rs | 6 | ||||
-rw-r--r-- | components/shared/script_layout/lib.rs | 2 |
5 files changed, 13 insertions, 3 deletions
diff --git a/components/shared/constellation/structured_data/serializable.rs b/components/shared/constellation/structured_data/serializable.rs index abc05ad5758..22370087665 100644 --- a/components/shared/constellation/structured_data/serializable.rs +++ b/components/shared/constellation/structured_data/serializable.rs @@ -221,9 +221,9 @@ impl BlobImpl { } /// Construct a BlobImpl from a slice of a parent. - pub fn new_sliced(rel_pos: RelativePos, parent: BlobId, type_string: String) -> BlobImpl { + pub fn new_sliced(range: RelativePos, parent: BlobId, type_string: String) -> BlobImpl { let blob_id = BlobId::new(); - let blob_data = BlobData::Sliced(parent, rel_pos); + let blob_data = BlobData::Sliced(parent, range); BlobImpl { blob_id, type_string, diff --git a/components/shared/devtools/lib.rs b/components/shared/devtools/lib.rs index c07f4529073..628d76bd25d 100644 --- a/components/shared/devtools/lib.rs +++ b/components/shared/devtools/lib.rs @@ -273,6 +273,8 @@ pub enum DevtoolScriptControlMsg { GetCssDatabase(IpcSender<HashMap<String, CssDatabaseProperty>>), /// Simulates a light or dark color scheme for the given pipeline SimulateColorScheme(PipelineId, Theme), + /// Highlight the given DOM node + HighlightDomNode(PipelineId, Option<String>), } #[derive(Clone, Debug, Deserialize, Serialize)] diff --git a/components/shared/net/filemanager_thread.rs b/components/shared/net/filemanager_thread.rs index e55fbefcefc..0e9014e1670 100644 --- a/components/shared/net/filemanager_thread.rs +++ b/components/shared/net/filemanager_thread.rs @@ -39,7 +39,7 @@ pub enum FileTokenCheck { /// Relative slice positions of a sequence, /// whose semantic should be consistent with (start, end) parameters in /// <https://w3c.github.io/FileAPI/#dfn-slice> -#[derive(Clone, Debug, Deserialize, MallocSizeOf, Serialize)] +#[derive(Clone, Copy, Debug, Deserialize, MallocSizeOf, Serialize)] pub struct RelativePos { /// Relative to first byte if non-negative, /// relative to one past last byte if negative, diff --git a/components/shared/net/image_cache.rs b/components/shared/net/image_cache.rs index 8fb329d304f..3f316388755 100644 --- a/components/shared/net/image_cache.rs +++ b/components/shared/net/image_cache.rs @@ -141,4 +141,10 @@ pub trait ImageCache: Sync + Send { /// Inform the image cache about a response for a pending request. fn notify_pending_response(&self, id: PendingImageId, action: FetchResponseMsg); + + /// Create new image cache based on this one, while reusing the existing thread_pool. + fn create_new_image_cache( + &self, + compositor_api: CrossProcessCompositorApi, + ) -> Arc<dyn ImageCache>; } diff --git a/components/shared/script_layout/lib.rs b/components/shared/script_layout/lib.rs index 66baccd5147..8c5d4edc4e0 100644 --- a/components/shared/script_layout/lib.rs +++ b/components/shared/script_layout/lib.rs @@ -428,6 +428,8 @@ pub struct ReflowRequest { pub node_to_image_animation_map: FxHashMap<OpaqueNode, ImageAnimationState>, /// The theme for the window pub theme: PrefersColorScheme, + /// The node highlighted by the devtools, if any + pub highlighted_dom_node: Option<OpaqueNode>, } /// A pending restyle. |