mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
style: Make display: -moz-box more similar to other display types for block layout.
It is unexpected (see bug) that a -moz-box is affected by baseline alignment. Make -moz-box be block-outside, and -moz-inline-box be inline-outside, instead of the bespoke thing we have now. This is more similar to everything else, and fixes the bug. Differential Revision: https://phabricator.services.mozilla.com/D58726
This commit is contained in:
parent
219c0f6328
commit
718a9b1f05
1 changed files with 2 additions and 14 deletions
|
@ -98,8 +98,6 @@ pub enum DisplayInside {
|
|||
#[cfg(feature = "gecko")]
|
||||
MozBox,
|
||||
#[cfg(feature = "gecko")]
|
||||
MozInlineBox,
|
||||
#[cfg(feature = "gecko")]
|
||||
MozGrid,
|
||||
#[cfg(feature = "gecko")]
|
||||
MozGridGroup,
|
||||
|
@ -221,9 +219,9 @@ impl Display {
|
|||
|
||||
/// XUL boxes.
|
||||
#[cfg(feature = "gecko")]
|
||||
pub const MozBox: Self = Self::new(DisplayOutside::XUL, DisplayInside::MozBox);
|
||||
pub const MozBox: Self = Self::new(DisplayOutside::Block, DisplayInside::MozBox);
|
||||
#[cfg(feature = "gecko")]
|
||||
pub const MozInlineBox: Self = Self::new(DisplayOutside::XUL, DisplayInside::MozInlineBox);
|
||||
pub const MozInlineBox: Self = Self::new(DisplayOutside::Inline, DisplayInside::MozBox);
|
||||
#[cfg(feature = "gecko")]
|
||||
pub const MozGrid: Self = Self::new(DisplayOutside::XUL, DisplayInside::MozGrid);
|
||||
#[cfg(feature = "gecko")]
|
||||
|
@ -375,11 +373,6 @@ impl Display {
|
|||
};
|
||||
Display::from3(DisplayOutside::Block, inside, self.is_list_item())
|
||||
},
|
||||
#[cfg(feature = "gecko")]
|
||||
DisplayOutside::XUL => match self.inside() {
|
||||
DisplayInside::MozInlineBox | DisplayInside::MozBox => Display::MozBox,
|
||||
_ => Display::Block,
|
||||
},
|
||||
DisplayOutside::Block | DisplayOutside::None => *self,
|
||||
#[cfg(any(feature = "servo-layout-2013", feature = "gecko"))]
|
||||
_ => Display::Block,
|
||||
|
@ -400,11 +393,6 @@ impl Display {
|
|||
};
|
||||
Display::from3(DisplayOutside::Inline, inside, self.is_list_item())
|
||||
},
|
||||
#[cfg(feature = "gecko")]
|
||||
DisplayOutside::XUL => match self.inside() {
|
||||
DisplayInside::MozBox => Display::MozInlineBox,
|
||||
_ => *self,
|
||||
},
|
||||
_ => *self,
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue