Bug 52938 - Inconsistent handling of no-break space in justification logic
Summary: Inconsistent handling of no-break space in justification logic
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Text (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-21 16:43 PST by mitz
Modified: 2011-01-21 19:23 PST (History)
4 users (show)

See Also:


Attachments
Test case (223 bytes, text/html)
2011-01-21 16:43 PST, mitz
no flags Details
Count no-break space as a space when distributing justification padding to text boxes on a line (20.45 KB, patch)
2011-01-21 17:22 PST, mitz
adele: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.