Bug 7858

Summary: REGRESSION: New text field doesn't recognize the read only attribute
Product: WebKit Reporter: Chris Petersen <c.petersen87>
Component: FormsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Major Keywords: InRadar, Regression
Priority: P1    
Version: 420+   
Hardware: Mac   
OS: OS X 10.4   
Attachments:
Description Flags
Sample test case that uses readonly attribute
none
Patch to fix test case
adele: review-
Patch to only allow plain text; also fixed assertion adele: review+

Description Chris Petersen 2006-03-19 07:51:04 PST
New text input fields ignore the read only attribute. When this attribute is specified, the input field can't be edited. However with a new text field, I can edit it even when this attribute is enabled.
Comment 1 Chris Petersen 2006-03-19 07:52:08 PST
Created attachment 7173 [details]
Sample test case that uses readonly attribute
Comment 2 Chris Petersen 2006-03-19 08:36:18 PST
This issue has been filed in Radar as <rdar://problem/4483359>
Comment 3 Adele Peterson 2006-03-29 17:51:54 PST
Bumping to P1 since this causes a text field regression
Comment 4 Tim Omernick 2006-03-31 01:31:40 PST
Created attachment 7414 [details]
Patch to fix test case
Comment 5 Maciej Stachowiak 2006-03-31 03:04:37 PST
Comment on attachment 7414 [details]
Patch to fix test case

Does this handle dynamic updates to the readonly attribute correctly? Make sure to test that. I'm not sure if it will. The change needs to happen after style attached to be an effective test, so maybe a button on the side to toggle readonly-ness.

When you do land this, make sure to land the test case as well.
Comment 6 Tim Omernick 2006-03-31 10:04:42 PST
(In reply to comment #5)
> (From update of attachment 7414 [details] [edit])
> Does this handle dynamic updates to the readonly attribute correctly? Make sure
> to test that. I'm not sure if it will.

Yes, dynamic updates to the readonly property work just fine.  This is because we reflect the element's changes in updateFromElement().  This is how the old text field worked.
Comment 7 Adele Peterson 2006-03-31 11:01:16 PST
Comment on attachment 7414 [details]
Patch to fix test case

Use READ_WRITE_PLAINTEXT_ONLY instead of READ_WRITE
Comment 8 Tim Omernick 2006-03-31 12:52:08 PST
Created attachment 7421 [details]
Patch to only allow plain text; also fixed assertion
Comment 9 Adele Peterson 2006-03-31 12:53:45 PST
Comment on attachment 7421 [details]
Patch to only allow plain text; also fixed assertion

r=me. thanks tim!
Comment 10 Tim Omernick 2006-03-31 12:55:41 PST
Fix landed to TOT, revision 13617.