Adds the ability for the SelectTranslationsPanel to send
to telemetry whether the source text came from an active
selection or from a right-clicked hyperlink's text.
Differential Revision: https://phabricator.services.mozilla.com/D214161
`eContextMenu` event may be fired from `widget`. Therefore, different from
`ePointerClick` and `ePointerAuxClick`, they may cross the process boundary,
may be handled by APZ and may be dispatched into the DOM after a delay.
Therefore, this patch is complicated than the previous patch. This adds
* New IPC message handlers for sending/receiving a `WidgetPointerEvent`
* New `DelayedPointerEvent` class and templated `MouseInput::ToWidgetEvent`
* `PresShell::EventHandler` handles `eContextMenu` as same as `WidgetMouseEvent`
Differential Revision: https://phabricator.services.mozilla.com/D213003
This patch ensures that the Translate Link Text
option is not offered in the context menu when
right clicking hyperlinked text that would result
in only a URL being translated.
Differential Revision: https://phabricator.services.mozilla.com/D212980
This patch ensures that the Translate Link Text
option is not offered in the context menu when
right clicking hyperlinked text that would result
in only a URL being translated.
Differential Revision: https://phabricator.services.mozilla.com/D212980
Renames the returned values from langPairPromise to be
`{ fromLanguage, toLanguage }` rather than `{ fromLang, toLang }`
to be more consistent with the rest of the code.
Depends on D210826
Differential Revision: https://phabricator.services.mozilla.com/D208583
Ensures that hardware support for Translations is checked
before displaying the context menu item to translate
selected text.
Differential Revision: https://phabricator.services.mozilla.com/D208396
Fixes an issue where an exception was not being
caught correctly if the Translations Engine failed
to be created for SelectTranslations.
Differential Revision: https://phabricator.services.mozilla.com/D207939
Opens the SelectTranslationsPanel at the location of the context menu
from which the open event was invoked, rather than opening at the
Application Menu always.
Differential Revision: https://phabricator.services.mozilla.com/D205731
Implements the logic to determine which from-language
and which to-language should be automatically selected
when the SelectTranslationsPanel is opened, based on the
context in which it was opened.
Depends on D201282
Differential Revision: https://phabricator.services.mozilla.com/D201283
Ensures that the Select Translations context menu item
will not appear while Full Page Translations is active,
even in situations where it would otherwise be expected
to appear. Select Translations is not available on top
of Full Page Translations.
Depends on D197226
Differential Revision: https://phabricator.services.mozilla.com/D197227
Adds the functionality for the Select Translations
context menu item to appear when a hyperlink is clicked
even if no text is selected. Selected text takes precedence
if a link is clicked while there is also an active selection.
Depends on D197225
Differential Revision: https://phabricator.services.mozilla.com/D197226
Ensures that the Select Translations context menu
item only appears when there is actively selected text
at the time the context menu is invoked.
Depends on D197224
Differential Revision: https://phabricator.services.mozilla.com/D197225
Adds the Select Translations context menu item
to the right-click context menu with an initial
localized label value.
Depends on D197223
Differential Revision: https://phabricator.services.mozilla.com/D197224
Renames the data member textSelected to selectedText.
I think textSelected sounds more like a boolean, rather
than a string, and I think selectedText is a better name.
Depends on D197222
Differential Revision: https://phabricator.services.mozilla.com/D197223
This allows us to deprecate `mozInputSource` for the Web while
avoiding console warnings for internal uses, which now use the
ChromeOnly `inputSource` attribute.
Differential Revision: https://phabricator.services.mozilla.com/D183643