diff options
Diffstat (limited to 'components/shared/script_layout/lib.rs')
-rw-r--r-- | components/shared/script_layout/lib.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/components/shared/script_layout/lib.rs b/components/shared/script_layout/lib.rs index b400d531a9a..9c70394b0fd 100644 --- a/components/shared/script_layout/lib.rs +++ b/components/shared/script_layout/lib.rs @@ -460,6 +460,16 @@ pub enum FragmentType { AfterPseudoContent, } +impl From<Option<PseudoElement>> for FragmentType { + fn from(value: Option<PseudoElement>) -> Self { + match value { + Some(PseudoElement::After) => FragmentType::AfterPseudoContent, + Some(PseudoElement::Before) => FragmentType::BeforePseudoContent, + _ => FragmentType::FragmentBody, + } + } +} + /// The next ID that will be used for a special scroll root id. /// /// A special scroll root is a scroll root that is created for generated content. |