|
|
DescriptionShapeDetection: use ImageBitmapSource as input and support ImageData
This CL :
- s/CanvasImageSource/ImageBitmapSource/ in the idl following
https://wicg.github.io/shape-detection-api/#face-detection-api and
https://wicg.github.io/shape-detection-api/#barcode-detection-api
CanvasImageSource [1] is almost a subset of ImageBitmapSource [2]
(the former can be a CSSImageValue, but we don't care much
about it for this Spec), so this CL is small in that sense.
- Adds support for ImageData as a source for detect()ion,
and adds a LayoutTest for it.
[1] https://cs.chromium.org/chromium/src/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.idl?q=file:%5C.idl+CanvasImagesource&sq=package:chromium&l=33&dr=C
[2] https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/imagebitmap/ImageBitmapFactories.idl?type=cs&q=file:%5C.idl+Imagebitmapsource&sq=package:chromium&l=38
BUG=670975
Committed: https://crrev.com/b935b59277c7f3cdc38d560fb6e305274f4e995c
Cr-Commit-Position: refs/heads/master@{#438725}
Patch Set 1 : #
Total comments: 4
Patch Set 2 : xianglu@ comments and added forgotten LayoutTest detection-ImageData.html #
Messages
Total messages: 32 (19 generated)
Description was changed from ========== SD: wip BUG=670975 ========== to ========== [wip] ShapeDetection: use ImageBitmapSource as input and support ImageData This CL is essentially doing what we need, but should use ImageBitmapSource [1] instead of crafting an idl enum itself; however ImageBitmapSource does not have OffscreenCanvas, so until then, this CL is on hold. [1] https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/imagebitm... BUG=670975 ==========
Patchset #1 (id:1) has been deleted
Patchset #1 (id:20001) has been deleted
Description was changed from ========== [wip] ShapeDetection: use ImageBitmapSource as input and support ImageData This CL is essentially doing what we need, but should use ImageBitmapSource [1] instead of crafting an idl enum itself; however ImageBitmapSource does not have OffscreenCanvas, so until then, this CL is on hold. [1] https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/imagebitm... BUG=670975 ========== to ========== [wip] ShapeDetection: use ImageBitmapSource as input and support ImageData This CL : - s/CanvasImageSource/ImageBitmapSource/ in the idl following https://wicg.github.io/shape-detection-api/#face-detection-api and https://wicg.github.io/shape-detection-api/#barcode-detection-api CanvasImageSource [1] is almost a subset of ImageBitmapSource [2] (the former can be a CSSImageValue, but we don't care much about it for this Spec). - Adds support for ImageData as a source for detect()ion, and adds a LayoutTest for it. [1] https://cs.chromium.org/chromium/src/third_party/WebKit/Source/modules/canvas... [2] https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/imagebitm... BUG=670975 ==========
Description was changed from ========== [wip] ShapeDetection: use ImageBitmapSource as input and support ImageData This CL : - s/CanvasImageSource/ImageBitmapSource/ in the idl following https://wicg.github.io/shape-detection-api/#face-detection-api and https://wicg.github.io/shape-detection-api/#barcode-detection-api CanvasImageSource [1] is almost a subset of ImageBitmapSource [2] (the former can be a CSSImageValue, but we don't care much about it for this Spec). - Adds support for ImageData as a source for detect()ion, and adds a LayoutTest for it. [1] https://cs.chromium.org/chromium/src/third_party/WebKit/Source/modules/canvas... [2] https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/imagebitm... BUG=670975 ========== to ========== [wip] ShapeDetection: use ImageBitmapSource as input and support ImageData This CL : - s/CanvasImageSource/ImageBitmapSource/ in the idl following https://wicg.github.io/shape-detection-api/#face-detection-api and https://wicg.github.io/shape-detection-api/#barcode-detection-api CanvasImageSource [1] is almost a subset of ImageBitmapSource [2] (the former can be a CSSImageValue, but we don't care much about it for this Spec), so this CL is small in that sense. - Adds support for ImageData as a source for detect()ion, and adds a LayoutTest for it. [1] https://cs.chromium.org/chromium/src/third_party/WebKit/Source/modules/canvas... [2] https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/imagebitm... BUG=670975 ==========
mcasas@chromium.org changed reviewers: + xianglu@chromium.org
xianglu@ PTAL
https://codereview.chromium.org/2550413005/diff/40001/third_party/WebKit/Sour... File third_party/WebKit/Source/modules/shapedetection/ShapeDetector.cpp (right): https://codereview.chromium.org/2550413005/diff/40001/third_party/WebKit/Sour... third_party/WebKit/Source/modules/shapedetection/ShapeDetector.cpp:150: ScriptPromise promise = resolver->promise(); Should we check origin for ImageData as well? https://codereview.chromium.org/2550413005/diff/40001/third_party/WebKit/Sour... third_party/WebKit/Source/modules/shapedetection/ShapeDetector.cpp:169: if (img->bitmapSourceSize().isZero()) { The promise is resolved when HTMLImageElement is empty. But we didn't check size for other elements and they will get a promise rejection. Maybe we could make them behave more consistently?
Description was changed from ========== [wip] ShapeDetection: use ImageBitmapSource as input and support ImageData This CL : - s/CanvasImageSource/ImageBitmapSource/ in the idl following https://wicg.github.io/shape-detection-api/#face-detection-api and https://wicg.github.io/shape-detection-api/#barcode-detection-api CanvasImageSource [1] is almost a subset of ImageBitmapSource [2] (the former can be a CSSImageValue, but we don't care much about it for this Spec), so this CL is small in that sense. - Adds support for ImageData as a source for detect()ion, and adds a LayoutTest for it. [1] https://cs.chromium.org/chromium/src/third_party/WebKit/Source/modules/canvas... [2] https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/imagebitm... BUG=670975 ========== to ========== ShapeDetection: use ImageBitmapSource as input and support ImageData This CL : - s/CanvasImageSource/ImageBitmapSource/ in the idl following https://wicg.github.io/shape-detection-api/#face-detection-api and https://wicg.github.io/shape-detection-api/#barcode-detection-api CanvasImageSource [1] is almost a subset of ImageBitmapSource [2] (the former can be a CSSImageValue, but we don't care much about it for this Spec), so this CL is small in that sense. - Adds support for ImageData as a source for detect()ion, and adds a LayoutTest for it. [1] https://cs.chromium.org/chromium/src/third_party/WebKit/Source/modules/canvas... [2] https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/imagebitm... BUG=670975 ==========
ptal also, notice that I uploaded detection-ImageData.html that I forgot before :P https://codereview.chromium.org/2550413005/diff/40001/third_party/WebKit/Sour... File third_party/WebKit/Source/modules/shapedetection/ShapeDetector.cpp (right): https://codereview.chromium.org/2550413005/diff/40001/third_party/WebKit/Sour... third_party/WebKit/Source/modules/shapedetection/ShapeDetector.cpp:150: ScriptPromise promise = resolver->promise(); On 2016/12/14 22:32:28, xianglu wrote: > Should we check origin for ImageData as well? [1] tells us that ImageDatas can not be created from a Context 2D that is tainted, so we can assume here that a given ImageData is clean. Will add a note. [1] https://www.w3.org/TR/2dcontext/#pixel-manipulation https://codereview.chromium.org/2550413005/diff/40001/third_party/WebKit/Sour... third_party/WebKit/Source/modules/shapedetection/ShapeDetector.cpp:169: if (img->bitmapSourceSize().isZero()) { On 2016/12/14 22:32:28, xianglu wrote: > The promise is resolved when HTMLImageElement is empty. But we didn't check size > for other elements and they will get a promise rejection. Maybe we could make > them behave more consistently? Added a TODO+bug.
xianglu@google.com changed reviewers: + xianglu@google.com
LGTM.
xianglu@chromium.org changed reviewers: - xianglu@google.com
xianglu@chromium.org changed reviewers: - xianglu@chromium.org
mcasas@chromium.org changed reviewers: + haraken@chromium.org
haraken@ RS plz
LGTM
The CQ bit was checked by mcasas@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: win_chromium_compile_dbg_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_comp...) win_chromium_x64_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_...) win_clang on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_clang/builds/...)
The CQ bit was checked by mcasas@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: win_chromium_compile_dbg_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_comp...)
The CQ bit was checked by mcasas@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch. Bot data: {"patchset_id": 60001, "attempt_start_ts": 1481769527875850, "parent_rev": "453492f0fb1f259710609e1a44cba6c4244b30ef", "commit_rev": "08ce4318f2162a70dc0f7a5d2128ab0f4a215e59"}
Message was sent while issue was closed.
Description was changed from ========== ShapeDetection: use ImageBitmapSource as input and support ImageData This CL : - s/CanvasImageSource/ImageBitmapSource/ in the idl following https://wicg.github.io/shape-detection-api/#face-detection-api and https://wicg.github.io/shape-detection-api/#barcode-detection-api CanvasImageSource [1] is almost a subset of ImageBitmapSource [2] (the former can be a CSSImageValue, but we don't care much about it for this Spec), so this CL is small in that sense. - Adds support for ImageData as a source for detect()ion, and adds a LayoutTest for it. [1] https://cs.chromium.org/chromium/src/third_party/WebKit/Source/modules/canvas... [2] https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/imagebitm... BUG=670975 ========== to ========== ShapeDetection: use ImageBitmapSource as input and support ImageData This CL : - s/CanvasImageSource/ImageBitmapSource/ in the idl following https://wicg.github.io/shape-detection-api/#face-detection-api and https://wicg.github.io/shape-detection-api/#barcode-detection-api CanvasImageSource [1] is almost a subset of ImageBitmapSource [2] (the former can be a CSSImageValue, but we don't care much about it for this Spec), so this CL is small in that sense. - Adds support for ImageData as a source for detect()ion, and adds a LayoutTest for it. [1] https://cs.chromium.org/chromium/src/third_party/WebKit/Source/modules/canvas... [2] https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/imagebitm... BUG=670975 Review-Url: https://codereview.chromium.org/2550413005 ==========
Message was sent while issue was closed.
Committed patchset #2 (id:60001)
Message was sent while issue was closed.
Description was changed from ========== ShapeDetection: use ImageBitmapSource as input and support ImageData This CL : - s/CanvasImageSource/ImageBitmapSource/ in the idl following https://wicg.github.io/shape-detection-api/#face-detection-api and https://wicg.github.io/shape-detection-api/#barcode-detection-api CanvasImageSource [1] is almost a subset of ImageBitmapSource [2] (the former can be a CSSImageValue, but we don't care much about it for this Spec), so this CL is small in that sense. - Adds support for ImageData as a source for detect()ion, and adds a LayoutTest for it. [1] https://cs.chromium.org/chromium/src/third_party/WebKit/Source/modules/canvas... [2] https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/imagebitm... BUG=670975 Review-Url: https://codereview.chromium.org/2550413005 ========== to ========== ShapeDetection: use ImageBitmapSource as input and support ImageData This CL : - s/CanvasImageSource/ImageBitmapSource/ in the idl following https://wicg.github.io/shape-detection-api/#face-detection-api and https://wicg.github.io/shape-detection-api/#barcode-detection-api CanvasImageSource [1] is almost a subset of ImageBitmapSource [2] (the former can be a CSSImageValue, but we don't care much about it for this Spec), so this CL is small in that sense. - Adds support for ImageData as a source for detect()ion, and adds a LayoutTest for it. [1] https://cs.chromium.org/chromium/src/third_party/WebKit/Source/modules/canvas... [2] https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/imagebitm... BUG=670975 Committed: https://crrev.com/b935b59277c7f3cdc38d560fb6e305274f4e995c Cr-Commit-Position: refs/heads/master@{#438725} ==========
Message was sent while issue was closed.
Patchset 2 (id:??) landed as https://crrev.com/b935b59277c7f3cdc38d560fb6e305274f4e995c Cr-Commit-Position: refs/heads/master@{#438725} |