Bug 1418085 part 2. Stop using nsIDOMHTMLElement in accessibility code. r=surkov

MozReview-Commit-ID: 6YddkxqB5Bv
This commit is contained in:
Boris Zbarsky 2018-01-30 00:25:36 -05:00
parent afe966f041
commit 53e8cfdcf5
5 changed files with 2 additions and 14 deletions

View File

@ -10,7 +10,6 @@
#include "nsIBaseWindow.h"
#include "nsIDocShellTreeOwner.h"
#include "nsIDocument.h"
#include "nsIDOMHTMLElement.h"
#include "nsRange.h"
#include "nsIBoxObject.h"
#include "nsXULElement.h"

View File

@ -31,7 +31,6 @@
#include "nsIDOMElement.h"
#include "nsIDOMNodeFilter.h"
#include "nsIDOMHTMLElement.h"
#include "nsIDOMKeyEvent.h"
#include "nsIDOMTreeWalker.h"
#include "nsIDOMXULButtonElement.h"

View File

@ -47,7 +47,6 @@ const nsIObserverService = Components.interfaces.nsIObserverService;
const nsIDOMDocument = Components.interfaces.nsIDOMDocument;
const nsIDOMEvent = Components.interfaces.nsIDOMEvent;
const nsIDOMNode = Components.interfaces.nsIDOMNode;
const nsIDOMHTMLElement = Components.interfaces.nsIDOMHTMLElement;
const nsIDOMWindow = Components.interfaces.nsIDOMWindow;
const nsIDOMXULElement = Components.interfaces.nsIDOMXULElement;

View File

@ -1059,19 +1059,11 @@ function synthClick(aNodeOrID, aCheckerOrEventSeq, aArgs) {
}
// Scroll the node into view, otherwise synth click may fail.
if (targetNode instanceof nsIDOMHTMLElement) {
targetNode.scrollIntoView(true);
} else if (targetNode instanceof nsIDOMXULElement) {
var targetAcc = getAccessible(targetNode);
targetAcc.scrollTo(SCROLL_TYPE_ANYWHERE);
}
targetNode.scrollIntoView(true);
var x = 1, y = 1;
if (aArgs && ("where" in aArgs) && aArgs.where == "right") {
if (targetNode instanceof nsIDOMHTMLElement)
x = targetNode.offsetWidth - 1;
else if (targetNode instanceof nsIDOMXULElement)
x = targetNode.boxObject.width - 1;
x = targetNode.getBoundingClientRect().width - 1;
}
synthesizeMouse(targetNode, x, y, aArgs ? aArgs : {});
};

View File

@ -12,7 +12,6 @@
#include "nsAttrName.h"
#include "nsCoreUtils.h"
#include "nsIAccessibleTypes.h"
#include "nsIDOMHTMLElement.h"
#include "nsICSSDeclaration.h"
#include "nsNameSpaceManager.h"
#include "nsServiceManagerUtils.h"