Switch over the Mac-specific uses of viewportToContents/contentsToViewport.