| Summary: | [Content-visibility][repaint] Boxes with "content-visibility: hidden" lingers around | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | zalan <zalan> | ||||||
| Component: | Layout and Rendering | Assignee: | Rob Buis <rbuis> | ||||||
| Status: | RESOLVED FIXED | ||||||||
| Severity: | Normal | CC: | bfulgham, ntim, rbuis, simon.fraser, webkit-bug-importer, zalan | ||||||
| Priority: | P2 | Keywords: | InRadar | ||||||
| Version: | WebKit Nightly Build | ||||||||
| Hardware: | Unspecified | ||||||||
| OS: | Unspecified | ||||||||
| Attachments: |
|
||||||||
I think this may be not exclusively a content-visibility problem, this triggers lingering content too:
<script>
function runTest() {
container.style.position = "relative";
change_this.style.visibility = "hidden";
};
</script>
<body onclick="runTest()">
PASS if no red box disappears.
<div id=container><div id=change_this style="width: 50px; height: 50px; position: absolute; background-color: red; top: 0px; left: 0px;"></div></div>
</body>
I think this happens when canContainAbsolutelyPositionedObjects was false and becomes true for a container (other than the outer view) and the repaint rect of the absolute positioned element becomes empty due to this, so the repaint due to RenderElement::repaintBeforeStyleChange is incomplete.
Do people know of a similar bug like this (so non content-visibility)?
Pull request: https://github.com/WebKit/WebKit/pull/22491 Created attachment 469350 [details]
Alternative test case (no content-visibility used)
Shows part of the problem why the original test case has repaint issues.
The attached alternative test case (first mentioned in comment 2) is failing on TP 185 and ToT going back to Oct 31 2023 (did not check before that). Surprisingly to me, my official Safari (version 17.2.1 (19617.1.17.11.12)) does not show the repaint issue. Some more data, I went back to June 2023 and the problem with "alternative test case" was still present. I can't go before that since it does not build on Sonoma. A colleague tried Safari 16.3 and the problem is also there. Cathie tried on Safari Version 15.5 (17613.2.7.1.8), same paint artifact. Seems like this is a quite old repaint problem! Committed 273602@main (b96b33ee6c4c): <https://commits.webkit.org/273602@main> Reviewed commits have been landed. Closing PR #22491 and removing active labels. |
Created attachment 468475 [details] test case this may very well be a containment repaint issue.