servo: layout -> layout_task. Fixes a bunch of ugly imports.

Source-Repo: https://github.com/servo/servo
Source-Revision: b5b50e5d2058a4a99c418c4e3effc59eed128cbe

--HG--
rename : servo/src/servo/layout/layout.rs => servo/src/servo/layout/layout_task.rs
This commit is contained in:
Patrick Walton 2012-06-14 14:59:05 -07:00
Родитель 4a3def20a7
Коммит 5fe84b2870
11 изменённых файлов: 33 добавлений и 28 удалений

Просмотреть файл

@ -1,11 +1,16 @@
#[doc="
The content task is the main task that runs JavaScript and spawns layout
tasks.
"]
export msg, ping;
export content;
import result::extensions;
import dom::rcu::writer_methods;
import dom::style;
import dom=dom::base;
import layout::layout;
import dom = dom::base;
import layout::layout_task;
import js::rust::methods;
enum msg {
@ -20,17 +25,17 @@ enum ping {
// sends a ping to layout and awaits the response.
fn join_layout(scope: dom::node_scope,
to_layout: chan<layout::msg>) {
to_layout: chan<layout_task::msg>) {
if scope.is_reader_forked() {
comm::listen { |ch|
to_layout.send(layout::ping(ch));
to_layout.send(layout_task::ping(ch));
ch.recv();
}
scope.reader_joined();
}
}
fn content(to_layout: chan<layout::msg>) -> chan<msg> {
fn content(to_layout: chan<layout_task::msg>) -> chan<msg> {
task::spawn_listener::<msg> {|from_master|
let scope = dom::node_scope();
let rt = js::rust::rt();
@ -75,7 +80,7 @@ fn content(to_layout: chan<layout::msg>) -> chan<msg> {
join_layout(scope, to_layout);
// Send new document to layout.
to_layout.send(layout::build(root, css_rules));
to_layout.send(layout_task::build(root, css_rules));
// Indicate that reader was forked so any further
// changes will be isolated.
@ -102,7 +107,7 @@ fn content(to_layout: chan<layout::msg>) -> chan<msg> {
}
}
exit {
to_layout.send(layout::exit);
to_layout.send(layout_task::exit);
break;
}
}

Просмотреть файл

@ -12,7 +12,7 @@ fn engine<S: renderer::sink send copy>(sink: S) -> comm::chan<msg> {
let renderer = renderer::renderer(sink);
// The layout task
let layout = layout::layout::layout(renderer);
let layout = layout::layout_task::layout(renderer);
// The content task
let content = content::content(layout);
@ -29,7 +29,7 @@ fn engine<S: renderer::sink send copy>(sink: S) -> comm::chan<msg> {
}
exit(sender) {
content.send(content::exit);
layout.send(layout::layout::exit);
layout.send(layout::layout_task::exit);
listen {|resp_ch|
renderer.send(renderer::exit(resp_ch));
resp_ch.recv();

Просмотреть файл

@ -9,10 +9,10 @@ import geom::point::Point2D;
import geom::rect::Rect;
import geom::size::Size2D;
import image::base::image;
import /*layout::*/block::block_layout_methods;
import /*layout::*/inline::inline_layout_methods;
import /*layout::*/style::style::*;
import /*layout::*/text::*;
import layout::block::block_layout_methods;
import layout::inline::inline_layout_methods;
import layout::style::style::*;
import layout::text::*;
import util::tree;
enum box_kind {

Просмотреть файл

@ -3,7 +3,7 @@
import geom::point::Point2D;
import geom::size::Size2D;
import gfx::geometry::au;
import /*layout::*/base::*; // FIXME: Can't get around import *; resolve bug.
import layout::base::*; // FIXME: Can't get around import *; resolve bug.
import util::tree;
#[doc="The public block layout methods."]

Просмотреть файл

@ -4,11 +4,11 @@ import dom::base::{element, es_div, es_img, nk_element, nk_text, node};
import dom::style::{display_type, di_block, di_inline, di_none};
import dom::rcu::reader_methods;
import gfx::geometry;
import /*layout::*/base::{appearance, bk_block, bk_inline, bk_intrinsic};
import /*layout::*/base::{bk_text, box, box_kind, btree, node_methods, ntree};
import /*layout::*/base::{rd_tree_ops, wr_tree_ops};
import /*layout::*/style::style::{style_methods};
import /*layout::*/text::text_box;
import layout::base::{appearance, bk_block, bk_inline, bk_intrinsic};
import layout::base::{bk_text, box, box_kind, btree, node_methods, ntree};
import layout::base::{rd_tree_ops, wr_tree_ops};
import layout::style::style::{style_methods};
import layout::text::text_box;
import util::tree;
import option::is_none;

Просмотреть файл

@ -5,8 +5,8 @@ import dom::rcu::reader_methods;
import geom::point::Point2D;
import geom::size::Size2D;
import gfx::geometry::au;
import /*layout::*/base::*; // FIXME: Can't get around import *; resolve bug.
import /*layout::*/style::style::*; // ditto
import layout::base::*; // FIXME: Can't get around import *; resolve bug.
import layout::style::style::*; // ditto
import util::tree;
#[doc="The main reflow routine for inline layout."]

Просмотреть файл

@ -14,9 +14,9 @@ import gfx::renderer;
import dom::base::node;
import dom::rcu::scope;
import dom::style::stylesheet;
import /*layout::*/base::*;
import /*layout::*/style::apply::apply_style_methods;
import /*layout::*/style::style::style_methods;
import layout::base::*;
import layout::style::apply::apply_style_methods;
import layout::style::style::style_methods;
import box_builder::box_builder_methods;
import dl = display_list;

Просмотреть файл

@ -2,7 +2,7 @@
import dom::base::{es_img, nk_element, node};
import dom::rcu::reader_methods;
import image::base::load;
import /*layout::*/base::*;
import layout::base::*;
import style::style_methods;
impl apply_style_methods for @box {

Просмотреть файл

@ -6,7 +6,7 @@ import dom::base::{element, es_div, es_head, es_img, nk_element, nk_text};
import dom::base::{node};
import dom::base::node_kind;
import dom::rcu::reader_methods;
import /*layout::*/base::*; // FIXME: resolve bug requires *
import layout::base::*; // FIXME: resolve bug requires *
import matching::matching_methods;
type computed_style = {mut display : display_type,

Просмотреть файл

@ -2,7 +2,7 @@
import geom::size::Size2D;
import gfx::geometry::au;
import /*layout::*/base::*; // FIXME: Can't get around import *; resolve bug.
import layout::base::*; // FIXME: Can't get around import *; resolve bug.
import servo_text::text_run::text_run;
class text_box {

Просмотреть файл

@ -45,7 +45,7 @@ mod layout {
mod box_builder;
mod display_list;
mod inline;
mod layout;
mod layout_task;
mod text;
}