/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "PositionedEventTargeting.h" #include "mozilla/Preferences.h" #include "nsGUIEvent.h" #include "nsLayoutUtils.h" #include "nsGkAtoms.h" #include "nsEventListenerManager.h" #include "nsPrintfCString.h" #include "mozilla/dom/Element.h" #include "nsRegion.h" #include namespace mozilla { /* * The basic goal of FindFrameTargetedByInputEvent() is to find a good * target element that can respond to mouse events. Both mouse events and touch * events are targeted at this element. Note that even for touch events, we * check responsiveness to mouse events. We assume Web authors * designing for touch events will take their own steps to account for * inaccurate touch events. * * IsElementClickable() encapsulates the heuristic that determines whether an * element is expected to respond to mouse events. An element is deemed * "clickable" if it has registered listeners for "click", "mousedown" or * "mouseup", or is on a whitelist of element tags (,