Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 93e507f08396ef7b818bb96e34d1e4fa1ed10502
      
https://github.com/WebKit/WebKit/commit/93e507f08396ef7b818bb96e34d1e4fa1ed10502
  Author: Antti Koivisto <[email protected]>
  Date:   2025-12-10 (Wed, 10 Dec 2025)

  Changed paths:
    M Source/WebCore/layout/integration/inline/LayoutIntegrationInlineContent.h
    M 
Source/WebCore/layout/integration/inline/LayoutIntegrationInlineContentBuilder.cpp
    M Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.cpp
    M Source/WebCore/rendering/RenderBlockFlow.cpp
    M Source/WebCore/rendering/RenderBlockFlow.h

  Log Message:
  -----------
  [blocks-in-inline] Shortcut painting of blocks and inline boxes only content
https://bugs.webkit.org/show_bug.cgi?id=303839
rdar://166145784

Reviewed by Alan Baradlay.

With content like

<span><div>foo</div></span>

we don't need to enter inline painting at all.

* Source/WebCore/layout/integration/inline/LayoutIntegrationInlineContent.h:
(WebCore::LayoutIntegration::InlineContent::hasPaintedInlineLevelBoxes const):
(WebCore::LayoutIntegration::InlineContent::setHasPaintedInlineLevelBoxes):

Track if we have any actual inline content that needs painting.

* 
Source/WebCore/layout/integration/inline/LayoutIntegrationInlineContentBuilder.cpp:
(WebCore::LayoutIntegration::InlineContentBuilder::adjustDisplayLines const):
* Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.cpp:
(WebCore::LayoutIntegration::LineLayout::layout):

Also return empty repaint rect in case there is no actual inline content to 
paint.
Any block content triggers its own repaints.

(WebCore::LayoutIntegration::LineLayout::paint):

Use simple path for blocks only case.

* Source/WebCore/rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::paintBlockLevelContentInInline):
* Source/WebCore/rendering/RenderBlockFlow.h:
* Source/WebCore/rendering/RenderLayer.cpp:
(WebCore::RenderLayer::paintLayerContents):

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



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

Reply via email to