[TablesNG] Float rounding fix
This fixes a very subtle bug: If table size is auto: - table assignable size is computed as sum of its column max widths - then, the size gets redistributed to columns - in the old code, even though the sum of columns matched table width exactly, each column would still recompute its value. - due to floating-point rounding error, a column might shrink or grow slightly. - shrunk column would cause text to wrap, when it should not I am having a hard time creating a reproducible test for this one. I've only seen it once in my temporary test file, and fixed it. Then I blew away my test, and decided to create a real test. I could never make my fp math fail in the new test. I am submitting a test, that might fail on some fp implementation, but not on my linux box. Bug: 958381 Change-Id: I3c5dbb5577b9c7b7f6f922974eb67fa743d947b4 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2386285 Commit-Queue: Aleks Totic <atotic@chromium.org> Reviewed-by:Morten Stenshorne <mstensho@chromium.org> Cr-Commit-Position: refs/heads/master@{#803618}
Showing
Please register or sign in to comment