gpui: Bump taffy from 0.10.1 to 0.12.1 (#60721)
Migrates the alignment conversions to taffy's new safe-alignment style types: `AlignItems`/`AlignContent` and friends are now structs pairing a keyword with a safety modifier, constructed via associated constants (e.g. `AlignItems::START`) instead of enum variants. The motivating change in this release is [taffy #911](https://github.com/DioxusLabs/taffy/commit/df2663aad35801f7522f6878a0300646dfe624f7) ("More correct caching logic"), which keys taffy's per-node measure cache on axis, parent size, and available space. Today GPUI is largely immune to the old cache-key conflation because text answers every sizing probe with the same width; the follow-up PR in this stack (honest min-content text measurement) returns different sizes for different constraints, which makes cache-key correctness a prerequisite. 0.12.1 additionally hotfixes two block layout/caching regressions in 0.12.0, and 0.11.0's grid fix (resolving item percentages against the grid area rather than the container) comes along as well. Stack: 1. **This PR** — taffy 0.12.1 2. #60722 — honest min-content text measurement 3. #60723 — CSS `auto` grid tracks for table-like column sizing Release Notes: - N/A
This commit is contained in:
1 parent
b76c0417c0
commit
22c0cbd009
3 files changed
+19
-19
No files matched your search
Generated
+2
-2
@@ -18274,9 +18274,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "taffy"
|
||||
version = "0.10.1"
|
||||
version = "0.12.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "aea22054047c16c3f34d3ac473a2170be1424b1115b2a3adcf28cfb067c88859"
|
||||
checksum = "73afc801dd6bd47529eaa7c7e90557f107527d1b7c9c7ed7d7803c7b8d0c357f"
|
||||
dependencies = [
|
||||
"arrayvec",
|
||||
"grid",
|
||||
|
||||
@@ -91,7 +91,7 @@ async-channel.workspace = true
|
||||
stacksafe.workspace = true
|
||||
strum.workspace = true
|
||||
sum_tree.workspace = true
|
||||
taffy = "=0.10.1"
|
||||
taffy = "=0.12.1"
|
||||
thiserror.workspace = true
|
||||
gpui_util.workspace = true
|
||||
hdrhistogram = { workspace = true, optional = true }
|
||||
|
||||
+16
-16
@@ -1245,13 +1245,13 @@ pub enum Position {
|
||||
impl From<AlignItems> for taffy::style::AlignItems {
|
||||
fn from(value: AlignItems) -> Self {
|
||||
match value {
|
||||
AlignItems::Start => Self::Start,
|
||||
AlignItems::End => Self::End,
|
||||
AlignItems::FlexStart => Self::FlexStart,
|
||||
AlignItems::FlexEnd => Self::FlexEnd,
|
||||
AlignItems::Center => Self::Center,
|
||||
AlignItems::Baseline => Self::Baseline,
|
||||
AlignItems::Stretch => Self::Stretch,
|
||||
AlignItems::Start => Self::START,
|
||||
AlignItems::End => Self::END,
|
||||
AlignItems::FlexStart => Self::FLEX_START,
|
||||
AlignItems::FlexEnd => Self::FLEX_END,
|
||||
AlignItems::Center => Self::CENTER,
|
||||
AlignItems::Baseline => Self::BASELINE,
|
||||
AlignItems::Stretch => Self::STRETCH,
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1259,15 +1259,15 @@ impl From<AlignItems> for taffy::style::AlignItems {
|
||||
impl From<AlignContent> for taffy::style::AlignContent {
|
||||
fn from(value: AlignContent) -> Self {
|
||||
match value {
|
||||
AlignContent::Start => Self::Start,
|
||||
AlignContent::End => Self::End,
|
||||
AlignContent::FlexStart => Self::FlexStart,
|
||||
AlignContent::FlexEnd => Self::FlexEnd,
|
||||
AlignContent::Center => Self::Center,
|
||||
AlignContent::Stretch => Self::Stretch,
|
||||
AlignContent::SpaceBetween => Self::SpaceBetween,
|
||||
AlignContent::SpaceEvenly => Self::SpaceEvenly,
|
||||
AlignContent::SpaceAround => Self::SpaceAround,
|
||||
AlignContent::Start => Self::START,
|
||||
AlignContent::End => Self::END,
|
||||
AlignContent::FlexStart => Self::FLEX_START,
|
||||
AlignContent::FlexEnd => Self::FLEX_END,
|
||||
AlignContent::Center => Self::CENTER,
|
||||
AlignContent::Stretch => Self::STRETCH,
|
||||
AlignContent::SpaceBetween => Self::SPACE_BETWEEN,
|
||||
AlignContent::SpaceEvenly => Self::SPACE_EVENLY,
|
||||
AlignContent::SpaceAround => Self::SPACE_AROUND,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user