mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
Further changes required by Servo
This commit is contained in:
parent
5ded58a2b1
commit
b8c0a898ad
2 changed files with 11 additions and 3 deletions
|
@ -508,7 +508,8 @@ trait PrivateMatchMethods: TElement {
|
||||||
|
|
||||||
// If we have modified animation or transitions, we recascade style for this node.
|
// If we have modified animation or transitions, we recascade style for this node.
|
||||||
if style_changed {
|
if style_changed {
|
||||||
let mut rule_node = new_resolved_styles.primary_style().rules().clone();
|
let primary_style = new_resolved_styles.primary_style();
|
||||||
|
let mut rule_node = primary_style.rules().clone();
|
||||||
let declarations = context.shared.animations.get_all_declarations(
|
let declarations = context.shared.animations.get_all_declarations(
|
||||||
&AnimationSetKey::new_for_non_pseudo(self.as_node().opaque()),
|
&AnimationSetKey::new_for_non_pseudo(self.as_node().opaque()),
|
||||||
context.shared.current_time_for_animations,
|
context.shared.current_time_for_animations,
|
||||||
|
@ -529,10 +530,11 @@ trait PrivateMatchMethods: TElement {
|
||||||
&mut rule_node,
|
&mut rule_node,
|
||||||
);
|
);
|
||||||
|
|
||||||
if rule_node != *new_resolved_styles.primary_style().rules() {
|
if rule_node != *primary_style.rules() {
|
||||||
let inputs = CascadeInputs {
|
let inputs = CascadeInputs {
|
||||||
rules: Some(rule_node),
|
rules: Some(rule_node),
|
||||||
visited_rules: new_resolved_styles.primary_style().visited_rules().cloned(),
|
visited_rules: primary_style.visited_rules().cloned(),
|
||||||
|
flags: primary_style.flags.for_cascade_inputs(),
|
||||||
};
|
};
|
||||||
|
|
||||||
new_resolved_styles.primary.style = StyleResolverForElement::new(
|
new_resolved_styles.primary.style = StyleResolverForElement::new(
|
||||||
|
@ -621,6 +623,7 @@ trait PrivateMatchMethods: TElement {
|
||||||
let inputs = CascadeInputs {
|
let inputs = CascadeInputs {
|
||||||
rules: Some(rule_node),
|
rules: Some(rule_node),
|
||||||
visited_rules: style.visited_rules().cloned(),
|
visited_rules: style.visited_rules().cloned(),
|
||||||
|
flags: style.flags.for_cascade_inputs(),
|
||||||
};
|
};
|
||||||
|
|
||||||
let new_style = StyleResolverForElement::new(
|
let new_style = StyleResolverForElement::new(
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
//! Servo's selector parser.
|
//! Servo's selector parser.
|
||||||
|
|
||||||
use crate::attr::{AttrIdentifier, AttrValue};
|
use crate::attr::{AttrIdentifier, AttrValue};
|
||||||
|
use crate::computed_value_flags::ComputedValueFlags;
|
||||||
use crate::dom::{OpaqueNode, TElement, TNode};
|
use crate::dom::{OpaqueNode, TElement, TNode};
|
||||||
use crate::invalidation::element::document_state::InvalidationMatchingData;
|
use crate::invalidation::element::document_state::InvalidationMatchingData;
|
||||||
use crate::invalidation::element::element_wrapper::ElementSnapshot;
|
use crate::invalidation::element::element_wrapper::ElementSnapshot;
|
||||||
|
@ -412,6 +413,10 @@ pub struct SelectorImpl;
|
||||||
pub struct ExtraMatchingData {
|
pub struct ExtraMatchingData {
|
||||||
/// The invalidation data to invalidate doc-state pseudo-classes correctly.
|
/// The invalidation data to invalidate doc-state pseudo-classes correctly.
|
||||||
pub invalidation_data: InvalidationMatchingData,
|
pub invalidation_data: InvalidationMatchingData,
|
||||||
|
|
||||||
|
/// The invalidation bits from matching container queries. These are here
|
||||||
|
/// just for convenience mostly.
|
||||||
|
pub cascade_input_flags: ComputedValueFlags,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl ::selectors::SelectorImpl for SelectorImpl {
|
impl ::selectors::SelectorImpl for SelectorImpl {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue