aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout/incremental.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/layout/incremental.rs')
-rw-r--r--components/layout/incremental.rs18
1 files changed, 9 insertions, 9 deletions
diff --git a/components/layout/incremental.rs b/components/layout/incremental.rs
index bbb2c89f55f..ff1e0813ccd 100644
--- a/components/layout/incremental.rs
+++ b/components/layout/incremental.rs
@@ -2,7 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use flow::{self, FlowFlags, Flow};
+use flow::{FlowFlags, Flow, GetBaseFlow};
use style::computed_values::float::T as Float;
use style::selector_parser::RestyleDamage;
use style::servo::restyle_damage::ServoRestyleDamage;
@@ -30,20 +30,20 @@ pub trait LayoutDamageComputation {
impl<'a> LayoutDamageComputation for &'a mut Flow {
fn compute_layout_damage(self) -> SpecialRestyleDamage {
let mut special_damage = SpecialRestyleDamage::empty();
- let is_absolutely_positioned = flow::base(self).flags.contains(FlowFlags::IS_ABSOLUTELY_POSITIONED);
+ let is_absolutely_positioned = self.base().flags.contains(FlowFlags::IS_ABSOLUTELY_POSITIONED);
// In addition to damage, we use this phase to compute whether nodes affect CSS counters.
let mut has_counter_affecting_children = false;
{
- let self_base = flow::mut_base(self);
+ let self_base = self.mut_base();
// Take a snapshot of the parent damage before updating it with damage from children.
let parent_damage = self_base.restyle_damage;
for kid in self_base.children.iter_mut() {
let child_is_absolutely_positioned =
- flow::base(kid).flags.contains(FlowFlags::IS_ABSOLUTELY_POSITIONED);
- flow::mut_base(kid).restyle_damage.insert(
+ kid.base().flags.contains(FlowFlags::IS_ABSOLUTELY_POSITIONED);
+ kid.mut_base().restyle_damage.insert(
parent_damage.damage_for_child(is_absolutely_positioned,
child_is_absolutely_positioned));
{
@@ -51,16 +51,16 @@ impl<'a> LayoutDamageComputation for &'a mut Flow {
special_damage.insert(kid.compute_layout_damage());
}
self_base.restyle_damage
- .insert(flow::base(kid).restyle_damage.damage_for_parent(
+ .insert(kid.base().restyle_damage.damage_for_parent(
child_is_absolutely_positioned));
has_counter_affecting_children = has_counter_affecting_children ||
- flow::base(kid).flags.intersects(FlowFlags::AFFECTS_COUNTERS |
+ kid.base().flags.intersects(FlowFlags::AFFECTS_COUNTERS |
FlowFlags::HAS_COUNTER_AFFECTING_CHILDREN);
}
}
- let self_base = flow::mut_base(self);
+ let self_base = self.mut_base();
if self_base.flags.float_kind() != Float::None &&
self_base.restyle_damage.intersects(ServoRestyleDamage::REFLOW) {
special_damage.insert(SpecialRestyleDamage::REFLOW_ENTIRE_DOCUMENT);
@@ -76,7 +76,7 @@ impl<'a> LayoutDamageComputation for &'a mut Flow {
}
fn reflow_entire_document(self) {
- let self_base = flow::mut_base(self);
+ let self_base = self.mut_base();
self_base.restyle_damage.insert(RestyleDamage::rebuild_and_reflow());
self_base.restyle_damage.remove(ServoRestyleDamage::RECONSTRUCT_FLOW);
for kid in self_base.children.iter_mut() {