Commit Graph
23 Commits
Author SHA1 Message Date
Andrew McCreight 7715fa05b3 Bug 1859680 - Reject RecvFindImageText() messages on unsupported platforms. r=gregtatum
Also, avoid calling SendFindImageText() on unsupported platforms, so that
test_image_recognition_unsupported.html will pass.

Differential Revision: https://phabricator.services.mozilla.com/D191678
2023-10-24 19:04:55 +00:00
Chris Peterson 97827e82ee Bug 1847154 - cocoa: remove some unnecessary OnMojaveOrLater() and OnCatalinaOrLater() version checks. r=mac-reviewers,bradwerth
Firefox versions >= 116 only support macOS >= 10.15. Mojave is macOS 10.14. Catalina is macOS 10.15.

Also stop including unused "nsCocoaFeatures.h" in files with no macOS version checks.

Differential Revision: https://phabricator.services.mozilla.com/D185505
2023-08-10 15:27:05 +00:00
Nika Layzell 3720f45f4e Bug 1781129 - Part 2: Use BigBuffer for ShmemImage, r=edgar
The ShmemImage type was previously implemented using a Shmem, however due to
the usage patterns, `BigBuffer` is probably a better fit, and allows unifying
more code in nsContentUtils.

Differential Revision: https://phabricator.services.mozilla.com/D151853
2022-08-26 16:08:05 +00:00
Marian-Vasile Laza 699c73da04 Backed out 4 changesets (bug 1781129) for causing mochitest failures on test_bug490879.html. CLOSED TREE
Backed out changeset 37da1d18cde9 (bug 1781129)
Backed out changeset 1ae213bfa43e (bug 1781129)
Backed out changeset dcebc98ea1f1 (bug 1781129)
Backed out changeset 0df2f2832755 (bug 1781129)
2022-08-22 23:07:56 +03:00
Nika Layzell b79f86a646 Bug 1781129 - Part 2: Use BigBuffer for ShmemImage, r=edgar
The ShmemImage type was previously implemented using a Shmem, however due to
the usage patterns, `BigBuffer` is probably a better fit, and allows unifying
more code in nsContentUtils.

Differential Revision: https://phabricator.services.mozilla.com/D151853
2022-08-22 15:38:15 +00:00
Greg Tatum 00e9172bc5 Bug 1782981 - Only show the macOS context menu if it is supported; r=nordzilla
This code path gets executed by existing tests, and I don't believe
there is a way to execute this behavior using our CI, since it's a macOS
version check.

Differential Revision: https://phabricator.services.mozilla.com/D154172
2022-08-17 15:41:12 +00:00
Greg Tatum 22f0abe36f Bug 1782579 - Pass languages to the text recognition api; r=nordzilla,emilio
Differential Revision: https://phabricator.services.mozilla.com/D153668
2022-08-10 19:38:46 +00:00
Norisz Fay 6af1c13f43 Backed out 6 changesets (bug 1782578, bug 1782579) for causing mochitest failures on browser_parsable_css.js CLOSED TREE
Backed out changeset bdb42cfe6213 (bug 1782579)
Backed out changeset 5f17ee4cc4df (bug 1782578)
Backed out changeset 4f969d46dd37 (bug 1782578)
Backed out changeset b4c51d1ffa99 (bug 1782578)
Backed out changeset 98d0d6bcd37b (bug 1782578)
Backed out changeset 8332d678079e (bug 1782578)
2022-08-10 20:19:31 +03:00
Greg Tatum 80242bd138 Bug 1782579 - Pass languages to the text recognition api; r=nordzilla,emilio
Differential Revision: https://phabricator.services.mozilla.com/D153668
2022-08-10 16:08:46 +00:00
Marian-Vasile Laza 7002988694 Backed out 4 changesets (bug 1781129) for causing bustages on nsContentUtils.cpp. CLOSED TREE
Backed out changeset 8557305bcd46 (bug 1781129)
Backed out changeset df6f98df9559 (bug 1781129)
Backed out changeset 905393f66985 (bug 1781129)
Backed out changeset 0d0f19a4db70 (bug 1781129)
2022-08-02 23:29:56 +03:00
Nika Layzell b788910211 Bug 1781129 - Part 2: Use BigBuffer for ShmemImage, r=edgar
The ShmemImage type was previously implemented using a Shmem, however due to
the usage patterns, `BigBuffer` is probably a better fit, and allows unifying
more code in nsContentUtils.

Differential Revision: https://phabricator.services.mozilla.com/D151853
2022-08-02 18:09:40 +00:00
Marian-Vasile Laza 9719ac97bc Backed out 4 changesets (bug 1781129) for causing bustages on nsContentUtils.cpp. CLOSED TREE
Backed out changeset 4a92d58726aa (bug 1781129)
Backed out changeset bce3f99441c0 (bug 1781129)
Backed out changeset fc135243503e (bug 1781129)
Backed out changeset 726458f976ff (bug 1781129)
2022-08-02 20:32:01 +03:00
Nika Layzell 3869a08065 Bug 1781129 - Part 2: Use BigBuffer for ShmemImage, r=edgar
The ShmemImage type was previously implemented using a Shmem, however due to
the usage patterns, `BigBuffer` is probably a better fit, and allows unifying
more code in nsContentUtils.

Differential Revision: https://phabricator.services.mozilla.com/D151853
2022-08-02 17:15:41 +00:00
Greg Tatum c1d960c351 Bug 1759504 - Fill in the quad points for text recognition r=emilio,nordzilla
Differential Revision: https://phabricator.services.mozilla.com/D143421
2022-06-03 16:01:32 +00:00
Emilio Cobos ÁlvarezandGreg Tatum 23ab9c48a3 Bug 1759504 - Implement text recognition component in macOS. r=emilio,nordzilla
Co-Authored-By: Emilio Cobos Álvarez <[email protected]>
Co-Authored-By: Greg Tatum <[email protected]>

Differential Revision: https://phabricator.services.mozilla.com/D140874
2022-06-03 16:01:32 +00:00
criss 154874275b Backed out 7 changesets (bug 1759504) for causing Android build bustages on NodeListBinding.cpp
Backed out changeset d1f1173aecfc (bug 1759504)
Backed out changeset a14a874c57b0 (bug 1759504)
Backed out changeset b9beaecf9708 (bug 1759504)
Backed out changeset dc1be2f0e0b6 (bug 1759504)
Backed out changeset a0b089fb747b (bug 1759504)
Backed out changeset b5f762f1f22e (bug 1759504)
Backed out changeset a21b8153ca2a (bug 1759504)
2022-06-02 19:52:05 +03:00
Greg Tatum d64c7889d3 Bug 1759504 - Fill in the quad points for text recognition r=emilio,nordzilla
Differential Revision: https://phabricator.services.mozilla.com/D143421
2022-06-02 14:31:42 +00:00
Emilio Cobos ÁlvarezandGreg Tatum 3be1ce8eed Bug 1759504 - Implement text recognition component in macOS. r=emilio,nordzilla
Co-Authored-By: Emilio Cobos Álvarez <[email protected]>
Co-Authored-By: Greg Tatum <[email protected]>

Differential Revision: https://phabricator.services.mozilla.com/D140874
2022-06-02 14:31:41 +00:00
Emilio Cobos Álvarez 89489d5c61 Bug 1759204 - Add an HTMLImageElement.recognizeCurrentImageText ChromeOnly API to test text recognition and create the shadow root. r=aosmond
We could expose the text recognition values to JS if need be, but
there's no reason to do that for now. We expose them via the UA
widget DOM for now.

We can trivially do that if we want to build the Shadow DOM in JS
or what not. I decided to still return a promise so that we can
expose errors though.

Differential Revision: https://phabricator.services.mozilla.com/D141113
2022-03-15 18:14:08 +00:00
Emilio Cobos Álvarez c712f41cdf Bug 1759204 - Make text recognition interface be just C++, and deal with images and processes. r=aosmond
This is all still unused, but we'll add an JS API to HTMLImageElement
for testing in a bit.

The reason for not having the JS-exposed interface is that dealing with
all the relevant edge cases is pretty hard from JS (think of e.g., the
image source changing mid-recognition, and so on).

The frontend will probably want an "is image recognition available"
boolean, but that doesn't need to be on its own XPCOM component, IMO.

If we need a JS API for unit-testing or something we can always add it
later.

Depends on D141111

Differential Revision: https://phabricator.services.mozilla.com/D141112
2022-03-15 18:14:08 +00:00
Emilio Cobos ÁlvarezandGreg Tatum 26e13b5217 Bug 1759201 - Add a text recognition component. r=dminor,gregtatum
This adds just the boilerplate, and doesn't implement the OS-specific
bits. It's still useful tho.

Co-Authored-By: Greg Tatum <[email protected]>

Differential Revision: https://phabricator.services.mozilla.com/D140975
2022-03-15 00:35:05 +00:00
Csoregi Natalia c6dd771ed8 Backed out changeset a9c9bf312a6f (bug 1759201) for causing xpcshell failures on test_ext_contexts_gc.js CLOSED TREE 2022-03-15 02:15:47 +02:00
Emilio Cobos ÁlvarezandGreg Tatum ac2134eef0 Bug 1759201 - Add a text recognition component. r=dminor,gregtatum
This adds just the boilerplate, and doesn't implement the OS-specific
bits. It's still useful tho.

Co-Authored-By: Greg Tatum <[email protected]>

Differential Revision: https://phabricator.services.mozilla.com/D140975
2022-03-14 21:37:09 +00:00