Bug 7797

Summary: Can't set background color on new text fields
Product: WebKit Reporter: Adele Peterson <adele>
Component: FormsAssignee: Adele Peterson <adele>
Status: RESOLVED FIXED    
Severity: Normal    
Priority: P2    
Version: 420+   
Hardware: Mac   
OS: OS X 10.4   
Bug Depends on:    
Bug Blocks: 6986    
Attachments:
Description Flags
patch
hyatt: review-
layout test none

Adele Peterson
Reported 2006-03-16 00:21:12 PST
Can't set background color on new text fields
Attachments
patch (2.50 KB, patch)
2006-03-16 00:24 PST, Adele Peterson
hyatt: review-
layout test (235 bytes, text/html)
2006-03-16 00:25 PST, Adele Peterson
no flags
Adele Peterson
Comment 1 2006-03-16 00:24:04 PST
Created attachment 7107 [details] patch Not sure if this is the right approach in the long run, since there could be other non-inhertied CSS properties that we should pass on to the div style.
Adele Peterson
Comment 2 2006-03-16 00:25:58 PST
Created attachment 7108 [details] layout test
Dave Hyatt
Comment 3 2006-03-16 00:38:54 PST
Comment on attachment 7107 [details] patch The <input> has to be the one to draw the background, since backgrounds draw in the border box of an element. The reason this isn't drawing is that the native theme is stopping it.
Adele Peterson
Comment 4 2006-03-17 01:08:56 PST
I had hyatt review a new patch. It turns out that the NSTextFieldCell was drawing a background - even with setDrawsBackground:NO. So we added a new function just to draw the text field border.
mitz
Comment 5 2006-03-17 05:04:55 PST
I think after the fix all new text fields have a transparent background by default instead of white (probably fixable in html4.css).
Note You need to log in before you can comment on or make changes to this bug.