Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 7f90d8fcd4de84e348be1091ab55bd44e1488559
      
https://github.com/WebKit/WebKit/commit/7f90d8fcd4de84e348be1091ab55bd44e1488559
  Author: Alan Baradlay <[email protected]>
  Date:   2026-02-06 (Fri, 06 Feb 2026)

  Changed paths:
    A LayoutTests/fast/repaint/block-in-inline-with-margin-repaint-expected.txt
    A LayoutTests/fast/repaint/block-in-inline-with-margin-repaint.html
    M Source/WebCore/rendering/RenderBlockFlow.cpp

  Log Message:
  -----------
  [block-in-inline] layoutSimpleBlockContentInInline initiates redundant 
repaints
https://bugs.webkit.org/show_bug.cgi?id=307185

Reviewed by Antti Koivisto.

In RenderBlockFlow, the container's (this) height value is what tells us where 
the
candidate position for the current child is (i.e. container grows as we layout 
children,
also see comment in RenderBlockFlow::layoutBlockChildFromInlineLayout).

Now when layoutSimpleBlockContentInInline is called to layout only the 
descendants of
a block container (i.e. block container itself is not dirty), we have to pretend
that the parent container's height is where this block container starts in 
block direction (logical top).

However this position is supposed to be the margin top (where the box really 
really starts) and not the border top. A first step in layoutBlockChild is to 
take this position
and adjust it with margins and if we already at border top, we would double 
account for margin top.

Test: fast/repaint/block-in-inline-with-margin-repaint.html

* LayoutTests/fast/repaint/block-in-inline-with-margin-repaint-expected.txt: 
Added.
* LayoutTests/fast/repaint/block-in-inline-with-margin-repaint.html: Added.
* Source/WebCore/rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::layoutSimpleBlockContentInInline):

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



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

Reply via email to