Title: [277546] trunk/Source/WebCore
Revision
277546
Author
[email protected]
Date
2021-05-15 13:22:37 -0700 (Sat, 15 May 2021)

Log Message

[LFC] Move table formatting quirks to its own class
https://bugs.webkit.org/show_bug.cgi?id=225758

Reviewed by Antti Koivisto.

* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* layout/formattingContexts/table/TableFormattingContext.cpp:
(WebCore::Layout::TableFormattingContext::quirks const):
* layout/formattingContexts/table/TableFormattingContext.h:
(WebCore::Layout::TableFormattingContext::Quirks::Quirks): Deleted.
* layout/formattingContexts/table/TableFormattingContextQuirks.cpp: Removed.

Modified Paths

Added Paths

Removed Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (277545 => 277546)


--- trunk/Source/WebCore/ChangeLog	2021-05-15 19:50:54 UTC (rev 277545)
+++ trunk/Source/WebCore/ChangeLog	2021-05-15 20:22:37 UTC (rev 277546)
@@ -1,5 +1,20 @@
 2021-05-15  Alan Bujtas  <[email protected]>
 
+        [LFC] Move table formatting quirks to its own class
+        https://bugs.webkit.org/show_bug.cgi?id=225758
+
+        Reviewed by Antti Koivisto.
+
+        * Sources.txt:
+        * WebCore.xcodeproj/project.pbxproj:
+        * layout/formattingContexts/table/TableFormattingContext.cpp:
+        (WebCore::Layout::TableFormattingContext::quirks const):
+        * layout/formattingContexts/table/TableFormattingContext.h:
+        (WebCore::Layout::TableFormattingContext::Quirks::Quirks): Deleted.
+        * layout/formattingContexts/table/TableFormattingContextQuirks.cpp: Removed.
+
+2021-05-15  Alan Bujtas  <[email protected]>
+
         [LFC] Move inline formatting quirks to its own class
         https://bugs.webkit.org/show_bug.cgi?id=225759
 

Modified: trunk/Source/WebCore/Sources.txt (277545 => 277546)


--- trunk/Source/WebCore/Sources.txt	2021-05-15 19:50:54 UTC (rev 277545)
+++ trunk/Source/WebCore/Sources.txt	2021-05-15 20:22:37 UTC (rev 277546)
@@ -1563,7 +1563,7 @@
 layout/layouttree/LayoutTreeBuilder.cpp
 layout/formattingContexts/table/TableFormattingContext.cpp
 layout/formattingContexts/table/TableFormattingContextGeometry.cpp
-layout/formattingContexts/table/TableFormattingContextQuirks.cpp
+layout/formattingContexts/table/TableFormattingQuirks.cpp
 layout/formattingContexts/table/TableFormattingState.cpp
 layout/formattingContexts/table/TableGrid.cpp
 layout/formattingContexts/table/TableLayout.cpp

Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (277545 => 277546)


--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2021-05-15 19:50:54 UTC (rev 277545)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2021-05-15 20:22:37 UTC (rev 277546)
@@ -2135,6 +2135,7 @@
 		6F360E5023999421001512A7 /* InlineSoftLineBreakItem.h in Headers */ = {isa = PBXBuildFile; fileRef = 6F360E4E23999420001512A7 /* InlineSoftLineBreakItem.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		6F3FBA982556E313003530FD /* LayoutIntegrationInlineContentBuilder.h in Headers */ = {isa = PBXBuildFile; fileRef = 6F3FBA972556E312003530FD /* LayoutIntegrationInlineContentBuilder.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		6F40DA822513033A00EC04B7 /* InlineRect.h in Headers */ = {isa = PBXBuildFile; fileRef = 6F40DA812513033A00EC04B7 /* InlineRect.h */; settings = {ATTRIBUTES = (Private, ); }; };
+		6F49C3E726479B3C0051953D /* TableFormattingQuirks.h in Headers */ = {isa = PBXBuildFile; fileRef = 6F49C3E626479B3B0051953D /* TableFormattingQuirks.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		6F6383F62427AF4A00DABA53 /* LayoutInitialContainingBlock.h in Headers */ = {isa = PBXBuildFile; fileRef = 6F6383F42427AF4900DABA53 /* LayoutInitialContainingBlock.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		6F6DF36F264722EA0093E834 /* BlockMarginCollapse.h in Headers */ = {isa = PBXBuildFile; fileRef = 6F6DF36E264722EA0093E834 /* BlockMarginCollapse.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		6F7CA3C6208C2957002F29AB /* LayoutState.h in Headers */ = {isa = PBXBuildFile; fileRef = 6F7CA3C4208C2956002F29AB /* LayoutState.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -9964,6 +9965,7 @@
 		6F3FBA962556E308003530FD /* LayoutIntegrationInlineContentBuilder.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = LayoutIntegrationInlineContentBuilder.cpp; sourceTree = "<group>"; };
 		6F3FBA972556E312003530FD /* LayoutIntegrationInlineContentBuilder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LayoutIntegrationInlineContentBuilder.h; sourceTree = "<group>"; };
 		6F40DA812513033A00EC04B7 /* InlineRect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InlineRect.h; sourceTree = "<group>"; };
+		6F49C3E626479B3B0051953D /* TableFormattingQuirks.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TableFormattingQuirks.h; sourceTree = "<group>"; };
 		6F4A5BD522F9F16B00A80F25 /* LayoutPhase.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = LayoutPhase.cpp; sourceTree = "<group>"; };
 		6F5B7EAA2300A79E0067D9C3 /* TableGrid.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TableGrid.cpp; sourceTree = "<group>"; };
 		6F6383F42427AF4900DABA53 /* LayoutInitialContainingBlock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LayoutInitialContainingBlock.h; sourceTree = "<group>"; };
@@ -10021,7 +10023,7 @@
 		6FB7D2DA250FD7FC000207AA /* FlexFormattingState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FlexFormattingState.h; sourceTree = "<group>"; };
 		6FBB860520B464B600DAD938 /* FormattingContextGeometry.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = FormattingContextGeometry.cpp; sourceTree = "<group>"; };
 		6FC3F9452516756600A49BEA /* InlineLineRun.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InlineLineRun.h; sourceTree = "<group>"; };
-		6FC53AEB24AF7A8E006059FE /* TableFormattingContextQuirks.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TableFormattingContextQuirks.cpp; sourceTree = "<group>"; };
+		6FC53AEB24AF7A8E006059FE /* TableFormattingQuirks.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TableFormattingQuirks.cpp; sourceTree = "<group>"; };
 		6FC5CA9222E3599300B13E11 /* TableFormattingState.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TableFormattingState.cpp; sourceTree = "<group>"; };
 		6FC5CA9422E3599400B13E11 /* TableFormattingContext.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TableFormattingContext.cpp; sourceTree = "<group>"; };
 		6FC5CA9522E3599400B13E11 /* TableFormattingContext.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TableFormattingContext.h; sourceTree = "<group>"; };
@@ -22666,7 +22668,8 @@
 				6FC5CA9422E3599400B13E11 /* TableFormattingContext.cpp */,
 				6FC5CA9522E3599400B13E11 /* TableFormattingContext.h */,
 				11D19C2E23159BAE008F24D3 /* TableFormattingContextGeometry.cpp */,
-				6FC53AEB24AF7A8E006059FE /* TableFormattingContextQuirks.cpp */,
+				6FC53AEB24AF7A8E006059FE /* TableFormattingQuirks.cpp */,
+				6F49C3E626479B3B0051953D /* TableFormattingQuirks.h */,
 				6FC5CA9222E3599300B13E11 /* TableFormattingState.cpp */,
 				6FC5CA9622E3599500B13E11 /* TableFormattingState.h */,
 				6F5B7EAA2300A79E0067D9C3 /* TableGrid.cpp */,
@@ -35446,6 +35449,7 @@
 				E3C04138254CB30D0021D0E6 /* SystemSoundDelegate.h in Headers */,
 				E3C0412F254CA29B0021D0E6 /* SystemSoundManager.h in Headers */,
 				5D5975B319635F1100D00878 /* SystemVersion.h in Headers */,
+				6F49C3E726479B3C0051953D /* TableFormattingQuirks.h in Headers */,
 				A8CFF0510A154F09000A4234 /* TableLayout.h in Headers */,
 				6F17264F2470C60B00518C96 /* TableWrapperBlockFormattingContext.h in Headers */,
 				6F15522126476B5C00E353C6 /* TableWrapperBlockFormattingQuirks.h in Headers */,

Modified: trunk/Source/WebCore/layout/formattingContexts/table/TableFormattingContext.cpp (277545 => 277546)


--- trunk/Source/WebCore/layout/formattingContexts/table/TableFormattingContext.cpp	2021-05-15 19:50:54 UTC (rev 277545)
+++ trunk/Source/WebCore/layout/formattingContexts/table/TableFormattingContext.cpp	2021-05-15 20:22:37 UTC (rev 277546)
@@ -37,6 +37,7 @@
 #include "LayoutChildIterator.h"
 #include "LayoutContext.h"
 #include "LayoutInitialContainingBlock.h"
+#include "TableFormattingQuirks.h"
 #include "TableFormattingState.h"
 #include <wtf/IsoMallocInlines.h>
 
@@ -514,7 +515,13 @@
     }
 }
 
+TableFormattingQuirks TableFormattingContext::quirks() const
+{
+    return TableFormattingQuirks(*this);
 }
+
+
 }
+}
 
 #endif

Modified: trunk/Source/WebCore/layout/formattingContexts/table/TableFormattingContext.h (277545 => 277546)


--- trunk/Source/WebCore/layout/formattingContexts/table/TableFormattingContext.h	2021-05-15 19:50:54 UTC (rev 277545)
+++ trunk/Source/WebCore/layout/formattingContexts/table/TableFormattingContext.h	2021-05-15 20:22:37 UTC (rev 277546)
@@ -37,6 +37,8 @@
 namespace Layout {
 
 class InvalidationState;
+class TableFormattingQuirks;
+
 // This class implements the layout logic for table formatting contexts.
 // https://www.w3.org/TR/CSS22/tables.html
 class TableFormattingContext final : public FormattingContext {
@@ -48,22 +50,6 @@
 
     static UniqueRef<TableGrid> ensureTableGrid(const ContainerBox& tableBox);
 
-private:
-    class TableLayout {
-    public:
-        TableLayout(const TableFormattingContext&, const TableGrid&);
-
-        using DistributedSpaces = Vector<LayoutUnit>;
-        DistributedSpaces distributedHorizontalSpace(LayoutUnit availableHorizontalSpace);
-        DistributedSpaces distributedVerticalSpace(Optional<LayoutUnit> availableVerticalSpace);
-
-    private:
-        const TableFormattingContext& formattingContext() const { return m_formattingContext; }
-
-        const TableFormattingContext& m_formattingContext;
-        const TableGrid& m_grid;
-    };
-
     class Geometry : public FormattingContext::Geometry {
     public:
         LayoutUnit cellHeigh(const ContainerBox&) const;
@@ -81,17 +67,24 @@
     };
     TableFormattingContext::Geometry geometry() const { return Geometry(*this, formattingState().tableGrid()); }
 
-    class Quirks : public FormattingContext::Quirks {
+private:
+    class TableLayout {
     public:
-        Quirks(const TableFormattingContext&);
+        TableLayout(const TableFormattingContext&, const TableGrid&);
 
-        bool shouldIgnoreChildContentVerticalMargin(const ContainerBox&) const;
+        using DistributedSpaces = Vector<LayoutUnit>;
+        DistributedSpaces distributedHorizontalSpace(LayoutUnit availableHorizontalSpace);
+        DistributedSpaces distributedVerticalSpace(Optional<LayoutUnit> availableVerticalSpace);
 
-        const TableFormattingContext& formattingContext() const { return downcast<TableFormattingContext>(FormattingContext::Quirks::formattingContext()); }
-        TableFormattingContext::Geometry geometry() const { return formattingContext().geometry(); }
+    private:
+        const TableFormattingContext& formattingContext() const { return m_formattingContext; }
+
+        const TableFormattingContext& m_formattingContext;
+        const TableGrid& m_grid;
     };
-    TableFormattingContext::Quirks quirks() const { return Quirks(*this); }
 
+    TableFormattingQuirks quirks() const;
+
     TableFormattingContext::TableLayout tableLayout() const { return TableLayout(*this, formattingState().tableGrid()); }
 
     IntrinsicWidthConstraints computedIntrinsicWidthConstraints() override;
@@ -113,13 +106,8 @@
 {
 }
 
-inline TableFormattingContext::Quirks::Quirks(const TableFormattingContext& tableFormattingContext)
-    : FormattingContext::Quirks(tableFormattingContext)
-{
 }
-
 }
-}
 
 SPECIALIZE_TYPE_TRAITS_LAYOUT_FORMATTING_CONTEXT(TableFormattingContext, isTableFormattingContext())
 

Deleted: trunk/Source/WebCore/layout/formattingContexts/table/TableFormattingContextQuirks.cpp (277545 => 277546)


--- trunk/Source/WebCore/layout/formattingContexts/table/TableFormattingContextQuirks.cpp	2021-05-15 19:50:54 UTC (rev 277545)
+++ trunk/Source/WebCore/layout/formattingContexts/table/TableFormattingContextQuirks.cpp	2021-05-15 20:22:37 UTC (rev 277546)
@@ -1,57 +0,0 @@
-/*
- * Copyright (C) 2020 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 "TableFormattingContext.h"
-
-#if ENABLE(LAYOUT_FORMATTING_CONTEXT)
-
-#include "LayoutBox.h"
-#include "LayoutContainerBox.h"
-#include "LayoutState.h"
-
-namespace WebCore {
-namespace Layout {
-
-bool TableFormattingContext::Quirks::shouldIgnoreChildContentVerticalMargin(const ContainerBox& cellBox) const
-{
-    // Normally BFC root content height takes the margin box of the child content as vertical margins don't collapse with BFC roots,
-    // but table cell boxes do collapse their (non-existing) margins with child quirk margins (so much quirk), so here we check
-    // if the content height should include margins or not.
-    // e.g <table><tr><td><p>text content</td></tr></table> <- <p>'s quirk margin collapses with the <td> so its content
-    // height should not include vertical margins.
-    if (!layoutState().inQuirksMode())
-        return false;
-    if (cellBox.establishesInlineFormattingContext())
-        return false;
-    if (!cellBox.hasInFlowChild())
-        return false;
-    return cellBox.firstInFlowChild()->style().hasMarginBeforeQuirk() || cellBox.lastInFlowChild()->style().hasMarginAfterQuirk();
-}
-
-}
-}
-
-#endif

Copied: trunk/Source/WebCore/layout/formattingContexts/table/TableFormattingQuirks.cpp (from rev 277545, trunk/Source/WebCore/layout/formattingContexts/table/TableFormattingContextQuirks.cpp) (0 => 277546)


--- trunk/Source/WebCore/layout/formattingContexts/table/TableFormattingQuirks.cpp	                        (rev 0)
+++ trunk/Source/WebCore/layout/formattingContexts/table/TableFormattingQuirks.cpp	2021-05-15 20:22:37 UTC (rev 277546)
@@ -0,0 +1,62 @@
+/*
+ * Copyright (C) 2020 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 "TableFormattingQuirks.h"
+
+#if ENABLE(LAYOUT_FORMATTING_CONTEXT)
+
+#include "LayoutBox.h"
+#include "LayoutContainerBox.h"
+#include "LayoutState.h"
+
+namespace WebCore {
+namespace Layout {
+
+TableFormattingQuirks::TableFormattingQuirks(const TableFormattingContext& tableFormattingContext)
+    : FormattingContext::Quirks(tableFormattingContext)
+{
+}
+
+bool TableFormattingQuirks::shouldIgnoreChildContentVerticalMargin(const ContainerBox& cellBox) const
+{
+    // Normally BFC root content height takes the margin box of the child content as vertical margins don't collapse with BFC roots,
+    // but table cell boxes do collapse their (non-existing) margins with child quirk margins (so much quirk), so here we check
+    // if the content height should include margins or not.
+    // e.g <table><tr><td><p>text content</td></tr></table> <- <p>'s quirk margin collapses with the <td> so its content
+    // height should not include vertical margins.
+    if (!layoutState().inQuirksMode())
+        return false;
+    if (cellBox.establishesInlineFormattingContext())
+        return false;
+    if (!cellBox.hasInFlowChild())
+        return false;
+    return cellBox.firstInFlowChild()->style().hasMarginBeforeQuirk() || cellBox.lastInFlowChild()->style().hasMarginAfterQuirk();
+}
+
+}
+}
+
+#endif

Copied: trunk/Source/WebCore/layout/formattingContexts/table/TableFormattingQuirks.h (from rev 277545, trunk/Source/WebCore/layout/formattingContexts/table/TableFormattingContextQuirks.cpp) (0 => 277546)


--- trunk/Source/WebCore/layout/formattingContexts/table/TableFormattingQuirks.h	                        (rev 0)
+++ trunk/Source/WebCore/layout/formattingContexts/table/TableFormattingQuirks.h	2021-05-15 20:22:37 UTC (rev 277546)
@@ -0,0 +1,49 @@
+/*
+ * 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 "FormattingContext.h"
+
+namespace WebCore {
+namespace Layout {
+
+class TableFormattingQuirks : public FormattingContext::Quirks {
+public:
+    TableFormattingQuirks(const TableFormattingContext&);
+
+    bool shouldIgnoreChildContentVerticalMargin(const ContainerBox&) const;
+
+private:
+    const TableFormattingContext& formattingContext() const { return downcast<TableFormattingContext>(FormattingContext::Quirks::formattingContext()); }
+    TableFormattingContext::Geometry geometry() const { return formattingContext().geometry(); }
+};
+
+}
+}
+
+#endif
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to