Bug 197544 - [CSS 2.1 Conformance] System font reserved names support
Summary: [CSS 2.1 Conformance] System font reserved names support
Status: VERIFIED FIXED
Alias: None
Product: konqueror
Classification: Applications
Component: khtml (show other bugs)
Version: 4.2.4
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords: testcase
Depends on:
Blocks:
 
Reported: 2009-06-22 21:49 UTC by Gérard Talbot (no longer involved)
Modified: 2010-09-30 22:13 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gérard Talbot (no longer involved) 2009-06-22 21:49:43 UTC
Version:            (using KDE 4.2.4)
OS:                Linux
Installed from:    Ubuntu Packages

Testcase:
http://www.gtalbot.org/BrowserBugsSection/Konqueror4Bugs/system-font-reserved-names-support.html

Additional testcase:
http://webdesign.about.com/od/examples/l/bl_fonts.htm#system

regards, Gérard
Comment 1 Maksim Orlovich 2010-04-05 01:23:20 UTC
Am I right to understand that this should reset everything -- family, size, style, line height, etc.?
Comment 2 Gérard Talbot (no longer involved) 2010-04-05 04:54:45 UTC
Yes, Maksim:

"
'font' 
Value:    [ [ <'font-style'> || <'font-variant'> || <'font-weight'> ]? <'font-size'> [ / <'line-height'> ]? <'font-family'> ] | caption | icon | menu | message-box | small-caption | status-bar | inherit

(...)

System fonts may only be set as a whole; that is, the font family, size, weight, style, etc. are all set at the same time. These values may then be altered individually if desired.
"
CSS 2.1, section 15.8 Shorthand font property: the 'font' property
http://www.w3.org/TR/CSS21/fonts.html#font-shorthand

If a system font (caption | icon | menu | message-box | small-caption | status-bar [1]) is used, then nothing else should be inserted in the declaration. What I mean here is this:

font: caption; /* valid CSS declaration */ 

font: 32px caption; /* invalid CSS declaration which should be rejected, ignored */

[1]: "A bar (|) separates two or more alternatives: exactly one of them must occur."
http://www.w3.org/TR/CSS21/about.html#value-defs

regards, Gérard
Comment 3 Maksim Orlovich 2010-04-05 19:00:47 UTC
SVN commit 1111438 by orlovich:

Implement application of system font keywords. Also make parsing of them not fall-through to list-style (ooops).
Brain bootup confirmed :)

BUG: 197544


 M  +1 -0      cssparser.cpp  
 M  +45 -0     cssstyleselector.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1111438
Comment 4 Gérard Talbot (no longer involved) 2010-09-30 22:13:07 UTC
I get expected results with Konqueror 4.5.1 (Qt: 4.7.0). Thank you Maksim! :)

Marking as VERIFIED

regards, Gérard