RESOLVED FIXED 11570
REGRESSION (r16122): min/max widths incorrectly calculated for contentEditable text
https://bugs.webkit.org/show_bug.cgi?id=11570
Summary REGRESSION (r16122): min/max widths incorrectly calculated for contentEditabl...
Graham Dennis
Reported 2006-11-11 02:53:35 PST
In revision r16122, all spaces in editable text nodes were changed to be non-breaking spaces instead of space/non-breaking space pairs as necessary. However, RenderText calculates its min/max widths assuming that non-breaking spaces cannot be broken independent of -webkit-nbsp-mode. This causes a problem when a contentEditable div is absolutely positioned to the right, then as text is typed into the div, once the amount of text inserted is longer than one line, there will be a run of characters which RenderText thinks cannot be broken, and so the width of the editable div will increase. Patch forthcoming.
Attachments
patch (105.74 KB, patch)
2006-11-11 03:03 PST, Graham Dennis
hyatt: review-
patch 2 (59.71 KB, patch)
2006-11-11 03:47 PST, Graham Dennis
mitz: review+
followup patch (2.72 KB, patch)
2006-11-11 04:29 PST, Graham Dennis
hyatt: review+
Graham Dennis
Comment 1 2006-11-11 03:03:01 PST
Created attachment 11479 [details] patch Patch. I don't really like the huge number of editing delegate messages generated by the layout test for this bug, but I couldn't reproduce the bug by replacing the typeCharacterCommand()'s by a single document.execCommand('InsertText', ...). All other layout tests pass.
Graham Dennis
Comment 2 2006-11-11 03:47:21 PST
Created attachment 11480 [details] patch 2 Patch 2. Testcase no longer uses editing code, and hence has been moved to fast/text/whitespace/nbsp-mode-and-linewraps.html.
mitz
Comment 3 2006-11-11 04:00:39 PST
Comment on attachment 11480 [details] patch 2 r=me
Graham Dennis
Comment 4 2006-11-11 04:13:57 PST
Committed in r17724.
Dave Hyatt
Comment 5 2006-11-11 04:15:13 PST
Comment on attachment 11479 [details] patch RenderStyle is not an appropriate spot for an isSpace helper like this.
Graham Dennis
Comment 6 2006-11-11 04:29:23 PST
Created attachment 11482 [details] followup patch Follow patch to remove the helper function from RenderStyle
Dave Hyatt
Comment 7 2006-11-11 04:40:40 PST
Comment on attachment 11482 [details] followup patch r=me Thanks!
Note You need to log in before you can comment on or make changes to this bug.