Closed Bug 1759504 Opened 3 years ago Closed 2 years ago

Implement text recognition component on macOS.

Categories

(Core :: DOM: Core & HTML, task, P2)

task

Tracking

()

RESOLVED FIXED
103 Branch
Tracking Status
firefox103 --- fixed

People

(Reporter: emilio, Assigned: gregtatum)

References

(Blocks 1 open bug)

Details

Attachments

(7 files)

No description provided.
Severity: -- → N/A
Type: defect → task
Priority: -- → P3
Attachment #9267655 - Attachment description: WIP: Bug 1759504 - Add a nsTextRecognition component → WIP: Bug 1759504 - Implement text recognition component in macOS.
Assignee: nobody → emilio
Status: NEW → ASSIGNED
Depends on: 1696504

Note this is an experiment. It seems like this could all happen from the C++
side of things. The issues is getting the width of the parent img tag, and have
layout happen relative to the img above it.

Depends on D143421

Attachment #9267655 - Attachment description: WIP: Bug 1759504 - Implement text recognition component in macOS. → Bug 1759504 - Implement text recognition component in macOS. r=emilio,nordzilla
Attachment #9271809 - Attachment description: WIP: Bug 1759504 - Fill in the quad points for text recognition → Bug 1759504 - Fill in the quad points for text recognition r=emilio,nordzilla
Attachment #9267656 - Attachment description: WIP: Bug 1759504 - Prototype a menu button click demo for text recognition → Bug 1759504 - Prototype a menu button click demo for text recognition r=emilio,nordzilla
Attachment #9271810 - Attachment description: WIP: Bug 1759504 - Prototype a UAWidget for TextRecognition → Bug 1759504 - Prototype a UAWidget for TextRecognition r=emilio,nordzilla
Attachment #9271811 - Attachment description: WIP: Bug 1759504 - Return the ImageText results from recognizeCurrentImageText → Bug 1759504 - Return the ImageText results from recognizeCurrentImageText r=emilio,nordzilla

Depends on D146829

Attachment #9277329 - Attachment description: Bug 1759504 - Drive by fix of Feature Gate docs r=emilio,nordzilla → Bug 1759504 - Drive by fix of Feature Gate docs r=nordzilla

I have patches up for review, but these are blocked by Bug 1696504 and Bug 1743170. Hopefully that will land soon-ish, otherwise I will work on adding the proper ifdefs to land this code. I would like to get it in to review sooner rather than later.

Assignee: emilio → gtatum
Priority: P3 → P2
Depends on: 1743170
Attachment #9277329 - Attachment description: Bug 1759504 - Drive by fix of Feature Gate docs r=nordzilla → Bug 1759504 - Drive by fix of Feature Gate docs r=emilio,nordzilla
Pushed by gtatum@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/a21b8153ca2a Implement text recognition component in macOS. r=emilio,nordzilla https://hg.mozilla.org/integration/autoland/rev/b5f762f1f22e Prototype a menu button click demo for text recognition r=fluent-reviewers,emilio,nordzilla,flod https://hg.mozilla.org/integration/autoland/rev/a0b089fb747b Fill in the quad points for text recognition r=emilio,nordzilla https://hg.mozilla.org/integration/autoland/rev/dc1be2f0e0b6 Prototype a UAWidget for TextRecognition r=emilio,nordzilla https://hg.mozilla.org/integration/autoland/rev/b9beaecf9708 Return the ImageText results from recognizeCurrentImageText r=emilio,nordzilla https://hg.mozilla.org/integration/autoland/rev/a14a874c57b0 Put the text recognition UI behind an experimental feature r=emilio,nordzilla,fluent-reviewers,preferences-reviewers,flod https://hg.mozilla.org/integration/autoland/rev/d1f1173aecfc Drive by fix of Feature Gate docs r=nordzilla,preferences-reviewers,jaws

:emilio do you have any idea on what's causing this build error on android fuzzing builds? It's the only build that is affecting. I have narrowed it down to this change in my patch stack: https://hg.mozilla.org/try/rev/6e41c66c1f3bf91e1767f87d8244646974eadb31

From: https://treeherder.mozilla.org/jobs?repo=try&group_state=expanded&revision=96167f081ca9d7e82cc6fe91a2cb7c62009607ec

I'm not familiar with the bindings code enough to have a clue what the issue. At the very least I could split this patch out to a separate bug, since the feature still works without it. I could also delete and push to try to find the specific line that's causing the issue.

Flags: needinfo?(gtatum) → needinfo?(emilio)

This is a pre-existing bug in the bindings / bindings configuration. The issue is that nsINodeList.h doesn't include nsIContent.h, and the bindings don't know that nsIContent is a subclass of nsINode. So including nsINode.h and nsINodeList.h is not enough for nsINodeList::IndexerGetter to compile, because the later returns nsIContent*

I can see multiple ways to fix this. The easiest is probably this:

diff --git a/dom/bindings/Bindings.conf b/dom/bindings/Bindings.conf
index 636d9c805976f..85345834a7555 100644
--- a/dom/bindings/Bindings.conf
+++ b/dom/bindings/Bindings.conf
@@ -591,6 +591,7 @@ DOMInterfaces = {
 
 'Node': {
     'nativeType': 'nsINode',
+    'headerFile': 'nsIContent.h',
 },
 
 'NodeIterator': {

There's also the alternative to do something like this does. I think that's probably more straight-forward.

Flags: needinfo?(emilio)
Depends on: 1772562

Re-landing since Bug 1772562 is queued.

Pushed by gtatum@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/b1ac61d8f49c Implement text recognition component in macOS. r=emilio,nordzilla https://hg.mozilla.org/integration/autoland/rev/cc5d236d3496 Prototype a menu button click demo for text recognition r=fluent-reviewers,emilio,nordzilla,flod https://hg.mozilla.org/integration/autoland/rev/c4c054fbb489 Fill in the quad points for text recognition r=emilio,nordzilla https://hg.mozilla.org/integration/autoland/rev/b137841d6fa5 Prototype a UAWidget for TextRecognition r=emilio,nordzilla https://hg.mozilla.org/integration/autoland/rev/cae0a1f8474d Return the ImageText results from recognizeCurrentImageText r=emilio,nordzilla https://hg.mozilla.org/integration/autoland/rev/9a499e40799d Put the text recognition UI behind an experimental feature r=emilio,nordzilla,fluent-reviewers,preferences-reviewers,flod https://hg.mozilla.org/integration/autoland/rev/acf6d2bf1770 Drive by fix of Feature Gate docs r=nordzilla,preferences-reviewers,jaws
Depends on: 1696513
Blocks: 1782574
No longer blocks: 1759199
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: