mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Auto merge of #26276 - emilio:gecko-sync, r=emilio
style: Sync changes from mozilla-central. See individual commits for details, though this is a very small sync.
This commit is contained in:
commit
5504d9259d
3 changed files with 10 additions and 3 deletions
|
@ -12,10 +12,12 @@ use crate::bezier::Bezier;
|
|||
use crate::context::SharedStyleContext;
|
||||
use crate::dom::{OpaqueNode, TElement};
|
||||
use crate::font_metrics::FontMetricsProvider;
|
||||
use crate::properties::animated_properties::{AnimatedProperty, TransitionPropertyIteration};
|
||||
use crate::properties::animated_properties::AnimatedProperty;
|
||||
use crate::properties::longhands::animation_direction::computed_value::single_value::T as AnimationDirection;
|
||||
use crate::properties::longhands::animation_play_state::computed_value::single_value::T as AnimationPlayState;
|
||||
use crate::properties::{self, CascadeMode, ComputedValues, LonghandId, LonghandIdSet};
|
||||
#[cfg(feature = "servo")]
|
||||
use crate::properties::LonghandIdSet;
|
||||
use crate::properties::{self, CascadeMode, ComputedValues, LonghandId};
|
||||
use crate::stylesheets::keyframes_rule::{KeyframesAnimation, KeyframesStep, KeyframesStepValue};
|
||||
use crate::stylesheets::Origin;
|
||||
use crate::timer::Timer;
|
||||
|
@ -432,6 +434,8 @@ pub fn start_transitions_if_applicable(
|
|||
expired_transitions: &[PropertyAnimation],
|
||||
running_animations: &[Animation],
|
||||
) -> LonghandIdSet {
|
||||
use crate::properties::animated_properties::TransitionPropertyIteration;
|
||||
|
||||
// If the style of this element is display:none, then we don't start any transitions
|
||||
// and we cancel any currently running transitions by returning an empty LonghandIdSet.
|
||||
if new_style.get_box().clone_display().is_none() {
|
||||
|
|
|
@ -202,6 +202,9 @@ impl RuleTree {
|
|||
/// where it likely did not result from a rigorous performance analysis.)
|
||||
const RULE_TREE_GC_INTERVAL: usize = 300;
|
||||
|
||||
/// Used for some size assertions.
|
||||
pub const RULE_NODE_SIZE: usize = std::mem::size_of::<RuleNode>();
|
||||
|
||||
/// A node in the rule tree.
|
||||
struct RuleNode {
|
||||
/// The root node. Only the root has no root pointer, for obvious reasons.
|
||||
|
|
|
@ -19,7 +19,7 @@ mod map;
|
|||
mod source;
|
||||
mod unsafe_box;
|
||||
|
||||
pub use self::core::{RuleTree, StrongRuleNode};
|
||||
pub use self::core::{RuleTree, StrongRuleNode, RULE_NODE_SIZE};
|
||||
pub use self::level::{CascadeLevel, ShadowCascadeOrder};
|
||||
pub use self::source::StyleSource;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue