Skip to content

Commit

Permalink
[IFC][Integration] Move box geometry update to a dedicate class
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=265387

Reviewed by Antti Koivisto.

This is in preparation for supporting intrinsic width computation on inline level boxes.

* Source/WebCore/Sources.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/layout/integration/LayoutIntegrationBoxTree.h:
* Source/WebCore/layout/integration/inline/LayoutIntegrationBoxGeometryUpdater.cpp: Added.
(WebCore::LayoutIntegration::BoxGeometryUpdater::BoxGeometryUpdater):
(WebCore::LayoutIntegration::BoxGeometryUpdater::updateReplacedDimensions):
(WebCore::LayoutIntegration::BoxGeometryUpdater::updateInlineBlockDimensions):
(WebCore::LayoutIntegration::BoxGeometryUpdater::updateInlineTableDimensions):
(WebCore::LayoutIntegration::BoxGeometryUpdater::updateListItemDimensions):
(WebCore::LayoutIntegration::BoxGeometryUpdater::updateListMarkerDimensions):
(WebCore::LayoutIntegration::contentLogicalWidthForRenderer):
(WebCore::LayoutIntegration::contentLogicalHeightForRenderer):
(WebCore::LayoutIntegration::horizontalLogicalMargin):
(WebCore::LayoutIntegration::verticalLogicalMargin):
(WebCore::LayoutIntegration::logicalBorder):
(WebCore::LayoutIntegration::logicalPadding):
(WebCore::LayoutIntegration::scrollbarLogicalSize):
(WebCore::LayoutIntegration::BoxGeometryUpdater::updateLayoutBoxDimensions):
(WebCore::LayoutIntegration::BoxGeometryUpdater::updateLineBreakBoxDimensions):
(WebCore::LayoutIntegration::BoxGeometryUpdater::updateInlineBoxDimensions):
(WebCore::LayoutIntegration::BoxGeometryUpdater::setGeometriesForLayout):
(WebCore::LayoutIntegration::BoxGeometryUpdater::updateInlineContentConstraints):
(WebCore::LayoutIntegration::BoxGeometryUpdater::rootLayoutBox const):
(WebCore::LayoutIntegration::BoxGeometryUpdater::rootLayoutBox):
* Source/WebCore/layout/integration/inline/LayoutIntegrationBoxGeometryUpdater.h: Added.
(WebCore::LayoutIntegration::BoxGeometryUpdater::takeNestedListMarkerOffsets):
(WebCore::LayoutIntegration::BoxGeometryUpdater::boxTree):
(WebCore::LayoutIntegration::BoxGeometryUpdater::boxTree const):
(WebCore::LayoutIntegration::BoxGeometryUpdater::layoutState):
(WebCore::LayoutIntegration::BoxGeometryUpdater::layoutState const):
* Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.cpp:
(WebCore::LayoutIntegration::LineLayout::LineLayout):
(WebCore::LayoutIntegration::LineLayout::updateInlineContentDimensions):
(WebCore::LayoutIntegration::LineLayout::layout):
(WebCore::LayoutIntegration::LineLayout::updateInlineContentConstraints):
(WebCore::LayoutIntegration::LineLayout::updateReplacedDimensions): Deleted.
(WebCore::LayoutIntegration::LineLayout::updateInlineBlockDimensions): Deleted.
(WebCore::LayoutIntegration::LineLayout::updateInlineTableDimensions): Deleted.
(WebCore::LayoutIntegration::LineLayout::updateListItemDimensions): Deleted.
(WebCore::LayoutIntegration::LineLayout::updateListMarkerDimensions): Deleted.
(WebCore::LayoutIntegration::contentLogicalWidthForRenderer): Deleted.
(WebCore::LayoutIntegration::contentLogicalHeightForRenderer): Deleted.
(WebCore::LayoutIntegration::horizontalLogicalMargin): Deleted.
(WebCore::LayoutIntegration::verticalLogicalMargin): Deleted.
(WebCore::LayoutIntegration::logicalBorder): Deleted.
(WebCore::LayoutIntegration::logicalPadding): Deleted.
(WebCore::LayoutIntegration::scrollbarLogicalSize): Deleted.
(WebCore::LayoutIntegration::LineLayout::updateLayoutBoxDimensions): Deleted.
(WebCore::LayoutIntegration::LineLayout::updateLineBreakBoxDimensions): Deleted.
(WebCore::LayoutIntegration::LineLayout::updateInlineBoxDimensions): Deleted.
(WebCore::LayoutIntegration::LineLayout::prepareLayoutState): Deleted.
* Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.h:

Canonical link: https://commits.webkit.org/271156@main
  • Loading branch information
alanbaradlay committed Nov 27, 2023
1 parent 0454dad commit aaa92c2
Show file tree
Hide file tree
Showing 7 changed files with 494 additions and 357 deletions.
1 change: 1 addition & 0 deletions Source/WebCore/Sources.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1771,6 +1771,7 @@ layout/integration/inline/LayoutIntegrationInlineContent.cpp
layout/integration/inline/LayoutIntegrationInlineContentPainter.cpp
layout/integration/inline/LayoutIntegrationLineLayout.cpp
layout/integration/inline/LayoutIntegrationPagination.cpp
layout/integration/inline/LayoutIntegrationBoxGeometryUpdater.cpp
layout/integration/LayoutIntegrationBoxTree.cpp
layout/integration/LayoutIntegrationCoverage.cpp
layout/layouttree/LayoutBox.cpp
Expand Down
6 changes: 6 additions & 0 deletions Source/WebCore/WebCore.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -5334,6 +5334,7 @@
DD17C084286EC57A00D60B58 /* web in Copy PDF.js */ = {isa = PBXBuildFile; fileRef = DD17C07E286EC51A00D60B58 /* web */; };
DD1C779029354C77003BD79B /* StyleTextBoxEdge.h in Headers */ = {isa = PBXBuildFile; fileRef = DD1C778F29354C75003BD79B /* StyleTextBoxEdge.h */; settings = {ATTRIBUTES = (Private, ); }; };
DD308A2D2A82F684000A2687 /* AbstractLineBuilder.h in Headers */ = {isa = PBXBuildFile; fileRef = DD308A2C2A82F684000A2687 /* AbstractLineBuilder.h */; settings = {ATTRIBUTES = (Private, ); }; };
DD5ACFD82B14DADE00B36C57 /* LayoutIntegrationBoxGeometryUpdater.h in Headers */ = {isa = PBXBuildFile; fileRef = DD5ACFD72B14DADE00B36C57 /* LayoutIntegrationBoxGeometryUpdater.h */; settings = {ATTRIBUTES = (Private, ); }; };
DD763BB20992C2C900740B8E /* libxml2.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = DD763BB10992C2C900740B8E /* libxml2.dylib */; };
DD7CDF250A23CF9800069928 /* CSSUnknownRule.h in Headers */ = {isa = PBXBuildFile; fileRef = A80E6CCE0A1989CA007FB8C5 /* CSSUnknownRule.h */; settings = {ATTRIBUTES = (Private, ); }; };
DD8A30B4291DFC8F00AD537C /* BlockLayoutState.h in Headers */ = {isa = PBXBuildFile; fileRef = DD8A30B3291DFC8F00AD537C /* BlockLayoutState.h */; settings = {ATTRIBUTES = (Private, ); }; };
Expand Down Expand Up @@ -18555,6 +18556,8 @@
DD17C080286EC51B00D60B58 /* LICENSE */ = {isa = PBXFileReference; lastKnownFileType = text; path = LICENSE; sourceTree = "<group>"; };
DD1C778F29354C75003BD79B /* StyleTextBoxEdge.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StyleTextBoxEdge.h; sourceTree = "<group>"; };
DD308A2C2A82F684000A2687 /* AbstractLineBuilder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AbstractLineBuilder.h; sourceTree = "<group>"; };
DD5ACFD62B14DAD600B36C57 /* LayoutIntegrationBoxGeometryUpdater.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = LayoutIntegrationBoxGeometryUpdater.cpp; sourceTree = "<group>"; };
DD5ACFD72B14DADE00B36C57 /* LayoutIntegrationBoxGeometryUpdater.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LayoutIntegrationBoxGeometryUpdater.h; sourceTree = "<group>"; };
DD763BB10992C2C900740B8E /* libxml2.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libxml2.dylib; path = /usr/lib/libxml2.dylib; sourceTree = "<absolute>"; };
DD8A30B3291DFC8F00AD537C /* BlockLayoutState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BlockLayoutState.h; sourceTree = "<group>"; };
DD93A9E129C2A60300ED671E /* InlineDisplayContent.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = InlineDisplayContent.cpp; sourceTree = "<group>"; };
Expand Down Expand Up @@ -27525,6 +27528,8 @@
E47CEBDE2709916400B8D8F5 /* InlineIteratorTextBox.cpp */,
E47CEBE02709916D00B8D8F5 /* InlineIteratorTextBox.h */,
9331BACC29EC9E0600137ED2 /* InlineIteratorTextBoxInlines.h */,
DD5ACFD62B14DAD600B36C57 /* LayoutIntegrationBoxGeometryUpdater.cpp */,
DD5ACFD72B14DADE00B36C57 /* LayoutIntegrationBoxGeometryUpdater.h */,
E4FB4B35239BEB10003C336A /* LayoutIntegrationInlineContent.cpp */,
E451C6332394058E00993190 /* LayoutIntegrationInlineContent.h */,
6F3FBA962556E308003530FD /* LayoutIntegrationInlineContentBuilder.cpp */,
Expand Down Expand Up @@ -40222,6 +40227,7 @@
6FD09543251115220098877D /* LayoutGeometryRect.h in Headers */,
6F6383F62427AF4A00DABA53 /* LayoutInitialContainingBlock.h in Headers */,
6F0B98B523F268EC00EEC2F2 /* LayoutInlineTextBox.h in Headers */,
DD5ACFD82B14DADE00B36C57 /* LayoutIntegrationBoxGeometryUpdater.h in Headers */,
E418025523D4549B00FFB071 /* LayoutIntegrationBoxTree.h in Headers */,
E403B7A2251B11930019E800 /* LayoutIntegrationCoverage.h in Headers */,
6FAC251F281326580045683F /* LayoutIntegrationFlexLayout.h in Headers */,
Expand Down
3 changes: 2 additions & 1 deletion Source/WebCore/layout/integration/LayoutIntegrationBoxTree.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include <wtf/HashMap.h>
#include <wtf/UniqueRef.h>
#include <wtf/Vector.h>
#include <wtf/WeakPtr.h>

namespace WebCore {

Expand All @@ -45,7 +46,7 @@ namespace LayoutIntegration {
struct InlineContent;
#endif

class BoxTree {
class BoxTree : public CanMakeWeakPtr<BoxTree> {
public:
BoxTree(RenderBlock&);
~BoxTree();
Expand Down
Loading

0 comments on commit aaa92c2

Please sign in to comment.