mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-06 00:55:37 +00:00
50b417c786
The test harness code for normalizing transform inputs to a standard form for comparison fails to detect the case where the input is a string such as { tx: "20px" } instead of: { tx: 20 } When we go to compare matrix components we fail if: Math.abs(a.comp - b.comp) > tolerance But if a.comp or b.comp is a string, we'll get NaN on the LHS and "NaN > tolerance" will return false so we'll skip the failure handling and continue onto the next component. That means if we have input { tx: "30px" } and we get "20" as the x-translation component we'll pass the test. This patch fixes this condition to check for isNaN. We *could* also just drop a few .map(parseFloat) calls into convertObjectTo3dMatrix and convertArrayTo3dMatrix to ensure "20px" becomes 20 but there may be situations where that masks bugs (since "20px" and "20em" turn into the same thing) so for now this minimal fix should be enough. |
||
---|---|---|
.. | ||
analysis | ||
base | ||
build | ||
doc | ||
forms | ||
generic | ||
inspector | ||
ipc | ||
mathml | ||
media | ||
printing | ||
reftests | ||
style | ||
svg | ||
tables | ||
tools | ||
xul | ||
moz.build |