<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[287475] trunk/Source/WebCore</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/287475">287475</a></dd>
<dt>Author</dt> <dd>zalan@apple.com</dd>
<dt>Date</dt> <dd>2021-12-28 13:16:11 -0800 (Tue, 28 Dec 2021)</dd>
</dl>

<h3>Log Message</h3>
<pre>[LFC][IFC] Do not let Layout geometry types leak into InlineDisplay::Box
https://bugs.webkit.org/show_bug.cgi?id=234728

Reviewed by Antti Koivisto.

InlineLayoutUnit -> float
InlineRect -> FloatRect
(This is also where we will eventually do some pixel snapping)

* layout/formattingContexts/inline/display/InlineDisplayBox.h:
(WebCore::InlineDisplay::Box::Box):
(WebCore::InlineDisplay::Box::rect const):
(WebCore::InlineDisplay::Box::inkOverflow 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::adjustInkOverflow):
(WebCore::InlineDisplay::Box::setLeft):
(WebCore::InlineDisplay::Box::setRight):
(WebCore::InlineDisplay::Box::setRect):
(WebCore::InlineDisplay::Box::truncate):
* layout/formattingContexts/inline/display/InlineDisplayContentBuilder.cpp:
(WebCore::Layout::computeBoxShadowInkOverflow):
(WebCore::Layout::InlineDisplayContentBuilder::appendAtomicInlineLevelDisplayBox):
(WebCore::Layout::InlineDisplayContentBuilder::appendInlineBoxDisplayBox):
(WebCore::Layout::InlineDisplayContentBuilder::appendSpanningInlineBoxDisplayBox):
(WebCore::Layout::InlineDisplayContentBuilder::adjustVisualGeometryForDisplayBox):
(WebCore::Layout::InlineDisplayContentBuilder::processOverflownRunsForEllipsis):
* layout/integration/LayoutIntegrationBoxTree.cpp:
(WebCore::LayoutIntegration::showInlineContent):
* layout/integration/LayoutIntegrationInlineContentBuilder.cpp:
(WebCore::LayoutIntegration::InlineContentBuilder::createDisplayLines const):
* layout/layouttree/LayoutTreeBuilder.cpp:
(WebCore::Layout::showInlineTreeAndRuns):
* platform/graphics/FloatRect.h:
(WebCore::FloatRect::inflate):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorelayoutformattingContextsinlinedisplayInlineDisplayBoxh">trunk/Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayBox.h</a></li>
<li><a href="#trunkSourceWebCorelayoutformattingContextsinlinedisplayInlineDisplayContentBuildercpp">trunk/Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayContentBuilder.cpp</a></li>
<li><a href="#trunkSourceWebCorelayoutintegrationLayoutIntegrationBoxTreecpp">trunk/Source/WebCore/layout/integration/LayoutIntegrationBoxTree.cpp</a></li>
<li><a href="#trunkSourceWebCorelayoutintegrationLayoutIntegrationInlineContentBuildercpp">trunk/Source/WebCore/layout/integration/LayoutIntegrationInlineContentBuilder.cpp</a></li>
<li><a href="#trunkSourceWebCorelayoutlayouttreeLayoutTreeBuildercpp">trunk/Source/WebCore/layout/layouttree/LayoutTreeBuilder.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsFloatRecth">trunk/Source/WebCore/platform/graphics/FloatRect.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (287474 => 287475)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog   2021-12-28 20:36:28 UTC (rev 287474)
+++ trunk/Source/WebCore/ChangeLog      2021-12-28 21:16:11 UTC (rev 287475)
</span><span class="lines">@@ -1,3 +1,47 @@
</span><ins>+2021-12-28  Alan Bujtas  <zalan@apple.com>
+
+        [LFC][IFC] Do not let Layout geometry types leak into InlineDisplay::Box
+        https://bugs.webkit.org/show_bug.cgi?id=234728
+
+        Reviewed by Antti Koivisto.
+
+        InlineLayoutUnit -> float
+        InlineRect -> FloatRect
+        (This is also where we will eventually do some pixel snapping)
+
+        * layout/formattingContexts/inline/display/InlineDisplayBox.h:
+        (WebCore::InlineDisplay::Box::Box):
+        (WebCore::InlineDisplay::Box::rect const):
+        (WebCore::InlineDisplay::Box::inkOverflow 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::adjustInkOverflow):
+        (WebCore::InlineDisplay::Box::setLeft):
+        (WebCore::InlineDisplay::Box::setRight):
+        (WebCore::InlineDisplay::Box::setRect):
+        (WebCore::InlineDisplay::Box::truncate):
+        * layout/formattingContexts/inline/display/InlineDisplayContentBuilder.cpp:
+        (WebCore::Layout::computeBoxShadowInkOverflow):
+        (WebCore::Layout::InlineDisplayContentBuilder::appendAtomicInlineLevelDisplayBox):
+        (WebCore::Layout::InlineDisplayContentBuilder::appendInlineBoxDisplayBox):
+        (WebCore::Layout::InlineDisplayContentBuilder::appendSpanningInlineBoxDisplayBox):
+        (WebCore::Layout::InlineDisplayContentBuilder::adjustVisualGeometryForDisplayBox):
+        (WebCore::Layout::InlineDisplayContentBuilder::processOverflownRunsForEllipsis):
+        * layout/integration/LayoutIntegrationBoxTree.cpp:
+        (WebCore::LayoutIntegration::showInlineContent):
+        * layout/integration/LayoutIntegrationInlineContentBuilder.cpp:
+        (WebCore::LayoutIntegration::InlineContentBuilder::createDisplayLines const):
+        * layout/layouttree/LayoutTreeBuilder.cpp:
+        (WebCore::Layout::showInlineTreeAndRuns):
+        * platform/graphics/FloatRect.h:
+        (WebCore::FloatRect::inflate):
+
</ins><span class="cx"> 2021-12-28  Sam Weinig  <weinig@apple.com>
</span><span class="cx"> 
</span><span class="cx">         Support color interpolation methods for CSS Gradients
</span></span></pre></div>
<a id="trunkSourceWebCorelayoutformattingContextsinlinedisplayInlineDisplayBoxh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayBox.h (287474 => 287475)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayBox.h 2021-12-28 20:36:28 UTC (rev 287474)
+++ trunk/Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayBox.h    2021-12-28 21:16:11 UTC (rev 287475)
</span><span class="lines">@@ -74,7 +74,7 @@
</span><span class="cx">         First = 1 << 0,
</span><span class="cx">         Last  = 1 << 1
</span><span class="cx">     };
</span><del>-    Box(size_t lineIndex, Type, const Layout::Box&, UBiDiLevel, const Layout::InlineRect&, const Layout::InlineRect& inkOverflow, Expansion, std::optional<Text> = std::nullopt, bool hasContent = true, OptionSet<PositionWithinInlineLevelBox> = { });
</del><ins>+    Box(size_t lineIndex, Type, const Layout::Box&, UBiDiLevel, const FloatRect&, const FloatRect& inkOverflow, Expansion, std::optional<Text> = std::nullopt, bool hasContent = true, OptionSet<PositionWithinInlineLevelBox> = { });
</ins><span class="cx"> 
</span><span class="cx">     bool isText() const { return m_type == Type::Text; }
</span><span class="cx">     bool isEllipsis() const { return m_type == Type::Ellipsis; }
</span><span class="lines">@@ -95,42 +95,42 @@
</span><span class="cx"> 
</span><span class="cx">     bool hasContent() const { return m_hasContent; }
</span><span class="cx"> 
</span><del>-    const Layout::InlineRect& rect() const { return m_physicalRect; }
-    const Layout::InlineRect& inkOverflow() const { return m_inkOverflow; }
</del><ins>+    const FloatRect& rect() const { return m_physicalRect; }
+    const FloatRect& inkOverflow() const { return m_inkOverflow; }
</ins><span class="cx"> 
</span><del>-    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(); }
</del><ins>+    float top() const { return rect().y(); }
+    float bottom() const { return rect().maxY(); }
+    float left() const { return rect().x(); }
+    float right() const { return rect().maxX(); }
</ins><span class="cx"> 
</span><del>-    Layout::InlineLayoutUnit width() const { return rect().width(); }
-    Layout::InlineLayoutUnit height() const { return rect().height(); }
</del><ins>+    float width() const { return rect().width(); }
+    float height() const { return rect().height(); }
</ins><span class="cx"> 
</span><del>-    void moveVertically(Layout::InlineLayoutUnit offset)
</del><ins>+    void moveVertically(float offset)
</ins><span class="cx">     {
</span><del>-        m_physicalRect.moveVertically(offset);
-        m_inkOverflow.moveVertically(offset);
</del><ins>+        m_physicalRect.move({ { }, offset });
+        m_inkOverflow.move({ { }, offset });
</ins><span class="cx">     }
</span><del>-    void moveHorizontally(Layout::InlineLayoutUnit offset)
</del><ins>+    void moveHorizontally(float offset)
</ins><span class="cx">     {
</span><del>-        m_physicalRect.moveHorizontally(offset);
-        m_inkOverflow.moveHorizontally(offset);
</del><ins>+        m_physicalRect.move({ offset, { } });
+        m_inkOverflow.move({ offset, { } });
</ins><span class="cx">     }
</span><del>-    void adjustInkOverflow(const Layout::InlineRect& childBorderBox) { return m_inkOverflow.expandToContain(childBorderBox); }
-    void truncate(Layout::InlineLayoutUnit truncatedwidth = 0.f);
-    void setLeft(Layout::InlineLayoutUnit pysicalLeft)
</del><ins>+    void adjustInkOverflow(const FloatRect& childBorderBox) { return m_inkOverflow.uniteEvenIfEmpty(childBorderBox); }
+    void truncate(float truncatedwidth = 0.f);
+    void setLeft(float pysicalLeft)
</ins><span class="cx">     {
</span><span class="cx">         auto offset = pysicalLeft - left();
</span><del>-        m_physicalRect.setLeft(pysicalLeft);
-        m_inkOverflow.setLeft(m_inkOverflow.left() + offset);
</del><ins>+        m_physicalRect.setX(pysicalLeft);
+        m_inkOverflow.setX(m_inkOverflow.x() + offset);
</ins><span class="cx">     }
</span><del>-    void setRight(Layout::InlineLayoutUnit physicalRight)
</del><ins>+    void setRight(float physicalRight)
</ins><span class="cx">     {
</span><span class="cx">         auto offset = physicalRight - right();
</span><del>-        m_physicalRect.setRight(physicalRight);
-        m_inkOverflow.setRight(m_inkOverflow.right() + offset);
</del><ins>+        m_physicalRect.shiftMaxXEdgeTo(physicalRight);
+        m_inkOverflow.shiftMaxXEdgeTo(m_inkOverflow.maxY() + offset);
</ins><span class="cx">     }
</span><del>-    void setRect(const Layout::InlineRect& rect, const Layout::InlineRect& inkOverflow)
</del><ins>+    void setRect(const FloatRect& rect, const FloatRect& inkOverflow)
</ins><span class="cx">     {
</span><span class="cx">         m_physicalRect = rect;
</span><span class="cx">         m_inkOverflow = inkOverflow;
</span><span class="lines">@@ -142,7 +142,7 @@
</span><span class="cx"> 
</span><span class="cx">     struct Expansion {
</span><span class="cx">         ExpansionBehavior behavior { DefaultExpansion };
</span><del>-        Layout::InlineLayoutUnit horizontalExpansion { 0 };
</del><ins>+        float horizontalExpansion { 0 };
</ins><span class="cx">     };
</span><span class="cx">     Expansion expansion() const { return m_expansion; }
</span><span class="cx"> 
</span><span class="lines">@@ -163,8 +163,8 @@
</span><span class="cx">     const Type m_type { Type::GenericInlineLevelBox };
</span><span class="cx">     CheckedRef<const Layout::Box> m_layoutBox;
</span><span class="cx">     UBiDiLevel m_bidiLevel { UBIDI_DEFAULT_LTR };
</span><del>-    Layout::InlineRect m_physicalRect;
-    Layout::InlineRect m_inkOverflow;
</del><ins>+    FloatRect m_physicalRect;
+    FloatRect m_inkOverflow;
</ins><span class="cx">     bool m_hasContent : 1;
</span><span class="cx">     bool m_isFirstForLayoutBox : 1;
</span><span class="cx">     bool m_isLastForLayoutBox : 1;
</span><span class="lines">@@ -172,7 +172,7 @@
</span><span class="cx">     std::optional<Text> m_text;
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-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)
</del><ins>+inline Box::Box(size_t lineIndex, Type type, const Layout::Box& layoutBox, UBiDiLevel bidiLevel, const FloatRect& physicalRect, const FloatRect& inkOverflow, Expansion expansion, std::optional<Text> text, bool hasContent, OptionSet<PositionWithinInlineLevelBox> positionWithinInlineLevelBox)
</ins><span class="cx">     : m_lineIndex(lineIndex)
</span><span class="cx">     , m_type(type)
</span><span class="cx">     , m_layoutBox(layoutBox)
</span><span class="lines">@@ -196,10 +196,10 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline void Box::truncate(Layout::InlineLayoutUnit truncatedwidth)
</del><ins>+inline void Box::truncate(float truncatedwidth)
</ins><span class="cx"> {
</span><span class="cx">     m_physicalRect.setWidth(truncatedwidth);
</span><del>-    m_inkOverflow.setRight(m_physicalRect.right());
</del><ins>+    m_inkOverflow.shiftMaxXEdgeTo(m_physicalRect.maxY());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorelayoutformattingContextsinlinedisplayInlineDisplayContentBuildercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayContentBuilder.cpp (287474 => 287475)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayContentBuilder.cpp    2021-12-28 20:36:28 UTC (rev 287474)
+++ trunk/Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayContentBuilder.cpp       2021-12-28 21:16:11 UTC (rev 287475)
</span><span class="lines">@@ -109,7 +109,7 @@
</span><span class="cx">     return boxes;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static inline bool computeBoxShadowInkOverflow(const RenderStyle& style, InlineRect& inkOverflow)
</del><ins>+static inline bool computeBoxShadowInkOverflow(const RenderStyle& style, FloatRect& inkOverflow)
</ins><span class="cx"> {
</span><span class="cx">     auto topBoxShadow = LayoutUnit { };
</span><span class="cx">     auto bottomBoxShadow = LayoutUnit { };
</span><span class="lines">@@ -120,7 +120,7 @@
</span><span class="cx">     style.getBoxShadowInlineDirectionExtent(leftBoxShadow, rightBoxShadow);
</span><span class="cx">     if (!topBoxShadow && !bottomBoxShadow && !leftBoxShadow && !rightBoxShadow)
</span><span class="cx">         return false;
</span><del>-    inkOverflow.inflate(InlineLayoutUnit { topBoxShadow }, InlineLayoutUnit { rightBoxShadow }, InlineLayoutUnit { bottomBoxShadow }, InlineLayoutUnit { leftBoxShadow });
</del><ins>+    inkOverflow.inflate(leftBoxShadow.toFloat(), topBoxShadow.toFloat(), rightBoxShadow.toFloat(), bottomBoxShadow.toFloat());
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -206,7 +206,7 @@
</span><span class="cx"> 
</span><span class="cx">     auto& layoutBox = lineRun.layoutBox();
</span><span class="cx">     auto inkOverflow = [&] {
</span><del>-        auto inkOverflow = borderBoxRect;
</del><ins>+        auto inkOverflow = FloatRect { borderBoxRect };
</ins><span class="cx">         computeBoxShadowInkOverflow(!m_lineIndex ? layoutBox.firstLineStyle() : layoutBox.style(), inkOverflow);
</span><span class="cx">         // Atomic inline box contribute to their inline box parents ink overflow at all times (e.g. <span><img></span>).
</span><span class="cx">         m_contentHasInkOverflow = m_contentHasInkOverflow || &layoutBox.parent() != &root();
</span><span class="lines">@@ -256,7 +256,7 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     auto inkOverflow = [&] {
</span><del>-        auto inkOverflow = inlineBoxBorderBox;
</del><ins>+        auto inkOverflow = FloatRect { inlineBoxBorderBox };
</ins><span class="cx">         m_contentHasInkOverflow = computeBoxShadowInkOverflow(!m_lineIndex ? layoutBox.firstLineStyle() : layoutBox.style(), inkOverflow) || m_contentHasInkOverflow;
</span><span class="cx">         return inkOverflow;
</span><span class="cx">     };
</span><span class="lines">@@ -283,7 +283,7 @@
</span><span class="cx"> 
</span><span class="cx">     auto& layoutBox = lineRun.layoutBox();
</span><span class="cx">     auto inkOverflow = [&] {
</span><del>-        auto inkOverflow = inlineBoxBorderBox;
</del><ins>+        auto inkOverflow = FloatRect { inlineBoxBorderBox };
</ins><span class="cx">         m_contentHasInkOverflow = computeBoxShadowInkOverflow(!m_lineIndex ? layoutBox.firstLineStyle() : layoutBox.style(), inkOverflow) || m_contentHasInkOverflow;
</span><span class="cx">         return inkOverflow;
</span><span class="cx">     };
</span><span class="lines">@@ -523,7 +523,7 @@
</span><span class="cx">     afterInlineBoxContent();
</span><span class="cx"> 
</span><span class="cx">     auto computeInkOverflow = [&] {
</span><del>-        auto inkOverflow = displayBox.rect();
</del><ins>+        auto inkOverflow = FloatRect { displayBox.rect() };
</ins><span class="cx">         m_contentHasInkOverflow = computeBoxShadowInkOverflow(!m_lineIndex ? layoutBox.firstLineStyle() : layoutBox.style(), inkOverflow) || m_contentHasInkOverflow;
</span><span class="cx">         displayBox.adjustInkOverflow(inkOverflow);
</span><span class="cx">     };
</span><span class="lines">@@ -659,8 +659,7 @@
</span><span class="cx">     auto& rootInlineBox = boxes[0];
</span><span class="cx">     ASSERT(rootInlineBox.isRootInlineBox());
</span><span class="cx"> 
</span><del>-    auto rootInlineBoxRect = rootInlineBox.rect();
-    if (rootInlineBoxRect.right() <= lineBoxRight) {
</del><ins>+    if (rootInlineBox.right() <= lineBoxRight) {
</ins><span class="cx">         ASSERT(boxes.last().right() <= lineBoxRight);
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="lines">@@ -705,7 +704,7 @@
</span><span class="cx">     for (auto index = firstTruncatedBoxIndex + 1; index < boxes.size(); ++index)
</span><span class="cx">         boxes[index].moveHorizontally(contentRight - boxes[index].left());
</span><span class="cx">     // And append the ellipsis box as the trailing item.
</span><del>-    auto ellispisBoxRect = InlineRect { rootInlineBoxRect.top(), contentRight, ellipsisWidth, rootInlineBoxRect.height() };
</del><ins>+    auto ellispisBoxRect = InlineRect { rootInlineBox.top(), contentRight, ellipsisWidth, rootInlineBox.height() };
</ins><span class="cx">     boxes.append({ m_lineIndex
</span><span class="cx">         , InlineDisplay::Box::Type::Ellipsis
</span><span class="cx">         , root()
</span></span></pre></div>
<a id="trunkSourceWebCorelayoutintegrationLayoutIntegrationBoxTreecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/layout/integration/LayoutIntegrationBoxTree.cpp (287474 => 287475)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/layout/integration/LayoutIntegrationBoxTree.cpp     2021-12-28 20:36:28 UTC (rev 287474)
+++ trunk/Source/WebCore/layout/integration/LayoutIntegrationBoxTree.cpp        2021-12-28 21:16:11 UTC (rev 287475)
</span><span class="lines">@@ -284,7 +284,7 @@
</span><span class="cx">             else
</span><span class="cx">                 stream << "Generic inline level box";
</span><span class="cx">             stream
</span><del>-                << " at (" << rect.left() << "," << rect.top() << ")"
</del><ins>+                << " at (" << rect.x() << "," << rect.y() << ")"
</ins><span class="cx">                 << " size (" << rect.width() << "x" << rect.height() << ")";
</span><span class="cx">             stream.nextLine();
</span><span class="cx">         };
</span></span></pre></div>
<a id="trunkSourceWebCorelayoutintegrationLayoutIntegrationInlineContentBuildercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/layout/integration/LayoutIntegrationInlineContentBuilder.cpp (287474 => 287475)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/layout/integration/LayoutIntegrationInlineContentBuilder.cpp        2021-12-28 20:36:28 UTC (rev 287474)
+++ trunk/Source/WebCore/layout/integration/LayoutIntegrationInlineContentBuilder.cpp   2021-12-28 21:16:11 UTC (rev 287475)
</span><span class="lines">@@ -108,14 +108,13 @@
</span><span class="cx">             if (layoutBox.isReplacedBox()) {
</span><span class="cx">                 // Similar to LegacyInlineFlowBox::addReplacedChildOverflow.
</span><span class="cx">                 auto& renderer = downcast<RenderBox>(m_boxTree.rendererForLayoutBox(layoutBox));
</span><del>-                auto boxRect = box.rect();
</del><span class="cx">                 if (!renderer.hasSelfPaintingLayer()) {
</span><span class="cx">                     auto childInkOverflow = renderer.logicalVisualOverflowRectForPropagation(&renderer.parent()->style());
</span><del>-                    childInkOverflow.move(boxRect.left(), boxRect.top());
</del><ins>+                    childInkOverflow.move(box.left(), box.top());
</ins><span class="cx">                     lineInkOverflowRect.unite(childInkOverflow);
</span><span class="cx">                 }
</span><span class="cx">                 auto childScrollableOverflow = renderer.logicalLayoutOverflowRectForPropagation(&renderer.parent()->style());
</span><del>-                childScrollableOverflow.move(boxRect.left(), boxRect.top());
</del><ins>+                childScrollableOverflow.move(box.left(), box.top());
</ins><span class="cx">                 scrollableOverflowRect.unite(childScrollableOverflow);
</span><span class="cx">             }
</span><span class="cx">         }
</span></span></pre></div>
<a id="trunkSourceWebCorelayoutlayouttreeLayoutTreeBuildercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/layout/layouttree/LayoutTreeBuilder.cpp (287474 => 287475)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/layout/layouttree/LayoutTreeBuilder.cpp     2021-12-28 20:36:28 UTC (rev 287474)
+++ trunk/Source/WebCore/layout/layouttree/LayoutTreeBuilder.cpp        2021-12-28 21:16:11 UTC (rev 287475)
</span><span class="lines">@@ -397,7 +397,7 @@
</span><span class="cx">             else
</span><span class="cx">                 stream << "Generic inline level box";
</span><span class="cx">             stream
</span><del>-                << " at (" << rect.left() << "," << rect.top() << ")"
</del><ins>+                << " at (" << rect.x() << "," << rect.y() << ")"
</ins><span class="cx">                 << " size (" << rect.width() << "x" << rect.height() << ")";
</span><span class="cx">             stream.nextLine();
</span><span class="cx">         };
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsFloatRecth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/FloatRect.h (287474 => 287475)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/FloatRect.h       2021-12-28 20:36:28 UTC (rev 287474)
+++ trunk/Source/WebCore/platform/graphics/FloatRect.h  2021-12-28 21:16:11 UTC (rev 287475)
</span><span class="lines">@@ -196,6 +196,7 @@
</span><span class="cx">     }
</span><span class="cx">     void inflate(float d) { inflateX(d); inflateY(d); }
</span><span class="cx">     void inflate(FloatSize size) { inflateX(size.width()); inflateY(size.height()); }
</span><ins>+    void inflate(float dx, float dy, float dmaxX, float dmaxY);
</ins><span class="cx"> 
</span><span class="cx">     void scale(float s) { scale(s, s); }
</span><span class="cx">     WEBCORE_EXPORT void scale(float sx, float sy);
</span><span class="lines">@@ -294,6 +295,14 @@
</span><span class="cx">     return *this == infiniteRect();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+inline void FloatRect::inflate(float deltaX, float deltaY, float deltaMaxX, float deltaMaxY)
+{
+    setX(x() - deltaX);
+    setY(y() - deltaY);
+    setWidth(width() + deltaX + deltaMaxX);
+    setHeight(height() + deltaY + deltaMaxY);
+}
+
</ins><span class="cx"> FloatRect normalizeRect(const FloatRect&);
</span><span class="cx"> WEBCORE_EXPORT FloatRect encloseRectToDevicePixels(const FloatRect&, float deviceScaleFactor);
</span><span class="cx"> WEBCORE_EXPORT IntRect enclosingIntRect(const FloatRect&);
</span></span></pre>
</div>
</div>

</body>
</html>