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

Changeset 286957 in webkit


Ignore:
Timestamp:
Dec 13, 2021, 10:32:50 AM (5 years ago)
Author:
Alan Bujtas
Message:

[LFC][IFC] Display boxes have physical geometry.
https://bugs.webkit.org/show_bug.cgi?id=234248

Reviewed by Antti Koivisto.

logicalRect -> rect.

  • display/css/DisplayBoxFactory.cpp:

(WebCore::Display::BoxFactory::displayBoxForTextRun const):

  • layout/Verification.cpp:

(WebCore::Layout::checkForMatchingNonTextRuns):
(WebCore::Layout::checkForMatchingTextRuns):
(WebCore::Layout::outputMismatchingComplexLineInformationIfNeeded):

  • layout/formattingContexts/inline/InlineDisplayContentBuilder.cpp:

(WebCore::Layout::InlineDisplayContentBuilder::adjustVisualGeometryForDisplayBox):
(WebCore::Layout::InlineDisplayContentBuilder::processOverflownRunsForEllipsis):

  • layout/formattingContexts/inline/InlineFormattingContext.cpp:

(WebCore::Layout::InlineFormattingContext::computeStaticPositionForOutOfFlowContent):

  • layout/formattingContexts/inline/display/InlineDisplayBox.h:

(WebCore::InlineDisplay::Box::rect const):
(WebCore::InlineDisplay::Box::top const):
(WebCore::InlineDisplay::Box::bottom const):
(WebCore::InlineDisplay::Box::left const):
(WebCore::InlineDisplay::Box::right const):
(WebCore::InlineDisplay::Box::width const):
(WebCore::InlineDisplay::Box::height const):
(WebCore::InlineDisplay::Box::moveVertically):
(WebCore::InlineDisplay::Box::moveHorizontally):
(WebCore::InlineDisplay::Box::setLeft):
(WebCore::InlineDisplay::Box::setRight):
(WebCore::InlineDisplay::Box::setRect):
(WebCore::InlineDisplay::Box::Box):
(WebCore::InlineDisplay::Box::truncate):
(WebCore::InlineDisplay::Box::logicalRect const): Deleted.
(WebCore::InlineDisplay::Box::logicalTop const): Deleted.
(WebCore::InlineDisplay::Box::logicalBottom const): Deleted.
(WebCore::InlineDisplay::Box::logicalLeft const): Deleted.
(WebCore::InlineDisplay::Box::logicalRight const): Deleted.
(WebCore::InlineDisplay::Box::logicalWidth const): Deleted.
(WebCore::InlineDisplay::Box::logicalHeight const): Deleted.
(WebCore::InlineDisplay::Box::setLogicalLeft): Deleted.
(WebCore::InlineDisplay::Box::setLogicalRight): Deleted.
(WebCore::InlineDisplay::Box::setLogicalRect): Deleted.

  • layout/integration/InlineIteratorBoxModernPath.h:

(WebCore::InlineIterator::BoxModernPath::rect const):

  • layout/integration/LayoutIntegrationBoxTree.cpp:

(WebCore::LayoutIntegration::showInlineContent):

  • layout/integration/LayoutIntegrationInlineContentBuilder.cpp:

(WebCore::LayoutIntegration::InlineContentBuilder::createDisplayLines const):

  • layout/integration/LayoutIntegrationLineLayout.cpp:

(WebCore::LayoutIntegration::LineLayout::firstInlineBoxRect const):
(WebCore::LayoutIntegration::LineLayout::collectInlineBoxRects const):
(WebCore::LayoutIntegration::LineLayout::hitTest):

  • layout/layouttree/LayoutTreeBuilder.cpp:

(WebCore::Layout::showInlineTreeAndRuns):

Location:
trunk/Source/WebCore
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r286955 r286957  
     12021-12-13  Alan Bujtas  <zalan@apple.com>
     2
     3        [LFC][IFC] Display boxes have physical geometry.
     4        https://bugs.webkit.org/show_bug.cgi?id=234248
     5
     6        Reviewed by Antti Koivisto.
     7
     8        logicalRect -> rect.
     9
     10        * display/css/DisplayBoxFactory.cpp:
     11        (WebCore::Display::BoxFactory::displayBoxForTextRun const):
     12        * layout/Verification.cpp:
     13        (WebCore::Layout::checkForMatchingNonTextRuns):
     14        (WebCore::Layout::checkForMatchingTextRuns):
     15        (WebCore::Layout::outputMismatchingComplexLineInformationIfNeeded):
     16        * layout/formattingContexts/inline/InlineDisplayContentBuilder.cpp:
     17        (WebCore::Layout::InlineDisplayContentBuilder::adjustVisualGeometryForDisplayBox):
     18        (WebCore::Layout::InlineDisplayContentBuilder::processOverflownRunsForEllipsis):
     19        * layout/formattingContexts/inline/InlineFormattingContext.cpp:
     20        (WebCore::Layout::InlineFormattingContext::computeStaticPositionForOutOfFlowContent):
     21        * layout/formattingContexts/inline/display/InlineDisplayBox.h:
     22        (WebCore::InlineDisplay::Box::rect const):
     23        (WebCore::InlineDisplay::Box::top const):
     24        (WebCore::InlineDisplay::Box::bottom const):
     25        (WebCore::InlineDisplay::Box::left const):
     26        (WebCore::InlineDisplay::Box::right const):
     27        (WebCore::InlineDisplay::Box::width const):
     28        (WebCore::InlineDisplay::Box::height const):
     29        (WebCore::InlineDisplay::Box::moveVertically):
     30        (WebCore::InlineDisplay::Box::moveHorizontally):
     31        (WebCore::InlineDisplay::Box::setLeft):
     32        (WebCore::InlineDisplay::Box::setRight):
     33        (WebCore::InlineDisplay::Box::setRect):
     34        (WebCore::InlineDisplay::Box::Box):
     35        (WebCore::InlineDisplay::Box::truncate):
     36        (WebCore::InlineDisplay::Box::logicalRect const): Deleted.
     37        (WebCore::InlineDisplay::Box::logicalTop const): Deleted.
     38        (WebCore::InlineDisplay::Box::logicalBottom const): Deleted.
     39        (WebCore::InlineDisplay::Box::logicalLeft const): Deleted.
     40        (WebCore::InlineDisplay::Box::logicalRight const): Deleted.
     41        (WebCore::InlineDisplay::Box::logicalWidth const): Deleted.
     42        (WebCore::InlineDisplay::Box::logicalHeight const): Deleted.
     43        (WebCore::InlineDisplay::Box::setLogicalLeft): Deleted.
     44        (WebCore::InlineDisplay::Box::setLogicalRight): Deleted.
     45        (WebCore::InlineDisplay::Box::setLogicalRect): Deleted.
     46        * layout/integration/InlineIteratorBoxModernPath.h:
     47        (WebCore::InlineIterator::BoxModernPath::rect const):
     48        * layout/integration/LayoutIntegrationBoxTree.cpp:
     49        (WebCore::LayoutIntegration::showInlineContent):
     50        * layout/integration/LayoutIntegrationInlineContentBuilder.cpp:
     51        (WebCore::LayoutIntegration::InlineContentBuilder::createDisplayLines const):
     52        * layout/integration/LayoutIntegrationLineLayout.cpp:
     53        (WebCore::LayoutIntegration::LineLayout::firstInlineBoxRect const):
     54        (WebCore::LayoutIntegration::LineLayout::collectInlineBoxRects const):
     55        (WebCore::LayoutIntegration::LineLayout::hitTest):
     56        * layout/layouttree/LayoutTreeBuilder.cpp:
     57        (WebCore::Layout::showInlineTreeAndRuns):
     58
    1592021-12-13  Tim Nguyen  <ntim@apple.com>
    260
  • trunk/Source/WebCore/display/css/DisplayBoxFactory.cpp

    r282961 r286957  
    149149    ASSERT(box.text());
    150150
    151     auto boxRect = LayoutRect { box.logicalLeft(), box.logicalTop(), box.logicalWidth(), box.logicalHeight() };
     151    auto boxRect = LayoutRect { box.left(), box.top(), box.width(), box.height() };
    152152    boxRect.move(containingBlockContext.offsetFromRoot);
    153153
  • trunk/Source/WebCore/layout/Verification.cpp

    r282961 r286957  
    7373static bool checkForMatchingNonTextRuns(const InlineDisplay::Box& box, const WebCore::LegacyInlineBox& inlineBox)
    7474{
    75     return areEssentiallyEqual(inlineBox.left(), box.logicalLeft())
    76         && areEssentiallyEqual(inlineBox.right(), box.logicalRight())
    77         && areEssentiallyEqual(inlineBox.top(), box.logicalTop())
    78         && areEssentiallyEqual(inlineBox.bottom(), box.logicalBottom());
     75    return areEssentiallyEqual(inlineBox.left(), box.left())
     76        && areEssentiallyEqual(inlineBox.right(), box.right())
     77        && areEssentiallyEqual(inlineBox.top(), box.top())
     78        && areEssentiallyEqual(inlineBox.bottom(), box.bottom());
    7979}
    8080
     
    8484    if (!box.text())
    8585        return false;
    86     return areEssentiallyEqual(inlineTextBox.left(), box.logicalLeft())
    87         && areEssentiallyEqual(inlineTextBox.right(), box.logicalRight())
    88         && areEssentiallyEqual(inlineTextBox.top(), box.logicalTop())
    89         && areEssentiallyEqual(inlineTextBox.bottom(), box.logicalBottom())
     86    return areEssentiallyEqual(inlineTextBox.left(), box.left())
     87        && areEssentiallyEqual(inlineTextBox.right(), box.right())
     88        && areEssentiallyEqual(inlineTextBox.top(), box.top())
     89        && areEssentiallyEqual(inlineTextBox.bottom(), box.bottom())
    9090        && (inlineTextBox.isLineBreak() || (inlineTextBox.start() == box.text()->start() && inlineTextBox.end() == box.text()->end()));
    9191}
     
    156156            if (box.text())
    157157                stream << " (" << box.text()->start() << ", " << box.text()->end() << ")";
    158             stream << " (" << box.logicalLeft() << ", " << box.logicalTop() << ") (" << box.logicalWidth() << "x" << box.logicalHeight() << ")";
     158            stream << " (" << box.left() << ", " << box.top() << ") (" << box.width() << "x" << box.height() << ")";
    159159            stream.nextLine();
    160160            mismatched = true;
  • trunk/Source/WebCore/layout/formattingContexts/inline/InlineDisplayContentBuilder.cpp

    r286931 r286957  
    428428
    429429    if (!displayBox.isNonRootInlineBox()) {
    430         displayBox.setLogicalLeft(contentRightInVisualOrder);
    431         contentRightInVisualOrder += displayBox.logicalWidth();
     430        displayBox.setLeft(contentRightInVisualOrder);
     431        contentRightInVisualOrder += displayBox.width();
    432432        if (displayBox.isAtomicInlineLevelBox() || displayBox.isGenericInlineLevelBox())
    433433            contentRightInVisualOrder += formattingState().boxGeometry(layoutBox).marginEnd();
     
    440440        auto visualRect = InlineRect { lineBoxLogicalTop + logicalRect.top(), contentRightInVisualOrder, { }, logicalRect.height() };
    441441        if (!displayBox.isFirstForLayoutBox())
    442             return displayBox.setLogicalRect(visualRect, visualRect);
     442            return displayBox.setRect(visualRect, visualRect);
    443443
    444444        contentRightInVisualOrder += boxGeometry.marginStart();
    445445        auto visualRectWithMarginStart = InlineRect { visualRect.top(), contentRightInVisualOrder, visualRect.width(), visualRect.height() };
    446         displayBox.setLogicalRect(visualRectWithMarginStart, visualRectWithMarginStart);
     446        displayBox.setRect(visualRectWithMarginStart, visualRectWithMarginStart);
    447447        contentRightInVisualOrder += boxGeometry.borderAndPaddingStart();
    448448    };
     
    454454    auto afterInlineBoxContent = [&] {
    455455        if (!displayBox.isLastForLayoutBox())
    456             return displayBox.setLogicalRight(contentRightInVisualOrder);
     456            return displayBox.setRight(contentRightInVisualOrder);
    457457
    458458        contentRightInVisualOrder += boxGeometry.borderAndPaddingEnd();
    459         displayBox.setLogicalRight(contentRightInVisualOrder);
     459        displayBox.setRight(contentRightInVisualOrder);
    460460        contentRightInVisualOrder += boxGeometry.marginEnd();
    461461    };
     
    463463
    464464    auto computeInkOverflow = [&] {
    465         auto inkOverflow = displayBox.logicalRect();
     465        auto inkOverflow = displayBox.rect();
    466466        m_contentHasInkOverflow = computeBoxShadowInkOverflow(!m_lineIndex ? layoutBox.firstLineStyle() : layoutBox.style(), inkOverflow) || m_contentHasInkOverflow;
    467467        displayBox.adjustInkOverflow(inkOverflow);
     
    469469    computeInkOverflow();
    470470
    471     setInlineBoxGeometry(layoutBox, displayBox.logicalRect(), displayBox.isFirstForLayoutBox());
     471    setInlineBoxGeometry(layoutBox, displayBox.rect(), displayBox.isFirstForLayoutBox());
    472472    if (lineBox.inlineLevelBoxForLayoutBox(layoutBox).hasContent())
    473473        displayBox.setHasContent();
     
    587587    ASSERT(rootInlineBox.isRootInlineBox());
    588588
    589     auto rootInlineBoxRect = rootInlineBox.logicalRect();
     589    auto rootInlineBoxRect = rootInlineBox.rect();
    590590    if (rootInlineBoxRect.right() <= lineBoxLogicalRight) {
    591         ASSERT(boxes.last().logicalRight() <= lineBoxLogicalRight);
     591        ASSERT(boxes.last().right() <= lineBoxLogicalRight);
    592592        return;
    593593    }
     
    601601        auto& displayBox = boxes[index];
    602602
    603         if (displayBox.logicalLeft() >= lineBoxLogicalRight) {
     603        if (displayBox.left() >= lineBoxLogicalRight) {
    604604            // Fully overflown boxes are collapsed.
    605605            displayBox.truncate();
     
    610610        // 1. fully truncate in case of inline level boxes (ie non-text content) or if ellipsis content is wider than the overflowing one.
    611611        // 2. partially truncated to make room for the ellipsis box.
    612         auto availableRoomForEllipsis = lineBoxLogicalRight - displayBox.logicalLeft();
     612        auto availableRoomForEllipsis = lineBoxLogicalRight - displayBox.left();
    613613        if (availableRoomForEllipsis <= ellipsisWidth) {
    614614            // Can't accommodate the ellipsis content here. We need to truncate non-overflowing boxes too.
     
    621621            auto text = *displayBox.text();
    622622            // FIXME: Check if it needs adjustment for RTL direction.
    623             truncatedWidth = TextUtil::breakWord(downcast<InlineTextBox>(displayBox.layoutBox()), text.start(), text.length(), displayBox.logicalWidth(), availableRoomForEllipsis - ellipsisWidth, { }, displayBox.style().fontCascade()).logicalWidth;
     623            truncatedWidth = TextUtil::breakWord(downcast<InlineTextBox>(displayBox.layoutBox()), text.start(), text.length(), displayBox.width(), availableRoomForEllipsis - ellipsisWidth, { }, displayBox.style().fontCascade()).logicalWidth;
    624624        }
    625625        displayBox.truncate(truncatedWidth);
     
    629629    ASSERT(firstTruncatedBoxIndex < boxes.size());
    630630    // Collapse truncated runs.
    631     auto contentRight = boxes[firstTruncatedBoxIndex].logicalRight();
     631    auto contentRight = boxes[firstTruncatedBoxIndex].right();
    632632    for (auto index = firstTruncatedBoxIndex + 1; index < boxes.size(); ++index)
    633         boxes[index].moveHorizontally(contentRight - boxes[index].logicalLeft());
     633        boxes[index].moveHorizontally(contentRight - boxes[index].left());
    634634    // And append the ellipsis box as the trailing item.
    635635    auto ellispisBoxRect = InlineRect { rootInlineBoxRect.top(), contentRight, ellipsisWidth, rootInlineBoxRect.height() };
  • trunk/Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.cpp

    r286534 r286957  
    306306            // <div><img style="position: absolute">text content</div>
    307307            ASSERT(boxes.size());
    308             outOfFlowGeometry.setLogicalTopLeft({ boxes[0].logicalLeft(), lines[0].lineBoxLogicalRect().top() });
     308            outOfFlowGeometry.setLogicalTopLeft({ boxes[0].left(), lines[0].lineBoxLogicalRect().top() });
    309309            continue;
    310310        }
     
    337337                // Previous and next boxes are on the same line. The out-of-flow box is right at the previous box's logical right.
    338338                // <div>text<img style="position: absolute">content</div>
    339                 auto logicalLeft = previousBox.logicalRight();
     339                auto left = previousBox.right();
    340340                if (previousContentSkippingFloats->isInlineBox() && !previousContentSkippingFloats->isAnonymous()) {
    341341                    // <div>text<span><img style="position: absolute">content</span></div>
     
    343343                    // <div>text<span>content</span><img style="position: absolute"></div>
    344344                    auto& inlineBoxBoxGeometry = geometryForBox(*previousContentSkippingFloats);
    345                     logicalLeft = previousContentSkippingFloats == &outOfFlowBox->parent()
     345                    left = previousContentSkippingFloats == &outOfFlowBox->parent()
    346346                        ? BoxGeometry::borderBoxLeft(inlineBoxBoxGeometry) + inlineBoxBoxGeometry.contentBoxLeft()
    347347                        : BoxGeometry::borderBoxRect(inlineBoxBoxGeometry).right();
    348348                }
    349                 outOfFlowGeometry.setLogicalTopLeft({ logicalLeft, lines[previousBox.lineIndex()].lineBoxLogicalRect().top() });
     349                outOfFlowGeometry.setLogicalTopLeft({ left, lines[previousBox.lineIndex()].lineBoxLogicalRect().top() });
    350350                return;
    351351            }
     
    354354                // The out of flow box is placed at the beginning of the next line (where the first box on the line is).
    355355                // <div>text<br><img style="position: absolute"><img style="position: absolute">content</div>
    356                 outOfFlowGeometry.setLogicalTopLeft({ nextBox->logicalLeft(), lines[nextBox->lineIndex()].lineBoxLogicalRect().top() });
     356                outOfFlowGeometry.setLogicalTopLeft({ nextBox->left(), lines[nextBox->lineIndex()].lineBoxLogicalRect().top() });
    357357                return;
    358358            }
     
    367367            }
    368368            // FIXME: We may need to check if this box actually fits the last line and move it over to the "next" line.
    369             outOfFlowGeometry.setLogicalTopLeft({ previousBox.logicalRight(), lastLineLogicalRect.top() });
     369            outOfFlowGeometry.setLogicalTopLeft({ previousBox.right(), lastLineLogicalRect.top() });
    370370        };
    371371        placeOutOfFlowBoxAfterPreviousInFlowBox();
  • trunk/Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayBox.h

    r286784 r286957  
    9696    bool hasContent() const { return m_hasContent; }
    9797
    98     const Layout::InlineRect& logicalRect() const { return m_logicalRect; }
     98    const Layout::InlineRect& rect() const { return m_physicalRect; }
    9999    const Layout::InlineRect& inkOverflow() const { return m_inkOverflow; }
    100100
    101     Layout::InlineLayoutUnit logicalTop() const { return logicalRect().top(); }
    102     Layout::InlineLayoutUnit logicalBottom() const { return logicalRect().bottom(); }
    103     Layout::InlineLayoutUnit logicalLeft() const { return logicalRect().left(); }
    104     Layout::InlineLayoutUnit logicalRight() const { return logicalRect().right(); }
    105 
    106     Layout::InlineLayoutUnit logicalWidth() const { return logicalRect().width(); }
    107     Layout::InlineLayoutUnit logicalHeight() const { return logicalRect().height(); }
     101    Layout::InlineLayoutUnit top() const { return rect().top(); }
     102    Layout::InlineLayoutUnit bottom() const { return rect().bottom(); }
     103    Layout::InlineLayoutUnit left() const { return rect().left(); }
     104    Layout::InlineLayoutUnit right() const { return rect().right(); }
     105
     106    Layout::InlineLayoutUnit width() const { return rect().width(); }
     107    Layout::InlineLayoutUnit height() const { return rect().height(); }
    108108
    109109    void moveVertically(Layout::InlineLayoutUnit offset)
    110110    {
    111         m_logicalRect.moveVertically(offset);
     111        m_physicalRect.moveVertically(offset);
    112112        m_inkOverflow.moveVertically(offset);
    113113    }
    114114    void moveHorizontally(Layout::InlineLayoutUnit offset)
    115115    {
    116         m_logicalRect.moveHorizontally(offset);
     116        m_physicalRect.moveHorizontally(offset);
    117117        m_inkOverflow.moveHorizontally(offset);
    118118    }
    119119    void adjustInkOverflow(const Layout::InlineRect& childBorderBox) { return m_inkOverflow.expandToContain(childBorderBox); }
    120120    void truncate(Layout::InlineLayoutUnit truncatedwidth = 0.f);
    121     void setLogicalLeft(Layout::InlineLayoutUnit left)
    122     {
    123         auto offset = left - logicalLeft();
    124         m_logicalRect.setLeft(left);
     121    void setLeft(Layout::InlineLayoutUnit pysicalLeft)
     122    {
     123        auto offset = pysicalLeft - left();
     124        m_physicalRect.setLeft(pysicalLeft);
    125125        m_inkOverflow.setLeft(m_inkOverflow.left() + offset);
    126126    }
    127     void setLogicalRight(Layout::InlineLayoutUnit right)
    128     {
    129         auto offset = right - logicalRight();
    130         m_logicalRect.setRight(right);
     127    void setRight(Layout::InlineLayoutUnit physicalRight)
     128    {
     129        auto offset = physicalRight - right();
     130        m_physicalRect.setRight(physicalRight);
    131131        m_inkOverflow.setRight(m_inkOverflow.right() + offset);
    132132    }
    133     void setLogicalRect(const Layout::InlineRect& rect, const Layout::InlineRect& inkOverflow)
    134     {
    135         m_logicalRect = rect;
     133    void setRect(const Layout::InlineRect& rect, const Layout::InlineRect& inkOverflow)
     134    {
     135        m_physicalRect = rect;
    136136        m_inkOverflow = inkOverflow;
    137137    }
     
    164164    CheckedRef<const Layout::Box> m_layoutBox;
    165165    UBiDiLevel m_bidiLevel { UBIDI_DEFAULT_LTR };
    166     Layout::InlineRect m_logicalRect;
     166    Layout::InlineRect m_physicalRect;
    167167    Layout::InlineRect m_inkOverflow;
    168168    bool m_hasContent : 1;
     
    173173};
    174174
    175 inline Box::Box(size_t lineIndex, Type type, const Layout::Box& layoutBox, UBiDiLevel bidiLevel, const Layout::InlineRect& logicalRect, const Layout::InlineRect& inkOverflow, Expansion expansion, std::optional<Text> text, bool hasContent, OptionSet<PositionWithinInlineLevelBox> positionWithinInlineLevelBox)
     175inline Box::Box(size_t lineIndex, Type type, const Layout::Box& layoutBox, UBiDiLevel bidiLevel, const Layout::InlineRect& physicalRect, const Layout::InlineRect& inkOverflow, Expansion expansion, std::optional<Text> text, bool hasContent, OptionSet<PositionWithinInlineLevelBox> positionWithinInlineLevelBox)
    176176    : m_lineIndex(lineIndex)
    177177    , m_type(type)
    178178    , m_layoutBox(layoutBox)
    179179    , m_bidiLevel(bidiLevel)
    180     , m_logicalRect(logicalRect)
     180    , m_physicalRect(physicalRect)
    181181    , m_inkOverflow(inkOverflow)
    182182    , m_hasContent(hasContent)
     
    199199inline void Box::truncate(Layout::InlineLayoutUnit truncatedwidth)
    200200{
    201     m_logicalRect.setWidth(truncatedwidth);
    202     m_inkOverflow.setRight(m_logicalRect.right());
     201    m_physicalRect.setWidth(truncatedwidth);
     202    m_inkOverflow.setRight(m_physicalRect.right());
    203203}
    204204
  • trunk/Source/WebCore/layout/integration/InlineIteratorBoxModernPath.h

    r286541 r286957  
    5353    bool isRootInlineBox() const { return box().isRootInlineBox(); }
    5454
    55     FloatRect rect() const { return box().logicalRect(); }
     55    FloatRect rect() const { return box().rect(); }
    5656
    5757    bool isHorizontal() const { return true; }
  • trunk/Source/WebCore/layout/integration/LayoutIntegrationBoxTree.cpp

    r286138 r286957  
    277277            addSpacing();
    278278            stream << "    ";
    279             auto logicalRect = inlineLevelBox.logicalRect();
     279            auto rect = inlineLevelBox.rect();
    280280            auto& layoutBox = inlineLevelBox.layoutBox();
    281281            if (layoutBox.isAtomicInlineLevelBox())
     
    288288                stream << "Generic inline level box";
    289289            stream
    290                 << " at (" << logicalRect.left() << "," << logicalRect.top() << ")"
    291                 << " size (" << logicalRect.width() << "x" << logicalRect.height() << ")";
     290                << " at (" << rect.left() << "," << rect.top() << ")"
     291                << " size (" << rect.width() << "x" << rect.height() << ")";
    292292            stream.nextLine();
    293293        };
     
    312312            else
    313313                stream << "box box";
    314             stream << " at (" << box.logicalLeft() << "," << box.logicalTop() << ") size " << box.logicalWidth() << "x" << box.logicalHeight();
     314            stream << " at (" << box.left() << "," << box.top() << ") size " << box.width() << "x" << box.height();
    315315            if (box.text())
    316316                stream << " box(" << box.text()->start() << ", " << box.text()->end() << ")";
  • trunk/Source/WebCore/layout/integration/LayoutIntegrationInlineContentBuilder.cpp

    r283711 r286957  
    9595                // Similar to LegacyInlineFlowBox::addReplacedChildOverflow.
    9696                auto& renderer = downcast<RenderBox>(m_boxTree.rendererForLayoutBox(layoutBox));
    97                 auto boxLogicalRect = box.logicalRect();
     97                auto boxRect = box.rect();
    9898                if (!renderer.hasSelfPaintingLayer()) {
    9999                    auto childInkOverflow = renderer.logicalVisualOverflowRectForPropagation(&renderer.parent()->style());
    100                     childInkOverflow.move(boxLogicalRect.left(), boxLogicalRect.top());
     100                    childInkOverflow.move(boxRect.left(), boxRect.top());
    101101                    lineInkOverflowRect.unite(childInkOverflow);
    102102                }
    103103                auto childScrollableOverflow = renderer.logicalLayoutOverflowRectForPropagation(&renderer.parent()->style());
    104                 childScrollableOverflow.move(boxLogicalRect.left(), boxLogicalRect.top());
     104                childScrollableOverflow.move(boxRect.left(), boxRect.top());
    105105                scrollableOverflowRect.unite(childScrollableOverflow);
    106106            }
  • trunk/Source/WebCore/layout/integration/LayoutIntegrationLineLayout.cpp

    r286096 r286957  
    448448
    449449    if (auto* box = m_inlineContent->firstBoxForLayoutBox(layoutBox))
    450         return Layout::toLayoutRect(box->logicalRect());
     450        return Layout::toLayoutRect(box->rect());
    451451
    452452    return { };
     
    486486    Vector<FloatRect> result;
    487487    m_inlineContent->traverseNonRootInlineBoxes(layoutBox, [&](auto& inlineBox) {
    488         result.append(inlineBox.logicalRect());
     488        result.append(inlineBox.rect());
    489489    });
    490490
     
    581581        }
    582582
    583         auto boxRect = Layout::toLayoutRect(box.logicalRect());
     583        auto boxRect = Layout::toLayoutRect(box.rect());
    584584        boxRect.moveBy(accumulatedOffset);
    585585
  • trunk/Source/WebCore/layout/layouttree/LayoutTreeBuilder.cpp

    r285807 r286957  
    387387            addSpacing();
    388388            stream << "    ";
    389             auto logicalRect = inlineLevelBox.logicalRect();
     389            auto rect = inlineLevelBox.rect();
    390390            auto& layoutBox = inlineLevelBox.layoutBox();
    391391            if (layoutBox.isAtomicInlineLevelBox())
     
    398398                stream << "Generic inline level box";
    399399            stream
    400                 << " at (" << logicalRect.left() << "," << logicalRect.top() << ")"
    401                 << " size (" << logicalRect.width() << "x" << logicalRect.height() << ")";
     400                << " at (" << rect.left() << "," << rect.top() << ")"
     401                << " size (" << rect.width() << "x" << rect.height() << ")";
    402402            stream.nextLine();
    403403        };
     
    422422            else
    423423                stream << "box box";
    424             stream << " at (" << box.logicalLeft() << "," << box.logicalTop() << ") size " << box.logicalWidth() << "x" << box.logicalHeight();
     424            stream << " at (" << box.left() << "," << box.top() << ") size " << box.width() << "x" << box.height();
    425425            if (box.text())
    426426                stream << " box(" << box.text()->start() << ", " << box.text()->end() << ")";
Note: See TracChangeset for help on using the changeset viewer.