mirror of
https://github.com/servo/servo.git
synced 2025-08-07 22:45:34 +01:00
style: Cascade pres hints after normal user rules.
Per https://drafts.csswg.org/css-cascade/#preshint and https://html.spec.whatwg.org/multipage/#presentational-hints. This was causing failures in the link color reftests with the preferences sheet as a User sheet. Bug: 1436782 Reviewed-by: bholley MozReview-Commit-ID: 9iwEqPBw4CF
This commit is contained in:
parent
1d8e78720b
commit
69c018c70d
2 changed files with 49 additions and 39 deletions
|
@ -472,22 +472,28 @@ impl RuleTree {
|
|||
/// where it likely did not result from a rigorous performance analysis.)
|
||||
const RULE_TREE_GC_INTERVAL: usize = 300;
|
||||
|
||||
/// The cascade level these rules are relevant at, as per[1].
|
||||
/// The cascade level these rules are relevant at, as per[1][2][3].
|
||||
///
|
||||
/// Presentational hints for SVG and HTML are in the "author-level
|
||||
/// zero-specificity" level, that is, right after user rules, and before author
|
||||
/// rules.
|
||||
///
|
||||
/// The order of variants declared here is significant, and must be in
|
||||
/// _ascending_ order of precedence.
|
||||
///
|
||||
/// [1]: https://drafts.csswg.org/css-cascade/#cascade-origin
|
||||
/// [2]: https://drafts.csswg.org/css-cascade/#preshint
|
||||
/// [3]: https://html.spec.whatwg.org/multipage/#presentational-hints
|
||||
#[repr(u8)]
|
||||
#[derive(Clone, Copy, Debug, Eq, PartialEq, PartialOrd)]
|
||||
#[cfg_attr(feature = "servo", derive(MallocSizeOf))]
|
||||
pub enum CascadeLevel {
|
||||
/// Normal User-Agent rules.
|
||||
UANormal = 0,
|
||||
/// Presentational hints.
|
||||
PresHints,
|
||||
/// User normal rules.
|
||||
UserNormal,
|
||||
/// Presentational hints.
|
||||
PresHints,
|
||||
/// Author normal rules.
|
||||
AuthorNormal,
|
||||
/// Style attribute normal rules.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue