mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Move OpaqueStyleAndLayoutData to script_layout_interface.
This commit is contained in:
parent
5cab8ff8d2
commit
6aaf3e6a01
11 changed files with 35 additions and 16 deletions
|
@ -52,6 +52,7 @@ ref_filter_map = "1.0"
|
|||
ref_slice = "1.0"
|
||||
regex = "0.1.43"
|
||||
rustc-serialize = "0.3"
|
||||
script_layout_interface = {path = "../script_layout_interface"}
|
||||
script_traits = {path = "../script_traits"}
|
||||
selectors = {version = "0.6", features = ["heap_size"]}
|
||||
serde = "0.7"
|
||||
|
|
|
@ -67,6 +67,7 @@ use net_traits::{Metadata, NetworkError, ResourceThreads};
|
|||
use offscreen_gl_context::GLLimits;
|
||||
use profile_traits::mem::ProfilerChan as MemProfilerChan;
|
||||
use profile_traits::time::ProfilerChan as TimeProfilerChan;
|
||||
use script_layout_interface::OpaqueStyleAndLayoutData;
|
||||
use script_runtime::ScriptChan;
|
||||
use script_traits::{TimerEventId, TimerSource, TouchpadPressurePhase, UntrustedNodeAddress};
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
@ -328,6 +329,7 @@ no_jsmanaged_fields!(ReferrerPolicy);
|
|||
no_jsmanaged_fields!(ResourceThreads);
|
||||
no_jsmanaged_fields!(SystemTime);
|
||||
no_jsmanaged_fields!(SelectedFileId);
|
||||
no_jsmanaged_fields!(OpaqueStyleAndLayoutData);
|
||||
|
||||
impl JSTraceable for Box<ScriptChan + Send> {
|
||||
#[inline]
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
//! The core DOM types. Defines the basic DOM hierarchy as well as all the HTML elements.
|
||||
|
||||
use app_units::Au;
|
||||
use core::nonzero::NonZero;
|
||||
use devtools_traits::NodeInfo;
|
||||
use document_loader::DocumentLoader;
|
||||
use dom::attr::Attr;
|
||||
|
@ -62,6 +61,7 @@ use libc::{self, c_void, uintptr_t};
|
|||
use msg::constellation_msg::PipelineId;
|
||||
use parse::html::parse_html_fragment;
|
||||
use ref_slice::ref_slice;
|
||||
use script_layout_interface::OpaqueStyleAndLayoutData;
|
||||
use script_traits::UntrustedNodeAddress;
|
||||
use selectors::matching::matches;
|
||||
use selectors::parser::Selector;
|
||||
|
@ -184,18 +184,6 @@ enum SuppressObserver {
|
|||
Unsuppressed
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, HeapSizeOf)]
|
||||
pub struct OpaqueStyleAndLayoutData {
|
||||
#[ignore_heap_size_of = "TODO(#6910) Box value that should be counted but \
|
||||
the type lives in layout"]
|
||||
pub ptr: NonZero<*mut ()>
|
||||
}
|
||||
|
||||
#[allow(unsafe_code)]
|
||||
unsafe impl Send for OpaqueStyleAndLayoutData {}
|
||||
|
||||
no_jsmanaged_fields!(OpaqueStyleAndLayoutData);
|
||||
|
||||
impl Node {
|
||||
/// Sends the style and layout data, if any, back to the layout thread to be destroyed.
|
||||
pub fn dispose(&self, data: OpaqueStyleAndLayoutData) {
|
||||
|
|
|
@ -14,6 +14,7 @@ use ipc_channel::ipc::{IpcReceiver, IpcSender};
|
|||
use msg::constellation_msg::{PanicMsg, PipelineId, WindowSizeData};
|
||||
use net_traits::image_cache_thread::ImageCacheThread;
|
||||
use profile_traits::mem::ReportsChan;
|
||||
use script_layout_interface::OpaqueStyleAndLayoutData;
|
||||
use script_traits::{ConstellationControlMsg, LayoutControlMsg, LayoutMsg as ConstellationMsg};
|
||||
use script_traits::{StackingContextScrollState, UntrustedNodeAddress};
|
||||
use std::sync::Arc;
|
||||
|
@ -37,7 +38,6 @@ pub use dom::htmlobjectelement::is_image_data;
|
|||
pub use dom::node::{CAN_BE_FRAGMENTED, HAS_CHANGED, HAS_DIRTY_DESCENDANTS, IS_DIRTY};
|
||||
pub use dom::node::LayoutNodeHelpers;
|
||||
pub use dom::node::Node;
|
||||
pub use dom::node::OpaqueStyleAndLayoutData;
|
||||
pub use dom::node::TrustedNodeAddress;
|
||||
pub use dom::text::Text;
|
||||
|
||||
|
|
|
@ -68,6 +68,7 @@ extern crate ref_filter_map;
|
|||
extern crate ref_slice;
|
||||
extern crate regex;
|
||||
extern crate rustc_serialize;
|
||||
extern crate script_layout_interface;
|
||||
extern crate script_traits;
|
||||
extern crate selectors;
|
||||
extern crate serde;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue