Diff
Modified: trunk/Source/WebCore/ChangeLog (286956 => 286957)
--- trunk/Source/WebCore/ChangeLog 2021-12-13 18:30:08 UTC (rev 286956)
+++ trunk/Source/WebCore/ChangeLog 2021-12-13 18:32:50 UTC (rev 286957)
@@ -1,3 +1,61 @@
+2021-12-13 Alan Bujtas <za...@apple.com>
+
+ [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):
+
2021-12-13 Tim Nguyen <n...@apple.com>
Fix paint order of CSS text decorations
Modified: trunk/Source/WebCore/display/css/DisplayBoxFactory.cpp (286956 => 286957)
--- trunk/Source/WebCore/display/css/DisplayBoxFactory.cpp 2021-12-13 18:30:08 UTC (rev 286956)
+++ trunk/Source/WebCore/display/css/DisplayBoxFactory.cpp 2021-12-13 18:32:50 UTC (rev 286957)
@@ -148,7 +148,7 @@
UNUSED_PARAM(line);
ASSERT(box.text());
- auto boxRect = LayoutRect { box.logicalLeft(), box.logicalTop(), box.logicalWidth(), box.logicalHeight() };
+ auto boxRect = LayoutRect { box.left(), box.top(), box.width(), box.height() };
boxRect.move(containingBlockContext.offsetFromRoot);
auto style = Style { box.layoutBox().style() };
Modified: trunk/Source/WebCore/layout/Verification.cpp (286956 => 286957)
--- trunk/Source/WebCore/layout/Verification.cpp 2021-12-13 18:30:08 UTC (rev 286956)
+++ trunk/Source/WebCore/layout/Verification.cpp 2021-12-13 18:32:50 UTC (rev 286957)
@@ -72,10 +72,10 @@
static bool checkForMatchingNonTextRuns(const InlineDisplay::Box& box, const WebCore::LegacyInlineBox& inlineBox)
{
- return areEssentiallyEqual(inlineBox.left(), box.logicalLeft())
- && areEssentiallyEqual(inlineBox.right(), box.logicalRight())
- && areEssentiallyEqual(inlineBox.top(), box.logicalTop())
- && areEssentiallyEqual(inlineBox.bottom(), box.logicalBottom());
+ return areEssentiallyEqual(inlineBox.left(), box.left())
+ && areEssentiallyEqual(inlineBox.right(), box.right())
+ && areEssentiallyEqual(inlineBox.top(), box.top())
+ && areEssentiallyEqual(inlineBox.bottom(), box.bottom());
}
@@ -83,10 +83,10 @@
{
if (!box.text())
return false;
- return areEssentiallyEqual(inlineTextBox.left(), box.logicalLeft())
- && areEssentiallyEqual(inlineTextBox.right(), box.logicalRight())
- && areEssentiallyEqual(inlineTextBox.top(), box.logicalTop())
- && areEssentiallyEqual(inlineTextBox.bottom(), box.logicalBottom())
+ return areEssentiallyEqual(inlineTextBox.left(), box.left())
+ && areEssentiallyEqual(inlineTextBox.right(), box.right())
+ && areEssentiallyEqual(inlineTextBox.top(), box.top())
+ && areEssentiallyEqual(inlineTextBox.bottom(), box.bottom())
&& (inlineTextBox.isLineBreak() || (inlineTextBox.start() == box.text()->start() && inlineTextBox.end() == box.text()->end()));
}
@@ -155,7 +155,7 @@
stream << " inline box";
if (box.text())
stream << " (" << box.text()->start() << ", " << box.text()->end() << ")";
- stream << " (" << box.logicalLeft() << ", " << box.logicalTop() << ") (" << box.logicalWidth() << "x" << box.logicalHeight() << ")";
+ stream << " (" << box.left() << ", " << box.top() << ") (" << box.width() << "x" << box.height() << ")";
stream.nextLine();
mismatched = true;
}
Modified: trunk/Source/WebCore/layout/formattingContexts/inline/InlineDisplayContentBuilder.cpp (286956 => 286957)
--- trunk/Source/WebCore/layout/formattingContexts/inline/InlineDisplayContentBuilder.cpp 2021-12-13 18:30:08 UTC (rev 286956)
+++ trunk/Source/WebCore/layout/formattingContexts/inline/InlineDisplayContentBuilder.cpp 2021-12-13 18:32:50 UTC (rev 286957)
@@ -427,8 +427,8 @@
auto& layoutBox = displayBox.layoutBox();
if (!displayBox.isNonRootInlineBox()) {
- displayBox.setLogicalLeft(contentRightInVisualOrder);
- contentRightInVisualOrder += displayBox.logicalWidth();
+ displayBox.setLeft(contentRightInVisualOrder);
+ contentRightInVisualOrder += displayBox.width();
if (displayBox.isAtomicInlineLevelBox() || displayBox.isGenericInlineLevelBox())
contentRightInVisualOrder += formattingState().boxGeometry(layoutBox).marginEnd();
return;
@@ -439,11 +439,11 @@
auto logicalRect = lineBox.logicalBorderBoxForInlineBox(layoutBox, boxGeometry);
auto visualRect = InlineRect { lineBoxLogicalTop + logicalRect.top(), contentRightInVisualOrder, { }, logicalRect.height() };
if (!displayBox.isFirstForLayoutBox())
- return displayBox.setLogicalRect(visualRect, visualRect);
+ return displayBox.setRect(visualRect, visualRect);
contentRightInVisualOrder += boxGeometry.marginStart();
auto visualRectWithMarginStart = InlineRect { visualRect.top(), contentRightInVisualOrder, visualRect.width(), visualRect.height() };
- displayBox.setLogicalRect(visualRectWithMarginStart, visualRectWithMarginStart);
+ displayBox.setRect(visualRectWithMarginStart, visualRectWithMarginStart);
contentRightInVisualOrder += boxGeometry.borderAndPaddingStart();
};
beforeInlineBoxContent();
@@ -453,22 +453,22 @@
auto afterInlineBoxContent = [&] {
if (!displayBox.isLastForLayoutBox())
- return displayBox.setLogicalRight(contentRightInVisualOrder);
+ return displayBox.setRight(contentRightInVisualOrder);
contentRightInVisualOrder += boxGeometry.borderAndPaddingEnd();
- displayBox.setLogicalRight(contentRightInVisualOrder);
+ displayBox.setRight(contentRightInVisualOrder);
contentRightInVisualOrder += boxGeometry.marginEnd();
};
afterInlineBoxContent();
auto computeInkOverflow = [&] {
- auto inkOverflow = displayBox.logicalRect();
+ auto inkOverflow = displayBox.rect();
m_contentHasInkOverflow = computeBoxShadowInkOverflow(!m_lineIndex ? layoutBox.firstLineStyle() : layoutBox.style(), inkOverflow) || m_contentHasInkOverflow;
displayBox.adjustInkOverflow(inkOverflow);
};
computeInkOverflow();
- setInlineBoxGeometry(layoutBox, displayBox.logicalRect(), displayBox.isFirstForLayoutBox());
+ setInlineBoxGeometry(layoutBox, displayBox.rect(), displayBox.isFirstForLayoutBox());
if (lineBox.inlineLevelBoxForLayoutBox(layoutBox).hasContent())
displayBox.setHasContent();
}
@@ -586,9 +586,9 @@
auto& rootInlineBox = boxes[0];
ASSERT(rootInlineBox.isRootInlineBox());
- auto rootInlineBoxRect = rootInlineBox.logicalRect();
+ auto rootInlineBoxRect = rootInlineBox.rect();
if (rootInlineBoxRect.right() <= lineBoxLogicalRight) {
- ASSERT(boxes.last().logicalRight() <= lineBoxLogicalRight);
+ ASSERT(boxes.last().right() <= lineBoxLogicalRight);
return;
}
@@ -600,7 +600,7 @@
for (auto index = boxes.size(); index--;) {
auto& displayBox = boxes[index];
- if (displayBox.logicalLeft() >= lineBoxLogicalRight) {
+ if (displayBox.left() >= lineBoxLogicalRight) {
// Fully overflown boxes are collapsed.
displayBox.truncate();
continue;
@@ -609,7 +609,7 @@
// We keep truncating content until after we can accommodate the ellipsis content
// 1. fully truncate in case of inline level boxes (ie non-text content) or if ellipsis content is wider than the overflowing one.
// 2. partially truncated to make room for the ellipsis box.
- auto availableRoomForEllipsis = lineBoxLogicalRight - displayBox.logicalLeft();
+ auto availableRoomForEllipsis = lineBoxLogicalRight - displayBox.left();
if (availableRoomForEllipsis <= ellipsisWidth) {
// Can't accommodate the ellipsis content here. We need to truncate non-overflowing boxes too.
displayBox.truncate();
@@ -620,7 +620,7 @@
if (displayBox.isText()) {
auto text = *displayBox.text();
// FIXME: Check if it needs adjustment for RTL direction.
- truncatedWidth = TextUtil::breakWord(downcast<InlineTextBox>(displayBox.layoutBox()), text.start(), text.length(), displayBox.logicalWidth(), availableRoomForEllipsis - ellipsisWidth, { }, displayBox.style().fontCascade()).logicalWidth;
+ truncatedWidth = TextUtil::breakWord(downcast<InlineTextBox>(displayBox.layoutBox()), text.start(), text.length(), displayBox.width(), availableRoomForEllipsis - ellipsisWidth, { }, displayBox.style().fontCascade()).logicalWidth;
}
displayBox.truncate(truncatedWidth);
firstTruncatedBoxIndex = index;
@@ -628,9 +628,9 @@
}
ASSERT(firstTruncatedBoxIndex < boxes.size());
// Collapse truncated runs.
- auto contentRight = boxes[firstTruncatedBoxIndex].logicalRight();
+ auto contentRight = boxes[firstTruncatedBoxIndex].right();
for (auto index = firstTruncatedBoxIndex + 1; index < boxes.size(); ++index)
- boxes[index].moveHorizontally(contentRight - boxes[index].logicalLeft());
+ boxes[index].moveHorizontally(contentRight - boxes[index].left());
// And append the ellipsis box as the trailing item.
auto ellispisBoxRect = InlineRect { rootInlineBoxRect.top(), contentRight, ellipsisWidth, rootInlineBoxRect.height() };
boxes.append({ m_lineIndex
Modified: trunk/Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.cpp (286956 => 286957)
--- trunk/Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.cpp 2021-12-13 18:30:08 UTC (rev 286956)
+++ trunk/Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.cpp 2021-12-13 18:32:50 UTC (rev 286957)
@@ -305,7 +305,7 @@
// This is the first (non-float)child. Let's place it to the left of the first box.
// <div><img style="position: absolute">text content</div>
ASSERT(boxes.size());
- outOfFlowGeometry.setLogicalTopLeft({ boxes[0].logicalLeft(), lines[0].lineBoxLogicalRect().top() });
+ outOfFlowGeometry.setLogicalTopLeft({ boxes[0].left(), lines[0].lineBoxLogicalRect().top() });
continue;
}
@@ -336,17 +336,17 @@
if (nextBox && nextBox->lineIndex() == previousBox.lineIndex()) {
// Previous and next boxes are on the same line. The out-of-flow box is right at the previous box's logical right.
// <div>text<img style="position: absolute">content</div>
- auto logicalLeft = previousBox.logicalRight();
+ auto left = previousBox.right();
if (previousContentSkippingFloats->isInlineBox() && !previousContentSkippingFloats->isAnonymous()) {
// <div>text<span><img style="position: absolute">content</span></div>
// or
// <div>text<span>content</span><img style="position: absolute"></div>
auto& inlineBoxBoxGeometry = geometryForBox(*previousContentSkippingFloats);
- logicalLeft = previousContentSkippingFloats == &outOfFlowBox->parent()
+ left = previousContentSkippingFloats == &outOfFlowBox->parent()
? BoxGeometry::borderBoxLeft(inlineBoxBoxGeometry) + inlineBoxBoxGeometry.contentBoxLeft()
: BoxGeometry::borderBoxRect(inlineBoxBoxGeometry).right();
}
- outOfFlowGeometry.setLogicalTopLeft({ logicalLeft, lines[previousBox.lineIndex()].lineBoxLogicalRect().top() });
+ outOfFlowGeometry.setLogicalTopLeft({ left, lines[previousBox.lineIndex()].lineBoxLogicalRect().top() });
return;
}
@@ -353,7 +353,7 @@
if (nextBox) {
// The out of flow box is placed at the beginning of the next line (where the first box on the line is).
// <div>text<br><img style="position: absolute"><img style="position: absolute">content</div>
- outOfFlowGeometry.setLogicalTopLeft({ nextBox->logicalLeft(), lines[nextBox->lineIndex()].lineBoxLogicalRect().top() });
+ outOfFlowGeometry.setLogicalTopLeft({ nextBox->left(), lines[nextBox->lineIndex()].lineBoxLogicalRect().top() });
return;
}
@@ -366,7 +366,7 @@
return;
}
// FIXME: We may need to check if this box actually fits the last line and move it over to the "next" line.
- outOfFlowGeometry.setLogicalTopLeft({ previousBox.logicalRight(), lastLineLogicalRect.top() });
+ outOfFlowGeometry.setLogicalTopLeft({ previousBox.right(), lastLineLogicalRect.top() });
};
placeOutOfFlowBoxAfterPreviousInFlowBox();
}
Modified: trunk/Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayBox.h (286956 => 286957)
--- trunk/Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayBox.h 2021-12-13 18:30:08 UTC (rev 286956)
+++ trunk/Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayBox.h 2021-12-13 18:32:50 UTC (rev 286957)
@@ -95,44 +95,44 @@
bool hasContent() const { return m_hasContent; }
- const Layout::InlineRect& logicalRect() const { return m_logicalRect; }
+ const Layout::InlineRect& rect() const { return m_physicalRect; }
const Layout::InlineRect& inkOverflow() const { return m_inkOverflow; }
- Layout::InlineLayoutUnit logicalTop() const { return logicalRect().top(); }
- Layout::InlineLayoutUnit logicalBottom() const { return logicalRect().bottom(); }
- Layout::InlineLayoutUnit logicalLeft() const { return logicalRect().left(); }
- Layout::InlineLayoutUnit logicalRight() const { return logicalRect().right(); }
+ Layout::InlineLayoutUnit top() const { return rect().top(); }
+ Layout::InlineLayoutUnit bottom() const { return rect().bottom(); }
+ Layout::InlineLayoutUnit left() const { return rect().left(); }
+ Layout::InlineLayoutUnit right() const { return rect().right(); }
- Layout::InlineLayoutUnit logicalWidth() const { return logicalRect().width(); }
- Layout::InlineLayoutUnit logicalHeight() const { return logicalRect().height(); }
+ Layout::InlineLayoutUnit width() const { return rect().width(); }
+ Layout::InlineLayoutUnit height() const { return rect().height(); }
void moveVertically(Layout::InlineLayoutUnit offset)
{
- m_logicalRect.moveVertically(offset);
+ m_physicalRect.moveVertically(offset);
m_inkOverflow.moveVertically(offset);
}
void moveHorizontally(Layout::InlineLayoutUnit offset)
{
- m_logicalRect.moveHorizontally(offset);
+ m_physicalRect.moveHorizontally(offset);
m_inkOverflow.moveHorizontally(offset);
}
void adjustInkOverflow(const Layout::InlineRect& childBorderBox) { return m_inkOverflow.expandToContain(childBorderBox); }
void truncate(Layout::InlineLayoutUnit truncatedwidth = 0.f);
- void setLogicalLeft(Layout::InlineLayoutUnit left)
+ void setLeft(Layout::InlineLayoutUnit pysicalLeft)
{
- auto offset = left - logicalLeft();
- m_logicalRect.setLeft(left);
+ auto offset = pysicalLeft - left();
+ m_physicalRect.setLeft(pysicalLeft);
m_inkOverflow.setLeft(m_inkOverflow.left() + offset);
}
- void setLogicalRight(Layout::InlineLayoutUnit right)
+ void setRight(Layout::InlineLayoutUnit physicalRight)
{
- auto offset = right - logicalRight();
- m_logicalRect.setRight(right);
+ auto offset = physicalRight - right();
+ m_physicalRect.setRight(physicalRight);
m_inkOverflow.setRight(m_inkOverflow.right() + offset);
}
- void setLogicalRect(const Layout::InlineRect& rect, const Layout::InlineRect& inkOverflow)
+ void setRect(const Layout::InlineRect& rect, const Layout::InlineRect& inkOverflow)
{
- m_logicalRect = rect;
+ m_physicalRect = rect;
m_inkOverflow = inkOverflow;
}
void setHasContent() { m_hasContent = true; }
@@ -163,7 +163,7 @@
const Type m_type { Type::GenericInlineLevelBox };
CheckedRef<const Layout::Box> m_layoutBox;
UBiDiLevel m_bidiLevel { UBIDI_DEFAULT_LTR };
- Layout::InlineRect m_logicalRect;
+ Layout::InlineRect m_physicalRect;
Layout::InlineRect m_inkOverflow;
bool m_hasContent : 1;
bool m_isFirstForLayoutBox : 1;
@@ -172,12 +172,12 @@
std::optional<Text> m_text;
};
-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)
+inline 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)
: m_lineIndex(lineIndex)
, m_type(type)
, m_layoutBox(layoutBox)
, m_bidiLevel(bidiLevel)
- , m_logicalRect(logicalRect)
+ , m_physicalRect(physicalRect)
, m_inkOverflow(inkOverflow)
, m_hasContent(hasContent)
, m_isFirstForLayoutBox(positionWithinInlineLevelBox.contains(PositionWithinInlineLevelBox::First))
@@ -198,8 +198,8 @@
inline void Box::truncate(Layout::InlineLayoutUnit truncatedwidth)
{
- m_logicalRect.setWidth(truncatedwidth);
- m_inkOverflow.setRight(m_logicalRect.right());
+ m_physicalRect.setWidth(truncatedwidth);
+ m_inkOverflow.setRight(m_physicalRect.right());
}
}
Modified: trunk/Source/WebCore/layout/integration/InlineIteratorBoxModernPath.h (286956 => 286957)
--- trunk/Source/WebCore/layout/integration/InlineIteratorBoxModernPath.h 2021-12-13 18:30:08 UTC (rev 286956)
+++ trunk/Source/WebCore/layout/integration/InlineIteratorBoxModernPath.h 2021-12-13 18:32:50 UTC (rev 286957)
@@ -52,7 +52,7 @@
bool isInlineBox() const { return box().isInlineBox(); }
bool isRootInlineBox() const { return box().isRootInlineBox(); }
- FloatRect rect() const { return box().logicalRect(); }
+ FloatRect rect() const { return box().rect(); }
bool isHorizontal() const { return true; }
bool isLineBreak() const { return box().isLineBreak(); }
Modified: trunk/Source/WebCore/layout/integration/LayoutIntegrationBoxTree.cpp (286956 => 286957)
--- trunk/Source/WebCore/layout/integration/LayoutIntegrationBoxTree.cpp 2021-12-13 18:30:08 UTC (rev 286956)
+++ trunk/Source/WebCore/layout/integration/LayoutIntegrationBoxTree.cpp 2021-12-13 18:32:50 UTC (rev 286957)
@@ -276,7 +276,7 @@
auto outputInlineLevelBox = [&](const auto& inlineLevelBox) {
addSpacing();
stream << " ";
- auto logicalRect = inlineLevelBox.logicalRect();
+ auto rect = inlineLevelBox.rect();
auto& layoutBox = inlineLevelBox.layoutBox();
if (layoutBox.isAtomicInlineLevelBox())
stream << "Atomic inline level box";
@@ -287,8 +287,8 @@
else
stream << "Generic inline level box";
stream
- << " at (" << logicalRect.left() << "," << logicalRect.top() << ")"
- << " size (" << logicalRect.width() << "x" << logicalRect.height() << ")";
+ << " at (" << rect.left() << "," << rect.top() << ")"
+ << " size (" << rect.width() << "x" << rect.height() << ")";
stream.nextLine();
};
for (auto& box : boxes) {
@@ -311,7 +311,7 @@
stream << "text box";
else
stream << "box box";
- stream << " at (" << box.logicalLeft() << "," << box.logicalTop() << ") size " << box.logicalWidth() << "x" << box.logicalHeight();
+ stream << " at (" << box.left() << "," << box.top() << ") size " << box.width() << "x" << box.height();
if (box.text())
stream << " box(" << box.text()->start() << ", " << box.text()->end() << ")";
stream.nextLine();
Modified: trunk/Source/WebCore/layout/integration/LayoutIntegrationInlineContentBuilder.cpp (286956 => 286957)
--- trunk/Source/WebCore/layout/integration/LayoutIntegrationInlineContentBuilder.cpp 2021-12-13 18:30:08 UTC (rev 286956)
+++ trunk/Source/WebCore/layout/integration/LayoutIntegrationInlineContentBuilder.cpp 2021-12-13 18:32:50 UTC (rev 286957)
@@ -94,14 +94,14 @@
if (layoutBox.isReplacedBox()) {
// Similar to LegacyInlineFlowBox::addReplacedChildOverflow.
auto& renderer = downcast<RenderBox>(m_boxTree.rendererForLayoutBox(layoutBox));
- auto boxLogicalRect = box.logicalRect();
+ auto boxRect = box.rect();
if (!renderer.hasSelfPaintingLayer()) {
auto childInkOverflow = renderer.logicalVisualOverflowRectForPropagation(&renderer.parent()->style());
- childInkOverflow.move(boxLogicalRect.left(), boxLogicalRect.top());
+ childInkOverflow.move(boxRect.left(), boxRect.top());
lineInkOverflowRect.unite(childInkOverflow);
}
auto childScrollableOverflow = renderer.logicalLayoutOverflowRectForPropagation(&renderer.parent()->style());
- childScrollableOverflow.move(boxLogicalRect.left(), boxLogicalRect.top());
+ childScrollableOverflow.move(boxRect.left(), boxRect.top());
scrollableOverflowRect.unite(childScrollableOverflow);
}
}
Modified: trunk/Source/WebCore/layout/integration/LayoutIntegrationLineLayout.cpp (286956 => 286957)
--- trunk/Source/WebCore/layout/integration/LayoutIntegrationLineLayout.cpp 2021-12-13 18:30:08 UTC (rev 286956)
+++ trunk/Source/WebCore/layout/integration/LayoutIntegrationLineLayout.cpp 2021-12-13 18:32:50 UTC (rev 286957)
@@ -447,7 +447,7 @@
auto& layoutBox = m_boxTree.layoutBoxForRenderer(renderInline);
if (auto* box = m_inlineContent->firstBoxForLayoutBox(layoutBox))
- return Layout::toLayoutRect(box->logicalRect());
+ return Layout::toLayoutRect(box->rect());
return { };
}
@@ -485,7 +485,7 @@
Vector<FloatRect> result;
m_inlineContent->traverseNonRootInlineBoxes(layoutBox, [&](auto& inlineBox) {
- result.append(inlineBox.logicalRect());
+ result.append(inlineBox.rect());
});
return result;
@@ -580,7 +580,7 @@
continue;
}
- auto boxRect = Layout::toLayoutRect(box.logicalRect());
+ auto boxRect = Layout::toLayoutRect(box.rect());
boxRect.moveBy(accumulatedOffset);
if (!locationInContainer.intersects(boxRect))
Modified: trunk/Source/WebCore/layout/layouttree/LayoutTreeBuilder.cpp (286956 => 286957)
--- trunk/Source/WebCore/layout/layouttree/LayoutTreeBuilder.cpp 2021-12-13 18:30:08 UTC (rev 286956)
+++ trunk/Source/WebCore/layout/layouttree/LayoutTreeBuilder.cpp 2021-12-13 18:32:50 UTC (rev 286957)
@@ -386,7 +386,7 @@
auto outputInlineLevelBox = [&](const auto& inlineLevelBox) {
addSpacing();
stream << " ";
- auto logicalRect = inlineLevelBox.logicalRect();
+ auto rect = inlineLevelBox.rect();
auto& layoutBox = inlineLevelBox.layoutBox();
if (layoutBox.isAtomicInlineLevelBox())
stream << "Atomic inline level box";
@@ -397,8 +397,8 @@
else
stream << "Generic inline level box";
stream
- << " at (" << logicalRect.left() << "," << logicalRect.top() << ")"
- << " size (" << logicalRect.width() << "x" << logicalRect.height() << ")";
+ << " at (" << rect.left() << "," << rect.top() << ")"
+ << " size (" << rect.width() << "x" << rect.height() << ")";
stream.nextLine();
};
for (auto& box : boxes) {
@@ -421,7 +421,7 @@
stream << "text box";
else
stream << "box box";
- stream << " at (" << box.logicalLeft() << "," << box.logicalTop() << ") size " << box.logicalWidth() << "x" << box.logicalHeight();
+ stream << " at (" << box.left() << "," << box.top() << ") size " << box.width() << "x" << box.height();
if (box.text())
stream << " box(" << box.text()->start() << ", " << box.text()->end() << ")";
stream.nextLine();