mirror of
https://github.com/servo/servo.git
synced 2025-08-11 08:25:32 +01:00
Implement :visited handling for lazy pseudo-elements in stylo.
Part 2 of the fix for Gecko bug 1364242: https://bugzilla.mozilla.org/show_bug.cgi?id=1364242
This commit is contained in:
parent
351c7f7859
commit
52d1b59515
5 changed files with 134 additions and 47 deletions
|
@ -184,7 +184,7 @@ impl Default for CascadeInputs {
|
|||
|
||||
impl CascadeInputs {
|
||||
/// Construct inputs from previous cascade results, if any.
|
||||
fn new_from_style(style: &Arc<ComputedValues>) -> Self {
|
||||
pub fn new_from_style(style: &Arc<ComputedValues>) -> Self {
|
||||
CascadeInputs {
|
||||
rules: style.rules.clone(),
|
||||
visited_rules: style.get_visited_style().and_then(|v| v.rules.clone()),
|
||||
|
@ -204,6 +204,11 @@ impl CascadeInputs {
|
|||
self.rules.as_mut()
|
||||
}
|
||||
|
||||
/// Gets a reference to the rule node, if any.
|
||||
pub fn get_rules(&self) -> Option<&StrongRuleNode> {
|
||||
self.rules.as_ref()
|
||||
}
|
||||
|
||||
/// Gets a reference to the rule node. Panic if the element does not have
|
||||
/// rule node.
|
||||
pub fn rules(&self) -> &StrongRuleNode {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue