style: Replace plugin behavior with a basic fallback

The browser currently only enables plugin behavior for Flash and our internal test plugins.  This patch replaces support for those plugins with a simple fallback that shows a transparent region where the plugin would have been.  It removes the file system search(es) for the plugin dynamic libraries and short-circuits the logic to determine if plugins should do something special -- all implementations now behave the same in the presence of plugin elements.

The new behavior is:
1. If the <object> or <embed> element lists a type of something other than "x-shockwave-flash" or "x-test" then the behavior is unchanged.  This means that non-plugin types behave properly and unknown types (for example, typos) are also unaffected (they reduce to 0x0 elements).
2. If the <object> element has an HTML fallback in the DOM (see spec for <object> elements) then the fallback is always shown.
3. Otherwise, the element is shown as a transparent region with the size specified in attributes.

Differential Revision: https://phabricator.services.mozilla.com/D95902
This commit is contained in:
David Parks 2020-11-18 15:55:34 +00:00 committed by Emilio Cobos Álvarez
parent 1e815ab3c3
commit 178e627500
3 changed files with 5 additions and 0 deletions

View file

@ -2046,6 +2046,7 @@ impl<'le> ::selectors::Element for GeckoElement<'le> {
NonTSPseudoClass::MozHandlerClickToPlay |
NonTSPseudoClass::MozHandlerVulnerableUpdatable |
NonTSPseudoClass::MozHandlerVulnerableNoUpdate |
NonTSPseudoClass::MozHandlerNoPlugins |
NonTSPseudoClass::MozMathIncrementScriptLevel |
NonTSPseudoClass::InRange |
NonTSPseudoClass::OutOfRange |