[LFC][Integration] Rename top/bottomWithLeading to lineBoxTop/Bottom
https://bugs.webkit.org/show_bug.cgi?id=218340
Reviewed by Zalan Bujtas.
These match the spec concept of line box.
For clarity rename the legacy fields and functions in RootInlineBox too.
* layout/integration/LayoutIntegrationLineIterator.h:
(WebCore::LayoutIntegration::PathLine::lineBoxTop const):
(WebCore::LayoutIntegration::PathLine::lineBoxBottom const):
(WebCore::LayoutIntegration::PathLine::topWithLeading const): Deleted.
(WebCore::LayoutIntegration::PathLine::bottomWithLeading const): Deleted.
* layout/integration/LayoutIntegrationLineIteratorLegacyPath.h:
(WebCore::LayoutIntegration::LineIteratorLegacyPath::lineBoxTop const):
(WebCore::LayoutIntegration::LineIteratorLegacyPath::lineBoxBottom const):
(WebCore::LayoutIntegration::LineIteratorLegacyPath::topWithLeading const): Deleted.
(WebCore::LayoutIntegration::LineIteratorLegacyPath::bottomWithLeading const): Deleted.
* layout/integration/LayoutIntegrationLineIteratorModernPath.h:
(WebCore::LayoutIntegration::LineIteratorModernPath::lineBoxTop const):
(WebCore::LayoutIntegration::LineIteratorModernPath::lineBoxBottom const):
(WebCore::LayoutIntegration::LineIteratorModernPath::topWithLeading const): Deleted.
(WebCore::LayoutIntegration::LineIteratorModernPath::bottomWithLeading const): Deleted.
* rendering/ComplexLineLayout.cpp:
(WebCore::ComplexLineLayout::layoutRunsAndFloatsInRange):
(WebCore::ComplexLineLayout::linkToEndLineIfNeeded):
(WebCore::ComplexLineLayout::checkFloatInCleanLine):
(WebCore::ComplexLineLayout::determineStartPosition):
(WebCore::ComplexLineLayout::determineEndPosition):
(WebCore::ComplexLineLayout::checkPaginationAndFloatsAtEndLine):
(WebCore::ComplexLineLayout::lineWidthForPaginatedLineChanged const):
(WebCore::ComplexLineLayout::matchedEndLine):
(WebCore::ComplexLineLayout::updateFragmentForLine const):
* rendering/RenderBlockFlow.cpp:
(WebCore::calculateMinimumPageHeight):
(WebCore::RenderBlockFlow::adjustLinePositionForPagination):
(WebCore::RenderBlockFlow::markLinesDirtyInBlockRange):
(WebCore::RenderBlockFlow::positionForPointWithInlineChildren):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::positionLineBox):
* rendering/RenderLayoutState.cpp:
(WebCore::RenderLayoutState::computeLineGridPaginationOrigin):
* rendering/RenderLineBreak.cpp:
(WebCore::RenderLineBreak::collectSelectionRects):
* rendering/RenderText.cpp:
(WebCore::RenderText::collectSelectionRects):
* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::adjustPosition):
(WebCore::RootInlineBox::alignBoxesInBlockDirection):
(WebCore::RootInlineBox::lineSnapAdjustment const):
(WebCore::RootInlineBox::outputLineBox const):
* rendering/RootInlineBox.h:
(WebCore::RootInlineBox::lineBoxTop const):
(WebCore::RootInlineBox::lineBoxBottom const):
(WebCore::RootInlineBox::setLineTopBottomPositions):
(WebCore::RootInlineBox::lineTopWithLeading const): Deleted.
(WebCore::RootInlineBox::lineBottomWithLeading const): Deleted.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@269149 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/WebCore/rendering/RenderBlockFlow.cpp b/Source/WebCore/rendering/RenderBlockFlow.cpp
index aca5ab0..6304397 100644
--- a/Source/WebCore/rendering/RenderBlockFlow.cpp
+++ b/Source/WebCore/rendering/RenderBlockFlow.cpp
@@ -1693,7 +1693,7 @@
// FIXME: Paginating using line overflow isn't all fine. See FIXME in
// adjustLinePositionForPagination() for more details.
LayoutRect overflow = line->logicalVisualOverflowRect(line->lineTop(), line->lineBottom());
- lineTop = std::min(line->lineTopWithLeading(), overflow.y());
+ lineTop = std::min(line->lineBoxTop(), overflow.y());
}
return lineBottom - lineTop;
}
@@ -1742,8 +1742,8 @@
// line and all following lines.
overflowsFragment = false;
LayoutRect logicalVisualOverflow = lineBox->logicalVisualOverflowRect(lineBox->lineTop(), lineBox->lineBottom());
- LayoutUnit logicalOffset = std::min(lineBox->lineTopWithLeading(), logicalVisualOverflow.y());
- LayoutUnit logicalBottom = std::max(lineBox->lineBottomWithLeading(), logicalVisualOverflow.maxY());
+ LayoutUnit logicalOffset = std::min(lineBox->lineBoxTop(), logicalVisualOverflow.y());
+ LayoutUnit logicalBottom = std::max(lineBox->lineBoxBottom(), logicalVisualOverflow.maxY());
LayoutUnit lineHeight = logicalBottom - logicalOffset;
updateMinimumPageHeight(logicalOffset, calculateMinimumPageHeight(style(), *lineBox, logicalOffset, logicalBottom));
logicalOffset += delta;
@@ -1792,7 +1792,7 @@
return;
if (lineHeight > pageLogicalHeight) {
// Split the top margin in order to avoid splitting the visible part of the line.
- remainingLogicalHeight -= std::min(lineHeight - pageLogicalHeight, std::max<LayoutUnit>(0, logicalVisualOverflow.y() - lineBox->lineTopWithLeading()));
+ remainingLogicalHeight -= std::min(lineHeight - pageLogicalHeight, std::max<LayoutUnit>(0, logicalVisualOverflow.y() - lineBox->lineBoxTop()));
}
LayoutUnit remainingLogicalHeightAtNewOffset = pageRemainingLogicalHeightForOffset(logicalOffset + remainingLogicalHeight, ExcludePageBoundary);
overflowsFragment = (lineHeight > remainingLogicalHeightAtNewOffset);
@@ -3085,12 +3085,12 @@
RootInlineBox* lowestDirtyLine = lastRootBox();
RootInlineBox* afterLowest = lowestDirtyLine;
- while (lowestDirtyLine && lowestDirtyLine->lineBottomWithLeading() >= logicalBottom && logicalBottom < LayoutUnit::max()) {
+ while (lowestDirtyLine && lowestDirtyLine->lineBoxBottom() >= logicalBottom && logicalBottom < LayoutUnit::max()) {
afterLowest = lowestDirtyLine;
lowestDirtyLine = lowestDirtyLine->prevRootBox();
}
- while (afterLowest && afterLowest != highest && (afterLowest->lineBottomWithLeading() >= logicalTop || afterLowest->lineBottomWithLeading() < 0)) {
+ while (afterLowest && afterLowest != highest && (afterLowest->lineBoxBottom() >= logicalTop || afterLowest->lineBoxBottom() < 0)) {
afterLowest->markDirty();
afterLowest = afterLowest->prevRootBox();
}
@@ -3412,7 +3412,7 @@
firstLineWithChildren = line;
if (!linesAreFlipped && line->legacyRootInlineBox() && line->legacyRootInlineBox()->isFirstAfterPageBreak()
- && (pointInLogicalContents.y() < line->topWithLeading() || (blocksAreFlipped && pointInLogicalContents.y() == line->topWithLeading())))
+ && (pointInLogicalContents.y() < line->lineBoxTop() || (blocksAreFlipped && pointInLogicalContents.y() == line->lineBoxTop())))
break;
lastLineWithChildren = line;
@@ -3425,7 +3425,7 @@
nextLineWithChildren.traverseNext();
if (nextLineWithChildren && nextLineWithChildren->legacyRootInlineBox() && nextLineWithChildren->legacyRootInlineBox()->isFirstAfterPageBreak()
- && (pointInLogicalContents.y() > nextLineWithChildren->topWithLeading() || (!blocksAreFlipped && pointInLogicalContents.y() == nextLineWithChildren->topWithLeading())))
+ && (pointInLogicalContents.y() > nextLineWithChildren->lineBoxTop() || (!blocksAreFlipped && pointInLogicalContents.y() == nextLineWithChildren->lineBoxTop())))
continue;
}
closestRun = line.closestRunForLogicalLeftPosition(pointInLogicalContents.x());