From 3d0fe120ad9d852e29f10c0593734a4f2e969e21 Mon Sep 17 00:00:00 2001 From: Reuben Morais Date: Thu, 18 Jul 2013 20:01:52 -0700 Subject: [PATCH] Backed out changeset 1b779d67a022 (bug 893117) --- content/html/content/src/HTMLUnknownElement.cpp | 4 +++- content/html/content/src/HTMLUnknownElement.h | 9 +++++---- content/html/content/test/test_bug389797.html | 4 ++++ dom/interfaces/html/moz.build | 1 + .../html/nsIDOMHTMLUnknownElement.idl | 17 +++++++++++++++++ 5 files changed, 30 insertions(+), 5 deletions(-) create mode 100644 dom/interfaces/html/nsIDOMHTMLUnknownElement.idl diff --git a/content/html/content/src/HTMLUnknownElement.cpp b/content/html/content/src/HTMLUnknownElement.cpp index a60ec00a2fb..40722bb2f1b 100644 --- a/content/html/content/src/HTMLUnknownElement.cpp +++ b/content/html/content/src/HTMLUnknownElement.cpp @@ -4,7 +4,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "nsDocument.h" -#include "mozilla/dom/HTMLUnknownElement.h" +#include "HTMLUnknownElement.h" #include "mozilla/dom/HTMLElementBinding.h" NS_IMPL_NS_NEW_HTML_ELEMENT(Unknown) @@ -37,6 +37,8 @@ HTMLUnknownElement::WrapNode(JSContext *aCx, JS::Handle aScope) // QueryInterface implementation for HTMLUnknownElement NS_INTERFACE_TABLE_HEAD(HTMLUnknownElement) NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement) + NS_INTERFACE_TABLE_INHERITED1(HTMLUnknownElement, + nsIDOMHTMLUnknownElement) NS_INTERFACE_TABLE_TO_MAP_SEGUE NS_ELEMENT_INTERFACE_MAP_END diff --git a/content/html/content/src/HTMLUnknownElement.h b/content/html/content/src/HTMLUnknownElement.h index fa117c22edc..7cd566ce65a 100644 --- a/content/html/content/src/HTMLUnknownElement.h +++ b/content/html/content/src/HTMLUnknownElement.h @@ -2,17 +2,18 @@ /* 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/. */ -#ifndef mozilla_dom_HTMLUnknownElement_h -#define mozilla_dom_HTMLUnknownElement_h +#ifndef HTMLUnknownElement_h___ +#define HTMLUnknownElement_h___ #include "mozilla/Attributes.h" #include "nsGenericHTMLElement.h" +#include "nsIDOMHTMLUnknownElement.h" namespace mozilla { namespace dom { class HTMLUnknownElement MOZ_FINAL : public nsGenericHTMLElement - , public nsIDOMHTMLElement + , public nsIDOMHTMLUnknownElement { public: HTMLUnknownElement(already_AddRefed aNodeInfo) @@ -47,4 +48,4 @@ protected: } // namespace dom } // namespace mozilla -#endif /* mozilla_dom_HTMLUnknownElement_h */ +#endif /* HTMLUnknownElement_h___ */ diff --git a/content/html/content/test/test_bug389797.html b/content/html/content/test/test_bug389797.html index caf4938165d..a8726709064 100644 --- a/content/html/content/test/test_bug389797.html +++ b/content/html/content/test/test_bug389797.html @@ -246,9 +246,13 @@ for (var tag of allTags) { if (classInfoString != 'HTMLUnknownElement') { is(node instanceof HTMLUnknownElement, false, tagName(tag) + " is an instance of HTMLUnknownElement"); + is(node instanceof SpecialPowers.Ci.nsIDOMHTMLUnknownElement, false, + tagName(tag) + " is an instance of nsIDOMHTMLUnknownElement"); } else { is(node instanceof HTMLUnknownElement, true, tagName(tag) + " is an instance of HTMLUnknownElement"); + is(node instanceof SpecialPowers.Ci.nsIDOMHTMLUnknownElement, true, + tagName(tag) + " is an instance of nsIDOMHTMLUnknownElement"); } // Check that each node QIs to all the things we expect it to QI to diff --git a/dom/interfaces/html/moz.build b/dom/interfaces/html/moz.build index 864d29b9d31..e576cf9755f 100644 --- a/dom/interfaces/html/moz.build +++ b/dom/interfaces/html/moz.build @@ -65,6 +65,7 @@ XPIDL_SOURCES += [ 'nsIDOMHTMLTextAreaElement.idl', 'nsIDOMHTMLTitleElement.idl', 'nsIDOMHTMLUListElement.idl', + 'nsIDOMHTMLUnknownElement.idl', 'nsIDOMHTMLVideoElement.idl', 'nsIDOMMediaError.idl', 'nsIDOMMozBrowserFrame.idl', diff --git a/dom/interfaces/html/nsIDOMHTMLUnknownElement.idl b/dom/interfaces/html/nsIDOMHTMLUnknownElement.idl new file mode 100644 index 00000000000..9a53b81bd82 --- /dev/null +++ b/dom/interfaces/html/nsIDOMHTMLUnknownElement.idl @@ -0,0 +1,17 @@ +/* -*- 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 nsIDOMHTMLUnknownElement interface is the interface to an unknown HTML + * element. + * + * @see + */ +[scriptable, uuid(aa044a2d-4e9b-4fc5-8ad2-666da9062b36)] +interface nsIDOMHTMLUnknownElement : nsIDOMHTMLElement +{ +};