mirror of
https://github.com/servo/servo.git
synced 2025-07-30 18:50:36 +01:00
style: layout: Allow a lazy pseudo-element implementation in Servo.
This commit is contained in:
parent
18c1fee3c7
commit
028f9b6cd2
6 changed files with 172 additions and 57 deletions
|
@ -104,19 +104,11 @@ pub enum PseudoElement {
|
|||
impl PseudoElement {
|
||||
#[inline]
|
||||
pub fn cascade_type(&self) -> PseudoElementCascadeType {
|
||||
// TODO: Make PseudoElementCascadeType::Lazy work for Servo.
|
||||
//
|
||||
// This can't be done right now since it would require
|
||||
// ServoThreadSafeLayoutElement to implement ::selectors::Element,
|
||||
// and it might not be thread-safe.
|
||||
//
|
||||
// After that, we'd probably want ::selection and
|
||||
// ::-servo-details-summary to be lazy.
|
||||
match *self {
|
||||
PseudoElement::Before |
|
||||
PseudoElement::After |
|
||||
PseudoElement::Selection |
|
||||
PseudoElement::DetailsSummary => PseudoElementCascadeType::Eager,
|
||||
PseudoElement::Selection => PseudoElementCascadeType::Eager,
|
||||
PseudoElement::DetailsSummary => PseudoElementCascadeType::Lazy,
|
||||
PseudoElement::DetailsContent => PseudoElementCascadeType::Precomputed,
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue