[OffscreenCanvas] Placeholder canvases need to respect object-fit CSS property |
||
Issue descriptionImages that are dispatched via the commit() flow currently assume object-fit: fill, which is the default.
,
May 15 2018
I believe that this issue is already fixed by https://codereview.chromium.org/2495373003/. I've written a small CSS resizing test for OffscreenCanvas and notice that the object-fit CSS property on placeholder canvas just works as expected. I'm attaching the test and four snapshots here: 1. Snapshot "NoCSSStyle": the canvas is just as it is , 300 x 300 2. Snapshot "CSSResizeWithoutObjectFit": the canvas is just as resized and scaled as the default "fill" object-fit style. 3. Snapshot "CSSResizeWithCoverObjectFit": the canvas is clipped to the resized shape. 4. Snapshot" CSSResizeWithContaintObjectFit": the canvas is resized but keep the aspect ratio. |
||
►
Sign in to add a comment |
||
Comment 1 by junov@chromium.org
, Dec 5 2016