Closed Bug 915985 Opened 11 years ago Closed 10 years ago

Add a ZoomConstraints class to hold the allowzoom and min/max zoom values

Categories

(Core :: Panning and Zooming, defect)

All
Gonk (Firefox OS)
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla29
blocking-b2g 1.3+
Tracking Status
firefox27 --- wontfix
firefox28 --- fixed
firefox29 --- fixed
b2g-v1.2 --- wontfix
b2g-v1.3 --- fixed
b2g-v1.4 --- fixed

People

(Reporter: kats, Assigned: kats)

References

Details

Attachments

(2 files, 1 obsolete file)

The arguments to AsyncPanZoomController::UpdateZoomConstraints are passed around together in a bunch of places, originating somewhere in TabChild, going through TabParent, RenderFrameParent, APZCTreeManager, and GeckoContentController. It would be nice to define a struct to hold these three values, as botond noted at https://bugzilla.mozilla.org/show_bug.cgi?id=909881#c1.
Component: Graphics: Layers → Panning and Zooming
This will simplify the B2G half of bug 941995.
Assignee: nobody → bugmail.mozilla
Status: NEW → ASSIGNED
Attached patch Patch (obsolete) — Splinter Review
Pretty straightforward mechanical change. Try push to make sure I didn't run afoul of some arcane compiler:

https://tbpl.mozilla.org/?tree=Try&rev=5cb774c860b1
Comment on attachment 8355673 [details] [diff] [review]
Patch

Review of attachment 8355673 [details] [diff] [review]:
-----------------------------------------------------------------

::: gfx/layers/ipc/AsyncPanZoomController.cpp
@@ +1696,4 @@
>  }
>  
> +ZoomConstraints
> +AsyncPanZoomController::GetZoomConstraints()

This method can be const. (Could have been before, too.)

::: gfx/layers/ipc/GeckoContentController.h
@@ +75,5 @@
>     * Retrieves the last known zoom constraints for the root scrollable layer
>     * for this layers tree. This function should return false if there are no
>     * last known zoom constraints.
>     */
> +  virtual bool GetRootZoomConstraints(ZoomConstraints* aConstraints)

Let's call this aOutConstraints for consistency.

::: layout/ipc/RenderFrameParent.cpp
@@ +617,3 @@
>    }
>  
> +  virtual bool GetRootZoomConstraints(ZoomConstraints* aConstraints)

Likewise.
Attached patch PatchSplinter Review
Made the changes above and got a green try: https://tbpl.mozilla.org/?tree=Try&rev=0a0f729e03f9

I also added a check to make sure aOutConstraints is non-null before writing to it for consistency.
Attachment #8355673 - Attachment is obsolete: true
Attachment #8355871 - Flags: review?(botond)
Attachment #8355871 - Flags: review?(botond) → review+
https://hg.mozilla.org/mozilla-central/rev/8812993d675b
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla29
Kats, is the patch on this bug appropriate as-is for Aurora/1.3?
Flags: needinfo?(bugmail.mozilla)
Yup. Here's a version that applies cleanly to the latest aurora tip (required some minor manual rebasing). If you mark the bug as 1.3+ I'm happy to uplift it.
Flags: needinfo?(bugmail.mozilla) → needinfo?(milan)
blocking-b2g: --- → 1.3?
Blocks a 1.3+
blocking-b2g: 1.3? → 1.3+
Flags: needinfo?(milan)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: