mirror of
https://github.com/servo/servo.git
synced 2025-08-05 05:30:08 +01:00
style: Slim down SharedStyleContext.
This slims down SharedStyleContext, in preparation for a few things. First, I would like to eventually move the stylist to the document in Servo, in order for it to hold the StyleSheetSet. Also, this gets rid of a fair amount of overhead while creating it in stylo. Fixes bug 1363245.
This commit is contained in:
parent
f579405510
commit
ebd9bf8181
6 changed files with 104 additions and 85 deletions
|
@ -8,7 +8,6 @@
|
|||
#![deny(missing_docs)]
|
||||
|
||||
use Atom;
|
||||
use animation::{self, Animation, PropertyAnimation};
|
||||
use atomic_refcell::AtomicRefMut;
|
||||
use bit_vec::BitVec;
|
||||
use cache::{LRUCache, LRUCacheMutIterator};
|
||||
|
@ -719,6 +718,8 @@ trait PrivateMatchMethods: TElement {
|
|||
old_values: &mut Option<Arc<ComputedValues>>,
|
||||
new_values: &mut Arc<ComputedValues>,
|
||||
_primary_style: &ComputedStyle) {
|
||||
use animation;
|
||||
|
||||
let possibly_expired_animations =
|
||||
&mut context.thread_local.current_element_info.as_mut().unwrap()
|
||||
.possibly_expired_animations;
|
||||
|
@ -804,11 +805,14 @@ trait PrivateMatchMethods: TElement {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "servo")]
|
||||
fn update_animations_for_cascade(&self,
|
||||
context: &SharedStyleContext,
|
||||
style: &mut Arc<ComputedValues>,
|
||||
possibly_expired_animations: &mut Vec<PropertyAnimation>,
|
||||
possibly_expired_animations: &mut Vec<::animation::PropertyAnimation>,
|
||||
font_metrics: &FontMetricsProvider) {
|
||||
use animation::{self, Animation};
|
||||
|
||||
// Finish any expired transitions.
|
||||
let this_opaque = self.as_node().opaque();
|
||||
animation::complete_expired_transitions(this_opaque, style, context);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue