mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Remove dead (and incorrect) logic about vertical overconstrainment (#33696)
BoxFragment::new() had some logic to mark relative positioned boxes with both insets in the same axis set to something different than `auto` as overconstrained. However, this was dead code, since overconstrainment is checked for getComputedStyle queries, but not for relative positioning. Also, the logic was wrong: it was detecting vertical overconstrainment by checking `left` and `bottom` (instead of `top` and `bottom`). So it can just be removed. Signed-off-by: Oriol Brufau <obrufau@igalia.com>
This commit is contained in:
parent
72eeebe311
commit
76cdb0173e
1 changed files with 1 additions and 10 deletions
|
@ -96,15 +96,6 @@ impl BoxFragment {
|
|||
clearance: Option<Au>,
|
||||
block_margins_collapsed_with_children: CollapsedBlockMargins,
|
||||
) -> BoxFragment {
|
||||
let position = style.get_box().position;
|
||||
let insets = style.get_position();
|
||||
let width_overconstrained = position == ComputedPosition::Relative &&
|
||||
!insets.left.is_auto() &&
|
||||
!insets.right.is_auto();
|
||||
let height_overconstrained = position == ComputedPosition::Relative &&
|
||||
!insets.left.is_auto() &&
|
||||
!insets.bottom.is_auto();
|
||||
|
||||
Self::new_with_overconstrained(
|
||||
base_fragment_info,
|
||||
style,
|
||||
|
@ -115,7 +106,7 @@ impl BoxFragment {
|
|||
margin,
|
||||
clearance,
|
||||
block_margins_collapsed_with_children,
|
||||
PhysicalSize::new(width_overconstrained, height_overconstrained),
|
||||
PhysicalSize::default(),
|
||||
)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue