aboutsummaryrefslogtreecommitdiffstats
path: root/components/shared/script_layout
diff options
context:
space:
mode:
authorMartin Robinson <mrobinson@igalia.com>2025-04-06 00:13:29 +0200
committerGitHub <noreply@github.com>2025-04-05 22:13:29 +0000
commit6031a12fd1fa4aee8368e0b3dc0cb792caac56bc (patch)
treecc91327012041a24bd1b71c7768660a2efbe862f /components/shared/script_layout
parenta67409fb253b3cb6dd1adbaf9d3cad47941f4993 (diff)
downloadservo-6031a12fd1fa4aee8368e0b3dc0cb792caac56bc.tar.gz
servo-6031a12fd1fa4aee8368e0b3dc0cb792caac56bc.zip
Move `ScriptToConstellationMsg` to `constellation_traits` (#36364)
This is the last big change necessary to create the `constellation_traits` crate. This moves the data structure for messages that originate from the `ScriptThread` and are sent to the `Contellation` to `constellation_traits`, effectively splitting `script_traits` in half. Before, `script_traits` was responsible for exposing the API of both the `ScriptThread` and the `Constellation` to the rest of Servo. - Data structures that are used by `ScriptToConstellationMsg` are moved to `constellation_traits`. The dependency graph looks a bit like this: `script_layout_interface` depends on `script_traits` depends on `constellation_traits` depends on `embedder_traits`. - Data structures that are used in the embedding layer (`UntrustedNodeAddress`, `CompositorHitTestResult`, `TouchEventResult` and `AnimationState`) are moved to embedder_traits, to avoid a dependency cycle between `webrender_traits` and `constellation_traits`. - Types dealing with MessagePorts and serialization are moved to `constellation_traits::message_port`. Testing: This is covered by existing tests as it just moves types around. Signed-off-by: Martin Robinson <mrobinson@igalia.com> Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Diffstat (limited to 'components/shared/script_layout')
-rw-r--r--components/shared/script_layout/lib.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/components/shared/script_layout/lib.rs b/components/shared/script_layout/lib.rs
index 66ddb3a55fa..6d686d75f03 100644
--- a/components/shared/script_layout/lib.rs
+++ b/components/shared/script_layout/lib.rs
@@ -18,8 +18,8 @@ use app_units::Au;
use atomic_refcell::AtomicRefCell;
use base::Epoch;
use base::id::{BrowsingContextId, PipelineId, WebViewId};
-use constellation_traits::{ScrollState, UntrustedNodeAddress};
-use embedder_traits::ViewportDetails;
+use constellation_traits::{LoadData, ScrollState};
+use embedder_traits::{UntrustedNodeAddress, ViewportDetails};
use euclid::default::{Point2D, Rect};
use fnv::FnvHashMap;
use fonts::{FontContext, SystemFontServiceProxy};
@@ -31,7 +31,7 @@ use net_traits::image_cache::{ImageCache, PendingImageId};
use pixels::Image;
use profile_traits::mem::Report;
use profile_traits::time;
-use script_traits::{InitialScriptState, LoadData, Painter, ScriptThreadMessage};
+use script_traits::{InitialScriptState, Painter, ScriptThreadMessage};
use serde::{Deserialize, Serialize};
use servo_arc::Arc as ServoArc;
use servo_url::{ImmutableOrigin, ServoUrl};