Bug 101443 - REGRESSION (r125578): word-wrapping in absolute position with nbsp, word-spacing and custom font
Summary: REGRESSION (r125578): word-wrapping in absolute position with nbsp, word-spac...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Macintosh Intel OS X 10.8
: P1 Normal
Assignee: Robert Hogan
URL: http://jsfiddle.net/5Htwx/1/
Keywords: Regression
Depends on:
Blocks:
 
Reported: 2012-11-07 03:24 PST by openmail+webkit
Modified: 2019-01-09 05:26 PST (History)
7 users (show)

See Also:


Attachments
Example of the issue. (696 bytes, text/html)
2012-11-07 03:25 PST, openmail+webkit
no flags Details
Patch (4.25 KB, patch)
2012-11-11 03:53 PST, Robert Hogan
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description openmail+webkit 2012-11-07 03:24:37 PST
In the example the div should only be one line of text, instead the line is wrapped.

Broken in WebKit Nightly 8536.26.17, 537+ and Chrome 23.0.1271.64
Works in Safari 6.0.2, Firefox 16.0 Mac, Opera 12.02 Mac, Chrome 22 Mac
Comment 1 openmail+webkit 2012-11-07 03:25:29 PST
Created attachment 172750 [details]
Example of the issue.
Comment 2 mitz 2012-11-07 09:57:37 PST
Also happens without the custom font. Probably a duplicate of bug 96856.
Comment 3 Alexey Proskuryakov 2012-11-07 09:59:32 PST
This seems to have been an intentional change, see <http://trac.webkit.org/changeset/125578>. However, bug 89826 does not mention any testing performed, so perhaps CSS spec is just wrong.

Why do you say that the new behavior is incorrect? Does the change break any live sites?
Comment 4 mitz 2012-11-07 10:11:41 PST
(In reply to comment #3)
> This seems to have been an intentional change, see <http://trac.webkit.org/changeset/125578>. However, bug 89826 does not mention any testing performed, so perhaps CSS spec is just wrong.
> 
> Why do you say that the new behavior is incorrect? Does the change break any live sites?

This is incorrect because the box should stretch to the maximum preferred width of its contents (regardless of how word-spacing factors into that width), but instead it falls short, so the text is forced to wrap. When the behavior of word-spacing was changed in r125578, supposedly for compliance with the spec, the maximum width calculation in RenderText was not updated, causing a discrepancy that leads to this bug.
Comment 5 openmail+webkit 2012-11-07 10:13:58 PST
> Also happens without the custom font.

You are right, I probably messed something up, custom font is not necessary to reproduce.

> Why do you say that the new behavior is incorrect? Does the change break any live sites?

Well, it breaks my site http://i.imgur.com/3pI6k.png but that's not a major problem. 

PS: Incidentally I just noticed on right on this page: http://i.imgur.com/3pI6k.png didn't check if related.
Comment 6 openmail+webkit 2012-11-07 10:15:28 PST
> PS: Incidentally I just noticed on right on this page …

Here's the correct link: http://i.imgur.com/SlFqz.png
Comment 7 Robert Hogan 2012-11-11 03:53:08 PST
Created attachment 173496 [details]
Patch
Comment 8 Robert Hogan 2012-11-14 11:33:16 PST
Hi Dan,

Can you review this please?

Thanks..
Comment 9 Dave Hyatt 2012-11-26 12:09:53 PST
Comment on attachment 173496 [details]
Patch

r=me
Comment 10 WebKit Review Bot 2012-11-27 11:15:52 PST
Comment on attachment 173496 [details]
Patch

Clearing flags on attachment: 173496

Committed r135884: <http://trac.webkit.org/changeset/135884>
Comment 11 WebKit Review Bot 2012-11-27 11:15:56 PST
All reviewed patches have been landed.  Closing bug.