Bug 101443

Summary: REGRESSION (r125578): word-wrapping in absolute position with nbsp, word-spacing and custom font
Product: WebKit Reporter: openmail+webkit
Component: Layout and RenderingAssignee: Robert Hogan <robert>
Status: RESOLVED FIXED    
Severity: Normal CC: ap, eric, glenn, mitz, openmail+webkit, robert, webkit.review.bot
Priority: P1 Keywords: Regression
Version: 528+ (Nightly build)   
Hardware: Mac (Intel)   
OS: OS X 10.8   
URL: http://jsfiddle.net/5Htwx/1/
See Also: https://bugs.webkit.org/show_bug.cgi?id=193279
Attachments:
Description Flags
Example of the issue.
none
Patch none

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.