Bug 932792 - Don't apply APZC untransforms to mouse input on scrollbars. r=mbrubeck

This commit is contained in:
Kartikaya Gupta 2013-11-15 21:47:01 -05:00
parent 6eabf00b87
commit 14605808e6

View File

@ -162,8 +162,17 @@ var TouchModule = {
this._handleKeyDown(aEvent);
break;
case "MozMouseHittest":
// Used by widget to hit test chrome vs content
if (aEvent.target.ownerDocument == document) {
// Used by widget to hit test chrome vs content. Make sure the XUl scrollbars
// are counted as "chrome". Since the XUL scrollbars have sub-elements we walk
// the parent chain to ensure we catch all of those as well.
let onScrollbar = false;
for (let node = aEvent.originalTarget; node instanceof XULElement; node = node.parentNode) {
if (node.tagName == 'scrollbar') {
onScrollbar = true;
break;
}
}
if (onScrollbar || aEvent.target.ownerDocument == document) {
aEvent.preventDefault();
}
aEvent.stopPropagation();