Closed Bug 1608456 Opened 4 years ago Closed 4 years ago

[wpt-sync] Sync PR 21134 - In order to get a preciser aspect-ratio, change parseInt to parseFloat

Categories

(Core :: DOM: Core & HTML, task, P4)

task

Tracking

()

RESOLVED FIXED
mozilla74
Tracking Status
firefox74 --- fixed

People

(Reporter: mozilla.org, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Cathie Chen <cathiechen@igalia.com> wrote:

In order to get a preciser aspect-ratio, change parseInt to parseFloat

Hi,
When getComputedStyle(images[5]).width is 100px, the used value of getComputedStyle(images[5]).height is float(79.69924812030075).
Using parseFloat instead of parseInt can make the calculate aspect-ratio closer to the actual one.

PTAL, thanks:)

Component: web-platform-tests → DOM: Core & HTML
Product: Testing → Core

CI Results

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

Total 40 tests

Status Summary

Firefox

OK : 1
PASS: 39
FAIL: 1

Chrome

OK : 1
PASS: 1

Safari

OK : 1
FAIL: 1

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/img-aspect-ratio.html
Image width and height attributes are used to infer aspect-ratio: FAIL (Chrome: PASS, Safari: FAIL)

Pushed by wptsync@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/3e47be646e6b
[wpt PR 21134] - In order to get a more precise aspect-ratio, change parseInt to parseFloat, a=testonly
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla74
You need to log in before you can comment on or make changes to this bug.