Bug 242112 - [LFC][FFC] Add support for non-stretching flex items with flex-basis
Summary: [LFC][FFC] Add support for non-stretching flex items with flex-basis
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: zalan
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-06-29 09:34 PDT by zalan
Modified: 2022-07-01 21:38 PDT (History)
6 users (show)

See Also:


Attachments
Patch (5.43 KB, patch)
2022-06-29 09:43 PDT, zalan
no flags Details | Formatted Diff | Diff
Patch (5.29 KB, patch)
2022-07-01 20:21 PDT, zalan
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description zalan 2022-06-29 09:34:17 PDT
where flex-basis != logical width
Comment 1 zalan 2022-06-29 09:43:33 PDT
Created attachment 460543 [details]
Patch
Comment 2 Tim Nguyen (:ntim) 2022-06-29 10:58:28 PDT
Comment on attachment 460543 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=460543&action=review

> Source/WebCore/layout/formattingContexts/flex/FlexLayout.cpp:232
> +                auto flexedSize = reolvedFlexItem.flexBasis + reolvedFlexItem.flexGrow * flexGrowBase;
> +                if (flexedSize && reolvedFlexItem.minimumSize >= flexedSize) {
> +                    reolvedFlexItem.isFrozen = true;
>                      didFreeze = true;
> -                    totalGrowth -= stretchingFlex.flexGrow;
> -                    totalFlexibleSpace -= stretchingFlex.flexBasis;
> -                    availableSpace -= stretchingFlex.minimumSize;
> +                    totalGrowth -= reolvedFlexItem.flexGrow;
> +                    totalFlexibleSpace -= reolvedFlexItem.flexBasis;
> +                    availableSpace -= reolvedFlexItem.minimumSize;
>                  }

typo: reolved
Comment 3 zalan 2022-07-01 20:21:26 PDT
Created attachment 460629 [details]
Patch
Comment 4 EWS 2022-07-01 21:37:27 PDT
Committed 252087@main (02229f46cd9b): <https://commits.webkit.org/252087@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 460629 [details].
Comment 5 Radar WebKit Bug Importer 2022-07-01 21:38:14 PDT
<rdar://problem/96330047>