mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Create a constellation_traits
crate (#36088)
This change creates a `constellation_traits` crate. Previously messages to the `Constellation` were in the `compositing_traits` crate, which came about organically. This change moves these to a new crate which also contains data types that are used in both compositing/libservo and script (ie types that cross the process boundary). The idea is similar to `embedding_traits`, but this is meant for types not exposed to the API. This change allows deduplicating `UntrustedNodeAddress`, which previously had two versions to avoid circular dependencies. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
parent
02375809b0
commit
7c574141c0
52 changed files with 399 additions and 270 deletions
|
@ -4,6 +4,7 @@
|
|||
|
||||
//! Defines data structures which are consumed by the Compositor.
|
||||
|
||||
use base::id::ScrollTreeNodeId;
|
||||
use embedder_traits::Cursor;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use style::values::specified::Overflow;
|
||||
|
@ -54,18 +55,6 @@ pub struct HitTestInfo {
|
|||
pub scroll_tree_node: ScrollTreeNodeId,
|
||||
}
|
||||
|
||||
/// An id for a ScrollTreeNode in the ScrollTree. This contains both the index
|
||||
/// to the node in the tree's array of nodes as well as the corresponding SpatialId
|
||||
/// for the SpatialNode in the WebRender display list.
|
||||
#[derive(Clone, Copy, Debug, Default, Deserialize, PartialEq, Serialize)]
|
||||
pub struct ScrollTreeNodeId {
|
||||
/// The index of this scroll tree node in the tree's array of nodes.
|
||||
pub index: usize,
|
||||
|
||||
/// The WebRender spatial id of this scroll tree node.
|
||||
pub spatial_id: SpatialId,
|
||||
}
|
||||
|
||||
/// Data stored for nodes in the [ScrollTree] that actually scroll,
|
||||
/// as opposed to reference frames and sticky nodes which do not.
|
||||
#[derive(Debug, Deserialize, Serialize)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue