Bug 7858 - REGRESSION: New text field doesn't recognize the read only attribute
Summary: REGRESSION: New text field doesn't recognize the read only attribute
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Forms (show other bugs)
Version: 420+
Hardware: Macintosh OS X 10.4
: P1 Major
Assignee: Nobody
URL:
Keywords: InRadar, Regression
Depends on:
Blocks:
 
Reported: 2006-03-19 07:51 PST by Chris Petersen
Modified: 2006-03-31 12:55 PST (History)
0 users

See Also:


Attachments
Sample test case that uses readonly attribute (261 bytes, text/html)
2006-03-19 07:52 PST, Chris Petersen
no flags Details
Patch to fix test case (1.62 KB, patch)
2006-03-31 01:31 PST, Tim Omernick
adele: review-
Details | Formatted Diff | Diff
Patch to only allow plain text; also fixed assertion (5.08 KB, patch)
2006-03-31 12:52 PST, Tim Omernick
adele: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.