mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-25 11:15:34 +00:00
21ce2dd228
This changes nsDisplayImage::GetDestRect and nsImageFrame::PredictedDestRect to return the true dest rect of the image, without intersecting it with the image content box. The only caller of these functions that actually requires a rectangle that's within the image's content bounds is nsDisplayImage::GetOpaqueRegion, so I'm changing that to intersect with the display item's bounds. I'm pretty sure nsImageFrame::MaybeDecodeForPredictedSize() also prefers the unclipped dest rect, because it cares about the scale at which the image is painted, and not about which parts of the image are painted. --HG-- extra : commitid : CDJJnfN7vF3 extra : rebase_source : 5b59f81ab60290f508b83db7e942559da621cb70
17 lines
290 B
HTML
17 lines
290 B
HTML
<!DOCTYPE html>
|
|
<meta charset="utf-8">
|
|
<title>Make sure the ImageLayer is sized correctly when using object-fit</title>
|
|
|
|
<style type="text/css">
|
|
|
|
img {
|
|
object-fit: cover;
|
|
width: 256px;
|
|
height: 128px;
|
|
will-change: transform;
|
|
}
|
|
|
|
</style>
|
|
|
|
<img src="repeatable-diagonal-gradient.png">
|