Closed Bug 1507028 Opened 10 months ago Closed 10 months ago

[wpt-sync] Sync PR 14042 - Fix background image painting of very small images

Categories

(Core :: Layout, enhancement, P4)

enhancement

Tracking

()

RESOLVED FIXED
mozilla65
Tracking Status
firefox65 --- fixed

People

(Reporter: wptsync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Stephen Chenney <schenney@chromium.org> wrote:
>  Fix background image painting of very small images
>  
>  The background image fast path painting rounds the image src rect
>  to integer sizes assuming sprite maps and/or reasonably large images.
>  When a very small image is used scaled up to a large size (such as
>  constant color images scaled up to form progress bars by animating
>  background size) the src rect may be 1 x [small number] which gets
>  rounded to zero size.
>  
>  This patch changes the code to detect this situation and not round
>  in such cases.
>  
>  It's worth recording that an alternate approach is to detect when
>  the rounding results in a significant change in src rect and always
>  switch to unrounded in that case. But it would be more expensive for
>  a relatively uncommon case.
>  
>  R=fmalita
>  BUG=904042
>  
>  Change-Id: I24657a5d087c0dda0fd8a5e3c3d08e1e4eb02473
>  Reviewed-on: https://chromium-review.googlesource.com/1334291
>  WPT-Export-Revision: f2feb6db0fa5917e01224067f6199618c97be1c4
Component: web-platform-tests → Layout
Product: Testing → Core
Whiteboard: [wptsync downstream] → [wptsync downstream error]
Whiteboard: [wptsync downstream error] → [wptsync downstream]
Ran 1 tests
PASS   : 1
Pushed by wptsync@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/2cf0908137df
[wpt PR 14042] - Fix background image painting of very small images, a=testonly
https://hg.mozilla.org/mozilla-central/rev/2cf0908137df
Status: NEW → RESOLVED
Closed: 10 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla65
You need to log in before you can comment on or make changes to this bug.