Closed Bug 779572 Opened 7 years ago Closed 7 years ago

Zooming is not taken into account for min pan distance

Categories

(Core :: Graphics: Layers, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla17

People

(Reporter: drs, Assigned: drs)

Details

Attachments

(2 files, 3 obsolete files)

No description provided.
When we're zoomed out really far, we have to move our finger across almost the entire screen just to start moving it. This fixes that.
Assignee: nobody → bugzilla
Attachment #648022 - Flags: review?(jones.chris.g)
Comment on attachment 648022 [details] [diff] [review]
Factor zoom into min pan distance before moving the viewport

>diff --git a/gfx/layers/ipc/AsyncPanZoomController.cpp b/gfx/layers/ipc/AsyncPanZoomController.cpp

>+      MonitorAutoLock monitor(mMonitor);
>+      if (PanDistance() / mFrameMetrics.mResolution.width < panThreshold) {
>         return nsEventStatus_eIgnore;
>       }
>+

Let's keep the locking scoped to this computation so that we don't
hold it in StartPanning().

And hm, do we need to be locking in StartPanning()?
Attachment #648022 - Flags: review?(jones.chris.g)
Attachment #648022 - Attachment is obsolete: true
Attachment #648947 - Flags: review?(jones.chris.g)
herp derp
Attachment #648947 - Attachment is obsolete: true
Attachment #648947 - Flags: review?(jones.chris.g)
Attachment #648971 - Flags: review?(jones.chris.g)
Comment on attachment 648971 [details] [diff] [review]
Factor zoom into min pan distance before moving the viewport

Document that StartPanning() needs the state mutex and assert that it's held in the function.
Attachment #648971 - Flags: review?(jones.chris.g)
Ok, so it turns out that StartPanning should not be protected except for its change to |mState|, which was not being properly protected anywhere else. I have removed the monitor holding from that and will be re-adding it back in a followup patch which will protect all changes to |mState| properly.
Attachment #648971 - Attachment is obsolete: true
Attachment #649792 - Flags: review?(jones.chris.g)
Attachment #649792 - Flags: review?(jones.chris.g) → review+
Attachment #649794 - Flags: review?(jones.chris.g) → review+
Backed out in https://hg.mozilla.org/integration/mozilla-inbound/rev/d8878c0bd67c - something in that push made Linux oddly unhappy.
https://hg.mozilla.org/mozilla-central/rev/7f25c1478701
https://hg.mozilla.org/mozilla-central/rev/b468eccf7261
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla17
You need to log in before you can comment on or make changes to this bug.