Bug 23755 - [S60] font's face attibute is converted into font-face declaration incorrectly
Summary: [S60] font's face attibute is converted into font-face declaration incorrectly
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 412
Hardware: S60 Hardware S60 3rd edition
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-05 02:33 PST by Lauri Taipale
Modified: 2010-03-30 16:07 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lauri Taipale 2009-02-05 02:33:43 PST
Reproducible with WebKit versions 413 and 525 on the S60 platform.

If HTML "font" element's "face" attribute contains a font name that has "independent" numbers in it, e.g. "Font 123 Sans", the font name is converted into CSS "font-family" declaration incorrectly which causes the font name parsing to fail and WebKit to fall back to the default rendering font.

When the "face" attribute's value is converted into "font-family" declaration, font names that have spaces in the name are not properly enclosed in quotes (').

E.g.

    <font face="Font 123 Sans">

becomes

    font-family: Series 60 Sans;

when it should be (according to the CSS specs)

    font-family: 'Series 60 Sans';

This causes the "CSSParser::ParseFontFamily" method to stop parsing the font name when it encounters the number part of the font name (in this case "123"), causing the font name to be truncated, i.e. "Font 123 Sans" becomes "Font". This then causes the CTextRenderer(Factory) to fall back to the default rendering font (debugged with WebKit 413).

(If the font name in the "face" attribute is enclosed in quotes (against the HTML specification), e.g. <font face="'Font 123 Sans'">, then the conversion and parsing is done "correctly".)