diff options
author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
---|---|---|
committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
commit | 1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch) | |
tree | 46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/WebCore/dom/Element.idl | |
parent | 32761a6cee1d0dee366b885b7b9c777e67885688 (diff) | |
download | WebKitGtk-tarball-master.tar.gz |
webkitgtk-2.16.5HEADwebkitgtk-2.16.5master
Diffstat (limited to 'Source/WebCore/dom/Element.idl')
-rw-r--r-- | Source/WebCore/dom/Element.idl | 298 |
1 files changed, 124 insertions, 174 deletions
diff --git a/Source/WebCore/dom/Element.idl b/Source/WebCore/dom/Element.idl index 6e7905419..4626e8925 100644 --- a/Source/WebCore/dom/Element.idl +++ b/Source/WebCore/dom/Element.idl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006, 2007, 2009 Apple Inc. All rights reserved. + * Copyright (C) 2006, 2007, 2009, 2015 Apple Inc. All rights reserved. * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com> * * This library is free software; you can redistribute it and/or @@ -19,218 +19,168 @@ */ [ + CustomToJSObject, + JSCustomHeader, JSGenerateToNativeObject, + ExportMacro=WEBCORE_EXPORT, ] interface Element : Node { + readonly attribute DOMString? tagName; - // DOM Level 1 Core + [DOMJIT=ReadDOM] DOMString? getAttribute(DOMString name); - [TreatReturnedNullStringAs=Null] readonly attribute DOMString tagName; + [CEReactions, MayThrowException] void setAttribute(DOMString name, DOMString value); - [TreatReturnedNullStringAs=Null] DOMString getAttribute([Default=Undefined] optional DOMString name); - [ObjCLegacyUnnamedParameters, RaisesException] void setAttribute([Default=Undefined] optional DOMString name, - [Default=Undefined] optional DOMString value); - void removeAttribute([Default=Undefined] optional DOMString name); - Attr getAttributeNode([Default=Undefined] optional DOMString name); - [RaisesException] Attr setAttributeNode([Default=Undefined] optional Attr newAttr); - [RaisesException] Attr removeAttributeNode([Default=Undefined] optional Attr oldAttr); - NodeList getElementsByTagName([Default=Undefined] optional DOMString name); + [CEReactions] void removeAttribute(DOMString name); + [DOMJIT=ReadDOM] Attr? getAttributeNode(DOMString name); -#if !defined(LANGUAGE_OBJECTIVE_C) - // For ObjC this is defined on Node for legacy support. - readonly attribute NamedNodeMap attributes; - boolean hasAttributes(); -#endif + [CEReactions, MayThrowException] Attr? setAttributeNode(Attr newAttr); + [CEReactions, MayThrowException] Attr removeAttributeNode(Attr oldAttr); + + [DOMJIT=ReadDOM] HTMLCollection getElementsByTagName(DOMString name); + + readonly attribute NamedNodeMap attributes; + [DOMJIT=ReadDOM] boolean hasAttributes(); + + DOMString? getAttributeNS(DOMString? namespaceURI, DOMString localName); - // DOM Level 2 Core - - [ObjCLegacyUnnamedParameters] DOMString getAttributeNS([TreatNullAs=NullString,Default=Undefined] optional DOMString namespaceURI, - [Default=Undefined] optional DOMString localName); - [ObjCLegacyUnnamedParameters, RaisesException] void setAttributeNS([TreatNullAs=NullString,Default=Undefined] optional DOMString namespaceURI, - [Default=Undefined] optional DOMString qualifiedName, - [Default=Undefined] optional DOMString value); - [ObjCLegacyUnnamedParameters] void removeAttributeNS([TreatNullAs=NullString] DOMString namespaceURI, - DOMString localName); - [ObjCLegacyUnnamedParameters] NodeList getElementsByTagNameNS([TreatNullAs=NullString,Default=Undefined] optional DOMString namespaceURI, - [Default=Undefined] optional DOMString localName); - [ObjCLegacyUnnamedParameters] Attr getAttributeNodeNS([TreatNullAs=NullString,Default=Undefined] optional DOMString namespaceURI, - [Default=Undefined] optional DOMString localName); - [RaisesException] Attr setAttributeNodeNS([Default=Undefined] optional Attr newAttr); + [CEReactions, MayThrowException] void setAttributeNS(DOMString? namespaceURI, DOMString qualifiedName, DOMString value); + [CEReactions] void removeAttributeNS(DOMString? namespaceURI, DOMString localName); + + HTMLCollection getElementsByTagNameNS(DOMString? namespaceURI, DOMString localName); + + Attr? getAttributeNodeNS(DOMString? namespaceURI, DOMString localName); + [CEReactions, MayThrowException] Attr? setAttributeNodeNS(Attr newAttr); boolean hasAttribute(DOMString name); - [ObjCLegacyUnnamedParameters] boolean hasAttributeNS([TreatNullAs=NullString,Default=Undefined] optional DOMString namespaceURI, - [Default=Undefined] optional DOMString localName); - readonly attribute CSSStyleDeclaration style; + boolean hasAttributeNS(DOMString? namespaceURI, DOMString localName); - // DOM 4 -#if !defined(LANGUAGE_OBJECTIVE_C) || !LANGUAGE_OBJECTIVE_C - [Reflect] attribute DOMString id; -#endif + [ImplementedAs=cssomStyle] readonly attribute CSSStyleDeclaration style; - // Common extensions + [CEReactions, Reflect] attribute DOMString id; - readonly attribute long offsetLeft; - readonly attribute long offsetTop; - readonly attribute long offsetWidth; - readonly attribute long offsetHeight; - [ImplementedAs=bindingsOffsetParent] readonly attribute Element offsetParent; - readonly attribute long clientLeft; - readonly attribute long clientTop; - readonly attribute long clientWidth; - readonly attribute long clientHeight; - attribute long scrollLeft; - attribute long scrollTop; + readonly attribute DOMString? namespaceURI; + readonly attribute DOMString? prefix; + readonly attribute DOMString localName; + + readonly attribute double offsetLeft; + readonly attribute double offsetTop; + readonly attribute double offsetWidth; + readonly attribute double offsetHeight; + readonly attribute double clientLeft; + readonly attribute double clientTop; + readonly attribute double clientWidth; + readonly attribute double clientHeight; + + attribute long scrollLeft; // FIXME: should be unrestricted double + attribute long scrollTop; // FIXME: should be unrestricted double readonly attribute long scrollWidth; readonly attribute long scrollHeight; - void focus(); - void blur(); - void scrollIntoView(optional boolean alignWithTop); + [ImplementedAs=bindingsOffsetParent] readonly attribute Element offsetParent; - // WebKit extensions + void scrollIntoView(optional boolean alignWithTop = true); - void scrollIntoViewIfNeeded(optional boolean centerIfNeeded); - void scrollByLines([Default=Undefined] optional long lines); - void scrollByPages([Default=Undefined] optional long pages); + void scrollIntoViewIfNeeded(optional boolean centerIfNeeded = true); - // HTML 5 - NodeList getElementsByClassName([Default=Undefined] optional DOMString name); + [ImplementedAs=scrollTo] void scroll(optional ScrollToOptions options); + [ImplementedAs=scrollTo] void scroll(unrestricted double x, unrestricted double y); - [Reflect=class] attribute DOMString className; - readonly attribute DOMTokenList classList; + void scrollTo(optional ScrollToOptions options); + void scrollTo(unrestricted double x, unrestricted double y); -#if defined(LANGUAGE_JAVASCRIPT) && LANGUAGE_JAVASCRIPT - readonly attribute DOMStringMap dataset; -#endif + void scrollBy(optional ScrollToOptions option); + void scrollBy(unrestricted double x, unrestricted double y); - // NodeSelector - Selector API - [RaisesException] Element querySelector(DOMString selectors); - [RaisesException] NodeList querySelectorAll(DOMString selectors); - - // WebKit extension, pending specification. - [RaisesException] boolean webkitMatchesSelector([Default=Undefined] optional DOMString selectors); - - // ElementTraversal API - readonly attribute Element firstElementChild; - readonly attribute Element lastElementChild; - readonly attribute Element previousElementSibling; - readonly attribute Element nextElementSibling; - readonly attribute unsigned long childElementCount; - - // ShadowAware API -#if defined(ENABLE_SHADOW_DOM) && ENABLE_SHADOW_DOM && defined(LANGUAGE_JAVASCRIPT) && LANGUAGE_JAVASCRIPT - [Reflect=pseudo, ImplementedAs=pseudo] attribute DOMString webkitPseudo; - [ImplementedAs=createShadowRoot, RaisesException] ShadowRoot webkitCreateShadowRoot(); - [ImplementedAs=authorShadowRoot] readonly attribute ShadowRoot webkitShadowRoot; - [ImplementedAs=insertionParentForBinding] readonly attribute Node webkitInsertionParent; -#endif + void scrollByLines(optional long lines = 0); + void scrollByPages(optional long pages = 0); + + sequence<DOMString> getAttributeNames(); + + HTMLCollection getElementsByClassName(DOMString name); + [CEReactions, TreatNullAs=EmptyString, SetterMayThrowException] attribute DOMString innerHTML; + [CEReactions, TreatNullAs=EmptyString, SetterMayThrowException] attribute DOMString outerHTML; + + [CEReactions, Reflect=class] attribute DOMString className; + [PutForwards=value] readonly attribute DOMTokenList classList; + + [MayThrowException] boolean matches(DOMString selectors); + [MayThrowException] Element? closest(DOMString selectors); + [ImplementedAs=matches, MayThrowException] boolean webkitMatchesSelector(DOMString selectors); -#if defined(LANGUAGE_JAVASCRIPT) && LANGUAGE_JAVASCRIPT // CSSOM View Module API ClientRectList getClientRects(); ClientRect getBoundingClientRect(); -#endif - -#if defined(LANGUAGE_OBJECTIVE_C) && LANGUAGE_OBJECTIVE_C - // Objective-C extensions - readonly attribute DOMString innerText; -#endif #if defined(ENABLE_FULLSCREEN_API) && ENABLE_FULLSCREEN_API // Mozilla version - const unsigned short ALLOW_KEYBOARD_INPUT = 1; - void webkitRequestFullScreen([Default=Undefined] optional unsigned short flags); + [ImplementedAs=webkitRequestFullscreen] void webkitRequestFullScreen(); // W3C version void webkitRequestFullscreen(); #endif -#if defined(ENABLE_INDIE_UI) && ENABLE_INDIE_UI - [Reflect] attribute DOMString uiactions; -#endif + [CEReactions, MayThrowException] Element? insertAdjacentElement(DOMString where, Element element); + [CEReactions, MayThrowException] void insertAdjacentHTML(DOMString where, DOMString html); + [MayThrowException] void insertAdjacentText(DOMString where, DOMString text); - [Conditional=POINTER_LOCK] void webkitRequestPointerLock(); + [Conditional=POINTER_LOCK] void requestPointerLock(); // CSS Regions API [Conditional=CSS_REGIONS] readonly attribute DOMString webkitRegionOverset; [Conditional=CSS_REGIONS] sequence<Range> webkitGetRegionFlowRanges(); -#if !defined(LANGUAGE_OBJECTIVE_C) || !LANGUAGE_OBJECTIVE_C - // Event handler DOM attributes - [NotEnumerable] attribute EventListener onabort; - [NotEnumerable] attribute EventListener onblur; - [NotEnumerable] attribute EventListener onchange; - [NotEnumerable] attribute EventListener onclick; - [NotEnumerable] attribute EventListener oncontextmenu; - [NotEnumerable] attribute EventListener ondblclick; - [NotEnumerable] attribute EventListener ondrag; - [NotEnumerable] attribute EventListener ondragend; - [NotEnumerable] attribute EventListener ondragenter; - [NotEnumerable] attribute EventListener ondragleave; - [NotEnumerable] attribute EventListener ondragover; - [NotEnumerable] attribute EventListener ondragstart; - [NotEnumerable] attribute EventListener ondrop; - [NotEnumerable] attribute EventListener onerror; - [NotEnumerable] attribute EventListener onfocus; - [NotEnumerable] attribute EventListener oninput; - [NotEnumerable] attribute EventListener oninvalid; - [NotEnumerable] attribute EventListener onkeydown; - [NotEnumerable] attribute EventListener onkeypress; - [NotEnumerable] attribute EventListener onkeyup; - [NotEnumerable] attribute EventListener onload; - [NotEnumerable] attribute EventListener onmousedown; - [NotEnumerable] attribute EventListener onmouseenter; - [NotEnumerable] attribute EventListener onmouseleave; - [NotEnumerable] attribute EventListener onmousemove; - [NotEnumerable] attribute EventListener onmouseout; - [NotEnumerable] attribute EventListener onmouseover; - [NotEnumerable] attribute EventListener onmouseup; - [NotEnumerable] attribute EventListener onmousewheel; - [NotEnumerable] attribute EventListener onscroll; - [NotEnumerable] attribute EventListener onselect; - [NotEnumerable] attribute EventListener onsubmit; - [NotEnumerable] attribute EventListener onwheel; - - // [NotEnumerable] attribute EventListener oncanplay; - // [NotEnumerable] attribute EventListener oncanplaythrough; - // [NotEnumerable] attribute EventListener ondurationchange; - // [NotEnumerable] attribute EventListener onemptied; - // [NotEnumerable] attribute EventListener onended; - // [NotEnumerable] attribute EventListener onloadeddata; - // [NotEnumerable] attribute EventListener onloadedmetadata; - // [NotEnumerable] attribute EventListener onloadstart; - // [NotEnumerable] attribute EventListener onpause; - // [NotEnumerable] attribute EventListener onplay; - // [NotEnumerable] attribute EventListener onplaying; - // [NotEnumerable] attribute EventListener onprogress; - // [NotEnumerable] attribute EventListener onratechange; - // [NotEnumerable] attribute EventListener onreadystatechange; - // [NotEnumerable] attribute EventListener onseeked; - // [NotEnumerable] attribute EventListener onseeking; - // [NotEnumerable] attribute EventListener onshow; - // [NotEnumerable] attribute EventListener onstalled; - // [NotEnumerable] attribute EventListener onsuspend; - // [NotEnumerable] attribute EventListener ontimeupdate; - // [NotEnumerable] attribute EventListener onvolumechange; - // [NotEnumerable] attribute EventListener onwaiting; - - // WebKit extensions - [NotEnumerable] attribute EventListener onbeforecut; - [NotEnumerable] attribute EventListener oncut; - [NotEnumerable] attribute EventListener onbeforecopy; - [NotEnumerable] attribute EventListener oncopy; - [NotEnumerable] attribute EventListener onbeforepaste; - [NotEnumerable] attribute EventListener onpaste; - [NotEnumerable] attribute EventListener onreset; - [NotEnumerable] attribute EventListener onsearch; - [NotEnumerable] attribute EventListener onselectstart; - [NotEnumerable,Conditional=TOUCH_EVENTS] attribute EventListener ontouchstart; - [NotEnumerable,Conditional=TOUCH_EVENTS] attribute EventListener ontouchmove; - [NotEnumerable,Conditional=TOUCH_EVENTS] attribute EventListener ontouchend; - [NotEnumerable,Conditional=TOUCH_EVENTS] attribute EventListener ontouchcancel; - [NotEnumerable, Conditional=FULLSCREEN_API] attribute EventListener onwebkitfullscreenchange; - [NotEnumerable, Conditional=FULLSCREEN_API] attribute EventListener onwebkitfullscreenerror; -#endif + // Shadow DOM API + [EnabledAtRuntime=ShadowDOM, MayThrowException] ShadowRoot attachShadow(ShadowRootInit init); + [EnabledAtRuntime=ShadowDOM, ImplementedAs=shadowRootForBindings, CallWith=ScriptState] readonly attribute ShadowRoot shadowRoot; + [CEReactions, EnabledAtRuntime=ShadowDOM, Reflect] attribute DOMString slot; + + // Event Handlers + + // Unique to Element and Document + // FIXME: Should these be exposed on Window as well (and therefore moved to GlobalEventHandlers.idl)? + [NotEnumerable] attribute EventHandler onbeforecopy; + [NotEnumerable] attribute EventHandler onbeforecut; + [NotEnumerable] attribute EventHandler onbeforeinput; + [NotEnumerable] attribute EventHandler onbeforepaste; + [NotEnumerable] attribute EventHandler oncopy; + [NotEnumerable] attribute EventHandler oncut; + [NotEnumerable] attribute EventHandler onpaste; + [NotEnumerable] attribute EventHandler onselectstart; + [NotEnumerable, Conditional=FULLSCREEN_API] attribute EventHandler onwebkitfullscreenchange; + [NotEnumerable, Conditional=FULLSCREEN_API] attribute EventHandler onwebkitfullscreenerror; + + // Unique to Element and DOMWindow + // FIXME: Should these be exposed on Document as well (and therefore moved to GlobalEventHandlers.idl)? + [NotEnumerable] attribute EventHandler onanimationend; + [NotEnumerable] attribute EventHandler onanimationiteration; + [NotEnumerable] attribute EventHandler onanimationstart; + [NotEnumerable] attribute EventHandler ontransitionend; + [NotEnumerable, ImplementedAs=onwebkitAnimationEnd] attribute EventHandler onwebkitanimationend; + [NotEnumerable, ImplementedAs=onwebkitAnimationIteration] attribute EventHandler onwebkitanimationiteration; + [NotEnumerable, ImplementedAs=onwebkitAnimationStart] attribute EventHandler onwebkitanimationstart; + [NotEnumerable, ImplementedAs=onwebkitTransitionEnd] attribute EventHandler onwebkittransitionend; + [NotEnumerable, Conditional=IOS_GESTURE_EVENTS] attribute EventHandler ongesturechange; + [NotEnumerable, Conditional=IOS_GESTURE_EVENTS] attribute EventHandler ongestureend; + [NotEnumerable, Conditional=IOS_GESTURE_EVENTS] attribute EventHandler ongesturestart; + + // Unique to Element, HTMLBodyElement and HTMLFrameSetElement + [NotEnumerable] attribute EventHandler onfocusin; + [NotEnumerable] attribute EventHandler onfocusout; + + // Unique to Element + [NotEnumerable] attribute EventHandler onbeforeload; + [NotEnumerable, Conditional=LEGACY_ENCRYPTED_MEDIA] attribute EventHandler onwebkitneedkey; + [NotEnumerable, Conditional=VIDEO_PRESENTATION_MODE] attribute EventHandler onwebkitpresentationmodechanged; + [NotEnumerable, Conditional=WIRELESS_PLAYBACK_TARGET] attribute EventHandler onwebkitcurrentplaybacktargetiswirelesschanged; + [NotEnumerable, Conditional=WIRELESS_PLAYBACK_TARGET] attribute EventHandler onwebkitplaybacktargetavailabilitychanged; }; -Element implements ChildNode; +dictionary ShadowRootInit { + required ShadowRootMode mode; +}; +Element implements Animatable; +Element implements ChildNode; +Element implements NonDocumentTypeChildNode; +Element implements ParentNode; +Element implements Slotable; |