Bug 1407092 - style: Fix ex computation with more than one operand. r=jdm, a=ritu
authorEmilio Cobos Álvarez <emilio@crisal.io>
Tue, 10 Oct 2017 14:13:29 -0500
changeset 432415 65861c4a6ba487c1c4e8206c4c67ccb6f3037699
parent 432414 10ac938d97d5175ed0bc130aeae4a2158bcd5f70
child 432416 6fcfa157e5b834d167abaf8c7a695bbf3ed16adf
push id7951
push userryanvm@gmail.com
push dateThu, 12 Oct 2017 01:54:38 +0000
treeherdermozilla-beta@4c2e84704183 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjdm, ritu
bugs1407092
milestone57.0
Bug 1407092 - style: Fix ex computation with more than one operand. r=jdm, a=ritu Source-Repo: https://github.com/servo/servo Source-Revision: b1926b465671ce56474fc24827eb9562ff7b575b
servo/components/style/values/specified/calc.rs
--- a/servo/components/style/values/specified/calc.rs
+++ b/servo/components/style/values/specified/calc.rs
@@ -367,17 +367,17 @@ impl CalcNode {
                         );
                     }
                     NoCalcLength::FontRelative(rel) => {
                         match rel {
                             FontRelativeLength::Em(em) => {
                                 ret.em = Some(ret.em.unwrap_or(0.) + em * factor);
                             }
                             FontRelativeLength::Ex(ex) => {
-                                ret.ex = Some(ret.em.unwrap_or(0.) + ex * factor);
+                                ret.ex = Some(ret.ex.unwrap_or(0.) + ex * factor);
                             }
                             FontRelativeLength::Ch(ch) => {
                                 ret.ch = Some(ret.ch.unwrap_or(0.) + ch * factor);
                             }
                             FontRelativeLength::Rem(rem) => {
                                 ret.rem = Some(ret.rem.unwrap_or(0.) + rem * factor);
                             }
                         }