Mac HiDPI: Fix scale factor on external display
On Mac OS 10.8, opening a page on external monitor would cause the page to be rendered at the scale factor of the primary display. The problem is in RenderViewHostImpl::CreateRenderView. It uses the view to calculate the display scale factor but this doesn't work because the view hasn't been added to a window yet. My fix is to update the scale factor when -[RenderWidgetHostViewCocoa viewDidMoveToWindow:] is called. This CL also caches the scale factor. Note, for some reason I can't reproduce the bug on 10.7. On 10.7 the scale factor is also incorrect but for some reason the page is displayed correctly. I'm not sure what's going on. BUG=138039 TBR=sky Review URL: https://chromiumcodereview.appspot.com/10837154 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@150973 0039d316-1c4b-4281-b951-d872f2087c98
Showing
Please register or sign in to comment