Closed Bug 1127700 Opened 9 years ago Closed 9 years ago

Detect wheel zoom via WheelPrefs instead of Ctrl modifier

Categories

(Core :: Panning and Zooming, defect)

x86_64
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla38
Tracking Status
firefox38 --- fixed

People

(Reporter: dvander, Assigned: dvander)

References

Details

Attachments

(1 file)

Attached patch zoom.patchSplinter Review
      No description provided.
Attachment #8556892 - Flags: review?(bugs)
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
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla38
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: