mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Flow inlines around floats (#30243)
This implements the rest of the bulk of float support. Now inline element flow around floats and floats can be pushed down by inline elements before them. Co-authored-by: Oriol Brufau <obrufau@igalia.com>
This commit is contained in:
parent
cb2c876919
commit
96c51ba2e7
63 changed files with 410 additions and 220 deletions
|
@ -105,11 +105,11 @@ where
|
|||
}
|
||||
}
|
||||
|
||||
impl flow_relative::Vec2<Length> {
|
||||
impl<T: Zero> flow_relative::Vec2<T> {
|
||||
pub fn zero() -> Self {
|
||||
Self {
|
||||
inline: Length::zero(),
|
||||
block: Length::zero(),
|
||||
inline: T::zero(),
|
||||
block: T::zero(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -155,7 +155,7 @@ impl flow_relative::Vec2<Option<&'_ LengthPercentage>> {
|
|||
}
|
||||
}
|
||||
|
||||
impl flow_relative::Rect<Length> {
|
||||
impl<T: Zero> flow_relative::Rect<T> {
|
||||
pub fn zero() -> Self {
|
||||
Self {
|
||||
start_corner: flow_relative::Vec2::zero(),
|
||||
|
@ -346,6 +346,17 @@ where
|
|||
}
|
||||
}
|
||||
|
||||
impl<T: Zero> flow_relative::Sides<T> {
|
||||
pub(crate) fn zero() -> flow_relative::Sides<T> {
|
||||
flow_relative::Sides {
|
||||
inline_start: T::zero(),
|
||||
inline_end: T::zero(),
|
||||
block_start: T::zero(),
|
||||
block_end: T::zero(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<T> flow_relative::Rect<T> {
|
||||
pub fn max_inline_position(&self) -> T
|
||||
where
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue