mirror of
https://github.com/servo/servo.git
synced 2025-08-11 16:35:33 +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
|
@ -171,6 +171,11 @@ impl ComputedValues {
|
|||
self.rules.as_ref().unwrap()
|
||||
}
|
||||
|
||||
/// Whether there is a visited style.
|
||||
pub fn has_visited_style(&self) -> bool {
|
||||
self.visited_style.is_some()
|
||||
}
|
||||
|
||||
/// Gets a reference to the visited style, if any.
|
||||
pub fn get_visited_style(&self) -> Option<<&Arc<ComputedValues>> {
|
||||
self.visited_style.as_ref()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue