[LFC][TFC] Introduce table formatting context.
authorzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 20 Jul 2019 18:53:57 +0000 (18:53 +0000)
committerzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 20 Jul 2019 18:53:57 +0000 (18:53 +0000)
https://bugs.webkit.org/show_bug.cgi?id=199979
<rdar://problem/53346292>

Reviewed by Antti Koivisto.

Add the basic class structure for the table formatting context.
https://www.w3.org/TR/CSS22/tables.html

* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* layout/FormattingState.h:
(WebCore::Layout::FormattingState::isTableFormattingState const):
* layout/tableformatting/TableFormattingContext.cpp: Added.
(WebCore::Layout::TableFormattingContext::TableFormattingContext):
(WebCore::Layout::TableFormattingContext::layout const):
* layout/tableformatting/TableFormattingContext.h: Added.
* layout/tableformatting/TableFormattingState.cpp: Added.
(WebCore::Layout::TableFormattingState::TableFormattingState):
(WebCore::Layout::TableFormattingState::~TableFormattingState):
* layout/tableformatting/TableFormattingState.h: Added.
* layout/tableformatting/TableInvalidation.cpp: Added.
(WebCore::Layout::TableInvalidation::invalidate):
* layout/tableformatting/TableInvalidation.h: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@247669 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/Sources.txt
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/layout/FormattingState.h
Source/WebCore/layout/tableformatting/TableFormattingContext.cpp [new file with mode: 0644]
Source/WebCore/layout/tableformatting/TableFormattingContext.h [new file with mode: 0644]
Source/WebCore/layout/tableformatting/TableFormattingState.cpp [new file with mode: 0644]
Source/WebCore/layout/tableformatting/TableFormattingState.h [new file with mode: 0644]
Source/WebCore/layout/tableformatting/TableInvalidation.cpp [new file with mode: 0644]
Source/WebCore/layout/tableformatting/TableInvalidation.h [new file with mode: 0644]

index c3f2205..560f77a 100644 (file)
@@ -1,5 +1,32 @@
 2019-07-20  Zalan Bujtas  <zalan@apple.com>
 
+        [LFC][TFC] Introduce table formatting context.
+        https://bugs.webkit.org/show_bug.cgi?id=199979
+        <rdar://problem/53346292>
+
+        Reviewed by Antti Koivisto.
+
+        Add the basic class structure for the table formatting context.
+        https://www.w3.org/TR/CSS22/tables.html
+
+        * Sources.txt:
+        * WebCore.xcodeproj/project.pbxproj:
+        * layout/FormattingState.h:
+        (WebCore::Layout::FormattingState::isTableFormattingState const):
+        * layout/tableformatting/TableFormattingContext.cpp: Added.
+        (WebCore::Layout::TableFormattingContext::TableFormattingContext):
+        (WebCore::Layout::TableFormattingContext::layout const):
+        * layout/tableformatting/TableFormattingContext.h: Added.
+        * layout/tableformatting/TableFormattingState.cpp: Added.
+        (WebCore::Layout::TableFormattingState::TableFormattingState):
+        (WebCore::Layout::TableFormattingState::~TableFormattingState):
+        * layout/tableformatting/TableFormattingState.h: Added.
+        * layout/tableformatting/TableInvalidation.cpp: Added.
+        (WebCore::Layout::TableInvalidation::invalidate):
+        * layout/tableformatting/TableInvalidation.h: Added.
+
+2019-07-20  Zalan Bujtas  <zalan@apple.com>
+
         [LFC][IFC] Add support for mid-word break.
         https://bugs.webkit.org/show_bug.cgi?id=199976
         <rdar://problem/53337349>
index 6897329..31a3900 100644 (file)
@@ -1416,6 +1416,9 @@ layout/layouttree/LayoutInlineContainer.cpp
 layout/layouttree/LayoutLineBreakBox.cpp
 layout/layouttree/LayoutReplaced.cpp
 layout/layouttree/LayoutTreeBuilder.cpp
+layout/tableformatting/TableFormattingContext.cpp
+layout/tableformatting/TableFormattingState.cpp
+layout/tableformatting/TableInvalidation.cpp
 
 loader/AdClickAttribution.cpp
 loader/CanvasActivityRecord.cpp
index fbbfbb4..cabf96d 100644 (file)
                6FB47E612277425A00C7BCB0 /* InlineLineBox.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InlineLineBox.h; sourceTree = "<group>"; };
                6FB5E212221F2447003989CF /* ContentChangeObserver.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ContentChangeObserver.h; sourceTree = "<group>"; };
                6FBB860520B464B600DAD938 /* FormattingContextGeometry.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = FormattingContextGeometry.cpp; sourceTree = "<group>"; };
+               6FC5CA9222E3599300B13E11 /* TableFormattingState.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TableFormattingState.cpp; sourceTree = "<group>"; };
+               6FC5CA9322E3599300B13E11 /* TableInvalidation.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TableInvalidation.h; 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>"; };
+               6FC5CA9622E3599500B13E11 /* TableFormattingState.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TableFormattingState.h; sourceTree = "<group>"; };
+               6FC5CA9722E3599500B13E11 /* TableInvalidation.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TableInvalidation.cpp; sourceTree = "<group>"; };
                6FCE1A1822618AB3004F0343 /* DisplayRun.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DisplayRun.h; sourceTree = "<group>"; };
                6FD9CD52227E21C800E53957 /* DisplayRect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DisplayRect.h; sourceTree = "<group>"; };
                6FE198132178397B00446F08 /* InlineLineBreaker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InlineLineBreaker.cpp; sourceTree = "<group>"; };
                                6FCFC055212DACC2007695D2 /* floats */,
                                115CFA9A208BC140001E6991 /* inlineformatting */,
                                115CFA90208B9441001E6991 /* layouttree */,
+                               6FC5CA9122E3593300B13E11 /* tableformatting */,
                                115CFA69208AF7D0001E6991 /* FormattingContext.cpp */,
                                115CFA68208AF7D0001E6991 /* FormattingContext.h */,
                                6FBB860520B464B600DAD938 /* FormattingContextGeometry.cpp */,
                        path = angle;
                        sourceTree = "<group>";
                };
+               6FC5CA9122E3593300B13E11 /* tableformatting */ = {
+                       isa = PBXGroup;
+                       children = (
+                               6FC5CA9422E3599400B13E11 /* TableFormattingContext.cpp */,
+                               6FC5CA9522E3599400B13E11 /* TableFormattingContext.h */,
+                               6FC5CA9222E3599300B13E11 /* TableFormattingState.cpp */,
+                               6FC5CA9622E3599500B13E11 /* TableFormattingState.h */,
+                               6FC5CA9722E3599500B13E11 /* TableInvalidation.cpp */,
+                               6FC5CA9322E3599300B13E11 /* TableInvalidation.h */,
+                       );
+                       path = tableformatting;
+                       sourceTree = "<group>";
+               };
                6FCFC055212DACC2007695D2 /* floats */ = {
                        isa = PBXGroup;
                        children = (
index 7bdc711..667ebd7 100644 (file)
@@ -57,11 +57,12 @@ public:
 
     bool isBlockFormattingState() const { return m_type == Type::Block; }
     bool isInlineFormattingState() const { return m_type == Type::Inline; }
+    bool isTableFormattingState() const { return m_type == Type::Table; }
 
     LayoutState& layoutState() const { return m_layoutState; }
 
 protected:
-    enum class Type { Block, Inline };
+    enum class Type { Block, Inline, Table };
     FormattingState(Ref<FloatingState>&&, Type, LayoutState&);
 
 private:
diff --git a/Source/WebCore/layout/tableformatting/TableFormattingContext.cpp b/Source/WebCore/layout/tableformatting/TableFormattingContext.cpp
new file mode 100644 (file)
index 0000000..b369e4f
--- /dev/null
@@ -0,0 +1,52 @@
+/*
+ * Copyright (C) 2019 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 "TableFormattingState.h"
+#include <wtf/IsoMallocInlines.h>
+
+namespace WebCore {
+namespace Layout {
+
+WTF_MAKE_ISO_ALLOCATED_IMPL(TableFormattingContext);
+
+TableFormattingContext::TableFormattingContext(const Box& formattingContextRoot, TableFormattingState& formattingState)
+    : FormattingContext(formattingContextRoot, formattingState)
+{
+}
+
+void TableFormattingContext::layout() const
+{
+}
+
+}
+}
+
+#endif
diff --git a/Source/WebCore/layout/tableformatting/TableFormattingContext.h b/Source/WebCore/layout/tableformatting/TableFormattingContext.h
new file mode 100644 (file)
index 0000000..182c514
--- /dev/null
@@ -0,0 +1,48 @@
+/*
+ * Copyright (C) 2019 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"
+#include "TableFormattingState.h"
+#include <wtf/IsoMalloc.h>
+
+namespace WebCore {
+namespace Layout {
+
+// This class implements the layout logic for table formatting contexts.
+// https://www.w3.org/TR/CSS22/tables.html
+class TableFormattingContext : public FormattingContext {
+    WTF_MAKE_ISO_ALLOCATED(TableFormattingContext);
+public:
+    TableFormattingContext(const Box& formattingContextRoot, TableFormattingState&);
+    void layout() const override;
+};
+
+}
+}
+#endif
diff --git a/Source/WebCore/layout/tableformatting/TableFormattingState.cpp b/Source/WebCore/layout/tableformatting/TableFormattingState.cpp
new file mode 100644 (file)
index 0000000..037ed5c
--- /dev/null
@@ -0,0 +1,49 @@
+/*
+ * Copyright (C) 2019 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 "TableFormattingState.h"
+
+#if ENABLE(LAYOUT_FORMATTING_CONTEXT)
+
+#include <wtf/IsoMallocInlines.h>
+
+namespace WebCore {
+namespace Layout {
+
+WTF_MAKE_ISO_ALLOCATED_IMPL(TableFormattingState);
+
+TableFormattingState::TableFormattingState(Ref<FloatingState>&& floatingState, LayoutState& layoutState)
+    : FormattingState(WTFMove(floatingState), Type::Table, layoutState)
+{
+}
+
+TableFormattingState::~TableFormattingState()
+{
+}
+
+}
+}
+#endif
diff --git a/Source/WebCore/layout/tableformatting/TableFormattingState.h b/Source/WebCore/layout/tableformatting/TableFormattingState.h
new file mode 100644 (file)
index 0000000..3d34039
--- /dev/null
@@ -0,0 +1,49 @@
+/*
+ * Copyright (C) 2019 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 "FormattingState.h"
+#include <wtf/IsoMalloc.h>
+
+namespace WebCore {
+namespace Layout {
+
+// TableFormattingState holds the state for a particular table formatting context tree.
+class TableFormattingState : public FormattingState {
+    WTF_MAKE_ISO_ALLOCATED(TableFormattingState);
+public:
+    TableFormattingState(Ref<FloatingState>&&, LayoutState&);
+    virtual ~TableFormattingState();
+};
+
+}
+}
+
+SPECIALIZE_TYPE_TRAITS_LAYOUT_FORMATTING_STATE(TableFormattingState, isTableFormattingState())
+
+#endif
diff --git a/Source/WebCore/layout/tableformatting/TableInvalidation.cpp b/Source/WebCore/layout/tableformatting/TableInvalidation.cpp
new file mode 100644 (file)
index 0000000..1c59271
--- /dev/null
@@ -0,0 +1,50 @@
+/*
+ * Copyright (C) 2019 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 "TableInvalidation.h"
+
+#if ENABLE(LAYOUT_FORMATTING_CONTEXT)
+
+#include "Invalidation.h"
+#include "LayoutBox.h"
+#include "LayoutState.h"
+#include "TableFormattingState.h"
+#include <wtf/IsoMallocInlines.h>
+
+namespace WebCore {
+namespace Layout {
+
+WTF_MAKE_ISO_ALLOCATED_IMPL(TableInvalidation);
+
+InvalidationResult TableInvalidation::invalidate(const Box& layoutBox, StyleDiff, LayoutState& layoutState, TableFormattingState&)
+{
+    layoutState.markNeedsUpdate(layoutBox, LayoutState::UpdateType::All);
+    return { nullptr };
+}
+
+}
+}
+#endif
diff --git a/Source/WebCore/layout/tableformatting/TableInvalidation.h b/Source/WebCore/layout/tableformatting/TableInvalidation.h
new file mode 100644 (file)
index 0000000..a20d49a
--- /dev/null
@@ -0,0 +1,51 @@
+/*
+ * Copyright (C) 2019 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 <wtf/IsoMalloc.h>
+
+namespace WebCore {
+
+namespace Layout {
+
+class Box;
+class TableFormattingState;
+struct InvalidationResult;
+class LayoutState;
+enum class StyleDiff;
+
+// This class implements box invalidation for table formatting context.
+class TableInvalidation {
+    WTF_MAKE_ISO_ALLOCATED(TableInvalidation);
+public:
+    static InvalidationResult invalidate(const Box&, StyleDiff, LayoutState&, TableFormattingState&);
+};
+
+}
+}
+#endif