Bug 7797 - Can't set background color on new text fields
Summary: Can't set background color on new text fields
Alias: None
Product: WebKit
Classification: Unclassified
Component: Forms (show other bugs)
Version: 420+
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: Adele Peterson
Depends on:
Blocks: 6986
  Show dependency treegraph
Reported: 2006-03-16 00:21 PST by Adele Peterson
Modified: 2006-03-17 05:04 PST (History)
0 users

See Also:

patch (2.50 KB, patch)
2006-03-16 00:24 PST, Adele Peterson
hyatt: review-
Details | Formatted Diff | Diff
layout test (235 bytes, text/html)
2006-03-16 00:25 PST, Adele Peterson
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Adele Peterson 2006-03-16 00:21:12 PST
Can't set background color on new text fields
Comment 1 Adele Peterson 2006-03-16 00:24:04 PST
Created attachment 7107 [details]

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.
Comment 2 Adele Peterson 2006-03-16 00:25:58 PST
Created attachment 7108 [details]
layout test
Comment 3 Dave Hyatt 2006-03-16 00:38:54 PST
Comment on attachment 7107 [details]

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.
Comment 4 Adele Peterson 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.
Comment 5 mitz 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).