Diff
Modified: trunk/Source/WebCore/CMakeLists.txt (293250 => 293251)
--- trunk/Source/WebCore/CMakeLists.txt 2022-04-22 20:43:43 UTC (rev 293250)
+++ trunk/Source/WebCore/CMakeLists.txt 2022-04-22 20:48:29 UTC (rev 293251)
@@ -121,6 +121,7 @@
"${WEBCORE_DIR}/layout/formattingContexts/inline/invalidation"
"${WEBCORE_DIR}/layout/formattingContexts/inline/text"
"${WEBCORE_DIR}/layout/integration"
+ "${WEBCORE_DIR}/layout/integration/flex"
"${WEBCORE_DIR}/layout/integration/inline"
"${WEBCORE_DIR}/layout/layouttree"
"${WEBCORE_DIR}/layout/formattingContexts/table"
Modified: trunk/Source/WebCore/ChangeLog (293250 => 293251)
--- trunk/Source/WebCore/ChangeLog 2022-04-22 20:43:43 UTC (rev 293250)
+++ trunk/Source/WebCore/ChangeLog 2022-04-22 20:48:29 UTC (rev 293251)
@@ -1,5 +1,31 @@
2022-04-22 Alan Bujtas <za...@apple.com>
+ [LFC][Integration] Add blank LayoutIntegration::FlexLayout
+ https://bugs.webkit.org/show_bug.cgi?id=239663
+
+ Reviewed by Antti Koivisto.
+
+ This is in preparation for adding flex formatting context integration.
+
+ * CMakeLists.txt:
+ * Headers.cmake:
+ * Sources.txt:
+ * WebCore.xcodeproj/project.pbxproj:
+ * layout/integration/flex/LayoutIntegrationFlexLayout.cpp: Added.
+ (WebCore::LayoutIntegration::FlexLayout::FlexLayout):
+ (WebCore::LayoutIntegration::FlexLayout::updateFormattingRootGeometryAndInvalidate):
+ (WebCore::LayoutIntegration::FlexLayout::updateFlexItemDimensions):
+ (WebCore::LayoutIntegration::FlexLayout::updateStyle):
+ (WebCore::LayoutIntegration::FlexLayout::computeIntrinsicWidthConstraints):
+ (WebCore::LayoutIntegration::FlexLayout::layout):
+ (WebCore::LayoutIntegration::FlexLayout::paint):
+ (WebCore::LayoutIntegration::FlexLayout::hitTest):
+ (WebCore::LayoutIntegration::FlexLayout::collectOverflow):
+ (WebCore::LayoutIntegration::FlexLayout::contentLogicalHeight const):
+ * layout/integration/flex/LayoutIntegrationFlexLayout.h: Added.
+
+2022-04-22 Alan Bujtas <za...@apple.com>
+
[LFC][Integration] Add FlexFormattingContextIntegrationEnabled setting
https://bugs.webkit.org/show_bug.cgi?id=239654
Modified: trunk/Source/WebCore/Headers.cmake (293250 => 293251)
--- trunk/Source/WebCore/Headers.cmake 2022-04-22 20:43:43 UTC (rev 293250)
+++ trunk/Source/WebCore/Headers.cmake 2022-04-22 20:48:29 UTC (rev 293251)
@@ -976,6 +976,8 @@
layout/formattingContexts/inline/display/InlineDisplayBox.h
layout/formattingContexts/inline/InlineRect.h
+ layout/integration/flex/LayoutIntegrationFlexLayout.h
+
layout/integration/inline/InlineIteratorBox.h
layout/integration/inline/InlineIteratorBoxLegacyPath.h
layout/integration/inline/InlineIteratorBoxModernPath.h
Modified: trunk/Source/WebCore/Sources.txt (293250 => 293251)
--- trunk/Source/WebCore/Sources.txt 2022-04-22 20:43:43 UTC (rev 293250)
+++ trunk/Source/WebCore/Sources.txt 2022-04-22 20:48:29 UTC (rev 293251)
@@ -1586,6 +1586,7 @@
layout/formattingContexts/inline/display/InlineDisplayLineBuilder.cpp
layout/formattingContexts/inline/invalidation/InlineInvalidation.cpp
layout/formattingContexts/inline/text/TextUtil.cpp
+layout/integration/flex/LayoutIntegrationFlexLayout.cpp
layout/integration/inline/InlineIteratorBox.cpp
layout/integration/inline/InlineIteratorInlineBox.cpp
layout/integration/inline/InlineIteratorLineBox.cpp
Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (293250 => 293251)
--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2022-04-22 20:43:43 UTC (rev 293250)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2022-04-22 20:48:29 UTC (rev 293251)
@@ -2249,6 +2249,7 @@
6F995A3A1A70833700A735F4 /* JSWebGLVertexArrayObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 6F995A301A70833700A735F4 /* JSWebGLVertexArrayObject.h */; };
6FA4454E898F2FC168BC38C1 /* JSBeforeUnloadEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 29E04A27BED2F81F98E9022B /* JSBeforeUnloadEvent.h */; };
6FAAE71326A2814B00E07502 /* InlineLevelBox.h in Headers */ = {isa = PBXBuildFile; fileRef = 6FAAE71126A2814A00E07502 /* InlineLevelBox.h */; settings = {ATTRIBUTES = (Private, ); }; };
+ 6FAC251F281326580045683F /* LayoutIntegrationFlexLayout.h in Headers */ = {isa = PBXBuildFile; fileRef = 6FAC251E281326570045683F /* LayoutIntegrationFlexLayout.h */; settings = {ATTRIBUTES = (Private, ); }; };
6FB11B5C21783FD000E2A574 /* TextUtil.h in Headers */ = {isa = PBXBuildFile; fileRef = 6FB11B5921783FCF00E2A574 /* TextUtil.h */; settings = {ATTRIBUTES = (Private, ); }; };
6FB2400523DFF12800796458 /* InlineLineBox.h in Headers */ = {isa = PBXBuildFile; fileRef = 6FB2400323DFF12700796458 /* InlineLineBox.h */; settings = {ATTRIBUTES = (Private, ); }; };
6FB47E632277425A00C7BCB0 /* LayoutIntegrationLine.h in Headers */ = {isa = PBXBuildFile; fileRef = 6FB47E612277425A00C7BCB0 /* LayoutIntegrationLine.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -11070,6 +11071,8 @@
6F995A2F1A70833700A735F4 /* JSWebGLVertexArrayObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSWebGLVertexArrayObject.cpp; sourceTree = "<group>"; };
6F995A301A70833700A735F4 /* JSWebGLVertexArrayObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSWebGLVertexArrayObject.h; sourceTree = "<group>"; };
6FAAE71126A2814A00E07502 /* InlineLevelBox.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InlineLevelBox.h; sourceTree = "<group>"; };
+ 6FAC251E281326570045683F /* LayoutIntegrationFlexLayout.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LayoutIntegrationFlexLayout.h; sourceTree = "<group>"; };
+ 6FAC2520281326720045683F /* LayoutIntegrationFlexLayout.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = LayoutIntegrationFlexLayout.cpp; sourceTree = "<group>"; };
6FAE16BA2406DE7E00A48414 /* PrecomputedBlockMarginCollapse.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = PrecomputedBlockMarginCollapse.cpp; sourceTree = "<group>"; };
6FB0ED112427B6C6002737E6 /* LayoutInitialContainingBlock.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = LayoutInitialContainingBlock.cpp; sourceTree = "<group>"; };
6FB11B5921783FCF00E2A574 /* TextUtil.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextUtil.h; sourceTree = "<group>"; };
@@ -24634,6 +24637,15 @@
path = formattingContexts;
sourceTree = "<group>";
};
+ 6FAC251D2813258A0045683F /* flex */ = {
+ isa = PBXGroup;
+ children = (
+ 6FAC2520281326720045683F /* LayoutIntegrationFlexLayout.cpp */,
+ 6FAC251E281326570045683F /* LayoutIntegrationFlexLayout.h */,
+ );
+ path = flex;
+ sourceTree = "<group>";
+ };
6FB7D2D5250FD7B5000207AA /* flex */ = {
isa = PBXGroup;
children = (
@@ -31669,6 +31681,7 @@
E4FB4B1E2395356F003C336A /* integration */ = {
isa = PBXGroup;
children = (
+ 6FAC251D2813258A0045683F /* flex */,
6F828076280C9DA800304B82 /* inline */,
E418025623D454B500FFB071 /* LayoutIntegrationBoxTree.cpp */,
E418025323D4549A00FFB071 /* LayoutIntegrationBoxTree.h */,
@@ -36268,6 +36281,7 @@
6F0B98B523F268EC00EEC2F2 /* LayoutInlineTextBox.h in Headers */,
E418025523D4549B00FFB071 /* LayoutIntegrationBoxTree.h in Headers */,
E403B7A2251B11930019E800 /* LayoutIntegrationCoverage.h in Headers */,
+ 6FAC251F281326580045683F /* LayoutIntegrationFlexLayout.h in Headers */,
E451C6342394058F00993190 /* LayoutIntegrationInlineContent.h in Headers */,
6F3FBA982556E313003530FD /* LayoutIntegrationInlineContentBuilder.h in Headers */,
6FB47E632277425A00C7BCB0 /* LayoutIntegrationLine.h in Headers */,
Added: trunk/Source/WebCore/layout/integration/flex/LayoutIntegrationFlexLayout.cpp (0 => 293251)
--- trunk/Source/WebCore/layout/integration/flex/LayoutIntegrationFlexLayout.cpp (rev 0)
+++ trunk/Source/WebCore/layout/integration/flex/LayoutIntegrationFlexLayout.cpp 2022-04-22 20:48:29 UTC (rev 293251)
@@ -0,0 +1,86 @@
+/*
+ * Copyright (C) 2022 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "LayoutIntegrationFlexLayout.h"
+
+#if ENABLE(LAYOUT_FORMATTING_CONTEXT)
+
+#include "HitTestLocation.h"
+#include "HitTestRequest.h"
+#include "HitTestResult.h"
+#include "RenderFlexibleBox.h"
+
+namespace WebCore {
+namespace LayoutIntegration {
+
+FlexLayout::FlexLayout(RenderFlexibleBox& flexBoxRenderer)
+ : m_boxTree(flexBoxRenderer)
+{
+}
+
+void FlexLayout::updateFormattingRootGeometryAndInvalidate()
+{
+}
+
+void FlexLayout::updateFlexItemDimensions(const RenderBlock&)
+{
+}
+
+void FlexLayout::updateStyle(const RenderBlock&, const RenderStyle&)
+{
+}
+
+std::pair<LayoutUnit, LayoutUnit> FlexLayout::computeIntrinsicWidthConstraints()
+{
+ return { };
+}
+
+void FlexLayout::layout()
+{
+}
+
+void FlexLayout::paint(PaintInfo&, const LayoutPoint&)
+{
+}
+
+bool FlexLayout::hitTest(const HitTestRequest&, HitTestResult&, const HitTestLocation&, const LayoutPoint&, HitTestAction)
+{
+ return false;
+}
+
+void FlexLayout::collectOverflow()
+{
+}
+
+LayoutUnit FlexLayout::contentLogicalHeight() const
+{
+ return { };
+}
+
+}
+}
+
+#endif
Added: trunk/Source/WebCore/layout/integration/flex/LayoutIntegrationFlexLayout.h (0 => 293251)
--- trunk/Source/WebCore/layout/integration/flex/LayoutIntegrationFlexLayout.h (rev 0)
+++ trunk/Source/WebCore/layout/integration/flex/LayoutIntegrationFlexLayout.h 2022-04-22 20:48:29 UTC (rev 293251)
@@ -0,0 +1,71 @@
+/*
+ * Copyright (C) 2022 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#if ENABLE(LAYOUT_FORMATTING_CONTEXT)
+
+#include "LayoutIntegrationBoxTree.h"
+#include "RenderObjectEnums.h"
+#include <wtf/CheckedPtr.h>
+
+namespace WebCore {
+
+class HitTestLocation;
+class HitTestRequest;
+class HitTestResult;
+class RenderBlock;
+class RenderFlexibleBox;
+class RenderStyle;
+struct PaintInfo;
+
+namespace LayoutIntegration {
+
+class FlexLayout : public CanMakeCheckedPtr {
+ WTF_MAKE_FAST_ALLOCATED;
+public:
+ FlexLayout(RenderFlexibleBox&);
+
+ void updateFormattingRootGeometryAndInvalidate();
+ void updateFlexItemDimensions(const RenderBlock&);
+ void updateStyle(const RenderBlock&, const RenderStyle& oldStyle);
+
+ std::pair<LayoutUnit, LayoutUnit> computeIntrinsicWidthConstraints();
+
+ void layout();
+ void paint(PaintInfo&, const LayoutPoint& paintOffset);
+ bool hitTest(const HitTestRequest&, HitTestResult&, const HitTestLocation&, const LayoutPoint& accumulatedOffset, HitTestAction);
+
+ void collectOverflow();
+ LayoutUnit contentLogicalHeight() const;
+
+private:
+ BoxTree m_boxTree;
+};
+
+}
+}
+
+#endif