Bug 839116 part 2. Convert HTMLSharedElement to WebIDL. r=ms2ger
authorBoris Zbarsky <bzbarsky@mit.edu>
Fri, 08 Feb 2013 12:20:11 +0000
changeset 121288 cb74c00aff76d162da5005575ab691eeb9b03480
parent 121287 7cfb020b01ac8e1ffc83626750c63507703a0ee3
child 121289 33abe9d3d69197d16358ade476ed351893e9089c
push id24282
push userryanvm@gmail.com
push dateFri, 08 Feb 2013 22:23:58 +0000
treeherdermozilla-central@c1ee454506f6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersms2ger
bugs839116
milestone21.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 839116 part 2. Convert HTMLSharedElement to WebIDL. r=ms2ger
content/html/content/src/HTMLSharedElement.cpp
content/html/content/src/HTMLSharedElement.h
content/html/content/src/nsGenericHTMLElement.h
content/html/document/src/nsHTMLDocument.h
dom/bindings/Bindings.conf
dom/webidl/HTMLBaseElement.webidl
dom/webidl/HTMLDirectoryElement.webidl
dom/webidl/HTMLDocument.webidl
dom/webidl/HTMLHeadElement.webidl
dom/webidl/HTMLHtmlElement.webidl
dom/webidl/HTMLLIElement.webidl
dom/webidl/HTMLParamElement.webidl
dom/webidl/HTMLQuoteElement.webidl
dom/webidl/WebIDL.mk
--- a/content/html/content/src/HTMLSharedElement.cpp
+++ b/content/html/content/src/HTMLSharedElement.cpp
@@ -1,14 +1,20 @@
 /* -*- Mode: C++; 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 "mozilla/dom/HTMLSharedElement.h"
+#include "mozilla/dom/HTMLBaseElementBinding.h"
+#include "mozilla/dom/HTMLDirectoryElementBinding.h"
+#include "mozilla/dom/HTMLHeadElementBinding.h"
+#include "mozilla/dom/HTMLHtmlElementBinding.h"
+#include "mozilla/dom/HTMLParamElementBinding.h"
+#include "mozilla/dom/HTMLQuoteElementBinding.h"
 
 #include "nsAttrValueInlines.h"
 #include "nsStyleConsts.h"
 #include "nsRuleData.h"
 #include "nsMappedAttributes.h"
 #include "nsContentUtils.h"
 
 NS_IMPL_NS_NEW_HTML_ELEMENT(Shared)
@@ -350,10 +356,33 @@ HTMLSharedElement::GetAttributeMappingFu
 {
   if (mNodeInfo->Equals(nsGkAtoms::dir)) {
     return &DirectoryMapAttributesIntoRule;
   }
 
   return nsGenericHTMLElement::GetAttributeMappingFunction();
 }
 
+JSObject*
+HTMLSharedElement::WrapNode(JSContext *aCx, JSObject *aScope, bool *aTriedToWrap)
+{
+  if (mNodeInfo->Equals(nsGkAtoms::param)) {
+    return HTMLParamElementBinding::Wrap(aCx, aScope, this, aTriedToWrap);
+  }
+  if (mNodeInfo->Equals(nsGkAtoms::base)) {
+    return HTMLBaseElementBinding::Wrap(aCx, aScope, this, aTriedToWrap);
+  }
+  if (mNodeInfo->Equals(nsGkAtoms::dir)) {
+    return HTMLDirectoryElementBinding::Wrap(aCx, aScope, this, aTriedToWrap);
+  }
+  if (mNodeInfo->Equals(nsGkAtoms::q) ||
+      mNodeInfo->Equals(nsGkAtoms::blockquote)) {
+    return HTMLQuoteElementBinding::Wrap(aCx, aScope, this, aTriedToWrap);
+  }
+  if (mNodeInfo->Equals(nsGkAtoms::head)) {
+    return HTMLHeadElementBinding::Wrap(aCx, aScope, this, aTriedToWrap);
+  }
+  MOZ_ASSERT(mNodeInfo->Equals(nsGkAtoms::html));
+  return HTMLHtmlElementBinding::Wrap(aCx, aScope, this, aTriedToWrap);
+}
+
 } // namespace mozilla
 } // namespace dom
--- a/content/html/content/src/HTMLSharedElement.h
+++ b/content/html/content/src/HTMLSharedElement.h
@@ -11,31 +11,36 @@
 #include "nsIDOMHTMLDirectoryElement.h"
 #include "nsIDOMHTMLQuoteElement.h"
 #include "nsIDOMHTMLHeadElement.h"
 #include "nsIDOMHTMLHtmlElement.h"
 #include "nsGenericHTMLElement.h"
 
 #include "nsGkAtoms.h"
 
+#include "mozilla/Attributes.h"
+#include "mozilla/Assertions.h"
+
 namespace mozilla {
 namespace dom {
 
 class HTMLSharedElement : public nsGenericHTMLElement,
                           public nsIDOMHTMLParamElement,
                           public nsIDOMHTMLBaseElement,
                           public nsIDOMHTMLDirectoryElement,
                           public nsIDOMHTMLQuoteElement,
                           public nsIDOMHTMLHeadElement,
                           public nsIDOMHTMLHtmlElement
 {
 public:
   HTMLSharedElement(already_AddRefed<nsINodeInfo> aNodeInfo)
     : nsGenericHTMLElement(aNodeInfo)
-  {}
+  {
+    SetIsDOMBinding();
+  }
   virtual ~HTMLSharedElement();
 
   // nsISupports
   NS_DECL_ISUPPORTS_INHERITED
 
   // nsIDOMNode
   NS_FORWARD_NSIDOMNODE_TO_NSINODE
 
@@ -97,14 +102,112 @@ public:
     return static_cast<nsXPCClassInfo*>(GetClassInfoInternal());
   }
   nsIClassInfo* GetClassInfoInternal();
 
   virtual nsIDOMNode* AsDOMNode()
   {
     return static_cast<nsIDOMHTMLParamElement*>(this);
   }
+
+  // WebIDL API
+  // HTMLParamElement
+  void GetName(DOMString& aValue)
+  {
+    MOZ_ASSERT(mNodeInfo->Equals(nsGkAtoms::param));
+    GetHTMLAttr(nsGkAtoms::name, aValue);
+  }
+  void SetName(const nsAString& aValue, ErrorResult& aResult)
+  {
+    MOZ_ASSERT(mNodeInfo->Equals(nsGkAtoms::param));
+    SetHTMLAttr(nsGkAtoms::name, aValue, aResult);
+  }
+  void GetValue(DOMString& aValue)
+  {
+    MOZ_ASSERT(mNodeInfo->Equals(nsGkAtoms::param));
+    GetHTMLAttr(nsGkAtoms::value, aValue);
+  }
+  void SetValue(const nsAString& aValue, ErrorResult& aResult)
+  {
+    MOZ_ASSERT(mNodeInfo->Equals(nsGkAtoms::param));
+    SetHTMLAttr(nsGkAtoms::value, aValue, aResult);
+  }
+  void GetType(DOMString& aValue)
+  {
+    MOZ_ASSERT(mNodeInfo->Equals(nsGkAtoms::param));
+    GetHTMLAttr(nsGkAtoms::type, aValue);
+  }
+  void SetType(const nsAString& aValue, ErrorResult& aResult)
+  {
+    MOZ_ASSERT(mNodeInfo->Equals(nsGkAtoms::param));
+    SetHTMLAttr(nsGkAtoms::type, aValue, aResult);
+  }
+  void GetValueType(DOMString& aValue)
+  {
+    MOZ_ASSERT(mNodeInfo->Equals(nsGkAtoms::param));
+    GetHTMLAttr(nsGkAtoms::valuetype, aValue);
+  }
+  void SetValueType(const nsAString& aValue, ErrorResult& aResult)
+  {
+    MOZ_ASSERT(mNodeInfo->Equals(nsGkAtoms::param));
+    SetHTMLAttr(nsGkAtoms::valuetype, aValue, aResult);
+  }
+
+  // HTMLBaseElement
+  void GetTarget(DOMString& aValue)
+  {
+    MOZ_ASSERT(mNodeInfo->Equals(nsGkAtoms::base));
+    GetHTMLAttr(nsGkAtoms::target, aValue);
+  }
+  void SetTarget(const nsAString& aValue, ErrorResult& aResult)
+  {
+    MOZ_ASSERT(mNodeInfo->Equals(nsGkAtoms::base));
+    SetHTMLAttr(nsGkAtoms::target, aValue, aResult);
+  }
+  // The XPCOM GetHref is fine for us
+  void SetHref(const nsAString& aValue, ErrorResult& aResult)
+  {
+    MOZ_ASSERT(mNodeInfo->Equals(nsGkAtoms::base));
+    SetHTMLAttr(nsGkAtoms::href, aValue, aResult);
+  }
+
+  // HTMLDirectoryElement
+  bool Compact() const
+  {
+    MOZ_ASSERT(mNodeInfo->Equals(nsGkAtoms::dir));
+    return GetBoolAttr(nsGkAtoms::compact);
+  }
+  void SetCompact(bool aCompact, ErrorResult& aResult)
+  {
+    MOZ_ASSERT(mNodeInfo->Equals(nsGkAtoms::dir));
+    SetHTMLBoolAttr(nsGkAtoms::compact, aCompact, aResult);
+  }
+
+  // HTMLQuoteElement
+  // The XPCOM GetCite works fine for us
+  void SetCite(const nsAString& aValue, ErrorResult& aResult)
+  {
+    MOZ_ASSERT(mNodeInfo->Equals(nsGkAtoms::q) ||
+               mNodeInfo->Equals(nsGkAtoms::blockquote));
+    SetHTMLAttr(nsGkAtoms::cite, aValue, aResult);
+  }
+
+  // HTMLHtmlElement
+  void GetVersion(DOMString& aValue)
+  {
+    MOZ_ASSERT(mNodeInfo->Equals(nsGkAtoms::html));
+    GetHTMLAttr(nsGkAtoms::version, aValue);
+  }
+  void SetVersion(const nsAString& aValue, ErrorResult& aResult)
+  {
+    MOZ_ASSERT(mNodeInfo->Equals(nsGkAtoms::html));
+    SetHTMLAttr(nsGkAtoms::version, aValue, aResult);
+  }
+
+protected:
+  virtual JSObject* WrapNode(JSContext* aCx, JSObject* aScope,
+                             bool* aTriedToWrap) MOZ_OVERRIDE;
 };
 
 } // namespace mozilla
 } // namespace dom
 
 #endif // mozilla_dom_HTMLSharedElement_h
--- a/content/html/content/src/nsGenericHTMLElement.h
+++ b/content/html/content/src/nsGenericHTMLElement.h
@@ -779,16 +779,20 @@ protected:
     GetEventListenerManagerForAttr(nsIAtom* aAttrName, bool* aDefer);
 
   virtual const nsAttrName* InternalGetExistingAttrNameFromQName(const nsAString& aStr) const;
 
   void GetHTMLAttr(nsIAtom* aName, nsAString& aResult) const
   {
     GetAttr(kNameSpaceID_None, aName, aResult);
   }
+  void GetHTMLAttr(nsIAtom* aName, mozilla::dom::DOMString& aResult) const
+  {
+    GetAttr(kNameSpaceID_None, aName, aResult);
+  }
   void GetHTMLEnumAttr(nsIAtom* aName, nsAString& aResult) const
   {
     GetEnumAttr(aName, nullptr, aResult);
   }
   void GetHTMLURIAttr(nsIAtom* aName, nsAString& aResult) const
   {
     GetURIAttr(aName, nullptr, aResult);
   }
--- a/content/html/document/src/nsHTMLDocument.h
+++ b/content/html/document/src/nsHTMLDocument.h
@@ -20,16 +20,17 @@
 #include "nsHTMLStyleSheet.h"
 
 // Document.Write() related
 #include "nsIWyciwygChannel.h"
 #include "nsILoadGroup.h"
 #include "nsNetUtil.h"
 
 #include "nsICommandManager.h"
+#include "mozilla/dom/HTMLSharedElement.h"
 
 class nsIEditor;
 class nsIEditorDocShell;
 class nsIParser;
 class nsIURI;
 class nsIMarkupDocumentViewer;
 class nsIDocShell;
 class nsICachingChannel;
@@ -177,17 +178,19 @@ public:
 
   // WebIDL API
   void GetDomain(nsAString& aDomain, mozilla::ErrorResult& rv);
   void SetDomain(const nsAString& aDomain, mozilla::ErrorResult& rv);
   void GetCookie(nsAString& aCookie, mozilla::ErrorResult& rv);
   void SetCookie(const nsAString& aCookie, mozilla::ErrorResult& rv);
   nsGenericHTMLElement *GetBody();
   void SetBody(nsGenericHTMLElement* aBody, mozilla::ErrorResult& rv);
-  Element *GetHead() { return GetHeadElement(); }
+  mozilla::dom::HTMLSharedElement *GetHead() {
+    return static_cast<mozilla::dom::HTMLSharedElement*>(GetHeadElement());
+  }
   nsIHTMLCollection* Images();
   nsIHTMLCollection* Embeds();
   nsIHTMLCollection* Plugins();
   nsIHTMLCollection* Links();
   nsIHTMLCollection* Forms()
   {
     return nsHTMLDocument::GetForms();
   }
--- a/dom/bindings/Bindings.conf
+++ b/dom/bindings/Bindings.conf
@@ -344,16 +344,20 @@ DOMInterfaces = {
 
 'HTMLAnchorElement': {
     'binaryNames': {
         '__stringifier': 'Stringify'
     },
     'hasInstanceInterface': 'nsIDOMHTMLAnchorElement',
 },
 
+'HTMLBaseElement': {
+    'nativeType': 'mozilla::dom::HTMLSharedElement'
+},
+
 'HTMLBodyElement': {
     'hasInstanceInterface': 'nsIDOMHTMLBodyElement',
 },
 
 'HTMLBRElement': {
     'hasInstanceInterface': 'nsIDOMHTMLBRElement',
 },
 
@@ -363,16 +367,20 @@ DOMInterfaces = {
 },
 
 'HTMLDataListElement': {
     'resultNotAddRefed': [
         'options'
     ]
 },
 
+'HTMLDirectoryElement': {
+    'nativeType': 'mozilla::dom::HTMLSharedElement'
+},
+
 'HTMLDivElement': {
   'hasInstanceInterface': 'nsIDOMHTMLDivElement',
 },
 
 'HTMLDListElement': {
     'nativeType' : 'mozilla::dom::HTMLSharedListElement'
 },
 
@@ -395,24 +403,32 @@ DOMInterfaces = {
         'offsetParent'
     ]
 },
 
 'HTMLFrameSetElement': {
     'hasInstanceInterface': 'nsIDOMHTMLFrameSetElement',
 },
 
+'HTMLHeadElement': {
+    'nativeType': 'mozilla::dom::HTMLSharedElement'
+},
+
 'HTMLHeadingElement': {
     'hasInstanceInterface': 'nsIDOMHTMLHeadingElement',
 },
 
 'HTMLHRElement': {
     'hasInstanceInterface': 'nsIDOMHTMLHRElement',
 },
 
+'HTMLHtmlElement': {
+    'nativeType': 'mozilla::dom::HTMLSharedElement'
+},
+
 'HTMLImageElement': {
     'hasInstanceInterface': 'nsIDOMHTMLImageElement',
 },
 
 'HTMLLabelElement': {
     'resultNotAddRefed': [
         'form', 'control'
     ],
@@ -452,25 +468,33 @@ DOMInterfaces = {
         '__indexedsettercreator': 'SetOption'
     }
 },
 
 'HTMLParagraphElement': {
     'hasInstanceInterface': 'nsIDOMHTMLParagraphElement',
 },
 
+'HTMLParamElement': {
+    'nativeType': 'mozilla::dom::HTMLSharedElement'
+},
+
 'HTMLPreElement': {
     'hasInstanceInterface': 'nsIDOMHTMLPreElement',
 },
 
 'HTMLPropertiesCollection': {
     'headerFile': 'HTMLPropertiesCollection.h',
     'resultNotAddRefed': [ 'item', 'namedItem', 'names' ]
 },
 
+'HTMLQuoteElement': {
+    'nativeType': 'mozilla::dom::HTMLSharedElement'
+},
+
 'HTMLScriptElement': {
   'hasInstanceInterface': 'nsIDOMHTMLScriptElement',
 },
 
 'HTMLSourceElement': {
     'hasInstanceInterface': 'nsIDOMHTMLSourceElement',
 },
 
@@ -1253,17 +1277,16 @@ addExternalIface('CanvasGradient', heade
 addExternalIface('CanvasPattern', headerFile='nsIDOMCanvasRenderingContext2D.h')
 addExternalIface('ClientRect')
 addExternalIface("Counter")
 addExternalIface('CSSRule')
 addExternalIface('DOMRequest')
 addExternalIface('DOMStringList')
 addExternalIface('File')
 addExternalIface('HitRegionOptions', nativeType='nsISupports')
-addExternalIface('HTMLHeadElement', nativeType='mozilla::dom::Element')
 addExternalIface('HTMLCanvasElement', nativeType='mozilla::dom::HTMLCanvasElement')
 addExternalIface('imgINotificationObserver', nativeType='imgINotificationObserver')
 addExternalIface('imgIRequest', nativeType='imgIRequest', notflattened=True)
 addExternalIface('LockedFile')
 addExternalIface('MozBoxObject', nativeType='nsIBoxObject')
 addExternalIface('MozControllers', nativeType='nsIControllers')
 addExternalIface('MozFrameLoader', nativeType='nsIFrameLoader', notflattened=True)
 addExternalIface('MozRDFCompositeDataSource', nativeType='nsIRDFCompositeDataSource',
copy from dom/webidl/HTMLLIElement.webidl
copy to dom/webidl/HTMLBaseElement.webidl
--- a/dom/webidl/HTMLLIElement.webidl
+++ b/dom/webidl/HTMLBaseElement.webidl
@@ -1,25 +1,21 @@
 /* -*- 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/.
  *
  * The origin of this IDL file is
- * http://www.whatwg.org/specs/web-apps/current-work/#the-li-element
- * http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
+ * http://www.whatwg.org/specs/web-apps/current-work/#the-base-element
  *
  *  Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  * Opera Software ASA. You are granted a license to use, reproduce
  * and create derivative works of this document.
  */
 
-// http://www.whatwg.org/specs/web-apps/current-work/#the-li-element
-interface HTMLLIElement : HTMLElement {
-           [SetterThrows]
-           attribute long value;
+// http://www.whatwg.org/specs/web-apps/current-work/#the-base-element
+interface HTMLBaseElement : HTMLElement {
+           [SetterThrows, Pure]
+           attribute DOMString href;
+           [SetterThrows, Pure]
+           attribute DOMString target;
 };
 
-// http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
-partial interface HTMLLIElement {
-           [SetterThrows]
-           attribute DOMString type;
-};
copy from dom/webidl/HTMLLIElement.webidl
copy to dom/webidl/HTMLDirectoryElement.webidl
--- a/dom/webidl/HTMLLIElement.webidl
+++ b/dom/webidl/HTMLDirectoryElement.webidl
@@ -1,25 +1,19 @@
 /* -*- 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/.
  *
  * The origin of this IDL file is
- * http://www.whatwg.org/specs/web-apps/current-work/#the-li-element
  * http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
  *
  *  Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  * Opera Software ASA. You are granted a license to use, reproduce
  * and create derivative works of this document.
  */
 
-// http://www.whatwg.org/specs/web-apps/current-work/#the-li-element
-interface HTMLLIElement : HTMLElement {
-           [SetterThrows]
-           attribute long value;
+// http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
+interface HTMLDirectoryElement : HTMLElement {
+           [SetterThrows, Pure]
+           attribute boolean compact;
 };
 
-// http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
-partial interface HTMLLIElement {
-           [SetterThrows]
-           attribute DOMString type;
-};
--- a/dom/webidl/HTMLDocument.webidl
+++ b/dom/webidl/HTMLDocument.webidl
@@ -1,15 +1,14 @@
 /* -*- 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/.
  */
 
-interface HTMLHeadElement;
 interface Selection;
 
 interface HTMLDocument : Document {
            [Throws]
            attribute DOMString? domain;
            [Throws]
            attribute DOMString cookie;
   // DOM tree accessors
copy from dom/webidl/HTMLLIElement.webidl
copy to dom/webidl/HTMLHeadElement.webidl
--- a/dom/webidl/HTMLLIElement.webidl
+++ b/dom/webidl/HTMLHeadElement.webidl
@@ -1,25 +1,16 @@
 /* -*- 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/.
  *
  * The origin of this IDL file is
- * http://www.whatwg.org/specs/web-apps/current-work/#the-li-element
- * http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
+ * http://www.whatwg.org/specs/web-apps/current-work/#the-head-element
  *
  *  Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  * Opera Software ASA. You are granted a license to use, reproduce
  * and create derivative works of this document.
  */
 
-// http://www.whatwg.org/specs/web-apps/current-work/#the-li-element
-interface HTMLLIElement : HTMLElement {
-           [SetterThrows]
-           attribute long value;
-};
+// http://www.whatwg.org/specs/web-apps/current-work/#the-head-element
+interface HTMLHeadElement : HTMLElement {};
 
-// http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
-partial interface HTMLLIElement {
-           [SetterThrows]
-           attribute DOMString type;
-};
copy from dom/webidl/HTMLLIElement.webidl
copy to dom/webidl/HTMLHtmlElement.webidl
--- a/dom/webidl/HTMLLIElement.webidl
+++ b/dom/webidl/HTMLHtmlElement.webidl
@@ -1,25 +1,22 @@
 /* -*- 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/.
  *
  * The origin of this IDL file is
- * http://www.whatwg.org/specs/web-apps/current-work/#the-li-element
+ * http://www.whatwg.org/specs/web-apps/current-work/#the-html-element
  * http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
  *
  *  Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  * Opera Software ASA. You are granted a license to use, reproduce
  * and create derivative works of this document.
  */
 
-// http://www.whatwg.org/specs/web-apps/current-work/#the-li-element
-interface HTMLLIElement : HTMLElement {
-           [SetterThrows]
-           attribute long value;
-};
+// http://www.whatwg.org/specs/web-apps/current-work/#the-html-element
+interface HTMLHtmlElement : HTMLElement {};
 
 // http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
-partial interface HTMLLIElement {
-           [SetterThrows]
-           attribute DOMString type;
+partial interface HTMLHtmlElement {
+           [SetterThrows, Pure]
+           attribute DOMString version;
 };
--- a/dom/webidl/HTMLLIElement.webidl
+++ b/dom/webidl/HTMLLIElement.webidl
@@ -9,17 +9,17 @@
  *
  *  Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  * Opera Software ASA. You are granted a license to use, reproduce
  * and create derivative works of this document.
  */
 
 // http://www.whatwg.org/specs/web-apps/current-work/#the-li-element
 interface HTMLLIElement : HTMLElement {
-           [SetterThrows]
+           [SetterThrows, Pure]
            attribute long value;
 };
 
 // http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
 partial interface HTMLLIElement {
-           [SetterThrows]
+           [SetterThrows, Pure]
            attribute DOMString type;
 };
copy from dom/webidl/HTMLLIElement.webidl
copy to dom/webidl/HTMLParamElement.webidl
--- a/dom/webidl/HTMLLIElement.webidl
+++ b/dom/webidl/HTMLParamElement.webidl
@@ -1,25 +1,29 @@
 /* -*- 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/.
  *
  * The origin of this IDL file is
- * http://www.whatwg.org/specs/web-apps/current-work/#the-li-element
+ * http://www.whatwg.org/specs/web-apps/current-work/#the-param-element
  * http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
  *
  *  Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  * Opera Software ASA. You are granted a license to use, reproduce
  * and create derivative works of this document.
  */
 
-// http://www.whatwg.org/specs/web-apps/current-work/#the-li-element
-interface HTMLLIElement : HTMLElement {
-           [SetterThrows]
-           attribute long value;
+// http://www.whatwg.org/specs/web-apps/current-work/#the-param-element
+interface HTMLParamElement : HTMLElement {
+           [SetterThrows, Pure]
+           attribute DOMString name;
+           [SetterThrows, Pure]
+           attribute DOMString value;
 };
 
 // http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
-partial interface HTMLLIElement {
-           [SetterThrows]
+partial interface HTMLParamElement {
+           [SetterThrows, Pure]
            attribute DOMString type;
+           [SetterThrows, Pure]
+           attribute DOMString valueType;
 };
copy from dom/webidl/HTMLLIElement.webidl
copy to dom/webidl/HTMLQuoteElement.webidl
--- a/dom/webidl/HTMLLIElement.webidl
+++ b/dom/webidl/HTMLQuoteElement.webidl
@@ -1,25 +1,19 @@
 /* -*- 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/.
  *
  * The origin of this IDL file is
- * http://www.whatwg.org/specs/web-apps/current-work/#the-li-element
- * http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
+ * http://www.whatwg.org/specs/web-apps/current-work/#the-blockquote-element
  *
  *  Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  * Opera Software ASA. You are granted a license to use, reproduce
  * and create derivative works of this document.
  */
 
-// http://www.whatwg.org/specs/web-apps/current-work/#the-li-element
-interface HTMLLIElement : HTMLElement {
-           [SetterThrows]
-           attribute long value;
+// http://www.whatwg.org/specs/web-apps/current-work/#the-blockquote-element
+interface HTMLQuoteElement : HTMLElement {
+           [SetterThrows, Pure]
+           attribute DOMString cite;
 };
 
-// http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
-partial interface HTMLLIElement {
-           [SetterThrows]
-           attribute DOMString type;
-};
--- a/dom/webidl/WebIDL.mk
+++ b/dom/webidl/WebIDL.mk
@@ -52,40 +52,46 @@ webidl_files = \
   File.webidl \
   FileHandle.webidl \
   FileList.webidl \
   FileReaderSync.webidl \
   FormData.webidl \
   Function.webidl \
   GainNode.webidl \
   HTMLAnchorElement.webidl \
+  HTMLBaseElement.webidl \
   HTMLBodyElement.webidl \
   HTMLBRElement.webidl \
   HTMLCollection.webidl \
   HTMLDataListElement.webidl \
+  HTMLDirectoryElement.webidl \
   HTMLDivElement.webidl \
   HTMLDListElement.webidl \
   HTMLDocument.webidl \
   HTMLElement.webidl \
   HTMLFontElement.webidl \
   HTMLFrameSetElement.webidl \
+  HTMLHeadElement.webidl \
   HTMLHeadingElement.webidl \
   HTMLHRElement.webidl \
+  HTMLHtmlElement.webidl \
   HTMLImageElement.webidl \
   HTMLLabelElement.webidl \
   HTMLLIElement.webidl \
   HTMLMapElement.webidl \
   HTMLMetaElement.webidl \
   HTMLMeterElement.webidl \
   HTMLModElement.webidl \
   HTMLOListElement.webidl \
   HTMLOptionsCollection.webidl \
   HTMLParagraphElement.webidl \
+  HTMLParamElement.webidl \
   HTMLPreElement.webidl \
   HTMLPropertiesCollection.webidl \
+  HTMLQuoteElement.webidl \
   HTMLScriptElement.webidl \
   HTMLSpanElement.webidl \
   HTMLStyleElement.webidl \
   HTMLTableCaptionElement.webidl \
   HTMLTableCellElement.webidl \
   HTMLTableColElement.webidl \
   HTMLTableElement.webidl \
   HTMLTableRowElement.webidl \