Bug 1412414 - Remove nsIDOMHTMLSourceElement; r=bz

MozReview-Commit-ID: 3ZK1GremntX

--HG--
extra : rebase_source : c25b1a449596130ec8d2e7936f52cc651988af85
This commit is contained in:
Kyle Machulis 2017-10-27 15:00:42 -07:00
parent 710efa953f
commit 7308e0e9fe
8 changed files with 5 additions and 56 deletions

View File

@ -18,7 +18,6 @@
#include "base/basictypes.h"
#include "nsIDOMHTMLMediaElement.h"
#include "nsIDOMHTMLSourceElement.h"
#include "TimeRanges.h"
#include "nsGenericHTMLElement.h"
#include "nsAttrValueInlines.h"

View File

@ -35,21 +35,10 @@ HTMLSourceElement::~HTMLSourceElement()
NS_IMPL_CYCLE_COLLECTION_INHERITED(HTMLSourceElement, nsGenericHTMLElement,
mSrcMediaSource)
NS_IMPL_ADDREF_INHERITED(HTMLSourceElement, nsGenericHTMLElement)
NS_IMPL_RELEASE_INHERITED(HTMLSourceElement, nsGenericHTMLElement)
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(HTMLSourceElement)
NS_INTERFACE_MAP_ENTRY(nsIDOMHTMLSourceElement)
NS_INTERFACE_MAP_END_INHERITING(nsGenericHTMLElement)
NS_IMPL_ISUPPORTS_CYCLE_COLLECTION_INHERITED_0(HTMLSourceElement, nsGenericHTMLElement)
NS_IMPL_ELEMENT_CLONE(HTMLSourceElement)
NS_IMPL_URI_ATTR(HTMLSourceElement, Src, src)
NS_IMPL_STRING_ATTR(HTMLSourceElement, Type, type)
NS_IMPL_STRING_ATTR(HTMLSourceElement, Srcset, srcset)
NS_IMPL_STRING_ATTR(HTMLSourceElement, Sizes, sizes)
NS_IMPL_STRING_ATTR(HTMLSourceElement, Media, media)
bool
HTMLSourceElement::MatchesCurrentMedia()
{

View File

@ -8,7 +8,6 @@
#define mozilla_dom_HTMLSourceElement_h
#include "mozilla/Attributes.h"
#include "nsIDOMHTMLSourceElement.h"
#include "nsGenericHTMLElement.h"
#include "mozilla/dom/HTMLMediaElement.h"
@ -19,8 +18,7 @@ namespace dom {
class MediaList;
class HTMLSourceElement final : public nsGenericHTMLElement,
public nsIDOMHTMLSourceElement
class HTMLSourceElement final : public nsGenericHTMLElement
{
public:
explicit HTMLSourceElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo);
@ -32,9 +30,6 @@ public:
NS_IMPL_FROMCONTENT_HTML_WITH_TAG(HTMLSourceElement, source)
// nsIDOMHTMLSourceElement
NS_DECL_NSIDOMHTMLSOURCEELEMENT
virtual nsresult Clone(mozilla::dom::NodeInfo* aNodeInfo, nsINode** aResult,
bool aPreallocateChildren) const override;

View File

@ -4,7 +4,6 @@
* 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 "nsIDOMHTMLSourceElement.h"
#include "mozilla/dom/HTMLVideoElement.h"
#include "mozilla/dom/HTMLVideoElementBinding.h"
#include "nsGenericHTMLElement.h"

View File

@ -20,7 +20,6 @@ XPIDL_SOURCES += [
'nsIDOMHTMLOptionsCollection.idl',
'nsIDOMHTMLScriptElement.idl',
'nsIDOMHTMLSelectElement.idl',
'nsIDOMHTMLSourceElement.idl',
'nsIDOMMozBrowserFrame.idl',
'nsIDOMTimeRanges.idl',
'nsIDOMValidityState.idl',

View File

@ -1,27 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:set ts=2 sw=2 sts=2 et cindent: */
/* 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 nsIDOMHTMLSourceElement interface is the interface to a HTML
* <source> element.
*
* For more information on this interface, please see
* http://www.whatwg.org/specs/web-apps/current-work/#source
*
* @status UNDER_DEVELOPMENT
*/
[uuid(1deb68f8-2ed6-4a41-b8c8-e0f86510f799)]
interface nsIDOMHTMLSourceElement : nsISupports
{
attribute DOMString src;
attribute DOMString type;
attribute DOMString srcset;
attribute DOMString sizes;
attribute DOMString media;
};

View File

@ -31,7 +31,6 @@
#include "nsIDOMHTMLMediaElement.h"
#include "nsIDOMHTMLOptionElement.h"
#include "nsIDOMHTMLScriptElement.h"
#include "nsIDOMHTMLSourceElement.h"
#include "nsIDOMMozNamedAttrMap.h"
#include "nsIDOMNode.h"
#include "nsIDOMNodeFilter.h"
@ -494,8 +493,8 @@ ResourceReader::OnWalkDOMNode(nsIDOMNode* aNode)
if (nodeAsMedia) {
return OnWalkAttribute(aNode, "src");
}
nsCOMPtr<nsIDOMHTMLSourceElement> nodeAsSource = do_QueryInterface(aNode);
if (nodeAsSource) {
if (content->IsHTMLElement(nsGkAtoms::source)) {
return OnWalkAttribute(aNode, "src");
}
@ -1009,8 +1008,7 @@ PersistNodeFixup::FixupNode(nsIDOMNode *aNodeIn,
return rv;
}
nsCOMPtr<nsIDOMHTMLSourceElement> nodeAsSource = do_QueryInterface(aNodeIn);
if (nodeAsSource) {
if (content->IsHTMLElement(nsGkAtoms::source)) {
rv = GetNodeToFixup(aNodeIn, aNodeOut);
if (NS_SUCCEEDED(rv) && *aNodeOut) {
FixupAttribute(*aNodeOut, "src");

View File

@ -57,7 +57,6 @@
#include "nsIDOMHTMLOptionsCollection.h"
#include "nsIDOMHTMLScriptElement.h"
#include "nsIDOMHTMLSelectElement.h"
#include "nsIDOMHTMLSourceElement.h"
#include "nsIDOMKeyEvent.h"
#include "nsIDOMMediaList.h"
#include "nsIDOMMouseEvent.h"
@ -161,7 +160,6 @@
#include "mozilla/dom/HTMLOptionsCollectionBinding.h"
#include "mozilla/dom/HTMLScriptElementBinding.h"
#include "mozilla/dom/HTMLSelectElementBinding.h"
#include "mozilla/dom/HTMLSourceElementBinding.h"
#include "mozilla/dom/KeyEventBinding.h"
#include "mozilla/dom/ListBoxObjectBinding.h"
#include "mozilla/dom/MediaListBinding.h"
@ -316,7 +314,6 @@ const ComponentsInterfaceShimEntry kComponentsInterfaceShimMap[] =
DEFINE_SHIM(HTMLOptionsCollection),
DEFINE_SHIM(HTMLScriptElement),
DEFINE_SHIM(HTMLSelectElement),
DEFINE_SHIM(HTMLSourceElement),
DEFINE_SHIM(KeyEvent),
DEFINE_SHIM_WITH_CUSTOM_INTERFACE(nsIListBoxObject, ListBoxObject),
DEFINE_SHIM(MediaList),