mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 05:41:12 +00:00
Bug 1418085 part 2. Stop using nsIDOMHTMLElement in accessibility code. r=surkov
MozReview-Commit-ID: 6YddkxqB5Bv
This commit is contained in:
parent
afe966f041
commit
53e8cfdcf5
@ -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"
|
||||
|
@ -31,7 +31,6 @@
|
||||
|
||||
#include "nsIDOMElement.h"
|
||||
#include "nsIDOMNodeFilter.h"
|
||||
#include "nsIDOMHTMLElement.h"
|
||||
#include "nsIDOMKeyEvent.h"
|
||||
#include "nsIDOMTreeWalker.h"
|
||||
#include "nsIDOMXULButtonElement.h"
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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 : {});
|
||||
};
|
||||
|
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user