mirror of
https://github.com/servo/servo.git
synced 2025-06-19 22:59:03 +01:00
auto merge of #837 : saneyuki/servo/webidl, r=jdm
This commit is contained in:
commit
4cfcad0a0e
24 changed files with 859 additions and 2 deletions
|
@ -556,6 +556,7 @@ addHTMLElement('Text')
|
||||||
addHTMLElement('HTMLAnchorElement')
|
addHTMLElement('HTMLAnchorElement')
|
||||||
addHTMLElement('HTMLAppletElement')
|
addHTMLElement('HTMLAppletElement')
|
||||||
addHTMLElement('HTMLAreaElement')
|
addHTMLElement('HTMLAreaElement')
|
||||||
|
addHTMLElement('HTMLAudioElement')
|
||||||
addHTMLElement('HTMLButtonElement')
|
addHTMLElement('HTMLButtonElement')
|
||||||
addHTMLElement('HTMLBaseElement')
|
addHTMLElement('HTMLBaseElement')
|
||||||
addHTMLElement('HTMLBodyElement')
|
addHTMLElement('HTMLBodyElement')
|
||||||
|
@ -580,9 +581,12 @@ addHTMLElement('HTMLHRElement')
|
||||||
addHTMLElement('HTMLIFrameElement')
|
addHTMLElement('HTMLIFrameElement')
|
||||||
addHTMLElement('HTMLImageElement')
|
addHTMLElement('HTMLImageElement')
|
||||||
addHTMLElement('HTMLInputElement')
|
addHTMLElement('HTMLInputElement')
|
||||||
|
addHTMLElement('HTMLLabelElement')
|
||||||
|
addHTMLElement('HTMLLegendElement')
|
||||||
addHTMLElement('HTMLLIElement')
|
addHTMLElement('HTMLLIElement')
|
||||||
addHTMLElement('HTMLLinkElement')
|
addHTMLElement('HTMLLinkElement')
|
||||||
addHTMLElement('HTMLMapElement')
|
addHTMLElement('HTMLMapElement')
|
||||||
|
addHTMLElement('HTMLMediaElement')
|
||||||
addHTMLElement('HTMLMetaElement')
|
addHTMLElement('HTMLMetaElement')
|
||||||
addHTMLElement('HTMLMeterElement')
|
addHTMLElement('HTMLMeterElement')
|
||||||
addHTMLElement('HTMLModElement')
|
addHTMLElement('HTMLModElement')
|
||||||
|
@ -593,6 +597,7 @@ addHTMLElement('HTMLOptionElement')
|
||||||
addHTMLElement('HTMLOutputElement')
|
addHTMLElement('HTMLOutputElement')
|
||||||
addHTMLElement('HTMLParagraphElement')
|
addHTMLElement('HTMLParagraphElement')
|
||||||
addHTMLElement('HTMLParamElement')
|
addHTMLElement('HTMLParamElement')
|
||||||
|
addHTMLElement('HTMLPreElement')
|
||||||
addHTMLElement('HTMLProgressElement')
|
addHTMLElement('HTMLProgressElement')
|
||||||
addHTMLElement('HTMLQuoteElement')
|
addHTMLElement('HTMLQuoteElement')
|
||||||
addHTMLElement('HTMLScriptElement')
|
addHTMLElement('HTMLScriptElement')
|
||||||
|
@ -606,10 +611,13 @@ addHTMLElement('HTMLTableCellElement')
|
||||||
addHTMLElement('HTMLTableColElement')
|
addHTMLElement('HTMLTableColElement')
|
||||||
addHTMLElement('HTMLTableRowElement')
|
addHTMLElement('HTMLTableRowElement')
|
||||||
addHTMLElement('HTMLTableSectionElement')
|
addHTMLElement('HTMLTableSectionElement')
|
||||||
|
addHTMLElement('HTMLTemplateElement')
|
||||||
addHTMLElement('HTMLTextAreaElement')
|
addHTMLElement('HTMLTextAreaElement')
|
||||||
addHTMLElement('HTMLTimeElement')
|
addHTMLElement('HTMLTimeElement')
|
||||||
addHTMLElement('HTMLTitleElement')
|
addHTMLElement('HTMLTitleElement')
|
||||||
|
addHTMLElement('HTMLTrackElement')
|
||||||
addHTMLElement('HTMLUListElement')
|
addHTMLElement('HTMLUListElement')
|
||||||
|
addHTMLElement('HTMLVideoElement')
|
||||||
addHTMLElement('HTMLUnknownElement')
|
addHTMLElement('HTMLUnknownElement')
|
||||||
|
|
||||||
# If you add one of these, you need to make sure nsDOMQS.h has the relevant
|
# If you add one of these, you need to make sure nsDOMQS.h has the relevant
|
||||||
|
@ -619,7 +627,6 @@ def addExternalHTMLElement(element):
|
||||||
addExternalIface(element, nativeType=nativeElement,
|
addExternalIface(element, nativeType=nativeElement,
|
||||||
headerFile=nativeElement + '.h')
|
headerFile=nativeElement + '.h')
|
||||||
|
|
||||||
addExternalHTMLElement('HTMLVideoElement')
|
|
||||||
addExternalIface('CanvasGradient', headerFile='nsIDOMCanvasRenderingContext2D.h')
|
addExternalIface('CanvasGradient', headerFile='nsIDOMCanvasRenderingContext2D.h')
|
||||||
addExternalIface('CanvasPattern', headerFile='nsIDOMCanvasRenderingContext2D.h')
|
addExternalIface('CanvasPattern', headerFile='nsIDOMCanvasRenderingContext2D.h')
|
||||||
addExternalIface('CSSRule')
|
addExternalIface('CSSRule')
|
||||||
|
|
|
@ -0,0 +1,37 @@
|
||||||
|
/* -*- 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-audio-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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// import from http://mxr.mozilla.org/mozilla-central/source/dom/webidl/
|
||||||
|
|
||||||
|
[NamedConstructor=Audio(optional DOMString src)]
|
||||||
|
interface HTMLAudioElement : HTMLMediaElement {};
|
||||||
|
|
||||||
|
partial interface HTMLAudioElement
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
// Setup the audio stream for writing
|
||||||
|
[Pref="media.audio_data.enabled", Throws]
|
||||||
|
void mozSetup(unsigned long channels, unsigned long rate);
|
||||||
|
|
||||||
|
// Write audio to the audio stream
|
||||||
|
[Pref="media.audio_data.enabled", Throws]
|
||||||
|
unsigned long mozWriteAudio(Float32Array data);
|
||||||
|
[Pref="media.audio_data.enabled", Throws]
|
||||||
|
unsigned long mozWriteAudio(sequence<unrestricted float> data);
|
||||||
|
|
||||||
|
// Get the current offset (measured in samples since the start) of the audio
|
||||||
|
// stream created using mozWriteAudio().
|
||||||
|
[Pref="media.audio_data.enabled", Throws]
|
||||||
|
unsigned long long mozCurrentSampleOffset();
|
||||||
|
*/
|
||||||
|
};
|
|
@ -0,0 +1,24 @@
|
||||||
|
/* -*- 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// import from http://mxr.mozilla.org/mozilla-central/source/dom/webidl/
|
||||||
|
|
||||||
|
interface HTMLLabelElement : HTMLElement {
|
||||||
|
/* FIXME:
|
||||||
|
readonly attribute HTMLFormElement? form;
|
||||||
|
*/
|
||||||
|
attribute DOMString htmlFor;
|
||||||
|
/*
|
||||||
|
readonly attribute HTMLElement? control;
|
||||||
|
*/
|
||||||
|
};
|
|
@ -0,0 +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-legend-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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// import from http://mxr.mozilla.org/mozilla-central/source/dom/webidl/
|
||||||
|
|
||||||
|
// http://www.whatwg.org/specs/web-apps/current-work/#the-legend-element
|
||||||
|
interface HTMLLegendElement : HTMLElement {
|
||||||
|
/*
|
||||||
|
FIXME:
|
||||||
|
readonly attribute HTMLFormElement? form;
|
||||||
|
*/
|
||||||
|
};
|
||||||
|
|
||||||
|
// http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
|
||||||
|
partial interface HTMLLegendElement {
|
||||||
|
[SetterThrows]
|
||||||
|
attribute DOMString align;
|
||||||
|
};
|
|
@ -0,0 +1,188 @@
|
||||||
|
/* -*- 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/#media-elements
|
||||||
|
*
|
||||||
|
* © 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 HTMLMediaElement : HTMLElement {
|
||||||
|
/*
|
||||||
|
// error state
|
||||||
|
readonly attribute MediaError? error;
|
||||||
|
*/
|
||||||
|
// network state
|
||||||
|
[SetterThrows]
|
||||||
|
attribute DOMString src;
|
||||||
|
readonly attribute DOMString currentSrc;
|
||||||
|
|
||||||
|
[SetterThrows]
|
||||||
|
attribute DOMString crossOrigin;
|
||||||
|
const unsigned short NETWORK_EMPTY = 0;
|
||||||
|
const unsigned short NETWORK_IDLE = 1;
|
||||||
|
const unsigned short NETWORK_LOADING = 2;
|
||||||
|
const unsigned short NETWORK_NO_SOURCE = 3;
|
||||||
|
/*
|
||||||
|
TODO:
|
||||||
|
readonly attribute unsigned short networkState;
|
||||||
|
*/
|
||||||
|
[SetterThrows]
|
||||||
|
attribute DOMString preload;
|
||||||
|
/*
|
||||||
|
[Creator]
|
||||||
|
readonly attribute TimeRanges buffered;
|
||||||
|
*/
|
||||||
|
void load();
|
||||||
|
DOMString canPlayType(DOMString type);
|
||||||
|
|
||||||
|
// ready state
|
||||||
|
const unsigned short HAVE_NOTHING = 0;
|
||||||
|
const unsigned short HAVE_METADATA = 1;
|
||||||
|
const unsigned short HAVE_CURRENT_DATA = 2;
|
||||||
|
const unsigned short HAVE_FUTURE_DATA = 3;
|
||||||
|
const unsigned short HAVE_ENOUGH_DATA = 4;
|
||||||
|
readonly attribute unsigned short readyState;
|
||||||
|
readonly attribute boolean seeking;
|
||||||
|
|
||||||
|
// playback state
|
||||||
|
[SetterThrows]
|
||||||
|
attribute double currentTime;
|
||||||
|
// TODO: Bug 847375 - void fastSeek(double time);
|
||||||
|
/*
|
||||||
|
TODO:
|
||||||
|
readonly attribute unrestricted double duration;
|
||||||
|
*/
|
||||||
|
// TODO: Bug 847376 - readonly attribute any startDate;
|
||||||
|
readonly attribute boolean paused;
|
||||||
|
[SetterThrows]
|
||||||
|
attribute double defaultPlaybackRate;
|
||||||
|
[SetterThrows]
|
||||||
|
attribute double playbackRate;
|
||||||
|
/*
|
||||||
|
[Creator]
|
||||||
|
readonly attribute TimeRanges played;
|
||||||
|
[Creator]
|
||||||
|
readonly attribute TimeRanges seekable;
|
||||||
|
*/
|
||||||
|
readonly attribute boolean ended;
|
||||||
|
[SetterThrows]
|
||||||
|
attribute boolean autoplay;
|
||||||
|
[SetterThrows]
|
||||||
|
attribute boolean loop;
|
||||||
|
[Throws]
|
||||||
|
void play();
|
||||||
|
[Throws]
|
||||||
|
void pause();
|
||||||
|
|
||||||
|
// TODO: Bug 847377 - mediaGroup and MediaController
|
||||||
|
// media controller
|
||||||
|
// attribute DOMString mediaGroup;
|
||||||
|
// attribute MediaController? controller;
|
||||||
|
|
||||||
|
// controls
|
||||||
|
[SetterThrows]
|
||||||
|
attribute boolean controls;
|
||||||
|
[SetterThrows]
|
||||||
|
attribute double volume;
|
||||||
|
attribute boolean muted;
|
||||||
|
[SetterThrows]
|
||||||
|
attribute boolean defaultMuted;
|
||||||
|
|
||||||
|
// TODO: Bug 847379
|
||||||
|
// tracks
|
||||||
|
//readonly attribute AudioTrackList audioTracks;
|
||||||
|
//readonly attribute VideoTrackList videoTracks;
|
||||||
|
/*
|
||||||
|
[Pref="media.webvtt.enabled"]
|
||||||
|
readonly attribute TextTrackList textTracks;
|
||||||
|
[Pref="media.webvtt.enabled"]
|
||||||
|
TextTrack addTextTrack(TextTrackKind kind,
|
||||||
|
optional DOMString label = "",
|
||||||
|
optional DOMString language = "");
|
||||||
|
*/
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
// Mozilla extensions:
|
||||||
|
partial interface HTMLMediaElement {
|
||||||
|
attribute MediaStream? mozSrcObject;
|
||||||
|
attribute boolean mozPreservesPitch;
|
||||||
|
readonly attribute boolean mozAutoplayEnabled;
|
||||||
|
|
||||||
|
// Mozilla extension: stream capture
|
||||||
|
[Throws]
|
||||||
|
MediaStream mozCaptureStream();
|
||||||
|
[Throws]
|
||||||
|
MediaStream mozCaptureStreamUntilEnded();
|
||||||
|
readonly attribute boolean mozAudioCaptured;
|
||||||
|
|
||||||
|
// Mozilla extension: extra stream metadata information, used as part
|
||||||
|
// of MozAudioAvailable events and the mozWriteAudio() method. The
|
||||||
|
// mozFrameBufferLength method allows for the size of the framebuffer
|
||||||
|
// used within MozAudioAvailable events to be changed. The new size must
|
||||||
|
// be between 512 and 16384. The default size, for a media element with
|
||||||
|
// audio is (mozChannels * 1024).
|
||||||
|
[GetterThrows]
|
||||||
|
readonly attribute unsigned long mozChannels;
|
||||||
|
[GetterThrows]
|
||||||
|
readonly attribute unsigned long mozSampleRate;
|
||||||
|
[Throws]
|
||||||
|
attribute unsigned long mozFrameBufferLength;
|
||||||
|
|
||||||
|
// Mozilla extension: return embedded metadata from the stream as a
|
||||||
|
// JSObject with key:value pairs for each tag. This can be used by
|
||||||
|
// player interfaces to display the song title, artist, etc.
|
||||||
|
[Throws]
|
||||||
|
object? mozGetMetadata();
|
||||||
|
|
||||||
|
// Mozilla extension: provides access to the fragment end time if
|
||||||
|
// the media element has a fragment URI for the currentSrc, otherwise
|
||||||
|
// it is equal to the media duration.
|
||||||
|
readonly attribute double mozFragmentEnd;
|
||||||
|
|
||||||
|
// Mozilla extension: an audio channel type for media elements.
|
||||||
|
// An exception is thrown if the app tries to change the audio channel type
|
||||||
|
// without the permission (manifest file for B2G apps).
|
||||||
|
// The supported values are:
|
||||||
|
// * normal (default value)
|
||||||
|
// Automatically paused if "notification" or higher priority channel
|
||||||
|
// is played
|
||||||
|
// Use case: normal applications
|
||||||
|
// * content
|
||||||
|
// Automatically paused if "notification" or higher priority channel
|
||||||
|
// is played. Also paused if another app starts using "content"
|
||||||
|
// channel. Using this channel never affects applications using
|
||||||
|
// the "normal" channel.
|
||||||
|
// Use case: video/audio players
|
||||||
|
// * notification
|
||||||
|
// Automatically paused if "alarm" or higher priority channel is played.
|
||||||
|
// Use case: New email, incoming SMS
|
||||||
|
// * alarm
|
||||||
|
// Automatically paused if "telephony" or higher priority channel is
|
||||||
|
// played.
|
||||||
|
// User case: Alarm clock, calendar alarms
|
||||||
|
// * telephony
|
||||||
|
// Automatically paused if "ringer" or higher priority
|
||||||
|
// channel is played.
|
||||||
|
// Use case: dialer, voip
|
||||||
|
// * ringer
|
||||||
|
// Automatically paused if "publicnotification" or higher priority
|
||||||
|
// channel is played.
|
||||||
|
// Use case: dialer, voip
|
||||||
|
// * publicnotification
|
||||||
|
// Always plays in speaker, even when headphones are plugged in.
|
||||||
|
// Use case: Camera shutter sound.
|
||||||
|
[SetterThrows]
|
||||||
|
attribute DOMString mozAudioChannelType;
|
||||||
|
|
||||||
|
// In addition the media element has this new events:
|
||||||
|
// * onmozinterruptbegin - called when the media element is interrupted
|
||||||
|
// because of the audiochannel manager.
|
||||||
|
// * onmozinterruptend - called when the interruption is concluded
|
||||||
|
};
|
||||||
|
*/
|
|
@ -0,0 +1,24 @@
|
||||||
|
/* -*- 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-pre-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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// import from http://mxr.mozilla.org/mozilla-central/source/dom/webidl/
|
||||||
|
|
||||||
|
// http://www.whatwg.org/specs/web-apps/current-work/#the-pre-element
|
||||||
|
interface HTMLPreElement : HTMLElement {
|
||||||
|
};
|
||||||
|
|
||||||
|
// http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
|
||||||
|
partial interface HTMLPreElement {
|
||||||
|
[SetterThrows]
|
||||||
|
attribute long width;
|
||||||
|
};
|
|
@ -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/.
|
||||||
|
*
|
||||||
|
* The origin of this IDL file is
|
||||||
|
* https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/templates/index.html
|
||||||
|
*
|
||||||
|
* Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
|
||||||
|
* liability, trademark and document use rules apply.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// import from http://mxr.mozilla.org/mozilla-central/source/dom/webidl/HTMLTemplateElement.webidl
|
||||||
|
|
||||||
|
interface HTMLTemplateElement : HTMLElement {
|
||||||
|
/* FIXME:
|
||||||
|
readonly attribute DocumentFragment content;
|
||||||
|
*/
|
||||||
|
};
|
||||||
|
|
|
@ -0,0 +1,36 @@
|
||||||
|
/* -*- 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-track-element
|
||||||
|
*/
|
||||||
|
|
||||||
|
// import from http://mxr.mozilla.org/mozilla-central/source/dom/webidl/
|
||||||
|
|
||||||
|
/*
|
||||||
|
[Pref="media.webvtt.enabled"]
|
||||||
|
*/
|
||||||
|
interface HTMLTrackElement : HTMLElement {
|
||||||
|
[SetterThrows, Pure]
|
||||||
|
attribute DOMString kind;
|
||||||
|
[SetterThrows, Pure]
|
||||||
|
attribute DOMString src;
|
||||||
|
[SetterThrows, Pure]
|
||||||
|
attribute DOMString srclang;
|
||||||
|
[SetterThrows, Pure]
|
||||||
|
attribute DOMString label;
|
||||||
|
[SetterThrows, Pure]
|
||||||
|
attribute boolean default;
|
||||||
|
|
||||||
|
const unsigned short NONE = 0;
|
||||||
|
const unsigned short LOADING = 1;
|
||||||
|
const unsigned short LOADED = 2;
|
||||||
|
const unsigned short ERROR = 3;
|
||||||
|
readonly attribute unsigned short readyState;
|
||||||
|
/*
|
||||||
|
TODO:
|
||||||
|
readonly attribute TextTrack track;
|
||||||
|
*/
|
||||||
|
};
|
|
@ -0,0 +1,56 @@
|
||||||
|
/* -*- 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-video-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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// import from http://mxr.mozilla.org/mozilla-central/source/dom/webidl/
|
||||||
|
|
||||||
|
interface HTMLVideoElement : HTMLMediaElement {
|
||||||
|
[SetterThrows]
|
||||||
|
attribute unsigned long width;
|
||||||
|
[SetterThrows]
|
||||||
|
attribute unsigned long height;
|
||||||
|
readonly attribute unsigned long videoWidth;
|
||||||
|
readonly attribute unsigned long videoHeight;
|
||||||
|
[SetterThrows]
|
||||||
|
attribute DOMString poster;
|
||||||
|
};
|
||||||
|
/*
|
||||||
|
partial interface HTMLVideoElement {
|
||||||
|
// A count of the number of video frames that have demuxed from the media
|
||||||
|
// resource. If we were playing perfectly, we'd be able to paint this many
|
||||||
|
// frames.
|
||||||
|
readonly attribute unsigned long mozParsedFrames;
|
||||||
|
|
||||||
|
// A count of the number of frames that have been decoded. We may drop
|
||||||
|
// frames if the decode is taking too much time.
|
||||||
|
readonly attribute unsigned long mozDecodedFrames;
|
||||||
|
|
||||||
|
// A count of the number of frames that have been presented to the rendering
|
||||||
|
// pipeline. We may drop frames if they arrive late at the renderer.
|
||||||
|
readonly attribute unsigned long mozPresentedFrames;
|
||||||
|
|
||||||
|
// Number of presented frames which were painted on screen.
|
||||||
|
readonly attribute unsigned long mozPaintedFrames;
|
||||||
|
|
||||||
|
// Time which the last painted video frame was late by, in seconds.
|
||||||
|
readonly attribute double mozFrameDelay;
|
||||||
|
|
||||||
|
// True if the video has an audio track available.
|
||||||
|
readonly attribute boolean mozHasAudio;
|
||||||
|
};
|
||||||
|
|
||||||
|
// https://dvcs.w3.org/hg/html-media/raw-file/default/media-source/media-source.html#idl-def-HTMLVideoElement
|
||||||
|
partial interface HTMLVideoElement {
|
||||||
|
[Pref="media.mediasource.enabled", Creator]
|
||||||
|
VideoPlaybackQuality getVideoPlaybackQuality();
|
||||||
|
};
|
||||||
|
*/
|
|
@ -48,6 +48,8 @@ generate_cacheable_wrapper!(HTMLAppletElement, HTMLAppletElementBinding::Wrap)
|
||||||
generate_binding_object!(HTMLAppletElement)
|
generate_binding_object!(HTMLAppletElement)
|
||||||
generate_cacheable_wrapper!(HTMLAreaElement, HTMLAreaElementBinding::Wrap)
|
generate_cacheable_wrapper!(HTMLAreaElement, HTMLAreaElementBinding::Wrap)
|
||||||
generate_binding_object!(HTMLAreaElement)
|
generate_binding_object!(HTMLAreaElement)
|
||||||
|
generate_cacheable_wrapper!(HTMLAudioElement, HTMLAudioElementBinding::Wrap)
|
||||||
|
generate_binding_object!(HTMLAudioElement)
|
||||||
generate_cacheable_wrapper!(HTMLBaseElement, HTMLBaseElementBinding::Wrap)
|
generate_cacheable_wrapper!(HTMLBaseElement, HTMLBaseElementBinding::Wrap)
|
||||||
generate_binding_object!(HTMLBaseElement)
|
generate_binding_object!(HTMLBaseElement)
|
||||||
generate_cacheable_wrapper!(HTMLBodyElement, HTMLBodyElementBinding::Wrap)
|
generate_cacheable_wrapper!(HTMLBodyElement, HTMLBodyElementBinding::Wrap)
|
||||||
|
@ -92,12 +94,18 @@ generate_cacheable_wrapper!(HTMLImageElement, HTMLImageElementBinding::Wrap)
|
||||||
generate_binding_object!(HTMLImageElement)
|
generate_binding_object!(HTMLImageElement)
|
||||||
generate_cacheable_wrapper!(HTMLInputElement, HTMLInputElementBinding::Wrap)
|
generate_cacheable_wrapper!(HTMLInputElement, HTMLInputElementBinding::Wrap)
|
||||||
generate_binding_object!(HTMLInputElement)
|
generate_binding_object!(HTMLInputElement)
|
||||||
|
generate_cacheable_wrapper!(HTMLLabelElement, HTMLLabelElementBinding::Wrap)
|
||||||
|
generate_binding_object!(HTMLLabelElement)
|
||||||
|
generate_cacheable_wrapper!(HTMLLegendElement, HTMLLegendElementBinding::Wrap)
|
||||||
|
generate_binding_object!(HTMLLegendElement)
|
||||||
generate_cacheable_wrapper!(HTMLLIElement, HTMLLIElementBinding::Wrap)
|
generate_cacheable_wrapper!(HTMLLIElement, HTMLLIElementBinding::Wrap)
|
||||||
generate_binding_object!(HTMLLIElement)
|
generate_binding_object!(HTMLLIElement)
|
||||||
generate_cacheable_wrapper!(HTMLLinkElement, HTMLLinkElementBinding::Wrap)
|
generate_cacheable_wrapper!(HTMLLinkElement, HTMLLinkElementBinding::Wrap)
|
||||||
generate_binding_object!(HTMLLinkElement)
|
generate_binding_object!(HTMLLinkElement)
|
||||||
generate_cacheable_wrapper!(HTMLMapElement, HTMLMapElementBinding::Wrap)
|
generate_cacheable_wrapper!(HTMLMapElement, HTMLMapElementBinding::Wrap)
|
||||||
generate_binding_object!(HTMLMapElement)
|
generate_binding_object!(HTMLMapElement)
|
||||||
|
generate_cacheable_wrapper!(HTMLMediaElement, HTMLMediaElementBinding::Wrap)
|
||||||
|
generate_binding_object!(HTMLMediaElement)
|
||||||
generate_cacheable_wrapper!(HTMLMetaElement, HTMLMetaElementBinding::Wrap)
|
generate_cacheable_wrapper!(HTMLMetaElement, HTMLMetaElementBinding::Wrap)
|
||||||
generate_binding_object!(HTMLMetaElement)
|
generate_binding_object!(HTMLMetaElement)
|
||||||
generate_cacheable_wrapper!(HTMLMeterElement, HTMLMeterElementBinding::Wrap)
|
generate_cacheable_wrapper!(HTMLMeterElement, HTMLMeterElementBinding::Wrap)
|
||||||
|
@ -118,6 +126,8 @@ generate_cacheable_wrapper!(HTMLParagraphElement, HTMLParagraphElementBinding::W
|
||||||
generate_binding_object!(HTMLParagraphElement)
|
generate_binding_object!(HTMLParagraphElement)
|
||||||
generate_cacheable_wrapper!(HTMLParamElement, HTMLParamElementBinding::Wrap)
|
generate_cacheable_wrapper!(HTMLParamElement, HTMLParamElementBinding::Wrap)
|
||||||
generate_binding_object!(HTMLParamElement)
|
generate_binding_object!(HTMLParamElement)
|
||||||
|
generate_cacheable_wrapper!(HTMLPreElement, HTMLPreElementBinding::Wrap)
|
||||||
|
generate_binding_object!(HTMLPreElement)
|
||||||
generate_cacheable_wrapper!(HTMLProgressElement, HTMLProgressElementBinding::Wrap)
|
generate_cacheable_wrapper!(HTMLProgressElement, HTMLProgressElementBinding::Wrap)
|
||||||
generate_binding_object!(HTMLProgressElement)
|
generate_binding_object!(HTMLProgressElement)
|
||||||
generate_cacheable_wrapper!(HTMLQuoteElement, HTMLQuoteElementBinding::Wrap)
|
generate_cacheable_wrapper!(HTMLQuoteElement, HTMLQuoteElementBinding::Wrap)
|
||||||
|
@ -144,13 +154,19 @@ generate_cacheable_wrapper!(HTMLTableRowElement, HTMLTableRowElementBinding::Wra
|
||||||
generate_binding_object!(HTMLTableRowElement)
|
generate_binding_object!(HTMLTableRowElement)
|
||||||
generate_cacheable_wrapper!(HTMLTableSectionElement, HTMLTableSectionElementBinding::Wrap)
|
generate_cacheable_wrapper!(HTMLTableSectionElement, HTMLTableSectionElementBinding::Wrap)
|
||||||
generate_binding_object!(HTMLTableSectionElement)
|
generate_binding_object!(HTMLTableSectionElement)
|
||||||
|
generate_cacheable_wrapper!(HTMLTemplateElement, HTMLTemplateElementBinding::Wrap)
|
||||||
|
generate_binding_object!(HTMLTemplateElement)
|
||||||
generate_cacheable_wrapper!(HTMLTextAreaElement, HTMLTextAreaElementBinding::Wrap)
|
generate_cacheable_wrapper!(HTMLTextAreaElement, HTMLTextAreaElementBinding::Wrap)
|
||||||
generate_binding_object!(HTMLTextAreaElement)
|
generate_binding_object!(HTMLTextAreaElement)
|
||||||
generate_cacheable_wrapper!(HTMLTitleElement, HTMLTitleElementBinding::Wrap)
|
generate_cacheable_wrapper!(HTMLTitleElement, HTMLTitleElementBinding::Wrap)
|
||||||
generate_binding_object!(HTMLTitleElement)
|
generate_binding_object!(HTMLTitleElement)
|
||||||
generate_cacheable_wrapper!(HTMLTimeElement, HTMLTimeElementBinding::Wrap)
|
generate_cacheable_wrapper!(HTMLTimeElement, HTMLTimeElementBinding::Wrap)
|
||||||
generate_binding_object!(HTMLTimeElement)
|
generate_binding_object!(HTMLTimeElement)
|
||||||
|
generate_cacheable_wrapper!(HTMLTrackElement, HTMLTrackElementBinding::Wrap)
|
||||||
|
generate_binding_object!(HTMLTrackElement)
|
||||||
generate_cacheable_wrapper!(HTMLUListElement, HTMLUListElementBinding::Wrap)
|
generate_cacheable_wrapper!(HTMLUListElement, HTMLUListElementBinding::Wrap)
|
||||||
generate_binding_object!(HTMLUListElement)
|
generate_binding_object!(HTMLUListElement)
|
||||||
|
generate_cacheable_wrapper!(HTMLVideoElement, HTMLVideoElementBinding::Wrap)
|
||||||
|
generate_binding_object!(HTMLVideoElement)
|
||||||
generate_cacheable_wrapper!(HTMLUnknownElement, HTMLUnknownElementBinding::Wrap)
|
generate_cacheable_wrapper!(HTMLUnknownElement, HTMLUnknownElementBinding::Wrap)
|
||||||
generate_binding_object!(HTMLUnknownElement)
|
generate_binding_object!(HTMLUnknownElement)
|
||||||
|
|
|
@ -26,6 +26,7 @@ pub fn create(cx: *JSContext, node: &mut AbstractNode<ScriptView>) -> *JSObject
|
||||||
ElementNodeTypeId(HTMLAnchorElementTypeId) => generate_element!(HTMLAnchorElement),
|
ElementNodeTypeId(HTMLAnchorElementTypeId) => generate_element!(HTMLAnchorElement),
|
||||||
ElementNodeTypeId(HTMLAppletElementTypeId) => generate_element!(HTMLAppletElement),
|
ElementNodeTypeId(HTMLAppletElementTypeId) => generate_element!(HTMLAppletElement),
|
||||||
ElementNodeTypeId(HTMLAreaElementTypeId) => generate_element!(HTMLAreaElement),
|
ElementNodeTypeId(HTMLAreaElementTypeId) => generate_element!(HTMLAreaElement),
|
||||||
|
ElementNodeTypeId(HTMLAudioElementTypeId) => generate_element!(HTMLAudioElement),
|
||||||
ElementNodeTypeId(HTMLBaseElementTypeId) => generate_element!(HTMLBaseElement),
|
ElementNodeTypeId(HTMLBaseElementTypeId) => generate_element!(HTMLBaseElement),
|
||||||
ElementNodeTypeId(HTMLBodyElementTypeId) => generate_element!(HTMLBodyElement),
|
ElementNodeTypeId(HTMLBodyElementTypeId) => generate_element!(HTMLBodyElement),
|
||||||
ElementNodeTypeId(HTMLBRElementTypeId) => generate_element!(HTMLBRElement),
|
ElementNodeTypeId(HTMLBRElementTypeId) => generate_element!(HTMLBRElement),
|
||||||
|
@ -49,9 +50,12 @@ pub fn create(cx: *JSContext, node: &mut AbstractNode<ScriptView>) -> *JSObject
|
||||||
ElementNodeTypeId(HTMLIframeElementTypeId) => generate_element!(HTMLIFrameElement),
|
ElementNodeTypeId(HTMLIframeElementTypeId) => generate_element!(HTMLIFrameElement),
|
||||||
ElementNodeTypeId(HTMLImageElementTypeId) => generate_element!(HTMLImageElement),
|
ElementNodeTypeId(HTMLImageElementTypeId) => generate_element!(HTMLImageElement),
|
||||||
ElementNodeTypeId(HTMLInputElementTypeId) => generate_element!(HTMLInputElement),
|
ElementNodeTypeId(HTMLInputElementTypeId) => generate_element!(HTMLInputElement),
|
||||||
|
ElementNodeTypeId(HTMLLabelElementTypeId) => generate_element!(HTMLLabelElement),
|
||||||
|
ElementNodeTypeId(HTMLLegendElementTypeId) => generate_element!(HTMLLegendElement),
|
||||||
ElementNodeTypeId(HTMLLIElementTypeId) => generate_element!(HTMLLIElement),
|
ElementNodeTypeId(HTMLLIElementTypeId) => generate_element!(HTMLLIElement),
|
||||||
ElementNodeTypeId(HTMLLinkElementTypeId) => generate_element!(HTMLLinkElement),
|
ElementNodeTypeId(HTMLLinkElementTypeId) => generate_element!(HTMLLinkElement),
|
||||||
ElementNodeTypeId(HTMLMapElementTypeId) => generate_element!(HTMLMapElement),
|
ElementNodeTypeId(HTMLMapElementTypeId) => generate_element!(HTMLMapElement),
|
||||||
|
ElementNodeTypeId(HTMLMediaElementTypeId) => generate_element!(HTMLMediaElement),
|
||||||
ElementNodeTypeId(HTMLMetaElementTypeId) => generate_element!(HTMLMetaElement),
|
ElementNodeTypeId(HTMLMetaElementTypeId) => generate_element!(HTMLMetaElement),
|
||||||
ElementNodeTypeId(HTMLMeterElementTypeId) => generate_element!(HTMLMeterElement),
|
ElementNodeTypeId(HTMLMeterElementTypeId) => generate_element!(HTMLMeterElement),
|
||||||
ElementNodeTypeId(HTMLModElementTypeId) => generate_element!(HTMLModElement),
|
ElementNodeTypeId(HTMLModElementTypeId) => generate_element!(HTMLModElement),
|
||||||
|
@ -62,6 +66,7 @@ pub fn create(cx: *JSContext, node: &mut AbstractNode<ScriptView>) -> *JSObject
|
||||||
ElementNodeTypeId(HTMLOutputElementTypeId) => generate_element!(HTMLOutputElement),
|
ElementNodeTypeId(HTMLOutputElementTypeId) => generate_element!(HTMLOutputElement),
|
||||||
ElementNodeTypeId(HTMLParagraphElementTypeId) => generate_element!(HTMLParagraphElement),
|
ElementNodeTypeId(HTMLParagraphElementTypeId) => generate_element!(HTMLParagraphElement),
|
||||||
ElementNodeTypeId(HTMLParamElementTypeId) => generate_element!(HTMLParamElement),
|
ElementNodeTypeId(HTMLParamElementTypeId) => generate_element!(HTMLParamElement),
|
||||||
|
ElementNodeTypeId(HTMLPreElementTypeId) => generate_element!(HTMLPreElement),
|
||||||
ElementNodeTypeId(HTMLProgressElementTypeId) => generate_element!(HTMLProgressElement),
|
ElementNodeTypeId(HTMLProgressElementTypeId) => generate_element!(HTMLProgressElement),
|
||||||
ElementNodeTypeId(HTMLQuoteElementTypeId) => generate_element!(HTMLQuoteElement),
|
ElementNodeTypeId(HTMLQuoteElementTypeId) => generate_element!(HTMLQuoteElement),
|
||||||
ElementNodeTypeId(HTMLScriptElementTypeId) => generate_element!(HTMLScriptElement),
|
ElementNodeTypeId(HTMLScriptElementTypeId) => generate_element!(HTMLScriptElement),
|
||||||
|
@ -75,10 +80,13 @@ pub fn create(cx: *JSContext, node: &mut AbstractNode<ScriptView>) -> *JSObject
|
||||||
ElementNodeTypeId(HTMLTableColElementTypeId) => generate_element!(HTMLTableColElement),
|
ElementNodeTypeId(HTMLTableColElementTypeId) => generate_element!(HTMLTableColElement),
|
||||||
ElementNodeTypeId(HTMLTableRowElementTypeId) => generate_element!(HTMLTableRowElement),
|
ElementNodeTypeId(HTMLTableRowElementTypeId) => generate_element!(HTMLTableRowElement),
|
||||||
ElementNodeTypeId(HTMLTableSectionElementTypeId) => generate_element!(HTMLTableSectionElement),
|
ElementNodeTypeId(HTMLTableSectionElementTypeId) => generate_element!(HTMLTableSectionElement),
|
||||||
|
ElementNodeTypeId(HTMLTemplateElementTypeId) => generate_element!(HTMLTemplateElement),
|
||||||
ElementNodeTypeId(HTMLTextAreaElementTypeId) => generate_element!(HTMLTextAreaElement),
|
ElementNodeTypeId(HTMLTextAreaElementTypeId) => generate_element!(HTMLTextAreaElement),
|
||||||
ElementNodeTypeId(HTMLTimeElementTypeId) => generate_element!(HTMLTimeElement),
|
ElementNodeTypeId(HTMLTimeElementTypeId) => generate_element!(HTMLTimeElement),
|
||||||
ElementNodeTypeId(HTMLTitleElementTypeId) => generate_element!(HTMLTitleElement),
|
ElementNodeTypeId(HTMLTitleElementTypeId) => generate_element!(HTMLTitleElement),
|
||||||
|
ElementNodeTypeId(HTMLTrackElementTypeId) => generate_element!(HTMLTrackElement),
|
||||||
ElementNodeTypeId(HTMLUListElementTypeId) => generate_element!(HTMLUListElement),
|
ElementNodeTypeId(HTMLUListElementTypeId) => generate_element!(HTMLUListElement),
|
||||||
|
ElementNodeTypeId(HTMLVideoElementTypeId) => generate_element!(HTMLVideoElement),
|
||||||
ElementNodeTypeId(HTMLUnknownElementTypeId) => generate_element!(HTMLUnknownElement),
|
ElementNodeTypeId(HTMLUnknownElementTypeId) => generate_element!(HTMLUnknownElement),
|
||||||
CommentNodeTypeId => generate_element!(Comment),
|
CommentNodeTypeId => generate_element!(Comment),
|
||||||
DoctypeNodeTypeId => generate_element!(DocumentType<ScriptView>),
|
DoctypeNodeTypeId => generate_element!(DocumentType<ScriptView>),
|
||||||
|
|
|
@ -51,6 +51,7 @@ pub enum ElementTypeId {
|
||||||
HTMLAnchorElementTypeId,
|
HTMLAnchorElementTypeId,
|
||||||
HTMLAppletElementTypeId,
|
HTMLAppletElementTypeId,
|
||||||
HTMLAreaElementTypeId,
|
HTMLAreaElementTypeId,
|
||||||
|
HTMLAudioElementTypeId,
|
||||||
HTMLBaseElementTypeId,
|
HTMLBaseElementTypeId,
|
||||||
HTMLBRElementTypeId,
|
HTMLBRElementTypeId,
|
||||||
HTMLBodyElementTypeId,
|
HTMLBodyElementTypeId,
|
||||||
|
@ -74,9 +75,12 @@ pub enum ElementTypeId {
|
||||||
HTMLIframeElementTypeId,
|
HTMLIframeElementTypeId,
|
||||||
HTMLImageElementTypeId,
|
HTMLImageElementTypeId,
|
||||||
HTMLInputElementTypeId,
|
HTMLInputElementTypeId,
|
||||||
|
HTMLLabelElementTypeId,
|
||||||
|
HTMLLegendElementTypeId,
|
||||||
HTMLLinkElementTypeId,
|
HTMLLinkElementTypeId,
|
||||||
HTMLLIElementTypeId,
|
HTMLLIElementTypeId,
|
||||||
HTMLMapElementTypeId,
|
HTMLMapElementTypeId,
|
||||||
|
HTMLMediaElementTypeId,
|
||||||
HTMLMetaElementTypeId,
|
HTMLMetaElementTypeId,
|
||||||
HTMLMeterElementTypeId,
|
HTMLMeterElementTypeId,
|
||||||
HTMLModElementTypeId,
|
HTMLModElementTypeId,
|
||||||
|
@ -87,6 +91,7 @@ pub enum ElementTypeId {
|
||||||
HTMLOutputElementTypeId,
|
HTMLOutputElementTypeId,
|
||||||
HTMLParagraphElementTypeId,
|
HTMLParagraphElementTypeId,
|
||||||
HTMLParamElementTypeId,
|
HTMLParamElementTypeId,
|
||||||
|
HTMLPreElementTypeId,
|
||||||
HTMLProgressElementTypeId,
|
HTMLProgressElementTypeId,
|
||||||
HTMLQuoteElementTypeId,
|
HTMLQuoteElementTypeId,
|
||||||
HTMLScriptElementTypeId,
|
HTMLScriptElementTypeId,
|
||||||
|
@ -100,10 +105,13 @@ pub enum ElementTypeId {
|
||||||
HTMLTableColElementTypeId,
|
HTMLTableColElementTypeId,
|
||||||
HTMLTableRowElementTypeId,
|
HTMLTableRowElementTypeId,
|
||||||
HTMLTableSectionElementTypeId,
|
HTMLTableSectionElementTypeId,
|
||||||
|
HTMLTemplateElementTypeId,
|
||||||
HTMLTextAreaElementTypeId,
|
HTMLTextAreaElementTypeId,
|
||||||
HTMLTimeElementTypeId,
|
HTMLTimeElementTypeId,
|
||||||
HTMLTitleElementTypeId,
|
HTMLTitleElementTypeId,
|
||||||
|
HTMLTrackElementTypeId,
|
||||||
HTMLUListElementTypeId,
|
HTMLUListElementTypeId,
|
||||||
|
HTMLVideoElementTypeId,
|
||||||
HTMLUnknownElementTypeId,
|
HTMLUnknownElementTypeId,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
12
src/components/script/dom/htmlaudioelement.rs
Normal file
12
src/components/script/dom/htmlaudioelement.rs
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
/* 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::htmlmediaelement::HTMLMediaElement;
|
||||||
|
|
||||||
|
pub struct HTMLAudioElement {
|
||||||
|
parent: HTMLMediaElement
|
||||||
|
}
|
||||||
|
|
||||||
|
impl HTMLAudioElement {
|
||||||
|
}
|
19
src/components/script/dom/htmllabelelement.rs
Normal file
19
src/components/script/dom/htmllabelelement.rs
Normal file
|
@ -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};
|
||||||
|
use dom::htmlelement::HTMLElement;
|
||||||
|
|
||||||
|
pub struct HTMLLabelElement {
|
||||||
|
parent: HTMLElement,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl HTMLLabelElement {
|
||||||
|
pub fn HtmlFor(&self) -> DOMString {
|
||||||
|
null_string
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn SetHtmlFor(&mut self, _html_for: &DOMString) {
|
||||||
|
}
|
||||||
|
}
|
19
src/components/script/dom/htmllegendelement.rs
Normal file
19
src/components/script/dom/htmllegendelement.rs
Normal file
|
@ -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 HTMLLegendElement {
|
||||||
|
parent: HTMLElement,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl HTMLLegendElement {
|
||||||
|
pub fn Align(&self) -> DOMString {
|
||||||
|
null_string
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn SetAlign(&mut self, _align: &DOMString, _rv: &mut ErrorResult) {
|
||||||
|
}
|
||||||
|
}
|
142
src/components/script/dom/htmlmediaelement.rs
Normal file
142
src/components/script/dom/htmlmediaelement.rs
Normal file
|
@ -0,0 +1,142 @@
|
||||||
|
/* 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::element::ElementTypeId;
|
||||||
|
use dom::htmlelement::HTMLElement;
|
||||||
|
|
||||||
|
pub struct HTMLMediaElement {
|
||||||
|
parent: HTMLElement,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl HTMLMediaElement {
|
||||||
|
pub fn new(type_id: ElementTypeId, tag_name: ~str) -> HTMLMediaElement {
|
||||||
|
HTMLMediaElement {
|
||||||
|
parent: HTMLElement::new(type_id, tag_name)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl HTMLMediaElement {
|
||||||
|
pub fn Src(&self) -> DOMString {
|
||||||
|
null_string
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn SetSrc(&mut self, _src: &DOMString, _rv: &mut ErrorResult) {
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn CurrentSrc(&self) -> DOMString {
|
||||||
|
null_string
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn CrossOrigin(&self) -> DOMString {
|
||||||
|
null_string
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn SetCrossOrigin(&mut self, _cross_origin: &DOMString, _rv: &mut ErrorResult) {
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn Preload(&self) -> DOMString {
|
||||||
|
null_string
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn SetPreload(&mut self, _preload: &DOMString, _rv: &mut ErrorResult) {
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn Load(&self) {
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn CanPlayType(&self, _type: &DOMString) -> DOMString {
|
||||||
|
null_string
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn ReadyState(&self) -> u16 {
|
||||||
|
0
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn Seeking(&self) -> bool {
|
||||||
|
false
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn CurrentTime(&self) -> f64 {
|
||||||
|
0f64
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn SetCurrentTime(&mut self, _current_time: f64, _rv: &mut ErrorResult) {
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn GetDuration(&self) -> f64 {
|
||||||
|
0f64
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn Paused(&self) -> bool {
|
||||||
|
false
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn DefaultPlaybackRate(&self) -> f64 {
|
||||||
|
0f64
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn SetDefaultPlaybackRate(&mut self, _default_playback_rate: f64, _rv: &mut ErrorResult) {
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn PlaybackRate(&self) -> f64 {
|
||||||
|
0f64
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn SetPlaybackRate(&mut self, _playback_rate: f64, _rv: &mut ErrorResult) {
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn Ended(&self) -> bool {
|
||||||
|
false
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn Autoplay(&self) -> bool {
|
||||||
|
false
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn SetAutoplay(&mut self, _autoplay: bool, _rv: &mut ErrorResult) {
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn Loop(&self) -> bool {
|
||||||
|
false
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn SetLoop(&mut self, _loop: bool, _rv: &mut ErrorResult) {
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn Play(&self, _rv: &mut ErrorResult) {
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn Pause(&self, _rv: &mut ErrorResult) {
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn Controls(&self) -> bool {
|
||||||
|
false
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn SetControls(&mut self, _controls: bool, _rv: &mut ErrorResult) {
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn Volume(&self) -> f64 {
|
||||||
|
0f64
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn SetVolume(&mut self, _volume: f64, _rv: &mut ErrorResult) {
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn Muted(&self) -> bool {
|
||||||
|
false
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn SetMuted(&mut self, _muted: bool) {
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn DefaultMuted(&self) -> bool {
|
||||||
|
false
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn SetDefaultMuted(&mut self, _default_muted: bool, _rv: &mut ErrorResult) {
|
||||||
|
}
|
||||||
|
}
|
19
src/components/script/dom/htmlpreelement.rs
Normal file
19
src/components/script/dom/htmlpreelement.rs
Normal file
|
@ -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::{ErrorResult};
|
||||||
|
use dom::htmlelement::HTMLElement;
|
||||||
|
|
||||||
|
pub struct HTMLPreElement {
|
||||||
|
parent: HTMLElement,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl HTMLPreElement {
|
||||||
|
pub fn Width(&self) -> i32 {
|
||||||
|
0
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn SetWidth(&mut self, _width: i32, _rv: &mut ErrorResult) {
|
||||||
|
}
|
||||||
|
}
|
12
src/components/script/dom/htmltemplateelement.rs
Normal file
12
src/components/script/dom/htmltemplateelement.rs
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
/* 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::htmlelement::HTMLElement;
|
||||||
|
|
||||||
|
pub struct HTMLTemplateElement {
|
||||||
|
parent: HTMLElement,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl HTMLTemplateElement {
|
||||||
|
}
|
51
src/components/script/dom/htmltrackelement.rs
Normal file
51
src/components/script/dom/htmltrackelement.rs
Normal file
|
@ -0,0 +1,51 @@
|
||||||
|
/* 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 HTMLTrackElement {
|
||||||
|
parent: HTMLElement,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl HTMLTrackElement {
|
||||||
|
pub fn Kind(&self) -> DOMString {
|
||||||
|
null_string
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn SetKind(&mut self, _kind: &DOMString, _rv: &mut ErrorResult) {
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn Src(&self) -> DOMString {
|
||||||
|
null_string
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn SetSrc(&mut self, _src: &DOMString, _rv: &mut ErrorResult) {
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn Srclang(&self) -> DOMString {
|
||||||
|
null_string
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn SetSrclang(&mut self, _srclang: &DOMString, _rv: &mut ErrorResult) {
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn Label(&self) -> DOMString {
|
||||||
|
null_string
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn SetLabel(&mut self, _label: &DOMString, _rv: &mut ErrorResult) {
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn Default(&self) -> bool {
|
||||||
|
false
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn SetDefault(&mut self, _default: bool, _rv: &mut ErrorResult) {
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn ReadyState(&self) -> u16 {
|
||||||
|
0
|
||||||
|
}
|
||||||
|
}
|
41
src/components/script/dom/htmlvideoelement.rs
Normal file
41
src/components/script/dom/htmlvideoelement.rs
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
/* 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::htmlmediaelement::HTMLMediaElement;
|
||||||
|
|
||||||
|
pub struct HTMLVideoElement {
|
||||||
|
parent: HTMLMediaElement
|
||||||
|
}
|
||||||
|
|
||||||
|
impl HTMLVideoElement {
|
||||||
|
pub fn Width(&self) -> u32 {
|
||||||
|
0
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn SetWidth(&mut self, _width: u32, _rv: &ErrorResult) {
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn Height(&self) -> u32 {
|
||||||
|
0
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn SetHeight(&mut self, _height: u32, _rv: &ErrorResult) {
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn VideoWidth(&self) -> u32 {
|
||||||
|
0
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn VideoHeight(&self) -> u32 {
|
||||||
|
0
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn Poster(&self) -> DOMString {
|
||||||
|
null_string
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn SetPoster(&mut self, _poster: &DOMString, _rv: &ErrorResult) {
|
||||||
|
}
|
||||||
|
}
|
|
@ -58,6 +58,19 @@ macro_rules! handle_htmlelement(
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
macro_rules! handle_htmlmediaelement(
|
||||||
|
($cx: expr, $tag:expr, $string:expr, $type_id:expr, $ctor:ident) => (
|
||||||
|
if eq_slice($tag, $string) {
|
||||||
|
let _element = @$ctor {
|
||||||
|
parent: HTMLMediaElement::new($type_id, ($tag).to_str())
|
||||||
|
};
|
||||||
|
unsafe {
|
||||||
|
return Node::as_abstract_node(cx, _element);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
pub struct JSFile {
|
pub struct JSFile {
|
||||||
data: ~[u8],
|
data: ~[u8],
|
||||||
|
@ -217,6 +230,8 @@ fn build_element_from_tag(cx: *JSContext, tag: &str) -> AbstractNode<ScriptView>
|
||||||
handle_element!(cx, tag, "head", HTMLHeadElementTypeId, HTMLHeadElement, []);
|
handle_element!(cx, tag, "head", HTMLHeadElementTypeId, HTMLHeadElement, []);
|
||||||
handle_element!(cx, tag, "html", HTMLHtmlElementTypeId, HTMLHtmlElement, []);
|
handle_element!(cx, tag, "html", HTMLHtmlElementTypeId, HTMLHtmlElement, []);
|
||||||
handle_element!(cx, tag, "input", HTMLInputElementTypeId, HTMLInputElement, []);
|
handle_element!(cx, tag, "input", HTMLInputElementTypeId, HTMLInputElement, []);
|
||||||
|
handle_element!(cx, tag, "label", HTMLLabelElementTypeId, HTMLLabelElement, []);
|
||||||
|
handle_element!(cx, tag, "legend", HTMLLegendElementTypeId, HTMLLegendElement, []);
|
||||||
handle_element!(cx, tag, "link", HTMLLinkElementTypeId, HTMLLinkElement, []);
|
handle_element!(cx, tag, "link", HTMLLinkElementTypeId, HTMLLinkElement, []);
|
||||||
handle_element!(cx, tag, "li", HTMLLIElementTypeId, HTMLLIElement, []);
|
handle_element!(cx, tag, "li", HTMLLIElementTypeId, HTMLLIElement, []);
|
||||||
handle_element!(cx, tag, "map", HTMLMapElementTypeId, HTMLMapElement, []);
|
handle_element!(cx, tag, "map", HTMLMapElementTypeId, HTMLMapElement, []);
|
||||||
|
@ -230,6 +245,7 @@ fn build_element_from_tag(cx: *JSContext, tag: &str) -> AbstractNode<ScriptView>
|
||||||
handle_element!(cx, tag, "output", HTMLOutputElementTypeId, HTMLOutputElement, []);
|
handle_element!(cx, tag, "output", HTMLOutputElementTypeId, HTMLOutputElement, []);
|
||||||
handle_element!(cx, tag, "p", HTMLParagraphElementTypeId, HTMLParagraphElement, []);
|
handle_element!(cx, tag, "p", HTMLParagraphElementTypeId, HTMLParagraphElement, []);
|
||||||
handle_element!(cx, tag, "param", HTMLParamElementTypeId, HTMLParamElement, []);
|
handle_element!(cx, tag, "param", HTMLParamElementTypeId, HTMLParamElement, []);
|
||||||
|
handle_element!(cx, tag, "pre", HTMLPreElementTypeId, HTMLPreElement, []);
|
||||||
handle_element!(cx, tag, "progress",HTMLProgressElementTypeId, HTMLProgressElement, []);
|
handle_element!(cx, tag, "progress",HTMLProgressElementTypeId, HTMLProgressElement, []);
|
||||||
handle_element!(cx, tag, "q", HTMLQuoteElementTypeId, HTMLQuoteElement, []);
|
handle_element!(cx, tag, "q", HTMLQuoteElementTypeId, HTMLQuoteElement, []);
|
||||||
handle_element!(cx, tag, "script", HTMLScriptElementTypeId, HTMLScriptElement, []);
|
handle_element!(cx, tag, "script", HTMLScriptElementTypeId, HTMLScriptElement, []);
|
||||||
|
@ -243,10 +259,12 @@ fn build_element_from_tag(cx: *JSContext, tag: &str) -> AbstractNode<ScriptView>
|
||||||
handle_element!(cx, tag, "col", HTMLTableColElementTypeId, HTMLTableColElement, []);
|
handle_element!(cx, tag, "col", HTMLTableColElementTypeId, HTMLTableColElement, []);
|
||||||
handle_element!(cx, tag, "colgroup",HTMLTableColElementTypeId, HTMLTableColElement, []);
|
handle_element!(cx, tag, "colgroup",HTMLTableColElementTypeId, HTMLTableColElement, []);
|
||||||
handle_element!(cx, tag, "tbody", HTMLTableSectionElementTypeId, HTMLTableSectionElement, []);
|
handle_element!(cx, tag, "tbody", HTMLTableSectionElementTypeId, HTMLTableSectionElement, []);
|
||||||
|
handle_element!(cx, tag, "template",HTMLTemplateElementTypeId, HTMLTemplateElement, []);
|
||||||
handle_element!(cx, tag, "textarea",HTMLTextAreaElementTypeId, HTMLTextAreaElement, []);
|
handle_element!(cx, tag, "textarea",HTMLTextAreaElementTypeId, HTMLTextAreaElement, []);
|
||||||
handle_element!(cx, tag, "time", HTMLTimeElementTypeId, HTMLTimeElement, []);
|
handle_element!(cx, tag, "time", HTMLTimeElementTypeId, HTMLTimeElement, []);
|
||||||
handle_element!(cx, tag, "title", HTMLTitleElementTypeId, HTMLTitleElement, []);
|
handle_element!(cx, tag, "title", HTMLTitleElementTypeId, HTMLTitleElement, []);
|
||||||
handle_element!(cx, tag, "tr", HTMLTableRowElementTypeId, HTMLTableRowElement, []);
|
handle_element!(cx, tag, "tr", HTMLTableRowElementTypeId, HTMLTableRowElement, []);
|
||||||
|
handle_element!(cx, tag, "track", HTMLTrackElementTypeId, HTMLTrackElement, []);
|
||||||
handle_element!(cx, tag, "ul", HTMLUListElementTypeId, HTMLUListElement, []);
|
handle_element!(cx, tag, "ul", HTMLUListElementTypeId, HTMLUListElement, []);
|
||||||
|
|
||||||
handle_element!(cx, tag, "img", HTMLImageElementTypeId, HTMLImageElement, [(image: None)]);
|
handle_element!(cx, tag, "img", HTMLImageElementTypeId, HTMLImageElement, [(image: None)]);
|
||||||
|
@ -266,6 +284,9 @@ fn build_element_from_tag(cx: *JSContext, tag: &str) -> AbstractNode<ScriptView>
|
||||||
handle_htmlelement!(cx, tag, "section", HTMLElementTypeId, HTMLElement);
|
handle_htmlelement!(cx, tag, "section", HTMLElementTypeId, HTMLElement);
|
||||||
handle_htmlelement!(cx, tag, "small", HTMLElementTypeId, HTMLElement);
|
handle_htmlelement!(cx, tag, "small", HTMLElementTypeId, HTMLElement);
|
||||||
|
|
||||||
|
handle_htmlmediaelement!(cx, tag, "audio", HTMLAudioElementTypeId, HTMLAudioElement);
|
||||||
|
handle_htmlmediaelement!(cx, tag, "video", HTMLVideoElementTypeId, HTMLVideoElement);
|
||||||
|
|
||||||
unsafe {
|
unsafe {
|
||||||
let element = @HTMLUnknownElement {
|
let element = @HTMLUnknownElement {
|
||||||
parent: HTMLElement::new(HTMLUnknownElementTypeId, tag.to_str())
|
parent: HTMLElement::new(HTMLUnknownElementTypeId, tag.to_str())
|
||||||
|
|
|
@ -58,6 +58,7 @@ pub mod dom {
|
||||||
pub mod htmlanchorelement;
|
pub mod htmlanchorelement;
|
||||||
pub mod htmlappletelement;
|
pub mod htmlappletelement;
|
||||||
pub mod htmlareaelement;
|
pub mod htmlareaelement;
|
||||||
|
pub mod htmlaudioelement;
|
||||||
pub mod htmlbaseelement;
|
pub mod htmlbaseelement;
|
||||||
pub mod htmlbodyelement;
|
pub mod htmlbodyelement;
|
||||||
pub mod htmlbrelement;
|
pub mod htmlbrelement;
|
||||||
|
@ -84,9 +85,12 @@ pub mod dom {
|
||||||
pub mod htmliframeelement;
|
pub mod htmliframeelement;
|
||||||
pub mod htmlimageelement;
|
pub mod htmlimageelement;
|
||||||
pub mod htmlinputelement;
|
pub mod htmlinputelement;
|
||||||
|
pub mod htmllabelelement;
|
||||||
|
pub mod htmllegendelement;
|
||||||
pub mod htmllielement;
|
pub mod htmllielement;
|
||||||
pub mod htmllinkelement;
|
pub mod htmllinkelement;
|
||||||
pub mod htmlmapelement;
|
pub mod htmlmapelement;
|
||||||
|
pub mod htmlmediaelement;
|
||||||
pub mod htmlmetaelement;
|
pub mod htmlmetaelement;
|
||||||
pub mod htmlmeterelement;
|
pub mod htmlmeterelement;
|
||||||
pub mod htmlmodelement;
|
pub mod htmlmodelement;
|
||||||
|
@ -97,6 +101,7 @@ pub mod dom {
|
||||||
pub mod htmloutputelement;
|
pub mod htmloutputelement;
|
||||||
pub mod htmlparagraphelement;
|
pub mod htmlparagraphelement;
|
||||||
pub mod htmlparamelement;
|
pub mod htmlparamelement;
|
||||||
|
pub mod htmlpreelement;
|
||||||
pub mod htmlprogresselement;
|
pub mod htmlprogresselement;
|
||||||
pub mod htmlquoteelement;
|
pub mod htmlquoteelement;
|
||||||
pub mod htmlscriptelement;
|
pub mod htmlscriptelement;
|
||||||
|
@ -110,10 +115,13 @@ pub mod dom {
|
||||||
pub mod htmltablecolelement;
|
pub mod htmltablecolelement;
|
||||||
pub mod htmltablerowelement;
|
pub mod htmltablerowelement;
|
||||||
pub mod htmltablesectionelement;
|
pub mod htmltablesectionelement;
|
||||||
|
pub mod htmltemplateelement;
|
||||||
pub mod htmltextareaelement;
|
pub mod htmltextareaelement;
|
||||||
pub mod htmltimeelement;
|
pub mod htmltimeelement;
|
||||||
pub mod htmltitleelement;
|
pub mod htmltitleelement;
|
||||||
|
pub mod htmltrackelement;
|
||||||
pub mod htmlulistelement;
|
pub mod htmlulistelement;
|
||||||
|
pub mod htmlvideoelement;
|
||||||
pub mod htmlunknownelement;
|
pub mod htmlunknownelement;
|
||||||
pub mod mouseevent;
|
pub mod mouseevent;
|
||||||
pub mod node;
|
pub mod node;
|
||||||
|
|
|
@ -15,7 +15,12 @@
|
||||||
<a href="http://www.mozilla.org"></a>
|
<a href="http://www.mozilla.org"></a>
|
||||||
<img src="test.jpg"/>
|
<img src="test.jpg"/>
|
||||||
<embed></embed>
|
<embed></embed>
|
||||||
<form></form>
|
<form>
|
||||||
|
<fieldset>
|
||||||
|
<legend>legend</legend>
|
||||||
|
<label for="">label<input type="text" value="input" /></label>
|
||||||
|
</fieldset>
|
||||||
|
</form>
|
||||||
<hr />
|
<hr />
|
||||||
<canvas/>
|
<canvas/>
|
||||||
<p>pppppppppp</p>
|
<p>pppppppppp</p>
|
||||||
|
@ -50,5 +55,10 @@
|
||||||
</audio>
|
</audio>
|
||||||
<area></area>
|
<area></area>
|
||||||
<data></data>
|
<data></data>
|
||||||
|
<template></template>
|
||||||
|
<pre>pre</pre>
|
||||||
|
<video src="">
|
||||||
|
<track></track>
|
||||||
|
</video>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -241,6 +241,57 @@ window.alert(tags.length);
|
||||||
window.alert(tags[0].tagName);
|
window.alert(tags[0].tagName);
|
||||||
window.alert(tags[0] instanceof HTMLProgressElement);
|
window.alert(tags[0] instanceof HTMLProgressElement);
|
||||||
|
|
||||||
|
window.alert("HTMLTemplateElement:");
|
||||||
|
let tags = document.getElementsByTagName("template");
|
||||||
|
window.alert(tags);
|
||||||
|
window.alert(tags.length);
|
||||||
|
window.alert(tags[0].tagName);
|
||||||
|
window.alert(tags[0] instanceof HTMLTemplateElement);
|
||||||
|
|
||||||
|
window.alert("HTMLPreElement:");
|
||||||
|
let tags = document.getElementsByTagName("pre");
|
||||||
|
window.alert(tags);
|
||||||
|
window.alert(tags.length);
|
||||||
|
window.alert(tags[0].tagName);
|
||||||
|
window.alert(tags[0] instanceof HTMLPreElement);
|
||||||
|
|
||||||
|
window.alert("HTMLLegendElement:");
|
||||||
|
let tags = document.getElementsByTagName("legend");
|
||||||
|
window.alert(tags);
|
||||||
|
window.alert(tags.length);
|
||||||
|
window.alert(tags[0].tagName);
|
||||||
|
window.alert(tags[0] instanceof HTMLLegendElement);
|
||||||
|
|
||||||
|
window.alert("HTMLLabelElement:");
|
||||||
|
let tags = document.getElementsByTagName("label");
|
||||||
|
window.alert(tags);
|
||||||
|
window.alert(tags.length);
|
||||||
|
window.alert(tags[0].tagName);
|
||||||
|
window.alert(tags[0] instanceof HTMLLabelElement);
|
||||||
|
|
||||||
|
window.alert("HTMLTrackElement:");
|
||||||
|
let tags = document.getElementsByTagName("track");
|
||||||
|
window.alert(tags);
|
||||||
|
window.alert(tags.length);
|
||||||
|
window.alert(tags[0].tagName);
|
||||||
|
window.alert(tags[0] instanceof HTMLTrackElement);
|
||||||
|
|
||||||
|
window.alert("HTMLAudioElement:");
|
||||||
|
let tags = document.getElementsByTagName("audio");
|
||||||
|
window.alert(tags);
|
||||||
|
window.alert(tags.length);
|
||||||
|
window.alert(tags[0].tagName);
|
||||||
|
window.alert(tags[0] instanceof HTMLMediaElement);
|
||||||
|
window.alert(tags[0] instanceof HTMLAudioElement);
|
||||||
|
|
||||||
|
window.alert("HTMLVideoElement:");
|
||||||
|
let tags = document.getElementsByTagName("video");
|
||||||
|
window.alert(tags);
|
||||||
|
window.alert(tags.length);
|
||||||
|
window.alert(tags[0].tagName);
|
||||||
|
window.alert(tags[0] instanceof HTMLMediaElement);
|
||||||
|
window.alert(tags[0] instanceof HTMLVideoElement);
|
||||||
|
|
||||||
//TODO: Doesn't work until we throw proper exceptions instead of returning 0 on
|
//TODO: Doesn't work until we throw proper exceptions instead of returning 0 on
|
||||||
// unwrap failure.
|
// unwrap failure.
|
||||||
/*try {
|
/*try {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue