Bug 251597

Summary: REGRESSION (256782@main): Animating visibility with a display:contents child causes an element to disappear
Product: WebKit Reporter: Rado <rado>
Component: CSSAssignee: Antti Koivisto <koivisto>
Status: RESOLVED FIXED    
Severity: Normal CC: dino, graouts, graouts, karlcow, koivisto, simon.fraser, webkit-bug-importer, zalan
Priority: P2 Keywords: BrowserCompat, InRadar
Version: Safari 16   
Hardware: Mac (Apple Silicon)   
OS: macOS 13   
URL: https://rado.bg/safari-16.3.html
See Also: https://bugs.webkit.org/show_bug.cgi?id=247803
Attachments:
Description Flags
Test page none

Description Rado 2023-02-02 08:59:16 PST
Created attachment 464815 [details]
Test page

An element with transitioned color on hover, inside a display: contents parent, which is displayed by animated visibility: visible. Hover it to hide it only in Safari 16.3. Normal transition observed in older Safari and Chrome.

<style>
	@keyframes menu-opening {
		100% {
			visibility: visible;
		}
	}

	ul {
		animation: menu-opening .3s 1 forwards;
		visibility: hidden;
	}

	li {
		display: contents;
	}

	a {
		transition: color .2s ease-in-out;
	}

	a:hover {
		color: red;
	}
</style>

<ul>
	<li>
		<a href="/">Hover me on Safari 16.3 and I disappear</a>
	</li>
</ul>

https://rado.bg/safari-16.3.html
Comment 1 Radar WebKit Bug Importer 2023-02-06 15:50:03 PST
<rdar://problem/105102892>
Comment 2 zalan 2023-02-06 16:13:06 PST
regression range:
https://commits.webkit.org/compare/256789@main...256757@main
Comment 3 zalan 2023-02-06 16:15:26 PST
(In reply to zalan from comment #2)
> regression range:
> https://commits.webkit.org/compare/256789@main...256757@main
there's a few strong candidates in that range, I'd start with [web-animation].
Comment 4 Antoine Quint 2023-02-07 01:06:18 PST
This regressed with 256782@main, the fix for bug 247803.
Comment 5 Antti Koivisto 2023-02-09 01:07:19 PST
Pull request: https://github.com/WebKit/WebKit/pull/9853
Comment 6 Antti Koivisto 2023-02-14 09:31:07 PST Comment hidden (obsolete)
Comment 7 EWS 2023-02-14 12:41:42 PST
Committed 260270@main (53814777b5f2): <https://commits.webkit.org/260270@main>

Reviewed commits have been landed. Closing PR #9853 and removing active labels.
Comment 8 EWS 2023-02-23 14:53:27 PST
Committed 259548.276@safari-7615-branch (403ebdb08ec1): <https://commits.webkit.org/259548.276@safari-7615-branch>

Reviewed commits have been landed. Closing PR #414 and removing active labels.