mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
layout: Remove IndependentNonReplacedContents
(#37971)
With the work to unify the layout logic for replaced and non-replaced boxes (#37942), I think the `IndependentNonReplacedContents` enum does no longer make much sense. Therefore, this removes `IndependentNonReplacedContents`, merging its values into `IndependentFormattingContextContents`. The methods defined on `IndependentFormattingContextContents` can now be on `IndependentFormattingContext`, in particular this implies that the layout results of a replaced box will now be cached. Testing: Unneeded (no behavior change) This part of #37942 Signed-off-by: Oriol Brufau <obrufau@igalia.com>
This commit is contained in:
parent
07247cd4fd
commit
ff050b71fa
7 changed files with 245 additions and 323 deletions
|
@ -18,7 +18,6 @@ use crate::flow::inline::construct::InlineFormattingContextBuilder;
|
|||
use crate::flow::{BlockContainer, BlockFormattingContext};
|
||||
use crate::formatting_contexts::{
|
||||
IndependentFormattingContext, IndependentFormattingContextContents,
|
||||
IndependentNonReplacedContents,
|
||||
};
|
||||
use crate::layout_box_base::LayoutBoxBase;
|
||||
use crate::style_ext::{ComputedValuesExt, DisplayGeneratingBox};
|
||||
|
@ -72,9 +71,7 @@ impl<'dom> ModernContainerJob<'dom> {
|
|||
let info: &NodeAndStyleInfo = anonymous_info;
|
||||
let formatting_context = IndependentFormattingContext {
|
||||
base: LayoutBoxBase::new(info.into(), info.style.clone()),
|
||||
contents: IndependentFormattingContextContents::NonReplaced(
|
||||
IndependentNonReplacedContents::Flow(block_formatting_context),
|
||||
),
|
||||
contents: IndependentFormattingContextContents::Flow(block_formatting_context),
|
||||
};
|
||||
|
||||
Some(ModernItem {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue