mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Implement ::selection pseudo-element
This commit is contained in:
parent
4aa1da3211
commit
92f39ea5cf
10 changed files with 67 additions and 21 deletions
|
@ -26,6 +26,7 @@ pub trait SelectorImplExt : SelectorImpl + Sized {
|
|||
pub enum PseudoElement {
|
||||
Before,
|
||||
After,
|
||||
Selection,
|
||||
DetailsSummary,
|
||||
DetailsContent,
|
||||
}
|
||||
|
@ -105,6 +106,7 @@ impl SelectorImpl for ServoSelectorImpl {
|
|||
let pseudo_element = match_ignore_ascii_case! { name,
|
||||
"before" => Before,
|
||||
"after" => After,
|
||||
"selection" => Selection,
|
||||
"-servo-details-summary" => if context.in_user_agent_stylesheet {
|
||||
DetailsSummary
|
||||
} else {
|
||||
|
@ -136,6 +138,7 @@ impl SelectorImplExt for ServoSelectorImpl {
|
|||
fun(PseudoElement::After);
|
||||
fun(PseudoElement::DetailsContent);
|
||||
fun(PseudoElement::DetailsSummary);
|
||||
fun(PseudoElement::Selection);
|
||||
}
|
||||
|
||||
#[inline]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue