mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 21:31:04 +00:00
Bug 1387184 - Remove nsIDOMHTMLEmbedElement; r=bz
Removes nsIDOMHTMLEmbedElement and all references. HTML elements are now handled by WebIDL. With the deprecation of extensions, XPCOM interfaces to HTML elements are no longer needed. MozReview-Commit-ID: DI4XVvdgPDI --HG-- extra : rebase_source : 74bd92619e3d1db04c3dd40ec3022474fe1d647c
This commit is contained in:
parent
eb3058e466
commit
649634a721
@ -43,7 +43,6 @@
|
||||
#include "nsIDOMHTMLTextAreaElement.h"
|
||||
#include "nsIDOMHTMLHtmlElement.h"
|
||||
#include "nsIDOMHTMLObjectElement.h"
|
||||
#include "nsIDOMHTMLEmbedElement.h"
|
||||
#include "nsIDOMHTMLDocument.h"
|
||||
#include "nsIImageLoadingContent.h"
|
||||
#include "nsIWebNavigation.h"
|
||||
@ -1545,10 +1544,10 @@ ChromeContextMenuListener::HandleEvent(nsIDOMEvent* aMouseEvent)
|
||||
|
||||
// First, checks for nodes that never have children.
|
||||
if (nodeType == nsIDOMNode::ELEMENT_NODE) {
|
||||
nsCOMPtr<nsIImageLoadingContent> content(do_QueryInterface(node));
|
||||
if (content) {
|
||||
nsCOMPtr<nsIImageLoadingContent> imageContent(do_QueryInterface(node));
|
||||
if (imageContent) {
|
||||
nsCOMPtr<nsIURI> imgUri;
|
||||
content->GetCurrentURI(getter_AddRefs(imgUri));
|
||||
imageContent->GetCurrentURI(getter_AddRefs(imgUri));
|
||||
if (imgUri) {
|
||||
flags |= nsIContextMenuListener::CONTEXT_IMAGE;
|
||||
flags2 |= nsIContextMenuListener2::CONTEXT_IMAGE;
|
||||
@ -1587,9 +1586,9 @@ ChromeContextMenuListener::HandleEvent(nsIDOMEvent* aMouseEvent)
|
||||
if (!(flags & nsIContextMenuListener::CONTEXT_IMAGE)) {
|
||||
objectElement = do_QueryInterface(node);
|
||||
}
|
||||
nsCOMPtr<nsIDOMHTMLEmbedElement> embedElement(do_QueryInterface(node));
|
||||
|
||||
if (objectElement || embedElement) {
|
||||
nsCOMPtr<nsIContent> content = do_QueryInterface(node);
|
||||
if (objectElement || (content && content->IsHTMLElement(nsGkAtoms::embed))) {
|
||||
return NS_OK;
|
||||
}
|
||||
}
|
||||
|
@ -69,7 +69,6 @@ NS_INTERFACE_TABLE_INHERITED(HTMLEmbedElement,
|
||||
imgIOnloadBlocker,
|
||||
nsIChannelEventSink)
|
||||
NS_INTERFACE_TABLE_TO_MAP_SEGUE
|
||||
NS_INTERFACE_MAP_ENTRY(nsIDOMHTMLEmbedElement)
|
||||
NS_INTERFACE_MAP_END_INHERITING(nsGenericHTMLElement)
|
||||
|
||||
NS_IMPL_ELEMENT_CLONE(HTMLEmbedElement)
|
||||
@ -354,12 +353,5 @@ HTMLEmbedElement::GetContentPolicyType() const
|
||||
return nsIContentPolicy::TYPE_INTERNAL_EMBED;
|
||||
}
|
||||
|
||||
NS_IMPL_STRING_ATTR(HTMLEmbedElement, Align, align)
|
||||
NS_IMPL_STRING_ATTR(HTMLEmbedElement, Width, width)
|
||||
NS_IMPL_STRING_ATTR(HTMLEmbedElement, Height, height)
|
||||
NS_IMPL_STRING_ATTR(HTMLEmbedElement, Name, name)
|
||||
NS_IMPL_URI_ATTR(HTMLEmbedElement, Src, src)
|
||||
NS_IMPL_STRING_ATTR(HTMLEmbedElement, Type, type)
|
||||
|
||||
} // namespace dom
|
||||
} // namespace mozilla
|
||||
|
@ -12,20 +12,17 @@
|
||||
#include "nsObjectLoadingContent.h"
|
||||
#include "nsGkAtoms.h"
|
||||
#include "nsError.h"
|
||||
#include "nsIDOMHTMLEmbedElement.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
class HTMLEmbedElement final : public nsGenericHTMLElement
|
||||
, public nsObjectLoadingContent
|
||||
, public nsIDOMHTMLEmbedElement
|
||||
{
|
||||
public:
|
||||
explicit HTMLEmbedElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo,
|
||||
mozilla::dom::FromParser aFromParser = mozilla::dom::NOT_FROM_PARSER);
|
||||
|
||||
NS_DECL_NSIDOMHTMLEMBEDELEMENT
|
||||
// nsISupports
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
NS_IMPL_FROMCONTENT_HTML_WITH_TAG(HTMLEmbedElement, embed)
|
||||
@ -104,7 +101,10 @@ public:
|
||||
SetHTMLAttr(nsGkAtoms::width, aValue, aRv);
|
||||
}
|
||||
// WebIDL <embed> api
|
||||
// XPCOM GetSrc is ok; note that it's a URI attribute
|
||||
void GetSrc(DOMString& aValue)
|
||||
{
|
||||
GetURIAttr(nsGkAtoms::src, nullptr, aValue);
|
||||
}
|
||||
void SetSrc(const nsAString& aValue, ErrorResult& aRv)
|
||||
{
|
||||
SetHTMLAttr(nsGkAtoms::src, aValue, aRv);
|
||||
|
@ -18,7 +18,6 @@ XPIDL_SOURCES += [
|
||||
'nsIDOMHTMLDirectoryElement.idl',
|
||||
'nsIDOMHTMLDocument.idl',
|
||||
'nsIDOMHTMLElement.idl',
|
||||
'nsIDOMHTMLEmbedElement.idl',
|
||||
'nsIDOMHTMLFieldSetElement.idl',
|
||||
'nsIDOMHTMLFormElement.idl',
|
||||
'nsIDOMHTMLFrameElement.idl',
|
||||
|
@ -1,25 +0,0 @@
|
||||
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "nsIDOMHTMLElement.idl"
|
||||
|
||||
/**
|
||||
* The nsIDOMHTMLEmbedElement interface is the interface to a [X]HTML
|
||||
* embed element.
|
||||
*
|
||||
* For more information on this interface, please see
|
||||
* http://www.whatwg.org/specs/web-apps/current-work/#the-embed-element
|
||||
*/
|
||||
|
||||
[uuid(adae53da-713d-4570-81ad-dabdd6d46241)]
|
||||
interface nsIDOMHTMLEmbedElement : nsISupports
|
||||
{
|
||||
attribute DOMString align;
|
||||
attribute DOMString height;
|
||||
attribute DOMString name;
|
||||
attribute DOMString src;
|
||||
attribute DOMString type;
|
||||
attribute DOMString width;
|
||||
};
|
@ -24,7 +24,6 @@
|
||||
#include "nsIDOMHTMLBaseElement.h"
|
||||
#include "nsIDOMHTMLCollection.h"
|
||||
#include "nsIDOMHTMLDocument.h"
|
||||
#include "nsIDOMHTMLEmbedElement.h"
|
||||
#include "nsIDOMHTMLFrameElement.h"
|
||||
#include "nsIDOMHTMLIFrameElement.h"
|
||||
#include "nsIDOMHTMLImageElement.h"
|
||||
@ -529,8 +528,7 @@ ResourceReader::OnWalkDOMNode(nsIDOMNode* aNode)
|
||||
return OnWalkAttribute(aNode, "href", "http://www.w3.org/1999/xlink");
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIDOMHTMLEmbedElement> nodeAsEmbed = do_QueryInterface(aNode);
|
||||
if (nodeAsEmbed) {
|
||||
if (content->IsHTMLElement(nsGkAtoms::embed)) {
|
||||
return OnWalkAttribute(aNode, "src");
|
||||
}
|
||||
|
||||
@ -1060,8 +1058,7 @@ PersistNodeFixup::FixupNode(nsIDOMNode *aNodeIn,
|
||||
return rv;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIDOMHTMLEmbedElement> nodeAsEmbed = do_QueryInterface(aNodeIn);
|
||||
if (nodeAsEmbed) {
|
||||
if (content->IsHTMLElement(nsGkAtoms::embed)) {
|
||||
rv = GetNodeToFixup(aNodeIn, aNodeOut);
|
||||
if (NS_SUCCEEDED(rv) && *aNodeOut) {
|
||||
FixupAttribute(*aNodeOut, "src");
|
||||
|
@ -40,7 +40,6 @@
|
||||
#include "nsIDOMDocumentFragment.h"
|
||||
#include "nsIDOMElement.h"
|
||||
#include "nsIDOMHTMLAnchorElement.h"
|
||||
#include "nsIDOMHTMLEmbedElement.h"
|
||||
#include "nsIDOMHTMLFrameElement.h"
|
||||
#include "nsIDOMHTMLIFrameElement.h"
|
||||
#include "nsIDOMHTMLImageElement.h"
|
||||
|
@ -44,7 +44,6 @@ static const char sPrintSettingsServiceContractID[] = "@mozilla.org/gfx/printset
|
||||
#include "nsIDOMHTMLFrameSetElement.h"
|
||||
#include "nsIDOMHTMLIFrameElement.h"
|
||||
#include "nsIDOMHTMLObjectElement.h"
|
||||
#include "nsIDOMHTMLEmbedElement.h"
|
||||
|
||||
// Print Preview
|
||||
#include "imgIContainer.h" // image animation mode constants
|
||||
|
@ -56,7 +56,6 @@
|
||||
#include "nsIDOMHTMLDirectoryElement.h"
|
||||
#include "nsIDOMHTMLDocument.h"
|
||||
#include "nsIDOMHTMLElement.h"
|
||||
#include "nsIDOMHTMLEmbedElement.h"
|
||||
#include "nsIDOMHTMLFieldSetElement.h"
|
||||
#include "nsIDOMHTMLFormElement.h"
|
||||
#include "nsIDOMHTMLFrameElement.h"
|
||||
@ -183,7 +182,6 @@
|
||||
#include "mozilla/dom/HTMLDirectoryElementBinding.h"
|
||||
#include "mozilla/dom/HTMLDocumentBinding.h"
|
||||
#include "mozilla/dom/HTMLElementBinding.h"
|
||||
#include "mozilla/dom/HTMLEmbedElementBinding.h"
|
||||
#include "mozilla/dom/HTMLFieldSetElementBinding.h"
|
||||
#include "mozilla/dom/HTMLFormElementBinding.h"
|
||||
#include "mozilla/dom/HTMLFrameElementBinding.h"
|
||||
@ -369,7 +367,6 @@ const ComponentsInterfaceShimEntry kComponentsInterfaceShimMap[] =
|
||||
DEFINE_SHIM(HTMLDirectoryElement),
|
||||
DEFINE_SHIM(HTMLDocument),
|
||||
DEFINE_SHIM(HTMLElement),
|
||||
DEFINE_SHIM(HTMLEmbedElement),
|
||||
DEFINE_SHIM(HTMLFieldSetElement),
|
||||
DEFINE_SHIM(HTMLFormElement),
|
||||
DEFINE_SHIM(HTMLFrameElement),
|
||||
|
Loading…
Reference in New Issue
Block a user