layout_2020: Add support for hoisting positioned fragments in inline boxes

Add support for tracking containing blocks when doing inline layout.
This requires setting up a PositioningContext for inline boxes when
necessary. Instead of using the PositioningContext helper methods
and we reuse the contexts between line breaks.

Fixes #25279.
This commit is contained in:
Martin Robinson 2020-03-18 13:14:51 +01:00
parent b945de4ea9
commit bd06227a60
8 changed files with 59 additions and 24 deletions

View file

@ -245,7 +245,9 @@ impl ComputedValuesExt for ComputedValues {
/// Returns true if this style establishes a containing block for all descendants
/// including fixed and absolutely positioned ones.
fn establishes_containing_block_for_all_descendants(&self) -> bool {
if self.has_transform_or_perspective() {
if self.get_box().display.outside() != stylo::DisplayOutside::Inline &&
self.has_transform_or_perspective()
{
return true;
}