Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 98705549462a0f7d6715942398bbc28fd7eb0e49
      
https://github.com/WebKit/WebKit/commit/98705549462a0f7d6715942398bbc28fd7eb0e49
  Author: Antti Koivisto <[email protected]>
  Date:   2025-11-10 (Mon, 10 Nov 2025)

  Changed paths:
    A LayoutTests/fast/inline/blocks-in-inline-paint-order-expected.html
    A LayoutTests/fast/inline/blocks-in-inline-paint-order.html
    M Source/WebCore/layout/integration/inline/LayoutIntegrationInlineContent.h
    M 
Source/WebCore/layout/integration/inline/LayoutIntegrationInlineContentBuilder.cpp
    M 
Source/WebCore/layout/integration/inline/LayoutIntegrationInlineContentPainter.cpp
    M 
Source/WebCore/layout/integration/inline/LayoutIntegrationInlineContentPainter.h
    M Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.cpp
    M Source/WebCore/rendering/RenderBlock.cpp
    M Source/WebCore/rendering/RenderBlock.h

  Log Message:
  -----------
  [blocks-in-inline] Fix paint order of blocks
https://bugs.webkit.org/show_bug.cgi?id=302268
rdar://164407663

Reviewed by Alan Baradlay.

Currently they paint line inline-blocks but this is not correct. 
Blocks-in-inline should
follow regular paint phases.

Test: fast/inline/blocks-in-inline-paint-order.html
* LayoutTests/fast/inline/blocks-in-inline-paint-order-expected.html: Added.
* LayoutTests/fast/inline/blocks-in-inline-paint-order.html: Added.
* Source/WebCore/layout/integration/inline/LayoutIntegrationInlineContent.h:
(WebCore::LayoutIntegration::InlineContent::hasBlockLevelBoxes const):
(WebCore::LayoutIntegration::InlineContent::setHasBlockLevelBoxes):

Add a bit so we can skip unneeded paint phases.

* 
Source/WebCore/layout/integration/inline/LayoutIntegrationInlineContentBuilder.cpp:
(WebCore::LayoutIntegration::InlineContentBuilder::adjustDisplayLines const):
* 
Source/WebCore/layout/integration/inline/LayoutIntegrationInlineContentPainter.cpp:
(WebCore::LayoutIntegration::InlineContentPainter::paintDisplayBox):

Paint block level boxes using a different path that respect paint phases.

(WebCore::LayoutIntegration::InlineContentPainter::paint):

Support more paint phases.

Test for if we should skip due to baing insider layer first.
The function also updates the state so if we skip due to paint phase we fail
to update correctly.

(WebCore::LayoutIntegration::LayerPaintScope::testIsIncludesAndUpdate):
(WebCore::LayoutIntegration::LayerPaintScope::includes): Deleted.

Rename for clarity.

* 
Source/WebCore/layout/integration/inline/LayoutIntegrationInlineContentPainter.h:
* Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.cpp:
(WebCore::LayoutIntegration::LineLayout::paint):

We need to handle additional paint phases if there is inline content.

(WebCore::LayoutIntegration::LineLayout::hitTest):
* Source/WebCore/rendering/RenderBlock.cpp:
(WebCore::RenderBlock::paintInfoForBlockChildren const):

Factor into a function.

(WebCore::RenderBlock::paintContents):
* Source/WebCore/rendering/RenderBlock.h:

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



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

Reply via email to