Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: d9426160b0719bc10aaac80d9e0a1c152727f404
      
https://github.com/WebKit/WebKit/commit/d9426160b0719bc10aaac80d9e0a1c152727f404
  Author: Alan Baradlay <[email protected]>
  Date:   2025-11-06 (Thu, 06 Nov 2025)

  Changed paths:
    A LayoutTests/fast/inline/blocks-in-inline-layout5-expected.html
    A LayoutTests/fast/inline/blocks-in-inline-layout5.html
    M Source/WebCore/layout/LayoutState.cpp
    M Source/WebCore/layout/LayoutState.h
    M Source/WebCore/layout/floats/PlacedFloats.cpp
    M Source/WebCore/layout/floats/PlacedFloats.h
    M Source/WebCore/layout/formattingContexts/block/BlockFormattingContext.cpp
    M 
Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.cpp
    M Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.cpp
    M 
Source/WebCore/layout/integration/LayoutIntegrationFormattingContextLayout.cpp
    M 
Source/WebCore/layout/integration/LayoutIntegrationFormattingContextLayout.h
    M Source/WebCore/layout/integration/LayoutIntegrationUtils.cpp
    M Source/WebCore/layout/integration/LayoutIntegrationUtils.h
    M Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.cpp
    M Source/WebCore/layout/layouttree/LayoutTreeBuilder.cpp
    M Source/WebCore/rendering/RenderView.cpp

  Log Message:
  -----------
  [blocks-in-inline] Floats inside blocks should get populated back to IFC
https://bugs.webkit.org/show_bug.cgi?id=302061

Reviewed by Antti Koivisto.

Floats inside these blocks may leak out to sibling inline content.

Add a special callback (layoutWithFormattingContextForBlockInInline) to take 
care of
 - laying out the block container
 - propagate floats from inside

Test: fast/inline/blocks-in-inline-layout5.html

* LayoutTests/fast/inline/blocks-in-inline-layout5-expected.html: Added.
* LayoutTests/fast/inline/blocks-in-inline-layout5.html: Added.
* Source/WebCore/layout/LayoutState.cpp:
(WebCore::Layout::LayoutState::LayoutState):
(WebCore::Layout::LayoutState::layoutWithFormattingContextForBlockInInline 
const):
* Source/WebCore/layout/LayoutState.h:
* Source/WebCore/layout/floats/PlacedFloats.cpp:
(WebCore::Layout::PlacedFloats::add):
(WebCore::Layout::PlacedFloats::append): Deleted.
* Source/WebCore/layout/floats/PlacedFloats.h:
* Source/WebCore/layout/formattingContexts/block/BlockFormattingContext.cpp:
(WebCore::Layout::BlockFormattingContext::layoutInFlowContent):
* Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.cpp:
(WebCore::Layout::InlineFormattingContext::layoutFloatContentOnly):
* Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.cpp:
(WebCore::Layout::LineBuilder::tryPlacingFloatBox):
(WebCore::Layout::LineBuilder::handleBlockContent):
* 
Source/WebCore/layout/integration/LayoutIntegrationFormattingContextLayout.cpp:
(WebCore::LayoutIntegration::layoutWithFormattingContextForBlockInInline):
* Source/WebCore/layout/integration/LayoutIntegrationFormattingContextLayout.h:
* Source/WebCore/layout/integration/LayoutIntegrationUtils.cpp:
(WebCore::Layout::IntegrationUtils::layoutWithFormattingContextForBlockInInline 
const):
* Source/WebCore/layout/integration/LayoutIntegrationUtils.h:
* Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.cpp:
(WebCore::LayoutIntegration::LineLayout::preparePlacedFloats):
* Source/WebCore/layout/layouttree/LayoutTreeBuilder.cpp:
(WebCore::Layout::printLayoutTreeForLiveDocuments):
* Source/WebCore/rendering/RenderView.cpp:
(WebCore::RenderView::RenderView):

Canonical link: https://commits.webkit.org/302648@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to