Bug 8407

Summary: REGRESSION (NativeTextField): Leading and trailing spaces trimmed from text field value attribute
Product: WebKit Reporter: mitz
Component: HTML EditingAssignee: Adele Peterson <adele>
Status: VERIFIED FIXED    
Severity: Normal CC: adele, darin, hyatt
Priority: P1 Keywords: Regression
Version: 420+   
Hardware: Mac   
OS: OS X 10.4   
URL: data:text/html,There%20should%20be%20spaces%20before%20"foo"%20and%20after%20"bar"%20<INPUT%20value="%20foo%20bar%20">
Attachments:
Description Flags
Possible fix for the text field case
none
patch to set white-space:pre darin: review+

Description mitz 2006-04-15 03:02:53 PDT
<input value=" foo bar "> doesn't show the leading and trailing spaces in the text field.
Comment 1 mitz 2006-04-15 03:55:29 PDT
The contenteditable version of this bug is
<div contenteditable> lorem ipsum </div>
where the outer spaces are initially invisible, but when you add a space at the beginning/end you get two spaces to show.
Comment 2 mitz 2006-04-15 04:12:34 PDT
Created attachment 7726 [details]
Possible fix for the text field case
Comment 3 Darin Adler 2006-04-15 19:18:04 PDT
I think the best way to fix this is to use the appropriate whitespace mode inside the text fields. Assuming there is an appropriate whitespace mode.
Comment 4 Adele Peterson 2006-04-16 15:37:25 PDT
mitz and i talked about using whitespace:pre for the inner div, instead of just whitespace:nowrap.  i will investigate.
Comment 5 Adele Peterson 2006-04-18 00:01:10 PDT
Created attachment 7794 [details]
patch to set white-space:pre
Comment 6 Adele Peterson 2006-04-18 00:01:44 PDT
Comment on attachment 7794 [details]
patch to set white-space:pre

I'll need to re-generate pixel results for this test on a PPC machine before checking in.
Comment 7 Darin Adler 2006-04-18 08:52:41 PDT
Comment on attachment 7794 [details]
patch to set white-space:pre

r=me