WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
20059
Font name gets removed (truncated) when contentEditable region
https://bugs.webkit.org/show_bug.cgi?id=20059
Summary
Font name gets removed (truncated) when contentEditable region
Nick Santos
Reported
2008-07-16 11:58:41 PDT
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.
Attachments
Add attachment
proposed patch, testcase, etc.
Justin Garcia
Comment 1
2008-07-16 12:15:05 PDT
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);
mitz
Comment 2
2008-07-16 13:22:56 PDT
<
rdar://problem/6080664
>
Ahmad Saleem
Comment 3
2022-07-30 09:38:13 PDT
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
Sam Sneddon [:gsnedders]
Comment 4
2022-07-30 10:50:28 PDT
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!
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug