<!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>[266048] 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/266048">266048</a></dd>
<dt>Author</dt> <dd>zalan@apple.com</dd>
<dt>Date</dt> <dd>2020-08-23 10:06:37 -0700 (Sun, 23 Aug 2020)</dd>
</dl>

<h3>Log Message</h3>
<pre>[LFC][IFC] Introduce the root inline box
https://bugs.webkit.org/show_bug.cgi?id=214733

Reviewed by Antti Koivisto.

This is in preparation for having a dedicated line box for each line with inline boxes inside.
At this point we only use the root inline box to proxy the baseline handling.
See https://www.w3.org/TR/css-inline-3/#model

* layout/inlineformatting/InlineLineBox.h:
(WebCore::Layout::LineBox::InlineBox::Baseline::height const):
(WebCore::Layout::LineBox::LineBox):
(WebCore::Layout::LineBox::InlineBox::InlineBox):
(WebCore::Layout::LineBox::setLogicalHeightIfGreater):
(WebCore::Layout::LineBox::baseline const):
(WebCore::Layout::LineBox::setBaselineOffsetIfGreater):
(WebCore::Layout::LineBox::setAscentIfGreater):
(WebCore::Layout::LineBox::setDescentIfGreater):
(WebCore::Layout::LineBox::baselineOffset const):
(WebCore::Layout::LineBox::resetBaseline):
(WebCore::Layout::LineBox::InlineBox::Baseline::Baseline):
(WebCore::Layout::LineBox::InlineBox::Baseline::setAscent):
(WebCore::Layout::LineBox::InlineBox::Baseline::setDescent):
(WebCore::Layout::LineBox::InlineBox::Baseline::reset):
(WebCore::Layout::LineBox::InlineBox::Baseline::ascent const):
(WebCore::Layout::LineBox::InlineBox::Baseline::descent const):
(WebCore::Layout::InlineBox::Baseline::height const): Deleted.
(WebCore::Layout::InlineBox::logicalRect const): Deleted.
(WebCore::Layout::InlineBox::scrollableOverflow const): Deleted.
(WebCore::Layout::InlineBox::logicalLeft const): Deleted.
(WebCore::Layout::InlineBox::logicalRight const): Deleted.
(WebCore::Layout::InlineBox::logicalTop const): Deleted.
(WebCore::Layout::InlineBox::logicalBottom const): Deleted.
(WebCore::Layout::InlineBox::logicalWidth const): Deleted.
(WebCore::Layout::InlineBox::logicalHeight const): Deleted.
(WebCore::Layout::InlineBox::resetDescent): Deleted.
(WebCore::Layout::InlineBox::setLogicalHeight): Deleted.
(WebCore::Layout::InlineBox::setLogicalWidth): Deleted.
(WebCore::Layout::InlineBox::setScrollableOverflow): Deleted.
(WebCore::Layout::InlineBox::moveHorizontally): Deleted.
(WebCore::Layout::InlineBox::expandHorizontally): Deleted.
(WebCore::Layout::InlineBox::shrinkHorizontally): Deleted.
(WebCore::Layout::InlineBox::expandVertically): Deleted.
(WebCore::Layout::InlineBox::shrinkVertically): Deleted.
(WebCore::Layout::InlineBox::isConsideredEmpty const): Deleted.
(WebCore::Layout::InlineBox::setIsConsideredEmpty): Deleted.
(WebCore::Layout::InlineBox::setIsConsideredNonEmpty): Deleted.
(WebCore::Layout::InlineBox::InlineBox): Deleted.
(WebCore::Layout::InlineBox::setLogicalHeightIfGreater): Deleted.
(WebCore::Layout::InlineBox::baseline const): Deleted.
(WebCore::Layout::InlineBox::setBaselineOffsetIfGreater): Deleted.
(WebCore::Layout::InlineBox::setAscentIfGreater): Deleted.
(WebCore::Layout::InlineBox::setDescentIfGreater): Deleted.
(WebCore::Layout::InlineBox::baselineOffset const): Deleted.
(WebCore::Layout::InlineBox::resetBaseline): Deleted.
(WebCore::Layout::InlineBox::Baseline::Baseline): Deleted.
(WebCore::Layout::InlineBox::Baseline::setAscent): Deleted.
(WebCore::Layout::InlineBox::Baseline::setDescent): Deleted.
(WebCore::Layout::InlineBox::Baseline::reset): Deleted.
(WebCore::Layout::InlineBox::Baseline::ascent const): Deleted.
(WebCore::Layout::InlineBox::Baseline::descent const): Deleted.
* layout/inlineformatting/InlineLineBuilder.cpp:
(WebCore::Layout::LineBuilder::initialize):
(WebCore::Layout::LineBuilder::halfLeadingMetrics):
* layout/inlineformatting/InlineLineBuilder.h:
(WebCore::Layout::LineBuilder::lineBox const):
* layout/inlineformatting/LineLayoutContext.h:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorelayoutinlineformattingInlineFormattingContextQuirkscpp">trunk/Source/WebCore/layout/inlineformatting/InlineFormattingContextQuirks.cpp</a></li>
<li><a href="#trunkSourceWebCorelayoutinlineformattingInlineLineBoxh">trunk/Source/WebCore/layout/inlineformatting/InlineLineBox.h</a></li>
<li><a href="#trunkSourceWebCorelayoutinlineformattingInlineLineBuildercpp">trunk/Source/WebCore/layout/inlineformatting/InlineLineBuilder.cpp</a></li>
<li><a href="#trunkSourceWebCorelayoutinlineformattingInlineLineBuilderh">trunk/Source/WebCore/layout/inlineformatting/InlineLineBuilder.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (266047 => 266048)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog   2020-08-23 13:53:04 UTC (rev 266047)
+++ trunk/Source/WebCore/ChangeLog      2020-08-23 17:06:37 UTC (rev 266048)
</span><span class="lines">@@ -1,5 +1,75 @@
</span><span class="cx"> 2020-08-23  Zalan Bujtas  <zalan@apple.com>
</span><span class="cx"> 
</span><ins>+        [LFC][IFC] Introduce the root inline box
+        https://bugs.webkit.org/show_bug.cgi?id=214733
+
+        Reviewed by Antti Koivisto.
+
+        This is in preparation for having a dedicated line box for each line with inline boxes inside.
+        At this point we only use the root inline box to proxy the baseline handling. 
+        See https://www.w3.org/TR/css-inline-3/#model
+
+        * layout/inlineformatting/InlineLineBox.h:
+        (WebCore::Layout::LineBox::InlineBox::Baseline::height const):
+        (WebCore::Layout::LineBox::LineBox):
+        (WebCore::Layout::LineBox::InlineBox::InlineBox):
+        (WebCore::Layout::LineBox::setLogicalHeightIfGreater):
+        (WebCore::Layout::LineBox::baseline const):
+        (WebCore::Layout::LineBox::setBaselineOffsetIfGreater):
+        (WebCore::Layout::LineBox::setAscentIfGreater):
+        (WebCore::Layout::LineBox::setDescentIfGreater):
+        (WebCore::Layout::LineBox::baselineOffset const):
+        (WebCore::Layout::LineBox::resetBaseline):
+        (WebCore::Layout::LineBox::InlineBox::Baseline::Baseline):
+        (WebCore::Layout::LineBox::InlineBox::Baseline::setAscent):
+        (WebCore::Layout::LineBox::InlineBox::Baseline::setDescent):
+        (WebCore::Layout::LineBox::InlineBox::Baseline::reset):
+        (WebCore::Layout::LineBox::InlineBox::Baseline::ascent const):
+        (WebCore::Layout::LineBox::InlineBox::Baseline::descent const):
+        (WebCore::Layout::InlineBox::Baseline::height const): Deleted.
+        (WebCore::Layout::InlineBox::logicalRect const): Deleted.
+        (WebCore::Layout::InlineBox::scrollableOverflow const): Deleted.
+        (WebCore::Layout::InlineBox::logicalLeft const): Deleted.
+        (WebCore::Layout::InlineBox::logicalRight const): Deleted.
+        (WebCore::Layout::InlineBox::logicalTop const): Deleted.
+        (WebCore::Layout::InlineBox::logicalBottom const): Deleted.
+        (WebCore::Layout::InlineBox::logicalWidth const): Deleted.
+        (WebCore::Layout::InlineBox::logicalHeight const): Deleted.
+        (WebCore::Layout::InlineBox::resetDescent): Deleted.
+        (WebCore::Layout::InlineBox::setLogicalHeight): Deleted.
+        (WebCore::Layout::InlineBox::setLogicalWidth): Deleted.
+        (WebCore::Layout::InlineBox::setScrollableOverflow): Deleted.
+        (WebCore::Layout::InlineBox::moveHorizontally): Deleted.
+        (WebCore::Layout::InlineBox::expandHorizontally): Deleted.
+        (WebCore::Layout::InlineBox::shrinkHorizontally): Deleted.
+        (WebCore::Layout::InlineBox::expandVertically): Deleted.
+        (WebCore::Layout::InlineBox::shrinkVertically): Deleted.
+        (WebCore::Layout::InlineBox::isConsideredEmpty const): Deleted.
+        (WebCore::Layout::InlineBox::setIsConsideredEmpty): Deleted.
+        (WebCore::Layout::InlineBox::setIsConsideredNonEmpty): Deleted.
+        (WebCore::Layout::InlineBox::InlineBox): Deleted.
+        (WebCore::Layout::InlineBox::setLogicalHeightIfGreater): Deleted.
+        (WebCore::Layout::InlineBox::baseline const): Deleted.
+        (WebCore::Layout::InlineBox::setBaselineOffsetIfGreater): Deleted.
+        (WebCore::Layout::InlineBox::setAscentIfGreater): Deleted.
+        (WebCore::Layout::InlineBox::setDescentIfGreater): Deleted.
+        (WebCore::Layout::InlineBox::baselineOffset const): Deleted.
+        (WebCore::Layout::InlineBox::resetBaseline): Deleted.
+        (WebCore::Layout::InlineBox::Baseline::Baseline): Deleted.
+        (WebCore::Layout::InlineBox::Baseline::setAscent): Deleted.
+        (WebCore::Layout::InlineBox::Baseline::setDescent): Deleted.
+        (WebCore::Layout::InlineBox::Baseline::reset): Deleted.
+        (WebCore::Layout::InlineBox::Baseline::ascent const): Deleted.
+        (WebCore::Layout::InlineBox::Baseline::descent const): Deleted.
+        * layout/inlineformatting/InlineLineBuilder.cpp:
+        (WebCore::Layout::LineBuilder::initialize):
+        (WebCore::Layout::LineBuilder::halfLeadingMetrics):
+        * layout/inlineformatting/InlineLineBuilder.h:
+        (WebCore::Layout::LineBuilder::lineBox const):
+        * layout/inlineformatting/LineLayoutContext.h:
+
+2020-08-23  Zalan Bujtas  <zalan@apple.com>
+
</ins><span class="cx">         [LFC][IFC] Display::LineBox does not need ascent/descent geometry
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=214720
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorelayoutinlineformattingInlineFormattingContextQuirkscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/layout/inlineformatting/InlineFormattingContextQuirks.cpp (266047 => 266048)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/layout/inlineformatting/InlineFormattingContextQuirks.cpp   2020-08-23 13:53:04 UTC (rev 266047)
+++ trunk/Source/WebCore/layout/inlineformatting/InlineFormattingContextQuirks.cpp      2020-08-23 17:06:37 UTC (rev 266048)
</span><span class="lines">@@ -83,12 +83,12 @@
</span><span class="cx">     auto lineHeight = formattingRoot.style().lineHeight();
</span><span class="cx">     if (lineHeight.isPercentOrCalculated()) {
</span><span class="cx">         auto initialBaselineOffset = LineBuilder::halfLeadingMetrics(formattingRoot.style().fontMetrics(), 0_lu).ascent();
</span><del>-        return { initialBaselineOffset, initialBaselineOffset, LineBox::Baseline { strutBaselineOffset, strutHeight - strutBaselineOffset } };
</del><ins>+        return { initialBaselineOffset, initialBaselineOffset, LineBox::InlineBox::Baseline { strutBaselineOffset, strutHeight - strutBaselineOffset } };
</ins><span class="cx">     }
</span><span class="cx">     // FIXME: The only reason why we use intValue() here is to match current inline tree (integral)behavior.
</span><span class="cx">     InlineLayoutUnit initialLineHeight = lineHeight.intValue();
</span><span class="cx">     auto initialBaselineOffset = LineBuilder::halfLeadingMetrics(formattingRoot.style().fontMetrics(), initialLineHeight).ascent();
</span><del>-    return { initialLineHeight, initialBaselineOffset, LineBox::Baseline { strutBaselineOffset, strutHeight - strutBaselineOffset } };
</del><ins>+    return { initialLineHeight, initialBaselineOffset, LineBox::InlineBox::Baseline { strutBaselineOffset, strutHeight - strutBaselineOffset } };
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorelayoutinlineformattingInlineLineBoxh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/layout/inlineformatting/InlineLineBox.h (266047 => 266048)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/layout/inlineformatting/InlineLineBox.h     2020-08-23 13:53:04 UTC (rev 266047)
+++ trunk/Source/WebCore/layout/inlineformatting/InlineLineBox.h        2020-08-23 17:06:37 UTC (rev 266048)
</span><span class="lines">@@ -36,29 +36,35 @@
</span><span class="cx"> class LineBox {
</span><span class="cx">     WTF_MAKE_FAST_ALLOCATED;
</span><span class="cx"> public:
</span><del>-    struct Baseline {
-        Baseline(InlineLayoutUnit ascent, InlineLayoutUnit descent);
-        Baseline() = default;
</del><ins>+    struct InlineBox {
+        struct Baseline {
+            Baseline(InlineLayoutUnit ascent, InlineLayoutUnit descent);
+            Baseline() = default;
</ins><span class="cx"> 
</span><del>-        void setAscent(InlineLayoutUnit);
-        void setDescent(InlineLayoutUnit);
</del><ins>+            void setAscent(InlineLayoutUnit);
+            void setDescent(InlineLayoutUnit);
</ins><span class="cx"> 
</span><del>-        void reset();
</del><ins>+            void reset();
</ins><span class="cx"> 
</span><del>-        InlineLayoutUnit height() const { return ascent() + descent(); }
-        InlineLayoutUnit ascent() const;
-        InlineLayoutUnit descent() const;
</del><ins>+            InlineLayoutUnit height() const { return ascent() + descent(); }
+            InlineLayoutUnit ascent() const;
+            InlineLayoutUnit descent() const;
</ins><span class="cx"> 
</span><del>-    private:
</del><ins>+        private:
</ins><span class="cx"> #if ASSERT_ENABLED
</span><del>-        bool m_hasValidAscent { false };
-        bool m_hasValidDescent { false };
</del><ins>+            bool m_hasValidAscent { false };
+            bool m_hasValidDescent { false };
</ins><span class="cx"> #endif
</span><del>-        InlineLayoutUnit m_ascent { 0 };
-        InlineLayoutUnit m_descent { 0 };
</del><ins>+            InlineLayoutUnit m_ascent { 0 };
+            InlineLayoutUnit m_descent { 0 };
+        };
+        InlineBox(const Baseline&);
+        InlineBox() = default;
+
+        Baseline baseline;
</ins><span class="cx">     };
</span><span class="cx"> 
</span><del>-    LineBox(const Display::InlineRect&, const Baseline&, InlineLayoutUnit baselineOffset);
</del><ins>+    LineBox(const Display::InlineRect&, const InlineBox::Baseline&, InlineLayoutUnit baselineOffset);
</ins><span class="cx">     LineBox() = default;
</span><span class="cx"> 
</span><span class="cx">     const Display::InlineRect& logicalRect() const { return m_rect; }
</span><span class="lines">@@ -72,7 +78,7 @@
</span><span class="cx">     InlineLayoutUnit logicalWidth() const { return m_rect.width(); }
</span><span class="cx">     InlineLayoutUnit logicalHeight() const { return m_rect.height(); }
</span><span class="cx"> 
</span><del>-    const Baseline& baseline() const;
</del><ins>+    const InlineBox::Baseline& baseline() const;
</ins><span class="cx">     // Baseline offset from line logical top. Note that offset does not necessarily equal to ascent.
</span><span class="cx">     //
</span><span class="cx">     // -------------------    line logical top     ------------------- (top align)
</span><span class="lines">@@ -94,7 +100,7 @@
</span><span class="cx">     void setDescentIfGreater(InlineLayoutUnit);
</span><span class="cx"> 
</span><span class="cx">     void resetBaseline();
</span><del>-    void resetDescent() { m_baseline.setDescent(0_lu); }
</del><ins>+    void resetDescent() { m_rootInlineBox.baseline.setDescent(0_lu); }
</ins><span class="cx"> 
</span><span class="cx">     void setLogicalHeight(InlineLayoutUnit logicalHeight) { m_rect.setHeight(logicalHeight); }
</span><span class="cx"> 
</span><span class="lines">@@ -128,15 +134,15 @@
</span><span class="cx"> #endif
</span><span class="cx">     Display::InlineRect m_rect;
</span><span class="cx">     Display::InlineRect m_scrollableOverflow;
</span><del>-    Baseline m_baseline;
</del><span class="cx">     InlineLayoutUnit m_baselineOffset { 0 };
</span><span class="cx">     bool m_isConsideredEmpty { true };
</span><ins>+    InlineBox m_rootInlineBox;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><del>-inline LineBox::LineBox(const Display::InlineRect& rect, const Baseline& baseline, InlineLayoutUnit baselineOffset)
</del><ins>+inline LineBox::LineBox(const Display::InlineRect& rect, const InlineBox::Baseline& baseline, InlineLayoutUnit baselineOffset)
</ins><span class="cx">     : m_rect(rect)
</span><del>-    , m_baseline(baseline)
</del><span class="cx">     , m_baselineOffset(baselineOffset)
</span><ins>+    , m_rootInlineBox(baseline)
</ins><span class="cx"> {
</span><span class="cx"> #if ASSERT_ENABLED
</span><span class="cx">     m_hasValidBaseline = true;
</span><span class="lines">@@ -144,6 +150,11 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+inline LineBox::InlineBox::InlineBox(const Baseline& baseline)
+    : baseline(baseline)
+{
+}
+
</ins><span class="cx"> inline void LineBox::setLogicalHeightIfGreater(InlineLayoutUnit logicalHeight)
</span><span class="cx"> {
</span><span class="cx">     if (logicalHeight <= m_rect.height())
</span><span class="lines">@@ -151,10 +162,10 @@
</span><span class="cx">     m_rect.setHeight(logicalHeight);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline const LineBox::Baseline& LineBox::baseline() const
</del><ins>+inline const LineBox::InlineBox::Baseline& LineBox::baseline() const
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(m_hasValidBaseline);
</span><del>-    return m_baseline;
</del><ins>+    return m_rootInlineBox.baseline;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> inline void LineBox::setBaselineOffsetIfGreater(InlineLayoutUnit baselineOffset)
</span><span class="lines">@@ -167,17 +178,17 @@
</span><span class="cx"> 
</span><span class="cx"> inline void LineBox::setAscentIfGreater(InlineLayoutUnit ascent)
</span><span class="cx"> {
</span><del>-    if (ascent < m_baseline.ascent())
</del><ins>+    if (ascent < m_rootInlineBox.baseline.ascent())
</ins><span class="cx">         return;
</span><span class="cx">     setBaselineOffsetIfGreater(ascent);
</span><del>-    m_baseline.setAscent(ascent);
</del><ins>+    m_rootInlineBox.baseline.setAscent(ascent);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> inline void LineBox::setDescentIfGreater(InlineLayoutUnit descent)
</span><span class="cx"> {
</span><del>-    if (descent < m_baseline.descent())
</del><ins>+    if (descent < m_rootInlineBox.baseline.descent())
</ins><span class="cx">         return;
</span><del>-    m_baseline.setDescent(descent);
</del><ins>+    m_rootInlineBox.baseline.setDescent(descent);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> inline InlineLayoutUnit LineBox::baselineOffset() const
</span><span class="lines">@@ -192,10 +203,10 @@
</span><span class="cx">     m_hasValidBaselineOffset = true;
</span><span class="cx"> #endif
</span><span class="cx">     m_baselineOffset = 0_lu;
</span><del>-    m_baseline.reset();
</del><ins>+    m_rootInlineBox.baseline.reset();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline LineBox::Baseline::Baseline(InlineLayoutUnit ascent, InlineLayoutUnit descent)
</del><ins>+inline LineBox::InlineBox::Baseline::Baseline(InlineLayoutUnit ascent, InlineLayoutUnit descent)
</ins><span class="cx">     : m_ascent(ascent)
</span><span class="cx">     , m_descent(descent)
</span><span class="cx"> {
</span><span class="lines">@@ -205,7 +216,7 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline void LineBox::Baseline::setAscent(InlineLayoutUnit ascent)
</del><ins>+inline void LineBox::InlineBox::Baseline::setAscent(InlineLayoutUnit ascent)
</ins><span class="cx"> {
</span><span class="cx"> #if ASSERT_ENABLED
</span><span class="cx">     m_hasValidAscent = true;
</span><span class="lines">@@ -213,7 +224,7 @@
</span><span class="cx">     m_ascent = ascent;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline void LineBox::Baseline::setDescent(InlineLayoutUnit descent)
</del><ins>+inline void LineBox::InlineBox::Baseline::setDescent(InlineLayoutUnit descent)
</ins><span class="cx"> {
</span><span class="cx"> #if ASSERT_ENABLED
</span><span class="cx">     m_hasValidDescent = true;
</span><span class="lines">@@ -221,7 +232,7 @@
</span><span class="cx">     m_descent = descent;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline void LineBox::Baseline::reset()
</del><ins>+inline void LineBox::InlineBox::Baseline::reset()
</ins><span class="cx"> {
</span><span class="cx"> #if ASSERT_ENABLED
</span><span class="cx">     m_hasValidAscent = true;
</span><span class="lines">@@ -231,13 +242,13 @@
</span><span class="cx">     m_descent = 0_lu;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline InlineLayoutUnit LineBox::Baseline::ascent() const
</del><ins>+inline InlineLayoutUnit LineBox::InlineBox::Baseline::ascent() const
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(m_hasValidAscent);
</span><span class="cx">     return m_ascent;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline InlineLayoutUnit LineBox::Baseline::descent() const
</del><ins>+inline InlineLayoutUnit LineBox::InlineBox::Baseline::descent() const
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(m_hasValidDescent);
</span><span class="cx">     return m_descent;
</span></span></pre></div>
<a id="trunkSourceWebCorelayoutinlineformattingInlineLineBuildercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/layout/inlineformatting/InlineLineBuilder.cpp (266047 => 266048)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/layout/inlineformatting/InlineLineBuilder.cpp       2020-08-23 13:53:04 UTC (rev 266047)
+++ trunk/Source/WebCore/layout/inlineformatting/InlineLineBuilder.cpp  2020-08-23 17:06:37 UTC (rev 266048)
</span><span class="lines">@@ -91,7 +91,7 @@
</span><span class="cx">         m_initialStrut = { };
</span><span class="cx"> 
</span><span class="cx">     auto lineRect = Display::InlineRect { constraints.logicalTopLeft, 0_lu, initialLineHeight };
</span><del>-    auto baseline = LineBox::Baseline { initialBaselineOffset, initialLineHeight - initialBaselineOffset };
</del><ins>+    auto baseline = LineBox::InlineBox::Baseline { initialBaselineOffset, initialLineHeight - initialBaselineOffset };
</ins><span class="cx">     m_lineBox = LineBox { lineRect, baseline, initialBaselineOffset };
</span><span class="cx">     m_lineLogicalWidth = constraints.availableLogicalWidth;
</span><span class="cx">     m_hasIntrusiveFloat = constraints.lineIsConstrainedByFloat;
</span><span class="lines">@@ -705,7 +705,7 @@
</span><span class="cx">     return false;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-LineBox::Baseline LineBuilder::halfLeadingMetrics(const FontMetrics& fontMetrics, InlineLayoutUnit lineLogicalHeight)
</del><ins>+LineBox::InlineBox::Baseline LineBuilder::halfLeadingMetrics(const FontMetrics& fontMetrics, InlineLayoutUnit lineLogicalHeight)
</ins><span class="cx"> {
</span><span class="cx">     auto ascent = fontMetrics.ascent();
</span><span class="cx">     auto descent = fontMetrics.descent();
</span></span></pre></div>
<a id="trunkSourceWebCorelayoutinlineformattingInlineLineBuilderh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/layout/inlineformatting/InlineLineBuilder.h (266047 => 266048)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/layout/inlineformatting/InlineLineBuilder.h 2020-08-23 13:53:04 UTC (rev 266047)
+++ trunk/Source/WebCore/layout/inlineformatting/InlineLineBuilder.h    2020-08-23 17:06:37 UTC (rev 266048)
</span><span class="lines">@@ -50,7 +50,7 @@
</span><span class="cx">         struct HeightAndBaseline {
</span><span class="cx">             InlineLayoutUnit height { 0 };
</span><span class="cx">             InlineLayoutUnit baselineOffset { 0 };
</span><del>-            Optional<LineBox::Baseline> strut;
</del><ins>+            Optional<LineBox::InlineBox::Baseline> strut;
</ins><span class="cx">         };
</span><span class="cx">         Optional<HeightAndBaseline> heightAndBaseline;
</span><span class="cx">     };
</span><span class="lines">@@ -148,7 +148,7 @@
</span><span class="cx">     enum class IsLastLineWithInlineContent { No, Yes };
</span><span class="cx">     RunList close(IsLastLineWithInlineContent = IsLastLineWithInlineContent::No);
</span><span class="cx"> 
</span><del>-    static LineBox::Baseline halfLeadingMetrics(const FontMetrics&, InlineLayoutUnit lineLogicalHeight);
</del><ins>+    static LineBox::InlineBox::Baseline halfLeadingMetrics(const FontMetrics&, InlineLayoutUnit lineLogicalHeight);
</ins><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     InlineLayoutUnit logicalTop() const { return m_lineBox.logicalTop(); }
</span><span class="lines">@@ -219,7 +219,7 @@
</span><span class="cx">     const InlineFormattingContext& m_inlineFormattingContext;
</span><span class="cx">     RunList m_runs;
</span><span class="cx">     TrimmableTrailingContent m_trimmableTrailingContent;
</span><del>-    Optional<LineBox::Baseline> m_initialStrut;
</del><ins>+    Optional<LineBox::InlineBox::Baseline> m_initialStrut;
</ins><span class="cx">     InlineLayoutUnit m_lineLogicalWidth { 0 };
</span><span class="cx">     Optional<TextAlignMode> m_horizontalAlignment;
</span><span class="cx">     bool m_isIntrinsicSizing { false };
</span></span></pre>
</div>
</div>

</body>
</html>