mirror of
https://github.com/servo/servo.git
synced 2025-08-10 16:05:43 +01:00
style: Follow-up clean-ups and tweaks
<general-enclosed> should be handled in parse_in_parens. Add some convenience functions to KleeneValue. Differential Revision: https://phabricator.services.mozilla.com/D163214
This commit is contained in:
parent
bee44a5259
commit
020ba9e749
5 changed files with 152 additions and 139 deletions
|
@ -19,7 +19,6 @@ use crate::invalidation::stylesheets::RuleChangeKind;
|
|||
use crate::media_queries::Device;
|
||||
use crate::properties::{self, CascadeMode, ComputedValues};
|
||||
use crate::properties::{AnimationDeclarations, PropertyDeclarationBlock};
|
||||
use crate::queries::condition::KleeneValue;
|
||||
use crate::rule_cache::{RuleCache, RuleCacheConditions};
|
||||
use crate::rule_collector::{containing_shadow_ignoring_svg_use, RuleCollector};
|
||||
use crate::rule_tree::{CascadeLevel, RuleTree, StrongRuleNode, StyleSource};
|
||||
|
@ -2381,13 +2380,8 @@ impl CascadeData {
|
|||
None => return true,
|
||||
Some(ref c) => c,
|
||||
};
|
||||
let result = match !condition.matches(stylist.device(), element, &mut context.extra_data.cascade_input_flags) {
|
||||
KleeneValue::True => true,
|
||||
KleeneValue::False => false,
|
||||
KleeneValue::Unknown => true,
|
||||
};
|
||||
|
||||
if result {
|
||||
let matches = condition.matches(stylist.device(), element, &mut context.extra_data.cascade_input_flags).to_bool(/* unknown = */ false);
|
||||
if !matches {
|
||||
return false;
|
||||
}
|
||||
id = condition_ref.parent;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue