aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/main/layout/box.rs
diff options
context:
space:
mode:
authorPatrick Walton <pcwalton@mimiga.net>2013-11-09 21:39:39 -0800
committerPatrick Walton <pcwalton@mimiga.net>2013-11-18 11:24:11 -0800
commit155befe10dc56cfb2dfbf0cca7b652293dba9753 (patch)
tree43c3e51689cd42a3fb623eda84740f49dd667f5e /src/components/main/layout/box.rs
parent37f9427b6c53b90234e82d219217a97c10811243 (diff)
downloadservo-155befe10dc56cfb2dfbf0cca7b652293dba9753.tar.gz
servo-155befe10dc56cfb2dfbf0cca7b652293dba9753.zip
Rewrite flow construction to be incrementalizable and parallelizable.
This replaces flow construction with a strict bottom-up tree traversal, allowing for parallelism. Each step of the traversal creates a flow or a `ConstructionItem`, similar to how Gecko works. {ib} splits are handled by not creating `InlineFlow`s until the containing block is reached. This should be able to be incrementalized by storing the `Flow` from layout to layout, and performing fixups during flow construction and/or wiping containing blocks in a previous pass.
Diffstat (limited to 'src/components/main/layout/box.rs')
-rw-r--r--src/components/main/layout/box.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/components/main/layout/box.rs b/src/components/main/layout/box.rs
index e2ca7b5d164..7f4514e3c4e 100644
--- a/src/components/main/layout/box.rs
+++ b/src/components/main/layout/box.rs
@@ -225,6 +225,7 @@ pub struct ImageRenderBox {
}
impl ImageRenderBox {
+ #[inline]
pub fn new(base: RenderBoxBase, image_url: Url, local_image_cache: @mut LocalImageCache)
-> ImageRenderBox {
assert!(base.node.is_image_element());
@@ -523,6 +524,7 @@ pub struct UnscannedTextRenderBox {
impl UnscannedTextRenderBox {
/// Creates a new instance of `UnscannedTextRenderBox`.
+ #[inline(always)]
pub fn new(base: RenderBoxBase) -> UnscannedTextRenderBox {
assert!(base.node.is_text());