mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
layout: Respect alignment when sizing replaced abspos (#35085)
If an absolutely position element which is replaced has `justify-self` or `align-self` set to `stretch`, and no inset is `auto` on that axis, then an automatic size should behave as `stretch`, not as `fit-content`. Signed-off-by: Oriol Brufau <obrufau@igalia.com>
This commit is contained in:
parent
2965b2fda7
commit
f6c166533e
9 changed files with 92 additions and 69 deletions
|
@ -68,7 +68,23 @@ impl<T: Default> Default for LogicalVec2<T> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<T: Copy> From<T> for LogicalVec2<T> {
|
||||
fn from(value: T) -> Self {
|
||||
Self {
|
||||
inline: value,
|
||||
block: value,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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