Bug 1148030 - Correctly reflect object and embed RequestContext values; r=smaug

Note that these elements cannot be intercepted for now.  See bug
1168676 for the background.
This commit is contained in:
Ehsan Akhgari
2015-07-18 11:51:00 -04:00
parent de1f86f36c
commit f47f3f6938
8 changed files with 41 additions and 10 deletions

View File

@@ -387,5 +387,18 @@ HTMLSharedObjectElement::WrapNode(JSContext* aCx, JS::Handle<JSObject*> aGivenPr
return rootedObj;
}
nsContentPolicyType
HTMLSharedObjectElement::GetContentPolicyType() const
{
if (mNodeInfo->Equals(nsGkAtoms::applet)) {
// We use TYPE_INTERNAL_OBJECT for applet too, since it is not exposed
// through RequestContext yet.
return nsIContentPolicy::TYPE_INTERNAL_OBJECT;
} else {
MOZ_ASSERT(mNodeInfo->Equals(nsGkAtoms::embed));
return nsIContentPolicy::TYPE_INTERNAL_EMBED;
}
}
} // namespace dom
} // namespace mozilla