Closed Bug 1586147 Opened 5 years ago Closed 5 years ago

Need an API to notify layout (top content prescontext) when the dynamic toolbar is completely hidden or about to be visible

Categories

(GeckoView :: General, defect, P1)

Unspecified
All
defect

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1586986

People

(Reporter: hiro, Unassigned)

References

()

Details

(Whiteboard: [geckoview?])

On Chrome window.innerHeight is changed in response to dynamic toolbar. You can see the behavior to open http://bokand.github.io/demo/urlbarsize.html on Chrome.

window.innerHeight is changed to the value which is not including the toolbar size when the toolbar is completely hidden, and changed to the size which is including the maximum toolbar size when the toolbar starts transitioning to be shown.

Also an resize should be fired in response to those notifications.

Note that, as far as I can tell, with CoordinatorLayout GeckoSession.onWindowBoundsChanged is not called at all in response to the dynamic toolbar transition because Surface size is not changed for the toolbar transition, that's why we need a new API to explicitly notify it.

Rank: 2
Priority: -- → P2
Blocks: 1586149

I just realized that what happens on the dynamic toolbar when we enter fullscreen state or exit from fullscreen state depends on implementation. As of now, reference-browser does change the toolbar visiblity, I am pretty sure that at that time we also need to send the same notification.

After looking Chrome behavior closely, Chrome changes window.innerHeight after user left user's finger from screen, if the dynamic toolbar is in the middle of transition at that time, window.innerHeight is changed after the dynamic toolbar snapped back to either end. I am not sure we should mimic the behavior.

Huh, the behavior I wrote in comment 2 is Chrome Canary's behavior. On Chrome 77.0.3865.116 the behavior is the same as what I wrote in comment 0.

Selecting for GV's November sprint.

James wonders whether we can implement this by overriding the vertical clipping to the current toolbar size.

Priority: P2 → P1
Whiteboard: [geckoview:m1911]

With the way I wrote in bug 1586986 comment 6, which is notifying the vertical clipping value to the main thread too, we can tell whether the dynamic toolbar is completely hidden and is about to visible in Gecko layout side, I have already a patch to do that, it's probably sufficient for bug 1586149. But there is still a cumbersome issue in between APZ and layout stuff (I've also written in bug 1586986 comment 8). We need to tackle the issue.

Whiteboard: [geckoview:m1911] → [geckoview?]
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → DUPLICATE

Moving toolbar bugs to the new GeckoView::Toolbar component.

Component: General → Toolbar
Component: Toolbar → General
You need to log in before you can comment on or make changes to this bug.