[wpt-sync] Sync PR 21134 - In order to get a preciser aspect-ratio, change parseInt to parseFloat
Categories
(Core :: DOM: Core & HTML, task, P4)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox74 | --- | fixed |
People
(Reporter: wpt-sync, 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:)
| Assignee | ||
Updated•6 years ago
|
| Assignee | ||
Comment 1•6 years ago
|
||
| Assignee | ||
Comment 2•6 years ago
|
||
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)
Comment 4•6 years ago
|
||
| bugherder | ||
Description
•