Bug 8273 - REGRESSION: Read only input text field renders at the wrong height when value attribute is not present
Summary: REGRESSION: Read only input text field renders at the wrong height when value...
Alias: None
Product: WebKit
Classification: Unclassified
Component: Forms (show other bugs)
Version: 420+
Hardware: Mac OS X 10.4
: P1 Normal
Assignee: Adele Peterson
URL: http://www.alamo.com/
Keywords: InRadar, Regression
: 8373 (view as bug list)
Depends on:
Reported: 2006-04-08 18:47 PDT by Chris Petersen
Modified: 2006-04-20 22:58 PDT (History)
3 users (show)

See Also:

Input readonly test case (244 bytes, text/html)
2006-04-08 18:48 PDT, Chris Petersen
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Petersen 2006-04-08 18:47:18 PDT
If a input text field includes a readonly attribute but no value attribute, the height of the input field is rendered at a few pixels. I originally saw this issue at http://www.alamo.com/. 
I created a reduced test case of this page

1. With TOT WebKit, open the test case "input_readonly_test.html"
2.The first input field renders at the correct height (uses both readonly and value attributes) but second input fails to render at the correct height (readonly attribute)

Input field that includes readonly attribute but no value attribute should still rendered at the correct default height. However, input field's height is only a few pixels.

Yes, only occurs with native text fields on TOT WebKit.
Comment 1 Chris Petersen 2006-04-08 18:48:10 PDT
Created attachment 7590 [details]
Input readonly test case
Comment 2 Chris Petersen 2006-04-08 18:48:46 PDT
This issue was filed as <rdar://problem/4507668>
Comment 3 Adele Peterson 2006-04-10 15:16:39 PDT
bidi.cpp:1722 is where we set the special line height for contenteditable RenderBlocks.
Comment 4 Adele Peterson 2006-04-13 00:56:22 PDT
Adding code in bidi.cpp to check for a shadowParentNode will do the trick, but I'm not sure that's the right approach.

It seems like the RenderTextField should have some default height.  Maybe RenderTextField should have a layoutInlineChildren method?
Comment 5 Dave Hyatt 2006-04-13 11:18:47 PDT
I'm confused why readonly breaks at all.  How did you implement readonly?   Did you make it turn off editability?
Comment 6 Dave Hyatt 2006-04-13 11:19:51 PDT
I would not make readonly and disabled shut off editability.
Comment 7 mitz 2006-04-14 01:05:49 PDT
*** Bug 8373 has been marked as a duplicate of this bug. ***
Comment 8 Adele Peterson 2006-04-18 00:06:04 PDT
Because of the way disabled & readonly fields work on the mac, it makes sense to turn off editability.  You can't place a caret in either of these cases.  For readonly fields, you can make a selection, but we don't need the field to be editable to do that.

Maciej suggested setting a height on the inner div.  I've experimented with that, but I haven't gotten anything working well yet.
Comment 9 Adele Peterson 2006-04-20 00:19:24 PDT
Just setting a height on the div in createDivStyle messes up the baseline.
Comment 10 Mike Eggleston 2006-04-20 16:23:01 PDT
I have built it, and I confirm that the issue seems to be solved.

Thanks guys!!
Comment 11 Chris Petersen 2006-04-20 22:58:01 PDT
Verified with latest TOT Webkit build (r13990).