mirror of
https://github.com/servo/servo.git
synced 2025-06-12 18:34:39 +00:00
commit
d0e47f427e
9 changed files with 65 additions and 3 deletions
|
@ -550,6 +550,7 @@ addHTMLElement('HTMLBodyElement')
|
||||||
addHTMLElement('HTMLBRElement')
|
addHTMLElement('HTMLBRElement')
|
||||||
addHTMLElement('HTMLCanvasElement')
|
addHTMLElement('HTMLCanvasElement')
|
||||||
addHTMLElement('HTMLDivElement')
|
addHTMLElement('HTMLDivElement')
|
||||||
|
addHTMLElement('HTMLDListElement')
|
||||||
addHTMLElement('HTMLElement')
|
addHTMLElement('HTMLElement')
|
||||||
addHTMLElement('HTMLHeadElement')
|
addHTMLElement('HTMLHeadElement')
|
||||||
addHTMLElement('HTMLHtmlElement')
|
addHTMLElement('HTMLHtmlElement')
|
||||||
|
|
|
@ -4621,6 +4621,7 @@ class CGBindingRoot(CGThing):
|
||||||
'dom::htmlbodyelement::HTMLBodyElement',
|
'dom::htmlbodyelement::HTMLBodyElement',
|
||||||
'dom::htmlbrelement::HTMLBRElement', #XXXrecrack
|
'dom::htmlbrelement::HTMLBRElement', #XXXrecrack
|
||||||
'dom::htmlcanvaselement::HTMLCanvasElement',
|
'dom::htmlcanvaselement::HTMLCanvasElement',
|
||||||
|
'dom::htmldlistelement::HTMLDListElement',
|
||||||
'dom::htmlelement::HTMLElement', #XXXjdm
|
'dom::htmlelement::HTMLElement', #XXXjdm
|
||||||
'dom::htmldocument::HTMLDocument', #XXXjdm
|
'dom::htmldocument::HTMLDocument', #XXXjdm
|
||||||
'dom::htmlhrelement::HTMLHRElement',
|
'dom::htmlhrelement::HTMLHRElement',
|
||||||
|
|
|
@ -0,0 +1,23 @@
|
||||||
|
/* -*- 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-dl-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-dl-element
|
||||||
|
interface HTMLDListElement : HTMLElement {
|
||||||
|
};
|
||||||
|
|
||||||
|
// http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
|
||||||
|
partial interface HTMLDListElement {
|
||||||
|
[SetterThrows]
|
||||||
|
attribute boolean compact;
|
||||||
|
};
|
|
@ -15,7 +15,7 @@ use dom::element::{HTMLElementTypeId,
|
||||||
HTMLParagraphElementTypeId, HTMLScriptElementTypeId,
|
HTMLParagraphElementTypeId, HTMLScriptElementTypeId,
|
||||||
HTMLSpanElementTypeId, HTMLStyleElementTypeId, HTMLTextAreaElementTypeId,
|
HTMLSpanElementTypeId, HTMLStyleElementTypeId, HTMLTextAreaElementTypeId,
|
||||||
HTMLTableElementTypeId, HTMLTableRowElementTypeId, HTMLTableSectionElementTypeId,
|
HTMLTableElementTypeId, HTMLTableRowElementTypeId, HTMLTableSectionElementTypeId,
|
||||||
HTMLTitleElementTypeId, HTMLUListElementTypeId};
|
HTMLTitleElementTypeId, HTMLUListElementTypeId, HTMLDListElementTypeId};
|
||||||
use dom::element::{HTMLHeadElement,HTMLHtmlElement, HTMLDivElement, HTMLParagraphElement, HTMLSpanElement};
|
use dom::element::{HTMLHeadElement,HTMLHtmlElement, HTMLDivElement, HTMLParagraphElement, HTMLSpanElement};
|
||||||
use dom::htmlelement::HTMLElement;
|
use dom::htmlelement::HTMLElement;
|
||||||
use dom::htmlanchorelement::HTMLAnchorElement;
|
use dom::htmlanchorelement::HTMLAnchorElement;
|
||||||
|
@ -23,6 +23,7 @@ use dom::htmlbodyelement::HTMLBodyElement;
|
||||||
use dom::htmlhrelement::HTMLHRElement;
|
use dom::htmlhrelement::HTMLHRElement;
|
||||||
use dom::htmlbrelement::HTMLBRElement;
|
use dom::htmlbrelement::HTMLBRElement;
|
||||||
use dom::htmlcanvaselement::HTMLCanvasElement;
|
use dom::htmlcanvaselement::HTMLCanvasElement;
|
||||||
|
use dom::htmldlistelement::HTMLDListElement;
|
||||||
use dom::htmliframeelement::HTMLIFrameElement;
|
use dom::htmliframeelement::HTMLIFrameElement;
|
||||||
use dom::htmlimageelement::HTMLImageElement;
|
use dom::htmlimageelement::HTMLImageElement;
|
||||||
use dom::htmlmetaelement::HTMLMetaElement;
|
use dom::htmlmetaelement::HTMLMetaElement;
|
||||||
|
@ -104,6 +105,7 @@ pub fn create(cx: *JSContext, node: &mut AbstractNode<ScriptView>) -> *JSObject
|
||||||
ElementNodeTypeId(HTMLBodyElementTypeId) => generate_element!(HTMLBodyElement),
|
ElementNodeTypeId(HTMLBodyElementTypeId) => generate_element!(HTMLBodyElement),
|
||||||
ElementNodeTypeId(HTMLBRElementTypeId) => generate_element!(HTMLBRElement),
|
ElementNodeTypeId(HTMLBRElementTypeId) => generate_element!(HTMLBRElement),
|
||||||
ElementNodeTypeId(HTMLCanvasElementTypeId) => generate_element!(HTMLCanvasElement),
|
ElementNodeTypeId(HTMLCanvasElementTypeId) => generate_element!(HTMLCanvasElement),
|
||||||
|
ElementNodeTypeId(HTMLDListElementTypeId) => generate_element!(HTMLDListElement),
|
||||||
ElementNodeTypeId(HTMLDivElementTypeId) => generate_element!(HTMLDivElement),
|
ElementNodeTypeId(HTMLDivElementTypeId) => generate_element!(HTMLDivElement),
|
||||||
ElementNodeTypeId(HTMLHeadElementTypeId) => generate_element!(HTMLHeadElement),
|
ElementNodeTypeId(HTMLHeadElementTypeId) => generate_element!(HTMLHeadElement),
|
||||||
ElementNodeTypeId(HTMLHRElementTypeId) => generate_element!(HTMLHRElement),
|
ElementNodeTypeId(HTMLHRElementTypeId) => generate_element!(HTMLHRElement),
|
||||||
|
|
|
@ -624,7 +624,7 @@ pub extern fn ThrowingConstructor(_cx: *JSContext, _argc: uint, _vp: *JSVal) ->
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn initialize_global(global: *JSObject) {
|
pub fn initialize_global(global: *JSObject) {
|
||||||
let protoArray = @mut ([0 as *JSObject, ..52]);
|
let protoArray = @mut ([0 as *JSObject, ..53]);
|
||||||
assert!(protoArray.len() == PrototypeList::id::_ID_Count as uint);
|
assert!(protoArray.len() == PrototypeList::id::_ID_Count as uint);
|
||||||
unsafe {
|
unsafe {
|
||||||
//XXXjdm we should be storing the box pointer instead of the inner
|
//XXXjdm we should be storing the box pointer instead of the inner
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
//! Element nodes.
|
//! Element nodes.
|
||||||
|
|
||||||
use dom::bindings::codegen::{HTMLAnchorElementBinding, HTMLBodyElementBinding, HTMLBRElementBinding,
|
use dom::bindings::codegen::{HTMLAnchorElementBinding, HTMLBodyElementBinding, HTMLBRElementBinding,
|
||||||
HTMLCanvasElementBinding, HTMLDivElementBinding,
|
HTMLCanvasElementBinding, HTMLDListElementBinding, HTMLDivElementBinding,
|
||||||
HTMLHeadElementBinding, HTMLHRElementBinding,
|
HTMLHeadElementBinding, HTMLHRElementBinding,
|
||||||
HTMLHtmlElementBinding, HTMLIFrameElementBinding,
|
HTMLHtmlElementBinding, HTMLIFrameElementBinding,
|
||||||
HTMLImageElementBinding, HTMLMetaElementBinding,
|
HTMLImageElementBinding, HTMLMetaElementBinding,
|
||||||
|
@ -23,6 +23,7 @@ use dom::htmlbodyelement::HTMLBodyElement;
|
||||||
use dom::htmlbrelement::HTMLBRElement;
|
use dom::htmlbrelement::HTMLBRElement;
|
||||||
use dom::htmlcanvaselement::HTMLCanvasElement;
|
use dom::htmlcanvaselement::HTMLCanvasElement;
|
||||||
use dom::htmlcollection::HTMLCollection;
|
use dom::htmlcollection::HTMLCollection;
|
||||||
|
use dom::htmldlistelement::HTMLDListElement;
|
||||||
use dom::htmlelement::HTMLElement;
|
use dom::htmlelement::HTMLElement;
|
||||||
use dom::htmlhrelement::HTMLHRElement;
|
use dom::htmlhrelement::HTMLHRElement;
|
||||||
use dom::htmliframeelement::HTMLIFrameElement;
|
use dom::htmliframeelement::HTMLIFrameElement;
|
||||||
|
@ -79,6 +80,7 @@ pub enum ElementTypeId {
|
||||||
HTMLBRElementTypeId,
|
HTMLBRElementTypeId,
|
||||||
HTMLBodyElementTypeId,
|
HTMLBodyElementTypeId,
|
||||||
HTMLCanvasElementTypeId,
|
HTMLCanvasElementTypeId,
|
||||||
|
HTMLDListElementTypeId,
|
||||||
HTMLDivElementTypeId,
|
HTMLDivElementTypeId,
|
||||||
HTMLFontElementTypeId,
|
HTMLFontElementTypeId,
|
||||||
HTMLFormElementTypeId,
|
HTMLFormElementTypeId,
|
||||||
|
@ -190,6 +192,8 @@ generate_cacheable_wrapper!(HTMLBodyElement, HTMLBodyElementBinding::Wrap)
|
||||||
generate_binding_object!(HTMLBodyElement)
|
generate_binding_object!(HTMLBodyElement)
|
||||||
generate_cacheable_wrapper!(HTMLCanvasElement, HTMLCanvasElementBinding::Wrap)
|
generate_cacheable_wrapper!(HTMLCanvasElement, HTMLCanvasElementBinding::Wrap)
|
||||||
generate_binding_object!(HTMLCanvasElement)
|
generate_binding_object!(HTMLCanvasElement)
|
||||||
|
generate_cacheable_wrapper!(HTMLDListElement, HTMLDListElementBinding::Wrap)
|
||||||
|
generate_binding_object!(HTMLDListElement)
|
||||||
generate_cacheable_wrapper!(HTMLBRElement, HTMLBRElementBinding::Wrap)
|
generate_cacheable_wrapper!(HTMLBRElement, HTMLBRElementBinding::Wrap)
|
||||||
generate_binding_object!(HTMLBRElement)
|
generate_binding_object!(HTMLBRElement)
|
||||||
generate_cacheable_wrapper!(HTMLHRElement, HTMLHRElementBinding::Wrap)
|
generate_cacheable_wrapper!(HTMLHRElement, HTMLHRElementBinding::Wrap)
|
||||||
|
|
26
src/components/script/dom/htmldlistelement.rs
Normal file
26
src/components/script/dom/htmldlistelement.rs
Normal file
|
@ -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 HTMLDListElement {
|
||||||
|
parent: HTMLElement
|
||||||
|
}
|
||||||
|
|
||||||
|
impl HTMLDListElement {
|
||||||
|
pub fn Compact(&self) -> bool {
|
||||||
|
false
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn SetCompact(&mut self, _compact: bool, _rv: &mut ErrorResult) {
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn Type(&self) -> DOMString {
|
||||||
|
null_string
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn SetType(&mut self, _type: &DOMString, _rv: &mut ErrorResult) {
|
||||||
|
}
|
||||||
|
}
|
|
@ -5,6 +5,7 @@
|
||||||
use dom::element::{HTMLElementTypeId,
|
use dom::element::{HTMLElementTypeId,
|
||||||
HTMLAnchorElementTypeId, HTMLBRElementTypeId,
|
HTMLAnchorElementTypeId, HTMLBRElementTypeId,
|
||||||
HTMLBodyElementTypeId, HTMLCanvasElementTypeId, HTMLDivElementTypeId,
|
HTMLBodyElementTypeId, HTMLCanvasElementTypeId, HTMLDivElementTypeId,
|
||||||
|
HTMLDListElementTypeId,
|
||||||
HTMLFontElementTypeId, HTMLFormElementTypeId, HTMLHRElementTypeId,
|
HTMLFontElementTypeId, HTMLFormElementTypeId, HTMLHRElementTypeId,
|
||||||
HTMLHeadElementTypeId, HTMLHtmlElementTypeId,
|
HTMLHeadElementTypeId, HTMLHtmlElementTypeId,
|
||||||
HTMLImageElementTypeId, HTMLIframeElementTypeId, HTMLInputElementTypeId,
|
HTMLImageElementTypeId, HTMLIframeElementTypeId, HTMLInputElementTypeId,
|
||||||
|
@ -29,6 +30,7 @@ use dom::htmlbrelement::HTMLBRElement;
|
||||||
use dom::htmlanchorelement::HTMLAnchorElement;
|
use dom::htmlanchorelement::HTMLAnchorElement;
|
||||||
use dom::htmlbodyelement::HTMLBodyElement;
|
use dom::htmlbodyelement::HTMLBodyElement;
|
||||||
use dom::htmlcanvaselement::HTMLCanvasElement;
|
use dom::htmlcanvaselement::HTMLCanvasElement;
|
||||||
|
use dom::htmldlistelement::HTMLDListElement;
|
||||||
use dom::htmlhrelement::HTMLHRElement;
|
use dom::htmlhrelement::HTMLHRElement;
|
||||||
use dom::htmliframeelement::{IFrameSize, HTMLIFrameElement};
|
use dom::htmliframeelement::{IFrameSize, HTMLIFrameElement};
|
||||||
use dom::htmlimageelement::HTMLImageElement;
|
use dom::htmlimageelement::HTMLImageElement;
|
||||||
|
@ -227,6 +229,7 @@ fn build_element_from_tag(cx: *JSContext, tag: &str) -> AbstractNode<ScriptView>
|
||||||
handle_element!(cx, tag, "body", HTMLBodyElementTypeId, HTMLBodyElement, []);
|
handle_element!(cx, tag, "body", HTMLBodyElementTypeId, HTMLBodyElement, []);
|
||||||
handle_element!(cx, tag, "canvas", HTMLCanvasElementTypeId, HTMLCanvasElement, []);
|
handle_element!(cx, tag, "canvas", HTMLCanvasElementTypeId, HTMLCanvasElement, []);
|
||||||
handle_element!(cx, tag, "div", HTMLDivElementTypeId, HTMLDivElement, []);
|
handle_element!(cx, tag, "div", HTMLDivElementTypeId, HTMLDivElement, []);
|
||||||
|
handle_element!(cx, tag, "dl", HTMLDListElementTypeId, HTMLDListElement, []);
|
||||||
handle_element!(cx, tag, "font", HTMLFontElementTypeId, HTMLFontElement, []);
|
handle_element!(cx, tag, "font", HTMLFontElementTypeId, HTMLFontElement, []);
|
||||||
handle_element!(cx, tag, "form", HTMLFormElementTypeId, HTMLFormElement, []);
|
handle_element!(cx, tag, "form", HTMLFormElementTypeId, HTMLFormElement, []);
|
||||||
handle_element!(cx, tag, "hr", HTMLHRElementTypeId, HTMLHRElement, []);
|
handle_element!(cx, tag, "hr", HTMLHRElementTypeId, HTMLHRElement, []);
|
||||||
|
|
|
@ -47,6 +47,7 @@ pub mod dom {
|
||||||
pub mod HTMLBRElementBinding;
|
pub mod HTMLBRElementBinding;
|
||||||
pub mod HTMLCanvasElementBinding;
|
pub mod HTMLCanvasElementBinding;
|
||||||
pub mod HTMLCollectionBinding;
|
pub mod HTMLCollectionBinding;
|
||||||
|
pub mod HTMLDListElementBinding;
|
||||||
pub mod HTMLDivElementBinding;
|
pub mod HTMLDivElementBinding;
|
||||||
pub mod HTMLDocumentBinding;
|
pub mod HTMLDocumentBinding;
|
||||||
pub mod HTMLElementBinding;
|
pub mod HTMLElementBinding;
|
||||||
|
@ -92,6 +93,7 @@ pub mod dom {
|
||||||
pub mod htmlbrelement;
|
pub mod htmlbrelement;
|
||||||
pub mod htmlcanvaselement;
|
pub mod htmlcanvaselement;
|
||||||
pub mod htmlcollection;
|
pub mod htmlcollection;
|
||||||
|
pub mod htmldlistelement;
|
||||||
pub mod htmldocument;
|
pub mod htmldocument;
|
||||||
pub mod htmlelement;
|
pub mod htmlelement;
|
||||||
pub mod htmlhrelement;
|
pub mod htmlhrelement;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue