Bug 49871

Summary: [windows] font-size:0 text runs should have zero width
Product: WebKit Reporter: James Robinson <jamesr>
Component: Layout and RenderingAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: aroben, dglazkov, eric, fishd, hyatt, mihaip, pravind.2k4, senorblanco
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
URL: http://www.php.net/manual/en/function.session-decode.php
Attachments:
Description Flags
patch for chromium dglazkov: review+

James Robinson
Reported 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.
Attachments
patch for chromium (5.14 KB, patch)
2010-11-22 14:49 PST, James Robinson
dglazkov: review+
James Robinson
Comment 1 2010-11-22 14:49:11 PST
Created attachment 74601 [details] patch for chromium
James Robinson
Comment 2 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.
Dimitri Glazkov (Google)
Comment 3 2010-11-22 14:57:36 PST
Comment on attachment 74601 [details] patch for chromium please don't break everything when landing this.
James Robinson
Comment 4 2010-11-22 15:04:24 PST
Adam Roben (:aroben)
Comment 5 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.
Mihai Parparita
Comment 6 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
Eric Seidel (no email)
Comment 7 2010-12-14 01:34:25 PST
Seems this should be closed?
Pravin D
Comment 8 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.
Note You need to log in before you can comment on or make changes to this bug.