From fd5fe0a8e38dfdbd5792cd35f61ea8a83dfb340e Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Wed, 13 Sep 2017 16:38:46 +0800 Subject: [PATCH] style: Don't cache structs with custom property references. --- components/style/properties/properties.mako.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/components/style/properties/properties.mako.rs b/components/style/properties/properties.mako.rs index 9e753e054b6..3fa6bcb6e04 100644 --- a/components/style/properties/properties.mako.rs +++ b/components/style/properties/properties.mako.rs @@ -3298,6 +3298,10 @@ where for (declaration, cascade_level) in iter_declarations() { let mut declaration = match *declaration { PropertyDeclaration::WithVariables(id, ref unparsed) => { + if !id.inherited() { + context.rule_cache_conditions.borrow_mut() + .set_uncacheable(); + } Cow::Owned(unparsed.substitute_variables( id, &context.builder.custom_properties,