Closed Bug 1604770 Opened 4 years ago Closed 4 years ago

[wpt-sync] Sync PR 20831 - Use Image::SizeAsFloat() and unsnapped rectangle in ImagePainter

Categories

(Core :: Layout, task, P4)

task

Tracking

()

RESOLVED FIXED
mozilla73
Tracking Status
firefox73 --- fixed

People

(Reporter: mozilla.org, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Fredrik Söderquist <fs@opera.com> wrote:

Use Image::SizeAsFloat() and unsnapped rectangle in ImagePainter

The pixel-snapping of the destination rectangle can end up distorting
the geometry use for painting an SVG image preserveAspectRatio is used -
the larger the aspect ratio, the larger the error.
By passing the unsnapped rectangle to LayoutImageResource::GetImage, and
using Image::SizeAsFloat() to compute the source rectangle of the image,
e can minimize the error and allow the Image in question (an SVGImage)
to perform compensation for the difference in aspect ratio between the
snapped and unsnapped rectangles. This means that the painted result
will better approximate the intended rendering.

Also clean up accesses to the LayoutImageResource and ImageResourceContent
by adding and using local variables for them.

Bug: 812239
Change-Id: I0778648e7dd6fcca778a95123509f15b3519564c
Reviewed-on: https://chromium-review.googlesource.com/1969831
WPT-Export-Revision: 718128930f236e1d4957506e6c9e437a135ecbbf

Component: web-platform-tests → Layout
Product: Testing → Core

CI Results

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

Total 1 tests

Status Summary

Firefox

FAIL: 1

Chrome

FAIL: 1

Safari

FAIL: 1

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

/css/css-sizing/image-fractional-height-with-wide-aspect-ratio.html: FAIL (Chrome: FAIL, Safari: FAIL)

CI Results

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

Total 1 tests

Status Summary

Firefox

FAIL: 1

Chrome

FAIL: 1

Safari

FAIL: 1

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

/css/css-sizing/image-fractional-height-with-wide-aspect-ratio.html: FAIL (Chrome: FAIL, Safari: FAIL)

CI Results

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

Total 1 tests

Status Summary

Firefox

FAIL: 1

Chrome

FAIL: 1

Safari

FAIL: 1

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

/css/css-sizing/image-fractional-height-with-wide-aspect-ratio.html: FAIL (Chrome: FAIL, Safari: FAIL)

Pushed by wptsync@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/4beb58f97823
[wpt PR 20831] - Use Image::SizeAsFloat() and unsnapped rectangle in ImagePainter, a=testonly
https://hg.mozilla.org/integration/autoland/rev/a6bdcf3878f6
[wpt PR 20831] - Update wpt metadata, a=testonly

CI Results

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

Total 1 tests

Status Summary

Firefox

FAIL: 1

Chrome

FAIL: 1

Safari

FAIL: 1

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

/css/css-sizing/image-fractional-height-with-wide-aspect-ratio.html: FAIL (Chrome: FAIL, Safari: FAIL)

Test result changes from PR not available.
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla73
You need to log in before you can comment on or make changes to this bug.