|Summary:||[windows] font-size:0 text runs should have zero width|
|Product:||WebKit||Reporter:||James Robinson <jamesr>|
|Component:||Layout and Rendering||Assignee:||Nobody <webkit-unassigned>|
|Severity:||Normal||CC:||aroben, dglazkov, eric, fishd, hyatt, mihai, pravind.2k4, senorblanco|
|Version:||528+ (Nightly build)|
|OS:||OS X 10.5|
Description James Robinson 2010-11-20 16:20:24 PST
The following should render with no gap between 'abc' and 'def': abc<span style="font-size:0">w</span>def but on the latest nightlies there's a large gap. This causes us to misrender the php.net manual which uses this pattern (for whatever reason). My guess it that we need to special-case platformWidthForGlyph(Glyph glyph) for the case when the font size is zero, but I don't currently have access to a windows development platform to verify.
Comment 1 James Robinson 2010-11-22 14:49:11 PST
Created attachment 74601 [details] patch for chromium
Comment 2 James Robinson 2010-11-22 14:51:11 PST
Here's a patch for the chromium SimpleFont* classes that need them. The OS X code seems to all work fine. I'm pretty positive that the Safari Win port needs a similar patch, but I'm not sure exactly how to handle boundsForGDIGlyph() and don't have access to a dev environment to test code changes on Safari/Win so I've left that codepath alone.
Comment 3 Dimitri Glazkov (Google) 2010-11-22 14:57:36 PST
Comment on attachment 74601 [details] patch for chromium please don't break everything when landing this.
Comment 4 James Robinson 2010-11-22 15:04:24 PST
Committed r72567: <http://trac.webkit.org/changeset/72567>
Comment 5 Adam Roben (:aroben) 2010-11-22 15:23:22 PST
(In reply to comment #2) > I'm pretty positive that the Safari Win port needs a similar patch, but I'm not sure exactly how to handle boundsForGDIGlyph() I think you can handle it just like the other width functions.
Comment 6 Mihai Parparita 2010-11-24 09:54:57 PST
BTW, the updated test fails on the upstream Mac port on Leopard (presumably an ATSUI vs. CoreText difference): -PASS s.getBoundingClientRect().width is 0 +FAIL s.getBoundingClientRect().width should be 0. Was 2147483648. http://build.webkit.org/results/Leopard%20Intel%20Debug%20(Tests)/r72675%20(23809)/results.html
Comment 7 Eric Seidel (no email) 2010-12-14 01:34:25 PST
Seems this should be closed?
Comment 8 Pravin D 2012-04-10 02:31:50 PDT
The same behavior is seen on Safari windows. Please reopen the bug. I'm uploading the patch for the same.