⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 269149 in webkit


Ignore:
Timestamp:
Oct 29, 2020, 8:51:07 AM (6 years ago)
Author:
Antti Koivisto
Message:

[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.

Location:
trunk/Source/WebCore
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r269146 r269149  
     12020-10-29  Antti Koivisto  <antti@apple.com>
     2
     3        [LFC][Integration] Rename top/bottomWithLeading to lineBoxTop/Bottom
     4        https://bugs.webkit.org/show_bug.cgi?id=218340
     5
     6        Reviewed by Zalan Bujtas.
     7
     8        These match the spec concept of line box.
     9        For clarity rename the legacy fields and functions in RootInlineBox too.
     10
     11        * layout/integration/LayoutIntegrationLineIterator.h:
     12        (WebCore::LayoutIntegration::PathLine::lineBoxTop const):
     13        (WebCore::LayoutIntegration::PathLine::lineBoxBottom const):
     14        (WebCore::LayoutIntegration::PathLine::topWithLeading const): Deleted.
     15        (WebCore::LayoutIntegration::PathLine::bottomWithLeading const): Deleted.
     16        * layout/integration/LayoutIntegrationLineIteratorLegacyPath.h:
     17        (WebCore::LayoutIntegration::LineIteratorLegacyPath::lineBoxTop const):
     18        (WebCore::LayoutIntegration::LineIteratorLegacyPath::lineBoxBottom const):
     19        (WebCore::LayoutIntegration::LineIteratorLegacyPath::topWithLeading const): Deleted.
     20        (WebCore::LayoutIntegration::LineIteratorLegacyPath::bottomWithLeading const): Deleted.
     21        * layout/integration/LayoutIntegrationLineIteratorModernPath.h:
     22        (WebCore::LayoutIntegration::LineIteratorModernPath::lineBoxTop const):
     23        (WebCore::LayoutIntegration::LineIteratorModernPath::lineBoxBottom const):
     24        (WebCore::LayoutIntegration::LineIteratorModernPath::topWithLeading const): Deleted.
     25        (WebCore::LayoutIntegration::LineIteratorModernPath::bottomWithLeading const): Deleted.
     26        * rendering/ComplexLineLayout.cpp:
     27        (WebCore::ComplexLineLayout::layoutRunsAndFloatsInRange):
     28        (WebCore::ComplexLineLayout::linkToEndLineIfNeeded):
     29        (WebCore::ComplexLineLayout::checkFloatInCleanLine):
     30        (WebCore::ComplexLineLayout::determineStartPosition):
     31        (WebCore::ComplexLineLayout::determineEndPosition):
     32        (WebCore::ComplexLineLayout::checkPaginationAndFloatsAtEndLine):
     33        (WebCore::ComplexLineLayout::lineWidthForPaginatedLineChanged const):
     34        (WebCore::ComplexLineLayout::matchedEndLine):
     35        (WebCore::ComplexLineLayout::updateFragmentForLine const):
     36        * rendering/RenderBlockFlow.cpp:
     37        (WebCore::calculateMinimumPageHeight):
     38        (WebCore::RenderBlockFlow::adjustLinePositionForPagination):
     39        (WebCore::RenderBlockFlow::markLinesDirtyInBlockRange):
     40        (WebCore::RenderBlockFlow::positionForPointWithInlineChildren):
     41        * rendering/RenderBox.cpp:
     42        (WebCore::RenderBox::positionLineBox):
     43        * rendering/RenderLayoutState.cpp:
     44        (WebCore::RenderLayoutState::computeLineGridPaginationOrigin):
     45        * rendering/RenderLineBreak.cpp:
     46        (WebCore::RenderLineBreak::collectSelectionRects):
     47        * rendering/RenderText.cpp:
     48        (WebCore::RenderText::collectSelectionRects):
     49        * rendering/RootInlineBox.cpp:
     50        (WebCore::RootInlineBox::adjustPosition):
     51        (WebCore::RootInlineBox::alignBoxesInBlockDirection):
     52        (WebCore::RootInlineBox::lineSnapAdjustment const):
     53        (WebCore::RootInlineBox::outputLineBox const):
     54        * rendering/RootInlineBox.h:
     55        (WebCore::RootInlineBox::lineBoxTop const):
     56        (WebCore::RootInlineBox::lineBoxBottom const):
     57        (WebCore::RootInlineBox::setLineTopBottomPositions):
     58        (WebCore::RootInlineBox::lineTopWithLeading const): Deleted.
     59        (WebCore::RootInlineBox::lineBottomWithLeading const): Deleted.
     60
    1612020-10-29  Antti Koivisto  <antti@apple.com>
    262
  • trunk/Source/WebCore/layout/integration/LayoutIntegrationLineIterator.h

    r269146 r269149  
    5656    LayoutUnit selectionTopForHitTesting() const;
    5757    LayoutUnit selectionBottom() const;
    58     LayoutUnit topWithLeading() const;
    59     LayoutUnit bottomWithLeading() const;
     58    LayoutUnit lineBoxTop() const;
     59    LayoutUnit lineBoxBottom() const;
    6060
    6161    float y() const;
     
    157157}
    158158
    159 inline LayoutUnit PathLine::topWithLeading() const
    160 {
    161     return WTF::switchOn(m_pathVariant, [](const auto& path) {
    162         return path.topWithLeading();
    163     });
    164 }
    165 
    166 inline LayoutUnit PathLine::bottomWithLeading() const
    167 {
    168     return WTF::switchOn(m_pathVariant, [](const auto& path) {
    169         return path.bottomWithLeading();
     159inline LayoutUnit PathLine::lineBoxTop() const
     160{
     161    return WTF::switchOn(m_pathVariant, [](const auto& path) {
     162        return path.lineBoxTop();
     163    });
     164}
     165
     166inline LayoutUnit PathLine::lineBoxBottom() const
     167{
     168    return WTF::switchOn(m_pathVariant, [](const auto& path) {
     169        return path.lineBoxBottom();
    170170    });
    171171}
  • trunk/Source/WebCore/layout/integration/LayoutIntegrationLineIteratorLegacyPath.h

    r269146 r269149  
    5050    LayoutUnit selectionTopForHitTesting() const { return m_rootInlineBox->selectionTop(RootInlineBox::ForHitTesting::Yes); }
    5151    LayoutUnit selectionBottom() const { return m_rootInlineBox->selectionBottom(); }
    52     LayoutUnit topWithLeading() const { return m_rootInlineBox->lineTopWithLeading(); }
    53     LayoutUnit bottomWithLeading() const { return m_rootInlineBox->lineBottomWithLeading(); }
     52    LayoutUnit lineBoxTop() const { return m_rootInlineBox->lineBoxTop(); }
     53    LayoutUnit lineBoxBottom() const { return m_rootInlineBox->lineBoxBottom(); }
    5454
    5555    float y() const { return m_rootInlineBox->y(); }
  • trunk/Source/WebCore/layout/integration/LayoutIntegrationLineIteratorModernPath.h

    r269146 r269149  
    5656    LayoutUnit selectionTopForHitTesting() const { return top(); }
    5757    LayoutUnit selectionBottom() const { return bottom(); }
    58     LayoutUnit topWithLeading() const { return top(); }
    59     LayoutUnit bottomWithLeading() const { return bottom(); }
     58    LayoutUnit lineBoxTop() const { return top(); }
     59    LayoutUnit lineBoxBottom() const { return bottom(); }
    6060
    6161    float y() const { return top(); }
  • trunk/Source/WebCore/rendering/ComplexLineLayout.cpp

    r268919 r269149  
    14991499                    }
    15001500
    1501                     m_flow.setLogicalHeight(lineBox->lineBottomWithLeading());
     1501                    m_flow.setLogicalHeight(lineBox->lineBoxBottom());
    15021502                }
    15031503                   
     
    15981598            // We now want to break at this line. Remember for next layout and trigger relayout.
    15991599            m_flow.setBreakAtLineToAvoidWidow(lineCountUntil(lineBox));
    1600             m_flow.markLinesDirtyInBlockRange(lastRootBox()->lineBottomWithLeading(), lineBox->lineBottomWithLeading(), lineBox);
     1600            m_flow.markLinesDirtyInBlockRange(lastRootBox()->lineBoxBottom(), lineBox->lineBoxBottom(), lineBox);
    16011601        }
    16021602    }
     
    16501650                reattachCleanLineFloats(*line, delta, line == firstCleanLine);
    16511651            }
    1652             m_flow.setLogicalHeight(lastRootBox()->lineBottomWithLeading());
     1652            m_flow.setLogicalHeight(lastRootBox()->lineBoxBottom());
    16531653        } else {
    16541654            // Delete all the remaining lines.
     
    18351835    floatHeight = std::min(floatHeight, LayoutUnit::max() - floatTop);
    18361836    cleanLine.markDirty();
    1837     m_flow.markLinesDirtyInBlockRange(cleanLine.lineBottomWithLeading(), floatTop + floatHeight, &cleanLine);
     1837    m_flow.markLinesDirtyInBlockRange(cleanLine.lineBoxBottom(), floatTop + floatHeight, &cleanLine);
    18381838    LayoutRect newFloatRect = originalFloatRect;
    18391839    newFloatRect.setSize(newSize);
     
    19621962
    19631963    if (lastLine) {
    1964         m_flow.setLogicalHeight(lastLine->lineBottomWithLeading());
     1964        m_flow.setLogicalHeight(lastLine->lineBoxBottom());
    19651965        InlineIterator iter = InlineIterator(&m_flow, lastLine->lineBreakObj(), lastLine->lineBreakPos());
    19661966        resolver.setPosition(iter, numberOfIsolateAncestors(iter));
     
    20222022    cleanLineStart = InlineIterator(&m_flow, previousLine->lineBreakObj(), previousLine->lineBreakPos());
    20232023    cleanLineBidiStatus = previousLine->lineBreakBidiStatus();
    2024     layoutState.setEndLineLogicalTop(previousLine->lineBottomWithLeading());
     2024    layoutState.setEndLineLogicalTop(previousLine->lineBoxBottom());
    20252025
    20262026    for (RootInlineBox* line = lastLine; line; line = line->nextRootBox()) {
     
    20642064        lastLine = nextLine;
    20652065
    2066     LayoutUnit logicalBottom = lastLine->lineBottomWithLeading() + absoluteValue(lineDelta);
     2066    LayoutUnit logicalBottom = lastLine->lineBoxBottom() + absoluteValue(lineDelta);
    20672067
    20682068    const FloatingObjectSet& floatingObjectSet = m_flow.floatingObjects()->set();
     
    20822082        return false;
    20832083
    2084     RenderFragmentContainer* currentFragment = m_flow.fragmentAtBlockOffset(rootBox->lineTopWithLeading() + lineDelta);
     2084    RenderFragmentContainer* currentFragment = m_flow.fragmentAtBlockOffset(rootBox->lineBoxTop() + lineDelta);
    20852085    // Just bail if the fragment didn't change.
    20862086    if (rootBox->containingFragment() == currentFragment)
     
    21122112            layoutState.setEndLine(result);
    21132113            if (result) {
    2114                 layoutState.setEndLineLogicalTop(line->lineBottomWithLeading());
     2114                layoutState.setEndLineLogicalTop(line->lineBoxBottom());
    21152115                matched = checkPaginationAndFloatsAtEndLine(layoutState);
    21162116            }
     
    23002300        lineBox->clearContainingFragment();
    23012301    else {
    2302         if (auto containingFragment = m_flow.fragmentAtBlockOffset(lineBox->lineTopWithLeading()))
     2302        if (auto containingFragment = m_flow.fragmentAtBlockOffset(lineBox->lineBoxTop()))
    23032303            lineBox->setContainingFragment(*containingFragment);
    23042304        else
  • trunk/Source/WebCore/rendering/RenderBlockFlow.cpp

    r269146 r269149  
    16941694        // adjustLinePositionForPagination() for more details.
    16951695        LayoutRect overflow = line->logicalVisualOverflowRect(line->lineTop(), line->lineBottom());
    1696         lineTop = std::min(line->lineTopWithLeading(), overflow.y());
     1696        lineTop = std::min(line->lineBoxTop(), overflow.y());
    16971697    }
    16981698    return lineBottom - lineTop;
     
    17431743    overflowsFragment = false;
    17441744    LayoutRect logicalVisualOverflow = lineBox->logicalVisualOverflowRect(lineBox->lineTop(), lineBox->lineBottom());
    1745     LayoutUnit logicalOffset = std::min(lineBox->lineTopWithLeading(), logicalVisualOverflow.y());
    1746     LayoutUnit logicalBottom = std::max(lineBox->lineBottomWithLeading(), logicalVisualOverflow.maxY());
     1745    LayoutUnit logicalOffset = std::min(lineBox->lineBoxTop(), logicalVisualOverflow.y());
     1746    LayoutUnit logicalBottom = std::max(lineBox->lineBoxBottom(), logicalVisualOverflow.maxY());
    17471747    LayoutUnit lineHeight = logicalBottom - logicalOffset;
    17481748    updateMinimumPageHeight(logicalOffset, calculateMinimumPageHeight(style(), *lineBox, logicalOffset, logicalBottom));
     
    17931793        if (lineHeight > pageLogicalHeight) {
    17941794            // Split the top margin in order to avoid splitting the visible part of the line.
    1795             remainingLogicalHeight -= std::min(lineHeight - pageLogicalHeight, std::max<LayoutUnit>(0, logicalVisualOverflow.y() - lineBox->lineTopWithLeading()));
     1795            remainingLogicalHeight -= std::min(lineHeight - pageLogicalHeight, std::max<LayoutUnit>(0, logicalVisualOverflow.y() - lineBox->lineBoxTop()));
    17961796        }
    17971797        LayoutUnit remainingLogicalHeightAtNewOffset = pageRemainingLogicalHeightForOffset(logicalOffset + remainingLogicalHeight, ExcludePageBoundary);
     
    30863086    RootInlineBox* lowestDirtyLine = lastRootBox();
    30873087    RootInlineBox* afterLowest = lowestDirtyLine;
    3088     while (lowestDirtyLine && lowestDirtyLine->lineBottomWithLeading() >= logicalBottom && logicalBottom < LayoutUnit::max()) {
     3088    while (lowestDirtyLine && lowestDirtyLine->lineBoxBottom() >= logicalBottom && logicalBottom < LayoutUnit::max()) {
    30893089        afterLowest = lowestDirtyLine;
    30903090        lowestDirtyLine = lowestDirtyLine->prevRootBox();
    30913091    }
    30923092
    3093     while (afterLowest && afterLowest != highest && (afterLowest->lineBottomWithLeading() >= logicalTop || afterLowest->lineBottomWithLeading() < 0)) {
     3093    while (afterLowest && afterLowest != highest && (afterLowest->lineBoxBottom() >= logicalTop || afterLowest->lineBoxBottom() < 0)) {
    30943094        afterLowest->markDirty();
    30953095        afterLowest = afterLowest->prevRootBox();
     
    34133413
    34143414        if (!linesAreFlipped && line->legacyRootInlineBox() && line->legacyRootInlineBox()->isFirstAfterPageBreak()
    3415             && (pointInLogicalContents.y() < line->topWithLeading() || (blocksAreFlipped && pointInLogicalContents.y() == line->topWithLeading())))
     3415            && (pointInLogicalContents.y() < line->lineBoxTop() || (blocksAreFlipped && pointInLogicalContents.y() == line->lineBoxTop())))
    34163416            break;
    34173417
     
    34263426
    34273427                if (nextLineWithChildren && nextLineWithChildren->legacyRootInlineBox() && nextLineWithChildren->legacyRootInlineBox()->isFirstAfterPageBreak()
    3428                     && (pointInLogicalContents.y() > nextLineWithChildren->topWithLeading() || (!blocksAreFlipped && pointInLogicalContents.y() == nextLineWithChildren->topWithLeading())))
     3428                    && (pointInLogicalContents.y() > nextLineWithChildren->lineBoxTop() || (!blocksAreFlipped && pointInLogicalContents.y() == nextLineWithChildren->lineBoxTop())))
    34293429                    continue;
    34303430            }
  • trunk/Source/WebCore/rendering/RenderBox.cpp

    r269144 r269149  
    22042204            // the inlines.
    22052205            RootInlineBox& rootBox = box.root();
    2206             rootBox.blockFlow().setStaticInlinePositionForChild(*this, rootBox.lineTopWithLeading(), LayoutUnit::fromFloatRound(box.logicalLeft()));
     2206            rootBox.blockFlow().setStaticInlinePositionForChild(*this, rootBox.lineBoxTop(), LayoutUnit::fromFloatRound(box.logicalLeft()));
    22072207            if (style().hasStaticInlinePosition(box.isHorizontal()))
    22082208                setChildNeedsLayout(MarkOnlyThis); // Just mark the positioned object as needing layout, so it will update its position properly.
  • trunk/Source/WebCore/rendering/RenderLayoutState.cpp

    r254087 r269149  
    194194    // FIXME: Need to handle crazy line-box-contain values that cause the root line box to not be considered. I assume
    195195    // the grid should honor line-box-contain.
    196     LayoutUnit gridLineHeight = lineGridBox->lineBottomWithLeading() - lineGridBox->lineTopWithLeading();
     196    LayoutUnit gridLineHeight = lineGridBox->lineBoxBottom() - lineGridBox->lineBoxTop();
    197197    if (!gridLineHeight)
    198198        return;
     
    200200    bool isHorizontalWritingMode = m_lineGrid->isHorizontalWritingMode();
    201201    LayoutUnit lineGridBlockOffset = isHorizontalWritingMode ? m_lineGridOffset.height() : m_lineGridOffset.width();
    202     LayoutUnit firstLineTopWithLeading = lineGridBlockOffset + lineGridBox->lineTopWithLeading();
     202    LayoutUnit firstLineTopWithLeading = lineGridBlockOffset + lineGridBox->lineBoxTop();
    203203    LayoutUnit pageLogicalTop = isHorizontalWritingMode ? m_pageOffset.height() : m_pageOffset.width();
    204204    if (pageLogicalTop <= firstLineTopWithLeading)
  • trunk/Source/WebCore/rendering/RenderLineBreak.cpp

    r268520 r269149  
    213213    if (rootBox.isFirstAfterPageBreak()) {
    214214        if (box->isHorizontal())
    215             rect.shiftYEdgeTo(rootBox.lineTopWithLeading());
     215            rect.shiftYEdgeTo(rootBox.lineBoxTop());
    216216        else
    217             rect.shiftXEdgeTo(rootBox.lineTopWithLeading());
     217            rect.shiftXEdgeTo(rootBox.lineBoxTop());
    218218    }
    219219
  • trunk/Source/WebCore/rendering/RenderText.cpp

    r268806 r269149  
    358358        if (box->root().isFirstAfterPageBreak()) {
    359359            if (box->isHorizontal())
    360                 rect.shiftYEdgeTo(box->root().lineTopWithLeading());
     360                rect.shiftYEdgeTo(box->root().lineBoxTop());
    361361            else
    362                 rect.shiftXEdgeTo(box->root().lineTopWithLeading());
     362                rect.shiftXEdgeTo(box->root().lineBoxTop());
    363363        }
    364364
  • trunk/Source/WebCore/rendering/RootInlineBox.cpp

    r269146 r269149  
    187187    m_lineTop += blockDirectionDelta;
    188188    m_lineBottom += blockDirectionDelta;
    189     m_lineTopWithLeading += blockDirectionDelta;
    190     m_lineBottomWithLeading += blockDirectionDelta;
     189    m_lineBoxTop += blockDirectionDelta;
     190    m_lineBoxBottom += blockDirectionDelta;
    191191    if (hasEllipsisBox())
    192192        ellipsisBox()->adjustPosition(dx, dy);
     
    277277    maxHeight = std::max<LayoutUnit>(0, maxHeight); // FIXME: Is this really necessary?
    278278
    279     LayoutUnit lineTopWithLeading = heightOfBlock;
    280     LayoutUnit lineBottomWithLeading = heightOfBlock + maxHeight;
    281     setLineTopBottomPositions(lineTop, lineBottom, lineTopWithLeading, lineBottomWithLeading);
     279    LayoutUnit lineBoxTop = heightOfBlock;
     280    LayoutUnit lineBoxBottom = heightOfBlock + maxHeight;
     281    setLineTopBottomPositions(lineTop, lineBottom, lineBoxTop, lineBoxBottom);
    282282    setPaginatedLineWidth(blockFlow().availableLogicalWidthForContent(heightOfBlock));
    283283
     
    356356    // FIXME: Need to handle crazy line-box-contain values that cause the root line box to not be considered. I assume
    357357    // the grid should honor line-box-contain.
    358     LayoutUnit gridLineHeight = lineGridBox->lineBottomWithLeading() - lineGridBox->lineTopWithLeading();
     358    LayoutUnit gridLineHeight = lineGridBox->lineBoxBottom() - lineGridBox->lineBoxTop();
    359359    if (!gridLineHeight)
    360360        return 0;
     
    363363    LayoutUnit lineGridFontHeight { lineGridBox->logicalHeight() };
    364364    LayoutUnit firstTextTop { lineGridBlockOffset + lineGridBox->logicalTop() };
    365     LayoutUnit firstLineTopWithLeading = lineGridBlockOffset + lineGridBox->lineTopWithLeading();
     365    LayoutUnit firstLineTopWithLeading = lineGridBlockOffset + lineGridBox->lineBoxTop();
    366366    LayoutUnit firstBaselinePosition = firstTextTop + lineGridFontAscent;
    367367
     
    376376    LayoutUnit pageLogicalTop;
    377377    if (layoutState->isPaginated() && layoutState->pageLogicalHeight()) {
    378         pageLogicalTop = blockFlow().pageLogicalTopForOffset(lineTopWithLeading() + delta);
     378        pageLogicalTop = blockFlow().pageLogicalTopForOffset(lineBoxTop() + delta);
    379379        if (pageLogicalTop > firstLineTopWithLeading)
    380380            firstTextTop = pageLogicalTop + lineGridBox->logicalTop() - lineGrid->borderAndPaddingBefore() + lineGridPaginationOrigin;
     
    413413   
    414414    // We may end up shifted to a new page. We need to do a re-snap when that happens.
    415     LayoutUnit newPageLogicalTop = blockFlow().pageLogicalTopForOffset(lineBottomWithLeading() + result);
     415    LayoutUnit newPageLogicalTop = blockFlow().pageLogicalTopForOffset(lineBoxBottom() + result);
    416416    if (newPageLogicalTop == pageLogicalTop)
    417417        return result;
    418418   
    419419    // Put ourselves at the top of the next page to force a snap onto the new grid established by that page.
    420     return lineSnapAdjustment(newPageLogicalTop - (blockOffset + lineTopWithLeading()));
     420    return lineSnapAdjustment(newPageLogicalTop - (blockOffset + lineBoxTop()));
    421421}
    422422
     
    11131113    while (++printedCharacters <= depth * 2)
    11141114        stream << " ";
    1115     stream << "Line: (top: " << lineTop() << " bottom: " << lineBottom() << ") with leading (top: " << lineTopWithLeading() << " bottom: " << lineBottomWithLeading() << ")";
     1115    stream << "Line: (top: " << lineTop() << " bottom: " << lineBottom() << ") with leading (top: " << lineBoxTop() << " bottom: " << lineBoxBottom() << ")";
    11161116    stream.nextLine();
    11171117    InlineBox::outputLineBox(stream, mark, depth);
  • trunk/Source/WebCore/rendering/RootInlineBox.h

    r269146 r269149  
    5555    LayoutUnit lineBottom() const { return m_lineBottom; }
    5656
    57     LayoutUnit lineTopWithLeading() const { return m_lineTopWithLeading; }
    58     LayoutUnit lineBottomWithLeading() const { return m_lineBottomWithLeading; }
     57    LayoutUnit lineBoxTop() const { return m_lineBoxTop; }
     58    LayoutUnit lineBoxBottom() const { return m_lineBoxBottom; }
    5959   
    6060    LayoutUnit paginationStrut() const { return m_paginationStrut; }
     
    8282
    8383    LayoutUnit alignBoxesInBlockDirection(LayoutUnit heightOfBlock, GlyphOverflowAndFallbackFontsMap&, VerticalPositionCache&);
    84     void setLineTopBottomPositions(LayoutUnit top, LayoutUnit bottom, LayoutUnit topWithLeading, LayoutUnit bottomWithLeading)
     84    void setLineTopBottomPositions(LayoutUnit top, LayoutUnit bottom, LayoutUnit lineBoxTop, LayoutUnit lineBoxBottom)
    8585    {
    8686        m_lineTop = top;
    8787        m_lineBottom = bottom;
    88         m_lineTopWithLeading = topWithLeading;
    89         m_lineBottomWithLeading = bottomWithLeading;
     88        m_lineBoxTop = lineBoxTop;
     89        m_lineBoxBottom = lineBoxBottom;
    9090    }
    9191
     
    217217    LayoutUnit m_lineBottom;
    218218
    219     LayoutUnit m_lineTopWithLeading;
    220     LayoutUnit m_lineBottomWithLeading;
     219    LayoutUnit m_lineBoxTop;
     220    LayoutUnit m_lineBoxBottom;
    221221
    222222    LayoutUnit m_paginationStrut;
Note: See TracChangeset for help on using the changeset viewer.