Fix double zooming in StyleBuilderConverter::ConvertBorderWidth()
StyleBuilderConverter::ConvertBorderWidth() is computing the zoom twice, the value we set in |result| variable is already zoomed. But then we have some extra lines that zoom it again and check if the final value is between 0px and 1px, to return 1px. This is wrong, as |result| was already zoomed, we can avoid that second operation and use that value to do the check directly. This was causing issues in the past but in very corner cases (so not very easy to reproduce). However due to the change on how subpixel border widths are managed (now they're floored, see r770064) this issue is causing that some borders are invisible. Added one WPT test that would fail with scaling factor 1.5. Also added a internal test using "zoom" property. BUG=1126396 TEST=external/wpt/css/css-backgrounds/border-width-small-values-001-*.html TEST=wpt_internal/css/css-backgrounds/border-width-zoom-001.html Change-Id: I27baac92036f7761e1616d55e90e4ed80cbb8914 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2401030Reviewed-by:Rune Lillesveen <futhark@chromium.org> Commit-Queue: Manuel Rego <rego@igalia.com> Cr-Commit-Position: refs/heads/master@{#805717}
Showing







