<!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>[280018] 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/280018">280018</a></dd>
<dt>Author</dt> <dd>zalan@apple.com</dd>
<dt>Date</dt> <dd>2021-07-17 10:27:25 -0700 (Sat, 17 Jul 2021)</dd>
</dl>

<h3>Log Message</h3>
<pre>[LFC][IFC] Move InlineLevelBox class to its own file
https://bugs.webkit.org/show_bug.cgi?id=228045

Reviewed by Sam Weinig.

LineBox class has grown a lot since the subclass of InlineLevelBox has been introduced.
It is also in preparation for merging LineBox and LineBoxGeometry classes.

* WebCore.xcodeproj/project.pbxproj:
* layout/formattingContexts/inline/InlineFormattingGeometry.cpp:
(WebCore::Layout::LineBoxBuilder::setVerticalGeometryForInlineBox const):
(WebCore::Layout::LineBoxBuilder::constructAndAlignInlineLevelBoxes):
(WebCore::Layout::LineBoxBuilder::computeLineBoxHeightAndAlignInlineLevelBoxesVertically):
(WebCore::Layout::LineBoxBuilder::SimplifiedVerticalAlignment::SimplifiedVerticalAlignment):
(WebCore::Layout::LineBoxBuilder::SimplifiedVerticalAlignment::canUseSimplifiedAlignment):
(WebCore::Layout::LineBoxBuilder::SimplifiedVerticalAlignment::align):
(WebCore::Layout::LineBoxBuilder::SimplifiedVerticalAlignment::adjust):
(WebCore::Layout::InlineFormattingGeometry::inlineLevelBoxAffectsLineBox const):
* layout/formattingContexts/inline/InlineFormattingGeometry.h:
* layout/formattingContexts/inline/InlineFormattingQuirks.cpp:
(WebCore::Layout::InlineFormattingQuirks::inlineLevelBoxAffectsLineBox const):
* layout/formattingContexts/inline/InlineFormattingQuirks.h:
* layout/formattingContexts/inline/InlineLevelBox.h: Added.
(WebCore::Layout::InlineLevelBox::baseline const):
(WebCore::Layout::InlineLevelBox::descent const):
(WebCore::Layout::InlineLevelBox::LayoutBounds::height const):
(WebCore::Layout::InlineLevelBox::LayoutBounds::operator== const):
(WebCore::Layout::InlineLevelBox::layoutBounds const):
(WebCore::Layout::InlineLevelBox::hasContent const):
(WebCore::Layout::InlineLevelBox::verticalAlign const):
(WebCore::Layout::InlineLevelBox::layoutBox const):
(WebCore::Layout::InlineLevelBox::style const):
(WebCore::Layout::InlineLevelBox::isInlineBox const):
(WebCore::Layout::InlineLevelBox::isRootInlineBox const):
(WebCore::Layout::InlineLevelBox::isAtomicInlineLevelBox const):
(WebCore::Layout::InlineLevelBox::isLineBreakBox const):
(WebCore::Layout::InlineLevelBox::type const):
(WebCore::Layout::InlineLevelBox::logicalRect const):
(WebCore::Layout::InlineLevelBox::logicalTop const):
(WebCore::Layout::InlineLevelBox::logicalBottom const):
(WebCore::Layout::InlineLevelBox::logicalLeft const):
(WebCore::Layout::InlineLevelBox::logicalWidth const):
(WebCore::Layout::InlineLevelBox::logicalHeight const):
(WebCore::Layout::InlineLevelBox::setLogicalWidth):
(WebCore::Layout::InlineLevelBox::setLogicalHeight):
(WebCore::Layout::InlineLevelBox::setLogicalTop):
(WebCore::Layout::InlineLevelBox::setBaseline):
(WebCore::Layout::InlineLevelBox::setDescent):
(WebCore::Layout::InlineLevelBox::setLayoutBounds):
(WebCore::Layout::InlineLevelBox::InlineLevelBox):
(WebCore::Layout::m_type):
(WebCore::Layout::InlineLevelBox::setHasContent):
(WebCore::Layout::InlineLevelBox::hasLineBoxRelativeAlignment const):
(WebCore::Layout::InlineLevelBox::createAtomicInlineLevelBox):
(WebCore::Layout::InlineLevelBox::createInlineBox):
(WebCore::Layout::InlineLevelBox::createLineBreakBox):
(WebCore::Layout::InlineLevelBox::createGenericInlineLevelBox):
* layout/formattingContexts/inline/InlineLineBox.cpp:
(WebCore::Layout::LineBox::InlineLevelBox::InlineLevelBox): Deleted.
(WebCore::Layout::m_type): Deleted.
(WebCore::Layout::LineBox::InlineLevelBox::setBaseline): Deleted.
(WebCore::Layout::LineBox::InlineLevelBox::setDescent): Deleted.
(WebCore::Layout::LineBox::InlineLevelBox::setLayoutBounds): Deleted.
(WebCore::Layout::LineBox::InlineLevelBox::setLogicalTop): Deleted.
(WebCore::Layout::LineBox::InlineLevelBox::setLogicalHeight): Deleted.
(WebCore::Layout::LineBox::InlineLevelBox::setHasContent): Deleted.
(WebCore::Layout::LineBox::InlineLevelBox::hasLineBoxRelativeAlignment const): Deleted.
* layout/formattingContexts/inline/InlineLineBox.h:
(WebCore::Layout::LineBox::InlineLevelBox::baseline const): Deleted.
(WebCore::Layout::LineBox::InlineLevelBox::descent const): Deleted.
(WebCore::Layout::LineBox::InlineLevelBox::LayoutBounds::height const): Deleted.
(WebCore::Layout::LineBox::InlineLevelBox::LayoutBounds::operator== const): Deleted.
(WebCore::Layout::LineBox::InlineLevelBox::layoutBounds const): Deleted.
(WebCore::Layout::LineBox::InlineLevelBox::hasContent const): Deleted.
(WebCore::Layout::LineBox::InlineLevelBox::verticalAlign const): Deleted.
(WebCore::Layout::LineBox::InlineLevelBox::layoutBox const): Deleted.
(WebCore::Layout::LineBox::InlineLevelBox::style const): Deleted.
(WebCore::Layout::LineBox::InlineLevelBox::isInlineBox const): Deleted.
(WebCore::Layout::LineBox::InlineLevelBox::isRootInlineBox const): Deleted.
(WebCore::Layout::LineBox::InlineLevelBox::isAtomicInlineLevelBox const): Deleted.
(WebCore::Layout::LineBox::InlineLevelBox::isLineBreakBox const): Deleted.
(WebCore::Layout::LineBox::InlineLevelBox::type const): Deleted.
(WebCore::Layout::LineBox::InlineLevelBox::logicalRect const): Deleted.
(WebCore::Layout::LineBox::InlineLevelBox::logicalTop const): Deleted.
(WebCore::Layout::LineBox::InlineLevelBox::logicalBottom const): Deleted.
(WebCore::Layout::LineBox::InlineLevelBox::logicalLeft const): Deleted.
(WebCore::Layout::LineBox::InlineLevelBox::logicalWidth const): Deleted.
(WebCore::Layout::LineBox::InlineLevelBox::logicalHeight const): Deleted.
(WebCore::Layout::LineBox::InlineLevelBox::setLogicalWidth): Deleted.
(WebCore::Layout::LineBox::InlineLevelBox::createAtomicInlineLevelBox): Deleted.
(WebCore::Layout::LineBox::InlineLevelBox::createInlineBox): Deleted.
(WebCore::Layout::LineBox::InlineLevelBox::createLineBreakBox): Deleted.
(WebCore::Layout::LineBox::InlineLevelBox::createGenericInlineLevelBox): Deleted.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCorelayoutformattingContextsinlineInlineFormattingGeometrycpp">trunk/Source/WebCore/layout/formattingContexts/inline/InlineFormattingGeometry.cpp</a></li>
<li><a href="#trunkSourceWebCorelayoutformattingContextsinlineInlineFormattingGeometryh">trunk/Source/WebCore/layout/formattingContexts/inline/InlineFormattingGeometry.h</a></li>
<li><a href="#trunkSourceWebCorelayoutformattingContextsinlineInlineFormattingQuirkscpp">trunk/Source/WebCore/layout/formattingContexts/inline/InlineFormattingQuirks.cpp</a></li>
<li><a href="#trunkSourceWebCorelayoutformattingContextsinlineInlineFormattingQuirksh">trunk/Source/WebCore/layout/formattingContexts/inline/InlineFormattingQuirks.h</a></li>
<li><a href="#trunkSourceWebCorelayoutformattingContextsinlineInlineLineBoxcpp">trunk/Source/WebCore/layout/formattingContexts/inline/InlineLineBox.cpp</a></li>
<li><a href="#trunkSourceWebCorelayoutformattingContextsinlineInlineLineBoxh">trunk/Source/WebCore/layout/formattingContexts/inline/InlineLineBox.h</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebCorelayoutformattingContextsinlineInlineLevelBoxh">trunk/Source/WebCore/layout/formattingContexts/inline/InlineLevelBox.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (280017 => 280018)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog   2021-07-17 05:42:32 UTC (rev 280017)
+++ trunk/Source/WebCore/ChangeLog      2021-07-17 17:27:25 UTC (rev 280018)
</span><span class="lines">@@ -1,3 +1,99 @@
</span><ins>+2021-07-17  Alan Bujtas  <zalan@apple.com>
+
+        [LFC][IFC] Move InlineLevelBox class to its own file
+        https://bugs.webkit.org/show_bug.cgi?id=228045
+
+        Reviewed by Sam Weinig.
+
+        LineBox class has grown a lot since the subclass of InlineLevelBox has been introduced.
+        It is also in preparation for merging LineBox and LineBoxGeometry classes.
+
+        * WebCore.xcodeproj/project.pbxproj:
+        * layout/formattingContexts/inline/InlineFormattingGeometry.cpp:
+        (WebCore::Layout::LineBoxBuilder::setVerticalGeometryForInlineBox const):
+        (WebCore::Layout::LineBoxBuilder::constructAndAlignInlineLevelBoxes):
+        (WebCore::Layout::LineBoxBuilder::computeLineBoxHeightAndAlignInlineLevelBoxesVertically):
+        (WebCore::Layout::LineBoxBuilder::SimplifiedVerticalAlignment::SimplifiedVerticalAlignment):
+        (WebCore::Layout::LineBoxBuilder::SimplifiedVerticalAlignment::canUseSimplifiedAlignment):
+        (WebCore::Layout::LineBoxBuilder::SimplifiedVerticalAlignment::align):
+        (WebCore::Layout::LineBoxBuilder::SimplifiedVerticalAlignment::adjust):
+        (WebCore::Layout::InlineFormattingGeometry::inlineLevelBoxAffectsLineBox const):
+        * layout/formattingContexts/inline/InlineFormattingGeometry.h:
+        * layout/formattingContexts/inline/InlineFormattingQuirks.cpp:
+        (WebCore::Layout::InlineFormattingQuirks::inlineLevelBoxAffectsLineBox const):
+        * layout/formattingContexts/inline/InlineFormattingQuirks.h:
+        * layout/formattingContexts/inline/InlineLevelBox.h: Added.
+        (WebCore::Layout::InlineLevelBox::baseline const):
+        (WebCore::Layout::InlineLevelBox::descent const):
+        (WebCore::Layout::InlineLevelBox::LayoutBounds::height const):
+        (WebCore::Layout::InlineLevelBox::LayoutBounds::operator== const):
+        (WebCore::Layout::InlineLevelBox::layoutBounds const):
+        (WebCore::Layout::InlineLevelBox::hasContent const):
+        (WebCore::Layout::InlineLevelBox::verticalAlign const):
+        (WebCore::Layout::InlineLevelBox::layoutBox const):
+        (WebCore::Layout::InlineLevelBox::style const):
+        (WebCore::Layout::InlineLevelBox::isInlineBox const):
+        (WebCore::Layout::InlineLevelBox::isRootInlineBox const):
+        (WebCore::Layout::InlineLevelBox::isAtomicInlineLevelBox const):
+        (WebCore::Layout::InlineLevelBox::isLineBreakBox const):
+        (WebCore::Layout::InlineLevelBox::type const):
+        (WebCore::Layout::InlineLevelBox::logicalRect const):
+        (WebCore::Layout::InlineLevelBox::logicalTop const):
+        (WebCore::Layout::InlineLevelBox::logicalBottom const):
+        (WebCore::Layout::InlineLevelBox::logicalLeft const):
+        (WebCore::Layout::InlineLevelBox::logicalWidth const):
+        (WebCore::Layout::InlineLevelBox::logicalHeight const):
+        (WebCore::Layout::InlineLevelBox::setLogicalWidth):
+        (WebCore::Layout::InlineLevelBox::setLogicalHeight):
+        (WebCore::Layout::InlineLevelBox::setLogicalTop):
+        (WebCore::Layout::InlineLevelBox::setBaseline):
+        (WebCore::Layout::InlineLevelBox::setDescent):
+        (WebCore::Layout::InlineLevelBox::setLayoutBounds):
+        (WebCore::Layout::InlineLevelBox::InlineLevelBox):
+        (WebCore::Layout::m_type):
+        (WebCore::Layout::InlineLevelBox::setHasContent):
+        (WebCore::Layout::InlineLevelBox::hasLineBoxRelativeAlignment const):
+        (WebCore::Layout::InlineLevelBox::createAtomicInlineLevelBox):
+        (WebCore::Layout::InlineLevelBox::createInlineBox):
+        (WebCore::Layout::InlineLevelBox::createLineBreakBox):
+        (WebCore::Layout::InlineLevelBox::createGenericInlineLevelBox):
+        * layout/formattingContexts/inline/InlineLineBox.cpp:
+        (WebCore::Layout::LineBox::InlineLevelBox::InlineLevelBox): Deleted.
+        (WebCore::Layout::m_type): Deleted.
+        (WebCore::Layout::LineBox::InlineLevelBox::setBaseline): Deleted.
+        (WebCore::Layout::LineBox::InlineLevelBox::setDescent): Deleted.
+        (WebCore::Layout::LineBox::InlineLevelBox::setLayoutBounds): Deleted.
+        (WebCore::Layout::LineBox::InlineLevelBox::setLogicalTop): Deleted.
+        (WebCore::Layout::LineBox::InlineLevelBox::setLogicalHeight): Deleted.
+        (WebCore::Layout::LineBox::InlineLevelBox::setHasContent): Deleted.
+        (WebCore::Layout::LineBox::InlineLevelBox::hasLineBoxRelativeAlignment const): Deleted.
+        * layout/formattingContexts/inline/InlineLineBox.h:
+        (WebCore::Layout::LineBox::InlineLevelBox::baseline const): Deleted.
+        (WebCore::Layout::LineBox::InlineLevelBox::descent const): Deleted.
+        (WebCore::Layout::LineBox::InlineLevelBox::LayoutBounds::height const): Deleted.
+        (WebCore::Layout::LineBox::InlineLevelBox::LayoutBounds::operator== const): Deleted.
+        (WebCore::Layout::LineBox::InlineLevelBox::layoutBounds const): Deleted.
+        (WebCore::Layout::LineBox::InlineLevelBox::hasContent const): Deleted.
+        (WebCore::Layout::LineBox::InlineLevelBox::verticalAlign const): Deleted.
+        (WebCore::Layout::LineBox::InlineLevelBox::layoutBox const): Deleted.
+        (WebCore::Layout::LineBox::InlineLevelBox::style const): Deleted.
+        (WebCore::Layout::LineBox::InlineLevelBox::isInlineBox const): Deleted.
+        (WebCore::Layout::LineBox::InlineLevelBox::isRootInlineBox const): Deleted.
+        (WebCore::Layout::LineBox::InlineLevelBox::isAtomicInlineLevelBox const): Deleted.
+        (WebCore::Layout::LineBox::InlineLevelBox::isLineBreakBox const): Deleted.
+        (WebCore::Layout::LineBox::InlineLevelBox::type const): Deleted.
+        (WebCore::Layout::LineBox::InlineLevelBox::logicalRect const): Deleted.
+        (WebCore::Layout::LineBox::InlineLevelBox::logicalTop const): Deleted.
+        (WebCore::Layout::LineBox::InlineLevelBox::logicalBottom const): Deleted.
+        (WebCore::Layout::LineBox::InlineLevelBox::logicalLeft const): Deleted.
+        (WebCore::Layout::LineBox::InlineLevelBox::logicalWidth const): Deleted.
+        (WebCore::Layout::LineBox::InlineLevelBox::logicalHeight const): Deleted.
+        (WebCore::Layout::LineBox::InlineLevelBox::setLogicalWidth): Deleted.
+        (WebCore::Layout::LineBox::InlineLevelBox::createAtomicInlineLevelBox): Deleted.
+        (WebCore::Layout::LineBox::InlineLevelBox::createInlineBox): Deleted.
+        (WebCore::Layout::LineBox::InlineLevelBox::createLineBreakBox): Deleted.
+        (WebCore::Layout::LineBox::InlineLevelBox::createGenericInlineLevelBox): Deleted.
+
</ins><span class="cx"> 2021-07-16  Simon Fraser  <simon.fraser@apple.com>
</span><span class="cx"> 
</span><span class="cx">         getBoundingClientRect() returns the incorrect rectangle on elements whose parent element is set -webkit-column-count
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (280017 => 280018)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj   2021-07-17 05:42:32 UTC (rev 280017)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj      2021-07-17 17:27:25 UTC (rev 280018)
</span><span class="lines">@@ -2167,6 +2167,7 @@
</span><span class="cx">          6F995A381A70833700A735F4 /* JSWebGLTransformFeedback.h in Headers */ = {isa = PBXBuildFile; fileRef = 6F995A2E1A70833700A735F4 /* JSWebGLTransformFeedback.h */; };
</span><span class="cx">          6F995A3A1A70833700A735F4 /* JSWebGLVertexArrayObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 6F995A301A70833700A735F4 /* JSWebGLVertexArrayObject.h */; };
</span><span class="cx">          6FA4454E898F2FC168BC38C1 /* JSBeforeUnloadEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 29E04A27BED2F81F98E9022B /* JSBeforeUnloadEvent.h */; };
</span><ins>+               6FAAE71326A2814B00E07502 /* InlineLevelBox.h in Headers */ = {isa = PBXBuildFile; fileRef = 6FAAE71126A2814A00E07502 /* InlineLevelBox.h */; settings = {ATTRIBUTES = (Private, ); }; };
</ins><span class="cx">           6FB11B5C21783FD000E2A574 /* TextUtil.h in Headers */ = {isa = PBXBuildFile; fileRef = 6FB11B5921783FCF00E2A574 /* TextUtil.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">          6FB2400523DFF12800796458 /* InlineLineBox.h in Headers */ = {isa = PBXBuildFile; fileRef = 6FB2400323DFF12700796458 /* InlineLineBox.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">          6FB47E632277425A00C7BCB0 /* LayoutIntegrationLine.h in Headers */ = {isa = PBXBuildFile; fileRef = 6FB47E612277425A00C7BCB0 /* LayoutIntegrationLine.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="lines">@@ -10072,6 +10073,7 @@
</span><span class="cx">          6F995A2E1A70833700A735F4 /* JSWebGLTransformFeedback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSWebGLTransformFeedback.h; sourceTree = "<group>"; };
</span><span class="cx">          6F995A2F1A70833700A735F4 /* JSWebGLVertexArrayObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSWebGLVertexArrayObject.cpp; sourceTree = "<group>"; };
</span><span class="cx">          6F995A301A70833700A735F4 /* JSWebGLVertexArrayObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSWebGLVertexArrayObject.h; sourceTree = "<group>"; };
</span><ins>+               6FAAE71126A2814A00E07502 /* InlineLevelBox.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InlineLevelBox.h; sourceTree = "<group>"; };
</ins><span class="cx">           6FAE16BA2406DE7E00A48414 /* PrecomputedBlockMarginCollapse.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = PrecomputedBlockMarginCollapse.cpp; sourceTree = "<group>"; };
</span><span class="cx">          6FB0ED112427B6C6002737E6 /* LayoutInitialContainingBlock.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = LayoutInitialContainingBlock.cpp; sourceTree = "<group>"; };
</span><span class="cx">          6FB11B5921783FCF00E2A574 /* TextUtil.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextUtil.h; sourceTree = "<group>"; };
</span><span class="lines">@@ -18399,6 +18401,7 @@
</span><span class="cx">                          115CFA7C208B8E10001E6991 /* InlineFormattingState.h */,
</span><span class="cx">                          6F7B8CEC23626E6600C9FF15 /* InlineItem.cpp */,
</span><span class="cx">                          6FE7CFA02177EEF1005B1573 /* InlineItem.h */,
</span><ins>+                               6FAAE71126A2814A00E07502 /* InlineLevelBox.h */,
</ins><span class="cx">                           6F0CD692229ED31900C5994E /* InlineLine.cpp */,
</span><span class="cx">                          6F0CD694229ED32700C5994E /* InlineLine.h */,
</span><span class="cx">                          6F69A79924D6FAB800E6B85D /* InlineLineBox.cpp */,
</span><span class="lines">@@ -33206,6 +33209,7 @@
</span><span class="cx">                          115CFA7E208B8E10001E6991 /* InlineFormattingState.h in Headers */,
</span><span class="cx">                          6FE7CFA22177EEF2005B1573 /* InlineItem.h in Headers */,
</span><span class="cx">                          BCE789161120D6080060ECE5 /* InlineIterator.h in Headers */,
</span><ins>+                               6FAAE71326A2814B00E07502 /* InlineLevelBox.h in Headers */,
</ins><span class="cx">                           6F0CD695229ED32700C5994E /* InlineLine.h in Headers */,
</span><span class="cx">                          6FB2400523DFF12800796458 /* InlineLineBox.h in Headers */,
</span><span class="cx">                          6F26EB48234004A5006906E2 /* InlineLineBuilder.h in Headers */,
</span></span></pre></div>
<a id="trunkSourceWebCorelayoutformattingContextsinlineInlineFormattingGeometrycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/layout/formattingContexts/inline/InlineFormattingGeometry.cpp (280017 => 280018)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/layout/formattingContexts/inline/InlineFormattingGeometry.cpp       2021-07-17 05:42:32 UTC (rev 280017)
+++ trunk/Source/WebCore/layout/formattingContexts/inline/InlineFormattingGeometry.cpp  2021-07-17 17:27:25 UTC (rev 280018)
</span><span class="lines">@@ -47,11 +47,11 @@
</span><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     struct SimplifiedVerticalAlignment {
</span><del>-        SimplifiedVerticalAlignment(const LineBox::InlineLevelBox& rootInlineBox);
</del><ins>+        SimplifiedVerticalAlignment(const InlineLevelBox& rootInlineBox);
</ins><span class="cx"> 
</span><del>-        static bool canUseSimplifiedAlignment(const LineBox::InlineLevelBox& rootInlineBox, const LineBox::InlineLevelBox&, std::optional<const BoxGeometry> inlineLevelBoxGeometry);
</del><ins>+        static bool canUseSimplifiedAlignment(const InlineLevelBox& rootInlineBox, const InlineLevelBox&, std::optional<const BoxGeometry> inlineLevelBoxGeometry);
</ins><span class="cx"> 
</span><del>-        void align(LineBox::InlineLevelBox&);
</del><ins>+        void align(InlineLevelBox&);
</ins><span class="cx"> 
</span><span class="cx">         InlineLayoutUnit rootInlineBoxLogicalTop() const { return m_rootInlineBoxLogicalTop; }
</span><span class="cx">         InlineLayoutUnit lineBoxHeight() const { return m_lineBoxLogicalBottom - m_lineBoxLogicalTop; }
</span><span class="lines">@@ -60,9 +60,9 @@
</span><span class="cx">         bool isEnabled() const { return m_isEnabled; }
</span><span class="cx"> 
</span><span class="cx">     private:
</span><del>-        void adjust(const LineBox::InlineLevelBox&);
</del><ins>+        void adjust(const InlineLevelBox&);
</ins><span class="cx"> 
</span><del>-        const LineBox::InlineLevelBox& m_rootInlineBox;
</del><ins>+        const InlineLevelBox& m_rootInlineBox;
</ins><span class="cx">         bool m_isEnabled { true };
</span><span class="cx">         InlineLayoutUnit m_lineBoxLogicalTop { 0 };
</span><span class="cx">         InlineLayoutUnit m_lineBoxLogicalBottom { 0 };
</span><span class="lines">@@ -69,7 +69,7 @@
</span><span class="cx">         InlineLayoutUnit m_rootInlineBoxLogicalTop { 0 };
</span><span class="cx">     };
</span><span class="cx"> 
</span><del>-    void setVerticalGeometryForInlineBox(LineBox::InlineLevelBox&) const;
</del><ins>+    void setVerticalGeometryForInlineBox(InlineLevelBox&) const;
</ins><span class="cx">     void constructAndAlignInlineLevelBoxes(LineBox&, const Line::RunList&);
</span><span class="cx">     void computeLineBoxHeightAndAlignInlineLevelBoxesVertically(LineBox&);
</span><span class="cx"> 
</span><span class="lines">@@ -167,7 +167,7 @@
</span><span class="cx">     return lineBox;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void LineBoxBuilder::setVerticalGeometryForInlineBox(LineBox::InlineLevelBox& inlineLevelBox) const
</del><ins>+void LineBoxBuilder::setVerticalGeometryForInlineBox(InlineLevelBox& inlineLevelBox) const
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(inlineLevelBox.isInlineBox() || inlineLevelBox.isLineBreakBox());
</span><span class="cx">     auto& fontMetrics = inlineLevelBox.style().fontMetrics();
</span><span class="lines">@@ -198,7 +198,7 @@
</span><span class="cx">         descent += halfLeading;
</span><span class="cx">     }
</span><span class="cx">     // We need floor/ceil to match legacy layout integral positioning.
</span><del>-    inlineLevelBox.setLayoutBounds(LineBox::InlineLevelBox::LayoutBounds { floorf(ascent), ceil(descent) });
</del><ins>+    inlineLevelBox.setLayoutBounds(InlineLevelBox::LayoutBounds { floorf(ascent), ceil(descent) });
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void LineBoxBuilder::constructAndAlignInlineLevelBoxes(LineBox& lineBox, const Line::RunList& runs)
</span><span class="lines">@@ -225,8 +225,8 @@
</span><span class="cx">             return;
</span><span class="cx">         // An inline box may not necessarily start on the current line:
</span><span class="cx">         // <span id=outer>line break<br>this content's parent inline box('outer') <span id=inner>starts on the previous line</span></span>
</span><del>-        // We need to make sure that there's an LineBox::InlineLevelBox for every inline box that's present on the current line.
-        // In nesting case we need to create LineBox::InlineLevelBoxes for the inline box ancestors.
</del><ins>+        // We need to make sure that there's an InlineLevelBox for every inline box that's present on the current line.
+        // In nesting case we need to create InlineLevelBoxes for the inline box ancestors.
</ins><span class="cx">         // We only have to do it on the first run as any subsequent inline content is either at the same/higher nesting level or
</span><span class="cx">         // nested with a [inline box start] run.
</span><span class="cx">         auto& firstRun = runs[0];
</span><span class="lines">@@ -249,7 +249,7 @@
</span><span class="cx">         }
</span><span class="cx">         // Construct the missing LineBox::InlineBoxes starting with the topmost layout box.
</span><span class="cx">         for (auto* layoutBox : WTF::makeReversedRange(layoutBoxesWithoutInlineBoxes)) {
</span><del>-            auto inlineBox = LineBox::InlineLevelBox::createInlineBox(*layoutBox, rootInlineBox.logicalLeft(), lineBox.contentLogicalWidth());
</del><ins>+            auto inlineBox = InlineLevelBox::createInlineBox(*layoutBox, rootInlineBox.logicalLeft(), lineBox.contentLogicalWidth());
</ins><span class="cx">             setVerticalGeometryForInlineBox(inlineBox);
</span><span class="cx">             simplifiedAlignVerticallyIfApplicable(inlineBox, { });
</span><span class="cx">             lineBox.addInlineLevelBox(WTFMove(inlineBox));
</span><span class="lines">@@ -302,9 +302,9 @@
</span><span class="cx">             else
</span><span class="cx">                 ascent = marginBoxHeight;
</span><span class="cx">             logicalLeft += std::max(0_lu, inlineLevelBoxGeometry.marginStart());
</span><del>-            auto atomicInlineLevelBox = LineBox::InlineLevelBox::createAtomicInlineLevelBox(layoutBox, logicalLeft, { inlineLevelBoxGeometry.borderBoxWidth(), marginBoxHeight });
</del><ins>+            auto atomicInlineLevelBox = InlineLevelBox::createAtomicInlineLevelBox(layoutBox, logicalLeft, { inlineLevelBoxGeometry.borderBoxWidth(), marginBoxHeight });
</ins><span class="cx">             atomicInlineLevelBox.setBaseline(ascent);
</span><del>-            atomicInlineLevelBox.setLayoutBounds(LineBox::InlineLevelBox::LayoutBounds { ascent, marginBoxHeight - ascent });
</del><ins>+            atomicInlineLevelBox.setLayoutBounds(InlineLevelBox::LayoutBounds { ascent, marginBoxHeight - ascent });
</ins><span class="cx">             simplifiedAlignVerticallyIfApplicable(atomicInlineLevelBox, inlineLevelBoxGeometry);
</span><span class="cx">             lineBox.addInlineLevelBox(WTFMove(atomicInlineLevelBox));
</span><span class="cx">             continue;
</span><span class="lines">@@ -318,7 +318,7 @@
</span><span class="cx">             auto marginStart = std::max(0_lu, formattingContext().geometryForBox(layoutBox).marginStart());
</span><span class="cx">             logicalLeft += marginStart;
</span><span class="cx">             initialLogicalWidth -= marginStart;
</span><del>-            auto inlineBox = LineBox::InlineLevelBox::createInlineBox(layoutBox, logicalLeft, initialLogicalWidth);
</del><ins>+            auto inlineBox = InlineLevelBox::createInlineBox(layoutBox, logicalLeft, initialLogicalWidth);
</ins><span class="cx">             setVerticalGeometryForInlineBox(inlineBox);
</span><span class="cx">             simplifiedAlignVerticallyIfApplicable(inlineBox, { });
</span><span class="cx">             lineBox.addInlineLevelBox(WTFMove(inlineBox));
</span><span class="lines">@@ -341,7 +341,7 @@
</span><span class="cx">             continue;
</span><span class="cx">         }
</span><span class="cx">         if (run.isHardLineBreak()) {
</span><del>-            auto lineBreakBox = LineBox::InlineLevelBox::createLineBreakBox(layoutBox, logicalLeft);
</del><ins>+            auto lineBreakBox = InlineLevelBox::createLineBreakBox(layoutBox, logicalLeft);
</ins><span class="cx">             setVerticalGeometryForInlineBox(lineBreakBox);
</span><span class="cx">             simplifiedAlignVerticallyIfApplicable(lineBreakBox, { });
</span><span class="cx">             lineBox.addInlineLevelBox(WTFMove(lineBreakBox));
</span><span class="lines">@@ -348,7 +348,7 @@
</span><span class="cx">             continue;
</span><span class="cx">         }
</span><span class="cx">         if (run.isWordBreakOpportunity()) {
</span><del>-            lineBox.addInlineLevelBox(LineBox::InlineLevelBox::createGenericInlineLevelBox(layoutBox, logicalLeft));
</del><ins>+            lineBox.addInlineLevelBox(InlineLevelBox::createGenericInlineLevelBox(layoutBox, logicalLeft));
</ins><span class="cx">             continue;
</span><span class="cx">         }
</span><span class="cx">         ASSERT_NOT_REACHED();
</span><span class="lines">@@ -381,7 +381,7 @@
</span><span class="cx">             InlineLayoutUnit top { 0 };
</span><span class="cx">             InlineLayoutUnit bottom { 0 };
</span><span class="cx">         };
</span><del>-        HashMap<const LineBox::InlineLevelBox*, AbsoluteTopAndBottom> inlineLevelBoxAbsoluteTopAndBottomMap;
</del><ins>+        HashMap<const InlineLevelBox*, AbsoluteTopAndBottom> inlineLevelBoxAbsoluteTopAndBottomMap;
</ins><span class="cx"> 
</span><span class="cx">         auto minimumLogicalTop = std::optional<InlineLayoutUnit> { };
</span><span class="cx">         auto maximumLogicalBottom = std::optional<InlineLayoutUnit> { };
</span><span class="lines">@@ -392,7 +392,7 @@
</span><span class="cx">         } else
</span><span class="cx">             inlineLevelBoxAbsoluteTopAndBottomMap.add(&rootInlineBox, AbsoluteTopAndBottom { });
</span><span class="cx"> 
</span><del>-        Vector<LineBox::InlineLevelBox*> lineBoxRelativeInlineLevelBoxes;
</del><ins>+        Vector<InlineLevelBox*> lineBoxRelativeInlineLevelBoxes;
</ins><span class="cx">         for (auto& inlineLevelBox : lineBox.nonRootInlineLevelBoxes()) {
</span><span class="cx">             auto& layoutBox = inlineLevelBox.layoutBox();
</span><span class="cx">             if (inlineLevelBox.hasLineBoxRelativeAlignment()) {
</span><span class="lines">@@ -466,7 +466,7 @@
</span><span class="cx">     computeLineBoxLogicalHeight();
</span><span class="cx"> 
</span><span class="cx">     auto computeRootInlineBoxVerticalPosition = [&] {
</span><del>-        HashMap<const LineBox::InlineLevelBox*, InlineLayoutUnit> inlineLevelBoxAbsoluteBaselineOffsetMap;
</del><ins>+        HashMap<const InlineLevelBox*, InlineLayoutUnit> inlineLevelBoxAbsoluteBaselineOffsetMap;
</ins><span class="cx">         inlineLevelBoxAbsoluteBaselineOffsetMap.add(&rootInlineBox, InlineLayoutUnit { });
</span><span class="cx"> 
</span><span class="cx">         auto maximumTopOffsetFromRootInlineBoxBaseline = std::optional<InlineLayoutUnit> { };
</span><span class="lines">@@ -598,13 +598,13 @@
</span><span class="cx">     alignInlineLevelBoxes();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-LineBoxBuilder::SimplifiedVerticalAlignment::SimplifiedVerticalAlignment(const LineBox::InlineLevelBox& rootInlineBox)
</del><ins>+LineBoxBuilder::SimplifiedVerticalAlignment::SimplifiedVerticalAlignment(const InlineLevelBox& rootInlineBox)
</ins><span class="cx">     : m_rootInlineBox(rootInlineBox)
</span><span class="cx"> {
</span><span class="cx">     adjust(rootInlineBox);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool LineBoxBuilder::SimplifiedVerticalAlignment::canUseSimplifiedAlignment(const LineBox::InlineLevelBox& rootInlineBox, const LineBox::InlineLevelBox& inlineLevelBox, std::optional<const BoxGeometry> inlineLevelBoxGeometry)
</del><ins>+bool LineBoxBuilder::SimplifiedVerticalAlignment::canUseSimplifiedAlignment(const InlineLevelBox& rootInlineBox, const InlineLevelBox& inlineLevelBox, std::optional<const BoxGeometry> inlineLevelBoxGeometry)
</ins><span class="cx"> {
</span><span class="cx">     if (inlineLevelBox.isAtomicInlineLevelBox()) {
</span><span class="cx">         ASSERT(inlineLevelBoxGeometry);
</span><span class="lines">@@ -627,7 +627,7 @@
</span><span class="cx">     return false;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void LineBoxBuilder::SimplifiedVerticalAlignment::align(LineBox::InlineLevelBox& inlineLevelBox)
</del><ins>+void LineBoxBuilder::SimplifiedVerticalAlignment::align(InlineLevelBox& inlineLevelBox)
</ins><span class="cx"> {
</span><span class="cx">     if (inlineLevelBox.isAtomicInlineLevelBox() || inlineLevelBox.isLineBreakBox() || inlineLevelBox.isInlineBox()) {
</span><span class="cx">         // Only baseline alignment for now.
</span><span class="lines">@@ -638,7 +638,7 @@
</span><span class="cx">     ASSERT_NOT_IMPLEMENTED_YET();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void LineBoxBuilder::SimplifiedVerticalAlignment::adjust(const LineBox::InlineLevelBox& inlineLevelBox)
</del><ins>+void LineBoxBuilder::SimplifiedVerticalAlignment::adjust(const InlineLevelBox& inlineLevelBox)
</ins><span class="cx"> {
</span><span class="cx">     auto layoutBoundsLogicalTop = m_rootInlineBox.layoutBounds().ascent - inlineLevelBox.layoutBounds().ascent;
</span><span class="cx">     m_lineBoxLogicalTop = std::min(m_lineBoxLogicalTop, layoutBoundsLogicalTop);
</span><span class="lines">@@ -709,7 +709,7 @@
</span><span class="cx">     return complicatedCases(layoutBox, horizontalConstraints, overriddenVerticalValues);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool InlineFormattingGeometry::inlineLevelBoxAffectsLineBox(const LineBox::InlineLevelBox& inlineLevelBox, const LineBox& lineBox) const
</del><ins>+bool InlineFormattingGeometry::inlineLevelBoxAffectsLineBox(const InlineLevelBox& inlineLevelBox, const LineBox& lineBox) const
</ins><span class="cx"> {
</span><span class="cx">     if (inlineLevelBox.isInlineBox() || inlineLevelBox.isLineBreakBox())
</span><span class="cx">         return layoutState().inStandardsMode() ? true : formattingContext().formattingQuirks().inlineLevelBoxAffectsLineBox(inlineLevelBox, lineBox);
</span></span></pre></div>
<a id="trunkSourceWebCorelayoutformattingContextsinlineInlineFormattingGeometryh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/layout/formattingContexts/inline/InlineFormattingGeometry.h (280017 => 280018)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/layout/formattingContexts/inline/InlineFormattingGeometry.h 2021-07-17 05:42:32 UTC (rev 280017)
+++ trunk/Source/WebCore/layout/formattingContexts/inline/InlineFormattingGeometry.h    2021-07-17 17:27:25 UTC (rev 280018)
</span><span class="lines">@@ -46,7 +46,7 @@
</span><span class="cx">     ContentHeightAndMargin inlineBlockContentHeightAndMargin(const Box&, const HorizontalConstraints&, const OverriddenVerticalValues&) const;
</span><span class="cx">     ContentWidthAndMargin inlineBlockContentWidthAndMargin(const Box&, const HorizontalConstraints&, const OverriddenHorizontalValues&) const;
</span><span class="cx"> 
</span><del>-    bool inlineLevelBoxAffectsLineBox(const LineBox::InlineLevelBox&, const LineBox&) const;
</del><ins>+    bool inlineLevelBoxAffectsLineBox(const InlineLevelBox&, const LineBox&) const;
</ins><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     const InlineFormattingContext& formattingContext() const { return downcast<InlineFormattingContext>(FormattingGeometry::formattingContext()); }
</span></span></pre></div>
<a id="trunkSourceWebCorelayoutformattingContextsinlineInlineFormattingQuirkscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/layout/formattingContexts/inline/InlineFormattingQuirks.cpp (280017 => 280018)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/layout/formattingContexts/inline/InlineFormattingQuirks.cpp 2021-07-17 05:42:32 UTC (rev 280017)
+++ trunk/Source/WebCore/layout/formattingContexts/inline/InlineFormattingQuirks.cpp    2021-07-17 17:27:25 UTC (rev 280018)
</span><span class="lines">@@ -47,7 +47,7 @@
</span><span class="cx">     return rootStyle.lineHeight().isNegative() ? rootStyle.fontMetrics().floatHeight() : rootStyle.computedLineHeight();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool InlineFormattingQuirks::inlineLevelBoxAffectsLineBox(const LineBox::InlineLevelBox& inlineLevelBox, const LineBox& lineBox) const
</del><ins>+bool InlineFormattingQuirks::inlineLevelBoxAffectsLineBox(const InlineLevelBox& inlineLevelBox, const LineBox& lineBox) const
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(!layoutState().inStandardsMode());
</span><span class="cx">     if (inlineLevelBox.isLineBreakBox()) {
</span></span></pre></div>
<a id="trunkSourceWebCorelayoutformattingContextsinlineInlineFormattingQuirksh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/layout/formattingContexts/inline/InlineFormattingQuirks.h (280017 => 280018)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/layout/formattingContexts/inline/InlineFormattingQuirks.h   2021-07-17 05:42:32 UTC (rev 280017)
+++ trunk/Source/WebCore/layout/formattingContexts/inline/InlineFormattingQuirks.h      2021-07-17 17:27:25 UTC (rev 280018)
</span><span class="lines">@@ -41,7 +41,7 @@
</span><span class="cx"> 
</span><span class="cx">     InlineLayoutUnit initialLineHeight() const;
</span><span class="cx">     bool hasSoftWrapOpportunityAtImage() const;
</span><del>-    bool inlineLevelBoxAffectsLineBox(const LineBox::InlineLevelBox&, const LineBox&) const;
</del><ins>+    bool inlineLevelBoxAffectsLineBox(const InlineLevelBox&, const LineBox&) const;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorelayoutformattingContextsinlineInlineLevelBoxh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/layout/formattingContexts/inline/InlineLevelBox.h (0 => 280018)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/layout/formattingContexts/inline/InlineLevelBox.h                           (rev 0)
+++ trunk/Source/WebCore/layout/formattingContexts/inline/InlineLevelBox.h      2021-07-17 17:27:25 UTC (rev 280018)
</span><span class="lines">@@ -0,0 +1,159 @@
</span><ins>+/*
+ * Copyright (C) 2021 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#if ENABLE(LAYOUT_FORMATTING_CONTEXT)
+
+#include "InlineRect.h"
+#include "LayoutBox.h"
+#include "LayoutUnits.h"
+#include <wtf/WeakPtr.h>
+
+namespace WebCore {
+namespace Layout {
+
+class LineBox;
+class LineBoxBuilder;
+struct SimplifiedVerticalAlignment;
+
+class InlineLevelBox {
+public:
+    static InlineLevelBox createInlineBox(const Box&, InlineLayoutUnit logicalLeft, InlineLayoutUnit logicalWidth);
+    static InlineLevelBox createAtomicInlineLevelBox(const Box&, InlineLayoutUnit logicalLeft, InlineLayoutSize);
+    static InlineLevelBox createLineBreakBox(const Box&, InlineLayoutUnit logicalLeft);
+    static InlineLevelBox createGenericInlineLevelBox(const Box&, InlineLayoutUnit logicalLeft);
+
+    InlineLayoutUnit baseline() const { return m_baseline; }
+    std::optional<InlineLayoutUnit> descent() const { return m_descent; }
+    // See https://www.w3.org/TR/css-inline-3/#layout-bounds
+    struct LayoutBounds {
+        InlineLayoutUnit height() const { return ascent + descent; }
+        bool operator==(const LayoutBounds& other) const { return ascent == other.ascent && descent == other.descent; }
+
+        InlineLayoutUnit ascent { 0 };
+        InlineLayoutUnit descent { 0 };
+    };
+    LayoutBounds layoutBounds() const { return m_layoutBounds; }
+
+    bool hasContent() const { return m_hasContent; }
+    void setHasContent();
+
+    VerticalAlign verticalAlign() const { return layoutBox().style().verticalAlign(); }
+    const Box& layoutBox() const { return *m_layoutBox; }
+    const RenderStyle& style() const { return m_layoutBox->style(); }
+
+    bool isInlineBox() const { return m_type == Type::InlineBox || m_type == Type::RootInlineBox; }
+    bool isRootInlineBox() const { return m_type == Type::RootInlineBox; }
+    bool isAtomicInlineLevelBox() const { return m_type == Type::AtomicInlineLevelBox; }
+    bool isLineBreakBox() const { return m_type == Type::LineBreakBox; }
+    bool hasLineBoxRelativeAlignment() const;
+
+    enum class Type : uint8_t {
+        InlineBox             = 1 << 0,
+        RootInlineBox         = 1 << 1,
+        AtomicInlineLevelBox  = 1 << 2,
+        LineBreakBox          = 1 << 3,
+        GenericInlineLevelBox = 1 << 4
+    };
+    Type type() const { return m_type; }
+
+    InlineLevelBox(const Box&, InlineLayoutUnit logicalLeft, InlineLayoutSize, Type);
+    InlineLevelBox() = default;
+
+private:
+    friend struct SimplifiedVerticalAlignment;
+    friend class LineBoxBuilder;
+    friend class LineBox;
+
+    const InlineRect& logicalRect() const { return m_logicalRect; }
+    InlineLayoutUnit logicalTop() const { return m_logicalRect.top(); }
+    InlineLayoutUnit logicalBottom() const { return m_logicalRect.bottom(); }
+    InlineLayoutUnit logicalLeft() const { return m_logicalRect.left(); }
+    InlineLayoutUnit logicalWidth() const { return m_logicalRect.width(); }
+    InlineLayoutUnit logicalHeight() const { return m_logicalRect.height(); }
+
+    // FIXME: Remove legacy rounding.
+    void setLogicalWidth(InlineLayoutUnit logicalWidth) { m_logicalRect.setWidth(logicalWidth); }
+    void setLogicalHeight(InlineLayoutUnit logicalHeight) { m_logicalRect.setHeight(roundToInt(logicalHeight)); }
+    void setLogicalTop(InlineLayoutUnit logicalTop) { m_logicalRect.setTop(roundToInt(logicalTop)); }
+    void setBaseline(InlineLayoutUnit baseline) { m_baseline = roundToInt(baseline); }
+    void setDescent(InlineLayoutUnit descent) { m_descent = roundToInt(descent); }
+    void setLayoutBounds(const LayoutBounds& layoutBounds) { m_layoutBounds = { InlineLayoutUnit(roundToInt(layoutBounds.ascent)), InlineLayoutUnit(roundToInt(layoutBounds.descent)) }; }
+
+private:
+    WeakPtr<const Box> m_layoutBox;
+    // This is the combination of margin and border boxes. Inline level boxes are vertically aligned using their margin boxes.
+    InlineRect m_logicalRect;
+    LayoutBounds m_layoutBounds;
+    InlineLayoutUnit m_baseline { 0 };
+    std::optional<InlineLayoutUnit> m_descent;
+    bool m_hasContent { false };
+    Type m_type { Type::InlineBox };
+};
+
+inline InlineLevelBox::InlineLevelBox(const Box& layoutBox, InlineLayoutUnit logicalLeft, InlineLayoutSize logicalSize, Type type)
+    : m_layoutBox(makeWeakPtr(layoutBox))
+    , m_logicalRect({ }, logicalLeft, logicalSize.width(), logicalSize.height())
+    , m_type(type)
+{
+}
+
+inline void InlineLevelBox::setHasContent()
+{
+    ASSERT(isInlineBox());
+    m_hasContent = true;
+}
+
+inline bool InlineLevelBox::hasLineBoxRelativeAlignment() const
+{
+    auto verticalAlignment = layoutBox().style().verticalAlign();
+    return verticalAlignment == VerticalAlign::Top || verticalAlignment == VerticalAlign::Bottom;
+}
+
+inline InlineLevelBox InlineLevelBox::createAtomicInlineLevelBox(const Box& layoutBox, InlineLayoutUnit logicalLeft, InlineLayoutSize logicalSize)
+{
+    return InlineLevelBox { layoutBox, logicalLeft, logicalSize, Type::AtomicInlineLevelBox };
+}
+
+inline InlineLevelBox InlineLevelBox::createInlineBox(const Box& layoutBox, InlineLayoutUnit logicalLeft, InlineLayoutUnit logicalWidth)
+{
+    return InlineLevelBox { layoutBox, logicalLeft, InlineLayoutSize { logicalWidth, { } }, Type::InlineBox };
+}
+
+inline InlineLevelBox InlineLevelBox::createLineBreakBox(const Box& layoutBox, InlineLayoutUnit logicalLeft)
+{
+    return InlineLevelBox { layoutBox, logicalLeft, InlineLayoutSize { }, Type::LineBreakBox };
+}
+
+inline InlineLevelBox InlineLevelBox::createGenericInlineLevelBox(const Box& layoutBox, InlineLayoutUnit logicalLeft)
+{
+    return InlineLevelBox { layoutBox, logicalLeft, InlineLayoutSize { }, Type::GenericInlineLevelBox };
+}
+
+}
+}
+
+#endif
</ins></span></pre></div>
<a id="trunkSourceWebCorelayoutformattingContextsinlineInlineLineBoxcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/layout/formattingContexts/inline/InlineLineBox.cpp (280017 => 280018)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/layout/formattingContexts/inline/InlineLineBox.cpp  2021-07-17 05:42:32 UTC (rev 280017)
+++ trunk/Source/WebCore/layout/formattingContexts/inline/InlineLineBox.cpp     2021-07-17 17:27:25 UTC (rev 280018)
</span><span class="lines">@@ -34,55 +34,6 @@
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> namespace Layout {
</span><span class="cx"> 
</span><del>-LineBox::InlineLevelBox::InlineLevelBox(const Box& layoutBox, InlineLayoutUnit logicalLeft, InlineLayoutSize logicalSize, Type type)
-    : m_layoutBox(makeWeakPtr(layoutBox))
-    , m_logicalRect({ }, logicalLeft, logicalSize.width(), logicalSize.height())
-    , m_type(type)
-{
-}
-
-void LineBox::InlineLevelBox::setBaseline(InlineLayoutUnit baseline)
-{
-    // FIXME: Remove legacy rounding.
-    m_baseline = roundToInt(baseline);
-}
-
-void LineBox::InlineLevelBox::setDescent(InlineLayoutUnit descent)
-{
-    // FIXME: Remove legacy rounding.
-    m_descent = roundToInt(descent);
-}
-
-void LineBox::InlineLevelBox::setLayoutBounds(const LayoutBounds& layoutBounds)
-{
-    // FIXME: Remove legacy rounding.
-    m_layoutBounds = { InlineLayoutUnit(roundToInt(layoutBounds.ascent)), InlineLayoutUnit(roundToInt(layoutBounds.descent)) };
-}
-
-void LineBox::InlineLevelBox::setLogicalTop(InlineLayoutUnit logicalTop)
-{
-    // FIXME: Remove legacy rounding.
-    m_logicalRect.setTop(roundToInt(logicalTop));
-}
-
-void LineBox::InlineLevelBox::setLogicalHeight(InlineLayoutUnit logicalHeight)
-{
-    // FIXME: Remove legacy rounding.
-    m_logicalRect.setHeight(roundToInt(logicalHeight));
-}
-
-void LineBox::InlineLevelBox::setHasContent()
-{
-    ASSERT(isInlineBox());
-    m_hasContent = true;
-}
-
-bool LineBox::InlineLevelBox::hasLineBoxRelativeAlignment() const
-{
-    auto verticalAlignment = layoutBox().style().verticalAlign();
-    return verticalAlignment == VerticalAlign::Top || verticalAlignment == VerticalAlign::Bottom;
-}
-
</del><span class="cx"> LineBox::LineBox(const Box& rootLayoutBox, const InlineLayoutPoint& logicalTopleft, InlineLayoutUnit lineLogicalWidth, InlineLayoutUnit contentLogicalLeft, InlineLayoutUnit contentLogicalWidth, size_t nonSpanningInlineLevelBoxCount)
</span><span class="cx">     : m_logicalRect(logicalTopleft, InlineLayoutSize { lineLogicalWidth, { } })
</span><span class="cx">     , m_contentLogicalWidth(contentLogicalWidth)
</span></span></pre></div>
<a id="trunkSourceWebCorelayoutformattingContextsinlineInlineLineBoxh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/layout/formattingContexts/inline/InlineLineBox.h (280017 => 280018)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/layout/formattingContexts/inline/InlineLineBox.h    2021-07-17 05:42:32 UTC (rev 280017)
+++ trunk/Source/WebCore/layout/formattingContexts/inline/InlineLineBox.h       2021-07-17 17:27:25 UTC (rev 280018)
</span><span class="lines">@@ -27,6 +27,7 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(LAYOUT_FORMATTING_CONTEXT)
</span><span class="cx"> 
</span><ins>+#include "InlineLevelBox.h"
</ins><span class="cx"> #include "InlineLine.h"
</span><span class="cx"> #include "InlineRect.h"
</span><span class="cx"> #include <wtf/IsoMallocInlines.h>
</span><span class="lines">@@ -59,80 +60,6 @@
</span><span class="cx"> class LineBox {
</span><span class="cx">     WTF_MAKE_FAST_ALLOCATED;
</span><span class="cx"> public:
</span><del>-    struct InlineLevelBox {
-    public:
-        static LineBox::InlineLevelBox createInlineBox(const Box&, InlineLayoutUnit logicalLeft, InlineLayoutUnit logicalWidth);
-        static LineBox::InlineLevelBox createAtomicInlineLevelBox(const Box&, InlineLayoutUnit logicalLeft, InlineLayoutSize);
-        static LineBox::InlineLevelBox createLineBreakBox(const Box&, InlineLayoutUnit logicalLeft);
-        static LineBox::InlineLevelBox createGenericInlineLevelBox(const Box&, InlineLayoutUnit logicalLeft);
-
-        InlineLayoutUnit baseline() const { return m_baseline; }
-        std::optional<InlineLayoutUnit> descent() const { return m_descent; }
-        // See https://www.w3.org/TR/css-inline-3/#layout-bounds
-        struct LayoutBounds {
-            InlineLayoutUnit height() const { return ascent + descent; }
-            bool operator==(const LayoutBounds& other) const { return ascent == other.ascent && descent == other.descent; }
-
-            InlineLayoutUnit ascent { 0 };
-            InlineLayoutUnit descent { 0 };
-        };
-        LayoutBounds layoutBounds() const { return m_layoutBounds; }
-
-        bool hasContent() const { return m_hasContent; }
-        void setHasContent();
-
-        VerticalAlign verticalAlign() const { return layoutBox().style().verticalAlign(); }
-        const Box& layoutBox() const { return *m_layoutBox; }
-        const RenderStyle& style() const { return m_layoutBox->style(); }
-
-        bool isInlineBox() const { return m_type == Type::InlineBox || m_type == Type::RootInlineBox; }
-        bool isRootInlineBox() const { return m_type == Type::RootInlineBox; }
-        bool isAtomicInlineLevelBox() const { return m_type == Type::AtomicInlineLevelBox; }
-        bool isLineBreakBox() const { return m_type == Type::LineBreakBox; }
-        bool hasLineBoxRelativeAlignment() const;
-
-        enum class Type : uint8_t {
-            InlineBox             = 1 << 0,
-            RootInlineBox         = 1 << 1,
-            AtomicInlineLevelBox  = 1 << 2,
-            LineBreakBox          = 1 << 3,
-            GenericInlineLevelBox = 1 << 4
-        };
-        Type type() const { return m_type; }
-
-        InlineLevelBox(const Box&, InlineLayoutUnit logicalLeft, InlineLayoutSize, Type);
-        InlineLevelBox() = default;
-
-    private:
-        friend struct SimplifiedVerticalAlignment;
-        friend class LineBoxBuilder;
-        friend class LineBox;
-
-        const InlineRect& logicalRect() const { return m_logicalRect; }
-        InlineLayoutUnit logicalTop() const { return m_logicalRect.top(); }
-        InlineLayoutUnit logicalBottom() const { return m_logicalRect.bottom(); }
-        InlineLayoutUnit logicalLeft() const { return m_logicalRect.left(); }
-        InlineLayoutUnit logicalWidth() const { return m_logicalRect.width(); }
-        InlineLayoutUnit logicalHeight() const { return m_logicalRect.height(); }
-
-        void setLogicalWidth(InlineLayoutUnit logicalWidth) { m_logicalRect.setWidth(logicalWidth); }
-        void setLogicalHeight(InlineLayoutUnit);
-        void setLogicalTop(InlineLayoutUnit);
-        void setBaseline(InlineLayoutUnit);
-        void setDescent(InlineLayoutUnit);
-        void setLayoutBounds(const LayoutBounds&);
-
-    private:
-        WeakPtr<const Box> m_layoutBox;
-        // This is the combination of margin and border boxes. Inline level boxes are vertically aligned using their margin boxes.
-        InlineRect m_logicalRect;
-        LayoutBounds m_layoutBounds;
-        InlineLayoutUnit m_baseline { 0 };
-        std::optional<InlineLayoutUnit> m_descent;
-        bool m_hasContent { false };
-        Type m_type { Type::InlineBox };
-    };
-
</del><span class="cx">     LineBox(const Box& rootLayoutBox, const InlineLayoutPoint& logicalTopLeft, InlineLayoutUnit contentLogicalLeft, InlineLayoutUnit lineLogicalWidth, InlineLayoutUnit contentLogicalWidth, size_t nonSpanningInlineLevelBoxCount);
</span><span class="cx"> 
</span><span class="cx">     const InlineRect& logicalRect() const { return m_logicalRect; }
</span><span class="lines">@@ -189,27 +116,7 @@
</span><span class="cx">     HashMap<const Box*, size_t> m_nonRootInlineLevelBoxMap;
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-inline LineBox::InlineLevelBox LineBox::InlineLevelBox::createAtomicInlineLevelBox(const Box& layoutBox, InlineLayoutUnit logicalLeft, InlineLayoutSize logicalSize)
-{
-    return LineBox::InlineLevelBox { layoutBox, logicalLeft, logicalSize, Type::AtomicInlineLevelBox };
</del><span class="cx"> }
</span><del>-
-inline LineBox::InlineLevelBox LineBox::InlineLevelBox::createInlineBox(const Box& layoutBox, InlineLayoutUnit logicalLeft, InlineLayoutUnit logicalWidth)
-{
-    return LineBox::InlineLevelBox { layoutBox, logicalLeft, InlineLayoutSize { logicalWidth, { } }, Type::InlineBox };
</del><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline LineBox::InlineLevelBox LineBox::InlineLevelBox::createLineBreakBox(const Box& layoutBox, InlineLayoutUnit logicalLeft)
-{
-    return LineBox::InlineLevelBox { layoutBox, logicalLeft, InlineLayoutSize { }, Type::LineBreakBox };
-}
-
-inline LineBox::InlineLevelBox LineBox::InlineLevelBox::createGenericInlineLevelBox(const Box& layoutBox, InlineLayoutUnit logicalLeft)
-{
-    return LineBox::InlineLevelBox { layoutBox, logicalLeft, InlineLayoutSize { }, Type::GenericInlineLevelBox };
-}
-
-}
-}
-
</del><span class="cx"> #endif
</span></span></pre>
</div>
</div>

</body>
</html>