mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
style: Add a TLS-based style struct caching mechanism.
This commit is contained in:
parent
298b1363ff
commit
c34c92e904
18 changed files with 278 additions and 13 deletions
|
@ -12,9 +12,11 @@ use media_queries::Device;
|
|||
#[cfg(feature = "gecko")]
|
||||
use properties;
|
||||
use properties::{ComputedValues, StyleBuilder};
|
||||
use rule_cache::RuleCacheConditions;
|
||||
#[cfg(feature = "servo")]
|
||||
use servo_url::ServoUrl;
|
||||
use std::{f32, fmt};
|
||||
use std::cell::RefCell;
|
||||
#[cfg(feature = "servo")]
|
||||
use std::sync::Arc;
|
||||
use style_traits::ToCss;
|
||||
|
@ -116,6 +118,11 @@ pub struct Context<'a> {
|
|||
/// This is used to allow certain properties to generate out-of-range
|
||||
/// values, which SMIL allows.
|
||||
pub for_smil_animation: bool,
|
||||
|
||||
/// The conditions to cache a rule node on the rule cache.
|
||||
///
|
||||
/// FIXME(emilio): Drop the refcell.
|
||||
pub rule_cache_conditions: RefCell<&'a mut RuleCacheConditions>,
|
||||
}
|
||||
|
||||
impl<'a> Context<'a> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue