Bug 52938

Summary: Inconsistent handling of no-break space in justification logic
Product: WebKit Reporter: mitz
Component: TextAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, eric, rniwa, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Test case
none
Count no-break space as a space when distributing justification padding to text boxes on a line adele: review+

Description mitz 2011-01-21 16:43:13 PST
In the attached test case, the squares on the first line should be aligned with their counterparts on the third line. They are not, because RenderBlock::computeInlineDirectionPositionsForLine() counts only ' ', '\t' and '\n' as spaces, whereas WidthIterator also counts no-break space as a space (using Font::treatAsSpace()).
Comment 1 mitz 2011-01-21 16:43:35 PST
Created attachment 79809 [details]
Test case
Comment 2 mitz 2011-01-21 17:22:56 PST
Created attachment 79813 [details]
Count no-break space as a space when distributing justification padding to text boxes on a line
Comment 3 mitz 2011-01-21 17:31:31 PST
Fixed in <http://trac.webkit.org/projects/webkit/changeset/76414>.
Comment 4 Ryosuke Niwa 2011-01-21 17:33:49 PST
Is this bug related to https://bugs.webkit.org/show_bug.cgi?id=38902 ?
Comment 5 mitz 2011-01-21 17:35:50 PST
(In reply to comment #4)
> Is this bug related to https://bugs.webkit.org/show_bug.cgi?id=38902 ?

Hardly.
Comment 6 WebKit Review Bot 2011-01-21 18:01:10 PST
http://trac.webkit.org/changeset/76414 might have broken Qt Linux Release
The following tests are not passing:
fast/text/justify-nbsp.html
Comment 8 mitz 2011-01-21 19:13:05 PST
Sorry about that. I think I accidentally checked in a contenteditable version of the test with result from a non-editable version or vice versa.
Comment 9 mitz 2011-01-21 19:23:05 PST
Committed revision 76421.