[webkit-changes] [WebKit/WebKit] 3cf19d: REGRESSION (r294902): Overflowed area is not repai...

alan noreply at github.com
Sat Oct 8 07:42:24 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 3cf19dcd601e49247ff8316577c8d6b77afb0f33
      https://github.com/WebKit/WebKit/commit/3cf19dcd601e49247ff8316577c8d6b77afb0f33
  Author: Alan Bujtas <zalan at apple.com>
  Date:   2022-10-08 (Sat, 08 Oct 2022)

  Changed paths:
    A LayoutTests/fast/repaint/incorrect-repaint-when-container-changes-from-overflow-visible-to-hidden-expected.txt
    A LayoutTests/fast/repaint/incorrect-repaint-when-container-changes-from-overflow-visible-to-hidden.html
    M Source/WebCore/rendering/RenderBox.cpp

  Log Message:
  -----------
  REGRESSION (r294902): Overflowed area is not repainted when just changed to "hidden".
https://bugs.webkit.org/show_bug.cgi?id=246203
<rdar://problem/100901132>

Reviewed by Simon Fraser.

1. When a layer has "full repaint" flag set we skip any subsequent repaint requests on the associated renderer and on any of its descendants because we know that the layer would eventually issue a repaint on the enclosing rect after layout.
2. This "full repaint" produces a damaged rect based on the layer's (associated renderer) overflow status.

This works fine as long as we don't try to repaint the overflown area while also changing the renderer's overflow property from visible to hidden.
In such cases all incoming repaint requests will either be
1. clipped to the non-overflown area of the renderer (forced repaint) or
2. simply ignored as the associated layer already has the "full repaint" flag set.

This patch ensures that such style change always triggers repaint on the overflown content as well.

* LayoutTests/fast/repaint/incorrect-repaint-when-container-changes-from-overflow-visible-to-hidden-expected.txt: Added.
* LayoutTests/fast/repaint/incorrect-repaint-when-container-changes-from-overflow-visible-to-hidden.html: Added.
* Source/WebCore/rendering/RenderBox.cpp: Send forced repaint so that we don't delay issuing the repaint after layout when the renderer's overflow is already "hidden". Otherwise these 2 repaints get ignored and by the time we issue the repaint (layer, after layout) the damaged rect is computed with clipping applied.

(WebCore::RenderBox::updateFromStyle):
* Source/WebCore/rendering/RenderObject.cpp:
(WebCore::RenderObject::issueRepaint const):

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




More information about the webkit-changes mailing list