Title: [281362] trunk/Source/WebCore
Revision
281362
Author
[email protected]
Date
2021-08-20 20:20:23 -0700 (Fri, 20 Aug 2021)

Log Message

[IFC][Integration] canUseForLineLayoutWithReason's establishesInlineFormattingContext should check against inflow content
https://bugs.webkit.org/show_bug.cgi?id=229104

Reviewed by Antti Koivisto.

<div><div style="position: absolute"></div>this is still a inline formatting context</div>
We don't allow to mix inline and block inflow content.
However out-of-flow block level boxes can certainly have inline siblings. canUseForLineLayoutWithReason should check
the content accordingly.

* layout/integration/LayoutIntegrationCoverage.cpp:
(WebCore::LayoutIntegration::canUseForLineLayoutWithReason):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (281361 => 281362)


--- trunk/Source/WebCore/ChangeLog	2021-08-21 03:16:20 UTC (rev 281361)
+++ trunk/Source/WebCore/ChangeLog	2021-08-21 03:20:23 UTC (rev 281362)
@@ -1,5 +1,20 @@
 2021-08-20  Alan Bujtas  <[email protected]>
 
+        [IFC][Integration] canUseForLineLayoutWithReason's establishesInlineFormattingContext should check against inflow content
+        https://bugs.webkit.org/show_bug.cgi?id=229104
+
+        Reviewed by Antti Koivisto.
+
+        <div><div style="position: absolute"></div>this is still a inline formatting context</div>
+        We don't allow to mix inline and block inflow content.
+        However out-of-flow block level boxes can certainly have inline siblings. canUseForLineLayoutWithReason should check
+        the content accordingly.
+
+        * layout/integration/LayoutIntegrationCoverage.cpp:
+        (WebCore::LayoutIntegration::canUseForLineLayoutWithReason):
+
+2021-08-20  Alan Bujtas  <[email protected]>
+
         [IFC][Integration] Walk the box tree to update the replaced content location
         https://bugs.webkit.org/show_bug.cgi?id=229105
 

Modified: trunk/Source/WebCore/layout/integration/LayoutIntegrationCoverage.cpp (281361 => 281362)


--- trunk/Source/WebCore/layout/integration/LayoutIntegrationCoverage.cpp	2021-08-21 03:16:20 UTC (rev 281361)
+++ trunk/Source/WebCore/layout/integration/LayoutIntegrationCoverage.cpp	2021-08-21 03:20:23 UTC (rev 281362)
@@ -702,13 +702,12 @@
             return false;
         }
         ASSERT(flow.parent());
-        // FIXME: This should really get the first _inflow_ child.
-        auto* firstChild = flow.firstChild();
-        if (!firstChild) {
+        auto* firstInFlowChild = flow.firstInFlowChild();
+        if (!firstInFlowChild) {
             // Empty block containers do not initiate inline formatting context.
             return false;
         }
-        return firstChild->isInline() || firstChild->isInlineBlockOrInlineTable();
+        return firstInFlowChild->isInline() || firstInFlowChild->isInlineBlockOrInlineTable();
     };
     if (!establishesInlineFormattingContext())
         SET_REASON_AND_RETURN_IF_NEEDED(FlowDoesNotEstablishInlineFormattingContext, reasons, includeReasons);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to