NPAPI:QueryCoreAnimationCompositingSupport
Status
Accepted, ready for implementation.
Contributors
- Last modified: July 22, 2011
- Authors: Stuart Morgan (Google)
- Contributors: Kevin Decker (Apple)
Overview
This proposal allows plug-ins to query browsers to determine at runtime whether or not full compositing (z-index support) is supported for Core Animation and Invalidating Core Animation drawing model plug-ins.
Background
There is inconsistent browser support for compositing Core Animation-based plug-ins. Some browsers fully support compositing in this mode, whereas others draw them them above all other web content (analogous to windowed plug-ins on other platforms). Support varies not just by rendering engine, but by rendering engine version, and browsers that do not currently support it likely will in future versions, which makes user-agent based checks fragile.
Several plug-ins developers have expressed a need to know this at runtime in order to know what model to negotiate in cases where compositing is required, so a more robust method of determining this is needed.
Current Proposal
WebKit already has an informal solution to this problem, defining a variable that plug-ins can query to determine compositing support using NPN_GetValue. The proposal is to formalize this as NPNVsupportsCompositingCoreAnimationPluginsBool, using the same value for compatibility with existing browser and plug-in implementations:
NPNVsupportsCompositingCoreAnimationPluginsBool 74656
Any browser implementing compositing for the Core Animation drawing models would return true for this variable in NPN_GetValue. Browsers that returned false would be known not to support it, while browsers returning an error would need to be checked by user agent (for compatibility with browsers that support compositing but have not implemented this new specification).