NPAPI:QueryCoreAnimationCompositingSupport: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
(Move proposal to the right wiki area)
 
(Clarify the name)
Line 21: Line 21:
= Current Proposal =
= 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:
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:


  WKNVSupportsCompositingCoreAnimationPluginsBool 74656
  NPNVSupportsCompositingCoreAnimationPluginsBool 74656
 
The proposal is to formalize this as NPNVSupportsCompositingCoreAnimationPluginsBool, using the same value for compatibility with existing browser and plug-in implementations.


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

Revision as of 16:49, 22 July 2011

Status

Under consideration.

Contributors

  • Last modified: July 20, 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).