aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout/layout_thread.rs
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2016-06-20 12:54:20 -0500
committerGitHub <noreply@github.com>2016-06-20 12:54:20 -0500
commitee8c5c5a67e1181eca163d3cd1189866d230b8f0 (patch)
treed3eccfea7359634f5e01f3cdbe27dc6817d3c143 /components/layout/layout_thread.rs
parent33bda9c207001b1f4f0676cbab3222218e94e987 (diff)
parentb56821a01f8ec8f28c37cb46568340ecb145834c (diff)
downloadservo-ee8c5c5a67e1181eca163d3cd1189866d230b8f0.tar.gz
servo-ee8c5c5a67e1181eca163d3cd1189866d230b8f0.zip
Auto merge of #11754 - Ms2ger:wrapper-traits-prep2, r=nox
Move ServoLayoutNode and related structs to script. <!-- Reviewable:start --> This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11754) <!-- Reviewable:end -->
Diffstat (limited to 'components/layout/layout_thread.rs')
-rw-r--r--components/layout/layout_thread.rs19
1 files changed, 11 insertions, 8 deletions
diff --git a/components/layout/layout_thread.rs b/components/layout/layout_thread.rs
index bedc72791c6..a65b1452a09 100644
--- a/components/layout/layout_thread.rs
+++ b/components/layout/layout_thread.rs
@@ -29,8 +29,7 @@ use gfx::font_context;
use gfx::paint_thread::LayoutToPaintMsg;
use gfx_traits::{color, Epoch, FragmentType, LayerId, ScrollPolicy, StackingContextId};
use heapsize::HeapSizeOf;
-use incremental::LayoutDamageComputation;
-use incremental::{REPAINT, STORE_OVERFLOW, REFLOW_OUT_OF_FLOW, REFLOW, REFLOW_ENTIRE_DOCUMENT};
+use incremental::{LayoutDamageComputation, REFLOW_ENTIRE_DOCUMENT};
use ipc_channel::ipc::{self, IpcReceiver, IpcSender};
use ipc_channel::router::ROUTER;
use layout_debug;
@@ -47,15 +46,19 @@ use query::process_offset_parent_query;
use query::{LayoutRPCImpl, process_content_box_request, process_content_boxes_request};
use query::{process_node_geometry_request, process_node_layer_id_request, process_node_scroll_area_request};
use query::{process_node_overflow_request, process_resolved_style_request, process_margin_style_query};
-use script::layout_interface::OpaqueStyleAndLayoutData;
-use script::layout_interface::{LayoutRPC, OffsetParentResponse, NodeOverflowResponse, MarginStyleResponse};
-use script::layout_interface::{Msg, NewLayoutThreadInfo, Reflow, ReflowQueryType, ScriptReflow};
-use script::reporter::CSSErrorReporter;
+use script::layout_wrapper::ServoLayoutNode;
+use script_layout_interface::message::{Msg, NewLayoutThreadInfo, Reflow, ReflowQueryType, ScriptReflow};
+use script_layout_interface::reporter::CSSErrorReporter;
+use script_layout_interface::restyle_damage::{REPAINT, STORE_OVERFLOW, REFLOW_OUT_OF_FLOW, REFLOW};
+use script_layout_interface::rpc::{LayoutRPC, MarginStyleResponse, NodeOverflowResponse, OffsetParentResponse};
+use script_layout_interface::wrapper_traits::LayoutNode;
+use script_layout_interface::{OpaqueStyleAndLayoutData, PartialStyleAndLayoutData};
use script_traits::{ConstellationControlMsg, LayoutControlMsg, LayoutMsg as ConstellationMsg};
use script_traits::{StackingContextScrollState, UntrustedNodeAddress};
use sequential;
use serde_json;
use std::borrow::ToOwned;
+use std::cell::RefCell;
use std::collections::HashMap;
use std::hash::BuildHasherDefault;
use std::ops::{Deref, DerefMut};
@@ -84,7 +87,7 @@ use util::thread_state;
use util::workqueue::WorkQueue;
use webrender_helpers::{WebRenderDisplayListConverter, WebRenderFrameBuilder};
use webrender_traits;
-use wrapper::{LayoutNode, NonOpaqueStyleAndLayoutData, ServoLayoutNode};
+use wrapper::{LayoutNodeLayoutData, NonOpaqueStyleAndLayoutData};
/// The number of screens of data we're allowed to generate display lists for in each direction.
pub const DISPLAY_PORT_SIZE_FACTOR: i32 = 8;
@@ -1480,7 +1483,7 @@ impl LayoutThread {
/// Handles a message to destroy layout data. Layout data must be destroyed on *this* thread
/// because the struct type is transmuted to a different type on the script side.
unsafe fn handle_reap_style_and_layout_data(&self, data: OpaqueStyleAndLayoutData) {
- let ptr: *mut () = *data.ptr;
+ let ptr: *mut RefCell<PartialStyleAndLayoutData> = *data.ptr;
let non_opaque: NonOpaqueStyleAndLayoutData = ptr as *mut _;
let _ = Box::from_raw(non_opaque);
}