<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[277957] trunk/Source/WebCore</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/277957">277957</a></dd>
<dt>Author</dt> <dd>zalan@apple.com</dd>
<dt>Date</dt> <dd>2021-05-24 11:08:10 -0700 (Mon, 24 May 2021)</dd>
</dl>

<h3>Log Message</h3>
<pre>[LFC] Rename the geometry() helpers to formattingGeometry()
https://bugs.webkit.org/show_bug.cgi?id=226153

Reviewed by Antti Koivisto.

* layout/formattingContexts/FormattingContext.cpp:
(WebCore::Layout::FormattingContext::computeOutOfFlowHorizontalGeometry):
(WebCore::Layout::FormattingContext::computeOutOfFlowVerticalGeometry):
(WebCore::Layout::FormattingContext::computeBorderAndPadding):
(WebCore::Layout::FormattingContext::layoutOutOfFlowContent):
(WebCore::Layout::FormattingContext::formattingGeometry const):
(WebCore::Layout::FormattingContext::geometry const): Deleted.
* layout/formattingContexts/FormattingContext.h:
* layout/formattingContexts/FormattingQuirks.cpp:
(WebCore::Layout::FormattingQuirks::heightValueOfNearestContainingBlockWithFixedHeight const):
* layout/formattingContexts/block/BlockFormattingContext.cpp:
(WebCore::Layout::BlockFormattingContext::layoutInFlowContent):
(WebCore::Layout::BlockFormattingContext::placeInFlowPositionedChildren):
(WebCore::Layout::BlockFormattingContext::computeStaticVerticalPosition):
(WebCore::Layout::BlockFormattingContext::computeStaticHorizontalPosition):
(WebCore::Layout::BlockFormattingContext::precomputeVerticalPositionForBoxAndAncestors):
(WebCore::Layout::BlockFormattingContext::computeWidthAndMargin):
(WebCore::Layout::BlockFormattingContext::computeHeightAndMargin):
(WebCore::Layout::BlockFormattingContext::computedIntrinsicWidthConstraints):
(WebCore::Layout::BlockFormattingContext::formattingGeometry const):
(WebCore::Layout::BlockFormattingContext::geometry const): Deleted.
* layout/formattingContexts/block/BlockFormattingContext.h:
* layout/formattingContexts/block/tablewrapper/TableWrapperBlockFormattingContext.cpp:
(WebCore::Layout::TableWrapperBlockFormattingContext::layoutTableBox):
(WebCore::Layout::TableWrapperBlockFormattingContext::computeBorderAndPaddingForTableBox):
(WebCore::Layout::TableWrapperBlockFormattingContext::computeWidthAndMarginForTableBox):
(WebCore::Layout::TableWrapperBlockFormattingContext::computeHeightAndMarginForTableBox):
* layout/formattingContexts/flex/FlexFormattingContext.cpp:
(WebCore::Layout::FlexFormattingContext::sizeAndPlaceFlexItems):
(WebCore::Layout::FlexFormattingContext::computeIntrinsicWidthConstraintsForFlexItems):
(WebCore::Layout::FlexFormattingContext::formattingGeometry const):
(WebCore::Layout::FlexFormattingContext::geometry const): Deleted.
* layout/formattingContexts/flex/FlexFormattingContext.h:
* layout/formattingContexts/inline/InlineFormattingContext.cpp:
(WebCore::Layout::InlineFormattingContext::layoutInFlowContent):
(WebCore::Layout::InlineFormattingContext::lineLayout):
(WebCore::Layout::InlineFormattingContext::computedIntrinsicWidthConstraints):
(WebCore::Layout::InlineFormattingContext::computeIntrinsicWidthForFormattingRoot):
(WebCore::Layout::InlineFormattingContext::computeHorizontalMargin):
(WebCore::Layout::InlineFormattingContext::computeWidthAndMargin):
(WebCore::Layout::InlineFormattingContext::computeHeightAndMargin):
(WebCore::Layout::InlineFormattingContext::computeGeometryForLineContent):
(WebCore::Layout::InlineFormattingContext::formattingGeometry const):
(WebCore::Layout::InlineFormattingContext::geometry const): Deleted.
* layout/formattingContexts/inline/InlineFormattingContext.h:
* layout/formattingContexts/table/TableFormattingContext.cpp:
(WebCore::Layout::TableFormattingContext::setUsedGeometryForRows):
(WebCore::Layout::TableFormattingContext::layoutCell):
(WebCore::Layout::TableFormattingContext::computedPreferredWidthForColumns):
(WebCore::Layout::TableFormattingContext::computeAndDistributeExtraSpace):
(WebCore::Layout::TableFormattingContext::formattingGeometry const):
(WebCore::Layout::TableFormattingContext::geometry const): Deleted.
* layout/formattingContexts/table/TableFormattingContext.h:
* layout/formattingContexts/table/TableLayout.cpp:
(WebCore::Layout::TableFormattingContext::TableLayout::distributedVerticalSpace):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorelayoutformattingContextsFormattingContextcpp">trunk/Source/WebCore/layout/formattingContexts/FormattingContext.cpp</a></li>
<li><a href="#trunkSourceWebCorelayoutformattingContextsFormattingContexth">trunk/Source/WebCore/layout/formattingContexts/FormattingContext.h</a></li>
<li><a href="#trunkSourceWebCorelayoutformattingContextsFormattingQuirkscpp">trunk/Source/WebCore/layout/formattingContexts/FormattingQuirks.cpp</a></li>
<li><a href="#trunkSourceWebCorelayoutformattingContextsblockBlockFormattingContextcpp">trunk/Source/WebCore/layout/formattingContexts/block/BlockFormattingContext.cpp</a></li>
<li><a href="#trunkSourceWebCorelayoutformattingContextsblockBlockFormattingContexth">trunk/Source/WebCore/layout/formattingContexts/block/BlockFormattingContext.h</a></li>
<li><a href="#trunkSourceWebCorelayoutformattingContextsblocktablewrapperTableWrapperBlockFormattingContextcpp">trunk/Source/WebCore/layout/formattingContexts/block/tablewrapper/TableWrapperBlockFormattingContext.cpp</a></li>
<li><a href="#trunkSourceWebCorelayoutformattingContextsflexFlexFormattingContextcpp">trunk/Source/WebCore/layout/formattingContexts/flex/FlexFormattingContext.cpp</a></li>
<li><a href="#trunkSourceWebCorelayoutformattingContextsflexFlexFormattingContexth">trunk/Source/WebCore/layout/formattingContexts/flex/FlexFormattingContext.h</a></li>
<li><a href="#trunkSourceWebCorelayoutformattingContextsinlineInlineFormattingContextcpp">trunk/Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.cpp</a></li>
<li><a href="#trunkSourceWebCorelayoutformattingContextsinlineInlineFormattingContexth">trunk/Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.h</a></li>
<li><a href="#trunkSourceWebCorelayoutformattingContextstableTableFormattingContextcpp">trunk/Source/WebCore/layout/formattingContexts/table/TableFormattingContext.cpp</a></li>
<li><a href="#trunkSourceWebCorelayoutformattingContextstableTableFormattingContexth">trunk/Source/WebCore/layout/formattingContexts/table/TableFormattingContext.h</a></li>
<li><a href="#trunkSourceWebCorelayoutformattingContextstableTableLayoutcpp">trunk/Source/WebCore/layout/formattingContexts/table/TableLayout.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (277956 => 277957)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog   2021-05-24 17:11:36 UTC (rev 277956)
+++ trunk/Source/WebCore/ChangeLog      2021-05-24 18:08:10 UTC (rev 277957)
</span><span class="lines">@@ -1,5 +1,68 @@
</span><span class="cx"> 2021-05-24  Alan Bujtas  <zalan@apple.com>
</span><span class="cx"> 
</span><ins>+        [LFC] Rename the geometry() helpers to formattingGeometry()
+        https://bugs.webkit.org/show_bug.cgi?id=226153
+
+        Reviewed by Antti Koivisto.
+
+        * layout/formattingContexts/FormattingContext.cpp:
+        (WebCore::Layout::FormattingContext::computeOutOfFlowHorizontalGeometry):
+        (WebCore::Layout::FormattingContext::computeOutOfFlowVerticalGeometry):
+        (WebCore::Layout::FormattingContext::computeBorderAndPadding):
+        (WebCore::Layout::FormattingContext::layoutOutOfFlowContent):
+        (WebCore::Layout::FormattingContext::formattingGeometry const):
+        (WebCore::Layout::FormattingContext::geometry const): Deleted.
+        * layout/formattingContexts/FormattingContext.h:
+        * layout/formattingContexts/FormattingQuirks.cpp:
+        (WebCore::Layout::FormattingQuirks::heightValueOfNearestContainingBlockWithFixedHeight const):
+        * layout/formattingContexts/block/BlockFormattingContext.cpp:
+        (WebCore::Layout::BlockFormattingContext::layoutInFlowContent):
+        (WebCore::Layout::BlockFormattingContext::placeInFlowPositionedChildren):
+        (WebCore::Layout::BlockFormattingContext::computeStaticVerticalPosition):
+        (WebCore::Layout::BlockFormattingContext::computeStaticHorizontalPosition):
+        (WebCore::Layout::BlockFormattingContext::precomputeVerticalPositionForBoxAndAncestors):
+        (WebCore::Layout::BlockFormattingContext::computeWidthAndMargin):
+        (WebCore::Layout::BlockFormattingContext::computeHeightAndMargin):
+        (WebCore::Layout::BlockFormattingContext::computedIntrinsicWidthConstraints):
+        (WebCore::Layout::BlockFormattingContext::formattingGeometry const):
+        (WebCore::Layout::BlockFormattingContext::geometry const): Deleted.
+        * layout/formattingContexts/block/BlockFormattingContext.h:
+        * layout/formattingContexts/block/tablewrapper/TableWrapperBlockFormattingContext.cpp:
+        (WebCore::Layout::TableWrapperBlockFormattingContext::layoutTableBox):
+        (WebCore::Layout::TableWrapperBlockFormattingContext::computeBorderAndPaddingForTableBox):
+        (WebCore::Layout::TableWrapperBlockFormattingContext::computeWidthAndMarginForTableBox):
+        (WebCore::Layout::TableWrapperBlockFormattingContext::computeHeightAndMarginForTableBox):
+        * layout/formattingContexts/flex/FlexFormattingContext.cpp:
+        (WebCore::Layout::FlexFormattingContext::sizeAndPlaceFlexItems):
+        (WebCore::Layout::FlexFormattingContext::computeIntrinsicWidthConstraintsForFlexItems):
+        (WebCore::Layout::FlexFormattingContext::formattingGeometry const):
+        (WebCore::Layout::FlexFormattingContext::geometry const): Deleted.
+        * layout/formattingContexts/flex/FlexFormattingContext.h:
+        * layout/formattingContexts/inline/InlineFormattingContext.cpp:
+        (WebCore::Layout::InlineFormattingContext::layoutInFlowContent):
+        (WebCore::Layout::InlineFormattingContext::lineLayout):
+        (WebCore::Layout::InlineFormattingContext::computedIntrinsicWidthConstraints):
+        (WebCore::Layout::InlineFormattingContext::computeIntrinsicWidthForFormattingRoot):
+        (WebCore::Layout::InlineFormattingContext::computeHorizontalMargin):
+        (WebCore::Layout::InlineFormattingContext::computeWidthAndMargin):
+        (WebCore::Layout::InlineFormattingContext::computeHeightAndMargin):
+        (WebCore::Layout::InlineFormattingContext::computeGeometryForLineContent):
+        (WebCore::Layout::InlineFormattingContext::formattingGeometry const):
+        (WebCore::Layout::InlineFormattingContext::geometry const): Deleted.
+        * layout/formattingContexts/inline/InlineFormattingContext.h:
+        * layout/formattingContexts/table/TableFormattingContext.cpp:
+        (WebCore::Layout::TableFormattingContext::setUsedGeometryForRows):
+        (WebCore::Layout::TableFormattingContext::layoutCell):
+        (WebCore::Layout::TableFormattingContext::computedPreferredWidthForColumns):
+        (WebCore::Layout::TableFormattingContext::computeAndDistributeExtraSpace):
+        (WebCore::Layout::TableFormattingContext::formattingGeometry const):
+        (WebCore::Layout::TableFormattingContext::geometry const): Deleted.
+        * layout/formattingContexts/table/TableFormattingContext.h:
+        * layout/formattingContexts/table/TableLayout.cpp:
+        (WebCore::Layout::TableFormattingContext::TableLayout::distributedVerticalSpace):
+
+2021-05-24  Alan Bujtas  <zalan@apple.com>
+
</ins><span class="cx">         [LFC] FormattingGeometry functions should all be const
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=226147
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorelayoutformattingContextsFormattingContextcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/layout/formattingContexts/FormattingContext.cpp (277956 => 277957)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/layout/formattingContexts/FormattingContext.cpp     2021-05-24 17:11:36 UTC (rev 277956)
+++ trunk/Source/WebCore/layout/formattingContexts/FormattingContext.cpp        2021-05-24 18:08:10 UTC (rev 277957)
</span><span class="lines">@@ -75,18 +75,18 @@
</span><span class="cx"> {
</span><span class="cx">     ASSERT(layoutBox.isOutOfFlowPositioned());
</span><span class="cx">     auto compute = [&](Optional<LayoutUnit> usedWidth) {
</span><del>-        return geometry().outOfFlowHorizontalGeometry(layoutBox, constraints.horizontal, constraints.vertical, { usedWidth, { } });
</del><ins>+        return formattingGeometry().outOfFlowHorizontalGeometry(layoutBox, constraints.horizontal, constraints.vertical, { usedWidth, { } });
</ins><span class="cx">     };
</span><span class="cx"> 
</span><span class="cx">     auto containingBlockWidth = constraints.horizontal.logicalWidth;
</span><span class="cx">     auto horizontalGeometry = compute({ });
</span><del>-    if (auto maxWidth = geometry().computedMaxWidth(layoutBox, containingBlockWidth)) {
</del><ins>+    if (auto maxWidth = formattingGeometry().computedMaxWidth(layoutBox, containingBlockWidth)) {
</ins><span class="cx">         auto maxHorizontalGeometry = compute(maxWidth);
</span><span class="cx">         if (horizontalGeometry.contentWidthAndMargin.contentWidth > maxHorizontalGeometry.contentWidthAndMargin.contentWidth)
</span><span class="cx">             horizontalGeometry = maxHorizontalGeometry;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if (auto minWidth = geometry().computedMinWidth(layoutBox, containingBlockWidth)) {
</del><ins>+    if (auto minWidth = formattingGeometry().computedMinWidth(layoutBox, containingBlockWidth)) {
</ins><span class="cx">         auto minHorizontalGeometry = compute(minWidth);
</span><span class="cx">         if (horizontalGeometry.contentWidthAndMargin.contentWidth < minHorizontalGeometry.contentWidthAndMargin.contentWidth)
</span><span class="cx">             horizontalGeometry = minHorizontalGeometry;
</span><span class="lines">@@ -103,18 +103,18 @@
</span><span class="cx"> {
</span><span class="cx">     ASSERT(layoutBox.isOutOfFlowPositioned());
</span><span class="cx">     auto compute = [&](Optional<LayoutUnit> usedHeight) {
</span><del>-        return geometry().outOfFlowVerticalGeometry(layoutBox, constraints.horizontal, constraints.vertical, { usedHeight });
</del><ins>+        return formattingGeometry().outOfFlowVerticalGeometry(layoutBox, constraints.horizontal, constraints.vertical, { usedHeight });
</ins><span class="cx">     };
</span><span class="cx"> 
</span><span class="cx">     auto containingBlockHeight = *constraints.vertical.logicalHeight;
</span><span class="cx">     auto verticalGeometry = compute({ });
</span><del>-    if (auto maxHeight = geometry().computedMaxHeight(layoutBox, containingBlockHeight)) {
</del><ins>+    if (auto maxHeight = formattingGeometry().computedMaxHeight(layoutBox, containingBlockHeight)) {
</ins><span class="cx">         auto maxVerticalGeometry = compute(maxHeight);
</span><span class="cx">         if (verticalGeometry.contentHeightAndMargin.contentHeight > maxVerticalGeometry.contentHeightAndMargin.contentHeight)
</span><span class="cx">             verticalGeometry = maxVerticalGeometry;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if (auto minHeight = geometry().computedMinHeight(layoutBox, containingBlockHeight)) {
</del><ins>+    if (auto minHeight = formattingGeometry().computedMinHeight(layoutBox, containingBlockHeight)) {
</ins><span class="cx">         auto minVerticalGeometry = compute(minHeight);
</span><span class="cx">         if (verticalGeometry.contentHeightAndMargin.contentHeight < minVerticalGeometry.contentHeightAndMargin.contentHeight)
</span><span class="cx">             verticalGeometry = minVerticalGeometry;
</span><span class="lines">@@ -131,8 +131,8 @@
</span><span class="cx"> void FormattingContext::computeBorderAndPadding(const Box& layoutBox, const HorizontalConstraints& horizontalConstraint)
</span><span class="cx"> {
</span><span class="cx">     auto& boxGeometry = formattingState().boxGeometry(layoutBox);
</span><del>-    boxGeometry.setBorder(geometry().computedBorder(layoutBox));
-    boxGeometry.setPadding(geometry().computedPadding(layoutBox, horizontalConstraint.logicalWidth));
</del><ins>+    boxGeometry.setBorder(formattingGeometry().computedBorder(layoutBox));
+    boxGeometry.setPadding(formattingGeometry().computedPadding(layoutBox, horizontalConstraint.logicalWidth));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void FormattingContext::layoutOutOfFlowContent(InvalidationState& invalidationState, const ConstraintsForOutOfFlowContent& constraints)
</span><span class="lines">@@ -143,7 +143,7 @@
</span><span class="cx"> 
</span><span class="cx">     auto constraintsForLayoutBox = [&] (const auto& outOfFlowBox) {
</span><span class="cx">         auto& containingBlock = outOfFlowBox.containingBlock();
</span><del>-        return &containingBlock == &root() ? constraints : geometry().constraintsForOutOfFlowContent(containingBlock);
</del><ins>+        return &containingBlock == &root() ? constraints : formattingGeometry().constraintsForOutOfFlowContent(containingBlock);
</ins><span class="cx">     };
</span><span class="cx"> 
</span><span class="cx">     for (auto& outOfFlowBox : formattingState().outOfFlowBoxes()) {
</span><span class="lines">@@ -161,9 +161,9 @@
</span><span class="cx">             auto& containerBox = downcast<ContainerBox>(*outOfFlowBox);
</span><span class="cx">             auto formattingContext = LayoutContext::createFormattingContext(containerBox, layoutState());
</span><span class="cx">             if (containerBox.hasInFlowOrFloatingChild())
</span><del>-                formattingContext->layoutInFlowContent(invalidationState, geometry().constraintsForInFlowContent(containerBox));
</del><ins>+                formattingContext->layoutInFlowContent(invalidationState, formattingGeometry().constraintsForInFlowContent(containerBox));
</ins><span class="cx">             computeOutOfFlowVerticalGeometry(containerBox, containingBlockConstraints);
</span><del>-            formattingContext->layoutOutOfFlowContent(invalidationState, geometry().constraintsForOutOfFlowContent(containerBox));
</del><ins>+            formattingContext->layoutOutOfFlowContent(invalidationState, formattingGeometry().constraintsForOutOfFlowContent(containerBox));
</ins><span class="cx">         } else
</span><span class="cx">             computeOutOfFlowVerticalGeometry(*outOfFlowBox, containingBlockConstraints);
</span><span class="cx">     }
</span><span class="lines">@@ -272,7 +272,7 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-FormattingGeometry FormattingContext::geometry() const
</del><ins>+FormattingGeometry FormattingContext::formattingGeometry() const
</ins><span class="cx"> {
</span><span class="cx">     return FormattingGeometry(*this);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorelayoutformattingContextsFormattingContexth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/layout/formattingContexts/FormattingContext.h (277956 => 277957)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/layout/formattingContexts/FormattingContext.h       2021-05-24 17:11:36 UTC (rev 277956)
+++ trunk/Source/WebCore/layout/formattingContexts/FormattingContext.h  2021-05-24 18:08:10 UTC (rev 277957)
</span><span class="lines">@@ -91,7 +91,7 @@
</span><span class="cx"> 
</span><span class="cx">     using LayoutQueue = Vector<const Box*>;
</span><span class="cx"> private:
</span><del>-    FormattingGeometry geometry() const;
</del><ins>+    FormattingGeometry formattingGeometry() const;
</ins><span class="cx">     FormattingQuirks quirks() const;
</span><span class="cx"> 
</span><span class="cx">     void collectOutOfFlowDescendantsIfNeeded();
</span></span></pre></div>
<a id="trunkSourceWebCorelayoutformattingContextsFormattingQuirkscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/layout/formattingContexts/FormattingQuirks.cpp (277956 => 277957)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/layout/formattingContexts/FormattingQuirks.cpp      2021-05-24 17:11:36 UTC (rev 277956)
+++ trunk/Source/WebCore/layout/formattingContexts/FormattingQuirks.cpp 2021-05-24 18:08:10 UTC (rev 277957)
</span><span class="lines">@@ -57,9 +57,9 @@
</span><span class="cx">         // -and it's totally insane because now we freely travel across formatting context boundaries and computed margins are nonexistent.
</span><span class="cx">         if (containingBlock->isBodyBox() || containingBlock->isDocumentBox()) {
</span><span class="cx"> 
</span><del>-            auto geometry = FormattingGeometry { formattingContext };
-            auto horizontalConstraints = geometry.constraintsForInFlowContent(containingBlock->containingBlock(), FormattingContext::EscapeReason::FindFixedHeightAncestorQuirk).horizontal;
-            auto verticalMargin = geometry.computedVerticalMargin(*containingBlock, horizontalConstraints);
</del><ins>+            auto formattingGeometry = FormattingGeometry { formattingContext };
+            auto horizontalConstraints = formattingGeometry.constraintsForInFlowContent(containingBlock->containingBlock(), FormattingContext::EscapeReason::FindFixedHeightAncestorQuirk).horizontal;
+            auto verticalMargin = formattingGeometry.computedVerticalMargin(*containingBlock, horizontalConstraints);
</ins><span class="cx"> 
</span><span class="cx">             auto& boxGeometry = formattingContext.geometryForBox(*containingBlock, FormattingContext::EscapeReason::FindFixedHeightAncestorQuirk);
</span><span class="cx">             auto verticalPadding = boxGeometry.paddingTop().valueOr(0) + boxGeometry.paddingBottom().valueOr(0);
</span></span></pre></div>
<a id="trunkSourceWebCorelayoutformattingContextsblockBlockFormattingContextcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/layout/formattingContexts/block/BlockFormattingContext.cpp (277956 => 277957)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/layout/formattingContexts/block/BlockFormattingContext.cpp  2021-05-24 17:11:36 UTC (rev 277956)
+++ trunk/Source/WebCore/layout/formattingContexts/block/BlockFormattingContext.cpp     2021-05-24 18:08:10 UTC (rev 277957)
</span><span class="lines">@@ -97,7 +97,7 @@
</span><span class="cx"> 
</span><span class="cx">     auto constraintsForLayoutBox = [&] (const auto& layoutBox) {
</span><span class="cx">         auto& containingBlock = layoutBox.containingBlock();
</span><del>-        return &containingBlock == &formattingRoot ? constraints : geometry().constraintsForInFlowContent(containingBlock);
</del><ins>+        return &containingBlock == &formattingRoot ? constraints : blockFormattingGeometry().constraintsForInFlowContent(containingBlock);
</ins><span class="cx">     };
</span><span class="cx"> 
</span><span class="cx">     // This is a post-order tree traversal layout.
</span><span class="lines">@@ -130,7 +130,7 @@
</span><span class="cx">                     auto formattingContext = LayoutContext::createFormattingContext(containerBox, layoutState());
</span><span class="cx">                     if (containerBox.isTableWrapperBox())
</span><span class="cx">                         downcast<TableWrapperBlockFormattingContext>(*formattingContext).setHorizontalConstraintsIgnoringFloats(containingBlockConstraints.horizontal);
</span><del>-                    formattingContext->layoutInFlowContent(invalidationState, geometry().constraintsForInFlowContent(containerBox));
</del><ins>+                    formattingContext->layoutInFlowContent(invalidationState, blockFormattingGeometry().constraintsForInFlowContent(containerBox));
</ins><span class="cx">                 }
</span><span class="cx">                 break;
</span><span class="cx">             }
</span><span class="lines">@@ -161,7 +161,7 @@
</span><span class="cx">                 // Now that we computed the box's height, we can layout the out-of-flow descendants.
</span><span class="cx">                 if (is<ContainerBox>(layoutBox) && downcast<ContainerBox>(layoutBox).hasChild()) {
</span><span class="cx">                     auto& containerBox = downcast<ContainerBox>(layoutBox);
</span><del>-                    LayoutContext::createFormattingContext(containerBox, layoutState())->layoutOutOfFlowContent(invalidationState, geometry().constraintsForOutOfFlowContent(containerBox));
</del><ins>+                    LayoutContext::createFormattingContext(containerBox, layoutState())->layoutOutOfFlowContent(invalidationState, blockFormattingGeometry().constraintsForOutOfFlowContent(containerBox));
</ins><span class="cx">                 }
</span><span class="cx">             }
</span><span class="cx">             if (!establishesFormattingContext && is<ContainerBox>(layoutBox))
</span><span class="lines">@@ -258,7 +258,7 @@
</span><span class="cx">     for (auto& childBox : childrenOfType<Box>(containerBox)) {
</span><span class="cx">         if (!childBox.isInFlowPositioned())
</span><span class="cx">             continue;
</span><del>-        auto positionOffset = geometry().inFlowPositionedPositionOffset(childBox, horizontalConstraints);
</del><ins>+        auto positionOffset = blockFormattingGeometry().inFlowPositionedPositionOffset(childBox, horizontalConstraints);
</ins><span class="cx">         formattingState().boxGeometry(childBox).move(positionOffset);
</span><span class="cx">     }
</span><span class="cx">     LOG_WITH_STREAM(FormattingContextLayout, stream << "End: move in-flow positioned children -> parent: " << &containerBox);
</span><span class="lines">@@ -266,12 +266,12 @@
</span><span class="cx"> 
</span><span class="cx"> void BlockFormattingContext::computeStaticVerticalPosition(const Box& layoutBox, const VerticalConstraints& verticalConstraints)
</span><span class="cx"> {
</span><del>-    formattingState().boxGeometry(layoutBox).setLogicalTop(geometry().staticVerticalPosition(layoutBox, verticalConstraints));
</del><ins>+    formattingState().boxGeometry(layoutBox).setLogicalTop(blockFormattingGeometry().staticVerticalPosition(layoutBox, verticalConstraints));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void BlockFormattingContext::computeStaticHorizontalPosition(const Box& layoutBox, const HorizontalConstraints& horizontalConstraints)
</span><span class="cx"> {
</span><del>-    formattingState().boxGeometry(layoutBox).setLogicalLeft(geometry().staticHorizontalPosition(layoutBox, horizontalConstraints));
</del><ins>+    formattingState().boxGeometry(layoutBox).setLogicalLeft(blockFormattingGeometry().staticHorizontalPosition(layoutBox, horizontalConstraints));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void BlockFormattingContext::precomputeVerticalPositionForBoxAndAncestors(const Box& layoutBox, const ConstraintsPair& constraintsPair)
</span><span class="lines">@@ -286,7 +286,7 @@
</span><span class="cx">     //
</span><span class="cx">     // The idea here is that as long as we don't cross the block formatting context boundary, we should be able to pre-compute the final top position.
</span><span class="cx">     // FIXME: we currently don't account for the "clear" property when computing the final position for an ancestor.
</span><del>-    auto formattingGeometry = geometry();
</del><ins>+    auto formattingGeometry = blockFormattingGeometry();
</ins><span class="cx">     for (auto* ancestor = &layoutBox; ancestor && ancestor != &root(); ancestor = &ancestor->containingBlock()) {
</span><span class="cx">         auto constraintsForAncestor = [&] {
</span><span class="cx">             auto& containingBlock = ancestor->containingBlock();
</span><span class="lines">@@ -360,7 +360,7 @@
</span><span class="cx">         // Float avoiders' available width might be shrunk by existing floats in the context.
</span><span class="cx">         availableWidthFloatAvoider = usedAvailableWidthForFloatAvoider(floatingContext, layoutBox, constraintsPair);
</span><span class="cx">     }
</span><del>-    auto contentWidthAndMargin = geometry().computedContentWidthAndMargin(layoutBox, constraintsPair.containingBlock.horizontal, availableWidthFloatAvoider);
</del><ins>+    auto contentWidthAndMargin = blockFormattingGeometry().computedContentWidthAndMargin(layoutBox, constraintsPair.containingBlock.horizontal, availableWidthFloatAvoider);
</ins><span class="cx">     auto& boxGeometry = formattingState().boxGeometry(layoutBox);
</span><span class="cx">     boxGeometry.setContentBoxWidth(contentWidthAndMargin.contentWidth);
</span><span class="cx">     boxGeometry.setHorizontalMargin({ contentWidthAndMargin.usedMargin.start, contentWidthAndMargin.usedMargin.end });
</span><span class="lines">@@ -370,10 +370,10 @@
</span><span class="cx"> {
</span><span class="cx">     auto compute = [&](Optional<LayoutUnit> usedHeight) -> ContentHeightAndMargin {
</span><span class="cx">         if (layoutBox.isInFlow())
</span><del>-            return geometry().inFlowContentHeightAndMargin(layoutBox, constraints.horizontal, { usedHeight });
</del><ins>+            return blockFormattingGeometry().inFlowContentHeightAndMargin(layoutBox, constraints.horizontal, { usedHeight });
</ins><span class="cx"> 
</span><span class="cx">         if (layoutBox.isFloatingPositioned())
</span><del>-            return geometry().floatingContentHeightAndMargin(layoutBox, constraints.horizontal, { usedHeight });
</del><ins>+            return blockFormattingGeometry().floatingContentHeightAndMargin(layoutBox, constraints.horizontal, { usedHeight });
</ins><span class="cx"> 
</span><span class="cx">         ASSERT_NOT_REACHED();
</span><span class="cx">         return { };
</span><span class="lines">@@ -380,7 +380,7 @@
</span><span class="cx">     };
</span><span class="cx"> 
</span><span class="cx">     auto contentHeightAndMargin = compute({ });
</span><del>-    if (auto maxHeight = geometry().computedMaxHeight(layoutBox)) {
</del><ins>+    if (auto maxHeight = blockFormattingGeometry().computedMaxHeight(layoutBox)) {
</ins><span class="cx">         if (contentHeightAndMargin.contentHeight > *maxHeight) {
</span><span class="cx">             auto maxHeightAndMargin = compute(maxHeight);
</span><span class="cx">             // Used height should remain the same.
</span><span class="lines">@@ -389,7 +389,7 @@
</span><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if (auto minHeight = geometry().computedMinHeight(layoutBox)) {
</del><ins>+    if (auto minHeight = blockFormattingGeometry().computedMinHeight(layoutBox)) {
</ins><span class="cx">         if (contentHeightAndMargin.contentHeight < *minHeight) {
</span><span class="cx">             auto minHeightAndMargin = compute(minHeight);
</span><span class="cx">             // Used height should remain the same.
</span><span class="lines">@@ -478,7 +478,7 @@
</span><span class="cx">             auto& layoutBox = *queue.takeLast();
</span><span class="cx">             auto desdendantConstraints = formattingState.intrinsicWidthConstraintsForBox(layoutBox);
</span><span class="cx">             if (!desdendantConstraints) {
</span><del>-                desdendantConstraints = geometry().intrinsicWidthConstraints(layoutBox);
</del><ins>+                desdendantConstraints = blockFormattingGeometry().intrinsicWidthConstraints(layoutBox);
</ins><span class="cx">                 formattingState.setIntrinsicWidthConstraintsForBox(layoutBox, *desdendantConstraints);
</span><span class="cx">             }
</span><span class="cx">             constraints.minimum = std::max(constraints.minimum, desdendantConstraints->minimum);
</span><span class="lines">@@ -602,7 +602,7 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-BlockFormattingGeometry BlockFormattingContext::geometry() const
</del><ins>+BlockFormattingGeometry BlockFormattingContext::blockFormattingGeometry() const
</ins><span class="cx"> {
</span><span class="cx">     return BlockFormattingGeometry { *this };
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorelayoutformattingContextsblockBlockFormattingContexth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/layout/formattingContexts/block/BlockFormattingContext.h (277956 => 277957)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/layout/formattingContexts/block/BlockFormattingContext.h    2021-05-24 17:11:36 UTC (rev 277956)
+++ trunk/Source/WebCore/layout/formattingContexts/block/BlockFormattingContext.h       2021-05-24 18:08:10 UTC (rev 277957)
</span><span class="lines">@@ -80,7 +80,7 @@
</span><span class="cx">     void updateMarginAfterForPreviousSibling(const Box&);
</span><span class="cx"> 
</span><span class="cx">     BlockFormattingState& formattingState() { return downcast<BlockFormattingState>(FormattingContext::formattingState()); }
</span><del>-    BlockFormattingGeometry geometry() const;
</del><ins>+    BlockFormattingGeometry blockFormattingGeometry() const;
</ins><span class="cx">     BlockMarginCollapse marginCollapse() const;
</span><span class="cx"> 
</span><span class="cx"> #if ASSERT_ENABLED
</span></span></pre></div>
<a id="trunkSourceWebCorelayoutformattingContextsblocktablewrapperTableWrapperBlockFormattingContextcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/layout/formattingContexts/block/tablewrapper/TableWrapperBlockFormattingContext.cpp (277956 => 277957)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/layout/formattingContexts/block/tablewrapper/TableWrapperBlockFormattingContext.cpp 2021-05-24 17:11:36 UTC (rev 277956)
+++ trunk/Source/WebCore/layout/formattingContexts/block/tablewrapper/TableWrapperBlockFormattingContext.cpp    2021-05-24 18:08:10 UTC (rev 277957)
</span><span class="lines">@@ -78,7 +78,7 @@
</span><span class="cx"> 
</span><span class="cx">     if (tableBox.hasChild()) {
</span><span class="cx">         auto invalidationState = InvalidationState { };
</span><del>-        LayoutContext::createFormattingContext(tableBox, layoutState())->layoutInFlowContent(invalidationState, geometry().constraintsForInFlowContent(tableBox));
</del><ins>+        LayoutContext::createFormattingContext(tableBox, layoutState())->layoutInFlowContent(invalidationState, blockFormattingGeometry().constraintsForInFlowContent(tableBox));
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     computeHeightAndMarginForTableBox(tableBox, constraints);
</span><span class="lines">@@ -100,13 +100,13 @@
</span><span class="cx">     // maximum collapsed top border. The bottom border width is computed by examining all cells whose bottom borders collapse
</span><span class="cx">     // with the bottom of the table. The bottom border width is equal to half of the maximum collapsed bottom border.
</span><span class="cx">     auto& grid = layoutState().establishedTableFormattingState(tableBox).tableGrid();
</span><del>-    auto tableBorder = geometry().computedBorder(tableBox);
</del><ins>+    auto tableBorder = blockFormattingGeometry().computedBorder(tableBox);
</ins><span class="cx"> 
</span><span class="cx">     auto& firstColumnFirstRowBox = grid.slot({ 0 , 0 })->cell().box();
</span><del>-    auto leftBorder = std::max(tableBorder.horizontal.left, geometry().computedBorder(firstColumnFirstRowBox).horizontal.left);
</del><ins>+    auto leftBorder = std::max(tableBorder.horizontal.left, blockFormattingGeometry().computedBorder(firstColumnFirstRowBox).horizontal.left);
</ins><span class="cx"> 
</span><span class="cx">     auto& lastColumnFirstRow = grid.slot({ grid.columns().size() - 1, 0 })->cell().box();
</span><del>-    auto rightBorder = std::max(tableBorder.horizontal.right, geometry().computedBorder(lastColumnFirstRow).horizontal.right);
</del><ins>+    auto rightBorder = std::max(tableBorder.horizontal.right, blockFormattingGeometry().computedBorder(lastColumnFirstRow).horizontal.right);
</ins><span class="cx"> 
</span><span class="cx">     auto topBorder = tableBorder.vertical.top;
</span><span class="cx">     auto bottomBorder = tableBorder.vertical.bottom;
</span><span class="lines">@@ -115,26 +115,26 @@
</span><span class="cx">         auto& boxInFirstRox = grid.slot({ columnIndex, 0 })->cell().box();
</span><span class="cx">         auto& boxInLastRow = grid.slot({ columnIndex, lastRowIndex })->cell().box();
</span><span class="cx"> 
</span><del>-        topBorder = std::max(topBorder, geometry().computedBorder(boxInFirstRox).vertical.top);
-        bottomBorder = std::max(bottomBorder, geometry().computedBorder(boxInLastRow).vertical.bottom);
</del><ins>+        topBorder = std::max(topBorder, blockFormattingGeometry().computedBorder(boxInFirstRox).vertical.top);
+        bottomBorder = std::max(bottomBorder, blockFormattingGeometry().computedBorder(boxInLastRow).vertical.bottom);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><del>-    topBorder = std::max(topBorder, geometry().computedBorder(*tableBox.firstChild()).vertical.top);
</del><ins>+    topBorder = std::max(topBorder, blockFormattingGeometry().computedBorder(*tableBox.firstChild()).vertical.top);
</ins><span class="cx">     for (auto& section : childrenOfType<ContainerBox>(tableBox)) {
</span><del>-        auto horiztonalBorder = geometry().computedBorder(section).horizontal;
</del><ins>+        auto horiztonalBorder = blockFormattingGeometry().computedBorder(section).horizontal;
</ins><span class="cx">         leftBorder = std::max(leftBorder, horiztonalBorder.left);
</span><span class="cx">         rightBorder = std::max(rightBorder, horiztonalBorder.right);
</span><span class="cx">     }
</span><del>-    bottomBorder = std::max(bottomBorder, geometry().computedBorder(*tableBox.lastChild()).vertical.bottom);
</del><ins>+    bottomBorder = std::max(bottomBorder, blockFormattingGeometry().computedBorder(*tableBox.lastChild()).vertical.bottom);
</ins><span class="cx"> 
</span><span class="cx">     auto& rows = grid.rows().list();
</span><del>-    topBorder = std::max(topBorder, geometry().computedBorder(rows.first().box()).vertical.top);
</del><ins>+    topBorder = std::max(topBorder, blockFormattingGeometry().computedBorder(rows.first().box()).vertical.top);
</ins><span class="cx">     for (auto& row : rows) {
</span><del>-        auto horiztonalBorder = geometry().computedBorder(row.box()).horizontal;
</del><ins>+        auto horiztonalBorder = blockFormattingGeometry().computedBorder(row.box()).horizontal;
</ins><span class="cx">         leftBorder = std::max(leftBorder, horiztonalBorder.left);
</span><span class="cx">         rightBorder = std::max(rightBorder, horiztonalBorder.right);
</span><span class="cx">     }
</span><del>-    bottomBorder = std::max(bottomBorder, geometry().computedBorder(rows.last().box()).vertical.bottom);
</del><ins>+    bottomBorder = std::max(bottomBorder, blockFormattingGeometry().computedBorder(rows.last().box()).vertical.bottom);
</ins><span class="cx"> 
</span><span class="cx">     auto collapsedBorder = Edges { { leftBorder, rightBorder }, { topBorder, bottomBorder } };
</span><span class="cx">     grid.setCollapsedBorder(collapsedBorder);
</span><span class="lines">@@ -141,7 +141,7 @@
</span><span class="cx"> 
</span><span class="cx">     auto& boxGeometry = formattingState().boxGeometry(tableBox);
</span><span class="cx">     boxGeometry.setBorder(collapsedBorder / 2);
</span><del>-    boxGeometry.setPadding(geometry().computedPadding(tableBox, horizontalConstraints.logicalWidth));
</del><ins>+    boxGeometry.setPadding(blockFormattingGeometry().computedPadding(tableBox, horizontalConstraints.logicalWidth));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void TableWrapperBlockFormattingContext::computeWidthAndMarginForTableBox(const ContainerBox& tableBox, const HorizontalConstraints& horizontalConstraints)
</span><span class="lines">@@ -186,10 +186,10 @@
</span><span class="cx">     // Similar setup with non-table content would resolve the inner block level box's width to 40px;
</span><span class="cx">     // This needs clarification in the spec.
</span><span class="cx">     auto horizontalConstraintForResolvingWidth = m_horizontalConstraintsIgnoringFloats.logicalWidth;
</span><del>-    auto geometry = this->geometry();
-    auto computedWidth = geometry.computedWidth(tableBox, horizontalConstraintForResolvingWidth);
-    auto computedMaxWidth = geometry.computedMaxWidth(tableBox, horizontalConstraintForResolvingWidth);
-    auto computedMinWidth = geometry.computedMinWidth(tableBox, horizontalConstraintForResolvingWidth);
</del><ins>+    auto formattingGeometry = blockFormattingGeometry();
+    auto computedWidth = formattingGeometry.computedWidth(tableBox, horizontalConstraintForResolvingWidth);
+    auto computedMaxWidth = formattingGeometry.computedMaxWidth(tableBox, horizontalConstraintForResolvingWidth);
+    auto computedMinWidth = formattingGeometry.computedMinWidth(tableBox, horizontalConstraintForResolvingWidth);
</ins><span class="cx">     // Use the generic shrink-to-fit-width logic as the initial width for the table.
</span><span class="cx">     auto usedWidth = std::min(std::max(intrinsicWidthConstraints.minimum, availableHorizontalSpace), intrinsicWidthConstraints.maximum);
</span><span class="cx">     if (computedWidth || computedMinWidth || computedMaxWidth) {
</span><span class="lines">@@ -208,7 +208,7 @@
</span><span class="cx">             usedWidth = *computedMinWidth;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    auto contentWidthAndMargin = geometry.inFlowContentWidthAndMargin(tableBox, horizontalConstraints, OverriddenHorizontalValues { usedWidth, { } });
</del><ins>+    auto contentWidthAndMargin = formattingGeometry.inFlowContentWidthAndMargin(tableBox, horizontalConstraints, OverriddenHorizontalValues { usedWidth, { } });
</ins><span class="cx"> 
</span><span class="cx">     auto& boxGeometry = formattingState().boxGeometry(tableBox);
</span><span class="cx">     boxGeometry.setContentBoxWidth(contentWidthAndMargin.contentWidth);
</span><span class="lines">@@ -224,11 +224,11 @@
</span><span class="cx">         if (layoutState().inQuirksMode())
</span><span class="cx">             return TableWrapperQuirks(*this).overriddenTableHeight(tableBox);
</span><span class="cx">         if (tableBox.hasInFlowOrFloatingChild())
</span><del>-            return geometry().contentHeightForFormattingContextRoot(tableBox);
</del><ins>+            return blockFormattingGeometry().contentHeightForFormattingContextRoot(tableBox);
</ins><span class="cx">         return { };
</span><span class="cx">     }();
</span><span class="cx"> 
</span><del>-    auto heightAndMargin = geometry().inFlowContentHeightAndMargin(tableBox, constraints.horizontal, { overriddenTableHeight });
</del><ins>+    auto heightAndMargin = blockFormattingGeometry().inFlowContentHeightAndMargin(tableBox, constraints.horizontal, { overriddenTableHeight });
</ins><span class="cx">     auto verticalMargin = marginCollapse().collapsedVerticalValues(tableBox, heightAndMargin.nonCollapsedMargin);
</span><span class="cx">     // Cache the computed positive and negative margin value pair.
</span><span class="cx">     formattingState().setUsedVerticalMargin(tableBox, verticalMargin);
</span></span></pre></div>
<a id="trunkSourceWebCorelayoutformattingContextsflexFlexFormattingContextcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/layout/formattingContexts/flex/FlexFormattingContext.cpp (277956 => 277957)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/layout/formattingContexts/flex/FlexFormattingContext.cpp    2021-05-24 17:11:36 UTC (rev 277956)
+++ trunk/Source/WebCore/layout/formattingContexts/flex/FlexFormattingContext.cpp       2021-05-24 18:08:10 UTC (rev 277957)
</span><span class="lines">@@ -67,7 +67,7 @@
</span><span class="cx"> void FlexFormattingContext::sizeAndPlaceFlexItems(const ConstraintsForInFlowContent& constraints)
</span><span class="cx"> {
</span><span class="cx">     auto& formattingState = this->formattingState();
</span><del>-    auto geometry = this->geometry();
</del><ins>+    auto formattingGeometry = flexFormattingGeometry();
</ins><span class="cx">     auto flexItemMainAxisStart = constraints.horizontal.logicalLeft;
</span><span class="cx">     auto flexItemMainAxisEnd = flexItemMainAxisStart;
</span><span class="cx">     auto flexItemCrosAxisStart = constraints.vertical.logicalTop;
</span><span class="lines">@@ -87,16 +87,16 @@
</span><span class="cx"> 
</span><span class="cx">             flexItemGeometry.setLogicalTopLeft(LayoutPoint { flexItemMainAxisEnd, flexItemCrosAxisStart });
</span><span class="cx"> 
</span><del>-            flexItemGeometry.setBorder(geometry.computedBorder(flexItem));
-            flexItemGeometry.setPadding(geometry.computedPadding(flexItem, constraints.horizontal.logicalWidth));
</del><ins>+            flexItemGeometry.setBorder(formattingGeometry.computedBorder(flexItem));
+            flexItemGeometry.setPadding(formattingGeometry.computedPadding(flexItem, constraints.horizontal.logicalWidth));
</ins><span class="cx"> 
</span><del>-            auto computedHorizontalMargin = geometry.computedHorizontalMargin(flexItem, constraints.horizontal);
</del><ins>+            auto computedHorizontalMargin = formattingGeometry.computedHorizontalMargin(flexItem, constraints.horizontal);
</ins><span class="cx">             flexItemGeometry.setHorizontalMargin({ computedHorizontalMargin.start.valueOr(0_lu), computedHorizontalMargin.end.valueOr(0_lu) });
</span><span class="cx"> 
</span><del>-            auto computedVerticalMargin = geometry.computedVerticalMargin(flexItem, constraints.horizontal);
</del><ins>+            auto computedVerticalMargin = formattingGeometry.computedVerticalMargin(flexItem, constraints.horizontal);
</ins><span class="cx">             flexItemGeometry.setVerticalMargin({ computedVerticalMargin.before.valueOr(0_lu), computedVerticalMargin.after.valueOr(0_lu) });
</span><span class="cx"> 
</span><del>-            flexItemGeometry.setContentBoxHeight(geometry.contentHeightForFormattingContextRoot(flexItem));
</del><ins>+            flexItemGeometry.setContentBoxHeight(formattingGeometry.contentHeightForFormattingContextRoot(flexItem));
</ins><span class="cx">             flexItemGeometry.setContentBoxWidth(flexItemLogicalWidth);
</span><span class="cx">             flexItemMainAxisEnd= BoxGeometry::borderBoxRect(flexItemGeometry).right();
</span><span class="cx">             flexItemCrosAxisEnd = std::max(flexItemCrosAxisEnd, BoxGeometry::borderBoxRect(flexItemGeometry).bottom());
</span><span class="lines">@@ -110,15 +110,15 @@
</span><span class="cx"> void FlexFormattingContext::computeIntrinsicWidthConstraintsForFlexItems()
</span><span class="cx"> {
</span><span class="cx">     auto& formattingState = this->formattingState();
</span><del>-    auto geometry = this->geometry();
</del><ins>+    auto formattingGeometry = flexFormattingGeometry();
</ins><span class="cx">     for (auto& flexItem : childrenOfType<ContainerBox>(root())) {
</span><span class="cx">         if (formattingState.intrinsicWidthConstraintsForBox(flexItem))
</span><span class="cx">             continue;
</span><del>-        formattingState.setIntrinsicWidthConstraintsForBox(flexItem, geometry.intrinsicWidthConstraints(flexItem));
</del><ins>+        formattingState.setIntrinsicWidthConstraintsForBox(flexItem, formattingGeometry.intrinsicWidthConstraints(flexItem));
</ins><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-FlexFormattingGeometry FlexFormattingContext::geometry() const
</del><ins>+FlexFormattingGeometry FlexFormattingContext::flexFormattingGeometry() const
</ins><span class="cx"> {
</span><span class="cx">     return FlexFormattingGeometry(*this);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorelayoutformattingContextsflexFlexFormattingContexth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/layout/formattingContexts/flex/FlexFormattingContext.h (277956 => 277957)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/layout/formattingContexts/flex/FlexFormattingContext.h      2021-05-24 17:11:36 UTC (rev 277956)
+++ trunk/Source/WebCore/layout/formattingContexts/flex/FlexFormattingContext.h 2021-05-24 18:08:10 UTC (rev 277957)
</span><span class="lines">@@ -48,7 +48,7 @@
</span><span class="cx">     IntrinsicWidthConstraints computedIntrinsicWidthConstraints() override;
</span><span class="cx"> 
</span><span class="cx"> private:
</span><del>-    FlexFormattingGeometry geometry() const;
</del><ins>+    FlexFormattingGeometry flexFormattingGeometry() const;
</ins><span class="cx"> 
</span><span class="cx">     void sizeAndPlaceFlexItems(const ConstraintsForInFlowContent&);
</span><span class="cx">     void computeIntrinsicWidthConstraintsForFlexItems();
</span></span></pre></div>
<a id="trunkSourceWebCorelayoutformattingContextsinlineInlineFormattingContextcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.cpp (277956 => 277957)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.cpp        2021-05-24 17:11:36 UTC (rev 277956)
+++ trunk/Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.cpp   2021-05-24 18:08:10 UTC (rev 277957)
</span><span class="lines">@@ -104,9 +104,9 @@
</span><span class="cx">                 if (formattingRoot.hasChild()) {
</span><span class="cx">                     auto formattingContext = LayoutContext::createFormattingContext(formattingRoot, layoutState());
</span><span class="cx">                     if (formattingRoot.hasInFlowOrFloatingChild())
</span><del>-                        formattingContext->layoutInFlowContent(invalidationState, geometry().constraintsForInFlowContent(formattingRoot));
</del><ins>+                        formattingContext->layoutInFlowContent(invalidationState, inlineFormattingGeometry().constraintsForInFlowContent(formattingRoot));
</ins><span class="cx">                     computeHeightAndMargin(formattingRoot, constraints.horizontal);
</span><del>-                    formattingContext->layoutOutOfFlowContent(invalidationState, geometry().constraintsForOutOfFlowContent(formattingRoot));
</del><ins>+                    formattingContext->layoutOutOfFlowContent(invalidationState, inlineFormattingGeometry().constraintsForOutOfFlowContent(formattingRoot));
</ins><span class="cx">                 } else
</span><span class="cx">                     computeHeightAndMargin(formattingRoot, constraints.horizontal);
</span><span class="cx">             } else {
</span><span class="lines">@@ -208,7 +208,7 @@
</span><span class="cx">         if (!lineContentRange.isEmpty()) {
</span><span class="cx">             ASSERT(needsLayoutRange.start < lineContentRange.end);
</span><span class="cx">             isFirstLine = false;
</span><del>-            lineLogicalTop = geometry().logicalTopForNextLine(lineContent, lineLogicalRect.bottom(), floatingContext);
</del><ins>+            lineLogicalTop = inlineFormattingGeometry().logicalTopForNextLine(lineContent, lineLogicalRect.bottom(), floatingContext);
</ins><span class="cx">             if (lineContent.isLastLineWithInlineContent) {
</span><span class="cx">                 // The final content height of this inline formatting context should include the cleared floats as well.
</span><span class="cx">                 formattingState.setClearGapAfterLastLine(lineLogicalTop - lineLogicalRect.bottom());
</span><span class="lines">@@ -249,7 +249,7 @@
</span><span class="cx">     ASSERT(!formattingState().intrinsicWidthConstraints());
</span><span class="cx"> 
</span><span class="cx">     if (!root().hasInFlowOrFloatingChild()) {
</span><del>-        auto constraints = geometry().constrainByMinMaxWidth(root(), { });
</del><ins>+        auto constraints = inlineFormattingGeometry().constrainByMinMaxWidth(root(), { });
</ins><span class="cx">         formattingState().setIntrinsicWidthConstraints(constraints);
</span><span class="cx">         return constraints;
</span><span class="cx">     }
</span><span class="lines">@@ -296,7 +296,7 @@
</span><span class="cx"> 
</span><span class="cx">     auto minimumContentWidth = ceiledLayoutUnit(maximumLineWidth(0));
</span><span class="cx">     auto maximumContentWidth = ceiledLayoutUnit(maximumLineWidth(maxInlineLayoutUnit()));
</span><del>-    auto constraints = geometry().constrainByMinMaxWidth(root(), { minimumContentWidth, maximumContentWidth });
</del><ins>+    auto constraints = inlineFormattingGeometry().constrainByMinMaxWidth(root(), { minimumContentWidth, maximumContentWidth });
</ins><span class="cx">     formattingState().setIntrinsicWidthConstraints(constraints);
</span><span class="cx">     return constraints;
</span><span class="cx"> }
</span><span class="lines">@@ -323,7 +323,7 @@
</span><span class="cx"> {
</span><span class="cx">     ASSERT(formattingRoot.establishesFormattingContext());
</span><span class="cx">     auto constraints = IntrinsicWidthConstraints { };
</span><del>-    if (auto fixedWidth = geometry().fixedValue(formattingRoot.style().logicalWidth()))
</del><ins>+    if (auto fixedWidth = inlineFormattingGeometry().fixedValue(formattingRoot.style().logicalWidth()))
</ins><span class="cx">         constraints = { *fixedWidth, *fixedWidth };
</span><span class="cx">     else {
</span><span class="cx">         auto hasInflowOrFloatingContent = is<ContainerBox>(formattingRoot) && downcast<ContainerBox>(formattingRoot).hasInFlowOrFloatingChild();
</span><span class="lines">@@ -332,7 +332,7 @@
</span><span class="cx">         if (hasInflowOrFloatingContent && !shouldIgnoreChildContent)
</span><span class="cx">             constraints = LayoutContext::createFormattingContext(downcast<ContainerBox>(formattingRoot), layoutState())->computedIntrinsicWidthConstraints();
</span><span class="cx">     }
</span><del>-    constraints = geometry().constrainByMinMaxWidth(formattingRoot, constraints);
</del><ins>+    constraints = inlineFormattingGeometry().constrainByMinMaxWidth(formattingRoot, constraints);
</ins><span class="cx">     constraints.expand(geometryForBox(formattingRoot).horizontalMarginBorderAndPadding());
</span><span class="cx">     formattingState().setIntrinsicWidthConstraintsForBox(formattingRoot, constraints);
</span><span class="cx"> }
</span><span class="lines">@@ -339,7 +339,7 @@
</span><span class="cx"> 
</span><span class="cx"> void InlineFormattingContext::computeHorizontalMargin(const Box& layoutBox, const HorizontalConstraints& horizontalConstraints)
</span><span class="cx"> {
</span><del>-    auto computedHorizontalMargin = geometry().computedHorizontalMargin(layoutBox, horizontalConstraints);
</del><ins>+    auto computedHorizontalMargin = inlineFormattingGeometry().computedHorizontalMargin(layoutBox, horizontalConstraints);
</ins><span class="cx">     formattingState().boxGeometry(layoutBox).setHorizontalMargin({ computedHorizontalMargin.start.valueOr(0), computedHorizontalMargin.end.valueOr(0) });
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -347,11 +347,11 @@
</span><span class="cx"> {
</span><span class="cx">     auto compute = [&](Optional<LayoutUnit> usedWidth) {
</span><span class="cx">         if (layoutBox.isFloatingPositioned())
</span><del>-            return geometry().floatingContentWidthAndMargin(layoutBox, horizontalConstraints, { usedWidth, { } });
</del><ins>+            return inlineFormattingGeometry().floatingContentWidthAndMargin(layoutBox, horizontalConstraints, { usedWidth, { } });
</ins><span class="cx">         if (layoutBox.isInlineBlockBox())
</span><del>-            return geometry().inlineBlockContentWidthAndMargin(layoutBox, horizontalConstraints, { usedWidth, { } });
</del><ins>+            return inlineFormattingGeometry().inlineBlockContentWidthAndMargin(layoutBox, horizontalConstraints, { usedWidth, { } });
</ins><span class="cx">         if (layoutBox.isReplacedBox())
</span><del>-            return geometry().inlineReplacedContentWidthAndMargin(downcast<ReplacedBox>(layoutBox), horizontalConstraints, { }, { usedWidth, { } });
</del><ins>+            return inlineFormattingGeometry().inlineReplacedContentWidthAndMargin(downcast<ReplacedBox>(layoutBox), horizontalConstraints, { }, { usedWidth, { } });
</ins><span class="cx">         ASSERT_NOT_REACHED();
</span><span class="cx">         return ContentWidthAndMargin { };
</span><span class="cx">     };
</span><span class="lines">@@ -359,13 +359,13 @@
</span><span class="cx">     auto contentWidthAndMargin = compute({ });
</span><span class="cx"> 
</span><span class="cx">     auto availableWidth = horizontalConstraints.logicalWidth;
</span><del>-    if (auto maxWidth = geometry().computedMaxWidth(layoutBox, availableWidth)) {
</del><ins>+    if (auto maxWidth = inlineFormattingGeometry().computedMaxWidth(layoutBox, availableWidth)) {
</ins><span class="cx">         auto maxWidthAndMargin = compute(maxWidth);
</span><span class="cx">         if (contentWidthAndMargin.contentWidth > maxWidthAndMargin.contentWidth)
</span><span class="cx">             contentWidthAndMargin = maxWidthAndMargin;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    auto minWidth = geometry().computedMinWidth(layoutBox, availableWidth).valueOr(0);
</del><ins>+    auto minWidth = inlineFormattingGeometry().computedMinWidth(layoutBox, availableWidth).valueOr(0);
</ins><span class="cx">     auto minWidthAndMargin = compute(minWidth);
</span><span class="cx">     if (contentWidthAndMargin.contentWidth < minWidthAndMargin.contentWidth)
</span><span class="cx">         contentWidthAndMargin = minWidthAndMargin;
</span><span class="lines">@@ -379,23 +379,23 @@
</span><span class="cx"> {
</span><span class="cx">     auto compute = [&](Optional<LayoutUnit> usedHeight) {
</span><span class="cx">         if (layoutBox.isFloatingPositioned())
</span><del>-            return geometry().floatingContentHeightAndMargin(layoutBox, horizontalConstraints, { usedHeight });
</del><ins>+            return inlineFormattingGeometry().floatingContentHeightAndMargin(layoutBox, horizontalConstraints, { usedHeight });
</ins><span class="cx">         if (layoutBox.isInlineBlockBox())
</span><del>-            return geometry().inlineBlockContentHeightAndMargin(layoutBox, horizontalConstraints, { usedHeight });
</del><ins>+            return inlineFormattingGeometry().inlineBlockContentHeightAndMargin(layoutBox, horizontalConstraints, { usedHeight });
</ins><span class="cx">         if (layoutBox.isReplacedBox())
</span><del>-            return geometry().inlineReplacedContentHeightAndMargin(downcast<ReplacedBox>(layoutBox), horizontalConstraints, { }, { usedHeight });
</del><ins>+            return inlineFormattingGeometry().inlineReplacedContentHeightAndMargin(downcast<ReplacedBox>(layoutBox), horizontalConstraints, { }, { usedHeight });
</ins><span class="cx">         ASSERT_NOT_REACHED();
</span><span class="cx">         return ContentHeightAndMargin { };
</span><span class="cx">     };
</span><span class="cx"> 
</span><span class="cx">     auto contentHeightAndMargin = compute({ });
</span><del>-    if (auto maxHeight = geometry().computedMaxHeight(layoutBox)) {
</del><ins>+    if (auto maxHeight = inlineFormattingGeometry().computedMaxHeight(layoutBox)) {
</ins><span class="cx">         auto maxHeightAndMargin = compute(maxHeight);
</span><span class="cx">         if (contentHeightAndMargin.contentHeight > maxHeightAndMargin.contentHeight)
</span><span class="cx">             contentHeightAndMargin = maxHeightAndMargin;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if (auto minHeight = geometry().computedMinHeight(layoutBox)) {
</del><ins>+    if (auto minHeight = inlineFormattingGeometry().computedMinHeight(layoutBox)) {
</ins><span class="cx">         auto minHeightAndMargin = compute(minHeight);
</span><span class="cx">         if (contentHeightAndMargin.contentHeight < minHeightAndMargin.contentHeight)
</span><span class="cx">             contentHeightAndMargin = minHeightAndMargin;
</span><span class="lines">@@ -456,9 +456,9 @@
</span><span class="cx"> InlineRect InlineFormattingContext::computeGeometryForLineContent(const LineBuilder::LineContent& lineContent, const HorizontalConstraints& horizontalConstraints)
</span><span class="cx"> {
</span><span class="cx">     auto& formattingState = this->formattingState();
</span><del>-    auto geometry = this->geometry();
</del><ins>+    auto formattingGeometry = inlineFormattingGeometry();
</ins><span class="cx"> 
</span><del>-    formattingState.addLineBox(geometry.lineBoxForLineContent(lineContent));
</del><ins>+    formattingState.addLineBox(formattingGeometry.lineBoxForLineContent(lineContent));
</ins><span class="cx">     const auto& lineBox = formattingState.lineBoxes().last();
</span><span class="cx">     auto lineIndex = formattingState.lines().size();
</span><span class="cx">     auto& lineBoxLogicalRect = lineBox.logicalRect();
</span><span class="lines">@@ -527,7 +527,7 @@
</span><span class="cx">                 // Note that inline boxes are relative to the line and their top position can be negative.
</span><span class="cx">                 borderBoxLogicalTopLeft.moveBy(lineBoxLogicalRect.topLeft());
</span><span class="cx">                 if (layoutBox.isInFlowPositioned())
</span><del>-                    borderBoxLogicalTopLeft += geometry.inFlowPositionedPositionOffset(layoutBox, horizontalConstraints);
</del><ins>+                    borderBoxLogicalTopLeft += formattingGeometry.inFlowPositionedPositionOffset(layoutBox, horizontalConstraints);
</ins><span class="cx">                 // Atomic inline boxes are all set. Their margin/border/content box geometries are already computed. We just have to position them here.
</span><span class="cx">                 boxGeometry.setLogicalTopLeft(toLayoutPoint(borderBoxLogicalTopLeft));
</span><span class="cx"> 
</span><span class="lines">@@ -612,7 +612,7 @@
</span><span class="cx">     // FIXME: This is also where we would delete inline items if their content changed.
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-InlineFormattingGeometry InlineFormattingContext::geometry() const
</del><ins>+InlineFormattingGeometry InlineFormattingContext::inlineFormattingGeometry() const
</ins><span class="cx"> {
</span><span class="cx">     return InlineFormattingGeometry(*this);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorelayoutformattingContextsinlineInlineFormattingContexth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.h (277956 => 277957)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.h  2021-05-24 17:11:36 UTC (rev 277956)
+++ trunk/Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.h     2021-05-24 18:08:10 UTC (rev 277957)
</span><span class="lines">@@ -56,7 +56,7 @@
</span><span class="cx"> private:
</span><span class="cx">     IntrinsicWidthConstraints computedIntrinsicWidthConstraints() override;
</span><span class="cx"> 
</span><del>-    InlineFormattingGeometry geometry() const;
</del><ins>+    InlineFormattingGeometry inlineFormattingGeometry() const;
</ins><span class="cx"> 
</span><span class="cx">     void lineLayout(InlineItems&, LineBuilder::InlineItemRange, const ConstraintsForInFlowContent&);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorelayoutformattingContextstableTableFormattingContextcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/layout/formattingContexts/table/TableFormattingContext.cpp (277956 => 277957)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/layout/formattingContexts/table/TableFormattingContext.cpp  2021-05-24 17:11:36 UTC (rev 277956)
+++ trunk/Source/WebCore/layout/formattingContexts/table/TableFormattingContext.cpp     2021-05-24 18:08:10 UTC (rev 277957)
</span><span class="lines">@@ -173,13 +173,13 @@
</span><span class="cx">         auto& rowBox = row.box();
</span><span class="cx">         auto& rowBoxGeometry = formattingState().boxGeometry(rowBox);
</span><span class="cx"> 
</span><del>-        rowBoxGeometry.setPadding(geometry().computedPadding(rowBox, availableHorizontalSpace));
</del><ins>+        rowBoxGeometry.setPadding(tableFormattingGeometry().computedPadding(rowBox, availableHorizontalSpace));
</ins><span class="cx">         // Internal table elements do not have margins.
</span><span class="cx">         rowBoxGeometry.setHorizontalMargin({ });
</span><span class="cx">         rowBoxGeometry.setVerticalMargin({ });
</span><span class="cx"> 
</span><span class="cx">         auto computedRowBorder = [&] {
</span><del>-            auto border = geometry().computedBorder(rowBox);
</del><ins>+            auto border = tableFormattingGeometry().computedBorder(rowBox);
</ins><span class="cx">             if (!grid.collapsedBorder())
</span><span class="cx">                 return border;
</span><span class="cx">             // Border collapsing delegates borders to table/cells.
</span><span class="lines">@@ -280,13 +280,13 @@
</span><span class="cx"> {
</span><span class="cx">     ASSERT(cell.box().establishesBlockFormattingContext());
</span><span class="cx"> 
</span><del>-    auto geometry = this->geometry();
</del><ins>+    auto formattingGeometry = tableFormattingGeometry();
</ins><span class="cx">     auto& grid = formattingState().tableGrid();
</span><span class="cx">     auto& cellBox = cell.box();
</span><span class="cx">     auto& cellBoxGeometry = formattingState().boxGeometry(cellBox);
</span><span class="cx"> 
</span><del>-    cellBoxGeometry.setBorder(geometry.computedCellBorder(cell));
-    cellBoxGeometry.setPadding(geometry.computedPadding(cellBox, availableHorizontalSpace));
</del><ins>+    cellBoxGeometry.setBorder(formattingGeometry.computedCellBorder(cell));
+    cellBoxGeometry.setPadding(formattingGeometry.computedPadding(cellBox, availableHorizontalSpace));
</ins><span class="cx">     // Internal table elements do not have margins.
</span><span class="cx">     cellBoxGeometry.setHorizontalMargin({ });
</span><span class="cx">     cellBoxGeometry.setVerticalMargin({ });
</span><span class="lines">@@ -303,7 +303,7 @@
</span><span class="cx">     cellBoxGeometry.setContentBoxWidth(availableSpaceForContent);
</span><span class="cx"> 
</span><span class="cx">     if (cellBox.hasInFlowOrFloatingChild()) {
</span><del>-        auto constraintsForCellContent = geometry.constraintsForInFlowContent(cellBox);
</del><ins>+        auto constraintsForCellContent = formattingGeometry.constraintsForInFlowContent(cellBox);
</ins><span class="cx">         constraintsForCellContent.vertical.logicalHeight = availableVerticalSpaceForContent;
</span><span class="cx">         auto invalidationState = InvalidationState { };
</span><span class="cx">         // FIXME: This should probably be part of the invalidation state to indicate when we re-layout the cell
</span><span class="lines">@@ -312,8 +312,8 @@
</span><span class="cx">         floatingStateForCellContent.clear();
</span><span class="cx">         LayoutContext::createFormattingContext(cellBox, layoutState())->layoutInFlowContent(invalidationState, constraintsForCellContent);
</span><span class="cx">     }
</span><del>-    auto contentBoxHeight = geometry.cellBoxContentHeight(cellBox);
-    if (auto computedHeight = geometry.computedHeight(cellBox)) {
</del><ins>+    auto contentBoxHeight = formattingGeometry.cellBoxContentHeight(cellBox);
+    if (auto computedHeight = formattingGeometry.computedHeight(cellBox)) {
</ins><span class="cx">         auto heightUsesBorderBox = layoutState().inQuirksMode() || cellBox.style().boxSizing() == BoxSizing::BorderBox;
</span><span class="cx">         if (heightUsesBorderBox)
</span><span class="cx">             *computedHeight -= cellBoxGeometry.verticalMarginBorderAndPadding();
</span><span class="lines">@@ -407,7 +407,7 @@
</span><span class="cx"> 
</span><span class="cx">         auto intrinsicWidth = formattingState.intrinsicWidthConstraintsForBox(cellBox);
</span><span class="cx">         if (!intrinsicWidth) {
</span><del>-            intrinsicWidth = geometry().intrinsicWidthConstraintsForCell(*cell);
</del><ins>+            intrinsicWidth = tableFormattingGeometry().intrinsicWidthConstraintsForCell(*cell);
</ins><span class="cx">             formattingState.setIntrinsicWidthConstraintsForBox(cellBox, *intrinsicWidth);
</span><span class="cx">         }
</span><span class="cx">         // Spanner cells put their intrinsic widths on the initial slots.
</span><span class="lines">@@ -426,7 +426,7 @@
</span><span class="cx">             }
</span><span class="cx">             if (auto width = columnBox->columnWidth())
</span><span class="cx">                 return width;
</span><del>-            return geometry().computedColumnWidth(*columnBox);
</del><ins>+            return tableFormattingGeometry().computedColumnWidth(*columnBox);
</ins><span class="cx">         };
</span><span class="cx">         fixedWidthColumns.append(fixedWidth());
</span><span class="cx">     }
</span><span class="lines">@@ -518,7 +518,7 @@
</span><span class="cx">             // The minimum height of a row (without spanning-related height distribution) is defined as the height of an hypothetical
</span><span class="cx">             // linebox containing the cells originating in the row.
</span><span class="cx">             auto& cell = slot.cell();
</span><del>-            cell.setBaseline(geometry().usedBaselineForCell(cell.box()));
</del><ins>+            cell.setBaseline(tableFormattingGeometry().usedBaselineForCell(cell.box()));
</ins><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -533,7 +533,7 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-TableFormattingGeometry TableFormattingContext::geometry() const
</del><ins>+TableFormattingGeometry TableFormattingContext::tableFormattingGeometry() const
</ins><span class="cx"> {
</span><span class="cx">     return TableFormattingGeometry(*this, formattingState().tableGrid());
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorelayoutformattingContextstableTableFormattingContexth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/layout/formattingContexts/table/TableFormattingContext.h (277956 => 277957)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/layout/formattingContexts/table/TableFormattingContext.h    2021-05-24 17:11:36 UTC (rev 277956)
+++ trunk/Source/WebCore/layout/formattingContexts/table/TableFormattingContext.h       2021-05-24 18:08:10 UTC (rev 277957)
</span><span class="lines">@@ -77,7 +77,7 @@
</span><span class="cx">     IntrinsicWidthConstraints computedPreferredWidthForColumns();
</span><span class="cx">     void computeAndDistributeExtraSpace(LayoutUnit availableHorizontalSpace, Optional<LayoutUnit> availableVerticalSpace);
</span><span class="cx"> 
</span><del>-    TableFormattingGeometry geometry() const;
</del><ins>+    TableFormattingGeometry tableFormattingGeometry() const;
</ins><span class="cx">     const TableFormattingState& formattingState() const { return downcast<TableFormattingState>(FormattingContext::formattingState()); }
</span><span class="cx">     TableFormattingState& formattingState() { return downcast<TableFormattingState>(FormattingContext::formattingState()); }
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCorelayoutformattingContextstableTableLayoutcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/layout/formattingContexts/table/TableLayout.cpp (277956 => 277957)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/layout/formattingContexts/table/TableLayout.cpp     2021-05-24 17:11:36 UTC (rev 277956)
+++ trunk/Source/WebCore/layout/formattingContexts/table/TableLayout.cpp        2021-05-24 18:08:10 UTC (rev 277957)
</span><span class="lines">@@ -272,7 +272,7 @@
</span><span class="cx">         auto maximumColumnAscent = InlineLayoutUnit { };
</span><span class="cx">         auto maximumColumnDescent = InlineLayoutUnit { };
</span><span class="cx">         // Initial minimum height is the computed height if available <tr style="height: 100px"><td></td></tr>
</span><del>-        rowHeight[rowIndex] = formattingContext().geometry().computedHeight(rows.list()[rowIndex].box(), availableVerticalSpace).valueOr(0_lu);
</del><ins>+        rowHeight[rowIndex] = formattingContext().tableFormattingGeometry().computedHeight(rows.list()[rowIndex].box(), availableVerticalSpace).valueOr(0_lu);
</ins><span class="cx">         for (size_t columnIndex = 0; columnIndex < columns.size(); ++columnIndex) {
</span><span class="cx">             auto& slot = *m_grid.slot({ columnIndex, rowIndex });
</span><span class="cx">             if (slot.isRowSpanned())
</span><span class="lines">@@ -302,7 +302,7 @@
</span><span class="cx">         if (slot.hasRowSpan())
</span><span class="cx">             return GridSpace { formattingContext().geometryForBox(slot.cell().box()).borderBoxHeight(), formattingContext().geometryForBox(slot.cell().box()).borderBoxHeight() };
</span><span class="cx">         auto& rows = m_grid.rows();
</span><del>-        auto computedRowHeight = formattingContext().geometry().computedHeight(rows.list()[rowIndex].box(), { });
</del><ins>+        auto computedRowHeight = formattingContext().tableFormattingGeometry().computedHeight(rows.list()[rowIndex].box(), { });
</ins><span class="cx">         auto height = std::max<float>(rowHeight[rowIndex], computedRowHeight.valueOr(0_lu));
</span><span class="cx">         return GridSpace { height, height };
</span><span class="cx">     });
</span></span></pre>
</div>
</div>

</body>
</html>