mirror of
https://github.com/servo/servo.git
synced 2025-08-12 17:05:33 +01:00
Do a second pass on the sharing cache to reuse style by rule node identity.
MozReview-Commit-ID: H67j3Sbt3gr
This commit is contained in:
parent
7a7070e075
commit
1c9b39a8e8
6 changed files with 122 additions and 8 deletions
|
@ -1997,6 +1997,13 @@ pub struct ComputedValues {
|
|||
inner: ComputedValuesInner,
|
||||
}
|
||||
|
||||
impl ComputedValues {
|
||||
/// Returns the visited rules, if applicable.
|
||||
pub fn visited_rules(&self) -> Option<<&StrongRuleNode> {
|
||||
self.visited_style.as_ref().and_then(|s| s.rules.as_ref())
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "servo")]
|
||||
impl ComputedValues {
|
||||
/// Create a new refcounted `ComputedValues`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue