Bug 13208 - There should be a way to break long words in tables
Summary: There should be a way to break long words in tables
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 523.x (Safari 3)
Hardware: Macintosh OS X 10.4
: P1 Normal
Assignee: Dave Hyatt
URL:
Keywords: HasReduction, InRadar
Depends on:
Blocks:
 
Reported: 2007-03-27 14:44 PDT by Beth Dakin
Modified: 2007-04-19 22:22 PDT (History)
2 users (show)

See Also:


Attachments
Resize window to see the bug (505 bytes, text/html)
2007-03-27 14:45 PDT, Beth Dakin
no flags Details
Another test (167 bytes, text/html)
2007-03-29 15:36 PDT, Dave Hyatt
no flags Details
Same as previous test but with word-break: break-all added (190 bytes, text/html)
2007-03-29 15:44 PDT, Dave Hyatt
no flags Details
First cut at break-all support. (13.17 KB, patch)
2007-04-19 01:54 PDT, Dave Hyatt
no flags Details | Formatted Diff | Diff
white-space:pre doesn't work with word-break:break-all (unlike word-wrap: break-word) (13.11 KB, patch)
2007-04-19 02:17 PDT, Dave Hyatt
no flags Details | Formatted Diff | Diff
Patch to implement word-break partially (we don't support keep-all). (115.19 KB, patch)
2007-04-19 17:29 PDT, Dave Hyatt
bdakin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Beth Dakin 2007-03-27 14:44:43 PDT
* SUMMARY
If you have a line of text with the word-break property set to break-all, long words do not wrap if the text is located within a table.

* STEPS TO REPRODUCE
1. See attached text file for example.

* RESULTS
The first line of text in the sample is in a span and forcibly wraps (correctly) when you resize the window. The second line of text is in a table with a width of 100% and does not wrap.
Comment 1 Beth Dakin 2007-03-27 14:45:46 PDT
Created attachment 13833 [details]
Resize window to see the bug
Comment 2 Beth Dakin 2007-03-27 14:46:32 PDT
<rdar://problem/4881048>
Comment 3 mitz 2007-03-28 01:29:11 PDT
Bug 13213 sounds like it might be in the same area (assuming the area turns out to be "min intrinsic width calculation for table cells").
Comment 4 Dave Hyatt 2007-03-29 15:27:30 PDT
This behavior was deliberate.  I tested in WinIE when I implemented word-wrap: break-word, and they don't compute minimum width for table cells taking word-wrap:break-word into account.  If they did, there would be all sorts of table constructs that would result in cells with one character per line.
Comment 5 Dave Hyatt 2007-03-29 15:33:32 PDT
This test case works in IE7 though.  My suspicion is that there may be two kinds of min width unfortunately.  Once the containing block puts you under pressure, you shrink further.
Comment 6 Dave Hyatt 2007-03-29 15:36:46 PDT
Created attachment 13881 [details]
Another test
Comment 7 Dave Hyatt 2007-03-29 15:39:46 PDT
The second test shows the problem.  IE7 ignores word-wrap:break-word on it.
Comment 8 Dave Hyatt 2007-03-29 15:43:24 PDT
I just noticed the first case also uses a property called "word-break."  We do not support that property, and it could be why the first case is working.
Comment 9 Dave Hyatt 2007-03-29 15:44:34 PDT
Created attachment 13882 [details]
Same as previous test but with word-break: break-all added
Comment 10 Dave Hyatt 2007-04-05 11:41:57 PDT
word-break does not appear to be relevant here.
Comment 11 Dave Hyatt 2007-04-19 00:22:15 PDT
I am wrong about this.  word-break: break-all is key.  word-wrap is completely irrelevant.  Testing with IE7, word-break:break-all causes the cell to actually wrap under pressure.
Comment 12 Dave Hyatt 2007-04-19 00:39:38 PDT
Raising to p1 to match internal bug status.
Comment 13 mitz 2007-04-19 01:26:32 PDT
(In reply to comment #11)
> Testing with IE7, word-break:break-all causes the cell to actually
> wrap under pressure.

Is this an IE7 only thing? With IE6 I don't see any difference between attachment 13881 [details] and attachment 13882 [details].
Comment 14 Dave Hyatt 2007-04-19 01:54:17 PDT
Created attachment 14085 [details]
First cut at break-all support.

Not for review yet.  Just getting a patch up to track progress.
Comment 15 Dave Hyatt 2007-04-19 01:56:50 PDT
There's a typo in the tests, which is what caused all the confusion in the first place.  Marking them as obsolete to avoid confusion.
Comment 16 Dave Hyatt 2007-04-19 02:17:06 PDT
Created attachment 14086 [details]
white-space:pre doesn't work with word-break:break-all (unlike word-wrap: break-word)

Don't look at me.  I didn't design this crazy shit (shakes fist at Microsoft).
Comment 17 Dave Hyatt 2007-04-19 17:29:24 PDT
Created attachment 14100 [details]
Patch to implement word-break partially (we don't support keep-all).
Comment 18 Beth Dakin 2007-04-19 17:39:35 PDT
Comment on attachment 14100 [details]
Patch to implement word-break partially (we don't support keep-all).

r=me!
Comment 19 Dave Hyatt 2007-04-19 22:22:01 PDT
r20967.