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

Issue metadata

Status: Fixed
Closed: Dec 2016
EstimatedDays: ----
NextAction: ----
OS: Linux , Android
Pri: 3
Type: Bug

Sign in to add a comment

Issue 670977: ShapeDetection detect() doesn't support canvas object

Reported by, Dec 3 2016 Project Member

Issue description


Passing in a canvas into `detect` causes a NotFoundError: Unsupported source.

Expected result: not throwing the error (as per spec) :)

Comment 1 by, Dec 4 2016

Labels: ShapeDetection

Comment 2 by, Dec 8 2016

Project Member
The following revision refers to this bug:

commit 7d0018f762087ab6624de7dd09cf15207dda57c6
Author: mcasas <>
Date: Thu Dec 08 02:12:42 2016

ShapeDetection: add support for all CanvasImageSource input types

Currently ShapeDetector::detectFacesOn{ImageBitmap,Videoelement}()
extract the pixels out of the corresponding object; I haven't noticed
that CanvasImageSource::getSourceImageForCanvas() is a virtual method,
implemented for each CanvasImageSource, doing exactly what I needed,
which is extracting an WTF::Image.

getSourceImageForCanvas() implementations have the same checks
being performed on ToT now, so swapping one for the other is
not reducing the early-bail outs.

So, this CL factors out the code to use getSourceImageForCanvas(),
making the Shape Detection detect() work for all these different
input types, and adds LayoutTests for them.

BUG= 670977 , 659138

Cr-Commit-Position: refs/heads/master@{#437144}


Comment 3 by, Dec 8 2016

Status: Fixed (was: Untriaged)

Sign in to add a comment