Open Bug 1720078 Opened 3 years ago Updated 2 years ago

Some scrollbars missing in screenshot

Categories

(Core :: Graphics: WebRender, defect, P3)

Firefox 89
x86_64
Linux
defect

Tracking

()

UNCONFIRMED

People

(Reporter: typo3, Unassigned)

References

(Blocks 1 open bug, )

Details

Attachments

(1 file)

Attached image scrollbars.png

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0

Steps to reproduce:

System

  • Geckodriver: 0.29.1 (970ef713fe58 2021-04-08 23:34 +0200)
  • Platform: Ubuntu 20.04.2 LTS
  • Firefox: 89.0.1
  • Selenium: selenium/standalone-firefox:4.0 (2021-06-18T11:03:02)
  • Codeception: 4.1.21
  • Original bug report: https://github.com/mozilla/geckodriver/issues/1908

Testcase

When I take a screenshot of the minimal HTML page scrollbars.html (see below) with the latest Codeception + the latest Selenium Firefox standalone container, the scrollbars of the iframe and the DIV layer with overflow-y:scroll are not rendered, while the scrollbar of the DIV layer with overflow:auto is rendered.

scrollbars.html

<html>
<body style="background-color:grey;">
<h1 style="height:40px;">Scrollbars</h1>

<!-- DIV layer with overflow:auto works -->
<div style="width:200px;height:260px;background-color:green;overflow:auto;float:left;">
    Text<br>Text<br>Text<br>Text<br>Text<br>Text<br>Text<br>Text<br>Text<br>Text<br>
    Text<br>Text<br>Text<br>Text<br>Text<br>Text<br>Text<br>Text<br>Text<br>Text<br>
</div>

<!-- IFrame fails -->
<iframe src="./scrollbarsIframe.html" style="width:200px;height:260px;background-color:blue;float:left;"></iframe>

<!-- DIV layer with overflow-y:scroll fails -->
<div style="width:200px;height:260px;background-color:orange;overflow-y:scroll;float:left;">
    Text<br>Text<br>Text<br>Text<br>Text<br>Text<br>Text<br>Text<br>Text<br>Text<br>
    Text<br>Text<br>Text<br>Text<br>Text<br>Text<br>Text<br>Text<br>Text<br>Text<br>
</div>

</body>
</html>

scrollbarsIframe.html

<html>
<body>
Text<br>Text<br>Text<br>Text<br>Text<br>Text<br>Text<br>Text<br>Text<br>Text<br>
Text<br>Text<br>Text<br>Text<br>Text<br>Text<br>Text<br>Text<br>Text<br>Text<br>
</body>
</html>

Please find the resulting screenshot scrollbars.png attached.

Actual results:

In 2 of 3 DOM elements the scrollbars do not get rendered in the resulting screenshot.

Expected results:

I would expect to see a rendered scrollbar on the screenshot in all three DOM elements, as is the case when browsing manually in Firefox v78.11.0 ESR and taking a screenshot of the same page or when using the latest Selenium Chrome standalone container instead.

Interesting comparison screen shot https://github.com/mozilla/geckodriver/issues/1908#issuecomment-874320325 showing different scrollbars, overlay vs classic.

How does one reproduce this? I'm not very familiar with Codeception or Selenium. Simple steps for a way to reproduce with the minimal amount of extra software would be ideal.

I'm fairly sure that the same problem will happen with the built-in screenshot command given that also Marionette makes use of the same API. But as mentioned on the Github issue Firefox fails to start:

$ firefox -screenshot scrollbars.png scrollbars.html
*** You are running in headless mode.
[GFX1-]: glxtest: libpci missing
[GFX1-]: glxtest: libEGL missing
[GFX1-]: glxtest: libEGL missing
[GFX1-]: Failed to connect WebRenderBridgeChild.

Timothy, any idea what this could be? Note that this is happening within the recent version of this docker image.

This is a reduced example removing Codeception from the stack and using the underlying php-webdriver/webdriver package directly. It is ready for check out and running in Docker containers:

https://github.com/alexander-nitsche/t3docs-screenshots-firefox

The Docker container logs provide further insight into the internal flow., e.g.

docker logs ddev-t3docs-screenshots-firefox-firefox
Flags: needinfo?(tnikkel)

(In reply to Henrik Skupin (:whimboo) [⌚️UTC+1] from comment #2)

I'm fairly sure that the same problem will happen with the built-in screenshot command given that also Marionette makes use of the same API. But as mentioned on the Github issue Firefox fails to start:

$ firefox -screenshot scrollbars.png scrollbars.html
*** You are running in headless mode.
[GFX1-]: glxtest: libpci missing
[GFX1-]: glxtest: libEGL missing
[GFX1-]: glxtest: libEGL missing
[GFX1-]: Failed to connect WebRenderBridgeChild.

Timothy, any idea what this could be? Note that this is happening within the recent version of this docker image.

I have no idea what might be going on, not really my area.

Flags: needinfo?(tnikkel)

Alexander, there is actually one question that I have. How got Firefox installed in this docker image? Was it maybe via Snap? If yes it might be related to bug 1703142. As such please try out a beta release of Firefox if that works better in that docker image. If it indeed does, please get a screenshot with the command from comment 2.

Flags: needinfo?(typo3)

Hi Henrik,

the docker image consists of 3 intermediate images and the complete build process can be looked up in these 4 Dockerfile files:

  1. https://github.com/SeleniumHQ/docker-selenium/blob/trunk/StandaloneFirefox/Dockerfile
  2. https://github.com/SeleniumHQ/docker-selenium/blob/trunk/NodeFirefox/Dockerfile
  3. https://github.com/SeleniumHQ/docker-selenium/blob/trunk/NodeBase/Dockerfile
  4. https://github.com/SeleniumHQ/docker-selenium/blob/trunk/Base/Dockerfile

In (2) you will find the Firefox and Geckodriver installation steps.

Greetings
Alex

Flags: needinfo?(typo3)

As step 2 shows Firefox gets installed via apt-get first to get all the dependencies installed too. Then the package is immediately removed, and Firefox gets installed again via a downloaded package from mozilla.org. So no Snap is involved here.

Jimm, who from the WebRender team could help us here?

Flags: needinfo?(jmathies)
Blocks: gfx-triage
Flags: needinfo?(jmathies)

Is there steps to reproduce here that uses a minimal amount of other software besides Firefox?

Hey Alexander, in addition to Tim's question, I had a few as well -

  1. Do you know if this environment (selenium/standalone-firefox:4.0 (2021-06-18T11:03:02)) is still available someplace? I would love to see the about:support text from Firefox for it.
  2. You mentioned ESR 78, was that the previous version of Firefox you were leveraging here?
  3. Has anyone tested in this environment with a newer Fx version (<=92)?

Thanks!

Flags: needinfo?(typo3)

Changing severity to S? because of <rationale>.

waiting on feedback.

No longer blocks: gfx-triage
Severity: -- → S4
Priority: -- → P3
Blocks: wr-linux
OS: Unspecified → Linux
Hardware: Unspecified → x86_64

hi timothy, hi mathies,

Is there steps to reproduce here that uses a minimal amount of other software besides Firefox?
The steps with the minimal amount of other software - i can provide - is:

Install

Run

git clone git@github.com:alexander-nitsche/t3docs-screenshots-firefox.git
cd t3docs-screenshots-firefox
ddev start
ddev composer install
ddev exec php scrollbars.php

this produces an image scrollbars.png which shows the problem.
You can check the logs of the firefox instance with

docker logs ddev-t3docs-screenshots-firefox-firefox

or enter the firefox container with

docker exec -it ddev-t3docs-screenshots-firefox-firefox /bin/bash

and investigate there.

Do you know if this environment (selenium/standalone-firefox:4.0 (2021-06-18T11:03:02)) is still available someplace? I would love to see the about:support text from Firefox for it.

The problem even occurs in the current environment. If you follow (1) you will automatically pull it.

You mentioned ESR 78, was that the previous version of Firefox you were leveraging here?

My personal browser is ESR 78, but the firefox in the selenium package is v89 (2021-06-18T11:03:02) or v92 (current).

Has anyone tested in this environment with a newer Fx version (<=92)?

Yes, tested with v89 and v92.

Flags: needinfo?(typo3)

Jim, could you please follow-up on that issue? Thanks.

Flags: needinfo?(jmathies)

Older versions did not seem to show scrollbars at all.
Screenshot from comment 0 is reproducible with following command (mozregression.png shows up in current working folder, e.g. ~/):
MOZ_DISABLE_CONTENT_SANDBOX=1 mozregression --launch 89.0.1 --pref gfx.x11-egl.force-disabled:true gfx.webrender.force-disabled:true -a="--headless" -a="--screenshot=mozregression.png" -a='data:text/html;base64,PGh0bWw+DQo8Ym9keSBzdHlsZT0iYmFja2dyb3VuZC1jb2xvcjpncmV5OyI+DQo8aDEgc3R5bGU9ImhlaWdodDo0MHB4OyI+U2Nyb2xsYmFyczwvaDE+DQoNCjwhLS0gRElWIGxheWVyIHdpdGggb3ZlcmZsb3c6YXV0byB3b3JrcyAtLT4NCjxkaXYgc3R5bGU9IndpZHRoOjIwMHB4O2hlaWdodDoyNjBweDtiYWNrZ3JvdW5kLWNvbG9yOmdyZWVuO292ZXJmbG93OmF1dG87ZmxvYXQ6bGVmdDsiPg0KICAgIFRleHQ8YnI+VGV4dDxicj5UZXh0PGJyPlRleHQ8YnI+VGV4dDxicj5UZXh0PGJyPlRleHQ8YnI+VGV4dDxicj5UZXh0PGJyPlRleHQ8YnI+DQogICAgVGV4dDxicj5UZXh0PGJyPlRleHQ8YnI+VGV4dDxicj5UZXh0PGJyPlRleHQ8YnI+VGV4dDxicj5UZXh0PGJyPlRleHQ8YnI+VGV4dDxicj4NCjwv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irit from comment #13 + 14)

Older versions did not seem to show scrollbars at all.

bug 1697053 shipped with 89.

With 89 and widget.non-native-theme.enabled:false (previous default) there are no scrollbars.
MOZ_DISABLE_CONTENT_SANDBOX=1 mozregression --launch 89.0.1 --pref widget.non-native-theme.enabled:false gfx.x11-egl.force-disabled:true gfx.webrender.force-disabled:true -a="--headless" -a="--screenshot=mozregression.png" -a='data:text/html;base64,PGh0bWw+DQo8Ym9keSBzdHlsZT0iYmFja2dyb3VuZC1jb2xvcjpncmV5OyI+DQo8aDEgc3R5bGU9ImhlaWdodDo0MHB4OyI+U2Nyb2xsYmFyczwvaDE+DQoNCjwhLS0gRElWIGxheWVyIHdpdGggb3ZlcmZsb3c6YXV0byB3b3JrcyAtLT4NCjxkaXYgc3R5bGU9IndpZHRoOjIwMHB4O2hlaWdodDoyNjBweDtiYWNrZ3JvdW5kLWNvbG9yOmdyZWVuO292ZXJmbG93OmF1dG87ZmxvYXQ6bGVmdDsiPg0KICAgIFRleHQ8YnI+VGV4dDxicj5UZXh0PGJyPlRleHQ8YnI+VGV4dDxicj5UZXh0PGJyPlRleHQ8YnI+VGV4dDxicj5UZXh0PGJyPlRleHQ8YnI+DQogICAgVGV4dDxicj5UZXh0PGJyPlRleHQ8YnI+VGV4dDxicj5UZXh0PGJyPlRleHQ8YnI+VGV4dDxicj5UZXh0PGJyPlRleHQ8YnI+VGV4dDxicj4NCjwvZGl2Pg0KDQo8IS0tIElGcmFtZSBmYWlscyAtLT4NCjxpZnJhbWUgc3JjPSJkYXRhOnRleHQvaHRtbDtiYXNlNjQsUEdoMGJXdytEUW84WW05a2VUNE5DbFJsZUhROFluSStWR1Y0ZER4aWNqNVVaWGgwUEdKeVBsUmxlSFE4WW5JK1ZHVjRkRHhpY2o1VVpYaDBQR0p5UGxSbGVIUThZbkkrVkdWNGREeGljajVVWlhoMFBHSnlQbFJsZUhROFluSStEUXBVWlhoMFBHSnlQbFJsZUhROFluSStWR1Y0ZER4aWNqNVVaWGgwUEdKeVBsUmxlSFE4WW5JK1ZHVjRkRHhpY2o1VVpYaDBQR0p5UGxSbGVIUThZbkkrVkdWNGREeGljajVVWlhoMFBHSnlQZzBLUEM5aWIyUjVQZzBLUEM5b2RHMXNQZzBLIiBzdHlsZT0id2lkdGg6MjAwcHg7aGVpZ2h0OjI2MHB4O2JhY2tncm91bmQtY29sb3I6Ymx1ZTtmbG9hdDpsZWZ0OyI+PC9pZnJhbWU+DQoNCjwhLS0gRElWIGxheWVyIHdpdGggb3ZlcmZsb3cteTpzY3JvbGwgZmFpbHMgLS0+DQo8ZGl2IHN0eWxlPSJ3aWR0aDoyMDBweDtoZWlnaHQ6MjYwcHg7YmFja2dyb3VuZC1jb2xvcjpvcmFuZ2U7b3ZlcmZsb3cteTpzY3JvbGw7ZmxvYXQ6bGVmdDsiPg0KICAgIFRleHQ8YnI+VGV4dDxicj5UZXh0PGJyPlRleHQ8YnI+VGV4dDxicj5UZXh0PGJyPlRleHQ8YnI+VGV4dDxicj5UZXh0PGJyPlRleHQ8YnI+DQogICAgVGV4dDxicj5UZXh0PGJyPlRleHQ8YnI+VGV4dDxicj5UZXh0PGJyPlRleHQ8YnI+VGV4dDxicj5UZXh0PGJyPlRleHQ8YnI+VGV4dDxicj4NCjwvZGl2Pg0KDQo8L2JvZHk+DQo8L2h0bWw+DQo=' -P stdout

Flags: needinfo?(jmathies)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: