aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/script
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/script')
-rw-r--r--src/components/script/dom/bindings/codegen/Bindings.conf6
-rw-r--r--src/components/script/dom/bindings/codegen/CodegenRust.py6
-rw-r--r--src/components/script/dom/bindings/codegen/HTMLInputElement.webidl189
-rw-r--r--src/components/script/dom/bindings/codegen/HTMLLIElement.webidl28
-rw-r--r--src/components/script/dom/bindings/codegen/HTMLProgressElement.webidl27
-rw-r--r--src/components/script/dom/bindings/codegen/HTMLQuoteElement.webidl19
-rw-r--r--src/components/script/dom/bindings/codegen/HTMLTableCellElement.webidl53
-rw-r--r--src/components/script/dom/bindings/codegen/HTMLTableColElement.webidl30
-rw-r--r--src/components/script/dom/bindings/conversions.rs16
-rw-r--r--src/components/script/dom/bindings/node.rs24
-rw-r--r--src/components/script/dom/element.rs45
-rw-r--r--src/components/script/dom/htmlinputelement.rs285
-rw-r--r--src/components/script/dom/htmllielement.rs26
-rw-r--r--src/components/script/dom/htmlprogresselement.rs34
-rw-r--r--src/components/script/dom/htmlquoteelement.rs19
-rw-r--r--src/components/script/dom/htmltablecellelement.rs117
-rw-r--r--src/components/script/dom/htmltablecolelement.rs54
-rw-r--r--src/components/script/html/hubbub_html_parser.rs31
-rw-r--r--src/components/script/script.rc16
19 files changed, 995 insertions, 30 deletions
diff --git a/src/components/script/dom/bindings/codegen/Bindings.conf b/src/components/script/dom/bindings/codegen/Bindings.conf
index 69c9dd5ab51..e78a55ecbd1 100644
--- a/src/components/script/dom/bindings/codegen/Bindings.conf
+++ b/src/components/script/dom/bindings/codegen/Bindings.conf
@@ -561,16 +561,22 @@ addHTMLElement('HTMLHtmlElement')
addHTMLElement('HTMLHRElement')
addHTMLElement('HTMLIFrameElement')
addHTMLElement('HTMLImageElement')
+addHTMLElement('HTMLInputElement')
+addHTMLElement('HTMLLIElement')
addHTMLElement('HTMLLinkElement')
addHTMLElement('HTMLMetaElement')
addHTMLElement('HTMLOListElement')
addHTMLElement('HTMLParagraphElement')
+addHTMLElement('HTMLProgressElement')
+addHTMLElement('HTMLQuoteElement')
addHTMLElement('HTMLScriptElement')
addHTMLElement('HTMLSourceElement')
addHTMLElement('HTMLSpanElement')
addHTMLElement('HTMLStyleElement')
addHTMLElement('HTMLTableCaptionElement')
addHTMLElement('HTMLTableElement')
+addHTMLElement('HTMLTableCellElement')
+addHTMLElement('HTMLTableColElement')
addHTMLElement('HTMLTableRowElement')
addHTMLElement('HTMLTableSectionElement')
addHTMLElement('HTMLTextAreaElement')
diff --git a/src/components/script/dom/bindings/codegen/CodegenRust.py b/src/components/script/dom/bindings/codegen/CodegenRust.py
index 194280de15a..acf677d6b7d 100644
--- a/src/components/script/dom/bindings/codegen/CodegenRust.py
+++ b/src/components/script/dom/bindings/codegen/CodegenRust.py
@@ -4631,14 +4631,20 @@ class CGBindingRoot(CGThing):
'dom::htmlhrelement::HTMLHRElement',
'dom::htmliframeelement::HTMLIFrameElement', #XXXjdm
'dom::htmlimageelement::HTMLImageElement', #XXXjdm
+ 'dom::htmlinputelement::HTMLInputElement',
+ 'dom::htmllielement::HTMLLIElement',
'dom::htmllinkelement::HTMLLinkElement', #XXXrecrack
'dom::htmlmetaelement::HTMLMetaElement',
'dom::htmlolistelement::HTMLOListElement',
+ 'dom::htmlprogresselement::HTMLProgressElement',
+ 'dom::htmlquoteelement::HTMLQuoteElement',
'dom::htmlscriptelement::HTMLScriptElement',
'dom::htmlsourceelement::HTMLSourceElement',
'dom::htmlstyleelement::HTMLStyleElement',
'dom::htmltablecaptionelement::HTMLTableCaptionElement',
'dom::htmltableelement::HTMLTableElement',
+ 'dom::htmltablecellelement::HTMLTableCellElement',
+ 'dom::htmltablecolelement::HTMLTableColElement',
'dom::htmltablerowelement::HTMLTableRowElement',
'dom::htmltablesectionelement::HTMLTableSectionElement',
'dom::htmltextareaelement::HTMLTextAreaElement',
diff --git a/src/components/script/dom/bindings/codegen/HTMLInputElement.webidl b/src/components/script/dom/bindings/codegen/HTMLInputElement.webidl
new file mode 100644
index 00000000000..d55241ef4fc
--- /dev/null
+++ b/src/components/script/dom/bindings/codegen/HTMLInputElement.webidl
@@ -0,0 +1,189 @@
+/* -*- 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-input-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.
+ */
+
+// original import from:
+// http://hg.mozilla.org/mozilla-central/filelog/8c240c67f76c/dom/webidl/HTMLInputElement.webidl
+
+/*
+interface nsIControllers;
+*/
+
+interface HTMLInputElement : HTMLElement {
+ [Pure, SetterThrows]
+ attribute DOMString accept;
+ [Pure, SetterThrows]
+ attribute DOMString alt;
+ [Pure, SetterThrows]
+ attribute DOMString autocomplete;
+ [Pure, SetterThrows]
+ attribute boolean autofocus;
+ [Pure, SetterThrows]
+ attribute boolean defaultChecked;
+ [Pure]
+ attribute boolean checked;
+/*
+ attribute DOMString dirName;
+*/
+ [Pure, SetterThrows]
+ attribute boolean disabled;
+/*
+ readonly attribute HTMLFormElement? form;
+ [Pure]
+ readonly attribute FileList? files;
+*/
+ [Pure, SetterThrows]
+ attribute DOMString formAction;
+ [Pure, SetterThrows]
+ attribute DOMString formEnctype;
+ [Pure, SetterThrows]
+ attribute DOMString formMethod;
+ [Pure, SetterThrows]
+ attribute boolean formNoValidate;
+ [Pure, SetterThrows]
+ attribute DOMString formTarget;
+ [Pure, SetterThrows]
+ attribute unsigned long height;
+ [Pure]
+ attribute boolean indeterminate;
+ [Pure, SetterThrows]
+ attribute DOMString inputMode;
+/*
+ [Pure]
+ readonly attribute HTMLElement? list;
+*/
+ [Pure, SetterThrows]
+ attribute DOMString max;
+ [Pure, SetterThrows]
+ attribute long maxLength;
+ [Pure, SetterThrows]
+ attribute DOMString min;
+ [Pure, SetterThrows]
+ attribute boolean multiple;
+ [Pure, SetterThrows]
+ attribute DOMString name;
+ [Pure, SetterThrows]
+ attribute DOMString pattern;
+ [Pure, SetterThrows]
+ attribute DOMString placeholder;
+ [Pure, SetterThrows]
+ attribute boolean readOnly;
+ [Pure, SetterThrows]
+ attribute boolean required;
+ [Pure, SetterThrows]
+ attribute unsigned long size;
+ [Pure, SetterThrows]
+ attribute DOMString src;
+ [Pure, SetterThrows]
+ attribute DOMString step;
+ [Pure, SetterThrows]
+ attribute DOMString type;
+ [Pure, SetterThrows]
+ attribute DOMString defaultValue;
+ [Pure, TreatNullAs=EmptyString, SetterThrows]
+ attribute DOMString value;
+/*
+ [Throws, Pref="dom.experimental_forms"]
+ attribute Date? valueAsDate;
+ [Pure, SetterThrows]
+ attribute unrestricted double valueAsNumber;
+*/
+ attribute unsigned long width;
+/*
+ [Throws]
+ void stepUp(optional long n = 1);
+ [Throws]
+ void stepDown(optional long n = 1);
+*/
+
+ [Pure]
+ readonly attribute boolean willValidate;
+/*
+ [Pure]
+ readonly attribute ValidityState validity;
+*/
+ [GetterThrows]
+ readonly attribute DOMString validationMessage;
+ boolean checkValidity();
+ void setCustomValidity(DOMString error);
+
+/*
+ readonly attribute NodeList labels;
+*/
+
+ void select();
+
+ [Throws]
+ // TODO: unsigned vs signed
+ attribute long selectionStart;
+ [Throws]
+ attribute long selectionEnd;
+ [Throws]
+ attribute DOMString selectionDirection;
+/*
+ // Bug 850364 void setRangeText(DOMString replacement);
+ // Bug 850364 setRangeText(DOMString replacement, unsigned long start, unsigned long end, optional SelectionMode selectionMode);
+*/
+ // also has obsolete members
+};
+
+partial interface HTMLInputElement {
+ [Pure, SetterThrows]
+ attribute DOMString align;
+ [Pure, SetterThrows]
+ attribute DOMString useMap;
+};
+
+/*
+// Mozilla extensions
+partial interface HTMLInputElement {
+ [Throws]
+ void setSelectionRange(long start, long end, optional DOMString direction);
+
+ [GetterThrows]
+ readonly attribute nsIControllers controllers;
+ [GetterThrows]
+ readonly attribute long textLength;
+
+ [ChromeOnly]
+ sequence<DOMString> mozGetFileNameArray();
+
+ [ChromeOnly]
+ void mozSetFileNameArray(sequence<DOMString> fileNames);
+
+ boolean mozIsTextField(boolean aExcludePassword);
+};
+
+partial interface HTMLInputElement {
+ // Mirrored chrome-only nsIDOMNSEditableElement methods. Please make sure
+ // to update this list if nsIDOMNSEditableElement changes.
+
+ [Pure, ChromeOnly]
+ readonly attribute nsIEditor? editor;
+
+ // This is similar to set .value on nsIDOMInput/TextAreaElements, but handling
+ // of the value change is closer to the normal user input, so 'change' event
+ // for example will be dispatched when focusing out the element.
+ [ChromeOnly]
+ void setUserInput(DOMString input);
+};
+
+[NoInterfaceObject]
+interface MozPhonetic {
+ [Pure, ChromeOnly]
+ readonly attribute DOMString phonetic;
+};
+
+HTMLInputElement implements MozImageLoadingContent;
+HTMLInputElement implements MozPhonetic;
+*/
diff --git a/src/components/script/dom/bindings/codegen/HTMLLIElement.webidl b/src/components/script/dom/bindings/codegen/HTMLLIElement.webidl
new file mode 100644
index 00000000000..b3c5f37fed7
--- /dev/null
+++ b/src/components/script/dom/bindings/codegen/HTMLLIElement.webidl
@@ -0,0 +1,28 @@
+/* -*- 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.
+ */
+
+// original import from
+// http://hg.mozilla.org/mozilla-central/filelog/8c240c67f76c/dom/webidl/HTMLLIElement.webidl
+
+// http://www.whatwg.org/specs/web-apps/current-work/#the-li-element
+interface HTMLLIElement : HTMLElement {
+ [SetterThrows, Pure]
+ attribute long value;
+};
+
+// http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
+partial interface HTMLLIElement {
+ [SetterThrows, Pure]
+ attribute DOMString type;
+};
diff --git a/src/components/script/dom/bindings/codegen/HTMLProgressElement.webidl b/src/components/script/dom/bindings/codegen/HTMLProgressElement.webidl
new file mode 100644
index 00000000000..99cffb8c35d
--- /dev/null
+++ b/src/components/script/dom/bindings/codegen/HTMLProgressElement.webidl
@@ -0,0 +1,27 @@
+/* -*- 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-progress-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.
+ */
+
+// original import from:
+// http://hg.mozilla.org/mozilla-central/filelog/8c240c67f76c/dom/webidl/HTMLProgressElement.webidl
+
+interface HTMLProgressElement : HTMLElement {
+ [SetterThrows]
+ attribute double value;
+ [SetterThrows]
+ attribute double max;
+ readonly attribute double position;
+
+/*
+ readonly attribute NodeList labels;
+*/
+};
diff --git a/src/components/script/dom/bindings/codegen/HTMLQuoteElement.webidl b/src/components/script/dom/bindings/codegen/HTMLQuoteElement.webidl
new file mode 100644
index 00000000000..a266dd353a1
--- /dev/null
+++ b/src/components/script/dom/bindings/codegen/HTMLQuoteElement.webidl
@@ -0,0 +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-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-blockquote-element
+interface HTMLQuoteElement : HTMLElement {
+ [SetterThrows, Pure]
+ attribute DOMString cite;
+};
+
diff --git a/src/components/script/dom/bindings/codegen/HTMLTableCellElement.webidl b/src/components/script/dom/bindings/codegen/HTMLTableCellElement.webidl
new file mode 100644
index 00000000000..b1fed450fac
--- /dev/null
+++ b/src/components/script/dom/bindings/codegen/HTMLTableCellElement.webidl
@@ -0,0 +1,53 @@
+/* -*- 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/
+ *
+ * © 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.
+ */
+
+interface HTMLTableCellElement : HTMLElement {
+ [SetterThrows]
+ attribute unsigned long colSpan;
+ [SetterThrows]
+ attribute unsigned long rowSpan;
+/*
+ [PutForwards=value] readonly attribute DOMSettableTokenList headers;
+*/
+ [SetterThrows]
+ attribute DOMString headers;
+ readonly attribute long cellIndex;
+
+ // Mozilla-specific extensions
+ [SetterThrows]
+ attribute DOMString abbr;
+ [SetterThrows]
+ attribute DOMString scope;
+};
+
+partial interface HTMLTableCellElement {
+ [SetterThrows]
+ attribute DOMString align;
+ [SetterThrows]
+ attribute DOMString axis;
+ [SetterThrows]
+ attribute DOMString height;
+ [SetterThrows]
+ attribute DOMString width;
+
+ [SetterThrows]
+ attribute DOMString ch;
+ [SetterThrows]
+ attribute DOMString chOff;
+ [SetterThrows]
+ attribute boolean noWrap;
+ [SetterThrows]
+ attribute DOMString vAlign;
+
+ [TreatNullAs=EmptyString, SetterThrows] attribute DOMString bgColor;
+};
diff --git a/src/components/script/dom/bindings/codegen/HTMLTableColElement.webidl b/src/components/script/dom/bindings/codegen/HTMLTableColElement.webidl
new file mode 100644
index 00000000000..c927541a3dc
--- /dev/null
+++ b/src/components/script/dom/bindings/codegen/HTMLTableColElement.webidl
@@ -0,0 +1,30 @@
+/* -*- 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/
+ *
+ * © 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.
+ */
+
+interface HTMLTableColElement : HTMLElement {
+ [SetterThrows]
+ attribute unsigned long span;
+};
+
+partial interface HTMLTableColElement {
+ [SetterThrows]
+ attribute DOMString align;
+ [SetterThrows]
+ attribute DOMString ch;
+ [SetterThrows]
+ attribute DOMString chOff;
+ [SetterThrows]
+ attribute DOMString vAlign;
+ [SetterThrows]
+ attribute DOMString width;
+};
diff --git a/src/components/script/dom/bindings/conversions.rs b/src/components/script/dom/bindings/conversions.rs
index 14c9f3b5949..81f71bcc78e 100644
--- a/src/components/script/dom/bindings/conversions.rs
+++ b/src/components/script/dom/bindings/conversions.rs
@@ -85,4 +85,18 @@ impl JSValConvertible for f32 {
Some(RUST_JSVAL_TO_DOUBLE(val) as f32)
}
}
-} \ No newline at end of file
+}
+
+impl JSValConvertible for f64 {
+ fn to_jsval(&self) -> JSVal {
+ unsafe {
+ RUST_DOUBLE_TO_JSVAL(*self as f64)
+ }
+ }
+
+ fn from_jsval(val: JSVal) -> Option<f64> {
+ unsafe {
+ Some(RUST_JSVAL_TO_DOUBLE(val) as f64)
+ }
+ }
+}
diff --git a/src/components/script/dom/bindings/node.rs b/src/components/script/dom/bindings/node.rs
index 02d505dbcb3..f69fd1f2225 100644
--- a/src/components/script/dom/bindings/node.rs
+++ b/src/components/script/dom/bindings/node.rs
@@ -13,12 +13,14 @@ use dom::element::{HTMLElementTypeId,
HTMLCanvasElementTypeId, HTMLDataElementTypeId,
HTMLDivElementTypeId, HTMLHeadElementTypeId, HTMLHRElementTypeId,
HTMLHtmlElementTypeId, HTMLIframeElementTypeId, HTMLImageElementTypeId,
- HTMLLinkElementTypeId,
+ HTMLInputElementTypeId, HTMLLIElementTypeId, HTMLLinkElementTypeId,
HTMLMetaElementTypeId, HTMLOListElementTypeId,
- HTMLParagraphElementTypeId, HTMLScriptElementTypeId,
+ HTMLParagraphElementTypeId, HTMLProgressElementTypeId,
+ HTMLQuoteElementTypeId, HTMLScriptElementTypeId,
HTMLSpanElementTypeId, HTMLSourceElementTypeId,
HTMLStyleElementTypeId, HTMLTextAreaElementTypeId,
- HTMLTableCaptionElementTypeId, HTMLTableElementTypeId,
+ HTMLTableElementTypeId, HTMLTableCaptionElementTypeId, HTMLTableCellElementTypeId,
+ HTMLTableColElementTypeId,
HTMLTableRowElementTypeId, HTMLTableSectionElementTypeId, HTMLTimeElementTypeId,
HTMLTitleElementTypeId, HTMLUListElementTypeId, HTMLDListElementTypeId};
use dom::element::{HTMLHeadElement,HTMLHtmlElement, HTMLDivElement, HTMLParagraphElement, HTMLSpanElement};
@@ -35,14 +37,20 @@ use dom::htmldataelement::HTMLDataElement;
use dom::htmldlistelement::HTMLDListElement;
use dom::htmliframeelement::HTMLIFrameElement;
use dom::htmlimageelement::HTMLImageElement;
+use dom::htmlinputelement::HTMLInputElement;
+use dom::htmllielement::HTMLLIElement;
use dom::htmllinkelement::HTMLLinkElement;
use dom::htmlmetaelement::HTMLMetaElement;
use dom::htmlolistelement::HTMLOListElement;
+use dom::htmlprogresselement::HTMLProgressElement;
+use dom::htmlquoteelement::HTMLQuoteElement;
use dom::htmlscriptelement::HTMLScriptElement;
use dom::htmlsourceelement::HTMLSourceElement;
use dom::htmlstyleelement::HTMLStyleElement;
-use dom::htmltablecaptionelement::HTMLTableCaptionElement;
use dom::htmltableelement::HTMLTableElement;
+use dom::htmltablecaptionelement::HTMLTableCaptionElement;
+use dom::htmltablecellelement::HTMLTableCellElement;
+use dom::htmltablecolelement::HTMLTableColElement;
use dom::htmltablerowelement::HTMLTableRowElement;
use dom::htmltablesectionelement::HTMLTableSectionElement;
use dom::htmltextareaelement::HTMLTextAreaElement;
@@ -129,16 +137,22 @@ pub fn create(cx: *JSContext, node: &mut AbstractNode<ScriptView>) -> *JSObject
ElementNodeTypeId(HTMLHtmlElementTypeId) => generate_element!(HTMLHtmlElement),
ElementNodeTypeId(HTMLIframeElementTypeId) => generate_element!(HTMLIFrameElement),
ElementNodeTypeId(HTMLImageElementTypeId) => generate_element!(HTMLImageElement),
+ ElementNodeTypeId(HTMLInputElementTypeId) => generate_element!(HTMLInputElement),
+ ElementNodeTypeId(HTMLLIElementTypeId) => generate_element!(HTMLLIElement),
ElementNodeTypeId(HTMLLinkElementTypeId) => generate_element!(HTMLLinkElement),
ElementNodeTypeId(HTMLMetaElementTypeId) => generate_element!(HTMLMetaElement),
ElementNodeTypeId(HTMLOListElementTypeId) => generate_element!(HTMLOListElement),
ElementNodeTypeId(HTMLParagraphElementTypeId) => generate_element!(HTMLParagraphElement),
+ ElementNodeTypeId(HTMLProgressElementTypeId) => generate_element!(HTMLProgressElement),
+ ElementNodeTypeId(HTMLQuoteElementTypeId) => generate_element!(HTMLQuoteElement),
ElementNodeTypeId(HTMLScriptElementTypeId) => generate_element!(HTMLScriptElement),
ElementNodeTypeId(HTMLSourceElementTypeId) => generate_element!(HTMLSourceElement),
ElementNodeTypeId(HTMLSpanElementTypeId) => generate_element!(HTMLSpanElement),
ElementNodeTypeId(HTMLStyleElementTypeId) => generate_element!(HTMLStyleElement),
- ElementNodeTypeId(HTMLTableCaptionElementTypeId) => generate_element!(HTMLTableCaptionElement),
ElementNodeTypeId(HTMLTableElementTypeId) => generate_element!(HTMLTableElement),
+ ElementNodeTypeId(HTMLTableCellElementTypeId) => generate_element!(HTMLTableCellElement),
+ ElementNodeTypeId(HTMLTableCaptionElementTypeId) => generate_element!(HTMLTableCaptionElement),
+ ElementNodeTypeId(HTMLTableColElementTypeId) => generate_element!(HTMLTableColElement),
ElementNodeTypeId(HTMLTableRowElementTypeId) => generate_element!(HTMLTableRowElement),
ElementNodeTypeId(HTMLTableSectionElementTypeId) => generate_element!(HTMLTableSectionElement),
ElementNodeTypeId(HTMLTextAreaElementTypeId) => generate_element!(HTMLTextAreaElement),
diff --git a/src/components/script/dom/element.rs b/src/components/script/dom/element.rs
index cfe9a1c17b7..d6217d0ce54 100644
--- a/src/components/script/dom/element.rs
+++ b/src/components/script/dom/element.rs
@@ -11,12 +11,15 @@ use dom::bindings::codegen::{HTMLAnchorElementBinding, HTMLAppletElementBinding,
HTMLDListElementBinding, HTMLDivElementBinding,
HTMLHeadElementBinding, HTMLHRElementBinding,
HTMLHtmlElementBinding, HTMLIFrameElementBinding,
- HTMLImageElementBinding, HTMLMetaElementBinding,
- HTMLLinkElementBinding,
+ HTMLImageElementBinding, HTMLInputElementBinding,
+ HTMLLIElementBinding,
+ HTMLLinkElementBinding, HTMLMetaElementBinding,
HTMLOListElementBinding, HTMLParagraphElementBinding,
+ HTMLProgressElementBinding, HTMLQuoteElementBinding,
HTMLScriptElementBinding, HTMLSourceElementBinding, HTMLSpanElementBinding,
- HTMLStyleElementBinding, HTMLTableCaptionElementBinding,
- HTMLTableElementBinding, HTMLTableRowElementBinding,
+ HTMLStyleElementBinding, HTMLTableElementBinding,
+ HTMLTableCaptionElementBinding, HTMLTableCellElementBinding,
+ HTMLTableColElementBinding, HTMLTableRowElementBinding,
HTMLTableSectionElementBinding, HTMLTextAreaElementBinding,
HTMLTimeElementBinding, HTMLTitleElementBinding, HTMLUListElementBinding};
use dom::bindings::utils::{null_string, str};
@@ -37,14 +40,20 @@ use dom::htmlelement::HTMLElement;
use dom::htmlhrelement::HTMLHRElement;
use dom::htmliframeelement::HTMLIFrameElement;
use dom::htmlimageelement::HTMLImageElement;
+use dom::htmlinputelement::HTMLInputElement;
+use dom::htmllielement::HTMLLIElement;
use dom::htmllinkelement::HTMLLinkElement;
use dom::htmlmetaelement::HTMLMetaElement;
use dom::htmlolistelement::HTMLOListElement;
+use dom::htmlprogresselement::HTMLProgressElement;
+use dom::htmlquoteelement::HTMLQuoteElement;
use dom::htmlscriptelement::HTMLScriptElement;
use dom::htmlsourceelement::HTMLSourceElement;
use dom::htmlstyleelement::HTMLStyleElement;
-use dom::htmltablecaptionelement::HTMLTableCaptionElement;
use dom::htmltableelement::HTMLTableElement;
+use dom::htmltablecaptionelement::HTMLTableCaptionElement;
+use dom::htmltablecellelement::HTMLTableCellElement;
+use dom::htmltablecolelement::HTMLTableColElement;
use dom::htmltablerowelement::HTMLTableRowElement;
use dom::htmltablesectionelement::HTMLTableSectionElement;
use dom::htmltextareaelement::HTMLTextAreaElement;
@@ -109,20 +118,23 @@ pub enum ElementTypeId {
HTMLImageElementTypeId,
HTMLInputElementTypeId,
HTMLLinkElementTypeId,
- HTMLListItemElementTypeId,
+ HTMLLIElementTypeId,
HTMLMetaElementTypeId,
HTMLOListElementTypeId,
HTMLOptionElementTypeId,
HTMLParagraphElementTypeId,
+ HTMLProgressElementTypeId,
+ HTMLQuoteElementTypeId,
HTMLScriptElementTypeId,
HTMLSelectElementTypeId,
HTMLSmallElementTypeId,
HTMLSourceElementTypeId,
HTMLSpanElementTypeId,
HTMLStyleElementTypeId,
+ HTMLTableElementTypeId,
HTMLTableCaptionElementTypeId,
HTMLTableCellElementTypeId,
- HTMLTableElementTypeId,
+ HTMLTableColElementTypeId,
HTMLTableRowElementTypeId,
HTMLTableSectionElementTypeId,
HTMLTextAreaElementTypeId,
@@ -141,14 +153,11 @@ pub struct HTMLFontElement { parent: HTMLElement }
pub struct HTMLFormElement { parent: HTMLElement }
pub struct HTMLHeadElement { parent: HTMLElement }
pub struct HTMLHtmlElement { parent: HTMLElement }
-pub struct HTMLInputElement { parent: HTMLElement }
-pub struct HTMLListItemElement { parent: HTMLElement }
pub struct HTMLOptionElement { parent: HTMLElement }
pub struct HTMLParagraphElement { parent: HTMLElement }
pub struct HTMLSelectElement { parent: HTMLElement }
pub struct HTMLSmallElement { parent: HTMLElement }
pub struct HTMLSpanElement { parent: HTMLElement }
-pub struct HTMLTableCellElement { parent: HTMLElement }
pub struct UnknownElement { parent: HTMLElement }
impl HTMLHtmlElement {
@@ -233,6 +242,10 @@ generate_cacheable_wrapper!(HTMLIFrameElement, HTMLIFrameElementBinding::Wrap)
generate_binding_object!(HTMLIFrameElement)
generate_cacheable_wrapper!(HTMLImageElement, HTMLImageElementBinding::Wrap)
generate_binding_object!(HTMLImageElement)
+generate_cacheable_wrapper!(HTMLInputElement, HTMLInputElementBinding::Wrap)
+generate_binding_object!(HTMLInputElement)
+generate_cacheable_wrapper!(HTMLLIElement, HTMLLIElementBinding::Wrap)
+generate_binding_object!(HTMLLIElement)
generate_cacheable_wrapper!(HTMLLinkElement, HTMLLinkElementBinding::Wrap)
generate_binding_object!(HTMLLinkElement)
generate_cacheable_wrapper!(HTMLMetaElement, HTMLMetaElementBinding::Wrap)
@@ -241,6 +254,10 @@ generate_cacheable_wrapper!(HTMLOListElement, HTMLOListElementBinding::Wrap)
generate_binding_object!(HTMLOListElement)
generate_cacheable_wrapper!(HTMLParagraphElement, HTMLParagraphElementBinding::Wrap)
generate_binding_object!(HTMLParagraphElement)
+generate_cacheable_wrapper!(HTMLProgressElement, HTMLProgressElementBinding::Wrap)
+generate_binding_object!(HTMLProgressElement)
+generate_cacheable_wrapper!(HTMLQuoteElement, HTMLQuoteElementBinding::Wrap)
+generate_binding_object!(HTMLQuoteElement)
generate_cacheable_wrapper!(HTMLScriptElement, HTMLScriptElementBinding::Wrap)
generate_binding_object!(HTMLScriptElement)
generate_cacheable_wrapper!(HTMLSourceElement, HTMLSourceElementBinding::Wrap)
@@ -250,9 +267,13 @@ generate_binding_object!(HTMLSpanElement)
generate_cacheable_wrapper!(HTMLStyleElement, HTMLStyleElementBinding::Wrap)
generate_binding_object!(HTMLStyleElement)
generate_cacheable_wrapper!(HTMLTableElement, HTMLTableElementBinding::Wrap)
-generate_binding_object!(HTMLTableCaptionElement)
-generate_cacheable_wrapper!(HTMLTableCaptionElement, HTMLTableCaptionElementBinding::Wrap)
generate_binding_object!(HTMLTableElement)
+generate_cacheable_wrapper!(HTMLTableCaptionElement, HTMLTableCaptionElementBinding::Wrap)
+generate_binding_object!(HTMLTableCaptionElement)
+generate_cacheable_wrapper!(HTMLTableCellElement, HTMLTableCellElementBinding::Wrap)
+generate_binding_object!(HTMLTableCellElement)
+generate_cacheable_wrapper!(HTMLTableColElement, HTMLTableColElementBinding::Wrap)
+generate_binding_object!(HTMLTableColElement)
generate_cacheable_wrapper!(HTMLTableRowElement, HTMLTableRowElementBinding::Wrap)
generate_binding_object!(HTMLTableRowElement)
generate_cacheable_wrapper!(HTMLTableSectionElement, HTMLTableSectionElementBinding::Wrap)
diff --git a/src/components/script/dom/htmlinputelement.rs b/src/components/script/dom/htmlinputelement.rs
new file mode 100644
index 00000000000..8dbcc1826e9
--- /dev/null
+++ b/src/components/script/dom/htmlinputelement.rs
@@ -0,0 +1,285 @@
+/* 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/. */
+
+use dom::bindings::utils::{DOMString, null_string, ErrorResult};
+use dom::htmlelement::HTMLElement;
+
+pub struct HTMLInputElement {
+ parent: HTMLElement,
+}
+
+impl HTMLInputElement {
+ pub fn Accept(&self) -> DOMString {
+ null_string
+ }
+
+ pub fn SetAccept(&mut self, _accept: &DOMString, _rv: &mut ErrorResult) {
+ }
+
+ pub fn Alt(&self) -> DOMString {
+ null_string
+ }
+
+ pub fn SetAlt(&mut self, _alt: &DOMString, _rv: &mut ErrorResult) {
+ }
+
+ pub fn Autocomplete(&self) -> DOMString {
+ null_string
+ }
+
+ pub fn SetAutocomplete(&mut self, _autocomple: &DOMString, _rv: &mut ErrorResult) {
+ }
+
+ pub fn Autofocus(&self) -> bool {
+ false
+ }
+
+ pub fn SetAutofocus(&mut self, _autofocus: bool, _rv: &mut ErrorResult) {
+ }
+
+ pub fn DefaultChecked(&self) -> bool {
+ false
+ }
+
+ pub fn SetDefaultChecked(&mut self, _default_checked: bool, _rv: &mut ErrorResult) {
+ }
+
+ pub fn Checked(&self) -> bool {
+ false
+ }
+
+ pub fn SetChecked(&mut self, _checked: bool) {
+ }
+
+ pub fn Disabled(&self) -> bool {
+ false
+ }
+
+ pub fn SetDisabled(&mut self, _disabled: bool, _rv: &mut ErrorResult) {
+ }
+
+ pub fn FormAction(&self) -> DOMString {
+ null_string
+ }
+
+ pub fn SetFormAction(&mut self, _form_action: &DOMString, _rv: &mut ErrorResult) {
+ }
+
+ pub fn FormEnctype(&self) -> DOMString {
+ null_string
+ }
+
+ pub fn SetFormEnctype(&mut self, _form_enctype: &DOMString, _rv: &mut ErrorResult) {
+ }
+
+ pub fn FormMethod(&self) -> DOMString {
+ null_string
+ }
+
+ pub fn SetFormMethod(&mut self, _form_method: &DOMString, _rv: &mut ErrorResult) {
+ }
+
+ pub fn FormNoValidate(&self) -> bool {
+ false
+ }
+
+ pub fn SetFormNoValidate(&mut self, _form_no_validate: bool, _rv: &mut ErrorResult) {
+ }
+
+ pub fn FormTarget(&self) -> DOMString {
+ null_string
+ }
+
+ pub fn SetFormTarget(&mut self, _form_target: &DOMString, _rv: &mut ErrorResult) {
+ }
+
+ pub fn Height(&self) -> u32 {
+ 0
+ }
+
+ pub fn SetHeight(&mut self, _height: u32, _rv: &mut ErrorResult) {
+ }
+
+ pub fn Indeterminate(&self) -> bool {
+ false
+ }
+
+ pub fn SetIndeterminate(&mut self, _indeterminate: bool) {
+ }
+
+ pub fn InputMode(&self) -> DOMString {
+ null_string
+ }
+
+ pub fn SetInputMode(&mut self, _input_mode: &DOMString, _rv: &mut ErrorResult) {
+ }
+
+ pub fn Max(&self) -> DOMString {
+ null_string
+ }
+
+ pub fn SetMax(&mut self, _max: &DOMString, _rv: &mut ErrorResult) {
+ }
+
+ pub fn MaxLength(&self) -> i32 {
+ 0
+ }
+
+ pub fn SetMaxLength(&mut self, _max_length: i32, _rv: &mut ErrorResult) {
+ }
+
+ pub fn Min(&self) -> DOMString {
+ null_string
+ }
+
+ pub fn SetMin(&mut self, _min: &DOMString, _rv: &mut ErrorResult) {
+ }
+
+ pub fn Multiple(&self) -> bool {
+ false
+ }
+
+ pub fn SetMultiple(&mut self, _multiple: bool, _rv: &mut ErrorResult) {
+ }
+
+ pub fn Name(&self) -> DOMString {
+ null_string
+ }
+
+ pub fn SetName(&mut self, _name: &DOMString, _rv: &mut ErrorResult) {
+ }
+
+ pub fn Pattern(&self) -> DOMString {
+ null_string
+ }
+
+ pub fn SetPattern(&mut self, _pattern: &DOMString, _rv: &mut ErrorResult) {
+ }
+
+ pub fn Placeholder(&self) -> DOMString {
+ null_string
+ }
+
+ pub fn SetPlaceholder(&mut self, _placeholder: &DOMString, _rv: &mut ErrorResult) {
+ }
+
+ pub fn ReadOnly(&self) -> bool {
+ false
+ }
+
+ pub fn SetReadOnly(&mut self, _read_only: bool, _rv: &mut ErrorResult) {
+ }
+
+ pub fn Required(&self) -> bool {
+ false
+ }
+
+ pub fn SetRequired(&mut self, _required: bool, _rv: &mut ErrorResult) {
+ }
+
+ pub fn Size(&self) -> u32 {
+ 0
+ }
+
+ pub fn SetSize(&mut self, _size: u32, _rv: &mut ErrorResult) {
+ }
+
+ pub fn Src(&self) -> DOMString {
+ null_string
+ }
+
+ pub fn SetSrc(&mut self, _src: &DOMString, _rv: &mut ErrorResult) {
+ }
+
+ pub fn Step(&self) -> DOMString {
+ null_string
+ }
+
+ pub fn SetStep(&mut self, _step: &DOMString, _rv: &mut ErrorResult) {
+ }
+
+ pub fn Type(&self) -> DOMString {
+ null_string
+ }
+
+ pub fn SetType(&mut self, _type: &DOMString, _rv: &mut ErrorResult) {
+ }
+
+ pub fn DefaultValue(&self) -> DOMString {
+ null_string
+ }
+
+ pub fn SetDefaultValue(&mut self, _default_value: &DOMString, _rv: &mut ErrorResult) {
+ }
+
+ pub fn Value(&self) -> DOMString {
+ null_string
+ }
+
+ pub fn SetValue(&mut self, _value: &DOMString, _rv: &mut ErrorResult) {
+ }
+
+ pub fn Width(&self) -> u32 {
+ 0
+ }
+
+ pub fn SetWidth(&mut self, _width: u32) {
+ }
+
+ pub fn WillValidate(&self) -> bool {
+ false
+ }
+
+ pub fn SetWillValidate(&self, _will_validate: bool) {
+ }
+
+ pub fn GetValidationMessage(&self, _rv: &mut ErrorResult) -> DOMString {
+ null_string
+ }
+
+ pub fn CheckValidity(&self) -> bool {
+ false
+ }
+
+ pub fn SetCustomValidity(&self, _error: &DOMString) {
+ }
+
+ pub fn Select(&self) {
+ }
+
+ pub fn GetSelectionStart(&self, _rv: &mut ErrorResult) -> i32 {
+ 0
+ }
+
+ pub fn SetSelectionStart(&mut self, _selection_start: i32, _rv: &mut ErrorResult) {
+ }
+
+ pub fn GetSelectionEnd(&self, _rv: &mut ErrorResult) -> i32 {
+ 0
+ }
+
+ pub fn SetSelectionEnd(&mut self, _selection_end: i32, _rv: &mut ErrorResult) {
+ }
+
+ pub fn GetSelectionDirection(&self, _rv: &mut ErrorResult) -> DOMString {
+ null_string
+ }
+
+ pub fn SetSelectionDirection(&mut self, _selection_direction: &DOMString, _rv: &mut ErrorResult) {
+ }
+
+ pub fn Align(&self) -> DOMString {
+ null_string
+ }
+
+ pub fn SetAlign(&mut self, _align: &DOMString, _rv: &mut ErrorResult) {
+ }
+
+ pub fn UseMap(&self) -> DOMString {
+ null_string
+ }
+
+ pub fn SetUseMap(&mut self, _align: &DOMString, _rv: &mut ErrorResult) {
+ }
+}
diff --git a/src/components/script/dom/htmllielement.rs b/src/components/script/dom/htmllielement.rs
new file mode 100644
index 00000000000..facc81d9a37
--- /dev/null
+++ b/src/components/script/dom/htmllielement.rs
@@ -0,0 +1,26 @@
+/* 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/. */
+
+use dom::bindings::utils::{DOMString, null_string, ErrorResult};
+use dom::htmlelement::HTMLElement;
+
+pub struct HTMLLIElement {
+ parent: HTMLElement,
+}
+
+impl HTMLLIElement {
+ pub fn Value(&self) -> i32 {
+ 0
+ }
+
+ pub fn SetValue(&mut self, _value: i32, _rv: &mut ErrorResult) {
+ }
+
+ pub fn Type(&self) -> DOMString {
+ null_string
+ }
+
+ pub fn SetType(&mut self, _type: &DOMString, _rv: &mut ErrorResult) {
+ }
+}
diff --git a/src/components/script/dom/htmlprogresselement.rs b/src/components/script/dom/htmlprogresselement.rs
new file mode 100644
index 00000000000..b4aebf5c8cd
--- /dev/null
+++ b/src/components/script/dom/htmlprogresselement.rs
@@ -0,0 +1,34 @@
+/* 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/. */
+
+use dom::bindings::utils::{ErrorResult};
+use dom::htmlelement::HTMLElement;
+
+pub struct HTMLProgressElement {
+ parent: HTMLElement,
+}
+
+impl HTMLProgressElement {
+ pub fn Value(&self) -> f64 {
+ 0f64
+ }
+
+ pub fn SetValue(&mut self, _value: f64, _rv: &mut ErrorResult) {
+ }
+
+ pub fn Max(&self) -> f64 {
+ 0f64
+ }
+
+ pub fn SetMax(&mut self, _max: f64, _rv: &mut ErrorResult) {
+ }
+
+ pub fn Position(&self) -> f64 {
+ 0f64
+ }
+
+ pub fn GetPositiom(&self, _rv: &mut ErrorResult) -> f64 {
+ 0f64
+ }
+}
diff --git a/src/components/script/dom/htmlquoteelement.rs b/src/components/script/dom/htmlquoteelement.rs
new file mode 100644
index 00000000000..3201ee15094
--- /dev/null
+++ b/src/components/script/dom/htmlquoteelement.rs
@@ -0,0 +1,19 @@
+/* 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/. */
+
+use dom::bindings::utils::{DOMString, null_string, ErrorResult};
+use dom::htmlelement::HTMLElement;
+
+pub struct HTMLQuoteElement {
+ parent: HTMLElement,
+}
+
+impl HTMLQuoteElement {
+ pub fn Cite(&self) -> DOMString {
+ null_string
+ }
+
+ pub fn SetCite(&self, _cite: &DOMString, _rv: &mut ErrorResult) {
+ }
+}
diff --git a/src/components/script/dom/htmltablecellelement.rs b/src/components/script/dom/htmltablecellelement.rs
new file mode 100644
index 00000000000..5a57a9ccb6d
--- /dev/null
+++ b/src/components/script/dom/htmltablecellelement.rs
@@ -0,0 +1,117 @@
+/* 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/. */
+
+use dom::bindings::utils::{DOMString, null_string, ErrorResult};
+use dom::htmlelement::HTMLElement;
+
+pub struct HTMLTableCellElement {
+ parent: HTMLElement,
+}
+
+impl HTMLTableCellElement {
+ pub fn ColSpan(&self) -> u32 {
+ 0
+ }
+
+ pub fn SetColSpan(&self, _col_span: u32, _rv: &mut ErrorResult) {
+ }
+
+ pub fn RowSpan(&self) -> u32 {
+ 0
+ }
+
+ pub fn SetRowSpan(&self, _col_span: u32, _rv: &mut ErrorResult) {
+ }
+
+ pub fn Headers(&self) -> DOMString {
+ null_string
+ }
+
+ pub fn SetHeaders(&self, _headers: &DOMString, _rv: &mut ErrorResult) {
+ }
+
+ pub fn CellIndex(&self) -> i32 {
+ 0
+ }
+
+ pub fn GetCellIndex(&self, _cell_index: i32, _rv: &mut ErrorResult) {
+ }
+
+ pub fn Abbr(&self) -> DOMString {
+ null_string
+ }
+
+ pub fn SetAbbr(&self, _abbr: &DOMString, _rv: &mut ErrorResult) {
+ }
+
+ pub fn Scope(&self) -> DOMString {
+ null_string
+ }
+
+ pub fn SetScope(&self, _abbr: &DOMString, _rv: &mut ErrorResult) {
+ }
+
+ pub fn Align(&self) -> DOMString {
+ null_string
+ }
+
+ pub fn SetAlign(&self, _align: &DOMString, _rv: &mut ErrorResult) {
+ }
+
+ pub fn Axis(&self) -> DOMString {
+ null_string
+ }
+
+ pub fn SetAxis(&self, _axis: &DOMString, _rv: &mut ErrorResult) {
+ }
+
+ pub fn Height(&self) -> DOMString {
+ null_string
+ }
+
+ pub fn SetHeight(&self, _height: &DOMString, _rv: &mut ErrorResult) {
+ }
+
+ pub fn Width(&self) -> DOMString {
+ null_string
+ }
+
+ pub fn SetWidth(&self, _width: &DOMString, _rv: &mut ErrorResult) {
+ }
+
+ pub fn Ch(&self) -> DOMString {
+ null_string
+ }
+
+ pub fn SetCh(&self, _ch: &DOMString, _rv: &mut ErrorResult) {
+ }
+
+ pub fn ChOff(&self) -> DOMString {
+ null_string
+ }
+
+ pub fn SetChOff(&self, _ch_off: &DOMString, _rv: &mut ErrorResult) {
+ }
+
+ pub fn NoWrap(&self) -> bool {
+ false
+ }
+
+ pub fn SetNoWrap(&self, _no_wrap: bool, _rv: &mut ErrorResult) {
+ }
+
+ pub fn VAlign(&self) -> DOMString {
+ null_string
+ }
+
+ pub fn SetVAlign(&self, _valign: &DOMString, _rv: &mut ErrorResult) {
+ }
+
+ pub fn BgColor(&self) -> DOMString {
+ null_string
+ }
+
+ pub fn SetBgColor(&self, _bg_color: &DOMString, _rv: &mut ErrorResult) {
+ }
+}
diff --git a/src/components/script/dom/htmltablecolelement.rs b/src/components/script/dom/htmltablecolelement.rs
new file mode 100644
index 00000000000..fa27da84c18
--- /dev/null
+++ b/src/components/script/dom/htmltablecolelement.rs
@@ -0,0 +1,54 @@
+/* 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/. */
+
+use dom::bindings::utils::{DOMString, null_string, ErrorResult};
+use dom::htmlelement::HTMLElement;
+
+pub struct HTMLTableColElement {
+ parent: HTMLElement,
+}
+
+impl HTMLTableColElement {
+ pub fn Span(&self) -> u32 {
+ 0
+ }
+
+ pub fn SetSpan(&mut self, _span: u32, _rv: &mut ErrorResult) {
+ }
+
+ pub fn Align(&self) -> DOMString {
+ null_string
+ }
+
+ pub fn SetAlign(&mut self, _align: &DOMString, _rv: &mut ErrorResult) {
+ }
+
+ pub fn Ch(&self) -> DOMString {
+ null_string
+ }
+
+ pub fn SetCh(&mut self, _ch: &DOMString, _rv: &mut ErrorResult) {
+ }
+
+ pub fn ChOff(&self) -> DOMString {
+ null_string
+ }
+
+ pub fn SetChOff(&mut self, _ch_off: &DOMString, _rv: &mut ErrorResult) {
+ }
+
+ pub fn VAlign(&self) -> DOMString {
+ null_string
+ }
+
+ pub fn SetVAlign(&mut self, _v_align: &DOMString, _rv: &mut ErrorResult) {
+ }
+
+ pub fn Width(&self) -> DOMString {
+ null_string
+ }
+
+ pub fn SetWidth(&mut self, _width: &DOMString, _rv: &mut ErrorResult) {
+ }
+}
diff --git a/src/components/script/html/hubbub_html_parser.rs b/src/components/script/html/hubbub_html_parser.rs
index b0f520f619e..8ed87121667 100644
--- a/src/components/script/html/hubbub_html_parser.rs
+++ b/src/components/script/html/hubbub_html_parser.rs
@@ -10,21 +10,22 @@ use dom::element::{HTMLElementTypeId,
HTMLFontElementTypeId, HTMLFormElementTypeId, HTMLHRElementTypeId,
HTMLHeadElementTypeId, HTMLHtmlElementTypeId,
HTMLImageElementTypeId, HTMLIframeElementTypeId, HTMLInputElementTypeId,
- HTMLLinkElementTypeId, HTMLListItemElementTypeId,
+ HTMLLinkElementTypeId, HTMLLIElementTypeId,
HTMLMetaElementTypeId, HTMLOListElementTypeId, HTMLOptionElementTypeId,
- HTMLParagraphElementTypeId, HTMLScriptElementTypeId,
+ HTMLParagraphElementTypeId, HTMLProgressElementTypeId,
+ HTMLQuoteElementTypeId, HTMLScriptElementTypeId,
HTMLSelectElementTypeId, HTMLSmallElementTypeId, HTMLSourceElementTypeId,
HTMLSpanElementTypeId, HTMLStyleElementTypeId, HTMLTableSectionElementTypeId,
HTMLTableCellElementTypeId, HTMLTableElementTypeId,
- HTMLTableCaptionElementTypeId, HTMLTableRowElementTypeId, HTMLTextAreaElementTypeId,
+ HTMLTableCaptionElementTypeId, HTMLTableColElementTypeId,
+ HTMLTableRowElementTypeId, HTMLTextAreaElementTypeId,
HTMLTimeElementTypeId, HTMLTitleElementTypeId, HTMLUListElementTypeId,
UnknownElementTypeId};
use dom::element::{HTMLDivElement, HTMLFontElement, HTMLFormElement,
HTMLHeadElement, HTMLHeadingElement, HTMLHtmlElement,
- HTMLInputElement,
- HTMLOptionElement, HTMLParagraphElement, HTMLListItemElement,
+ HTMLOptionElement, HTMLParagraphElement,
HTMLSelectElement, HTMLSmallElement,
- HTMLSpanElement, HTMLTableCellElement};
+ HTMLSpanElement};
use dom::element::{HTMLHeadingElementTypeId, Heading1, Heading2, Heading3, Heading4, Heading5,
Heading6};
use dom::htmlbrelement::HTMLBRElement;
@@ -39,14 +40,20 @@ use dom::htmldlistelement::HTMLDListElement;
use dom::htmlhrelement::HTMLHRElement;
use dom::htmliframeelement::{IFrameSize, HTMLIFrameElement};
use dom::htmlimageelement::HTMLImageElement;
+use dom::htmlinputelement::HTMLInputElement;
+use dom::htmllielement::HTMLLIElement;
use dom::htmllinkelement::HTMLLinkElement;
use dom::htmlmetaelement::HTMLMetaElement;
use dom::htmlolistelement::HTMLOListElement;
+use dom::htmlprogresselement::HTMLProgressElement;
+use dom::htmlquoteelement::HTMLQuoteElement;
use dom::htmlscriptelement::HTMLScriptElement;
use dom::htmlsourceelement::HTMLSourceElement;
use dom::htmlstyleelement::HTMLStyleElement;
-use dom::htmltablecaptionelement::HTMLTableCaptionElement;
use dom::htmltableelement::HTMLTableElement;
+use dom::htmltablecaptionelement::HTMLTableCaptionElement;
+use dom::htmltablecellelement::HTMLTableCellElement;
+use dom::htmltablecolelement::HTMLTableColElement;
use dom::htmltablerowelement::HTMLTableRowElement;
use dom::htmltablesectionelement::HTMLTableSectionElement;
use dom::htmltextareaelement::HTMLTextAreaElement;
@@ -228,7 +235,7 @@ fn js_script_listener(to_parent: SharedChan<HtmlDiscoveryMessage>,
to_parent.send(HtmlDiscoveredScript(js_scripts));
}
-// Silly macros to handle constructing DOM nodes. This produces bad code and should be optimized
+// Silly macros to handle constructing DOM nodes. This produces bad code and should be optimized
// via atomization (issue #85).
fn build_element_from_tag(cx: *JSContext, tag: &str) -> AbstractNode<ScriptView> {
@@ -250,20 +257,24 @@ fn build_element_from_tag(cx: *JSContext, tag: &str) -> AbstractNode<ScriptView>
handle_element!(cx, tag, "html", HTMLHtmlElementTypeId, HTMLHtmlElement, []);
handle_element!(cx, tag, "input", HTMLInputElementTypeId, HTMLInputElement, []);
handle_element!(cx, tag, "link", HTMLLinkElementTypeId, HTMLLinkElement, []);
- handle_element!(cx, tag, "li", HTMLListItemElementTypeId, HTMLListItemElement, []);
+ handle_element!(cx, tag, "li", HTMLLIElementTypeId, HTMLLIElement, []);
handle_element!(cx, tag, "meta", HTMLMetaElementTypeId, HTMLMetaElement, []);
handle_element!(cx, tag, "ol", HTMLOListElementTypeId, HTMLOListElement, []);
handle_element!(cx, tag, "option", HTMLOptionElementTypeId, HTMLOptionElement, []);
handle_element!(cx, tag, "p", HTMLParagraphElementTypeId, HTMLParagraphElement, []);
+ handle_element!(cx, tag, "progress",HTMLProgressElementTypeId, HTMLProgressElement, []);
+ handle_element!(cx, tag, "q", HTMLQuoteElementTypeId, HTMLQuoteElement, []);
handle_element!(cx, tag, "script", HTMLScriptElementTypeId, HTMLScriptElement, []);
handle_element!(cx, tag, "select", HTMLSelectElementTypeId, HTMLSelectElement, []);
handle_element!(cx, tag, "small", HTMLSmallElementTypeId, HTMLSmallElement, []);
handle_element!(cx, tag, "source", HTMLSourceElementTypeId, HTMLSourceElement, []);
handle_element!(cx, tag, "span", HTMLSpanElementTypeId, HTMLSpanElement, []);
handle_element!(cx, tag, "style", HTMLStyleElementTypeId, HTMLStyleElement, []);
+ handle_element!(cx, tag, "table", HTMLTableElementTypeId, HTMLTableElement, []);
handle_element!(cx, tag, "caption", HTMLTableCaptionElementTypeId, HTMLTableCaptionElement, []);
handle_element!(cx, tag, "td", HTMLTableCellElementTypeId, HTMLTableCellElement, []);
- handle_element!(cx, tag, "table", HTMLTableElementTypeId, HTMLTableElement, []);
+ handle_element!(cx, tag, "col", HTMLTableColElementTypeId, HTMLTableColElement, []);
+ handle_element!(cx, tag, "colgroup",HTMLTableColElementTypeId, HTMLTableColElement, []);
handle_element!(cx, tag, "tbody", HTMLTableSectionElementTypeId, HTMLTableSectionElement, []);
handle_element!(cx, tag, "textarea",HTMLTextAreaElementTypeId, HTMLTextAreaElement, []);
handle_element!(cx, tag, "time", HTMLTimeElementTypeId, HTMLTimeElement, []);
diff --git a/src/components/script/script.rc b/src/components/script/script.rc
index 492b964eed2..037ba1aef63 100644
--- a/src/components/script/script.rc
+++ b/src/components/script/script.rc
@@ -60,16 +60,22 @@ pub mod dom {
pub mod HTMLHtmlElementBinding;
pub mod HTMLIFrameElementBinding;
pub mod HTMLImageElementBinding;
+ pub mod HTMLInputElementBinding;
+ pub mod HTMLLIElementBinding;
pub mod HTMLLinkElementBinding;
pub mod HTMLMetaElementBinding;
pub mod HTMLOListElementBinding;
pub mod HTMLParagraphElementBinding;
+ pub mod HTMLProgressElementBinding;
+ pub mod HTMLQuoteElementBinding;
pub mod HTMLScriptElementBinding;
pub mod HTMLSourceElementBinding;
pub mod HTMLSpanElementBinding;
pub mod HTMLStyleElementBinding;
- pub mod HTMLTableCaptionElementBinding;
pub mod HTMLTableElementBinding;
+ pub mod HTMLTableCaptionElementBinding;
+ pub mod HTMLTableCellElementBinding;
+ pub mod HTMLTableColElementBinding;
pub mod HTMLTableRowElementBinding;
pub mod HTMLTableSectionElementBinding;
pub mod HTMLTextAreaElementBinding;
@@ -111,14 +117,20 @@ pub mod dom {
pub mod htmlhrelement;
pub mod htmliframeelement;
pub mod htmlimageelement;
+ pub mod htmlinputelement;
+ pub mod htmllielement;
pub mod htmllinkelement;
pub mod htmlmetaelement;
pub mod htmlolistelement;
+ pub mod htmlprogresselement;
+ pub mod htmlquoteelement;
pub mod htmlscriptelement;
pub mod htmlsourceelement;
pub mod htmlstyleelement;
- pub mod htmltablecaptionelement;
pub mod htmltableelement;
+ pub mod htmltablecaptionelement;
+ pub mod htmltablecellelement;
+ pub mod htmltablecolelement;
pub mod htmltablerowelement;
pub mod htmltablesectionelement;
pub mod htmltextareaelement;