mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Rename script_layout_interface
to layout_api
(#37591)
Now that we are standardizing on the `_traits` crates becoming `_api` and exposing the API of the crate that they get their name from [^1], `script_layout_interface` becomes `layout_api` as it exposes the API for `layout` that is used by `script` This brings the crate in line with the naming of the other ones in `shared`. [^1]: https://servo.zulipchat.com/#narrow/channel/263398-general/topic/Organizing.20*_traits.20crates/with/396893711 Testing: This should not change any behavior and thus is covered by existing tests. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
parent
85c849d843
commit
69ff4afa58
41 changed files with 102 additions and 113 deletions
74
Cargo.lock
generated
74
Cargo.lock
generated
|
@ -1175,6 +1175,7 @@ dependencies = [
|
|||
"gaol",
|
||||
"ipc-channel",
|
||||
"keyboard-types",
|
||||
"layout_api",
|
||||
"log",
|
||||
"media",
|
||||
"net",
|
||||
|
@ -1182,7 +1183,6 @@ dependencies = [
|
|||
"parking_lot",
|
||||
"profile",
|
||||
"profile_traits",
|
||||
"script_layout_interface",
|
||||
"script_traits",
|
||||
"serde",
|
||||
"servo-tracing",
|
||||
|
@ -4314,6 +4314,7 @@ dependencies = [
|
|||
"icu_segmenter",
|
||||
"ipc-channel",
|
||||
"itertools 0.14.0",
|
||||
"layout_api",
|
||||
"log",
|
||||
"malloc_size_of_derive",
|
||||
"net_traits",
|
||||
|
@ -4325,7 +4326,6 @@ dependencies = [
|
|||
"range",
|
||||
"rayon",
|
||||
"script",
|
||||
"script_layout_interface",
|
||||
"script_traits",
|
||||
"selectors",
|
||||
"servo-tracing",
|
||||
|
@ -4346,6 +4346,39 @@ dependencies = [
|
|||
"xi-unicode",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "layout_api"
|
||||
version = "0.0.1"
|
||||
dependencies = [
|
||||
"app_units",
|
||||
"atomic_refcell",
|
||||
"base",
|
||||
"compositing_traits",
|
||||
"constellation_traits",
|
||||
"embedder_traits",
|
||||
"euclid",
|
||||
"fnv",
|
||||
"fonts",
|
||||
"fonts_traits",
|
||||
"fxhash",
|
||||
"html5ever",
|
||||
"ipc-channel",
|
||||
"libc",
|
||||
"malloc_size_of_derive",
|
||||
"net_traits",
|
||||
"pixels",
|
||||
"profile_traits",
|
||||
"range",
|
||||
"script_traits",
|
||||
"selectors",
|
||||
"serde",
|
||||
"servo_arc",
|
||||
"servo_malloc_size_of",
|
||||
"servo_url",
|
||||
"stylo",
|
||||
"webrender_api",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "lazy_static"
|
||||
version = "1.5.0"
|
||||
|
@ -4453,6 +4486,7 @@ dependencies = [
|
|||
"ipc-channel",
|
||||
"keyboard-types",
|
||||
"layout",
|
||||
"layout_api",
|
||||
"libservo",
|
||||
"log",
|
||||
"media",
|
||||
|
@ -4465,7 +4499,6 @@ dependencies = [
|
|||
"rayon",
|
||||
"rustls",
|
||||
"script",
|
||||
"script_layout_interface",
|
||||
"script_traits",
|
||||
"serde",
|
||||
"servo-media",
|
||||
|
@ -6613,6 +6646,7 @@ dependencies = [
|
|||
"itertools 0.14.0",
|
||||
"jstraceable_derive",
|
||||
"keyboard-types",
|
||||
"layout_api",
|
||||
"libc",
|
||||
"log",
|
||||
"malloc_size_of_derive",
|
||||
|
@ -6634,7 +6668,6 @@ dependencies = [
|
|||
"range",
|
||||
"regex",
|
||||
"script_bindings",
|
||||
"script_layout_interface",
|
||||
"script_traits",
|
||||
"selectors",
|
||||
"serde",
|
||||
|
@ -6713,39 +6746,6 @@ dependencies = [
|
|||
"xml5ever",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "script_layout_interface"
|
||||
version = "0.0.1"
|
||||
dependencies = [
|
||||
"app_units",
|
||||
"atomic_refcell",
|
||||
"base",
|
||||
"compositing_traits",
|
||||
"constellation_traits",
|
||||
"embedder_traits",
|
||||
"euclid",
|
||||
"fnv",
|
||||
"fonts",
|
||||
"fonts_traits",
|
||||
"fxhash",
|
||||
"html5ever",
|
||||
"ipc-channel",
|
||||
"libc",
|
||||
"malloc_size_of_derive",
|
||||
"net_traits",
|
||||
"pixels",
|
||||
"profile_traits",
|
||||
"range",
|
||||
"script_traits",
|
||||
"selectors",
|
||||
"serde",
|
||||
"servo_arc",
|
||||
"servo_malloc_size_of",
|
||||
"servo_url",
|
||||
"stylo",
|
||||
"webrender_api",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "script_tests"
|
||||
version = "0.0.1"
|
||||
|
|
|
@ -118,7 +118,7 @@ resvg = "0.45.0"
|
|||
rustls = { version = "0.23", default-features = false, features = ["logging", "std", "tls12"] }
|
||||
rustls-pemfile = "2.0"
|
||||
rustls-pki-types = "1.12"
|
||||
script_layout_interface = { path = "components/shared/script_layout" }
|
||||
layout_api = { path = "components/shared/layout" }
|
||||
script_traits = { path = "components/shared/script" }
|
||||
selectors = { git = "https://github.com/servo/stylo", branch = "2025-06-03" }
|
||||
serde = "1.0.219"
|
||||
|
|
|
@ -33,6 +33,7 @@ euclid = { workspace = true }
|
|||
fonts = { path = "../fonts" }
|
||||
ipc-channel = { workspace = true }
|
||||
keyboard-types = { workspace = true }
|
||||
layout_api = { workspace = true }
|
||||
log = { workspace = true }
|
||||
media = { path = "../media" }
|
||||
net = { path = "../net" }
|
||||
|
@ -40,7 +41,6 @@ net_traits = { workspace = true }
|
|||
parking_lot = { workspace = true }
|
||||
profile = { path = "../profile" }
|
||||
profile_traits = { workspace = true }
|
||||
script_layout_interface = { workspace = true }
|
||||
script_traits = { workspace = true }
|
||||
serde = { workspace = true }
|
||||
servo_config = { path = "../config" }
|
||||
|
|
|
@ -142,6 +142,7 @@ use ipc_channel::ipc::{self, IpcReceiver, IpcSender};
|
|||
use ipc_channel::router::ROUTER;
|
||||
use keyboard_types::webdriver::Event as WebDriverInputEvent;
|
||||
use keyboard_types::{Key, KeyState, Modifiers};
|
||||
use layout_api::{LayoutFactory, ScriptThreadFactory};
|
||||
use log::{debug, error, info, trace, warn};
|
||||
use media::WindowGLContext;
|
||||
use net_traits::pub_domains::reg_host;
|
||||
|
@ -150,7 +151,6 @@ use net_traits::storage_thread::{StorageThreadMsg, StorageType};
|
|||
use net_traits::{self, IpcSend, ReferrerPolicy, ResourceThreads};
|
||||
use profile_traits::mem::ProfilerMsg;
|
||||
use profile_traits::{mem, time};
|
||||
use script_layout_interface::{LayoutFactory, ScriptThreadFactory};
|
||||
use script_traits::{
|
||||
ConstellationInputEvent, DiscardBrowsingContext, DocumentActivity, ProgressiveWebMetricType,
|
||||
ScriptThreadMessage, UpdatePipelineIdReason,
|
||||
|
|
|
@ -30,6 +30,7 @@ use fonts::{SystemFontServiceProxy, SystemFontServiceProxySender};
|
|||
use ipc_channel::Error;
|
||||
use ipc_channel::ipc::{self, IpcReceiver, IpcSender};
|
||||
use ipc_channel::router::ROUTER;
|
||||
use layout_api::{LayoutFactory, ScriptThreadFactory};
|
||||
use log::{debug, error, warn};
|
||||
use media::WindowGLContext;
|
||||
use net::image_cache::ImageCacheImpl;
|
||||
|
@ -38,7 +39,6 @@ use net_traits::image_cache::ImageCache;
|
|||
use profile::system_reporter;
|
||||
use profile_traits::mem::{ProfilerMsg, Reporter};
|
||||
use profile_traits::{mem as profile_mem, time};
|
||||
use script_layout_interface::{LayoutFactory, ScriptThreadFactory};
|
||||
use script_traits::{
|
||||
DiscardBrowsingContext, DocumentActivity, InitialScriptState, NewLayoutInfo,
|
||||
ScriptThreadMessage,
|
||||
|
|
|
@ -35,6 +35,7 @@ icu_locid = { workspace = true }
|
|||
icu_segmenter = { workspace = true }
|
||||
ipc-channel = { workspace = true }
|
||||
itertools = { workspace = true }
|
||||
layout_api = { workspace = true }
|
||||
log = { workspace = true }
|
||||
malloc_size_of = { workspace = true }
|
||||
malloc_size_of_derive = { workspace = true }
|
||||
|
@ -45,7 +46,6 @@ profile_traits = { workspace = true }
|
|||
range = { path = "../range" }
|
||||
rayon = { workspace = true }
|
||||
script = { path = "../script" }
|
||||
script_layout_interface = { workspace = true }
|
||||
script_traits = { workspace = true }
|
||||
selectors = { workspace = true }
|
||||
servo_arc = { workspace = true }
|
||||
|
|
|
@ -9,15 +9,15 @@ use euclid::Size2D;
|
|||
use fnv::FnvHashMap;
|
||||
use fonts::FontContext;
|
||||
use fxhash::FxHashMap;
|
||||
use layout_api::{
|
||||
IFrameSizes, ImageAnimationState, PendingImage, PendingImageState, PendingRasterizationImage,
|
||||
};
|
||||
use net_traits::image_cache::{
|
||||
Image as CachedImage, ImageCache, ImageCacheResult, ImageOrMetadataAvailable, PendingImageId,
|
||||
UsePlaceholder,
|
||||
};
|
||||
use parking_lot::{Mutex, RwLock};
|
||||
use pixels::RasterImage;
|
||||
use script_layout_interface::{
|
||||
IFrameSizes, ImageAnimationState, PendingImage, PendingImageState, PendingRasterizationImage,
|
||||
};
|
||||
use servo_url::{ImmutableOrigin, ServoUrl};
|
||||
use style::context::SharedStyleContext;
|
||||
use style::dom::OpaqueNode;
|
||||
|
|
|
@ -8,15 +8,15 @@ use std::marker::PhantomData;
|
|||
use atomic_refcell::{AtomicRef, AtomicRefCell, AtomicRefMut};
|
||||
use base::id::{BrowsingContextId, PipelineId};
|
||||
use html5ever::{local_name, ns};
|
||||
use layout_api::wrapper_traits::{
|
||||
LayoutDataTrait, LayoutNode, ThreadSafeLayoutElement, ThreadSafeLayoutNode,
|
||||
};
|
||||
use layout_api::{
|
||||
GenericLayoutDataTrait, LayoutElementType, LayoutNodeType as ScriptLayoutNodeType,
|
||||
};
|
||||
use malloc_size_of_derive::MallocSizeOf;
|
||||
use net_traits::image_cache::Image;
|
||||
use script::layout_dom::ServoLayoutNode;
|
||||
use script_layout_interface::wrapper_traits::{
|
||||
LayoutDataTrait, LayoutNode, ThreadSafeLayoutElement, ThreadSafeLayoutNode,
|
||||
};
|
||||
use script_layout_interface::{
|
||||
GenericLayoutDataTrait, LayoutElementType, LayoutNodeType as ScriptLayoutNodeType,
|
||||
};
|
||||
use servo_arc::Arc as ServoArc;
|
||||
use style::context::SharedStyleContext;
|
||||
use style::properties::ComputedValues;
|
||||
|
|
|
@ -7,12 +7,10 @@ use std::iter::FusedIterator;
|
|||
|
||||
use fonts::ByteIndex;
|
||||
use html5ever::{LocalName, local_name};
|
||||
use layout_api::wrapper_traits::{LayoutNode, ThreadSafeLayoutElement, ThreadSafeLayoutNode};
|
||||
use layout_api::{LayoutElementType, LayoutNodeType};
|
||||
use range::Range;
|
||||
use script::layout_dom::ServoLayoutNode;
|
||||
use script_layout_interface::wrapper_traits::{
|
||||
LayoutNode, ThreadSafeLayoutElement, ThreadSafeLayoutNode,
|
||||
};
|
||||
use script_layout_interface::{LayoutElementType, LayoutNodeType};
|
||||
use selectors::Element as SelectorsElement;
|
||||
use servo_arc::Arc as ServoArc;
|
||||
use style::dom::{NodeInfo, TElement, TNode, TShadowRoot};
|
||||
|
|
|
@ -6,9 +6,9 @@ use std::vec::IntoIter;
|
|||
|
||||
use app_units::Au;
|
||||
use fonts::FontMetrics;
|
||||
use layout_api::wrapper_traits::{LayoutNode, ThreadSafeLayoutNode};
|
||||
use malloc_size_of_derive::MallocSizeOf;
|
||||
use script::layout_dom::ServoLayoutNode;
|
||||
use script_layout_interface::wrapper_traits::{LayoutNode, ThreadSafeLayoutNode};
|
||||
use servo_arc::Arc as ServoArc;
|
||||
use style::properties::ComputedValues;
|
||||
|
||||
|
|
|
@ -83,6 +83,7 @@ use bitflags::bitflags;
|
|||
use construct::InlineFormattingContextBuilder;
|
||||
use fonts::{ByteIndex, FontMetrics, GlyphStore};
|
||||
use inline_box::{InlineBox, InlineBoxContainerState, InlineBoxIdentifier, InlineBoxes};
|
||||
use layout_api::wrapper_traits::{LayoutNode, ThreadSafeLayoutNode};
|
||||
use line::{
|
||||
AbsolutelyPositionedLineItem, AtomicLineItem, FloatLineItem, LineItem, LineItemLayout,
|
||||
TextRunLineItem,
|
||||
|
@ -91,7 +92,6 @@ use line_breaker::LineBreaker;
|
|||
use malloc_size_of_derive::MallocSizeOf;
|
||||
use range::Range;
|
||||
use script::layout_dom::ServoLayoutNode;
|
||||
use script_layout_interface::wrapper_traits::{LayoutNode, ThreadSafeLayoutNode};
|
||||
use servo_arc::Arc;
|
||||
use style::Zero;
|
||||
use style::computed_values::text_wrap_mode::T as TextWrapMode;
|
||||
|
|
|
@ -7,12 +7,10 @@ use atomic_refcell::AtomicRef;
|
|||
use compositing_traits::display_list::AxesScrollSensitivity;
|
||||
use euclid::Rect;
|
||||
use euclid::default::Size2D as UntypedSize2D;
|
||||
use layout_api::wrapper_traits::{LayoutNode, ThreadSafeLayoutElement, ThreadSafeLayoutNode};
|
||||
use layout_api::{LayoutElementType, LayoutNodeType};
|
||||
use malloc_size_of_derive::MallocSizeOf;
|
||||
use script::layout_dom::ServoLayoutNode;
|
||||
use script_layout_interface::wrapper_traits::{
|
||||
LayoutNode, ThreadSafeLayoutElement, ThreadSafeLayoutNode,
|
||||
};
|
||||
use script_layout_interface::{LayoutElementType, LayoutNodeType};
|
||||
use servo_arc::Arc;
|
||||
use style::dom::{NodeInfo, TNode};
|
||||
use style::properties::ComputedValues;
|
||||
|
|
|
@ -3,9 +3,9 @@
|
|||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use bitflags::bitflags;
|
||||
use layout_api::combine_id_with_fragment_type;
|
||||
use malloc_size_of::malloc_size_of_is_0;
|
||||
use malloc_size_of_derive::MallocSizeOf;
|
||||
use script_layout_interface::combine_id_with_fragment_type;
|
||||
use style::dom::OpaqueNode;
|
||||
use style::selector_parser::PseudoElement;
|
||||
|
||||
|
|
|
@ -24,6 +24,10 @@ use fonts::{FontContext, FontContextWebFontMethods};
|
|||
use fonts_traits::StylesheetWebFontLoadFinishedCallback;
|
||||
use fxhash::FxHashMap;
|
||||
use ipc_channel::ipc::IpcSender;
|
||||
use layout_api::{
|
||||
Layout, LayoutConfig, LayoutFactory, NodesFromPointQueryType, OffsetParentResponse, ReflowGoal,
|
||||
ReflowRequest, ReflowResult, TrustedNodeAddress,
|
||||
};
|
||||
use log::{debug, error, warn};
|
||||
use malloc_size_of::{MallocConditionalSizeOf, MallocSizeOf, MallocSizeOfOps};
|
||||
use net_traits::image_cache::{ImageCache, UsePlaceholder};
|
||||
|
@ -35,10 +39,6 @@ use profile_traits::time::{
|
|||
use profile_traits::{path, time_profile};
|
||||
use rayon::ThreadPool;
|
||||
use script::layout_dom::{ServoLayoutDocument, ServoLayoutElement, ServoLayoutNode};
|
||||
use script_layout_interface::{
|
||||
Layout, LayoutConfig, LayoutFactory, NodesFromPointQueryType, OffsetParentResponse, ReflowGoal,
|
||||
ReflowRequest, ReflowResult, TrustedNodeAddress,
|
||||
};
|
||||
use script_traits::{DrawAPaintImageResult, PaintWorkletError, Painter, ScriptThreadMessage};
|
||||
use servo_arc::Arc as ServoArc;
|
||||
use servo_config::opts::{self, DebugOptions};
|
||||
|
@ -271,10 +271,7 @@ impl Layout for LayoutThread {
|
|||
}
|
||||
|
||||
#[servo_tracing::instrument(skip_all)]
|
||||
fn query_element_inner_outer_text(
|
||||
&self,
|
||||
node: script_layout_interface::TrustedNodeAddress,
|
||||
) -> String {
|
||||
fn query_element_inner_outer_text(&self, node: layout_api::TrustedNodeAddress) -> String {
|
||||
let node = unsafe { ServoLayoutNode::new(&node) };
|
||||
get_the_text_steps(node)
|
||||
}
|
||||
|
|
|
@ -9,11 +9,9 @@ use app_units::Au;
|
|||
use euclid::default::{Point2D, Rect};
|
||||
use euclid::{SideOffsets2D, Size2D};
|
||||
use itertools::Itertools;
|
||||
use layout_api::wrapper_traits::{LayoutNode, ThreadSafeLayoutElement, ThreadSafeLayoutNode};
|
||||
use layout_api::{LayoutElementType, LayoutNodeType, OffsetParentResponse};
|
||||
use script::layout_dom::ServoLayoutNode;
|
||||
use script_layout_interface::wrapper_traits::{
|
||||
LayoutNode, ThreadSafeLayoutElement, ThreadSafeLayoutNode,
|
||||
};
|
||||
use script_layout_interface::{LayoutElementType, LayoutNodeType, OffsetParentResponse};
|
||||
use servo_arc::Arc as ServoArc;
|
||||
use servo_url::ServoUrl;
|
||||
use style::computed_values::display::T as Display;
|
||||
|
|
|
@ -9,10 +9,10 @@ use base::id::{BrowsingContextId, PipelineId};
|
|||
use data_url::DataUrl;
|
||||
use embedder_traits::ViewportDetails;
|
||||
use euclid::{Scale, Size2D};
|
||||
use layout_api::IFrameSize;
|
||||
use malloc_size_of_derive::MallocSizeOf;
|
||||
use net_traits::image_cache::{Image, ImageOrMetadataAvailable, UsePlaceholder};
|
||||
use script::layout_dom::ServoLayoutNode;
|
||||
use script_layout_interface::IFrameSize;
|
||||
use servo_arc::Arc as ServoArc;
|
||||
use style::Zero;
|
||||
use style::computed_values::object_fit::T as ObjectFit;
|
||||
|
|
|
@ -7,8 +7,8 @@ use std::convert::{TryFrom, TryInto};
|
|||
use std::iter::repeat;
|
||||
|
||||
use atomic_refcell::AtomicRef;
|
||||
use layout_api::wrapper_traits::{LayoutNode, ThreadSafeLayoutNode};
|
||||
use log::warn;
|
||||
use script_layout_interface::wrapper_traits::{LayoutNode, ThreadSafeLayoutNode};
|
||||
use servo_arc::Arc;
|
||||
use style::properties::ComputedValues;
|
||||
use style::properties::style_structs::Font;
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use layout_api::wrapper_traits::LayoutNode;
|
||||
use script::layout_dom::ServoLayoutNode;
|
||||
use script_layout_interface::wrapper_traits::LayoutNode;
|
||||
use style::context::{SharedStyleContext, StyleContext};
|
||||
use style::data::ElementData;
|
||||
use style::dom::{NodeInfo, TElement, TNode};
|
||||
|
|
|
@ -81,6 +81,7 @@ itertools = { workspace = true }
|
|||
js = { workspace = true }
|
||||
jstraceable_derive = { path = "../jstraceable_derive" }
|
||||
keyboard-types = { workspace = true }
|
||||
layout_api = { workspace = true }
|
||||
libc = { workspace = true }
|
||||
log = { workspace = true }
|
||||
malloc_size_of = { workspace = true }
|
||||
|
@ -101,7 +102,6 @@ profile_traits = { workspace = true }
|
|||
range = { path = "../range" }
|
||||
regex = { workspace = true }
|
||||
script_bindings = { path = "../script_bindings" }
|
||||
script_layout_interface = { workspace = true }
|
||||
script_traits = { workspace = true }
|
||||
selectors = { workspace = true }
|
||||
serde = { workspace = true, features = ["derive"] }
|
||||
|
|
|
@ -5,9 +5,9 @@
|
|||
//! Common interfaces for Canvas Contexts
|
||||
|
||||
use euclid::default::Size2D;
|
||||
use layout_api::HTMLCanvasData;
|
||||
use pixels::Snapshot;
|
||||
use script_bindings::root::Dom;
|
||||
use script_layout_interface::HTMLCanvasData;
|
||||
use webrender_api::ImageKey;
|
||||
|
||||
use crate::dom::bindings::codegen::UnionTypes::HTMLCanvasElementOrOffscreenCanvas;
|
||||
|
|
|
@ -31,9 +31,9 @@ use std::marker::PhantomData;
|
|||
use std::{mem, ptr};
|
||||
|
||||
use js::jsapi::{JSObject, JSTracer};
|
||||
use layout_api::TrustedNodeAddress;
|
||||
use malloc_size_of::{MallocSizeOf, MallocSizeOfOps};
|
||||
pub(crate) use script_bindings::root::*;
|
||||
use script_layout_interface::TrustedNodeAddress;
|
||||
use style::thread_state;
|
||||
|
||||
use crate::dom::bindings::conversions::DerivedFrom;
|
||||
|
|
|
@ -41,6 +41,7 @@ use hyper_serde::Serde;
|
|||
use ipc_channel::ipc;
|
||||
use js::rust::{HandleObject, HandleValue};
|
||||
use keyboard_types::{Code, Key, KeyState, Modifiers};
|
||||
use layout_api::{PendingRestyle, TrustedNodeAddress, node_id_from_scroll_id};
|
||||
use metrics::{InteractiveFlag, InteractiveWindow, ProgressiveWebMetrics};
|
||||
use net_traits::CookieSource::NonHTTP;
|
||||
use net_traits::CoreResourceMsg::{GetCookiesForUrl, SetCookiesForUrl};
|
||||
|
@ -55,7 +56,6 @@ use profile_traits::ipc as profile_ipc;
|
|||
use profile_traits::time::TimerMetadataFrameType;
|
||||
use regex::bytes::Regex;
|
||||
use script_bindings::interfaces::DocumentHelpers;
|
||||
use script_layout_interface::{PendingRestyle, TrustedNodeAddress, node_id_from_scroll_id};
|
||||
use script_traits::{ConstellationInputEvent, DocumentActivity, ProgressiveWebMetricType};
|
||||
use servo_arc::Arc;
|
||||
use servo_config::pref;
|
||||
|
|
|
@ -6,7 +6,7 @@ use std::fmt;
|
|||
|
||||
use embedder_traits::UntrustedNodeAddress;
|
||||
use euclid::default::Point2D;
|
||||
use script_layout_interface::{NodesFromPointQueryType, QueryMsg};
|
||||
use layout_api::{NodesFromPointQueryType, QueryMsg};
|
||||
use servo_arc::Arc;
|
||||
use style::invalidation::media_queries::{MediaListKey, ToMediaListKey};
|
||||
use style::media_queries::MediaList;
|
||||
|
|
|
@ -21,8 +21,8 @@ use image::{ColorType, ImageEncoder, ImageError};
|
|||
use ipc_channel::ipc::{self as ipcchan};
|
||||
use js::error::throw_type_error;
|
||||
use js::rust::{HandleObject, HandleValue};
|
||||
use layout_api::HTMLCanvasData;
|
||||
use pixels::{Snapshot, SnapshotAlphaMode, SnapshotPixelFormat};
|
||||
use script_layout_interface::HTMLCanvasData;
|
||||
use servo_media::streams::MediaStreamType;
|
||||
use servo_media::streams::registry::MediaStreamId;
|
||||
use style::attr::AttrValue;
|
||||
|
|
|
@ -9,7 +9,7 @@ use std::rc::Rc;
|
|||
use dom_struct::dom_struct;
|
||||
use html5ever::{LocalName, Prefix, local_name, ns};
|
||||
use js::rust::HandleObject;
|
||||
use script_layout_interface::QueryMsg;
|
||||
use layout_api::QueryMsg;
|
||||
use style::attr::AttrValue;
|
||||
use stylo_dom::ElementState;
|
||||
|
||||
|
|
|
@ -21,6 +21,7 @@ use http::header::{self, HeaderMap, HeaderValue};
|
|||
use ipc_channel::ipc::{self, IpcSharedMemory, channel};
|
||||
use ipc_channel::router::ROUTER;
|
||||
use js::jsapi::JSAutoRealm;
|
||||
use layout_api::MediaFrame;
|
||||
use media::{GLPlayerMsg, GLPlayerMsgForward, WindowGLContext};
|
||||
use net_traits::request::{Destination, RequestId};
|
||||
use net_traits::{
|
||||
|
@ -32,7 +33,6 @@ use script_bindings::codegen::GenericBindings::TimeRangesBinding::TimeRangesMeth
|
|||
use script_bindings::codegen::InheritTypes::{
|
||||
ElementTypeId, HTMLElementTypeId, HTMLMediaElementTypeId, NodeTypeId,
|
||||
};
|
||||
use script_layout_interface::MediaFrame;
|
||||
use servo_config::pref;
|
||||
use servo_media::player::audio::AudioRenderer;
|
||||
use servo_media::player::video::{VideoFrame, VideoFrameRenderer};
|
||||
|
|
|
@ -10,6 +10,7 @@ use dom_struct::dom_struct;
|
|||
use euclid::default::Size2D;
|
||||
use html5ever::{LocalName, Prefix, local_name, ns};
|
||||
use js::rust::HandleObject;
|
||||
use layout_api::{HTMLMediaData, MediaMetadata};
|
||||
use net_traits::image_cache::{
|
||||
ImageCache, ImageCacheResult, ImageLoadListener, ImageOrMetadataAvailable, ImageResponse,
|
||||
PendingImageId, UsePlaceholder,
|
||||
|
@ -20,7 +21,6 @@ use net_traits::{
|
|||
ResourceTimingType,
|
||||
};
|
||||
use pixels::{Snapshot, SnapshotAlphaMode, SnapshotPixelFormat};
|
||||
use script_layout_interface::{HTMLMediaData, MediaMetadata};
|
||||
use servo_media::player::video::VideoFrame;
|
||||
use servo_url::ServoUrl;
|
||||
use style::attr::{AttrValue, LengthOrPercentageOrAuto};
|
||||
|
|
|
@ -23,15 +23,15 @@ use html5ever::serialize::HtmlSerializer;
|
|||
use html5ever::{Namespace, Prefix, QualName, ns, serialize as html_serialize};
|
||||
use js::jsapi::JSObject;
|
||||
use js::rust::HandleObject;
|
||||
use layout_api::{
|
||||
GenericLayoutData, HTMLCanvasData, HTMLMediaData, LayoutElementType, LayoutNodeType, QueryMsg,
|
||||
SVGSVGData, StyleData, TrustedNodeAddress,
|
||||
};
|
||||
use libc::{self, c_void, uintptr_t};
|
||||
use malloc_size_of::{MallocSizeOf, MallocSizeOfOps};
|
||||
use net_traits::image_cache::Image;
|
||||
use pixels::ImageMetadata;
|
||||
use script_bindings::codegen::InheritTypes::DocumentFragmentTypeId;
|
||||
use script_layout_interface::{
|
||||
GenericLayoutData, HTMLCanvasData, HTMLMediaData, LayoutElementType, LayoutNodeType, QueryMsg,
|
||||
SVGSVGData, StyleData, TrustedNodeAddress,
|
||||
};
|
||||
use script_traits::DocumentActivity;
|
||||
use selectors::matching::{
|
||||
MatchingContext, MatchingForInvalidation, MatchingMode, NeedsSelectorFlags,
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
use dom_struct::dom_struct;
|
||||
use html5ever::{LocalName, Prefix, local_name, ns};
|
||||
use js::rust::HandleObject;
|
||||
use script_layout_interface::SVGSVGData;
|
||||
use layout_api::SVGSVGData;
|
||||
use style::attr::AttrValue;
|
||||
|
||||
use crate::dom::attr::Attr;
|
||||
|
|
|
@ -51,6 +51,10 @@ use js::rust::{
|
|||
CustomAutoRooter, CustomAutoRooterGuard, HandleObject, HandleValue, MutableHandleObject,
|
||||
MutableHandleValue,
|
||||
};
|
||||
use layout_api::{
|
||||
FragmentType, Layout, PendingImageState, QueryMsg, ReflowGoal, ReflowRequest,
|
||||
TrustedNodeAddress, combine_id_with_fragment_type,
|
||||
};
|
||||
use malloc_size_of::MallocSizeOf;
|
||||
use media::WindowGLContext;
|
||||
use net_traits::ResourceThreads;
|
||||
|
@ -67,10 +71,6 @@ use script_bindings::codegen::GenericBindings::NavigatorBinding::NavigatorMethod
|
|||
use script_bindings::codegen::GenericBindings::PerformanceBinding::PerformanceMethods;
|
||||
use script_bindings::interfaces::WindowHelpers;
|
||||
use script_bindings::root::Root;
|
||||
use script_layout_interface::{
|
||||
FragmentType, Layout, PendingImageState, QueryMsg, ReflowGoal, ReflowRequest,
|
||||
TrustedNodeAddress, combine_id_with_fragment_type,
|
||||
};
|
||||
use script_traits::ScriptThreadMessage;
|
||||
use selectors::attr::CaseSensitivity;
|
||||
use servo_arc::Arc as ServoArc;
|
||||
|
|
|
@ -9,7 +9,7 @@ use base::id::BrowsingContextId;
|
|||
use constellation_traits::{IFrameSizeMsg, WindowSizeType};
|
||||
use embedder_traits::ViewportDetails;
|
||||
use fnv::FnvHashMap;
|
||||
use script_layout_interface::IFrameSizes;
|
||||
use layout_api::IFrameSizes;
|
||||
|
||||
use crate::dom::bindings::inheritance::Castable;
|
||||
use crate::dom::bindings::root::{Dom, DomRoot};
|
||||
|
|
|
@ -6,9 +6,9 @@ use compositing_traits::{ImageUpdate, SerializableImageData};
|
|||
use embedder_traits::UntrustedNodeAddress;
|
||||
use fxhash::{FxHashMap, FxHashSet};
|
||||
use ipc_channel::ipc::IpcSharedMemory;
|
||||
use layout_api::ImageAnimationState;
|
||||
use libc::c_void;
|
||||
use script_bindings::root::Dom;
|
||||
use script_layout_interface::ImageAnimationState;
|
||||
use style::dom::OpaqueNode;
|
||||
use webrender_api::units::DeviceIntSize;
|
||||
use webrender_api::{ImageDescriptor, ImageDescriptorFlags, ImageFormat};
|
||||
|
|
|
@ -10,10 +10,8 @@ use atomic_refcell::{AtomicRef, AtomicRefMut};
|
|||
use embedder_traits::UntrustedNodeAddress;
|
||||
use html5ever::{LocalName, Namespace, local_name, ns};
|
||||
use js::jsapi::JSObject;
|
||||
use script_layout_interface::wrapper_traits::{
|
||||
LayoutNode, ThreadSafeLayoutElement, ThreadSafeLayoutNode,
|
||||
};
|
||||
use script_layout_interface::{LayoutNodeType, StyleData};
|
||||
use layout_api::wrapper_traits::{LayoutNode, ThreadSafeLayoutElement, ThreadSafeLayoutNode};
|
||||
use layout_api::{LayoutNodeType, StyleData};
|
||||
use selectors::Element as _;
|
||||
use selectors::attr::{AttrSelectorOperation, CaseSensitivity, NamespaceConstraint};
|
||||
use selectors::bloom::{BLOOM_HASH_MASK, BloomFilter};
|
||||
|
|
|
@ -10,14 +10,14 @@ use std::fmt;
|
|||
use base::id::{BrowsingContextId, PipelineId};
|
||||
use fonts_traits::ByteIndex;
|
||||
use html5ever::{local_name, ns};
|
||||
use net_traits::image_cache::Image;
|
||||
use pixels::ImageMetadata;
|
||||
use range::Range;
|
||||
use script_layout_interface::wrapper_traits::{LayoutDataTrait, LayoutNode, ThreadSafeLayoutNode};
|
||||
use script_layout_interface::{
|
||||
use layout_api::wrapper_traits::{LayoutDataTrait, LayoutNode, ThreadSafeLayoutNode};
|
||||
use layout_api::{
|
||||
GenericLayoutData, HTMLCanvasData, HTMLMediaData, LayoutNodeType, SVGSVGData, StyleData,
|
||||
TrustedNodeAddress,
|
||||
};
|
||||
use net_traits::image_cache::Image;
|
||||
use pixels::ImageMetadata;
|
||||
use range::Range;
|
||||
use servo_arc::Arc;
|
||||
use servo_url::ServoUrl;
|
||||
use style;
|
||||
|
|
|
@ -69,6 +69,7 @@ use js::jsapi::{
|
|||
};
|
||||
use js::jsval::UndefinedValue;
|
||||
use js::rust::ParentRuntime;
|
||||
use layout_api::{LayoutConfig, LayoutFactory, ReflowGoal, ScriptThreadFactory};
|
||||
use media::WindowGLContext;
|
||||
use metrics::MAX_TASK_NS;
|
||||
use net_traits::image_cache::{ImageCache, ImageCacheResponseMessage};
|
||||
|
@ -83,7 +84,6 @@ use percent_encoding::percent_decode;
|
|||
use profile_traits::mem::{ProcessReports, ReportsChan, perform_memory_report};
|
||||
use profile_traits::time::ProfilerCategory;
|
||||
use profile_traits::time_profile;
|
||||
use script_layout_interface::{LayoutConfig, LayoutFactory, ReflowGoal, ScriptThreadFactory};
|
||||
use script_traits::{
|
||||
ConstellationInputEvent, DiscardBrowsingContext, DocumentActivity, InitialScriptState,
|
||||
NewLayoutInfo, Painter, ProgressiveWebMetricType, ScriptThreadMessage, UpdatePipelineIdReason,
|
||||
|
|
|
@ -89,6 +89,7 @@ gstreamer = { workspace = true, optional = true }
|
|||
ipc-channel = { workspace = true }
|
||||
keyboard-types = { workspace = true }
|
||||
layout = { path = "../layout" }
|
||||
layout_api = { workspace = true }
|
||||
log = { workspace = true }
|
||||
media = { path = "../media" }
|
||||
mozangle = { workspace = true }
|
||||
|
@ -99,7 +100,6 @@ profile = { path = "../profile" }
|
|||
profile_traits = { workspace = true }
|
||||
rayon = { workspace = true }
|
||||
script = { path = "../script" }
|
||||
script_layout_interface = { workspace = true }
|
||||
script_traits = { workspace = true }
|
||||
serde = { workspace = true }
|
||||
servo-media = { workspace = true }
|
||||
|
|
|
@ -116,7 +116,7 @@ use webview::WebViewInner;
|
|||
pub use webxr;
|
||||
pub use {
|
||||
background_hang_monitor, base, canvas, canvas_traits, devtools, devtools_traits, euclid, fonts,
|
||||
ipc_channel, media, net, net_traits, profile, profile_traits, script, script_layout_interface,
|
||||
ipc_channel, layout_api, media, net, net_traits, profile, profile_traits, script,
|
||||
script_traits, servo_config as config, servo_config, servo_geometry, servo_url, style,
|
||||
style_traits, webrender_api,
|
||||
};
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[package]
|
||||
name = "script_layout_interface"
|
||||
name = "layout_api"
|
||||
version.workspace = true
|
||||
authors.workspace = true
|
||||
license.workspace = true
|
||||
|
@ -8,7 +8,7 @@ publish.workspace = true
|
|||
rust-version.workspace = true
|
||||
|
||||
[lib]
|
||||
name = "script_layout_interface"
|
||||
name = "layout_api"
|
||||
path = "lib.rs"
|
||||
|
||||
[dependencies]
|
|
@ -284,7 +284,7 @@ pub trait Layout {
|
|||
fn query_text_indext(&self, node: OpaqueNode, point: Point2D<f32>) -> Option<usize>;
|
||||
}
|
||||
|
||||
/// This trait is part of `script_layout_interface` because it depends on both `script_traits`
|
||||
/// This trait is part of `layout_api` because it depends on both `script_traits`
|
||||
/// and also `LayoutFactory` from this crate. If it was in `script_traits` there would be a
|
||||
/// circular dependency.
|
||||
pub trait ScriptThreadFactory {
|
|
@ -185,12 +185,12 @@ class MachCommands(CommandBase):
|
|||
"fonts",
|
||||
"hyper_serde",
|
||||
"layout",
|
||||
"layout_api",
|
||||
"libservo",
|
||||
"metrics",
|
||||
"net",
|
||||
"net_traits",
|
||||
"pixels",
|
||||
"script_layout_interface",
|
||||
"script_traits",
|
||||
"selectors",
|
||||
"servo_config",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue