| Summary: | Updating grid gap value does not recalculate styles | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Brad Frost <bfrost> | ||||||||
| Component: | Layout and Rendering | Assignee: | zalan <zalan> | ||||||||
| Status: | RESOLVED FIXED | ||||||||||
| Severity: | Normal | CC: | bfulgham, changseok, esprehn+autocc, ews-watchlist, glenn, kondapallykalyan, pdr, rbuis, shuangqiu2, simon.fraser, webkit-bug-importer, webkit-layout-noreply, zalan, zsun | ||||||||
| Priority: | P2 | Keywords: | InRadar | ||||||||
| Version: | Safari 15 | ||||||||||
| Hardware: | Unspecified | ||||||||||
| OS: | Unspecified | ||||||||||
| Attachments: |
|
||||||||||
|
Description
Brad Frost
2021-11-17 06:32:13 PST
In case the example above doesn't load, this is another repro: https://codesandbox.io/s/eager-lederberg-vx8pg?file=/src/App.js cc'd the Igalia grid layout experts. Created attachment 451120 [details]
Test reduction
This looks like a styleAdjuster bug. We get the setStyle call right after the gap value change but we compute the diff to be Equal -> no layout. If I force the diff to Layout, the jsbin example starts working. This affects flex gaps too. @@ -664,6 +664,9 @@ static bool rareNonInheritedDataChangeRequiresLayout(const StyleRareNonInherited
if (first.flexibleBox != second.flexibleBox)
return true;
+ if (first.columnGap != second.columnGap || first.rowGap != second.rowGap)
+ return true;
+
if (first.order != second.order
|| first.alignContent != second.alignContent
|| first.alignItems != second.alignItems
fixes both grid and flex. patch is coming up.
Created attachment 451126 [details]
Patch
will fix the "!=" older compiler vs. auto generating now issue Created attachment 451129 [details]
[fast-cq]Patch
Committed r289241 (246925@main): <https://commits.webkit.org/246925@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 451129 [details]. Thank you all for addressing this! Looking forward to the release. (In reply to Brad Frost from comment #12) > Thank you all for addressing this! Looking forward to the release. Thank you for filing it! |