Bug 13156

Summary: REGRESSION (r19621): Pasting breakable content where wrapped line is too long to fit in a textarea fails to draw a horizontal scrollbar
Product: WebKit Reporter: David Kilzer (:ddkilzer) <ddkilzer>
Component: FormsAssignee: mitz
Status: RESOLVED FIXED    
Severity: Normal CC: koivisto, mitz, mrowe
Priority: P1 Keywords: HasReduction, InRadar, Regression
Version: 523.x (Safari 3)   
Hardware: Mac   
OS: OS X 10.4   
URL: data:text/html,%3Ctextarea%20rows=%2210%22%20cols=%2280%22%3E
Attachments:
Description Flags
Test case
none
Patch, including layout test and change log darin: review+

David Kilzer (:ddkilzer)
Reported 2007-03-22 05:02:10 PDT
Summary: Safaari fails to draw a horizontal scrollbar when pasting a very long string with a breakable character (like "?" in a URL) where the wrapped text after the break is too long to fit width-wise in a textarea. Steps to reproduce: 1. Open Safari/WebKit. 2. Open URL for this bug: data:text/html,%3Ctextarea%20rows=%2210%22%20cols=%2280%22%3E 3. Paste this URL into the textarea: http://images.google.com/imgres?imgurl=http://images.apple.com/downloads/macosx/video/images/windowsmediaplayerformacosx_200311071940.jpg&imgrefurl=http://www.apple.com/downloads/macosx/video/windowsmediaplayerformacosx.html&h=337&w=382&sz=16&hl=en&start=12&tbnid=xpRK4qQ9xPDvuM:&tbnh=109&tbnw=123&prev=/images%3Fq%3Djpg%2Bsite:apple.com%26gbv%3D2%26svnum%3D10%26hl%3Den%26sa%3DG Expected results: A horizontal scrollbar should be drawn to accommodate the wrapped text. Actual results: A horizontal scrollbar is NOT drawn. Regression: This is a regression from shipping Safari 2.0.4 (419.3) on Mac OS X 10.4.9 (8P135). The behavior is different in two ways: - Safari 2.0.4 wraps at slashes '/' instead of the question mark '?'. - Lines that are two long are hard-wrapped (much like a text file would be with lines that are too long) instead of drawing a horizontal scrollbar. Notes: Tested with a local debug build of WebKit r20387 with the above software. Instead of a horiztonal scrollbar, an alternate solution is to hard-wrap the text as Safari 2.0.4 did.
Attachments
Test case (463 bytes, text/html)
2007-03-22 09:16 PDT, mitz
no flags
Patch, including layout test and change log (88.34 KB, patch)
2007-03-22 10:58 PDT, mitz
darin: review+
mitz
Comment 1 2007-03-22 09:16:03 PDT
Created attachment 13765 [details] Test case This test case shows that this bug is a regression in line breaking. In Safari 2.0.4, all lines break before the edge of the block.
mitz
Comment 2 2007-03-22 09:26:53 PDT
mitz
Comment 3 2007-03-22 10:58:12 PDT
Created attachment 13766 [details] Patch, including layout test and change log No layout test regressions.
Mark Rowe (bdash)
Comment 4 2007-03-23 00:25:20 PDT
Antti Koivisto
Comment 5 2007-03-23 03:54:09 PDT
This patch gives you Safari 2 behavior but that behavior does not match Firefox. Isn't this a potential source of compatibility problems?
Darin Adler
Comment 6 2007-03-24 20:09:00 PDT
Comment on attachment 13766 [details] Patch, including layout test and change log r=me
David Kilzer (:ddkilzer)
Comment 7 2007-03-24 23:35:55 PDT
(In reply to comment #5) > This patch gives you Safari 2 behavior but that behavior does not match > Firefox. Isn't this a potential source of compatibility problems? I believe this behavior is more consistent with other Mac OS X applications, though.
David Kilzer (:ddkilzer)
Comment 8 2007-03-24 23:44:07 PDT
Committed revision 20479.
Note You need to log in before you can comment on or make changes to this bug.