Closed Bug 1878324 Opened 4 months ago Closed 4 months ago

Puppeteer screenshot tests are failing because of invalid usage of "-webkit-scrollbar"

Categories

(Remote Protocol :: WebDriver BiDi, defect, P2)

defect
Points:
2

Tracking

(firefox124 fixed)

RESOLVED FIXED
124 Branch
Tracking Status
firefox124 --- fixed

People

(Reporter: whimboo, Assigned: whimboo)

References

(Blocks 1 open bug)

Details

(Whiteboard: [webdriver:m10])

Attachments

(1 file)

Several Puppeteer tests are currently failing because in Firefox a vertical scrollbar is displayed which reduces the clientWidth of the content document, and causing grid elements to reflow earlier to the next line. This produces different screenshot data.

Here an example:
https://github.com/puppeteer/puppeteer/blob/6514accb26c785fe3f14d0280de375ce76556493/test/src/screenshot.spec.ts#L90-L99

The problem here actually is that the loaded HTML test pages use the ::-webkit-scrollbar CSS pseudo element to disable scrollbars, which is not compatible with Firefox. Switching this to scrollbar-width: none for the body and html element works in both Firefox and Chrome (where it is brand-new in the 121 release).

I'll go ahead and prepare a Puppeteer upstream PR.

Also we should get tests added to wdspec which check for the right viewport size when scrollbars are shown or not.

These are P2 test failures for Puppeteer.

Assignee: nobody → hskupin
Status: NEW → ASSIGNED
Priority: -- → P2
Whiteboard: [webdriver:m10]

Actually the creation of new wdspec tests will be covered by bug 1878070. This bug will be kept solely for the Puppeteer fix.

Summary: Puppeteer screenshot tests are failing because of differences when scrollbars are shown → Puppeteer screenshot tests are failing because of invalid usage of "-webkit-scrollbar"

To continue investigating issues with screenshots these
changes will be pulled before the next vendoring.

The PR got merged upstream. Lets already apply it on mozilla-central so that we can go ahead with further investigations around viewport and screenshots.

No longer blocks: 1773698
Pushed by hskupin@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/16b81378369b
[puppeteer] replace usages of webkit-scrollbar with scrollbar-width r=webdriver-reviewers,Sasha
Points: --- → 2
Status: ASSIGNED → RESOLVED
Closed: 4 months ago
Resolution: --- → FIXED
Target Milestone: --- → 124 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: