mirror of
https://github.com/servo/servo.git
synced 2025-08-05 05:30:08 +01:00
layout: Basic implementation of size keywords on flex-basis
(#35413)
layout: Basic implementation of size keywords on `flex-basis` This splits the logic to resolve the used value of `flex-basis` into its own method, which preserves size keywords. And then it changes `flex_base_size()` to resolve the provided keywords properly. However, it doesn't handle size keywords in the cross axis. Signed-off-by: Oriol Brufau <obrufau@igalia.com>
This commit is contained in:
parent
3d9e7a95e0
commit
2b930814d7
6 changed files with 153 additions and 168 deletions
|
@ -57,6 +57,13 @@ impl ContentSizes {
|
|||
max_content: self.max_content + other.max_content,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn map(&self, f: impl Fn(Au) -> Au) -> Self {
|
||||
Self {
|
||||
min_content: f(self.min_content),
|
||||
max_content: f(self.max_content),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Zero for ContentSizes {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue