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

Changeset 246486 in webkit


Ignore:
Timestamp:
Jun 16, 2019, 2:04:41 PM (7 years ago)
Author:
Alan Bujtas
Message:

Address Sam's post-landing review of r246234.

  • layout/inlineformatting/InlineFormattingContextLineLayout.cpp:

(WebCore::Layout::InlineFormattingContext::LineLayout::createDisplayRuns const):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r246484 r246486  
     12019-06-16  Zalan Bujtas  <zalan@apple.com>
     2
     3        Address Sam's post-landing review of r246234.
     4
     5        * layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
     6        (WebCore::Layout::InlineFormattingContext::LineLayout::createDisplayRuns const):
     7
    182019-06-16  Zalan Bujtas  <zalan@apple.com>
    29
  • trunk/Source/WebCore/layout/inlineformatting/InlineFormattingContextLineLayout.cpp

    r246484 r246486  
    315315    if (lineContent.isEmpty()) {
    316316        // Spec tells us to create a zero height, empty line box.
    317         auto lineBox = Display::Rect { lineContent.logicalTop(), lineContent.logicalLeft(), 0 , 0 };
    318         m_formattingState.addLineBox({ lineBox, lineContent.baseline(), lineContent.baselineOffset() });
     317        auto lineBoxRect = Display::Rect { lineContent.logicalTop(), lineContent.logicalLeft(), 0 , 0 };
     318        m_formattingState.addLineBox({ lineBoxRect, lineContent.baseline(), lineContent.baselineOffset() });
    319319        return;
    320320    }
     
    326326
    327327    // Ignore the initial strut.
    328     auto lineBox = Display::Rect { lineContent.logicalTop(), lineContent.logicalLeft(), 0, lineContent.logicalHeight()};
     328    auto lineBoxRect = Display::Rect { lineContent.logicalTop(), lineContent.logicalLeft(), 0, lineContent.logicalHeight()};
    329329    // Create final display runs.
    330330    auto& lineRuns = lineContent.runs();
     
    351351                topLeft += Geometry::inFlowPositionedPositionOffset(layoutState(), layoutBox);
    352352            displayBox.setTopLeft(topLeft);
    353             lineBox.expandHorizontally(logicalRect.width());
     353            lineBoxRect.expandHorizontally(logicalRect.width());
    354354            m_formattingState.addInlineRun(std::make_unique<Display::Run>(logicalRect));
    355355            continue;
     
    359359        if (inlineItem.isContainerStart()) {
    360360            displayBox.setTopLeft(logicalRect.topLeft());
    361             lineBox.expandHorizontally(logicalRect.width());
     361            lineBoxRect.expandHorizontally(logicalRect.width());
    362362            continue;
    363363        }
     
    375375            displayBox.setContentBoxWidth(contentBoxWidth);
    376376            displayBox.setContentBoxHeight(logicalRect.height());
    377             lineBox.expandHorizontally(logicalRect.width());
     377            lineBoxRect.expandHorizontally(logicalRect.width());
    378378            continue;
    379379        }
     
    392392                lastDisplayRun->textContext()->expand(lineRun->textContext->length);
    393393            }
    394             lineBox.expandHorizontally(logicalRect.width());
     394            lineBoxRect.expandHorizontally(logicalRect.width());
    395395        }
    396396        // FIXME take content breaking into account when part of the layout box is on the previous line.
     
    407407    }
    408408    // FIXME linebox needs to be ajusted after content alignment.
    409     m_formattingState.addLineBox({ lineBox, lineContent.baseline(), lineContent.baselineOffset() });
     409    m_formattingState.addLineBox({ lineBoxRect, lineContent.baseline(), lineContent.baselineOffset() });
    410410    alignRuns(m_formattingRoot.style().textAlign(), previousLineLastRunIndex.valueOr(-1) + 1, widthConstraint - lineContent.logicalWidth());
    411411}
Note: See TracChangeset for help on using the changeset viewer.