Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(29)

Issue 2360783003: shapedetection module: Introduce basic structure for face detection (Closed)

Created:
4 years, 2 months ago by xianglu
Modified:
4 years, 2 months ago
Reviewers:
haraken, esprehn, mcasas
CC:
blink-reviews, chromium-reviews, haraken
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

shapedetection module: Introduce basic structure for face detection This CL introduces the basic structure of Shape Detection API, including four classes: Detector, FaceDetector, DetectedObject, DetectedFace (dictionaries are not yet implemented) and adds simple layout tests in shapedetection-creation.html to verify corresponding constructors. R=mcasas@chromium.org BUG=646083 Committed: https://crrev.com/7ff48d8465a02e51ec7d76e789758006b96ff9b1 Cr-Commit-Position: refs/heads/master@{#421290}

Patch Set 1 #

Total comments: 16

Patch Set 2 : mcasas@ comments #

Total comments: 14

Patch Set 3 : haraken@ comments #

Total comments: 7
Unified diffs Side-by-side diffs Delta from patch set Stats (+296 lines, -0 lines) Patch
A third_party/WebKit/LayoutTests/fast/shapedetection/shapedetection-creation.html View 1 1 chunk +34 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt View 1 1 chunk +6 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/webexposed/global-interface-listing-dedicated-worker-expected.txt View 1 1 chunk +8 lines, -0 lines 1 comment Download
M third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt View 1 2 2 chunks +16 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/webexposed/global-interface-listing-shared-worker-expected.txt View 1 1 chunk +8 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/BUILD.gn View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/modules_idl_files.gni View 1 1 chunk +4 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/modules/shapedetection/BUILD.gn View 1 chunk +16 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/modules/shapedetection/DEPS View 1 chunk +5 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/modules/shapedetection/DetectedFace.h View 1 2 1 chunk +23 lines, -0 lines 1 comment Download
A third_party/WebKit/Source/modules/shapedetection/DetectedFace.cpp View 1 chunk +14 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/modules/shapedetection/DetectedFace.idl View 1 1 chunk +13 lines, -0 lines 1 comment Download
A third_party/WebKit/Source/modules/shapedetection/DetectedObject.h View 1 2 1 chunk +29 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/modules/shapedetection/DetectedObject.idl View 1 chunk +13 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/modules/shapedetection/Detector.h View 1 2 1 chunk +30 lines, -0 lines 1 comment Download
A third_party/WebKit/Source/modules/shapedetection/Detector.idl View 1 1 chunk +12 lines, -0 lines 1 comment Download
A third_party/WebKit/Source/modules/shapedetection/FaceDetector.h View 1 2 1 chunk +25 lines, -0 lines 1 comment Download
A third_party/WebKit/Source/modules/shapedetection/FaceDetector.cpp View 1 2 1 chunk +25 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/modules/shapedetection/FaceDetector.idl View 1 1 chunk +13 lines, -0 lines 1 comment Download
M third_party/WebKit/Source/platform/RuntimeEnabledFeatures.in View 1 2 1 chunk +1 line, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 40 (27 generated)
xianglu
4 years, 2 months ago (2016-09-21 23:02:47 UTC) #1
xianglu
ptal.
4 years, 2 months ago (2016-09-21 23:10:22 UTC) #2
mcasas
Looking good, couple of comments. Correct description typos (e.g. "includeing", "shapdetection", "varify"). Also, bots. https://codereview.chromium.org/2360783003/diff/1/third_party/WebKit/LayoutTests/fast/shapedetection/shapedetection-creation.html ...
4 years, 2 months ago (2016-09-21 23:25:49 UTC) #3
xianglu
https://codereview.chromium.org/2360783003/diff/1/third_party/WebKit/LayoutTests/fast/shapedetection/shapedetection-creation.html File third_party/WebKit/LayoutTests/fast/shapedetection/shapedetection-creation.html (right): https://codereview.chromium.org/2360783003/diff/1/third_party/WebKit/LayoutTests/fast/shapedetection/shapedetection-creation.html#newcode10 third_party/WebKit/LayoutTests/fast/shapedetection/shapedetection-creation.html:10: }catch(e){ On 2016/09/21 23:25:48, mcasas wrote: > There seems ...
4 years, 2 months ago (2016-09-22 22:48:41 UTC) #7
xianglu
ptal. Thanks!
4 years, 2 months ago (2016-09-22 22:49:28 UTC) #9
xianglu
esprehn@ ptal
4 years, 2 months ago (2016-09-26 19:41:00 UTC) #24
haraken
LGTM https://codereview.chromium.org/2360783003/diff/80001/third_party/WebKit/Source/modules/shapedetection/DetectedObject.h File third_party/WebKit/Source/modules/shapedetection/DetectedObject.h (right): https://codereview.chromium.org/2360783003/diff/80001/third_party/WebKit/Source/modules/shapedetection/DetectedObject.h#newcode8 third_party/WebKit/Source/modules/shapedetection/DetectedObject.h:8: #include "bindings/core/v8/ScriptPromise.h" Remove this. https://codereview.chromium.org/2360783003/diff/80001/third_party/WebKit/Source/modules/shapedetection/DetectedObject.h#newcode15 third_party/WebKit/Source/modules/shapedetection/DetectedObject.h:15: class DOMRect; ...
4 years, 2 months ago (2016-09-27 14:46:28 UTC) #25
xianglu
https://codereview.chromium.org/2360783003/diff/80001/third_party/WebKit/Source/modules/shapedetection/DetectedObject.h File third_party/WebKit/Source/modules/shapedetection/DetectedObject.h (right): https://codereview.chromium.org/2360783003/diff/80001/third_party/WebKit/Source/modules/shapedetection/DetectedObject.h#newcode8 third_party/WebKit/Source/modules/shapedetection/DetectedObject.h:8: #include "bindings/core/v8/ScriptPromise.h" On 2016/09/27 14:46:27, haraken wrote: > > ...
4 years, 2 months ago (2016-09-27 16:46:25 UTC) #29
mcasas
lgtm with a nit. https://codereview.chromium.org/2360783003/diff/120001/third_party/WebKit/Source/modules/shapedetection/Detector.h File third_party/WebKit/Source/modules/shapedetection/Detector.h (right): https://codereview.chromium.org/2360783003/diff/120001/third_party/WebKit/Source/modules/shapedetection/Detector.h#newcode8 third_party/WebKit/Source/modules/shapedetection/Detector.h:8: #include "bindings/core/v8/ScriptPromise.h" nit: probably not ...
4 years, 2 months ago (2016-09-27 17:58:51 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2360783003/120001
4 years, 2 months ago (2016-09-27 18:03:38 UTC) #35
commit-bot: I haz the power
Committed patchset #3 (id:120001)
4 years, 2 months ago (2016-09-27 19:11:11 UTC) #37
commit-bot: I haz the power
Patchset 3 (id:??) landed as https://crrev.com/7ff48d8465a02e51ec7d76e789758006b96ff9b1 Cr-Commit-Position: refs/heads/master@{#421290}
4 years, 2 months ago (2016-09-27 19:15:00 UTC) #39
esprehn
4 years, 2 months ago (2016-09-28 04:19:15 UTC) #40
Message was sent while issue was closed.
I think there's some confusion in the API surface here. The Dector mixin doesn't
make sense from an idl perspective, and it also seems too complex for a v1 API.
I think you want to reduce this API surface a lot to ship a v1.

https://codereview.chromium.org/2360783003/diff/120001/third_party/WebKit/Lay...
File
third_party/WebKit/LayoutTests/webexposed/global-interface-listing-dedicated-worker-expected.txt
(right):

https://codereview.chromium.org/2360783003/diff/120001/third_party/WebKit/Lay...
third_party/WebKit/LayoutTests/webexposed/global-interface-listing-dedicated-worker-expected.txt:149:
[Worker] interface Detector
This name is too generic, I don't think we want Detector and DetectedOBject on
window. You're going to need to rename these to ShapeDetector and
ShapeDectorObject or something.

https://codereview.chromium.org/2360783003/diff/120001/third_party/WebKit/Sou...
File third_party/WebKit/Source/modules/shapedetection/DetectedFace.h (right):

https://codereview.chromium.org/2360783003/diff/120001/third_party/WebKit/Sou...
third_party/WebKit/Source/modules/shapedetection/DetectedFace.h:14: class
MODULES_EXPORT DetectedFace final : public DetectedObject {
Hmm, this object has no members, why do we need it?

https://codereview.chromium.org/2360783003/diff/120001/third_party/WebKit/Sou...
File third_party/WebKit/Source/modules/shapedetection/DetectedFace.idl (right):

https://codereview.chromium.org/2360783003/diff/120001/third_party/WebKit/Sou...
third_party/WebKit/Source/modules/shapedetection/DetectedFace.idl:13:
DetectedFace implements DetectedObject;
What's the reason for the generic DetectedObject API?

https://codereview.chromium.org/2360783003/diff/120001/third_party/WebKit/Sou...
File third_party/WebKit/Source/modules/shapedetection/Detector.idl (right):

https://codereview.chromium.org/2360783003/diff/120001/third_party/WebKit/Sou...
third_party/WebKit/Source/modules/shapedetection/Detector.idl:10: ] interface
Detector {
I don't think you want this generic interface and the subclassing, you want to
just have FaceDetector.

https://codereview.chromium.org/2360783003/diff/120001/third_party/WebKit/Sou...
File third_party/WebKit/Source/modules/shapedetection/FaceDetector.h (right):

https://codereview.chromium.org/2360783003/diff/120001/third_party/WebKit/Sou...
third_party/WebKit/Source/modules/shapedetection/FaceDetector.h:20:
ScriptPromise detect(ScriptState*, const HTMLImageElement*);
fwiw, this isn't really how the web works. You're trying to do virtual functions
here with that inheritance scheme.

https://codereview.chromium.org/2360783003/diff/120001/third_party/WebKit/Sou...
File third_party/WebKit/Source/modules/shapedetection/FaceDetector.idl (right):

https://codereview.chromium.org/2360783003/diff/120001/third_party/WebKit/Sou...
third_party/WebKit/Source/modules/shapedetection/FaceDetector.idl:13:
FaceDetector implements Detector;
You're both doing mixins here and adding global interfaces which I think is a
mistake. Did you want [NoInterfaceObject] on the Detector? Also why do we need
both to start? I feel like this API is a bit too complicated for v1

Powered by Google App Engine
This is Rietveld 408576698