Bug 1682030 - Clean up NPAPI plugin fallback behavior. r=jmathies,emilio
Similifies use of EventStates and ObjectType/FallbackType enums since most states they represented are no longer valid with the removal of NPAPI plugins. The state machine for (unsupported) plugin elements is now much simpler but still distinguishes between HTML fallbacks, fallbacks leading to a "BROKEN" state (e.g. failing to load the image the element refers to), and fallbacks that would simply lead the element to occupy an empty region. The last type of fallback is behind a pref "layout.use-plugin-fallback" and is disabled by default. Simplifying the state machine allows us to clean up nsObjectLoadingContent. We also update many of the enums which refered to plugins, which would otherwise get confusing. Differential Revision: https://phabricator.services.mozilla.com/D107158
This commit is contained in:
@@ -166,9 +166,8 @@ bool HTMLObjectElement::IsHTMLFocusable(bool aWithMouse, bool* aIsFocusable,
|
||||
return false;
|
||||
}
|
||||
|
||||
// If we have decided that this is a blocked plugin then do not allow focus.
|
||||
if ((Type() == eType_Null) &&
|
||||
(PluginFallbackType() == eFallbackBlockAllPlugins)) {
|
||||
// Plugins that show the empty fallback should not accept focus.
|
||||
if (Type() == eType_Fallback) {
|
||||
if (aTabIndex) {
|
||||
*aTabIndex = -1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user