Fix zoomed SVGs in border-image
When getting the image from the StyleImage we would always specify a multiplier (zoom) of one while specifying an object size which had a different effective zoom. This would mess up the slice calculations for SVG images under zoom and mess up the source rectangles. Instead get an image with the appropriate (effective) zoom while also computing the size of the StyleImage under no zoom (==CSS pixels). Use these two sizes to derive a (or "the", if it's a raster image) pixel ratio to apply to the image slice values (which is in CSS pixels). Improves some cases in the TC from crbug.com/1134145 as well. Bug: 561519, 596075, 1134145 Change-Id: I744151d40bc806930744cae95530b12496da7387 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2565535 Commit-Queue: Fredrik Söderquist <fs@opera.com> Reviewed-by:Stephen Chenney <schenney@chromium.org> Cr-Commit-Position: refs/heads/master@{#833452}
Showing
Please register or sign in to comment