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

  Changed paths:
    M LayoutTests/fast/inline/blocks-in-inline-float-clear.html
    A LayoutTests/fast/inline/blocks-in-inline-layout-with-margins-expected.html
    A LayoutTests/fast/inline/blocks-in-inline-layout-with-margins.html
    M Source/WebCore/layout/formattingContexts/block/BlockLayoutState.h
    M 
Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.cpp
    M 
Source/WebCore/layout/integration/LayoutIntegrationFormattingContextLayout.cpp
    M Source/WebCore/rendering/RenderBlockFlow.cpp
    M Source/WebCore/rendering/RenderBlockFlow.h

  Log Message:
  -----------
  [blocks-in-inline] Fix simple margin collapsing before/after between blocks
https://bugs.webkit.org/show_bug.cgi?id=302574

Reviewed by Antti Koivisto.

1. Before running render tree layout covert MarginState -> MarginInfo
2. Call dedicated RenderBlockFlow::layoutBlockChildFromInlineLayout to layout 
block(s) in inline
3. After layout covert MarginInfo -> MarginState

Test: fast/inline/blocks-in-inline-layout-with-margins.html

* LayoutTests/fast/inline/blocks-in-inline-float-clear.html:
* LayoutTests/fast/inline/blocks-in-inline-layout-with-margins-expected.html: 
Added.
* LayoutTests/fast/inline/blocks-in-inline-layout-with-margins.html: Added.
* Source/WebCore/layout/formattingContexts/block/BlockLayoutState.h:
(WebCore::Layout::BlockLayoutState::MarginState::resetBeforeSideOfBlock):
(WebCore::Layout::BlockLayoutState::MarginState::margin const):
* Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.cpp:
(WebCore::Layout::InlineFormattingContext::updateLayoutStateWithLineLayoutResult):
* 
Source/WebCore/layout/integration/LayoutIntegrationFormattingContextLayout.cpp:
(WebCore::LayoutIntegration::layoutWithFormattingContextForBlockInInline):
* Source/WebCore/rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::MarginInfo::MarginInfo):
(WebCore::RenderBlockFlow::layoutBlockChildFromInlineLayout):
* Source/WebCore/rendering/RenderBlockFlow.h:

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



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

Reply via email to