Title: [267460] trunk/Source/WebCore
Revision
267460
Author
[email protected]
Date
2020-09-22 20:48:22 -0700 (Tue, 22 Sep 2020)

Log Message

[LFC][Floats] Remove the redundant RuntimeEnabledFeatures::layoutFormattingContextIntegrationEnabled() check from FloatingState::append
https://bugs.webkit.org/show_bug.cgi?id=216866

Reviewed by Simon Fraser.

The no-layout-box-for-the-FloatItem codepath is reserved for the IFC integration. This is temporary anyway.

* layout/floats/FloatingState.cpp:
(WebCore::Layout::FloatingState::append):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (267459 => 267460)


--- trunk/Source/WebCore/ChangeLog	2020-09-23 03:41:44 UTC (rev 267459)
+++ trunk/Source/WebCore/ChangeLog	2020-09-23 03:48:22 UTC (rev 267460)
@@ -1,3 +1,15 @@
+2020-09-22  Zalan Bujtas  <[email protected]>
+
+        [LFC][Floats] Remove the redundant RuntimeEnabledFeatures::layoutFormattingContextIntegrationEnabled() check from FloatingState::append
+        https://bugs.webkit.org/show_bug.cgi?id=216866
+
+        Reviewed by Simon Fraser.
+
+        The no-layout-box-for-the-FloatItem codepath is reserved for the IFC integration. This is temporary anyway.
+
+        * layout/floats/FloatingState.cpp:
+        (WebCore::Layout::FloatingState::append):
+
 2020-09-22  Lauro Moura  <[email protected]>
 
         [GTK] REGRESSION(r267329): imported/blink/editing/undo/crash-redo-with-iframes.html is crashing

Modified: trunk/Source/WebCore/layout/floats/FloatingState.cpp (267459 => 267460)


--- trunk/Source/WebCore/layout/floats/FloatingState.cpp	2020-09-23 03:41:44 UTC (rev 267459)
+++ trunk/Source/WebCore/layout/floats/FloatingState.cpp	2020-09-23 03:48:22 UTC (rev 267460)
@@ -61,19 +61,14 @@
 
 void FloatingState::append(FloatItem floatItem)
 {
-    ASSERT(is<ContainerBox>(*m_formattingContextRoot));
-#if ASSERT_ENABLED
-    if (!RuntimeEnabledFeatures::sharedFeatures().layoutFormattingContextIntegrationEnabled()) {
-        // The integration codepath does not construct a layout box for the float item.
-        ASSERT(m_floats.findMatching([&] (auto& entry) {
-            return entry.floatBox() == floatItem.floatBox();
-        }) == notFound);
-    }
-#endif
-
     if (m_floats.isEmpty())
         return m_floats.append(floatItem);
 
+    // The integration codepath does not construct a layout box for the float item.
+    ASSERT_IMPLIES(floatItem.floatBox(), m_floats.findMatching([&] (auto& entry) {
+        return entry.floatBox() == floatItem.floatBox();
+    }) == notFound);
+
     auto isLeftPositioned = floatItem.isLeftPositioned();
     // When adding a new float item to the list, we have to ensure that it is definitely the left(right)-most item.
     // Normally it is, but negative horizontal margins can push the float box beyond another float box.
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to