Provide API to let apps know when the page changes so that they can display the dynamic toolbar again
Categories
(GeckoView :: Toolbar, defect, P1)
Tracking
(firefox92 fixed)
Tracking | Status | |
---|---|---|
firefox92 | --- | fixed |
People
(Reporter: petru, Assigned: bugzilla)
References
Details
(Whiteboard: [geckoview:toolbar][geckoview:m89][geckoview:m90][geckoview:m91][geckoview:m92])
Attachments
(1 file, 1 obsolete file)
From github: https://github.com/mozilla-mobile/fenix/issues/16368.
Steps to reproduce
The following simplified page shows the problem:
https://www.sleeping.pt/wp/testfixedbodybug.htmlThe following video shows the problem:
https://www.sleeping.pt/wp/wp-content/uploads/2020/10/2020_11_04_14_49_12.webm
Scroll down until the toolbar disappears.
Click anywhere in the document, to trigger the click event that makes the document fixed.
And we can see the space reserved for the toolbar menu but the toolbar is hidden.
When the toolbar reserves the space it does not change the window.innerHeight value either.
Expected behavior
In this case, it is expected that the menu does not reserve space when it is hidden, and the document is set as fixed. Or reserve space but show up and change the window.innerHeight value.
Actual behavior
Reserve the space but don't show up and don't change the window.innerHeight value.
Device information
- Android device: A20e
- Fenix version: 82.1.1
Change performed by the Move to Bugzilla add-on.
Comment 1•3 years ago
|
||
:hiro have you any ideas about this one?
Comment 2•3 years ago
|
||
To fix this issue, we need a way to tell browser apps (android-component or Fenix, etc.) to make the toolbar visible again since the content height is no longer taller than the ICB (i.e. screen height - toolbar height).
Comment 3•3 years ago
|
||
(In reply to Hiroyuki Ikezoe (:hiro) from comment #2)
To fix this issue, we need a way to tell browser apps (android-component or Fenix, etc.) to make the toolbar visible again since the content height is no longer taller than the ICB (i.e. screen height - toolbar height).
Or scroll back a bit.
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Comment 7•3 years ago
|
||
There require two different patrs; 1) detect the content in question no longer overflowed (during the dynamic toolbar is hidden), 2) notify the detected result to GeckoView
For 1) we can detect it in somewhere around here in ScrollFrameHelper::ReflowFinished with PresShell:GetDynamicToolbarState() check. Maybe we should also handle the visualviewport size change here in PresShell::SetVisualViewportSize.
For 2), the route is PresShell -> BrowserChild -> BrowserParent -> nsWindow -> GeckoSession (-> GeckoDisplay -> GeckoView). We will definitely need to add an (parent part) API in PBrowser.idl for the BrowserChild -> BrowserParent
route, for nsWindow -> GeckoSession
route this onCompositorAttached would be a reference, I am not sure about the route in Java `GeckoSession -> GeckoDisplay -> GeckoView).
I hope this would help!
Updated•3 years ago
|
Assignee | ||
Comment 8•3 years ago
|
||
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Comment 9•3 years ago
|
||
thankyou |
- In
nsGfxScrollFrame
we detect the condition requring the app to expand the toolbar.
(Hiro, I know that you suggested a second place to detect this. If you feel that it is important enough to add that,
we'd prefer filing a follow-up bug in Layout for that case that your team can follow up on.) - We then propagate the notification through
PresShell
, up throughPBrowser
, through thensWindow
, then into theGeckoSession
- We invoke a new method on the
ContentDelegate
. This seemed like the reasonable delegate to use given other existing
callbacks in the similar vein (such as going fullscreen), but let me know if this should go elsewhere. - We update GVE and JUnit tests to test this.
Comment 10•3 years ago
|
||
Pushed by aklotz@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/ffe5e3633446 Add callback to notify app to fully display its dynamic toolbar; r=agi,owlish,hiro
Comment 11•3 years ago
|
||
bugherder |
Reporter | ||
Comment 12•3 years ago
|
||
Thank you for this and sorry for not leaving a message sooner:
We verified on Fenix - https://github.com/mozilla-mobile/fenix/issues/18034#issuecomment-905366382 that the toolbar now appears as expected.
Comment 13•2 years ago
|
||
Moving toolbar bugs to the new GeckoView::Toolbar component.
Description
•