Title: [295032] trunk/Source/WebCore/layout/formattingContexts/flex/FlexFormattingContext.cpp
- Revision
- 295032
- Author
- za...@apple.com
- Date
- 2022-05-30 11:07:24 -0700 (Mon, 30 May 2022)
Log Message
Add support for justify-content: space-evenly
https://bugs.webkit.org/show_bug.cgi?id=241085
Reviewed by Antti Koivisto.
Distribute items evenly. Items have equal space around them.
* Source/WebCore/layout/formattingContexts/flex/FlexFormattingContext.cpp:
(WebCore::Layout::FlexFormattingContext::justifyFlexItems):
Canonical link: https://commits.webkit.org/251127@main
Modified Paths
Diff
Modified: trunk/Source/WebCore/layout/formattingContexts/flex/FlexFormattingContext.cpp (295031 => 295032)
--- trunk/Source/WebCore/layout/formattingContexts/flex/FlexFormattingContext.cpp 2022-05-30 16:48:03 UTC (rev 295031)
+++ trunk/Source/WebCore/layout/formattingContexts/flex/FlexFormattingContext.cpp 2022-05-30 18:07:24 UTC (rev 295032)
@@ -476,6 +476,8 @@
return LayoutUnit { };
case ContentDistribution::SpaceAround:
return (availableSpace - contentLogicalWidth) / logicalFlexItemList.size() / 2;
+ case ContentDistribution::SpaceEvenly:
+ return (availableSpace - contentLogicalWidth) / (logicalFlexItemList.size() + 1);
default:
ASSERT_NOT_IMPLEMENTED_YET();
break;
@@ -511,6 +513,8 @@
return (availableSpace - contentLogicalWidth) / (logicalFlexItemList.size() - 1);
case ContentDistribution::SpaceAround:
return (availableSpace - contentLogicalWidth) / logicalFlexItemList.size();
+ case ContentDistribution::SpaceEvenly:
+ return (availableSpace - contentLogicalWidth) / (logicalFlexItemList.size() + 1);
default:
ASSERT_NOT_IMPLEMENTED_YET();
break;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes