added support for :read-only and :read-write pseudo-classes

partial fix for https://github.com/servo/servo/issues/10732
This commit is contained in:
Yoav Alon 2016-04-25 18:55:31 +03:00
parent f773dc182b
commit 9bf909ac2f
9 changed files with 82 additions and 31 deletions

View file

@ -44,6 +44,8 @@ pub enum NonTSPseudoClass {
Checked,
Indeterminate,
ServoNonZeroBorder,
ReadWrite,
ReadOnly
}
impl NonTSPseudoClass {
@ -58,6 +60,7 @@ impl NonTSPseudoClass {
Disabled => IN_DISABLED_STATE,
Checked => IN_CHECKED_STATE,
Indeterminate => IN_INDETERMINATE_STATE,
ReadOnly | ReadWrite => IN_READ_WRITE_STATE,
AnyLink |
Link |
@ -88,6 +91,8 @@ impl SelectorImpl for ServoSelectorImpl {
"disabled" => Disabled,
"checked" => Checked,
"indeterminate" => Indeterminate,
"read-write" => ReadWrite,
"read-only" => ReadOnly,
"-servo-nonzero-border" => {
if !context.in_user_agent_stylesheet {
return Err(());