Encapsulate CSS error reporter creation for stylo.

This commit is contained in:
Josh Matthews 2017-04-18 19:10:21 +10:00
parent fd6e54d9e3
commit 3773a4d499
4 changed files with 20 additions and 8 deletions

View file

@ -476,7 +476,7 @@ impl AnimationValue {
/// Construct an AnimationValue from a property declaration
pub fn from_declaration(decl: &PropertyDeclaration, context: &mut Context,
initial: &ComputedValues) -> Option<Self> {
use error_reporting::RustLogReporter;
use error_reporting::create_error_reporter;
use properties::LonghandId;
use properties::DeclaredValue;
@ -539,7 +539,7 @@ impl AnimationValue {
},
PropertyDeclaration::WithVariables(id, ref variables) => {
let custom_props = context.style().custom_properties();
let reporter = RustLogReporter;
let reporter = create_error_reporter();
match id {
% for prop in data.longhands:
% if prop.animatable: