mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
Disable remaining reflow traversal pruning for now
We don't reuse Flow objects between reflows, so we have no old values to fall back to. I think this used to work because FlowContexts (as they were called then) were stored in a DOM node's LayoutData and reused. But it's possible that it never really worked, and my testing when I landed the restyle damage code was insufficient (I didn't understand the layout code nearly as well back then).
This commit is contained in:
parent
0238410b47
commit
53747638a1
1 changed files with 7 additions and 5 deletions
|
@ -15,7 +15,7 @@ use layout::extra::LayoutAuxMethods;
|
|||
use layout::flow::{Flow, ImmutableFlowUtils, MutableFlowUtils, PreorderFlowTraversal};
|
||||
use layout::flow::{PostorderFlowTraversal};
|
||||
use layout::flow;
|
||||
use layout::incremental::{RestyleDamage, BubbleWidths};
|
||||
use layout::incremental::{RestyleDamage};
|
||||
use layout::util::{LayoutData, LayoutDataAccess};
|
||||
|
||||
use extra::arc::{Arc, RWArc, MutexArc};
|
||||
|
@ -143,10 +143,13 @@ impl<'self> PostorderFlowTraversal for BubbleWidthsTraversal<'self> {
|
|||
true
|
||||
}
|
||||
|
||||
// FIXME: We can't prune until we start reusing flows
|
||||
/*
|
||||
#[inline]
|
||||
fn should_prune(&mut self, flow: &mut Flow) -> bool {
|
||||
flow::mut_base(flow).restyle_damage.lacks(BubbleWidths)
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
/// The assign-widths traversal. In Gecko this corresponds to `Reflow`.
|
||||
|
@ -372,10 +375,9 @@ impl LayoutTask {
|
|||
layout_context: &mut LayoutContext) {
|
||||
let _ = layout_root.traverse_postorder(&mut BubbleWidthsTraversal(layout_context));
|
||||
|
||||
// FIXME(kmc): We want to do
|
||||
// for flow in layout_root.traverse_preorder_prune(|f|
|
||||
// f.restyle_damage().lacks(Reflow))
|
||||
// but FloatContext values can't be reused, so we need to recompute them every time.
|
||||
// FIXME(kmc): We want to prune nodes without the Reflow restyle damage
|
||||
// bit, but FloatContext values can't be reused, so we need to
|
||||
// recompute them every time.
|
||||
// NOTE: this currently computes borders, so any pruning should separate that operation out.
|
||||
let _ = layout_root.traverse_preorder(&mut AssignWidthsTraversal(layout_context));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue