Open Bug 1664141 Opened 1 year ago Updated 1 year ago

[wpt-sync] Sync PR 25466 - Fix double zooming in StyleBuilderConverter::ConvertBorderWidth()

Categories

(Core :: Layout: Images, Video, and HTML Frames, task, P4)

task

Tracking

()

People

(Reporter: mozilla.org, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 25466 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/25466
Details from upstream follow.

b'Manuel Rego Casasnovas <rego@igalia.com>' wrote:

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/2401030
WPT-Export-Revision: ed31b35da72e3513df263bf763a7af27d4e5f293

Component: web-platform-tests → Layout: Images, Video, and HTML Frames
Product: Testing → Core

CI Results

Ran 0 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 5 tests

Status Summary

Firefox

PASS: 5

Chrome

PASS: 5

Safari

PASS: 5

Links

GitHub PR Head
GitHub PR Base

You need to log in before you can comment on or make changes to this bug.