NPAPI:BrowserZoomLevelQuery: Difference between revisions
Jump to navigation
Jump to search
(NPAPI Browser Zoom Level initial spec) |
(Approved) |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
== Status == | == Status == | ||
Approved | |||
== Contributors == | == Contributors == | ||
*Last modified: | *Last modified: 2016-02-29 | ||
*Authors: Kyle Machulis (Mozilla) | *Authors: Kyle Machulis (Mozilla) | ||
Line 11: | Line 11: | ||
Currently, NPAPI plugins have no way to know if the browser is running | Currently, NPAPI plugins have no way to know if the browser is running | ||
at a zoom level other than 1x. We need an addition to the API that | at a CSS zoom level other than 1x. We need an addition to the API that | ||
allows plugins to query the current browser zoom level. | allows plugins to query the current browser CSS zoom level. | ||
== Specification == | == Specification == | ||
Line 19: | Line 19: | ||
<pre> | <pre> | ||
NPNVCSSZoomFactor = 23 | |||
</pre> | </pre> | ||
This | This value represents the current CSS zoom level of the browser. It will be sent to plugins via NPP_SetValue when the value changes. It can also be retrieved via NPN_GetValue. Since changing CSS zoom levels updates the window properties, this value can be re-queried during NPP_SetWindow or other window property update calls, to see if | ||
zoom levels updates the window properties, this value can be re-queried | |||
during | |||
a zoom change has been made. | a zoom change has been made. | ||
Latest revision as of 14:25, 29 February 2016
Status
Approved
Contributors
- Last modified: 2016-02-29
- Authors: Kyle Machulis (Mozilla)
Overview
Currently, NPAPI plugins have no way to know if the browser is running at a CSS zoom level other than 1x. We need an addition to the API that allows plugins to query the current browser CSS zoom level.
Specification
We'll need to add a NPNV variable:
NPNVCSSZoomFactor = 23
This value represents the current CSS zoom level of the browser. It will be sent to plugins via NPP_SetValue when the value changes. It can also be retrieved via NPN_GetValue. Since changing CSS zoom levels updates the window properties, this value can be re-queried during NPP_SetWindow or other window property update calls, to see if a zoom change has been made.