Title: [294198] trunk/Source/WebCore
- Revision
- 294198
- Author
- za...@apple.com
- Date
- 2022-05-14 09:56:07 -0700 (Sat, 14 May 2022)
Log Message
[FFC][Integration] Add "fixed sized/all default value" flex layout
https://bugs.webkit.org/show_bug.cgi?id=240414
Reviewed by Antti Koivisto.
This patch adds support for the simplest possible flex layout (fixed size, no-wrap, no-reversed etc).
* layout/formattingContexts/flex/FlexFormattingContext.cpp:
(WebCore::Layout::FlexFormattingContext::layoutInFlowContentForIntegration):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (294197 => 294198)
--- trunk/Source/WebCore/ChangeLog 2022-05-14 16:26:54 UTC (rev 294197)
+++ trunk/Source/WebCore/ChangeLog 2022-05-14 16:56:07 UTC (rev 294198)
@@ -1,3 +1,15 @@
+2022-05-14 Alan Bujtas <za...@apple.com>
+
+ [FFC][Integration] Add "fixed sized/all default value" flex layout
+ https://bugs.webkit.org/show_bug.cgi?id=240414
+
+ Reviewed by Antti Koivisto.
+
+ This patch adds support for the simplest possible flex layout (fixed size, no-wrap, no-reversed etc).
+
+ * layout/formattingContexts/flex/FlexFormattingContext.cpp:
+ (WebCore::Layout::FlexFormattingContext::layoutInFlowContentForIntegration):
+
2022-05-14 Kimmo Kinnunen <kkinnu...@apple.com>
WebCore::IOSurface refers to unused context size
Modified: trunk/Source/WebCore/layout/formattingContexts/flex/FlexFormattingContext.cpp (294197 => 294198)
--- trunk/Source/WebCore/layout/formattingContexts/flex/FlexFormattingContext.cpp 2022-05-14 16:26:54 UTC (rev 294197)
+++ trunk/Source/WebCore/layout/formattingContexts/flex/FlexFormattingContext.cpp 2022-05-14 16:56:07 UTC (rev 294198)
@@ -118,8 +118,17 @@
}
}
-void FlexFormattingContext::layoutInFlowContentForIntegration(const ConstraintsForInFlowContent&)
+void FlexFormattingContext::layoutInFlowContentForIntegration(const ConstraintsForInFlowContent& constraints)
{
+ auto& formattingState = this->formattingState();
+ auto mainAxisPosition = constraints.horizontal().logicalLeft;
+ auto crossAxisPosition = constraints.logicalTop();
+ for (auto& flexItem : childrenOfType<ContainerBox>(root())) {
+ auto& flexItemGeometry = formattingState.boxGeometry(flexItem);
+
+ flexItemGeometry.setLogicalTopLeft({ mainAxisPosition, crossAxisPosition });
+ mainAxisPosition = BoxGeometry::borderBoxRect(flexItemGeometry).right();
+ }
}
IntrinsicWidthConstraints FlexFormattingContext::computedIntrinsicWidthConstraintsForIntegration()
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes