Closed Bug 1498699 Opened 6 years ago Closed 6 years ago

Support products on Android without the dynamic toolbar

Categories

(Core :: Panning and Zooming, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla64
Tracking Status
firefox64 --- fixed

People

(Reporter: kats, Assigned: kats)

References

Details

Attachments

(3 files)

The dynamic toolbar is specific to Fennec. GeckoView-based products won't be using it (at least for now). So we should only instantiate AndroidDynamicToolbarAnimator and the run the related code if we're on Fennec, rather than unconditionally inside MOZ_WIDGET_ANDROID blocks.
I thought we were already doing this with the pref browser.chrome.dynamictoolbar, but you're right that the AndroidDynamicToolbarAnimator is still created if the pref is set to false. (I guess it just doesn't get the necessary messages from Java to actually do anything?)
Yeah, we create the AndroidDynamicToolbarAnimator but most of the code is no-op unless it's enabled. However there are a couple of codepaths (the NotifyLayersUpdated and FirstPaint messages, in particular) which are used even if browser.chrome.dynamictoolbar is false. The patches I have this bug involve moving that code out of AndroidDynamicToolbarAnimator and then allowing the instantiation to be skipped.
This extracts code that is conceptually unrelated to the dynamic toolbar from the dynamic toolbar codebase. It is a stepping stone to being able to not instantiate the AndroidDynamicToolbarAnimator at all for non-Fennec android products.
The bulk of this is adjusting the code that tries to use the toolbar to have appropriate null checks instead of asserting it will exist. The creation of the animator instance is now guarded by a IsFennec condition. Depends on D8658
Pushed by kgupta@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/dcd095eb8910 Move the LAYERS_UPDATED notification from AndroidDynamicToolbarAnimator to UiCompositorControllerParent. r=jnicol https://hg.mozilla.org/integration/autoland/rev/da505775320b Move the FIRST_PAINT notification from AndroidDynamicToolbarAnimator to UiCompositorControllerParent. r=jnicol https://hg.mozilla.org/integration/autoland/rev/8866a66f7659 Only create the AndroidDynamicToolbarAnimator for Fennec. r=jnicol
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: