Open Bug 1563161 Opened 5 years ago Updated 1 years ago

"window.screen.availTop" reports wrong value on MacOS

Categories

(Firefox :: Headless, defect, P3)

65 Branch
defect

Tracking

()

People

(Reporter: whimboo, Unassigned)

References

(Blocks 2 open bugs)

Details

Attachments

(1 file)

Attached file marionette testcase

In headless mode the availTop property of window.screen reports 0 instead of negative values. Note that this is not the case for availLeft which is working just fine.

Brendan, would that be a quick fix? Nevertheless I might just mark the failing wdspec test (bug 1493907) as expected fail for headless right now.

Flags: needinfo?(bdahl)
Blocks: 1563248

I looked in to this a bit and it's really up to us on how we want handle negative coordinates in headless mode. Since headless doesn't have any OS menu bars the available rect is the same as the screen size.

Couple of options to make the test pass:

  1. Allow going negative by adding a fake menu bar space
  2. Only allow the window to be moved within the screen bounds
  3. Mix of the above to mimic each platforms behavior

BTW, this test fails on headless linux as well.

Flags: needinfo?(bdahl)

The priority flag is not set for this bug.
:bdahl, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(bdahl)
Flags: needinfo?(bdahl)
Priority: -- → P3

(In reply to Brendan Dahl [:bdahl] from comment #1)

I looked in to this a bit and it's really up to us on how we want handle negative coordinates in headless mode. Since headless doesn't have any OS menu bars the available rect is the same as the screen size.

Couple of options to make the test pass:

  1. Allow going negative by adding a fake menu bar space
  2. Only allow the window to be moved within the screen bounds
  3. Mix of the above to mimic each platforms behavior

I'm currently checking which web-platform-tests can be re-enabled and stumbled about this remaining problem again. IMHO we might want to respect the platform behavior to give Firefox the same behavior in headless and non-headless mode?

How complicated would it be to get it implemented?

Flags: needinfo?(bdahl)

(In reply to Brendan Dahl [:bdahl] from comment #1)

BTW, this test fails on headless linux as well.

Not anymore. I'm going to remove the multiple status for it on Linux:
https://treeherder.mozilla.org/jobs?repo=try&revision=9925e6d8d15cce0cc4626159df8e998e8ee9c864

It's been a little too long since I looked at this to give a good estimate, but I don't think it would be too hard. It would mainly just be a pain to figure out what to do on each platform and checking tests. We'd probably need to modify HeadlessWidget::Move and HeadlessWidget::Resize to have platform specific bits.

If you're able to give me what the test reports on each platform that would be helpful.

Flags: needinfo?(bdahl)
Severity: normal → S3
Blocks: 1653287
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: