Bug 42437 - white-space: pre text containing tabs is not laid out correctly when the font lacks a space glyph
Summary: white-space: pre text containing tabs is not laid out correctly when the font...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Text (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: mitz
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2010-07-15 18:32 PDT by mitz
Modified: 2010-07-16 09:09 PDT (History)
0 users

See Also:


Attachments
Use the width of the space glyph from the font that supplies the space glyph (2.70 KB, patch)
2010-07-16 00:00 PDT, mitz
andersca: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description mitz 2010-07-15 18:32:22 PDT
Tab width calculation in WidthIterator and ComplexTextController uses Font::tabWidth(), which is based on Font::spaceWidth(). When the specified font lacks a space glyph, spaceWidth() will be 0 or otherwise wrong. Instead, the width of the space glyph from the fallback font should be used.

Patch forthcoming.
Comment 1 mitz 2010-07-15 18:34:11 PDT
<rdar://problem/8198266>
Comment 2 mitz 2010-07-16 00:00:18 PDT
Created attachment 61770 [details]
Use the width of the space glyph from the font that supplies the space glyph
Comment 3 Anders Carlsson 2010-07-16 09:00:58 PDT
Comment on attachment 61770 [details]
Use the width of the space glyph from the font that supplies the space glyph

Looks like you can remove Font::tabWidth now.

r=me
Comment 4 mitz 2010-07-16 09:09:06 PDT
Fixed in <http://trac.webkit.org/projects/webkit/changeset/63556>.