mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Pass through visited style for after change
When a transition update is needed during restyling, `get_after_change_style` is called to re-cascade without transition rules, and this style is then used for primary styling instead of the style just computed. `get_after_change_style` used to ignore visited styles, so this meant that if a transition update was needed, visited styles were effectively dropped. To fix the crash here, we pass through the existing visited styles when re-cascading as part of `get_after_change_style`. MozReview-Commit-ID: 4HBQAdeJ38B
This commit is contained in:
parent
2278a3f981
commit
3463a9c210
4 changed files with 28 additions and 3 deletions
|
@ -297,6 +297,11 @@ impl CascadeInputs {
|
|||
self.visited_rules.take()
|
||||
}
|
||||
|
||||
/// Whether there are any visited values.
|
||||
pub fn has_visited_values(&self) -> bool {
|
||||
self.visited_values.is_some()
|
||||
}
|
||||
|
||||
/// Gets a reference to the visited computed values. Panic if the element
|
||||
/// does not have visited computed values.
|
||||
pub fn visited_values(&self) -> &Arc<ComputedValues> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue