Title: [248263] trunk/Source/WebCore
Revision
248263
Author
[email protected]
Date
2019-08-04 06:59:31 -0700 (Sun, 04 Aug 2019)

Log Message

[LFC][TFC] Create formatting context/state.
https://bugs.webkit.org/show_bug.cgi?id=200428
<rdar://problem/53913625>

Reviewed by Antti Koivisto.

* layout/LayoutState.cpp:
(WebCore::Layout::LayoutState::createFormattingStateForFormattingRootIfNeeded):
(WebCore::Layout::LayoutState::createFormattingContext):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (248262 => 248263)


--- trunk/Source/WebCore/ChangeLog	2019-08-04 10:16:06 UTC (rev 248262)
+++ trunk/Source/WebCore/ChangeLog	2019-08-04 13:59:31 UTC (rev 248263)
@@ -1,5 +1,17 @@
 2019-08-04  Zalan Bujtas  <[email protected]>
 
+        [LFC][TFC] Create formatting context/state.
+        https://bugs.webkit.org/show_bug.cgi?id=200428
+        <rdar://problem/53913625>
+
+        Reviewed by Antti Koivisto.
+
+        * layout/LayoutState.cpp:
+        (WebCore::Layout::LayoutState::createFormattingStateForFormattingRootIfNeeded):
+        (WebCore::Layout::LayoutState::createFormattingContext):
+
+2019-08-04  Zalan Bujtas  <[email protected]>
+
         [LFC] Cleanup preferred width computation
         https://bugs.webkit.org/show_bug.cgi?id=200426
         <rdar://problem/53912607>

Modified: trunk/Source/WebCore/layout/LayoutState.cpp (248262 => 248263)


--- trunk/Source/WebCore/layout/LayoutState.cpp	2019-08-04 10:16:06 UTC (rev 248262)
+++ trunk/Source/WebCore/layout/LayoutState.cpp	2019-08-04 13:59:31 UTC (rev 248263)
@@ -38,6 +38,8 @@
 #include "Invalidation.h"
 #include "LayoutBox.h"
 #include "LayoutContainer.h"
+#include "TableFormattingContext.h"
+#include "TableFormattingState.h"
 #include <wtf/IsoMallocInlines.h>
 
 namespace WebCore {
@@ -147,6 +149,14 @@
         }).iterator->value;
     }
 
+    if (formattingRoot.establishesTableFormattingContext()) {
+        return *m_formattingStates.ensure(&formattingRoot, [&] {
+
+            // Table formatting context always establishes a new floating state -and it stays empty.
+            return std::make_unique<TableFormattingState>(FloatingState::create(*this, formattingRoot), *this);
+        }).iterator->value;
+    }
+
     CRASH();
 }
 
@@ -164,6 +174,11 @@
         return std::make_unique<BlockFormattingContext>(formattingContextRoot, blockFormattingState);
     }
 
+    if (formattingContextRoot.establishesTableFormattingContext()) {
+        auto& tableFormattingState = downcast<TableFormattingState>(createFormattingStateForFormattingRootIfNeeded(formattingContextRoot));
+        return std::make_unique<TableFormattingContext>(formattingContextRoot, tableFormattingState);
+    }
+
     CRASH();
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to