diff options
author | Moonchild <moonchild@palemoon.org> | 2021-10-14 23:35:18 +0000 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2022-04-01 15:22:15 +0200 |
commit | 39f9ab375b2bfd9e46df9695b78870cf1e9cf3c6 (patch) | |
tree | 522ad2b33de883f03a53ffa17e4d74202bcf762a /accessible | |
parent | 28a3cd1028612b3b577768519d11fa6fbcda6f09 (diff) | |
download | uxp-39f9ab375b2bfd9e46df9695b78870cf1e9cf3c6.tar.gz |
Issue #1053 - Remove /dom/system/android and dependent modules,
as well as robocop.
Diffstat (limited to 'accessible')
-rw-r--r-- | accessible/jsat/OutputGenerator.jsm | 2 | ||||
-rw-r--r-- | accessible/jsat/PointerAdapter.jsm | 12 | ||||
-rw-r--r-- | accessible/jsat/Presentation.jsm | 48 | ||||
-rw-r--r-- | accessible/jsat/Utils.jsm | 25 |
4 files changed, 19 insertions, 68 deletions
diff --git a/accessible/jsat/OutputGenerator.jsm b/accessible/jsat/OutputGenerator.jsm index 36b43a5695..24a0769103 100644 --- a/accessible/jsat/OutputGenerator.jsm +++ b/accessible/jsat/OutputGenerator.jsm @@ -786,7 +786,7 @@ this.UtteranceGenerator = { // jshint ignore:line // This is because we expose the checked information on the node itself. // XXX: this means the checked state is always appended to the end, // regardless of the utterance ordering preference. - if ((Utils.AndroidSdkVersion < 16 || Utils.MozBuildApp === 'browser') && + if (Utils.MozBuildApp === 'browser' && aState.contains(States.CHECKABLE)) { let checked = aState.contains(States.CHECKED); let statetr; diff --git a/accessible/jsat/PointerAdapter.jsm b/accessible/jsat/PointerAdapter.jsm index 1fb77646bf..1f19974fc8 100644 --- a/accessible/jsat/PointerAdapter.jsm +++ b/accessible/jsat/PointerAdapter.jsm @@ -39,13 +39,6 @@ var PointerRelay = { // jshint ignore:line delete this._eventsOfInterest; switch (Utils.widgetToolkit) { - case 'android': - this._eventsOfInterest = { - 'touchstart' : true, - 'touchmove' : true, - 'touchend' : true }; - break; - default: // Desktop. this._eventsOfInterest = { @@ -110,11 +103,6 @@ var PointerRelay = { // jshint ignore:line target: aEvent.target }]; - if (Utils.widgetToolkit === 'android' && - changedTouches.length === 1 && changedTouches[0].identifier === 1) { - return; - } - if (changedTouches.length === 1 && changedTouches[0].identifier === SYNTH_ID) { return; diff --git a/accessible/jsat/Presentation.jsm b/accessible/jsat/Presentation.jsm index bd1ef96ca5..53e79187ca 100644 --- a/accessible/jsat/Presentation.jsm +++ b/accessible/jsat/Presentation.jsm @@ -257,11 +257,8 @@ AndroidPresenter.prototype.pivotChanged = let androidEvents = []; - let isExploreByTouch = (aReason == Ci.nsIAccessiblePivot.REASON_POINT && - Utils.AndroidSdkVersion >= 14); - let focusEventType = (Utils.AndroidSdkVersion >= 16) ? - this.ANDROID_VIEW_ACCESSIBILITY_FOCUSED : - this.ANDROID_VIEW_FOCUSED; + let isExploreByTouch = (aReason == Ci.nsIAccessiblePivot.REASON_POINT); + let focusEventType = this.ANDROID_VIEW_ACCESSIBILITY_FOCUSED; if (isExploreByTouch) { // This isn't really used by TalkBack so this is a half-hearted attempt @@ -270,25 +267,21 @@ AndroidPresenter.prototype.pivotChanged = } let brailleOutput = {}; - if (Utils.AndroidSdkVersion >= 16) { - if (!this._braillePresenter) { - this._braillePresenter = new BraillePresenter(); - } - brailleOutput = this._braillePresenter.pivotChanged(aContext, aReason). - details; + if (!this._braillePresenter) { + this._braillePresenter = new BraillePresenter(); } + brailleOutput = this._braillePresenter.pivotChanged(aContext, aReason). + details; if (aReason === Ci.nsIAccessiblePivot.REASON_TEXT) { - if (Utils.AndroidSdkVersion >= 16) { - let adjustedText = aContext.textAndAdjustedOffsets; - - androidEvents.push({ - eventType: this.ANDROID_VIEW_TEXT_TRAVERSED_AT_MOVEMENT_GRANULARITY, - text: [adjustedText.text], - fromIndex: adjustedText.startOffset, - toIndex: adjustedText.endOffset - }); - } + let adjustedText = aContext.textAndAdjustedOffsets; + + androidEvents.push({ + eventType: this.ANDROID_VIEW_TEXT_TRAVERSED_AT_MOVEMENT_GRANULARITY, + text: [adjustedText.text], + fromIndex: adjustedText.startOffset, + toIndex: adjustedText.endOffset + }); } else { let state = Utils.getState(aContext.accessible); androidEvents.push({eventType: (isExploreByTouch) ? @@ -371,7 +364,7 @@ AndroidPresenter.prototype.textSelectionChanged = aOldEnd, aIsFromUserInput) { let androidEvents = []; - if (Utils.AndroidSdkVersion >= 14 && !aIsFromUserInput) { + if (!aIsFromUserInput) { if (!this._braillePresenter) { this._braillePresenter = new BraillePresenter(); } @@ -388,7 +381,7 @@ AndroidPresenter.prototype.textSelectionChanged = }); } - if (Utils.AndroidSdkVersion >= 16 && aIsFromUserInput) { + if (aIsFromUserInput) { let [from, to] = aOldStart < aStart ? [aOldStart, aStart] : [aStart, aOldStart]; androidEvents.push({ @@ -407,10 +400,6 @@ AndroidPresenter.prototype.textSelectionChanged = AndroidPresenter.prototype.viewportChanged = function AndroidPresenter_viewportChanged(aWindow, aCurrentContext) { - if (Utils.AndroidSdkVersion < 14) { - return null; - } - let events = [{ eventType: this.ANDROID_VIEW_SCROLLED, text: [], @@ -420,7 +409,7 @@ AndroidPresenter.prototype.viewportChanged = maxScrollY: aWindow.scrollMaxY }]; - if (Utils.AndroidSdkVersion >= 16 && aCurrentContext) { + if (aCurrentContext) { let currentAcc = aCurrentContext.accessibleForBounds; if (Utils.isAliveAndVisible(currentAcc)) { events.push({ @@ -447,8 +436,7 @@ AndroidPresenter.prototype.announce = return { type: this.type, details: [{ - eventType: (Utils.AndroidSdkVersion >= 16) ? - this.ANDROID_ANNOUNCEMENT : this.ANDROID_VIEW_TEXT_CHANGED, + eventType: this.ANDROID_ANNOUNCEMENT, text: [localizedAnnouncement], addedCount: localizedAnnouncement.length, removedCount: 0, diff --git a/accessible/jsat/Utils.jsm b/accessible/jsat/Utils.jsm index 64a4150583..d884ec45d0 100644 --- a/accessible/jsat/Utils.jsm +++ b/accessible/jsat/Utils.jsm @@ -109,35 +109,13 @@ this.Utils = { // jshint ignore:line return this._ScriptName; }, - get AndroidSdkVersion() { - if (!this._AndroidSdkVersion) { - if (Services.appinfo.OS == 'Android') { - this._AndroidSdkVersion = Services.sysinfo.getPropertyAsInt32( - 'version'); - } else { - // Most useful in desktop debugging. - this._AndroidSdkVersion = 16; - } - } - return this._AndroidSdkVersion; - }, - - set AndroidSdkVersion(value) { - // When we want to mimic another version. - this._AndroidSdkVersion = value; - }, - get BrowserApp() { if (!this.win) { return null; } switch (this.MozBuildApp) { - case 'mobile/android': - return this.win.BrowserApp; case 'browser': return this.win.gBrowser; - case 'b2g': - return this.win.shell; default: return null; } @@ -147,9 +125,6 @@ this.Utils = { // jshint ignore:line if (!this.BrowserApp) { return null; } - if (this.MozBuildApp == 'b2g') { - return this.BrowserApp.contentBrowser; - } return this.BrowserApp.selectedBrowser; }, |