Bug 1876702 - HTMLObjectElement and HTMLEmbedElement don't need resolve hooks. r=peterv

These were used for plugins but now it's dead code.

Differential Revision: https://phabricator.services.mozilla.com/D199706
This commit is contained in:
Emilio Cobos Álvarez 2024-01-26 10:36:52 +00:00
Родитель d4e2c037f4
Коммит c482cc6def
4 изменённых файлов: 2 добавлений и 43 удалений

Просмотреть файл

@ -416,11 +416,6 @@ nsObjectLoadingContent::OnDataAvailable(nsIRequest* aRequest,
return NS_ERROR_UNEXPECTED;
}
void nsObjectLoadingContent::PresetOpenerWindow(
const Nullable<WindowProxyHolder>& aOpenerWindow, ErrorResult& aRv) {
aRv.Throw(NS_ERROR_FAILURE);
}
NS_IMETHODIMP
nsObjectLoadingContent::GetActualType(nsACString& aType) {
aType = mContentType;
@ -1821,22 +1816,6 @@ Document* nsObjectLoadingContent::GetContentDocument(
return sub_doc;
}
bool nsObjectLoadingContent::DoResolve(
JSContext* aCx, JS::Handle<JSObject*> aObject, JS::Handle<jsid> aId,
JS::MutableHandle<mozilla::Maybe<JS::PropertyDescriptor>> aDesc) {
return true;
}
/* static */
bool nsObjectLoadingContent::MayResolve(jsid aId) {
// We can resolve anything, really.
return true;
}
void nsObjectLoadingContent::GetOwnPropertyNames(
JSContext* aCx, JS::MutableHandleVector<jsid> /* unused */,
bool /* unused */, ErrorResult& aRv) {}
void nsObjectLoadingContent::MaybeFireErrorEvent() {
Element* el = AsElement();
// Queue a task to fire an error event if we're an <object> element. The

Просмотреть файл

@ -74,22 +74,8 @@ class nsObjectLoadingContent : public nsIStreamListener,
}
static bool IsFallbackMimeType(const nsACString& aMimeType);
// Helper for WebIDL NeedResolve
bool DoResolve(
JSContext* aCx, JS::Handle<JSObject*> aObject, JS::Handle<jsid> aId,
JS::MutableHandle<mozilla::Maybe<JS::PropertyDescriptor>> aDesc);
// The return value is whether DoResolve might end up resolving the given
// id. If in doubt, return true.
static bool MayResolve(jsid aId);
static bool IsSuccessfulRequest(nsIRequest*, nsresult* aStatus);
// Helper for WebIDL enumeration
void GetOwnPropertyNames(JSContext* aCx,
JS::MutableHandleVector<jsid> /* unused */,
bool /* unused */, mozilla::ErrorResult& aRv);
// WebIDL API
mozilla::dom::Document* GetContentDocument(nsIPrincipal& aSubjectPrincipal);
void GetActualType(nsAString& aType) const {
@ -113,10 +99,6 @@ class nsObjectLoadingContent : public nsIStreamListener,
bool IsRewrittenYoutubeEmbed() const { return mRewrittenYoutubeEmbed; }
void PresetOpenerWindow(const mozilla::dom::Nullable<
mozilla::dom::WindowProxyHolder>& aOpenerWindow,
mozilla::ErrorResult& aRv);
const mozilla::Maybe<mozilla::IntrinsicSize>& GetSubdocumentIntrinsicSize()
const {
return mSubdocumentIntrinsicSize;

Просмотреть файл

@ -13,8 +13,7 @@
*/
// http://www.whatwg.org/specs/web-apps/current-work/#the-embed-element
[NeedResolve,
Exposed=Window]
[Exposed=Window]
interface HTMLEmbedElement : HTMLElement {
[HTMLConstructor] constructor();

Просмотреть файл

@ -13,8 +13,7 @@
*/
// http://www.whatwg.org/specs/web-apps/current-work/#the-object-element
[NeedResolve,
Exposed=Window]
[Exposed=Window]
interface HTMLObjectElement : HTMLElement {
[HTMLConstructor] constructor();