servo: Merge #18807 - style: Fix ex computation with more than one operand (from emilio:ex-calc); r=jdm
authorEmilio Cobos Álvarez <emilio@crisal.io>
Tue, 10 Oct 2017 14:13:29 -0500
changeset 385393 c75889c4efb4b22666b568304eb27fad37fd66b2
parent 385392 0ac0d5e4f5567516e99e99f8ad7d3f62fed8f908
child 385394 6a17fec908553eecc3b928cbf6812b3cecae66ca
push id32655
push userarchaeopteryx@coole-files.de
push dateWed, 11 Oct 2017 09:38:36 +0000
treeherdermozilla-central@a72bd6160609 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjdm
bugs18807
milestone58.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
servo: Merge #18807 - style: Fix ex computation with more than one operand (from emilio:ex-calc); r=jdm 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
@@ -368,17 +368,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);
                             }
                         }