WebKit has a bug when rendering canvases that have their width defined as
relative to their container, and their parent is resized. This causes a
"tearing" effect when zooming in PDFs past a certain threshold, which
is device-dependent but tends to be between 120% and 200%.
The DOM structure around the canvas is as follows:
div.pdfViewer [ --scale-factor: ...; ]
> div.page [ width: round(var(--scale-factor) * ..., 1px); ]
> div.canvasWrapper
> canvas
Setting `width: inherit` on the div.canvasWrapper and on the canvas is
equivalent to explicitly specifying the same `width` property in pixels
as in div.page, thus making Safari properly redraw the canvas on resize.
See https://bugs.webkit.org/show_bug.cgi?id=267986 for more details
on the WebKit bug.
Fixes#16155, fixes#16329, fixes#17459