[wpt-sync] Sync PR 20831 - Use Image::SizeAsFloat() and unsnapped rectangle in ImagePainter
Categories
(Core :: Layout, task, P4)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox73 | --- | fixed |
People
(Reporter: wpt-sync, 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
| Assignee | ||
Updated•6 years ago
|
| Assignee | ||
Comment 1•6 years ago
|
||
| Assignee | ||
Comment 2•6 years ago
|
||
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)
| Assignee | ||
Comment 3•6 years ago
|
||
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)
| Assignee | ||
Comment 4•6 years ago
|
||
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)
| Assignee | ||
Comment 6•6 years ago
|
||
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)
| Assignee | ||
Comment 7•6 years ago
|
||
Comment 8•6 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/4beb58f97823
https://hg.mozilla.org/mozilla-central/rev/a6bdcf3878f6
Description
•