Closed Bug 943967 Opened 11 years ago Closed 10 years ago

Rename AsyncPanZoomController to reflect its increasing scope

Categories

(Core :: Panning and Zooming, defect)

defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: botond, Unassigned)

Details

These days AsyncPanZoomController does more than control asynchronous panning and zooming. A lot of event handling and gesture detection goes through it when it's enabled. Perhaps we should rename it to reflect its increasing responsibilities?

Kats and I thought of "AsyncInputController" at the Paris work week. Chris Lord suggested "AsyncInputHandler".

Thoughts?
Just to add some rationale for my alternate suggestion; AsyncPanZoomController makes sense because it controls panning and zooming asynchronously. AsyncInputController suggests it controls input, but it's input that drives what it does, so I think Handler makes more sense.

I'm ok with either name though. Perhaps it could actually be split into AsyncInputHandler and AsyncPanZoomController, if we want more granularity?
Let's keep in mind that we also have an APZCTreeManager class. If we rename AsyncPanZoomController to something else, we will probably want to rename APZCTreeManager as well. Will we name it <ABC>TreeManager where <ABC> is the acronym for the new name of AsyncPanZoomController? Or should we take this opportunity to reduce the level of acronym nesting? :)
(In reply to Chris Lord [:cwiiis] from comment #1)
> Just to add some rationale for my alternate suggestion;
> AsyncPanZoomController makes sense because it controls panning and zooming
> asynchronously. AsyncInputController suggests it controls input, but it's
> input that drives what it does, so I think Handler makes more sense.

I agree that "input" and "controller" don't go well together here. Not sure how I feel about "handler", though. Maybe AsyncInputManager?
Also, I'd like to have a name for the module/component of code that contains APZC and APZCTM and related code. I've been calling it "APZ", for "Async Pan/Zoom module" (see https://wiki.mozilla.org/Platform/GFX/APZ). We should also give that a new name.
AsyncEventManager, perhaps? Maybe that's too generic, but I could imagine we'd want to handle other, non-input events too (sensors, for example... I guess it's still input, but certainly more passive than the word 'input' implies) - that would be a reasonable name for the module too.

For the tree manager, perhaps AsyncInputLayerManager? Not sure that's really any better though tbh...
I don't know if this is a good idea any more. Names are pretty hard to change this late in the game as we have a lot of documentation and mindshare using the current name. The cost/benefit ratio just doesn't seem worth it.

I would rather take an approach that completely guts the AsyncPanZoomController class into a bunch of smaller classes. I've been trying to take this approach when adding new classes (InputBlockQueue, TouchBlockState, etc.) but I think it would be worth while to extract existing code from APZC to do this as well.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.