mirror of
https://github.com/servo/servo.git
synced 2025-08-13 01:15:34 +01:00
style: Don't look at the rule type from value parsing.
This would cause properties to change the value semantics between, e.g., @keyframes and non-@keyframes, which would be observable. It happens not to be observable since the animation-* and transition-* properties are not allowed in @keyframes, nor have bits in `contain`, and none of the two properties are allowed in @page. But I think it's the right thing to do. This still causes a quirk like a property value in chrome / user origins being potentially different if the value is specified via CSS var functions. But I think that is fine. Bug: 1466136 Reviewed-by: hiro MozReview-Commit-ID: GhoPt0I34oO
This commit is contained in:
parent
710184b670
commit
f829300751
2 changed files with 43 additions and 4 deletions
|
@ -465,7 +465,7 @@ fn change_bits_for_longhand(longhand: LonghandId) -> WillChangeBits {
|
|||
}
|
||||
|
||||
fn change_bits_for_maybe_property(ident: &str, context: &ParserContext) -> WillChangeBits {
|
||||
let id = match PropertyId::parse(ident, context) {
|
||||
let id = match PropertyId::parse_ignoring_rule_type(ident, context) {
|
||||
Ok(id) => id,
|
||||
Err(..) => return WillChangeBits::empty(),
|
||||
};
|
||||
|
@ -777,7 +777,7 @@ impl Parse for TransitionProperty {
|
|||
let location = input.current_source_location();
|
||||
let ident = input.expect_ident()?;
|
||||
|
||||
let id = match PropertyId::parse(&ident, context) {
|
||||
let id = match PropertyId::parse_ignoring_rule_type(&ident, context) {
|
||||
Ok(id) => id,
|
||||
Err(..) => return Ok(TransitionProperty::Unsupported(
|
||||
CustomIdent::from_ident(location, ident, &["none"])?,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue