<!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>[277542] 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/277542">277542</a></dd>
<dt>Author</dt> <dd>zalan@apple.com</dd>
<dt>Date</dt> <dd>2021-05-15 10:50:07 -0700 (Sat, 15 May 2021)</dd>
</dl>

<h3>Log Message</h3>
<pre>[LFC] Move block formatting quirks to its own class
https://bugs.webkit.org/show_bug.cgi?id=225761

Reviewed by Antti Koivisto.

* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* layout/formattingContexts/FormattingContext.h:
(WebCore::Layout::FormattingContext::Quirks::layoutState const):
(WebCore::Layout::FormattingContext::Quirks::layoutState):
(WebCore::Layout::FormattingContext::Quirks::formattingContext const):
(WebCore::Layout::FormattingContext::quirks const):
* layout/formattingContexts/block/BlockFormattingContext.cpp:
(WebCore::Layout::BlockFormattingContext::quirks const):
* layout/formattingContexts/block/BlockFormattingContext.h:
(WebCore::Layout::BlockFormattingContext::Quirks::formattingContext const): Deleted.
(WebCore::Layout::BlockFormattingContext::Quirks::geometry const): Deleted.
(WebCore::Layout::BlockFormattingContext::quirks const): Deleted.
(WebCore::Layout::BlockFormattingContext::Quirks::Quirks): Deleted.
* layout/formattingContexts/block/BlockFormattingContextQuirks.cpp: Removed.
* layout/formattingContexts/block/BlockMarginCollapse.cpp:
* layout/formattingContexts/block/tablewrapper/TableWrapperBlockFormattingContext.h:
(WebCore::Layout::TableWrapperBlockFormattingContext::Quirks::Quirks):</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="#trunkSourceWebCorelayoutformattingContextsFormattingContexth">trunk/Source/WebCore/layout/formattingContexts/FormattingContext.h</a></li>
<li><a href="#trunkSourceWebCorelayoutformattingContextsblockBlockFormattingContextcpp">trunk/Source/WebCore/layout/formattingContexts/block/BlockFormattingContext.cpp</a></li>
<li><a href="#trunkSourceWebCorelayoutformattingContextsblockBlockFormattingContexth">trunk/Source/WebCore/layout/formattingContexts/block/BlockFormattingContext.h</a></li>
<li><a href="#trunkSourceWebCorelayoutformattingContextsblockBlockMarginCollapsecpp">trunk/Source/WebCore/layout/formattingContexts/block/BlockMarginCollapse.cpp</a></li>
<li><a href="#trunkSourceWebCorelayoutformattingContextsblocktablewrapperTableWrapperBlockFormattingContexth">trunk/Source/WebCore/layout/formattingContexts/block/tablewrapper/TableWrapperBlockFormattingContext.h</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebCorelayoutformattingContextsblockBlockFormattingQuirkscpp">trunk/Source/WebCore/layout/formattingContexts/block/BlockFormattingQuirks.cpp</a></li>
<li><a href="#trunkSourceWebCorelayoutformattingContextsblockBlockFormattingQuirksh">trunk/Source/WebCore/layout/formattingContexts/block/BlockFormattingQuirks.h</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkSourceWebCorelayoutformattingContextsblockBlockFormattingContextQuirkscpp">trunk/Source/WebCore/layout/formattingContexts/block/BlockFormattingContextQuirks.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (277541 => 277542)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog   2021-05-15 16:59:57 UTC (rev 277541)
+++ trunk/Source/WebCore/ChangeLog      2021-05-15 17:50:07 UTC (rev 277542)
</span><span class="lines">@@ -1,5 +1,31 @@
</span><span class="cx"> 2021-05-15  Alan Bujtas  <zalan@apple.com>
</span><span class="cx"> 
</span><ins>+        [LFC] Move block formatting quirks to its own class
+        https://bugs.webkit.org/show_bug.cgi?id=225761
+
+        Reviewed by Antti Koivisto.
+
+        * Sources.txt:
+        * WebCore.xcodeproj/project.pbxproj:
+        * layout/formattingContexts/FormattingContext.h:
+        (WebCore::Layout::FormattingContext::Quirks::layoutState const):
+        (WebCore::Layout::FormattingContext::Quirks::layoutState):
+        (WebCore::Layout::FormattingContext::Quirks::formattingContext const):
+        (WebCore::Layout::FormattingContext::quirks const):
+        * layout/formattingContexts/block/BlockFormattingContext.cpp:
+        (WebCore::Layout::BlockFormattingContext::quirks const):
+        * layout/formattingContexts/block/BlockFormattingContext.h:
+        (WebCore::Layout::BlockFormattingContext::Quirks::formattingContext const): Deleted.
+        (WebCore::Layout::BlockFormattingContext::Quirks::geometry const): Deleted.
+        (WebCore::Layout::BlockFormattingContext::quirks const): Deleted.
+        (WebCore::Layout::BlockFormattingContext::Quirks::Quirks): Deleted.
+        * layout/formattingContexts/block/BlockFormattingContextQuirks.cpp: Removed.
+        * layout/formattingContexts/block/BlockMarginCollapse.cpp:
+        * layout/formattingContexts/block/tablewrapper/TableWrapperBlockFormattingContext.h:
+        (WebCore::Layout::TableWrapperBlockFormattingContext::Quirks::Quirks):
+
+2021-05-15  Alan Bujtas  <zalan@apple.com>
+
</ins><span class="cx">         [LFC] Move BlockMarginCollapse to its own class
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=225762
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreSourcestxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Sources.txt (277541 => 277542)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Sources.txt 2021-05-15 16:59:57 UTC (rev 277541)
+++ trunk/Source/WebCore/Sources.txt    2021-05-15 17:50:07 UTC (rev 277542)
</span><span class="lines">@@ -1520,7 +1520,7 @@
</span><span class="cx"> layout/Verification.cpp
</span><span class="cx"> layout/formattingContexts/block/BlockFormattingContext.cpp
</span><span class="cx"> layout/formattingContexts/block/BlockFormattingContextGeometry.cpp
</span><del>-layout/formattingContexts/block/BlockFormattingContextQuirks.cpp
</del><ins>+layout/formattingContexts/block/BlockFormattingQuirks.cpp
</ins><span class="cx"> layout/formattingContexts/block/BlockFormattingState.cpp
</span><span class="cx"> layout/formattingContexts/block/BlockMarginCollapse.cpp
</span><span class="cx"> layout/formattingContexts/block/PrecomputedBlockMarginCollapse.cpp
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (277541 => 277542)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj   2021-05-15 16:59:57 UTC (rev 277541)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj      2021-05-15 17:50:07 UTC (rev 277542)
</span><span class="lines">@@ -1333,6 +1333,7 @@
</span><span class="cx">          46EFAF121E5FB9F100E7F34B /* LowPowerModeNotifier.h in Headers */ = {isa = PBXBuildFile; fileRef = 46EFAF101E5FB9E100E7F34B /* LowPowerModeNotifier.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">          46F02A1A23737F8300106A64 /* EventLoop.h in Headers */ = {isa = PBXBuildFile; fileRef = 9B0ABCA123679AB300B45085 /* EventLoop.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">          46FCB6181A70820E00C5A21E /* DiagnosticLoggingKeys.h in Headers */ = {isa = PBXBuildFile; fileRef = CD37B37515C1A7E1006DC898 /* DiagnosticLoggingKeys.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><ins>+               47F947DB26502F2F0087968C /* BlockFormattingQuirks.h in Headers */ = {isa = PBXBuildFile; fileRef = 47F947DA26502F2F0087968C /* BlockFormattingQuirks.h */; settings = {ATTRIBUTES = (Private, ); }; };
</ins><span class="cx">           49291E4B134172C800E753DE /* ImageRenderingMode.h in Headers */ = {isa = PBXBuildFile; fileRef = 49291E4A134172C800E753DE /* ImageRenderingMode.h */; };
</span><span class="cx">          493E5E0912D6420500020081 /* PlatformCALayerClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 493E5E0812D6420500020081 /* PlatformCALayerClient.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">          4945BFD413CF809000CC3B38 /* TransformState.h in Headers */ = {isa = PBXBuildFile; fileRef = 4945BFD213CF809000CC3B38 /* TransformState.h */; };
</span><span class="lines">@@ -8381,6 +8382,7 @@
</span><span class="cx">          46EFAF0F1E5FB9E100E7F34B /* LowPowerModeNotifier.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LowPowerModeNotifier.cpp; sourceTree = "<group>"; };
</span><span class="cx">          46EFAF101E5FB9E100E7F34B /* LowPowerModeNotifier.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LowPowerModeNotifier.h; sourceTree = "<group>"; };
</span><span class="cx">          46F91BC91FCDD0FE001599C3 /* JSWorkerNavigatorCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSWorkerNavigatorCustom.cpp; sourceTree = "<group>"; };
</span><ins>+               47F947DA26502F2F0087968C /* BlockFormattingQuirks.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BlockFormattingQuirks.h; sourceTree = "<group>"; };
</ins><span class="cx">           49291E4A134172C800E753DE /* ImageRenderingMode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ImageRenderingMode.h; sourceTree = "<group>"; };
</span><span class="cx">          493E5E0812D6420500020081 /* PlatformCALayerClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlatformCALayerClient.h; sourceTree = "<group>"; };
</span><span class="cx">          4945BFD113CF809000CC3B38 /* TransformState.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TransformState.cpp; sourceTree = "<group>"; };
</span><span class="lines">@@ -9973,7 +9975,7 @@
</span><span class="cx">          6F7CA3C8208C2B2E002F29AB /* InlineFormattingContext.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = InlineFormattingContext.h; sourceTree = "<group>"; };
</span><span class="cx">          6F7CA3C9208C2B2E002F29AB /* InlineFormattingContext.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = InlineFormattingContext.cpp; sourceTree = "<group>"; };
</span><span class="cx">          6F8F460121B03BB40041AC3A /* FormattingContextQuirks.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = FormattingContextQuirks.cpp; sourceTree = "<group>"; };
</span><del>-               6F8F460321B03BC60041AC3A /* BlockFormattingContextQuirks.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = BlockFormattingContextQuirks.cpp; sourceTree = "<group>"; };
</del><ins>+                6F8F460321B03BC60041AC3A /* BlockFormattingQuirks.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = BlockFormattingQuirks.cpp; sourceTree = "<group>"; };
</ins><span class="cx">           6F91420F25152137004E4FEA /* InlineLineGeometry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InlineLineGeometry.h; sourceTree = "<group>"; };
</span><span class="cx">          6F95DE4B237B889B00E517E1 /* InvalidationContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InvalidationContext.h; sourceTree = "<group>"; };
</span><span class="cx">          6F95DE4C237B889C00E517E1 /* InvalidationState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InvalidationState.h; sourceTree = "<group>"; };
</span><span class="lines">@@ -18230,7 +18232,8 @@
</span><span class="cx">                          115CFA6D208AFAB6001E6991 /* BlockFormattingContext.cpp */,
</span><span class="cx">                          115CFA6C208AFAB6001E6991 /* BlockFormattingContext.h */,
</span><span class="cx">                          6F0830DF20B46951008A945B /* BlockFormattingContextGeometry.cpp */,
</span><del>-                               6F8F460321B03BC60041AC3A /* BlockFormattingContextQuirks.cpp */,
</del><ins>+                                6F8F460321B03BC60041AC3A /* BlockFormattingQuirks.cpp */,
+                               47F947DA26502F2F0087968C /* BlockFormattingQuirks.h */,
</ins><span class="cx">                           115CFA79208B8D9D001E6991 /* BlockFormattingState.cpp */,
</span><span class="cx">                          115CFA78208B8D9D001E6991 /* BlockFormattingState.h */,
</span><span class="cx">                          115CFA89208B921A001E6991 /* BlockMarginCollapse.cpp */,
</span><span class="lines">@@ -31667,6 +31670,7 @@
</span><span class="cx">                          2EB4BCD3121F03E300EC4885 /* BlobResourceHandle.h in Headers */,
</span><span class="cx">                          976D6C7F122B8A3D001FD1F7 /* BlobURL.h in Headers */,
</span><span class="cx">                          115CFA6E208AFAB7001E6991 /* BlockFormattingContext.h in Headers */,
</span><ins>+                               47F947DB26502F2F0087968C /* BlockFormattingQuirks.h in Headers */,
</ins><span class="cx">                           115CFA7A208B8D9D001E6991 /* BlockFormattingState.h in Headers */,
</span><span class="cx">                          6F6DF36F264722EA0093E834 /* BlockMarginCollapse.h in Headers */,
</span><span class="cx">                          BC5EB5E10E81BE8700B25965 /* BorderData.h in Headers */,
</span></span></pre></div>
<a id="trunkSourceWebCorelayoutformattingContextsFormattingContexth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/layout/formattingContexts/FormattingContext.h (277541 => 277542)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/layout/formattingContexts/FormattingContext.h       2021-05-15 16:59:57 UTC (rev 277541)
+++ trunk/Source/WebCore/layout/formattingContexts/FormattingContext.h  2021-05-15 17:50:07 UTC (rev 277542)
</span><span class="lines">@@ -110,6 +110,21 @@
</span><span class="cx">     LayoutState& layoutState() const;
</span><span class="cx">     const FormattingState& formattingState() const { return m_formattingState; }
</span><span class="cx"> 
</span><ins>+    class Quirks {
+    public:
+        Quirks(const FormattingContext&);
+
+        LayoutUnit heightValueOfNearestContainingBlockWithFixedHeight(const Box&);
+
+    protected:
+        const LayoutState& layoutState() const { return m_formattingContext.layoutState(); }
+        LayoutState& layoutState() { return m_formattingContext.layoutState(); }
+        const FormattingContext& formattingContext() const { return m_formattingContext; }
+
+        const FormattingContext& m_formattingContext;
+    };
+    FormattingContext::Quirks quirks() const { return Quirks(*this); }
+
</ins><span class="cx"> protected:
</span><span class="cx">     using LayoutQueue = Vector<const Box*>;
</span><span class="cx"> 
</span><span class="lines">@@ -196,21 +211,6 @@
</span><span class="cx">     };
</span><span class="cx">     FormattingContext::Geometry geometry() const { return Geometry(*this); }
</span><span class="cx"> 
</span><del>-    class Quirks {
-    public:
-        Quirks(const FormattingContext&);
-
-        LayoutUnit heightValueOfNearestContainingBlockWithFixedHeight(const Box&);
-
-    protected:
-        const LayoutState& layoutState() const { return m_formattingContext.layoutState(); }
-        LayoutState& layoutState() { return m_formattingContext.layoutState(); }
-        const FormattingContext& formattingContext() const { return m_formattingContext; }
-
-        const FormattingContext& m_formattingContext;
-    };
-    FormattingContext::Quirks quirks() const { return Quirks(*this); }
-
</del><span class="cx"> private:
</span><span class="cx">     void collectOutOfFlowDescendantsIfNeeded();
</span><span class="cx">     void computeOutOfFlowVerticalGeometry(const Box&, const ConstraintsForOutOfFlowContent&);
</span></span></pre></div>
<a id="trunkSourceWebCorelayoutformattingContextsblockBlockFormattingContextcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/layout/formattingContexts/block/BlockFormattingContext.cpp (277541 => 277542)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/layout/formattingContexts/block/BlockFormattingContext.cpp  2021-05-15 16:59:57 UTC (rev 277541)
+++ trunk/Source/WebCore/layout/formattingContexts/block/BlockFormattingContext.cpp     2021-05-15 17:50:07 UTC (rev 277542)
</span><span class="lines">@@ -28,6 +28,7 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(LAYOUT_FORMATTING_CONTEXT)
</span><span class="cx"> 
</span><ins>+#include "BlockFormattingQuirks.h"
</ins><span class="cx"> #include "BlockFormattingState.h"
</span><span class="cx"> #include "BlockMarginCollapse.h"
</span><span class="cx"> #include "FloatingContext.h"
</span><span class="lines">@@ -605,7 +606,12 @@
</span><span class="cx">     return BlockMarginCollapse(*this);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+BlockFormattingQuirks BlockFormattingContext::quirks() const
+{
+    return BlockFormattingQuirks(*this);
</ins><span class="cx"> }
</span><ins>+
</ins><span class="cx"> }
</span><ins>+}
</ins><span class="cx"> 
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebCorelayoutformattingContextsblockBlockFormattingContexth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/layout/formattingContexts/block/BlockFormattingContext.h (277541 => 277542)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/layout/formattingContexts/block/BlockFormattingContext.h    2021-05-15 16:59:57 UTC (rev 277541)
+++ trunk/Source/WebCore/layout/formattingContexts/block/BlockFormattingContext.h       2021-05-15 17:50:07 UTC (rev 277542)
</span><span class="lines">@@ -39,6 +39,7 @@
</span><span class="cx"> namespace Layout {
</span><span class="cx"> 
</span><span class="cx"> class Box;
</span><ins>+class BlockFormattingQuirks;
</ins><span class="cx"> class BlockMarginCollapse;
</span><span class="cx"> class FloatingContext;
</span><span class="cx"> 
</span><span class="lines">@@ -54,23 +55,9 @@
</span><span class="cx"> 
</span><span class="cx">     const BlockFormattingState& formattingState() const { return downcast<BlockFormattingState>(FormattingContext::formattingState()); }
</span><span class="cx"> 
</span><del>-    class Quirks : public FormattingContext::Quirks {
-    public:
-        Quirks(const BlockFormattingContext&);
</del><ins>+    BlockFormattingQuirks quirks() const;
+    BlockMarginCollapse marginCollapse() const;
</ins><span class="cx"> 
</span><del>-        bool needsStretching(const Box&) const;
-        LayoutUnit stretchedInFlowHeight(const Box&, ContentHeightAndMargin);
-
-        bool shouldIgnoreCollapsedQuirkMargin(const Box&) const;
-        bool shouldCollapseMarginBeforeWithParentMarginBefore(const Box&) const;
-        bool shouldCollapseMarginAfterWithParentMarginAfter(const Box&) const;
-
-        const BlockFormattingContext& formattingContext() const { return downcast<BlockFormattingContext>(FormattingContext::Quirks::formattingContext()); }
-        BlockFormattingContext::Geometry geometry() const { return formattingContext().geometry(); }
-
-    };
-    BlockFormattingContext::Quirks quirks() const { return Quirks(*this); }
-
</del><span class="cx">     // This class implements positioning and sizing for boxes participating in a block formatting context.
</span><span class="cx">     class Geometry : public FormattingContext::Geometry {
</span><span class="cx">     public:
</span><span class="lines">@@ -120,7 +107,6 @@
</span><span class="cx">     Optional<LayoutUnit> usedAvailableWidthForFloatAvoider(const FloatingContext&, const Box&, const ConstraintsPair&);
</span><span class="cx">     void updateMarginAfterForPreviousSibling(const Box&);
</span><span class="cx"> 
</span><del>-    BlockMarginCollapse marginCollapse() const;
</del><span class="cx">     BlockFormattingState& formattingState() { return downcast<BlockFormattingState>(FormattingContext::formattingState()); }
</span><span class="cx"> 
</span><span class="cx"> #if ASSERT_ENABLED
</span><span class="lines">@@ -137,13 +123,8 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline BlockFormattingContext::Quirks::Quirks(const BlockFormattingContext& blockFormattingContext)
-    : FormattingContext::Quirks(blockFormattingContext)
-{
</del><span class="cx"> }
</span><del>-
</del><span class="cx"> }
</span><del>-}
</del><span class="cx"> 
</span><span class="cx"> SPECIALIZE_TYPE_TRAITS_LAYOUT_FORMATTING_CONTEXT(BlockFormattingContext, isBlockFormattingContext())
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorelayoutformattingContextsblockBlockFormattingContextQuirkscpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/layout/formattingContexts/block/BlockFormattingContextQuirks.cpp (277541 => 277542)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/layout/formattingContexts/block/BlockFormattingContextQuirks.cpp    2021-05-15 16:59:57 UTC (rev 277541)
+++ trunk/Source/WebCore/layout/formattingContexts/block/BlockFormattingContextQuirks.cpp       2021-05-15 17:50:07 UTC (rev 277542)
</span><span class="lines">@@ -1,129 +0,0 @@
</span><del>-/*
- * Copyright (C) 2018 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 "BlockFormattingContext.h"
-
-#if ENABLE(LAYOUT_FORMATTING_CONTEXT)
-
-#include "BlockFormattingState.h"
-#include "LayoutBox.h"
-#include "LayoutBoxGeometry.h"
-#include "LayoutContainerBox.h"
-#include "LayoutInitialContainingBlock.h"
-#include "LayoutState.h"
-
-namespace WebCore {
-namespace Layout {
-
-static bool isQuirkContainer(const Box& layoutBox)
-{
-    return layoutBox.isBodyBox() || layoutBox.isDocumentBox() || layoutBox.isTableCell();
-}
-
-bool BlockFormattingContext::Quirks::needsStretching(const Box& layoutBox) const
-{
-    ASSERT(layoutBox.isInFlow());
-    // In quirks mode, in-flow body and html stretch to the initial containing block (height: auto only).
-    if (!layoutState().inQuirksMode())
-        return false;
-
-    if (!layoutBox.isDocumentBox() && !layoutBox.isBodyBox())
-        return false;
-
-    return layoutBox.style().logicalHeight().isAuto();
-}
-
-LayoutUnit BlockFormattingContext::Quirks::stretchedInFlowHeight(const Box& layoutBox, ContentHeightAndMargin contentHeightAndMargin)
-{
-    ASSERT(needsStretching(layoutBox));
-    auto& formattingContext = this->formattingContext();
-    auto nonCollapsedVerticalMargin = contentHeightAndMargin.nonCollapsedMargin.before + contentHeightAndMargin.nonCollapsedMargin.after;
-
-    if (layoutBox.isDocumentBox()) {
-        // Let's stretch the inflow document box(<html>) to the height of the initial containing block (view).
-        auto documentBoxContentHeight = formattingContext.geometryForBox(layoutBox.initialContainingBlock(), EscapeReason::DocumentBoxStretchesToViewportQuirk).contentBoxHeight();
-        // Document box's own vertical margin/border/padding values always shrink the content height.
-        auto& documentBoxGeometry = formattingContext.geometryForBox(layoutBox);
-        documentBoxContentHeight -= nonCollapsedVerticalMargin + documentBoxGeometry.verticalBorder() + documentBoxGeometry.verticalPadding().valueOr(0);
-        return std::max(contentHeightAndMargin.contentHeight,  documentBoxContentHeight);
-    }
-
-    // Here is the quirky part for body box when it stretches all the way to the ICB even when the document box does not (e.g. out-of-flow positioned).
-    ASSERT(layoutBox.isBodyBox());
-    auto& initialContainingBlock = layoutBox.initialContainingBlock();
-    auto& initialContainingBlockGeometry = formattingContext.geometryForBox(initialContainingBlock, EscapeReason::BodyStretchesToViewportQuirk);
-    // Start the content height with the ICB.
-    auto bodyBoxContentHeight = initialContainingBlockGeometry.contentBoxHeight();
-    // Body box's own border and padding shrink the content height.
-    auto& bodyBoxGeometry = formattingContext.geometryForBox(layoutBox);
-    bodyBoxContentHeight -= bodyBoxGeometry.verticalBorder() + bodyBoxGeometry.verticalPadding().valueOr(0);
-    // Body box never collapses its vertical margins with the document box but it might collapse its margin with its descendants.
-    auto nonCollapsedMargin = contentHeightAndMargin.nonCollapsedMargin;
-    auto collapsedMargin = formattingContext.marginCollapse().collapsedVerticalValues(layoutBox, nonCollapsedMargin).collapsedValues;
-    auto usedVerticalMargin = collapsedMargin.before.valueOr(nonCollapsedMargin.before);
-    usedVerticalMargin += collapsedMargin.isCollapsedThrough ? nonCollapsedMargin.after : collapsedMargin.after.valueOr(nonCollapsedMargin.after);
-    bodyBoxContentHeight -= usedVerticalMargin;
-    // Document box's padding and border also shrink the body box's content height.
-    auto& documentBox = layoutBox.parent();
-    auto& documentBoxGeometry = formattingContext.geometryForBox(documentBox, EscapeReason::BodyStretchesToViewportQuirk);
-    bodyBoxContentHeight -= documentBoxGeometry.verticalBorder() + documentBoxGeometry.verticalPadding().valueOr(0);
-    // However the non-in-flow document box's vertical margins are ignored. They don't affect the body box's content height.
-    if (documentBox.isInFlow()) {
-        auto geometry = this->geometry();
-        auto precomputeDocumentBoxVerticalMargin = geometry.computedVerticalMargin(documentBox, geometry.constraintsForInFlowContent(initialContainingBlock, EscapeReason::BodyStretchesToViewportQuirk).horizontal);
-        bodyBoxContentHeight -= precomputeDocumentBoxVerticalMargin.before.valueOr(0) + precomputeDocumentBoxVerticalMargin.after.valueOr(0);
-    }
-    return std::max(contentHeightAndMargin.contentHeight,  bodyBoxContentHeight);
-}
-
-bool BlockFormattingContext::Quirks::shouldIgnoreCollapsedQuirkMargin(const Box& layoutBox) const
-{
-    return layoutState().inQuirksMode() && isQuirkContainer(layoutBox);
-}
-
-enum class VerticalMargin { Before, After };
-static inline bool hasQuirkMarginToCollapse(const Box& layoutBox, VerticalMargin verticalMargin)
-{
-    if (!layoutBox.isInFlow())
-        return false;
-    auto& style = layoutBox.style();
-    return (verticalMargin == VerticalMargin::Before && style.hasMarginBeforeQuirk()) || (verticalMargin == VerticalMargin::After && style.hasMarginAfterQuirk());
-}
-
-bool BlockFormattingContext::Quirks::shouldCollapseMarginBeforeWithParentMarginBefore(const Box& layoutBox) const
-{
-    return layoutState().inQuirksMode() && hasQuirkMarginToCollapse(layoutBox, VerticalMargin::Before) && isQuirkContainer(layoutBox.containingBlock());
-}
-
-bool BlockFormattingContext::Quirks::shouldCollapseMarginAfterWithParentMarginAfter(const Box& layoutBox) const
-{
-    return layoutState().inQuirksMode() && hasQuirkMarginToCollapse(layoutBox, VerticalMargin::After) && isQuirkContainer(layoutBox.containingBlock());
-}
-
-}
-}
-
-#endif
</del></span></pre></div>
<a id="trunkSourceWebCorelayoutformattingContextsblockBlockFormattingQuirkscppfromrev277541trunkSourceWebCorelayoutformattingContextsblockBlockFormattingContextQuirkscpp"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/layout/formattingContexts/block/BlockFormattingQuirks.cpp (from rev 277541, trunk/Source/WebCore/layout/formattingContexts/block/BlockFormattingContextQuirks.cpp) (0 => 277542)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/layout/formattingContexts/block/BlockFormattingQuirks.cpp                           (rev 0)
+++ trunk/Source/WebCore/layout/formattingContexts/block/BlockFormattingQuirks.cpp      2021-05-15 17:50:07 UTC (rev 277542)
</span><span class="lines">@@ -0,0 +1,134 @@
</span><ins>+/*
+ * Copyright (C) 2018 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 "BlockFormattingQuirks.h"
+
+#if ENABLE(LAYOUT_FORMATTING_CONTEXT)
+
+#include "BlockFormattingState.h"
+#include "LayoutBox.h"
+#include "LayoutBoxGeometry.h"
+#include "LayoutContainerBox.h"
+#include "LayoutInitialContainingBlock.h"
+#include "LayoutState.h"
+
+namespace WebCore {
+namespace Layout {
+
+static bool isQuirkContainer(const Box& layoutBox)
+{
+    return layoutBox.isBodyBox() || layoutBox.isDocumentBox() || layoutBox.isTableCell();
+}
+
+BlockFormattingQuirks::BlockFormattingQuirks(const BlockFormattingContext& blockFormattingContext)
+    : FormattingContext::Quirks(blockFormattingContext)
+{
+}
+
+bool BlockFormattingQuirks::needsStretching(const Box& layoutBox) const
+{
+    ASSERT(layoutBox.isInFlow());
+    // In quirks mode, in-flow body and html stretch to the initial containing block (height: auto only).
+    if (!layoutState().inQuirksMode())
+        return false;
+
+    if (!layoutBox.isDocumentBox() && !layoutBox.isBodyBox())
+        return false;
+
+    return layoutBox.style().logicalHeight().isAuto();
+}
+
+LayoutUnit BlockFormattingQuirks::stretchedInFlowHeight(const Box& layoutBox, ContentHeightAndMargin contentHeightAndMargin)
+{
+    ASSERT(needsStretching(layoutBox));
+    auto& formattingContext = this->formattingContext();
+    auto nonCollapsedVerticalMargin = contentHeightAndMargin.nonCollapsedMargin.before + contentHeightAndMargin.nonCollapsedMargin.after;
+
+    if (layoutBox.isDocumentBox()) {
+        // Let's stretch the inflow document box(<html>) to the height of the initial containing block (view).
+        auto documentBoxContentHeight = formattingContext.geometryForBox(layoutBox.initialContainingBlock(), FormattingContext::EscapeReason::DocumentBoxStretchesToViewportQuirk).contentBoxHeight();
+        // Document box's own vertical margin/border/padding values always shrink the content height.
+        auto& documentBoxGeometry = formattingContext.geometryForBox(layoutBox);
+        documentBoxContentHeight -= nonCollapsedVerticalMargin + documentBoxGeometry.verticalBorder() + documentBoxGeometry.verticalPadding().valueOr(0);
+        return std::max(contentHeightAndMargin.contentHeight,  documentBoxContentHeight);
+    }
+
+    // Here is the quirky part for body box when it stretches all the way to the ICB even when the document box does not (e.g. out-of-flow positioned).
+    ASSERT(layoutBox.isBodyBox());
+    auto& initialContainingBlock = layoutBox.initialContainingBlock();
+    auto& initialContainingBlockGeometry = formattingContext.geometryForBox(initialContainingBlock, FormattingContext::EscapeReason::BodyStretchesToViewportQuirk);
+    // Start the content height with the ICB.
+    auto bodyBoxContentHeight = initialContainingBlockGeometry.contentBoxHeight();
+    // Body box's own border and padding shrink the content height.
+    auto& bodyBoxGeometry = formattingContext.geometryForBox(layoutBox);
+    bodyBoxContentHeight -= bodyBoxGeometry.verticalBorder() + bodyBoxGeometry.verticalPadding().valueOr(0);
+    // Body box never collapses its vertical margins with the document box but it might collapse its margin with its descendants.
+    auto nonCollapsedMargin = contentHeightAndMargin.nonCollapsedMargin;
+    auto collapsedMargin = formattingContext.marginCollapse().collapsedVerticalValues(layoutBox, nonCollapsedMargin).collapsedValues;
+    auto usedVerticalMargin = collapsedMargin.before.valueOr(nonCollapsedMargin.before);
+    usedVerticalMargin += collapsedMargin.isCollapsedThrough ? nonCollapsedMargin.after : collapsedMargin.after.valueOr(nonCollapsedMargin.after);
+    bodyBoxContentHeight -= usedVerticalMargin;
+    // Document box's padding and border also shrink the body box's content height.
+    auto& documentBox = layoutBox.parent();
+    auto& documentBoxGeometry = formattingContext.geometryForBox(documentBox, FormattingContext::EscapeReason::BodyStretchesToViewportQuirk);
+    bodyBoxContentHeight -= documentBoxGeometry.verticalBorder() + documentBoxGeometry.verticalPadding().valueOr(0);
+    // However the non-in-flow document box's vertical margins are ignored. They don't affect the body box's content height.
+    if (documentBox.isInFlow()) {
+        auto geometry = this->geometry();
+        auto precomputeDocumentBoxVerticalMargin = geometry.computedVerticalMargin(documentBox, geometry.constraintsForInFlowContent(initialContainingBlock, FormattingContext::EscapeReason::BodyStretchesToViewportQuirk).horizontal);
+        bodyBoxContentHeight -= precomputeDocumentBoxVerticalMargin.before.valueOr(0) + precomputeDocumentBoxVerticalMargin.after.valueOr(0);
+    }
+    return std::max(contentHeightAndMargin.contentHeight,  bodyBoxContentHeight);
+}
+
+bool BlockFormattingQuirks::shouldIgnoreCollapsedQuirkMargin(const Box& layoutBox) const
+{
+    return layoutState().inQuirksMode() && isQuirkContainer(layoutBox);
+}
+
+enum class VerticalMargin { Before, After };
+static inline bool hasQuirkMarginToCollapse(const Box& layoutBox, VerticalMargin verticalMargin)
+{
+    if (!layoutBox.isInFlow())
+        return false;
+    auto& style = layoutBox.style();
+    return (verticalMargin == VerticalMargin::Before && style.hasMarginBeforeQuirk()) || (verticalMargin == VerticalMargin::After && style.hasMarginAfterQuirk());
+}
+
+bool BlockFormattingQuirks::shouldCollapseMarginBeforeWithParentMarginBefore(const Box& layoutBox) const
+{
+    return layoutState().inQuirksMode() && hasQuirkMarginToCollapse(layoutBox, VerticalMargin::Before) && isQuirkContainer(layoutBox.containingBlock());
+}
+
+bool BlockFormattingQuirks::shouldCollapseMarginAfterWithParentMarginAfter(const Box& layoutBox) const
+{
+    return layoutState().inQuirksMode() && hasQuirkMarginToCollapse(layoutBox, VerticalMargin::After) && isQuirkContainer(layoutBox.containingBlock());
+}
+
+}
+}
+
+#endif
</ins></span></pre></div>
<a id="trunkSourceWebCorelayoutformattingContextsblockBlockFormattingQuirksh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/layout/formattingContexts/block/BlockFormattingQuirks.h (0 => 277542)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/layout/formattingContexts/block/BlockFormattingQuirks.h                             (rev 0)
+++ trunk/Source/WebCore/layout/formattingContexts/block/BlockFormattingQuirks.h        2021-05-15 17:50:07 UTC (rev 277542)
</span><span class="lines">@@ -0,0 +1,55 @@
</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 "BlockFormattingContext.h"
+
+namespace WebCore {
+namespace Layout {
+
+class BlockFormattingQuirks : public FormattingContext::Quirks {
+public:
+    BlockFormattingQuirks(const BlockFormattingContext&);
+
+    bool needsStretching(const Box&) const;
+    LayoutUnit stretchedInFlowHeight(const Box&, ContentHeightAndMargin);
+
+    bool shouldIgnoreCollapsedQuirkMargin(const Box&) const;
+    bool shouldCollapseMarginBeforeWithParentMarginBefore(const Box&) const;
+    bool shouldCollapseMarginAfterWithParentMarginAfter(const Box&) const;
+
+protected:
+    const BlockFormattingContext& formattingContext() const { return downcast<BlockFormattingContext>(FormattingContext::Quirks::formattingContext()); }
+    BlockFormattingContext::Geometry geometry() const { return formattingContext().geometry(); }
+
+};
+
+}
+}
+
+#endif
</ins></span></pre></div>
<a id="trunkSourceWebCorelayoutformattingContextsblockBlockMarginCollapsecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/layout/formattingContexts/block/BlockMarginCollapse.cpp (277541 => 277542)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/layout/formattingContexts/block/BlockMarginCollapse.cpp     2021-05-15 16:59:57 UTC (rev 277541)
+++ trunk/Source/WebCore/layout/formattingContexts/block/BlockMarginCollapse.cpp        2021-05-15 17:50:07 UTC (rev 277542)
</span><span class="lines">@@ -28,6 +28,7 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(LAYOUT_FORMATTING_CONTEXT)
</span><span class="cx"> 
</span><ins>+#include "BlockFormattingQuirks.h"
</ins><span class="cx"> #include "BlockFormattingState.h"
</span><span class="cx"> #include "FloatingState.h"
</span><span class="cx"> #include "InlineFormattingState.h"
</span></span></pre></div>
<a id="trunkSourceWebCorelayoutformattingContextsblocktablewrapperTableWrapperBlockFormattingContexth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/layout/formattingContexts/block/tablewrapper/TableWrapperBlockFormattingContext.h (277541 => 277542)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/layout/formattingContexts/block/tablewrapper/TableWrapperBlockFormattingContext.h   2021-05-15 16:59:57 UTC (rev 277541)
+++ trunk/Source/WebCore/layout/formattingContexts/block/tablewrapper/TableWrapperBlockFormattingContext.h      2021-05-15 17:50:07 UTC (rev 277542)
</span><span class="lines">@@ -28,6 +28,7 @@
</span><span class="cx"> #if ENABLE(LAYOUT_FORMATTING_CONTEXT)
</span><span class="cx"> 
</span><span class="cx"> #include "BlockFormattingContext.h"
</span><ins>+#include "BlockFormattingQuirks.h"
</ins><span class="cx"> #include <wtf/IsoMalloc.h>
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="lines">@@ -45,7 +46,7 @@
</span><span class="cx">     void setHorizontalConstraintsIgnoringFloats(const HorizontalConstraints& horizontalConstraints) { m_horizontalConstraintsIgnoringFloats = horizontalConstraints; }
</span><span class="cx"> 
</span><span class="cx"> private:
</span><del>-    class Quirks : public BlockFormattingContext::Quirks {
</del><ins>+    class Quirks : public BlockFormattingQuirks {
</ins><span class="cx">     public:
</span><span class="cx">         Quirks(const TableWrapperBlockFormattingContext&);
</span><span class="cx"> 
</span><span class="lines">@@ -64,7 +65,7 @@
</span><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> inline TableWrapperBlockFormattingContext::Quirks::Quirks(const TableWrapperBlockFormattingContext& formattingContext)
</span><del>-    : BlockFormattingContext::Quirks(formattingContext)
</del><ins>+    : BlockFormattingQuirks(formattingContext)
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>