Proposal: Allow Mac plug-ins access to the contents scale factor

Benjamin Smedberg benjamin at
Fri Sep 9 09:26:31 PDT 2011

On 9/8/2011 4:41 PM, Anders Carlsson wrote:
> Hi,
> there's a proposal at for allowing plug-ins to get information about the contents scale factor for HiDPI display modes.
> The proposal is Mac specific because on Windows, the DPI is a global setting and plug-ins can use the Win32 API for accessing the DPI. I don't know if there's a HiDPI story for X11.
I'm not a mac hacker at all, so pardon my obvious ignorance: I really 
don't understand what this does or how plugins would use this 
information. Is this the scale factor between how many logical pixels in 
the plugin's rectangle (in NPP_SetWindow) and how many pixels are 
actually present? Does this value change if the user zooms in or out of 
the web page? I *think* that in Gecko we would simply tell the plugin 
that it is twice as large (since we map CSS pixels to device pixels in 
the layout engine), but I'd have to check with a layout hacker to be sure.


More information about the plugin-futures mailing list