mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +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
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue