computeTextPaintStyle() should take the viewport size instead of a frame as it is unnecessary for it to know about a frame.
Created attachment 330148 [details]
Comment on attachment 330148 [details]
r-, this won't work :( we need the frame to also query for the focus controller and to query the document if it is printing
One way to fix this is to have computeTextPaintStyle() take individual arguments for whether the document is printing, whether we should print backgrounds and whether the page is currently focused. This does not sound like a big improvement.