[webkit-changes] [WebKit/WebKit] b96b33: [Content-visibility][repaint] Boxes with "content-...
Rob Buis
noreply at github.com
Sat Jan 27 00:26:13 PST 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: b96b33ee6c4c6dde7bf51c3744d6ccbc19a517e8
https://github.com/WebKit/WebKit/commit/b96b33ee6c4c6dde7bf51c3744d6ccbc19a517e8
Author: Rob Buis <rbuis at igalia.com>
Date: 2024-01-27 (Sat, 27 Jan 2024)
Changed paths:
A LayoutTests/fast/repaint/content-visibility-hidden-container-with-abs-pos-c-v-auto-child-expected.txt
A LayoutTests/fast/repaint/content-visibility-hidden-container-with-abs-pos-c-v-auto-child.html
A LayoutTests/fast/repaint/content-visibility-hidden-container-with-abs-pos-child-expected.txt
A LayoutTests/fast/repaint/content-visibility-hidden-container-with-abs-pos-child.html
A LayoutTests/fast/repaint/position-relative-container-with-abs-pos-child-expected.txt
A LayoutTests/fast/repaint/position-relative-container-with-abs-pos-child.html
M Source/WebCore/rendering/RenderElement.cpp
Log Message:
-----------
[Content-visibility][repaint] Boxes with "content-visibility: hidden" lingers around
https://bugs.webkit.org/show_bug.cgi?id=264173
Reviewed by Simon Fraser.
When skipped content becomes hidden, a repaint should be issued to clear it, before the style change is processed.
Add repaint logic for that similar to what is done when the visibility property changes to hidden on an element.
However, absolute positioned elements are not always repainted correctly when hidden and the container
changes. First, after layout repaints will have no effect since it is skipped for layers with hidden content.
For the repaint before style change, the newly calculated clipped overflow rectangle can be empty, causing the
artefact. Fix this by always using the cached clipped overflow ("old") rectangle for out of flow elements, if
it is available, in before style change repainting.
* LayoutTests/fast/repaint/content-visibility-hidden-container-with-abs-pos-c-v-auto-child-expected.txt: Added.
* LayoutTests/fast/repaint/content-visibility-hidden-container-with-abs-pos-c-v-auto-child.html: Added.
* LayoutTests/fast/repaint/content-visibility-hidden-container-with-abs-pos-child-expected.txt: Added.
* LayoutTests/fast/repaint/content-visibility-hidden-container-with-abs-pos-child.html: Added.
* LayoutTests/fast/repaint/position-relative-container-with-abs-pos-child-expected.txt: Added.
* LayoutTests/fast/repaint/position-relative-container-with-abs-pos-child.html: Added.
* Source/WebCore/rendering/RenderElement.cpp:
(WebCore::RenderElement::repaintBeforeStyleChange):
(WebCore::RenderElement::styleWillChange):
Canonical link: https://commits.webkit.org/273602@main
More information about the webkit-changes
mailing list