Make background-size: cover and contain really cover
With background-repeat: no-repeat and background-size: cover, the computations for dest rect for the no-repeat case use the tile size to set the dest rect. This prevents tiled drawing from painting more than one tile. But the background-size computations for cover and contain use an unsnapped position area to set the tile size, which produces an unsnapped tile size. This unsnapped tile size, when set as the dest rect for painting, results in a tile that doesn't fill the background as one would expect for cover or contain. This patch switches to always computing the cover and contain tile sizes using a snapped position area to give a snapped dest rect. R: fs@opera.com, fmalita@chromium.org Bug: 785171 Change-Id: I38343ac09d689e9d1360e7043b2ef49adeadb983 Reviewed-on: https://chromium-review.googlesource.com/c/1394014 Commit-Queue: Stephen Chenney <schenney@chromium.org> Reviewed-by:Florin Malita <fmalita@chromium.org> Cr-Commit-Position: refs/heads/master@{#619962}
Showing



