[Toolbar redesign] Wrong toolbar values sent to APZ when exiting fullscreen
Categories
(Fenix :: Toolbar, defect, P2)
Tracking
(firefox137 fixed)
Tracking | Status | |
---|---|---|
firefox137 | --- | fixed |
People
(Reporter: petru, Assigned: petru)
References
(Blocks 2 open bugs)
Details
(Whiteboard: [fxdroid][group3])
Attachments
(1 file)
Ticket opened as a followup to bug 1938966 comment 36
Steps to reproduce
- Have the navbar feature enabled
- Access any website showing a video which allows viewing it in fullscreen
- Enter fullscreen
- Exit fullscreen
Expected behavior
We inform APZ about the toolbar height and webpage being overlapped by it through setDynamicToolbarMaxHeight
and setVerticalClipping
.
The vertical clipping value is not bigger than the toolbar's height.
Actual behavior
For a short time we send unexpected values:
setDynamicToolbarMaxHeight
is initially called with the height of just the address barsetVerticalClipping
is called with the height of both the addressbar and the navbar
When the initialization of the navbar finishes both calls receive the right values but might be too late for some flows as seen in bug 1938966 comment 33
Updated•1 month ago
|
Assignee | ||
Comment 1•1 month ago
|
||
Setting S2/P2 as this impacts a bigger bug / fix - bug 1938966.
Assignee | ||
Updated•1 month ago
|
Assignee | ||
Comment 2•1 month ago
|
||
An example of the data we send to APZ
09:42:29.941 exiting fullscreen
09:42:29.942 setDynamicToolbarMaxHeight: 158
09:42:29.942 setVerticalClipping: -158
09:42:29.943 setVerticalClipping: -296 <-- this is the issue. Vertical clipping is bigger than toolbar height.
09:42:29.949 setVerticalClipping: -296
09:42:29.949 setVerticalClipping: -296
09:42:29.955 setVerticalClipping: -296
09:42:29.955 setVerticalClipping: -296
09:42:29.958 setVerticalClipping: -296
09:42:29.959 setVerticalClipping: -296
09:42:29.969 setVerticalClipping: -296
09:42:29.969 setVerticalClipping: -296
09:42:29.979 setVerticalClipping: -241
09:42:29.979 setVerticalClipping: -177
09:42:29.984 setVerticalClipping: -153
09:42:29.984 setVerticalClipping: -132
09:42:29.985 setVerticalClipping: -132
09:42:29.986 setVerticalClipping: -132
09:42:29.988 setVerticalClipping: -132
09:42:29.988 setVerticalClipping: -132
09:42:30.070 setVerticalClipping: -63
09:42:30.070 setVerticalClipping: -3
09:42:30.071 setVerticalClipping: -3
09:42:30.071 setVerticalClipping: -3
09:42:30.090 setVerticalClipping: -3
09:42:30.091 setVerticalClipping: -3
09:42:30.173 setDynamicToolbarMaxHeight: 296 <-- after an updated (bigger) toolbar height everything should be good
09:42:30.216 setVerticalClipping: -2
09:42:30.216 setVerticalClipping: 0
09:42:30.220 setVerticalClipping: -2
09:42:30.220 setVerticalClipping: 0
09:42:30.311 setVerticalClipping: 0
Assignee | ||
Comment 3•1 month ago
|
||
The issue happens because we inform APZ of the toolbar height and set automatic updates of the toolbar offset in response to exiting fullscreen, but while still being in landscape so based on this check that includes a screen size also we infer that the navbar should not be shown.
Later we are informed of layout updates where both the top address bar and navbar are seen on the screen so we inform APZ of both the toolbar being hidden - two toolbars being hidden means a bigger offset value than the height of just the addressbar.
Later we reinitialize the toolbars after changing from landscape to portrait and now based on this check that includes a screen size also we infer that the navbar should be shown and so the values sent to APZ for the dynamic toolbars heights and offsets will be correct.
Assignee | ||
Comment 4•1 month ago
|
||
This ensures that APZ will not be configured with a bigger toolbar offset
(a bigger dynamic toolbar translation) than it's set height.
Assignee | ||
Comment 5•1 month ago
|
||
Similar logs to those from comment 2 showing compatible values sent to APZ:
12:07:59.958 exiting fullscreen
12:07:59.959 setDynamicToolbarMaxHeight: 158
12:07:59.962 setVerticalClipping: -158
12:07:59.962 setVerticalClipping: -158
12:07:59.966 setVerticalClipping: -158
12:07:59.967 setVerticalClipping: -158
12:07:59.969 setVerticalClipping: -158
12:07:59.969 setVerticalClipping: -158
12:07:59.972 setVerticalClipping: -158
12:07:59.973 setVerticalClipping: -158
12:07:59.992 setVerticalClipping: -158
12:07:59.992 setVerticalClipping: -158
12:08:00.002 setVerticalClipping: -96
12:08:00.002 setVerticalClipping: -96
12:08:00.002 setVerticalClipping: -96
12:08:00.002 setVerticalClipping: -96
12:08:00.004 setVerticalClipping: -96
12:08:00.004 setVerticalClipping: -96
12:08:00.126 setVerticalClipping: -96
12:08:00.126 setVerticalClipping: -8
12:08:00.167 setDynamicToolbarMaxHeight: 296
12:08:00.198 setVerticalClipping: -8
12:08:00.199 setVerticalClipping: 0
12:08:00.202 setVerticalClipping: -8
12:08:00.202 setVerticalClipping: 0
12:08:00.229 setVerticalClipping: 0
Description
•