Proposal: Allow Mac plug-ins access to the contents scale factor
andersca at apple.com
Sun Sep 11 14:41:34 PDT 2011
On Sep 9, 2011, at 10:20 AM, Darin Adler wrote:
> On Sep 9, 2011, at 9:26 AM, Benjamin Smedberg wrote:
>> 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?
> It’s the scale factor between logical pixels and the actual number of pixels in the backing store. It corresponds to the OS X concept backingScaleFactor.
>> 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.
> There’s a chance might be OK for Adobe Flash since it’s basic model has been to scale content to fit the plug-in rectangle, but for many other plug-ins it’s critical to be able to get this scale factor separate from other things that would affect the plug-in rectangle.
> Anders or Adam can probably supply more specifics if you need examples to help make it clear.
A good example of this is a video player plug-in; if you have a HiDPI display you want the controls to be twice as large which you won't get by simply sizing the plug-in.
More information about the plugin-futures