Bug 1875466 - Remove nsIObjectLoadingContent::TYPE_IMAGE. r=webidl,emilio

Depends on D199116

Differential Revision: https://phabricator.services.mozilla.com/D199117
This commit is contained in:
Tom Schuster
2024-01-22 14:26:11 +00:00
parent 549a8ff507
commit 8c14e039c0
5 changed files with 9 additions and 47 deletions

View File

@@ -3657,13 +3657,6 @@ nsCSSFrameConstructor::FindObjectData(const Element& aElement,
"embed and object must implement "
"nsIObjectLoadingContent!");
objContent->GetDisplayedType(&type);
if (type == nsIObjectLoadingContent::TYPE_IMAGE &&
aElement.State().HasState(ElementState::BROKEN)) {
// GetDisplayedType isn't necessarily nsIObjectLoadingContent::TYPE_NULL for
// cases when the object is broken/suppressed/etc (e.g. a broken image), but
// we want to treat those cases as TYPE_NULL
type = nsIObjectLoadingContent::TYPE_NULL;
}
if (type == nsIObjectLoadingContent::TYPE_FALLBACK &&
!StaticPrefs::layout_use_plugin_fallback()) {
@@ -3675,8 +3668,6 @@ nsCSSFrameConstructor::FindObjectData(const Element& aElement,
NS_NewEmptyFrame),
SIMPLE_INT_CREATE(nsIObjectLoadingContent::TYPE_FALLBACK,
ToCreationFunc(NS_NewBlockFrame)),
SIMPLE_INT_CREATE(nsIObjectLoadingContent::TYPE_IMAGE,
NS_NewSubDocumentFrame),
SIMPLE_INT_CREATE(nsIObjectLoadingContent::TYPE_DOCUMENT,
NS_NewSubDocumentFrame),
// Fake plugin handlers load as documents