summaryrefslogtreecommitdiffstats
path: root/gfx/layers/apz/src/APZCTreeManager.cpp
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2020-05-15 11:04:41 +0000
committerMoonchild <moonchild@palemoon.org>2020-05-20 13:55:50 +0000
commit3e82ac05b113eee4a08510600dd02c7c695f0b88 (patch)
tree59e64d3a3f595ef284818bbf7c708260e929f799 /gfx/layers/apz/src/APZCTreeManager.cpp
parent3ab7bd811f8f901806e51c046b6f032c260dc64a (diff)
downloadUXP-3e82ac05b113eee4a08510600dd02c7c695f0b88.tar
UXP-3e82ac05b113eee4a08510600dd02c7c695f0b88.tar.gz
UXP-3e82ac05b113eee4a08510600dd02c7c695f0b88.tar.lz
UXP-3e82ac05b113eee4a08510600dd02c7c695f0b88.tar.xz
UXP-3e82ac05b113eee4a08510600dd02c7c695f0b88.zip
Issue #80- De-unify gfx/layers
Excludes layers/ipc/CompositorBridgeParent and CrossProcessCompositorBridgeParent because the latter purposely uses functions implemented in the former. See also code comment in CrossProcessCompositorBridgeParent.cpp Note: likely dead code for us anyway; likely not worth investing in to solve.
Diffstat (limited to 'gfx/layers/apz/src/APZCTreeManager.cpp')
-rw-r--r--gfx/layers/apz/src/APZCTreeManager.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/gfx/layers/apz/src/APZCTreeManager.cpp b/gfx/layers/apz/src/APZCTreeManager.cpp
index f54326360..00eb3f183 100644
--- a/gfx/layers/apz/src/APZCTreeManager.cpp
+++ b/gfx/layers/apz/src/APZCTreeManager.cpp
@@ -85,6 +85,21 @@ struct APZCTreeManager::TreeBuildingState {
std::map<ScrollableLayerGuid, AsyncPanZoomController*> mApzcMap;
};
+// Returns whether or not a wheel event action will be (or was) performed by
+// APZ. If this returns true, the event must not perform a synchronous
+// scroll.
+//
+// Even if this returns false, all wheel events in APZ-aware widgets must
+// be sent through APZ so they are transformed correctly for TabParent.
+static bool
+WillHandleWheelEvent(WidgetWheelEvent* aEvent)
+{
+ return EventStateManager::WheelEventIsScrollAction(aEvent) &&
+ (aEvent->mDeltaMode == nsIDOMWheelEvent::DOM_DELTA_LINE ||
+ aEvent->mDeltaMode == nsIDOMWheelEvent::DOM_DELTA_PIXEL ||
+ aEvent->mDeltaMode == nsIDOMWheelEvent::DOM_DELTA_PAGE);
+}
+
class APZCTreeManager::CheckerboardFlushObserver : public nsIObserver {
public:
NS_DECL_ISUPPORTS