WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
19911
:read-only and :read-write pseudoclasses support
https://bugs.webkit.org/show_bug.cgi?id=19911
Summary
:read-only and :read-write pseudoclasses support
Michelangelo De Simone
Reported
2008-07-06 04:28:05 PDT
WebKit should be able to deal with :read-only and :read-write CSS pseudoclasses which apply to editable form controls (text/password inputs and textareas) when "readonly" attribute is specified. These pseudoclasses do not apply input types such radio, checkbox and so on.
Attachments
Support for :read-only and :read-write pseudoclasses
(16.49 KB, patch)
2008-07-06 06:02 PDT
,
Michelangelo De Simone
adele
: review-
Details
Formatted Diff
Diff
Support for :read-only and :read-write pseudoclasses (updated)
(16.08 KB, patch)
2008-07-07 14:09 PDT
,
Michelangelo De Simone
adele
: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Michelangelo De Simone
Comment 1
2008-07-06 04:30:06 PDT
A patch is going to be submitted.
Michelangelo De Simone
Comment 2
2008-07-06 06:02:40 PDT
Created
attachment 22107
[details]
Support for :read-only and :read-write pseudoclasses The attached patch includes Opera's test suite for :read-only and :read-write.
Adele Peterson
Comment 3
2008-07-07 10:02:34 PDT
Comment on
attachment 22107
[details]
Support for :read-only and :read-write pseudoclasses Looks pretty good- I have just a few comments: atomic strings in CSSSelector.cpp should be readOnly and readWrite you shouldn't need the check && !e->isInputTypeHidden() you've left out checks for search fields and isindex - instead of using the specific checks for the type, you can use isTextField().
Adele Peterson
Comment 4
2008-07-07 11:43:08 PDT
Also, we may want to add the -webkit prefix for these pseudoclasses.
Michelangelo De Simone
Comment 5
2008-07-07 14:09:27 PDT
Created
attachment 22140
[details]
Support for :read-only and :read-write pseudoclasses (updated) Patch updated according to Adele's comments.
Adele Peterson
Comment 6
2008-07-07 14:34:54 PDT
Committed revision 35042.
Dave Hyatt
Comment 7
2008-07-07 14:40:27 PDT
This patch does not deal with style sharing: dhyatt: canShareStyleWithElement [4:38pm] dhyatt: if (isControl && (s->isEnabled() != m_element->isEnabled()) || [4:38pm] dhyatt: (s->isIndeterminate() != m_element->isIndeterminate()) || [4:38pm] dhyatt: (s->isChecked() != m_element->isChecked())) [4:38pm] dhyatt: return false; [4:38pm] dhyatt: has this check [4:38pm] dhyatt: for enabled/indeterminate/checked [4:38pm] dhyatt: you need to add readonlycontrol or whatever to this [4:38pm] dhyatt: make a test with two adjacent textareas [4:38pm] dhyatt: sibling textareas [4:38pm] dhyatt: and make the first one read-only and the second one not be read-only [4:38pm] dhyatt: and then write a pseudo rule [4:39pm] dhyatt: the second one will incorrectly match [4:39pm] dhyatt: because it will share style with the first
Adele Peterson
Comment 8
2008-07-07 14:41:06 PDT
re-opening. We need to address style-sharing with a new patch.
Michelangelo De Simone
Comment 9
2008-07-07 15:41:16 PDT
Style sharing already checks for readonlyAttr. No issue.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug