aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout/construct.rs
diff options
context:
space:
mode:
authorbors-servo <metajack+bors@gmail.com>2014-10-20 12:54:34 -0600
committerbors-servo <metajack+bors@gmail.com>2014-10-20 12:54:34 -0600
commitf6941b35e3b945f4a6dcd2cf03daa345ad2bcaed (patch)
treeca0c3c5290188beae7e813553c37418abbffa134 /components/layout/construct.rs
parent852378209badb936e8929c31501cb8cabeea6bc5 (diff)
parent81bd3cbd9d2e8da5bd7dd281e083e218d928c202 (diff)
downloadservo-f6941b35e3b945f4a6dcd2cf03daa345ad2bcaed.tar.gz
servo-f6941b35e3b945f4a6dcd2cf03daa345ad2bcaed.zip
auto merge of #3715 : cgaebel/servo/fix-table-percentage-width, r=pcwalton
This also enables incremental reflow by default. \o/ r? @pcwalton
Diffstat (limited to 'components/layout/construct.rs')
-rw-r--r--components/layout/construct.rs12
1 files changed, 3 insertions, 9 deletions
diff --git a/components/layout/construct.rs b/components/layout/construct.rs
index 5ebafbaba6b..c69d04d1d49 100644
--- a/components/layout/construct.rs
+++ b/components/layout/construct.rs
@@ -10,12 +10,6 @@
//! intermediate data that goes with a DOM node and hasn't found its "home" yet-maybe it's a box,
//! maybe it's an absolute or fixed position thing that hasn't found its containing block yet.
//! Construction items bubble up the tree from children to parents until they find their homes.
-//!
-//! TODO(pcwalton): There is no incremental reflow yet. This scheme requires that nodes either have
-//! weak references to flows or that there be some mechanism to efficiently (O(1) time) "blow
-//! apart" a flow tree and have the flows migrate "home" to their respective DOM nodes while we
-//! perform flow tree construction. The precise mechanism for this will take some experimentation
-//! to get right.
#![deny(unsafe_block)]
@@ -85,11 +79,11 @@ pub enum ConstructionResult {
impl ConstructionResult {
pub fn swap_out(&mut self) -> ConstructionResult {
- if opts::get().incremental_layout {
- return (*self).clone();
+ if opts::get().nonincremental_layout {
+ return mem::replace(self, NoConstructionResult)
}
- mem::replace(self, NoConstructionResult)
+ (*self).clone()
}
pub fn debug_id(&self) -> uint {