• ananta's avatar
    Avoid calling the GetSystemMetrics API in the renderer process on Windows to... · 59b9fe7e
    ananta authored
    Avoid calling the GetSystemMetrics API in the renderer process on Windows to get the scrollbar metrics.
    
    It appears that this call takes a long time on certain Windows 8 configurations because the call triggers a load
    of the uxtheme.dll which fails and retries every time. This is presumably due to the Win32K lockdown mode on Windows 8+.
    
    Fix is to send the scrollbar metrics values we are interested in as part of the RendererPrefs structure. In the renderer
    these are saved as static values in the WebThemeEngineImpl class.
    
    1) Note that not all of the cache settings are currently used - SM_CYHSCROLL,
    SM_CYVSCROLL, and SM_CXHSCROLL are cached for possible future usage.
    
    2. These repeated attempts to load uxtheme.dll only occur in some (ill-defined)
    situations, having to do with what theme is selected and other factors
    
    BUG=472790
    
    Review URL: https://codereview.chromium.org/1054243002
    
    Cr-Commit-Position: refs/heads/master@{#323999}
    59b9fe7e
render_view_win.cc 1.69 KB