Bug 1367635 - Part 6: Add writing mode dependency if special MozLength keywords are used. r=emilio draft
authorCameron McCormack <cam@mcc.id.au>
Wed, 13 Sep 2017 16:06:48 +0800
changeset 664569 d69468eff379d370a69f172ca8d4d18bde6b3d09
parent 664568 aa91bad6b0a4b018cc625d518b21434e0cf36045
child 664570 169045637468558912a4f2993eaa6061135a98d9
push id79725
push userbmo:cam@mcc.id.au
push dateThu, 14 Sep 2017 03:06:57 +0000
reviewersemilio
bugs1367635
milestone57.0a1
Bug 1367635 - Part 6: Add writing mode dependency if special MozLength keywords are used. r=emilio MozReview-Commit-ID: 9sphB2C9Ydd
servo/components/style/values/computed/length.rs
--- a/servo/components/style/values/computed/length.rs
+++ b/servo/components/style/values/computed/length.rs
@@ -857,16 +857,20 @@ impl ToComputedValue for specified::MozL
 
     #[inline]
     fn to_computed_value(&self, context: &Context) -> MozLength {
         match *self {
             specified::MozLength::LengthOrPercentageOrAuto(ref lopoa) => {
                 MozLength::LengthOrPercentageOrAuto(lopoa.to_computed_value(context))
             }
             specified::MozLength::ExtremumLength(ref ext) => {
+                debug_assert!(context.for_non_inherited_property.is_some(),
+                              "should check whether we're a non-inherited property");
+                context.rule_cache_conditions.borrow_mut()
+                    .set_writing_mode_dependency(context.builder.writing_mode);
                 MozLength::ExtremumLength(ext.clone())
             }
         }
     }
 
     #[inline]
     fn from_computed_value(computed: &MozLength) -> Self {
         match *computed {