mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
layout: Add a new MARGINS_CANNOT_COLLAPSE
flow flag.
This commit is contained in:
parent
be252371ea
commit
b809aae74b
2 changed files with 7 additions and 2 deletions
|
@ -36,7 +36,7 @@ use floats::{ClearType, FloatKind, Floats, PlacementInfo};
|
|||
use flow::{self, BaseFlow, EarlyAbsolutePositionInfo, Flow, FlowClass, ForceNonfloatedFlag};
|
||||
use flow::{BLOCK_POSITION_IS_STATIC, CLEARS_LEFT, CLEARS_RIGHT};
|
||||
use flow::{CONTAINS_TEXT_OR_REPLACED_FRAGMENTS, INLINE_POSITION_IS_STATIC};
|
||||
use flow::{FragmentationContext, PreorderFlowTraversal};
|
||||
use flow::{FragmentationContext, MARGINS_CANNOT_COLLAPSE, PreorderFlowTraversal};
|
||||
use flow::{ImmutableFlowUtils, LateAbsolutePositionInfo, MutableFlowUtils, OpaqueFlow};
|
||||
use flow::IS_ABSOLUTELY_POSITIONED;
|
||||
use flow_list::FlowList;
|
||||
|
@ -1911,7 +1911,9 @@ impl Flow for BlockFlow {
|
|||
self.fragment.restyle_damage.remove(REFLOW_OUT_OF_FLOW | REFLOW);
|
||||
}
|
||||
None
|
||||
} else if self.is_root() || self.formatting_context_type() != FormattingContextType::None {
|
||||
} else if self.is_root() ||
|
||||
self.formatting_context_type() != FormattingContextType::None ||
|
||||
self.base.flags.contains(MARGINS_CANNOT_COLLAPSE) {
|
||||
// Root element margins should never be collapsed according to CSS § 8.3.1.
|
||||
debug!("assign_block_size: assigning block_size for root flow {:?}",
|
||||
flow::base(self).debug_id());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue