Page MenuHomePhabricator

Printing page with an empty HTML element with "display: flex; gap: xxpx;" causes resulting PDF to have tens of thousands of empty pages
Open, LowPublicBUG REPORT

Description

If a page has an empty HTML element with the following style: display: flex; gap: xxpx;(xx is any positive integer), it causes any printing of the page to be tens of thousands of pages long. Reproducible on this page: https://en.wikipedia.org/wiki/Wikipedia:Wikipedia_Signpost/2022-10-31/From_the_team. Reproducible both with Google Chrome's print function (Control/Cmd + P) and with https://en.wikipedia.org/api/rest_v1/page/pdf/Wikipedia%3AWikipedia%20Signpost%2F2022-10-31%2FFrom%20the%20team.

Seems to be due to https://bugs.chromium.org/p/chromium/issues/detail?id=1161709, meaning this issue has existed since Chrome v89. Potential fix incoming at Chrome 108 per the crbug link.

Part of T314281.

Event Timeline

Change 860562 had a related patch set uploaded (by Jgiannelos; author: Jgiannelos):

[mediawiki/services/chromium-render@master] Build image with latest dependencies

https://gerrit.wikimedia.org/r/860562

Currently the latest version of the chromium package on bullseye is 107. I am checking if there is something we can do as a workaround until 108 gets released.

chromium:
  Installed: 107.0.5304.110-1~deb11u1
  Candidate: 107.0.5304.110-1~deb11u1
  Version table:
 *** 107.0.5304.110-1~deb11u1 500
        500 http://security.debian.org/debian-security bullseye-security/main amd64 Packages
        100 /var/lib/dpkg/status
     104.0.5112.79-1~deb11u1 500
        500 http://mirrors.wikimedia.org/debian bullseye/main amd64 Packages