mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
layout: Add initial support for the ::marker
pseudo-element (#36317)
This change adds support for the `::marker` pseudo-element and ensure that markers are cached into the box tree. This is only initial support, there are a few things missing such as animations, transitions, and support the `content` CSS property. Testing: There are WPT tests for this change. Signed-off-by: Martin Robinson <mrobinson@igalia.com> Signed-off-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
parent
a5c547259f
commit
2b63e60e8f
27 changed files with 282 additions and 276 deletions
|
@ -363,22 +363,6 @@ pub trait ThreadSafeLayoutElement<'dom>:
|
|||
.clone()
|
||||
}
|
||||
|
||||
/// Returns the already resolved style of the node.
|
||||
///
|
||||
/// This differs from `style(ctx)` in that if the pseudo-element has not yet
|
||||
/// been computed it would panic.
|
||||
///
|
||||
/// This should be used just for querying layout, or when we know the
|
||||
/// element style is precomputed, not from general layout itself.
|
||||
#[inline]
|
||||
fn resolved_style(&self) -> Arc<ComputedValues> {
|
||||
let data = self.style_data();
|
||||
match self.pseudo_element() {
|
||||
None => data.styles.primary().clone(),
|
||||
Some(pseudo_element) => data.styles.pseudos.get(&pseudo_element).unwrap().clone(),
|
||||
}
|
||||
}
|
||||
|
||||
fn is_shadow_host(&self) -> bool;
|
||||
|
||||
/// Returns whether this node is a body element of an html element root
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue