Fix duplicate stacking context creation for anonymous Flows

Anonymous nodes were previously creating duplicate stacking contexts,
one for each node in the anonymous node chain. This change eliminates
that for tables.

Additionally the use of stacking context ids based on node addresses is
no longer necessary since stacking contexts no longer control scrolling.
This is the first step in eliminating the dependency between node
addresses and ClipScrollNodes which causes issues like #16425.
This commit is contained in:
Martin Robinson 2017-10-16 13:41:01 +02:00
parent c1e0889971
commit 36fa7e4c44
9 changed files with 72 additions and 42 deletions

View file

@ -11,7 +11,7 @@ use block::{BlockFlow, CandidateBSizeIterator, ISizeAndMarginsComputer};
use block::{ISizeConstraintInput, ISizeConstraintSolution};
use context::LayoutContext;
use display_list_builder::{BlockFlowDisplayListBuilding, BorderPaintingMode};
use display_list_builder::{DisplayListBuildState, StackingContextCollectionFlags};
use display_list_builder::{DisplayListBuildState, NEVER_CREATES_STACKING_CONTEXT};
use display_list_builder::StackingContextCollectionState;
use euclid::Point2D;
use flow;
@ -504,8 +504,8 @@ impl Flow for TableFlow {
}
fn collect_stacking_contexts(&mut self, state: &mut StackingContextCollectionState) {
self.block_flow.collect_stacking_contexts_for_block(state,
StackingContextCollectionFlags::empty());
// Stacking contexts are collected by the table wrapper.
self.block_flow.collect_stacking_contexts_for_block(state, NEVER_CREATES_STACKING_CONTEXT);
}
fn repair_style(&mut self, new_style: &::ServoArc<ComputedValues>) {