Issue 7720: Add target selector and update when scrolling to fragment

This commit is contained in:
Steve Melia 2016-06-11 06:25:13 +01:00
parent 7807895d58
commit 04f5369577
10 changed files with 105 additions and 59 deletions

View file

@ -66,6 +66,7 @@ pub enum NonTSPseudoClass {
ReadWrite,
ReadOnly,
PlaceholderShown,
Target,
}
impl NonTSPseudoClass {
@ -82,6 +83,7 @@ impl NonTSPseudoClass {
Indeterminate => IN_INDETERMINATE_STATE,
ReadOnly | ReadWrite => IN_READ_WRITE_STATE,
PlaceholderShown => IN_PLACEHOLDER_SHOWN_STATE,
Target => IN_TARGET_STATE,
AnyLink |
Link |
@ -117,6 +119,7 @@ impl SelectorImpl for ServoSelectorImpl {
"read-write" => ReadWrite,
"read-only" => ReadOnly,
"placeholder-shown" => PlaceholderShown,
"target" => Target,
"-servo-nonzero-border" => {
if !context.in_user_agent_stylesheet {
return Err(());