[webkit-changes] [WebKit/WebKit] 3d0a14: [LFC][Cleanup] Remove Layout::Box::formattingConte...
alan
noreply at github.com
Mon Sep 19 22:13:49 PDT 2022
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 3d0a14637f43e289c60e35954aacd2bf963ea535
https://github.com/WebKit/WebKit/commit/3d0a14637f43e289c60e35954aacd2bf963ea535
Author: Alan Bujtas <zalan at apple.com>
Date: 2022-09-19 (Mon, 19 Sep 2022)
Changed paths:
M Source/WebCore/layout/FormattingState.cpp
M Source/WebCore/layout/FormattingState.h
M Source/WebCore/layout/LayoutState.cpp
M Source/WebCore/layout/Verification.cpp
M Source/WebCore/layout/formattingContexts/FormattingContext.cpp
M Source/WebCore/layout/formattingContexts/FormattingContext.h
M Source/WebCore/layout/formattingContexts/FormattingGeometry.cpp
M Source/WebCore/layout/formattingContexts/block/BlockFormattingContext.cpp
M Source/WebCore/layout/formattingContexts/table/TableFormattingQuirks.cpp
M Source/WebCore/layout/layouttree/LayoutBox.cpp
M Source/WebCore/layout/layouttree/LayoutBox.h
M Source/WebCore/layout/layouttree/LayoutContainingBlockChainIterator.h
Log Message:
-----------
[LFC][Cleanup] Remove Layout::Box::formattingContextRoot
https://bugs.webkit.org/show_bug.cgi?id=245351
Reviewed by Antti Koivisto.
1. While laying out a formatting context, we precisely know what the root of the formatting context is.
2. Finding the formatting context root of a "random" layout box should only be a valid operation when ASSERTing against some state (with the exception of finding the parent floating state when initializing an IFC, -we could certainly eliminate it with having a formatting context tree).
Move formattingContextRoot impl under FormattingContext (NDEBUG only).
* Source/WebCore/layout/FormattingState.cpp:
(WebCore::Layout::FormattingState::boxGeometry):
* Source/WebCore/layout/FormattingState.h:
(WebCore::Layout::FormattingState::setIntrinsicWidthConstraintsForBox):
(WebCore::Layout::FormattingState::intrinsicWidthConstraintsForBox const):
* Source/WebCore/layout/LayoutState.cpp:
(WebCore::Layout::LayoutState::ensureInlineFormattingState):
* Source/WebCore/layout/Verification.cpp:
(WebCore::Layout::outputMismatchingBlockBoxInformationIfNeeded):
* Source/WebCore/layout/formattingContexts/FormattingContext.cpp:
(WebCore::Layout::FormattingContext::geometryForBox const):
(WebCore::Layout::FormattingContext::collectOutOfFlowDescendantsIfNeeded):
(WebCore::Layout::FormattingContext::formattingContextRoot):
(WebCore::Layout::FormattingContext::validateGeometryConstraintsAfterLayout const):
* Source/WebCore/layout/formattingContexts/FormattingContext.h:
* Source/WebCore/layout/formattingContexts/FormattingGeometry.cpp:
(WebCore::Layout::FormattingGeometry::complicatedCases const):
* Source/WebCore/layout/formattingContexts/block/BlockFormattingContext.cpp:
(WebCore::Layout::BlockFormattingContext::usedAvailableWidthForFloatAvoider):
* Source/WebCore/layout/formattingContexts/table/TableFormattingQuirks.cpp:
(WebCore::Layout::TableFormattingQuirks::heightValueOfNearestContainingBlockWithFixedHeight const):
* Source/WebCore/layout/layouttree/LayoutBox.cpp:
(WebCore::Layout::Box::formattingContextRoot const): Deleted.
* Source/WebCore/layout/layouttree/LayoutBox.h:
* Source/WebCore/layout/layouttree/LayoutContainingBlockChainIterator.h:
(WebCore::Layout::containingBlockChainWithinFormattingContext):
Canonical link: https://commits.webkit.org/254662@main
More information about the webkit-changes
mailing list