Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
REGRESSION (r294902): Overflowed area is not repainted when just chan…
…ged 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
- Loading branch information