Separate stacking context collection and display list building state

These are two different passes during layout, but previously they
shared a state object. While some of the members are the same, many are
different so we separate them out into two separate objects. We also
change the HashMaps of these state objects to use the FnvHashMap.
This commit is contained in:
Martin Robinson 2017-08-30 20:03:44 +02:00
parent bffe158fa4
commit ee46bc57ed
15 changed files with 153 additions and 94 deletions

View file

@ -31,6 +31,7 @@ use app_units::{Au, MAX_AU};
use context::LayoutContext;
use display_list_builder::{BlockFlowDisplayListBuilding, BorderPaintingMode};
use display_list_builder::{DisplayListBuildState, EstablishContainingBlock};
use display_list_builder::StackingContextCollectionState;
use euclid::{Point2D, Rect, SideOffsets2D, Size2D};
use floats::{ClearType, FloatKind, Floats, PlacementInfo};
use flow::{self, BaseFlow, EarlyAbsolutePositionInfo, Flow, FlowClass, ForceNonfloatedFlag};
@ -2150,7 +2151,7 @@ impl Flow for BlockFlow {
}
}
fn collect_stacking_contexts(&mut self, state: &mut DisplayListBuildState) {
fn collect_stacking_contexts(&mut self, state: &mut StackingContextCollectionState) {
self.collect_stacking_contexts_for_block(state, EstablishContainingBlock::Yes);
}