<!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>[287287] 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/287287">287287</a></dd>
<dt>Author</dt> <dd>zalan@apple.com</dd>
<dt>Date</dt> <dd>2021-12-20 16:33:19 -0800 (Mon, 20 Dec 2021)</dd>
</dl>

<h3>Log Message</h3>
<pre>[LFC][IFC] Decouple LineBox and InlineDisplay:Line construction
https://bugs.webkit.org/show_bug.cgi?id=234519

Reviewed by Antti Koivisto.

Layout::LineBox has logical geometry while InlineDisplay::Line is all physical.
This is also in preparation for supporting RTL lines.

* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* layout/formattingContexts/inline/InlineFormattingContext.cpp:
(WebCore::Layout::InlineFormattingContext::computeGeometryForLineContent):
* layout/formattingContexts/inline/InlineLevelBox.h:
* layout/formattingContexts/inline/InlineLineBoxBuilder.cpp:
(WebCore::Layout::LineBoxBuilder::build):
* layout/formattingContexts/inline/InlineLineBoxBuilder.h:
* layout/formattingContexts/inline/display/InlineDisplayLineBuilder.cpp: Added.
(WebCore::Layout::InlineDisplayLineBuilder::InlineDisplayLineBuilder):
(WebCore::Layout::InlineDisplayLineBuilder::build):
* layout/formattingContexts/inline/display/InlineDisplayLineBuilder.h: Copied from Source/WebCore/layout/formattingContexts/inline/InlineLineBoxBuilder.h.
(WebCore::Layout::InlineDisplayLineBuilder::formattingContext const):
(WebCore::Layout::InlineDisplayLineBuilder::root const):
(WebCore::Layout::InlineDisplayLineBuilder::layoutState const):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreSourcestxt">trunk/Source/WebCore/Sources.txt</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCorelayoutformattingContextsinlineInlineFormattingContextcpp">trunk/Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.cpp</a></li>
<li><a href="#trunkSourceWebCorelayoutformattingContextsinlineInlineLevelBoxh">trunk/Source/WebCore/layout/formattingContexts/inline/InlineLevelBox.h</a></li>
<li><a href="#trunkSourceWebCorelayoutformattingContextsinlineInlineLineBoxBuildercpp">trunk/Source/WebCore/layout/formattingContexts/inline/InlineLineBoxBuilder.cpp</a></li>
<li><a href="#trunkSourceWebCorelayoutformattingContextsinlineInlineLineBoxBuilderh">trunk/Source/WebCore/layout/formattingContexts/inline/InlineLineBoxBuilder.h</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebCorelayoutformattingContextsinlinedisplayInlineDisplayLineBuildercpp">trunk/Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayLineBuilder.cpp</a></li>
<li><a href="#trunkSourceWebCorelayoutformattingContextsinlinedisplayInlineDisplayLineBuilderh">trunk/Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayLineBuilder.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (287286 => 287287)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog   2021-12-21 00:24:53 UTC (rev 287286)
+++ trunk/Source/WebCore/ChangeLog      2021-12-21 00:33:19 UTC (rev 287287)
</span><span class="lines">@@ -1,3 +1,29 @@
</span><ins>+2021-12-20  Alan Bujtas  <zalan@apple.com>
+
+        [LFC][IFC] Decouple LineBox and InlineDisplay:Line construction
+        https://bugs.webkit.org/show_bug.cgi?id=234519
+
+        Reviewed by Antti Koivisto.
+
+        Layout::LineBox has logical geometry while InlineDisplay::Line is all physical.
+        This is also in preparation for supporting RTL lines.
+
+        * Sources.txt:
+        * WebCore.xcodeproj/project.pbxproj:
+        * layout/formattingContexts/inline/InlineFormattingContext.cpp:
+        (WebCore::Layout::InlineFormattingContext::computeGeometryForLineContent):
+        * layout/formattingContexts/inline/InlineLevelBox.h:
+        * layout/formattingContexts/inline/InlineLineBoxBuilder.cpp:
+        (WebCore::Layout::LineBoxBuilder::build):
+        * layout/formattingContexts/inline/InlineLineBoxBuilder.h:
+        * layout/formattingContexts/inline/display/InlineDisplayLineBuilder.cpp: Added.
+        (WebCore::Layout::InlineDisplayLineBuilder::InlineDisplayLineBuilder):
+        (WebCore::Layout::InlineDisplayLineBuilder::build):
+        * layout/formattingContexts/inline/display/InlineDisplayLineBuilder.h: Copied from Source/WebCore/layout/formattingContexts/inline/InlineLineBoxBuilder.h.
+        (WebCore::Layout::InlineDisplayLineBuilder::formattingContext const):
+        (WebCore::Layout::InlineDisplayLineBuilder::root const):
+        (WebCore::Layout::InlineDisplayLineBuilder::layoutState const):
+
</ins><span class="cx"> 2021-12-20  Matt Woodrow  <mattwoodrow@apple.com>
</span><span class="cx"> 
</span><span class="cx">         Don't include SVGImageForContainers in allCachedSVGImages
</span></span></pre></div>
<a id="trunkSourceWebCoreSourcestxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Sources.txt (287286 => 287287)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Sources.txt 2021-12-21 00:24:53 UTC (rev 287286)
+++ trunk/Source/WebCore/Sources.txt    2021-12-21 00:33:19 UTC (rev 287287)
</span><span class="lines">@@ -1568,6 +1568,7 @@
</span><span class="cx"> layout/formattingContexts/inline/InlineLineBoxVerticalAligner.cpp
</span><span class="cx"> layout/formattingContexts/inline/InlineTextItem.cpp
</span><span class="cx"> layout/formattingContexts/inline/display/InlineDisplayContentBuilder.cpp
</span><ins>+layout/formattingContexts/inline/display/InlineDisplayLineBuilder.cpp
</ins><span class="cx"> layout/formattingContexts/inline/invalidation/InlineInvalidation.cpp
</span><span class="cx"> layout/formattingContexts/inline/text/TextUtil.cpp
</span><span class="cx"> layout/integration/InlineIteratorBox.cpp
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (287286 => 287287)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj   2021-12-21 00:24:53 UTC (rev 287286)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj      2021-12-21 00:33:19 UTC (rev 287287)
</span><span class="lines">@@ -2206,6 +2206,7 @@
</span><span class="cx">          6F40DA822513033A00EC04B7 /* InlineRect.h in Headers */ = {isa = PBXBuildFile; fileRef = 6F40DA812513033A00EC04B7 /* InlineRect.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">          6F49C3E726479B3C0051953D /* TableFormattingQuirks.h in Headers */ = {isa = PBXBuildFile; fileRef = 6F49C3E626479B3B0051953D /* TableFormattingQuirks.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">          6F56B44726479E6200AAE257 /* FormattingQuirks.h in Headers */ = {isa = PBXBuildFile; fileRef = 6F56B44626479E6100AAE257 /* FormattingQuirks.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><ins>+               6F60E5AA27710F39005C15B9 /* InlineDisplayLineBuilder.h in Headers */ = {isa = PBXBuildFile; fileRef = 6F60E5A927710F39005C15B9 /* InlineDisplayLineBuilder.h */; settings = {ATTRIBUTES = (Private, ); }; };
</ins><span class="cx">           6F6383F62427AF4A00DABA53 /* LayoutInitialContainingBlock.h in Headers */ = {isa = PBXBuildFile; fileRef = 6F6383F42427AF4900DABA53 /* LayoutInitialContainingBlock.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">          6F6DF36F264722EA0093E834 /* BlockMarginCollapse.h in Headers */ = {isa = PBXBuildFile; fileRef = 6F6DF36E264722EA0093E834 /* BlockMarginCollapse.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">          6F6EE74326D44EE300374CDA /* InlineLineBoxVerticalAligner.h in Headers */ = {isa = PBXBuildFile; fileRef = 6F6EE74126D44EE200374CDA /* InlineLineBoxVerticalAligner.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="lines">@@ -10884,6 +10885,8 @@
</span><span class="cx">          6F4A5BD522F9F16B00A80F25 /* LayoutPhase.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = LayoutPhase.cpp; sourceTree = "<group>"; };
</span><span class="cx">          6F56B44626479E6100AAE257 /* FormattingQuirks.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FormattingQuirks.h; sourceTree = "<group>"; };
</span><span class="cx">          6F5B7EAA2300A79E0067D9C3 /* TableGrid.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TableGrid.cpp; sourceTree = "<group>"; };
</span><ins>+               6F60E5A727710F2F005C15B9 /* InlineDisplayLineBuilder.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = InlineDisplayLineBuilder.cpp; sourceTree = "<group>"; };
+               6F60E5A927710F39005C15B9 /* InlineDisplayLineBuilder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InlineDisplayLineBuilder.h; sourceTree = "<group>"; };
</ins><span class="cx">           6F6383F42427AF4900DABA53 /* LayoutInitialContainingBlock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LayoutInitialContainingBlock.h; sourceTree = "<group>"; };
</span><span class="cx">          6F6638D4249E268B001925FC /* TableWrapperBlockFormattingQuirks.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TableWrapperBlockFormattingQuirks.cpp; sourceTree = "<group>"; };
</span><span class="cx">          6F69A79924D6FAB800E6B85D /* InlineLineBox.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = InlineLineBox.cpp; sourceTree = "<group>"; };
</span><span class="lines">@@ -19254,6 +19257,8 @@
</span><span class="cx">          11A1E6FB26FBB6CE00435D36 /* display */ = {
</span><span class="cx">                  isa = PBXGroup;
</span><span class="cx">                  children = (
</span><ins>+                               6F60E5A927710F39005C15B9 /* InlineDisplayLineBuilder.h */,
+                               6F60E5A727710F2F005C15B9 /* InlineDisplayLineBuilder.cpp */,
</ins><span class="cx">                           6FC3F9452516756600A49BEA /* InlineDisplayBox.h */,
</span><span class="cx">                          11513D0026D981DD004D3FAA /* InlineDisplayContentBuilder.cpp */,
</span><span class="cx">                          11513D0226D981E7004D3FAA /* InlineDisplayContentBuilder.h */,
</span><span class="lines">@@ -20750,8 +20755,8 @@
</span><span class="cx">                          510E2F2C276BE0C300809333 /* NotificationEvent.cpp */,
</span><span class="cx">                          510E2F24276BB4EC00809333 /* NotificationEvent.h */,
</span><span class="cx">                          510E2F22276BA9E800809333 /* NotificationEvent.idl */,
</span><ins>+                               510E2F26276BC19F00809333 /* NotificationOptions.h */,
</ins><span class="cx">                           51E3AF0A276B05B7009B429D /* NotificationOptions.idl */,
</span><del>-                               510E2F26276BC19F00809333 /* NotificationOptions.h */,
</del><span class="cx">                           7CC2DDF81EC9415A0027B774 /* NotificationPermission.h */,
</span><span class="cx">                          7CC2DDFA1EC9415A0027B774 /* NotificationPermission.idl */,
</span><span class="cx">                          31EC1DAC14FF26EA00C94662 /* NotificationPermissionCallback.h */,
</span><span class="lines">@@ -33592,7 +33597,6 @@
</span><span class="cx">                          CD8D306F23AD4FA8006C3975 /* CDMLogging.h in Headers */,
</span><span class="cx">                          CD3CE0FE2401AAD9004BA01D /* CDMMediaCapability.h in Headers */,
</span><span class="cx">                          CD3CE0FF2401AADA004BA01D /* CDMMessageType.h in Headers */,
</span><del>-                               510E2F33276BF68500809333 /* JSNotificationDirection.h in Headers */,
</del><span class="cx">                           CD3CE1002401AADA004BA01D /* CDMPrivate.h in Headers */,
</span><span class="cx">                          CD318623199F1E2A0030A0F7 /* CDMPrivateMediaSourceAVFObjC.h in Headers */,
</span><span class="cx">                          CD3CE1012401AADA004BA01D /* CDMProxy.h in Headers */,
</span><span class="lines">@@ -34537,7 +34541,6 @@
</span><span class="cx">                          CDA595932146DEC300A84185 /* HEVCUtilities.h in Headers */,
</span><span class="cx">                          CDA595982146DF7800A84185 /* HEVCUtilitiesCocoa.h in Headers */,
</span><span class="cx">                          F55B3DC01251F12D003EF269 /* HiddenInputType.h in Headers */,
</span><del>-                               510E2F27276BC19F00809333 /* NotificationOptions.h in Headers */,
</del><span class="cx">                           510A91EB24D004C800BFD89C /* HIDDevice.h in Headers */,
</span><span class="cx">                          510A91EA24D004C300BFD89C /* HIDElement.h in Headers */,
</span><span class="cx">                          515BE19C1D54F6C100DD7C68 /* HIDGamepad.h in Headers */,
</span><span class="lines">@@ -34613,7 +34616,6 @@
</span><span class="cx">                          A81369CC097374F600D74463 /* HTMLInputElement.h in Headers */,
</span><span class="cx">                          835D2D781F5F1FBD00141DED /* HTMLInputElementEntriesAPI.h in Headers */,
</span><span class="cx">                          97BC849B12370A4B000C6161 /* HTMLInputStream.h in Headers */,
</span><del>-                               510E2F25276BB4EC00809333 /* NotificationEvent.h in Headers */,
</del><span class="cx">                           93309DE6099E64920056E581 /* HTMLInterchange.h in Headers */,
</span><span class="cx">                          A81369E4097374F600D74463 /* HTMLKeygenElement.h in Headers */,
</span><span class="cx">                          A81369E2097374F600D74463 /* HTMLLabelElement.h in Headers */,
</span><span class="lines">@@ -35240,7 +35242,6 @@
</span><span class="cx">                          1C24EEA91C72A7B40080F8FC /* JSFontFaceSet.h in Headers */,
</span><span class="cx">                          FDA15EAC12B03EE1003A583A /* JSGainNode.h in Headers */,
</span><span class="cx">                          518F5002194CAC3A0081BAAE /* JSGamepad.h in Headers */,
</span><del>-                               510E2F35276BF68500809333 /* JSNotificationOptions.h in Headers */,
</del><span class="cx">                           518F5004194CAC3A0081BAAE /* JSGamepadButton.h in Headers */,
</span><span class="cx">                          FE80DA640E9C4703000D6F75 /* JSGeolocation.h in Headers */,
</span><span class="cx">                          FE80DA660E9C4703000D6F75 /* JSGeoposition.h in Headers */,
</span><span class="lines">@@ -35412,6 +35413,9 @@
</span><span class="cx">                          BCD9C2C30C17B69E005C90A2 /* JSNodeList.h in Headers */,
</span><span class="cx">                          AD20B18D18E9D237005A8083 /* JSNodeListCustom.h in Headers */,
</span><span class="cx">                          33503CA410179AD7003B47E1 /* JSNotification.h in Headers */,
</span><ins>+                               510E2F33276BF68500809333 /* JSNotificationDirection.h in Headers */,
+                               510E2F2B276BCFE800809333 /* JSNotificationEvent.h in Headers */,
+                               510E2F35276BF68500809333 /* JSNotificationOptions.h in Headers */,
</ins><span class="cx">                           7CC2DE011EC95A440027B774 /* JSNotificationPermission.h in Headers */,
</span><span class="cx">                          31EC1E2914FF60EE00C94662 /* JSNotificationPermissionCallback.h in Headers */,
</span><span class="cx">                          7E46F6FB1627A2CA00062223 /* JSOESElementIndexUint.h in Headers */,
</span><span class="lines">@@ -36180,7 +36184,6 @@
</span><span class="cx">                          E596DD29251903D200C275A7 /* NavigatorContacts.h in Headers */,
</span><span class="cx">                          F4034FAE275EAD76003A81F8 /* NavigatorCookieConsent.h in Headers */,
</span><span class="cx">                          372D3E57216578AE00C5E021 /* NavigatorCredentials.h in Headers */,
</span><del>-                               510E2F2B276BCFE800809333 /* JSNotificationEvent.h in Headers */,
</del><span class="cx">                           9711460414EF009A00674FD9 /* NavigatorGeolocation.h in Headers */,
</span><span class="cx">                          6B507A24234BF34100BE7C62 /* NavigatorIsLoggedIn.h in Headers */,
</span><span class="cx">                          5EA725D61ACABD5700EAD17B /* NavigatorMediaDevices.h in Headers */,
</span><span class="lines">@@ -36217,6 +36220,8 @@
</span><span class="cx">                          3128CA6B147331630074C72A /* NotificationController.h in Headers */,
</span><span class="cx">                          51123E2F276940CA00F9D41B /* NotificationData.h in Headers */,
</span><span class="cx">                          7CC2DE031ECA04A50027B774 /* NotificationDirection.h in Headers */,
</span><ins>+                               510E2F25276BB4EC00809333 /* NotificationEvent.h in Headers */,
+                               510E2F27276BC19F00809333 /* NotificationOptions.h in Headers */,
</ins><span class="cx">                           7CC2DDFB1EC9415A0027B774 /* NotificationPermission.h in Headers */,
</span><span class="cx">                          31FE6DFA15004C2A0004EBC4 /* NotificationPermissionCallback.h in Headers */,
</span><span class="cx">                          98EB1F951313FE0500D0E1EA /* NotImplemented.h in Headers */,
</span><span class="lines">@@ -37661,6 +37666,7 @@
</span><span class="cx">                          BEF29EEC1715DD0900C4B4C9 /* VideoTrackPrivate.h in Headers */,
</span><span class="cx">                          CD336F6417FA0A4D00DDDCD0 /* VideoTrackPrivateAVF.h in Headers */,
</span><span class="cx">                          CD336F6817FA0AC600DDDCD0 /* VideoTrackPrivateAVFObjC.h in Headers */,
</span><ins>+                               6F60E5AA27710F39005C15B9 /* InlineDisplayLineBuilder.h in Headers */,
</ins><span class="cx">                           CD1F9B14270235F700617EB6 /* VideoTrackPrivateClient.h in Headers */,
</span><span class="cx">                          CD8B5A43180D149A008B8E65 /* VideoTrackPrivateMediaSourceAVFObjC.h in Headers */,
</span><span class="cx">                          070E81D11BF27656001FDA48 /* VideoTrackPrivateMediaStream.h in Headers */,
</span></span></pre></div>
<a id="trunkSourceWebCorelayoutformattingContextsinlineInlineFormattingContextcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.cpp (287286 => 287287)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.cpp        2021-12-21 00:24:53 UTC (rev 287286)
+++ trunk/Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.cpp   2021-12-21 00:33:19 UTC (rev 287287)
</span><span class="lines">@@ -33,6 +33,7 @@
</span><span class="cx"> #include "InlineDamage.h"
</span><span class="cx"> #include "InlineDisplayBox.h"
</span><span class="cx"> #include "InlineDisplayContentBuilder.h"
</span><ins>+#include "InlineDisplayLineBuilder.h"
</ins><span class="cx"> #include "InlineFormattingState.h"
</span><span class="cx"> #include "InlineItemsBuilder.h"
</span><span class="cx"> #include "InlineLineBox.h"
</span><span class="lines">@@ -551,15 +552,17 @@
</span><span class="cx">     auto& formattingState = this->formattingState();
</span><span class="cx">     auto currentLineIndex = formattingState.lines().size();
</span><span class="cx"> 
</span><del>-    auto lineAndLineBox = LineBoxBuilder(*this).build(lineContent, currentLineIndex);
-    auto lineBoxLogicalRect = lineAndLineBox.line.lineBoxRect();
</del><ins>+    auto lineBoxAndHeight = LineBoxBuilder(*this).build(lineContent, currentLineIndex);
</ins><span class="cx"> 
</span><ins>+    auto displayLine = InlineDisplayLineBuilder(*this).build(lineContent, lineBoxAndHeight.lineBox, lineBoxAndHeight.lineBoxLogicalHeight, currentLineIndex);
+    auto displayLineBoxRect = displayLine.lineBoxRect();
+
</ins><span class="cx">     auto inlineContentBuilder = InlineDisplayContentBuilder { root(), formattingState };
</span><del>-    formattingState.addBoxes(inlineContentBuilder.build(lineContent, lineAndLineBox.lineBox, lineBoxLogicalRect, currentLineIndex));
-    formattingState.addLineBox(WTFMove(lineAndLineBox.lineBox));
-    formattingState.addLine(lineAndLineBox.line);
</del><ins>+    formattingState.addBoxes(inlineContentBuilder.build(lineContent, lineBoxAndHeight.lineBox, displayLineBoxRect, currentLineIndex));
+    formattingState.addLineBox(WTFMove(lineBoxAndHeight.lineBox));
+    formattingState.addLine(displayLine);
</ins><span class="cx"> 
</span><del>-    return lineBoxLogicalRect;
</del><ins>+    return displayLineBoxRect;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void InlineFormattingContext::invalidateFormattingState()
</span></span></pre></div>
<a id="trunkSourceWebCorelayoutformattingContextsinlineInlineLevelBoxh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/layout/formattingContexts/inline/InlineLevelBox.h (287286 => 287287)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/layout/formattingContexts/inline/InlineLevelBox.h   2021-12-21 00:24:53 UTC (rev 287286)
+++ trunk/Source/WebCore/layout/formattingContexts/inline/InlineLevelBox.h      2021-12-21 00:33:19 UTC (rev 287287)
</span><span class="lines">@@ -102,6 +102,7 @@
</span><span class="cx">     };
</span><span class="cx">     InlineLevelBox(const Box&, const RenderStyle&, InlineLayoutUnit logicalLeft, InlineLayoutSize, Type, OptionSet<PositionWithinLayoutBox> = { PositionWithinLayoutBox::First, PositionWithinLayoutBox::Last });
</span><span class="cx"> 
</span><ins>+    friend class InlineDisplayLineBuilder;
</ins><span class="cx">     friend class LineBox;
</span><span class="cx">     friend class LineBoxBuilder;
</span><span class="cx">     friend class LineBoxVerticalAligner;
</span></span></pre></div>
<a id="trunkSourceWebCorelayoutformattingContextsinlineInlineLineBoxBuildercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/layout/formattingContexts/inline/InlineLineBoxBuilder.cpp (287286 => 287287)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/layout/formattingContexts/inline/InlineLineBoxBuilder.cpp   2021-12-21 00:24:53 UTC (rev 287286)
+++ trunk/Source/WebCore/layout/formattingContexts/inline/InlineLineBoxBuilder.cpp      2021-12-21 00:33:19 UTC (rev 287287)
</span><span class="lines">@@ -103,59 +103,13 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-LineBoxBuilder::LineAndLineBox LineBoxBuilder::build(const LineBuilder::LineContent& lineContent, size_t lineIndex)
</del><ins>+LineBoxBuilder::LineBoxAndHeight LineBoxBuilder::build(const LineBuilder::LineContent& lineContent, size_t lineIndex)
</ins><span class="cx"> {
</span><span class="cx">     auto& rootStyle = lineIndex ? rootBox().firstLineStyle() : rootBox().style();
</span><span class="cx">     auto rootInlineBoxAlignmentOffset = Layout::horizontalAlignmentOffset(rootStyle.textAlign(), lineContent, rootStyle.isLeftToRightDirection()).value_or(InlineLayoutUnit { });
</span><span class="cx">     auto lineBox = LineBox { rootBox(), rootInlineBoxAlignmentOffset, lineContent.contentLogicalWidth, lineIndex, lineContent.nonSpanningInlineLevelBoxCount };
</span><del>-
</del><span class="cx">     auto lineBoxLogicalHeight = constructAndAlignInlineLevelBoxes(lineBox, lineContent.runs, lineIndex);
</span><del>-
-    auto line = [&] {
-        auto physicalLeft = lineContent.lineLogicalTopLeft.x();
-        if (!rootStyle.isLeftToRightDirection()) {
-            // https://drafts.csswg.org/css-text/#text-indent-property
-            // Since text-indent only initiates margin start, we just need to pull the linebox back to the left.
-            physicalLeft -= lineContent.lineMarginStart;
-        }
-        // FIXME: Use physical geometry here.
-        auto lineBoxRect = InlineRect { lineContent.lineLogicalTopLeft.y(), physicalLeft, lineContent.lineLogicalWidth, lineBoxLogicalHeight };
-        auto scrollableOverflowRect = lineBoxRect;
-        auto& rootInlineBox = lineBox.rootInlineBox();
-        auto enclosingTopAndBottom = InlineDisplay::Line::EnclosingTopAndBottom { lineBoxRect.top() + rootInlineBox.logicalTop(), lineBoxRect.top() + rootInlineBox.logicalBottom() };
-
-        for (auto& inlineLevelBox : lineBox.nonRootInlineLevelBoxes()) {
-            if (!inlineLevelBox.isAtomicInlineLevelBox() && !inlineLevelBox.isInlineBox())
-                continue;
-
-            auto& layoutBox = inlineLevelBox.layoutBox();
-            auto borderBox = InlineRect { };
-
-            if (inlineLevelBox.isAtomicInlineLevelBox()) {
-                borderBox = lineBox.logicalBorderBoxForAtomicInlineLevelBox(layoutBox, formattingContext().geometryForBox(layoutBox));
-                borderBox.moveBy(lineBoxRect.topLeft());
-            } else if (inlineLevelBox.isInlineBox()) {
-                auto& boxGeometry = formattingContext().geometryForBox(layoutBox);
-                borderBox = lineBox.logicalBorderBoxForInlineBox(layoutBox, boxGeometry);
-                borderBox.moveBy(lineBoxRect.topLeft());
-                // Collect scrollable overflow from inline boxes. All other inline level boxes (e.g atomic inline level boxes) stretch the line.
-                auto hasScrollableContent = [&] {
-                    // In standards mode, inline boxes always start with an imaginary strut.
-                    return layoutState().inStandardsMode() || inlineLevelBox.hasContent() || boxGeometry.horizontalBorder() || (boxGeometry.horizontalPadding() && boxGeometry.horizontalPadding().value());
-                };
-                if (lineBox.hasContent() && hasScrollableContent()) {
-                    // Empty lines (e.g. continuation pre/post blocks) don't expect scrollbar overflow.
-                    scrollableOverflowRect.expandToContain(borderBox);
-                }
-            } else
-                ASSERT_NOT_REACHED();
-
-            enclosingTopAndBottom.top = std::min(enclosingTopAndBottom.top, borderBox.top());
-            enclosingTopAndBottom.bottom = std::max(enclosingTopAndBottom.bottom, borderBox.bottom());
-        }
-        return InlineDisplay::Line { lineBoxRect, scrollableOverflowRect, enclosingTopAndBottom, rootInlineBox.logicalTop() + rootInlineBox.baseline(), rootInlineBoxAlignmentOffset + rootInlineBox.logicalLeft(), rootInlineBox.logicalWidth() };
-    };
-    return { line(), lineBox };
</del><ins>+    return { lineBox, lineBoxLogicalHeight };
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void LineBoxBuilder::adjustVerticalGeometryForInlineBoxWithFallbackFonts(InlineLevelBox& inlineBox, const TextUtil::FallbackFontList& fallbackFontsForContent) const
</span></span></pre></div>
<a id="trunkSourceWebCorelayoutformattingContextsinlineInlineLineBoxBuilderh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/layout/formattingContexts/inline/InlineLineBoxBuilder.h (287286 => 287287)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/layout/formattingContexts/inline/InlineLineBoxBuilder.h     2021-12-21 00:24:53 UTC (rev 287286)
+++ trunk/Source/WebCore/layout/formattingContexts/inline/InlineLineBoxBuilder.h        2021-12-21 00:33:19 UTC (rev 287287)
</span><span class="lines">@@ -27,9 +27,7 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(LAYOUT_FORMATTING_CONTEXT)
</span><span class="cx"> 
</span><del>-#include "InlineDisplayLine.h"
</del><span class="cx"> #include "InlineFormattingContext.h"
</span><del>-#include "InlineLineBox.h"
</del><span class="cx"> #include "InlineLineBuilder.h"
</span><span class="cx"> #include "TextUtil.h"
</span><span class="cx"> 
</span><span class="lines">@@ -44,11 +42,11 @@
</span><span class="cx"> public:
</span><span class="cx">     LineBoxBuilder(const InlineFormattingContext&);
</span><span class="cx"> 
</span><del>-    struct LineAndLineBox {
-        InlineDisplay::Line line;
</del><ins>+    struct LineBoxAndHeight {
</ins><span class="cx">         LineBox lineBox;
</span><ins>+        InlineLayoutUnit lineBoxLogicalHeight;
</ins><span class="cx">     };
</span><del>-    LineAndLineBox build(const LineBuilder::LineContent&, size_t lineIndex);
</del><ins>+    LineBoxAndHeight build(const LineBuilder::LineContent&, size_t lineIndex);
</ins><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     void setInitialVerticalGeometryForInlineBox(InlineLevelBox&) const;
</span></span></pre></div>
<a id="trunkSourceWebCorelayoutformattingContextsinlinedisplayInlineDisplayLineBuildercpp"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayLineBuilder.cpp (0 => 287287)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayLineBuilder.cpp                               (rev 0)
+++ trunk/Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayLineBuilder.cpp  2021-12-21 00:33:19 UTC (rev 287287)
</span><span class="lines">@@ -0,0 +1,88 @@
</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.
+ */
+
+#include "config.h"
+#include "InlineDisplayLineBuilder.h"
+
+#if ENABLE(LAYOUT_FORMATTING_CONTEXT)
+namespace WebCore {
+namespace Layout {
+
+InlineDisplayLineBuilder::InlineDisplayLineBuilder(const InlineFormattingContext& inlineFormattingContext)
+    : m_inlineFormattingContext(inlineFormattingContext)
+{
+}
+
+InlineDisplay::Line InlineDisplayLineBuilder::build(const LineBuilder::LineContent& lineContent, const LineBox& lineBox, InlineLayoutUnit lineBoxLogicalHeight, size_t lineIndex)
+{
+    auto& rootStyle = lineIndex ? root().firstLineStyle() : root().style();
+    auto physicalLeft = lineContent.lineLogicalTopLeft.x();
+    if (!rootStyle.isLeftToRightDirection()) {
+        // https://drafts.csswg.org/css-text/#text-indent-property
+        // Since text-indent only initiates margin start, we just need to pull the linebox back to the left.
+        physicalLeft -= lineContent.lineMarginStart;
+    }
+    // FIXME: Use physical geometry here.
+    auto lineBoxRect = InlineRect { lineContent.lineLogicalTopLeft.y(), physicalLeft, lineContent.lineLogicalWidth, lineBoxLogicalHeight };
+    auto scrollableOverflowRect = lineBoxRect;
+    auto& rootInlineBox = lineBox.rootInlineBox();
+    auto enclosingTopAndBottom = InlineDisplay::Line::EnclosingTopAndBottom { lineBoxRect.top() + rootInlineBox.logicalTop(), lineBoxRect.top() + rootInlineBox.logicalBottom() };
+
+    for (auto& inlineLevelBox : lineBox.nonRootInlineLevelBoxes()) {
+        if (!inlineLevelBox.isAtomicInlineLevelBox() && !inlineLevelBox.isInlineBox())
+            continue;
+
+        auto& layoutBox = inlineLevelBox.layoutBox();
+        auto borderBox = InlineRect { };
+
+        if (inlineLevelBox.isAtomicInlineLevelBox()) {
+            borderBox = lineBox.logicalBorderBoxForAtomicInlineLevelBox(layoutBox, formattingContext().geometryForBox(layoutBox));
+            borderBox.moveBy(lineBoxRect.topLeft());
+        } else if (inlineLevelBox.isInlineBox()) {
+            auto& boxGeometry = formattingContext().geometryForBox(layoutBox);
+            borderBox = lineBox.logicalBorderBoxForInlineBox(layoutBox, boxGeometry);
+            borderBox.moveBy(lineBoxRect.topLeft());
+            // Collect scrollable overflow from inline boxes. All other inline level boxes (e.g atomic inline level boxes) stretch the line.
+            auto hasScrollableContent = [&] {
+                // In standards mode, inline boxes always start with an imaginary strut.
+                return layoutState().inStandardsMode() || inlineLevelBox.hasContent() || boxGeometry.horizontalBorder() || (boxGeometry.horizontalPadding() && boxGeometry.horizontalPadding().value());
+            };
+            if (lineBox.hasContent() && hasScrollableContent()) {
+                // Empty lines (e.g. continuation pre/post blocks) don't expect scrollbar overflow.
+                scrollableOverflowRect.expandToContain(borderBox);
+            }
+        } else
+            ASSERT_NOT_REACHED();
+
+        enclosingTopAndBottom.top = std::min(enclosingTopAndBottom.top, borderBox.top());
+        enclosingTopAndBottom.bottom = std::max(enclosingTopAndBottom.bottom, borderBox.bottom());
+    }
+    return InlineDisplay::Line { lineBoxRect, scrollableOverflowRect, enclosingTopAndBottom, rootInlineBox.logicalTop() + rootInlineBox.baseline(), lineBox.rootInlineBoxAlignmentOffset() + rootInlineBox.logicalLeft(), rootInlineBox.logicalWidth() };
+}
+
+}
+}
+
+#endif
</ins></span></pre></div>
<a id="trunkSourceWebCorelayoutformattingContextsinlinedisplayInlineDisplayLineBuilderhfromrev287286trunkSourceWebCorelayoutformattingContextsinlineInlineLineBoxBuilderh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayLineBuilder.h (from rev 287286, trunk/Source/WebCore/layout/formattingContexts/inline/InlineLineBoxBuilder.h) (0 => 287287)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayLineBuilder.h                         (rev 0)
+++ trunk/Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayLineBuilder.h    2021-12-21 00:33:19 UTC (rev 287287)
</span><span class="lines">@@ -0,0 +1,56 @@
</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 "InlineDisplayLine.h"
+#include "InlineFormattingContext.h"
+#include "InlineLineBuilder.h"
+
+namespace WebCore {
+namespace Layout {
+
+class LineBox;
+
+class InlineDisplayLineBuilder {
+public:
+    InlineDisplayLineBuilder(const InlineFormattingContext&);
+
+    InlineDisplay::Line build(const LineBuilder::LineContent&, const LineBox&, InlineLayoutUnit lineBoxLogicalHeight, size_t lineIndex);
+
+private:
+    const InlineFormattingContext& formattingContext() const { return m_inlineFormattingContext; }
+    const Box& root() const { return formattingContext().root(); }
+    LayoutState& layoutState() const { return formattingContext().layoutState(); }
+
+    const InlineFormattingContext& m_inlineFormattingContext;
+};
+
+}
+}
+
+#endif
</ins></span></pre>
</div>
</div>

</body>
</html>