When you have a contentEditable element with the contents <span style='font-family: non-existent-font, comic sans ms'>Some text</span> and the user edits it, Webkit will truncate the font-family to "non-existent-font". <enter> and <backspace> keys trigger the issue most often. See the link for a demo.
There's a FIXME about this in CSSComputedStyleDeclaration.cpp: case CSSPropertyFontFamily: // FIXME: This only returns the first family. return CSSPrimitiveValue::create(style->fontDescription().family().family().string(), CSSPrimitiveValue::CSS_STRING);
<rdar://problem/6080664>
I took the test case from URL field and found it via Wayback Archive below: https://web.archive.org/web/20140806233320/https://nick-santos.com/tests/font_truncation.html I am not able to reproduce the bug where the text lose the font detail as per reproduction steps in the test case in Safari 15.6 on macOS 12.5. I think this got fixed along the way and this can be marked as "RESOLVED CONFIGURATION CHANGED". Further, I am not able to find "FIXME:..." mentioned in Webkit Github source file: https://github.com/WebKit/WebKit/blob/e8c097a648c8dbf127e1508535667689a3a2011c/Source/WebCore/css/CSSComputedStyleDeclaration.cpp
And `git log -S'FIXME: This only returns the first family.' -- '**/CSSComputedStyleDeclaration.cpp'` finds us 6084a5fe617e (35715@main) which indeed looks like it would've fixed this. No Bugzilla bug for that change, though!