mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
layout: Unify layout logic for replaced and non-replaced floats&atomics (#37897)
Laying out a float or atomic inline will now use the same logic regardless of whether it's replaced or not. This reduces the amount of code, and should have no observable effect. Testing: Unneeded (no behavior change) This part of #37942 Signed-off-by: Oriol Brufau <obrufau@igalia.com>
This commit is contained in:
parent
70c57c6136
commit
47c56d8d74
4 changed files with 94 additions and 146 deletions
|
@ -85,13 +85,6 @@ impl<T: Copy> From<T> for LogicalVec2<T> {
|
|||
}
|
||||
|
||||
impl<T> LogicalVec2<T> {
|
||||
pub(crate) fn as_ref(&self) -> LogicalVec2<&T> {
|
||||
LogicalVec2 {
|
||||
inline: &self.inline,
|
||||
block: &self.block,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn map_inline_and_block_axes<U>(
|
||||
&self,
|
||||
inline_f: impl FnOnce(&T) -> U,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue