Computed value of 'bottom' for a position:fixed element is different in Firefox than in Chrome for Android
Categories
(Core :: Layout, defect, P3)
Tracking
()
People
(Reporter: ksenia, Assigned: hiro)
References
(Blocks 1 open bug, Regression, )
Details
(Keywords: regression, Whiteboard: [geckoview:p3], [wptsync upstream], [qa-triaged])
Attachments
(2 files, 1 obsolete file)
4.96 KB,
text/html
|
Details | |
47 bytes,
text/x-phabricator-request
|
lizzard
:
approval-mozilla-beta+
lizzard
:
approval-mozilla-esr68+
|
Details | Review |
As reported here:
https://github.com/webcompat/web-bugs/issues/34281
Steps to reproduce:
Go to https://www.cleanmeats.com.au/2019/07/01/out-of-body-experience-shiok-meats-and-their-lab-grown-seafood/ in Firefox for Android or in Nightly desktop RDM and observe the behavior.
Expected:
Functional site
Actual:
Site is covered by a social panel and unusable
Regression points to:
222:01.32 INFO: Last good revision: 4b74d76e55a819852c8fa925efd25c57fdf35c9d
222:01.32 INFO: First bad revision: 96d77e9c3f2985c2b702c0910e0da686bee54105
222:01.32 INFO: Pushlog:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=4b74d76e55a819852c8fa925efd25c57fdf35c9d&tochange=96d77e9c3f2985c2b702c0910e0da686bee54105
Site is relying on the computed bottom value of an element with class .g1-sharebar
to do certain calculations and as a result applying top: 0px
to it. That is causing element with .g1-sharebar
to cover the whole screen.
I've attached a reduced test case. It has content on the page that is wider than the screen. The page looks the same in Firefox and Chrome, however when inspecting a computed value of bottom
for an element with id=test
, the values are different.
Reporter | ||
Comment 1•5 years ago
|
||
Botond, the suggestion of using minimum-scale=1.0
from here https://bugzilla.mozilla.org/show_bug.cgi?id=1557707 fixes the issue, however I wonder if computed values should match the actual values, in this case bottom: 0px
?
Assignee | ||
Comment 2•5 years ago
|
||
This seems to be a bug. We have to adjust the value somewhere in GetUsedAbsoluteOffset in the case where we expanded the layout viewport size.
Updated•5 years ago
|
Comment 3•5 years ago
|
||
Thanks for the reduced testcase!
(In reply to Ksenia Berezina [:ksenia] from comment #1)
Botond, the suggestion of using
minimum-scale=1.0
from here https://bugzilla.mozilla.org/show_bug.cgi?id=1557707 fixes the issue, however I wonder if computed values should match the actual values, in this casebottom: 0px
?
I agree, we should be reporting bottom: 0px
here.
Updated•5 years ago
|
Assignee | ||
Comment 4•5 years ago
|
||
I have a patch for this, but I don't know who is the right person to ask review.
Updated•5 years ago
|
Comment 5•5 years ago
|
||
The patch looks sensible to me fwiw (test and comment in nsComputedDOMStyle
missing). I would've maybe made the method a method in ViewportFrame
or such instead of PresShell
since it seems easy to misuse otherwise. But it is the right fix.
Updated•5 years ago
|
Comment 6•5 years ago
|
||
Happy to take a patch for 70, but since this is already triaged and set to P3 priority I'm setting it as fix-optional.
That will remove the bug from weekly regression triage.
Sean, can you help find a reviewer for the patch? Thanks!
Assignee | ||
Comment 7•5 years ago
|
||
On IRC, Botond suggested me Markus for the reviewer. I will revise the patch as Emilio suggested in comment 5 (I did want to avoid calling doQueryFrame there but it's not a big deal) and send the review request to Markus.
Assignee | ||
Comment 8•5 years ago
|
||
Assignee | ||
Updated•5 years ago
|
Updated•5 years ago
|
Comment 12•5 years ago
|
||
bugherder |
Updated•5 years ago
|
Comment 14•5 years ago
|
||
Hiro, should we uplift your position:fixed
fix from GeckoView 71 Nightly to 70 Beta? This bug is marked as a regression (in Fennec and GeckoView 67), but it is also a P3, suggesting it is not an urgent problem.
btw, since Fennec is now in maintenance mode in ESR 68, fixes in Gecko 71 will not automatically ride to Fennec. If we need to fix this regression in Fennec, we'll need to uplift the fix to ESR 68.
Assignee | ||
Comment 15•5 years ago
|
||
Comment on attachment 9085384 [details]
Bug 1563649 - As with display list item and reflow for position:fixed elements, use the adjusted layout viewport size getComputedStyle() r?mstange
Beta/Release Uplift Approval Request
- User impact if declined: It depends on what the site in question does, one of the sites reported on webcompat.com is rendered as blank
- Is this code covered by automated tests?: Yes
- Has the fix been verified in Nightly?: Yes
- Needs manual test from QE?: No
- If yes, steps to reproduce:
- List of other uplifts needed: None
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): It just tweaks values by getComputedStyle for position:fixed elements, it shouldn't cause any serious issues, crashes etc.
- String changes made/needed: none
ESR Uplift Approval Request
- If this is not a sec:{high,crit} bug, please state case for ESR consideration: This is one of mobile web compat issues we've been tackling and worth fixing in Fennec
- User impact if declined: Same as above the description for beta uplift
- Fix Landed on Version: 71
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): Same as above the description for beta uplift
- String or UUID changes made by this patch: none
Assignee | ||
Comment 16•5 years ago
|
||
Thanks you, Chris. Indeed we should uplift this to fennec.
Comment 17•5 years ago
|
||
Comment on attachment 9085384 [details]
Bug 1563649 - As with display list item and reflow for position:fixed elements, use the adjusted layout viewport size getComputedStyle() r?mstange
Fairly bad webcompat issue, let's uplift for beta 6. And for ESR for the next Fennec beta build.
Comment 18•5 years ago
|
||
bugherder uplift |
Comment 19•5 years ago
|
||
bugherder uplift |
Updated•5 years ago
|
Updated•5 years ago
|
Comment 20•5 years ago
|
||
Hi!
Verified as fixed on Nightly 71.0a1 (2019-09-15) and 70.0b7 with OnePlus 5T (Android 9), Huawei Honor 8 (Android 7.0), Prestigio Grace X5 (Android 4.4.2).
I will mark this as verified on Firefox 71 and Firefox 70.
Thanks!
Comment 21•5 years ago
|
||
I have tested the issue on Beta 68.2b3 using a Samsung Galaxy S9 (Android 8.0.0) and the issue no longer occurs, I will mark it accordingly.
Updated•3 years ago
|
Description
•