[LFC][Integration] Use term "modern line layout" in RenderBlockFlow
https://bugs.webkit.org/show_bug.cgi?id=218200

Reviewed by Zalan Bujtas.

* layout/integration/LayoutIntegrationLineLayout.cpp:
(WebCore::LayoutIntegration::LineLayout::containing):
(WebCore::LayoutIntegration::LineLayout::releaseCaches):
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::layoutInlineChildren):
(WebCore::RenderBlockFlow::styleDidChange):
(WebCore::RenderBlockFlow::hitTestInlineChildren):
(WebCore::RenderBlockFlow::addOverflowFromInlineChildren):
(WebCore::RenderBlockFlow::markLinesDirtyInBlockRange):
(WebCore::RenderBlockFlow::firstLineBaseline const):
(WebCore::RenderBlockFlow::inlineBlockBaseline const):
(WebCore::RenderBlockFlow::lineCount const):
(WebCore::RenderBlockFlow::paintInlineChildren):
(WebCore::RenderBlockFlow::hasLines const):
(WebCore::RenderBlockFlow::invalidateLineLayoutPath):
(WebCore::RenderBlockFlow::layoutModernLines):
(WebCore::RenderBlockFlow::ensureLineBoxes):
(WebCore::RenderBlockFlow::layoutLFCLines): Deleted.
* rendering/RenderBlockFlow.h:
(WebCore::RenderBlockFlow::hasModernLineLayout const):
(WebCore::RenderBlockFlow::modernLineLayout const):
(WebCore::RenderBlockFlow::modernLineLayout):
(WebCore::RenderBlockFlow::hasLayoutFormattingContextLineLayout const): Deleted.
(WebCore::RenderBlockFlow::layoutFormattingContextLineLayout const): Deleted.
(WebCore::RenderBlockFlow::layoutFormattingContextLineLayout): Deleted.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@268994 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/WebCore/rendering/RenderBlockFlow.cpp b/Source/WebCore/rendering/RenderBlockFlow.cpp
index c82f84f..e5d8e78 100644
--- a/Source/WebCore/rendering/RenderBlockFlow.cpp
+++ b/Source/WebCore/rendering/RenderBlockFlow.cpp
@@ -668,7 +668,7 @@
     auto computeLineLayoutPath = [&] {
 #if ENABLE(LAYOUT_FORMATTING_CONTEXT)
         if (LayoutIntegration::LineLayout::canUseFor(*this))
-            return LayoutFormattingContextPath;
+            return ModernPath;
 #endif
         return LineBoxesPath;
     };
@@ -677,8 +677,8 @@
         setLineLayoutPath(computeLineLayoutPath());
 
 #if ENABLE(LAYOUT_FORMATTING_CONTEXT)
-    if (lineLayoutPath() == LayoutFormattingContextPath) {
-        layoutLFCLines(relayoutChildren, repaintLogicalTop, repaintLogicalBottom);
+    if (lineLayoutPath() == ModernPath) {
+        layoutModernLines(relayoutChildren, repaintLogicalTop, repaintLogicalBottom);
         return;
     }
 #endif
@@ -2096,7 +2096,7 @@
             if (selfNeedsLayout() || complexLineLayout())
                 return true;
 #if ENABLE(LAYOUT_FORMATTING_CONTEXT)
-            if (layoutFormattingContextLineLayout() && !LayoutIntegration::LineLayout::canUseForAfterStyleChange(*this, diff))
+            if (modernLineLayout() && !LayoutIntegration::LineLayout::canUseForAfterStyleChange(*this, diff))
                 return true;
 #endif
             return false;
@@ -2105,7 +2105,7 @@
             invalidateLineLayoutPath();
 
 #if ENABLE(LAYOUT_FORMATTING_CONTEXT)
-        if (auto* lineLayout = layoutFormattingContextLineLayout())
+        if (auto* lineLayout = modernLineLayout())
             lineLayout->updateStyle(*this);
 #endif
     }
@@ -2977,8 +2977,8 @@
     ASSERT(childrenInline());
 
 #if ENABLE(LAYOUT_FORMATTING_CONTEXT)
-    if (layoutFormattingContextLineLayout())
-        return layoutFormattingContextLineLayout()->hitTest(request, result, locationInContainer, accumulatedOffset, hitTestAction);
+    if (modernLineLayout())
+        return modernLineLayout()->hitTest(request, result, locationInContainer, accumulatedOffset, hitTestAction);
 #endif
 
     return complexLineLayout() && complexLineLayout()->lineBoxes().hitTest(this, request, result, locationInContainer, accumulatedOffset, hitTestAction);
@@ -2987,8 +2987,8 @@
 void RenderBlockFlow::addOverflowFromInlineChildren()
 {
 #if ENABLE(LAYOUT_FORMATTING_CONTEXT)
-    if (layoutFormattingContextLineLayout()) {
-        layoutFormattingContextLineLayout()->collectOverflow();
+    if (modernLineLayout()) {
+        modernLineLayout()->collectOverflow();
         return;
     }
 #endif
@@ -3076,7 +3076,7 @@
 
     // Floats currently affect the choice of layout path.
 #if ENABLE(LAYOUT_FORMATTING_CONTEXT)
-    if (layoutFormattingContextLineLayout()) {
+    if (modernLineLayout()) {
         invalidateLineLayoutPath();
         return;
     }
@@ -3107,8 +3107,8 @@
         return WTF::nullopt;
 
 #if ENABLE(LAYOUT_FORMATTING_CONTEXT)
-    if (layoutFormattingContextLineLayout())
-        return floorToInt(layoutFormattingContextLineLayout()->firstLineBaseline());
+    if (modernLineLayout())
+        return floorToInt(modernLineLayout()->firstLineBaseline());
 #endif
 
     ASSERT(firstRootBox());
@@ -3148,8 +3148,8 @@
                 + (style.isFlippedLinesWritingMode() ? logicalHeight() - lastRootBox()->logicalBottom() : lastRootBox()->logicalTop());
         }
 #if ENABLE(LAYOUT_FORMATTING_CONTEXT)
-        else if (layoutFormattingContextLineLayout())
-            lastBaseline = floorToInt(layoutFormattingContextLineLayout()->lastLineBaseline());
+        else if (modernLineLayout())
+            lastBaseline = floorToInt(modernLineLayout()->lastLineBaseline());
 #endif
     }
     // According to the CSS spec http://www.w3.org/TR/CSS21/visudet.html, we shouldn't be performing this min, but should
@@ -3255,8 +3255,8 @@
 
     if (childrenInline()) {
 #if ENABLE(LAYOUT_FORMATTING_CONTEXT)
-        if (layoutFormattingContextLineLayout())
-            return layoutFormattingContextLineLayout()->lineCount();
+        if (modernLineLayout())
+            return modernLineLayout()->lineCount();
 #endif
         if (complexLineLayout())
             return complexLineLayout()->lineCount();
@@ -3506,8 +3506,8 @@
     ASSERT(childrenInline());
 
 #if ENABLE(LAYOUT_FORMATTING_CONTEXT)
-    if (layoutFormattingContextLineLayout()) {
-        layoutFormattingContextLineLayout()->paint(paintInfo, paintOffset);
+    if (modernLineLayout()) {
+        modernLineLayout()->paint(paintInfo, paintOffset);
         return;
     }
 #endif
@@ -3566,8 +3566,8 @@
         return false;
 
 #if ENABLE(LAYOUT_FORMATTING_CONTEXT)
-    if (layoutFormattingContextLineLayout())
-        return layoutFormattingContextLineLayout()->lineCount();
+    if (modernLineLayout())
+        return modernLineLayout()->lineCount();
 #endif
 
     return complexLineLayout() && complexLineLayout()->lineBoxes().firstLineBox();
@@ -3582,7 +3582,7 @@
     case LineBoxesPath:
         setLineLayoutPath(UndeterminedPath);
         return;
-    case LayoutFormattingContextPath: // FIXME: Not all clients of invalidateLineLayoutPath() actually need to wipe the layout.
+    case ModernPath: // FIXME: Not all clients of invalidateLineLayoutPath() actually need to wipe the layout.
         m_lineLayout = WTF::Monostate();
         setLineLayoutPath(UndeterminedPath);
         if (needsLayout())
@@ -3595,16 +3595,16 @@
 }
 
 #if ENABLE(LAYOUT_FORMATTING_CONTEXT)
-void RenderBlockFlow::layoutLFCLines(bool relayoutChildren, LayoutUnit& repaintLogicalTop, LayoutUnit& repaintLogicalBottom)
+void RenderBlockFlow::layoutModernLines(bool relayoutChildren, LayoutUnit& repaintLogicalTop, LayoutUnit& repaintLogicalBottom)
 {
     bool needsUpdateReplacedDimensions = false;
 
-    if (!layoutFormattingContextLineLayout()) {
+    if (!modernLineLayout()) {
         m_lineLayout = makeUnique<LayoutIntegration::LineLayout>(*this);
         needsUpdateReplacedDimensions = true;
     }
 
-    auto& layoutFormattingContextLineLayout = *this->layoutFormattingContextLineLayout();
+    auto& layoutFormattingContextLineLayout = *this->modernLineLayout();
 
     for (auto& renderer : childrenOfType<RenderObject>(*this)) {
         if (relayoutChildren)
@@ -3657,7 +3657,7 @@
 
     bool needsToPaginateComplexLines = [&] {
 #if ENABLE(LAYOUT_FORMATTING_CONTEXT)
-        if (layoutFormattingContextLineLayout() && layoutFormattingContextLineLayout()->isPaginated())
+        if (modernLineLayout() && modernLineLayout()->isPaginated())
             return true;
 #endif
         return false;