New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 671227 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: May 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug



Sign in to add a comment

[OffscreenCanvas] Placeholder canvases need to respect object-fit CSS property

Project Member Reported by junov@chromium.org, Dec 5 2016

Issue description

Images that are dispatched via the commit() flow currently assume object-fit: fill, which is the default.


 

Comment 1 by junov@chromium.org, Dec 5 2016

Not critical for OffscreenCanvas launch IMHO.

Comment 2 by xlai@chromium.org, May 15 2018

Cc: fs...@chromium.org junov@chromium.org
Status: Fixed (was: Assigned)
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.
offscreen_canvas_css_resize.html
528 bytes View Download
NoCSSStyle.png
102 KB View Download
CSSResizeWithoutObjectFit.png
103 KB View Download
CSSResizeWithCoverObjectFit.png
102 KB View Download
CSSResizeWithContainObjectFit.png
100 KB View Download

Sign in to add a comment