mirror of
https://github.com/servo/servo.git
synced 2025-08-10 16:05:43 +01:00
style: Add parsing for <general-enclosed> in queries conditions
See https://drafts.csswg.org/mediaqueries-5/#typedef-general-enclosed Differential Revision: https://phabricator.services.mozilla.com/D158662
This commit is contained in:
parent
a298c296e4
commit
bee44a5259
7 changed files with 164 additions and 30 deletions
|
@ -19,6 +19,7 @@ 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};
|
||||
|
@ -2380,7 +2381,13 @@ impl CascadeData {
|
|||
None => return true,
|
||||
Some(ref c) => c,
|
||||
};
|
||||
if !condition.matches(stylist.device(), element, &mut context.extra_data.cascade_input_flags) {
|
||||
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 {
|
||||
return false;
|
||||
}
|
||||
id = condition_ref.parent;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue