Generalize the rest of layout to operate on generic Layout*.

There wasn't a good way to split this up, unfortunately.

With this change, the only remaining usage of the Servo-specific structures is
in layout_task, where the root node is received from the script task. \o/
This commit is contained in:
Bobby Holley 2015-11-20 09:51:05 -08:00
parent 77a8091996
commit cf33f00018
10 changed files with 198 additions and 156 deletions

View file

@ -25,7 +25,7 @@ use table::InternalTable;
use table_row::{CollapsedBorder, CollapsedBorderProvenance};
use util::logical_geometry::{LogicalMargin, LogicalRect, LogicalSize, WritingMode};
use util::print_tree::PrintTree;
use wrapper::{ServoThreadSafeLayoutNode, ThreadSafeLayoutNode};
use wrapper::{ThreadSafeLayoutNode};
/// A table formatting context.
#[derive(RustcEncodable)]
@ -45,10 +45,8 @@ pub struct TableCellFlow {
}
impl TableCellFlow {
pub fn from_node_fragment_and_visibility_flag(node: &ServoThreadSafeLayoutNode,
fragment: Fragment,
visible: bool)
-> TableCellFlow {
pub fn from_node_fragment_and_visibility_flag<'ln, N: ThreadSafeLayoutNode<'ln>>(
node: &N, fragment: Fragment, visible: bool) -> TableCellFlow {
TableCellFlow {
block_flow: BlockFlow::from_fragment(fragment, None),
collapsed_borders: CollapsedBordersForCell::new(),