Modified: trunk/Source/WebCore/layout/integration/LayoutIntegrationLineLayout.cpp (268993 => 268994)
--- trunk/Source/WebCore/layout/integration/LayoutIntegrationLineLayout.cpp 2020-10-26 20:08:01 UTC (rev 268993)
+++ trunk/Source/WebCore/layout/integration/LayoutIntegrationLineLayout.cpp 2020-10-26 20:23:48 UTC (rev 268994)
@@ -76,7 +76,7 @@
if (auto* parent = renderer.parent()) {
if (is<RenderBlockFlow>(*parent))
- return downcast<RenderBlockFlow>(*parent).layoutFormattingContextLineLayout();
+ return downcast<RenderBlockFlow>(*parent).modernLineLayout();
}
return nullptr;
@@ -560,7 +560,7 @@
return;
for (auto& renderer : descendantsOfType<RenderBlockFlow>(view)) {
- if (auto* lineLayout = renderer.layoutFormattingContextLineLayout())
+ if (auto* lineLayout = renderer.modernLineLayout())
lineLayout->releaseInlineItemCache();
}
}
Modified: trunk/Source/WebCore/rendering/RenderBlockFlow.cpp (268993 => 268994)
--- trunk/Source/WebCore/rendering/RenderBlockFlow.cpp 2020-10-26 20:08:01 UTC (rev 268993)
+++ trunk/Source/WebCore/rendering/RenderBlockFlow.cpp 2020-10-26 20:23:48 UTC (rev 268994)
@@ -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;
Modified: trunk/Source/WebCore/rendering/RenderBlockFlow.h (268993 => 268994)
--- trunk/Source/WebCore/rendering/RenderBlockFlow.h 2020-10-26 20:08:01 UTC (rev 268993)
+++ trunk/Source/WebCore/rendering/RenderBlockFlow.h 2020-10-26 20:23:48 UTC (rev 268994)
@@ -343,7 +343,7 @@
bool hasLines() const;
void invalidateLineLayoutPath() final;
- enum LineLayoutPath { UndeterminedPath = 0, LineBoxesPath, LayoutFormattingContextPath, ForceLineBoxesPath };
+ enum LineLayoutPath { UndeterminedPath = 0, LineBoxesPath, ModernPath, ForceLineBoxesPath };
LineLayoutPath lineLayoutPath() const { return static_cast<LineLayoutPath>(renderBlockFlowLineLayoutPath()); }
void setLineLayoutPath(LineLayoutPath path) { setRenderBlockFlowLineLayoutPath(path); }
@@ -358,8 +358,8 @@
const ComplexLineLayout* complexLineLayout() const;
ComplexLineLayout* complexLineLayout();
#if ENABLE(LAYOUT_FORMATTING_CONTEXT)
- const LayoutIntegration::LineLayout* layoutFormattingContextLineLayout() const;
- LayoutIntegration::LineLayout* layoutFormattingContextLineLayout();
+ const LayoutIntegration::LineLayout* modernLineLayout() const;
+ LayoutIntegration::LineLayout* modernLineLayout();
#endif
void ensureLineBoxes();
@@ -540,8 +540,8 @@
bool hasComplexLineLayout() const;
#if ENABLE(LAYOUT_FORMATTING_CONTEXT)
- bool hasLayoutFormattingContextLineLayout() const;
- void layoutLFCLines(bool relayoutChildren, LayoutUnit& repaintLogicalTop, LayoutUnit& repaintLogicalBottom);
+ bool hasModernLineLayout() const;
+ void layoutModernLines(bool relayoutChildren, LayoutUnit& repaintLogicalTop, LayoutUnit& repaintLogicalBottom);
#endif
void adjustIntrinsicLogicalWidthsForColumns(LayoutUnit& minLogicalWidth, LayoutUnit& maxLogicalWidth) const;
@@ -615,19 +615,19 @@
}
#if ENABLE(LAYOUT_FORMATTING_CONTEXT)
-inline bool RenderBlockFlow::hasLayoutFormattingContextLineLayout() const
+inline bool RenderBlockFlow::hasModernLineLayout() const
{
return WTF::holds_alternative<std::unique_ptr<LayoutIntegration::LineLayout>>(m_lineLayout);
}
-inline const LayoutIntegration::LineLayout* RenderBlockFlow::layoutFormattingContextLineLayout() const
+inline const LayoutIntegration::LineLayout* RenderBlockFlow::modernLineLayout() const
{
- return hasLayoutFormattingContextLineLayout() ? WTF::get<std::unique_ptr<LayoutIntegration::LineLayout>>(m_lineLayout).get() : nullptr;
+ return hasModernLineLayout() ? WTF::get<std::unique_ptr<LayoutIntegration::LineLayout>>(m_lineLayout).get() : nullptr;
}
-inline LayoutIntegration::LineLayout* RenderBlockFlow::layoutFormattingContextLineLayout()
+inline LayoutIntegration::LineLayout* RenderBlockFlow::modernLineLayout()
{
- return hasLayoutFormattingContextLineLayout() ? WTF::get<std::unique_ptr<LayoutIntegration::LineLayout>>(m_lineLayout).get() : nullptr;
+ return hasModernLineLayout() ? WTF::get<std::unique_ptr<LayoutIntegration::LineLayout>>(m_lineLayout).get() : nullptr;
}
#endif