Detect wheel zoom via WheelPrefs instead of Ctrl modifier

RESOLVED FIXED in Firefox 38

Status

()

Core
Panning and Zooming
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: dvander, Assigned: dvander)

Tracking

unspecified
mozilla38
x86_64
Windows 7
Points:
---

Firefox Tracking Flags

(firefox38 fixed)

Details

Attachments

(1 attachment)

Comment on attachment 8556892 [details] [diff] [review]
zoom.patch



>index 43fb236..41dd32e 100644
>--- a/dom/events/EventStateManager.h
>+++ b/dom/events/EventStateManager.h
>@@ -219,16 +219,19 @@ public:
> 
>   // Sets the full-screen event state on aElement to aIsFullScreen.
>   static void SetFullScreenState(dom::Element* aElement, bool aIsFullScreen);
> 
>   static bool IsRemoteTarget(nsIContent* aTarget);
>   static LayoutDeviceIntPoint GetChildProcessOffset(nsFrameLoader* aFrameLoader,
>                                                     const WidgetEvent& aEvent);
> 
>+  // Returns true if the given WidgetWheelEvent will resolve to a scroll event.
s/scroll event/scroll action/


>       WidgetWheelEvent& wheelEvent = *aEvent.AsWheelEvent();
>-      if (wheelEvent.IsControl() ||
>-          wheelEvent.deltaMode != nsIDOMWheelEvent::DOM_DELTA_LINE)
>+      if (wheelEvent.deltaMode != nsIDOMWheelEvent::DOM_DELTA_LINE ||
>+          !EventStateManager::WheelEventIsScrollAction(&wheelEvent))

Not about this bug, but it isn't clear to me why we have wheelEvent.deltaMode != nsIDOMWheelEvent::DOM_DELTA_LINE.
Attachment #8556892 - Flags: review?(bugs) → review+
remote:   https://hg.mozilla.org/integration/mozilla-inbound/rev/36f837f3ce68

The DOM_DELTA_LINE is just because APZ doesn't yet support pixel or page scrolling, neither seemed to be very common when invoked from the scroll wheel.
https://hg.mozilla.org/mozilla-central/rev/36f837f3ce68
Status: ASSIGNED → RESOLVED
Last Resolved: 4 years ago
status-firefox38: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla38
You need to log in before you can comment on or make changes to this bug.