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

Darin Adler darin at apple.com
Fri Sep 9 10:20:38 PDT 2011


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?

No.

> 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.

    -- Darin



More information about the plugin-futures mailing list