diff options
author | ager@google.com <ager@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-09 10:54:30 +0000 |
---|---|---|
committer | ager@google.com <ager@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-09 10:54:30 +0000 |
commit | 393e50bb469d6af18dd06ee16fd4020f638a4c86 (patch) | |
tree | 0a64895d575a018c14a6c501a8c00ec66cbc99d4 /webkit/port | |
parent | f5ea16084b0ada455912c541e804b3a1831c4cc0 (diff) | |
download | chromium_src-393e50bb469d6af18dd06ee16fd4020f638a4c86.zip chromium_src-393e50bb469d6af18dd06ee16fd4020f638a4c86.tar.gz chromium_src-393e50bb469d6af18dd06ee16fd4020f638a4c86.tar.bz2 |
Merge Document.idl and DOMWindow.idl properly. Diffing our forked
versions agains the WebKit ones it is now easy to see the differences.
The lookup on the window object has changed slightly. We can now get
rid of our v8OnProto annotations in DOMWindow.idl. I have generated
the new expected file for lookup-precedence for JSC using a webkit
nightly build.
Also, a couple of extra constructors have been added to the IDL file
and the CROSS_DOCUMENT_MESSAGING define is gone.
Review URL: http://codereview.chromium.org/6382
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3092 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/port')
-rw-r--r-- | webkit/port/dom/Document.idl | 52 | ||||
-rw-r--r-- | webkit/port/page/DOMWindow.idl | 160 |
2 files changed, 129 insertions, 83 deletions
diff --git a/webkit/port/dom/Document.idl b/webkit/port/dom/Document.idl index 0d3077d..fb8ba94 100644 --- a/webkit/port/dom/Document.idl +++ b/webkit/port/dom/Document.idl @@ -23,7 +23,9 @@ module core { interface [ GenerateConstructor, GenerateToJS, + GenerateNativeConverter, CustomMarkFunction, + InlineGetOwnPropertySlot, InterfaceUUID=48BB95FC-2D08-4c54-BE65-7558736A4CAE, ImplementationUUID=FF5CBE81-F817-429c-A6C2-0CCCD2328062 ] Document : EventTargetNode { @@ -33,32 +35,32 @@ module core { readonly attribute [Custom] DOMImplementation implementation; readonly attribute Element documentElement; - Element createElement(in [ConvertNullToNullString] DOMString tagName) + [ReturnsNew] Element createElement(in [ConvertNullToNullString] DOMString tagName) raises (DOMException); DocumentFragment createDocumentFragment(); - Text createTextNode(in DOMString data); - Comment createComment(in DOMString data); - CDATASection createCDATASection(in DOMString data) + [ReturnsNew] Text createTextNode(in DOMString data); + [ReturnsNew] Comment createComment(in DOMString data); + [ReturnsNew] CDATASection createCDATASection(in DOMString data) raises(DOMException); - [OldStyleObjC] ProcessingInstruction createProcessingInstruction(in DOMString target, - in DOMString data) + [OldStyleObjC, ReturnsNew] ProcessingInstruction createProcessingInstruction(in DOMString target, + in DOMString data) raises (DOMException); - Attr createAttribute(in DOMString name) + [ReturnsNew] Attr createAttribute(in DOMString name) raises (DOMException); - EntityReference createEntityReference(in DOMString name) + [ReturnsNew] EntityReference createEntityReference(in DOMString name) raises(DOMException); NodeList getElementsByTagName(in DOMString tagname); // Introduced in DOM Level 2: - [OldStyleObjC] Node importNode(in Node importedNode, - in boolean deep) + [OldStyleObjC, ReturnsNew] Node importNode(in Node importedNode, + in boolean deep) raises (DOMException); - [OldStyleObjC] Element createElementNS(in [ConvertNullToNullString] DOMString namespaceURI, - in [ConvertNullToNullString] DOMString qualifiedName) + [OldStyleObjC, ReturnsNew] Element createElementNS(in [ConvertNullToNullString] DOMString namespaceURI, + in [ConvertNullToNullString] DOMString qualifiedName) raises (DOMException); - [OldStyleObjC] Attr createAttributeNS(in [ConvertNullToNullString] DOMString namespaceURI, - in [ConvertNullToNullString] DOMString qualifiedName) + [OldStyleObjC, ReturnsNew] Attr createAttributeNS(in [ConvertNullToNullString] DOMString namespaceURI, + in [ConvertNullToNullString] DOMString qualifiedName) raises (DOMException); [OldStyleObjC] NodeList getElementsByTagNameNS(in [ConvertNullToNullString] DOMString namespaceURI, in DOMString localName); @@ -125,11 +127,11 @@ module core { // NOTE: Parameter resolver can also be a JS function or JS object with // the function lookupNamespaceURI. - [Custom] XPathResult evaluate(in DOMString expression, - in Node contextNode, - in XPathNSResolver resolver, - in unsigned short type, - in XPathResult inResult) + [OldStyleObjC, Custom] XPathResult evaluate(in DOMString expression, + in Node contextNode, + in XPathNSResolver resolver, + in unsigned short type, + in XPathResult inResult) raises(DOMException); #endif // ENABLE_XPATH #endif // !defined(LANGUAGE_COM) @@ -230,14 +232,24 @@ module core { CanvasRenderingContext2D getCSSCanvasContext(in DOMString contextId, in DOMString name, in long width, in long height); #endif #endif + // HTML 5 NodeList getElementsByClassName(in DOMString tagname); - // DocumentSelector - Selector API + // NodeSelector - Selector API +#if defined(LANGUAGE_JAVASCRIPT) [Custom] Element querySelector(in [ConvertUndefinedOrNullToNullString] DOMString selectors, in NSResolver resolver) raises(DOMException); [Custom] NodeList querySelectorAll(in [ConvertUndefinedOrNullToNullString] DOMString selectors, in NSResolver resolver) raises(DOMException); +#else + // FIXME: add support for NSResolver in languages other than JS + Element querySelector(in [ConvertUndefinedOrNullToNullString] DOMString selectors) + raises(DOMException); + NodeList querySelectorAll(in [ConvertUndefinedOrNullToNullString] DOMString selectors) + raises(DOMException); +#endif + }; } diff --git a/webkit/port/page/DOMWindow.idl b/webkit/port/page/DOMWindow.idl index 7882f05..6f1a15f 100644 --- a/webkit/port/page/DOMWindow.idl +++ b/webkit/port/page/DOMWindow.idl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. + * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -25,7 +25,22 @@ module window { // DOMWindow object has CheckDomainSecurity on the front object. - interface [LegacyParent=KJS::Window, DoNotCache, GenerateNativeConverter, CustomGetOwnPropertySlot, CustomPutFunction] DOMWindow { + interface [ + CustomDefineGetter, + CustomDefineSetter, + CustomDeleteProperty, + CustomGetOwnPropertySlot, + CustomGetPropertyAttributes, + CustomGetPropertyNames, + CustomLookupGetter, + CustomLookupSetter, + CustomMarkFunction, + CustomNativeConverter, + CustomPutFunction, + DoNotCache, + GenerateNativeConverter, + LegacyParent=JSDOMWindowBase + ] DOMWindow { // DOM Level 0 readonly attribute Screen screen; readonly attribute [DoNotCheckDomainSecurity] History history; @@ -35,6 +50,9 @@ module window { attribute [Replaceable] BarInfo scrollbars; attribute [Replaceable] BarInfo statusbar; attribute [Replaceable] BarInfo toolbar; + attribute [Replaceable] Navigator navigator; + attribute [Replaceable, v8referenceattr=navigator] Navigator clientInformation; + attribute [DoNotCheckDomainSecurity, CustomSetter] Location location; DOMSelection getSelection(); @@ -75,17 +93,25 @@ module window { readonly attribute long pageXOffset; readonly attribute long pageYOffset; + [RequiresAllArguments] void scrollBy(in long x, in long y); + [RequiresAllArguments] void scrollTo(in long x, in long y); + [RequiresAllArguments] void scroll(in long x, in long y); + [RequiresAllArguments] void moveBy(in float x, in float y); // FIXME: this should take longs not floats. + [RequiresAllArguments] void moveTo(in float x, in float y); // FIXME: this should take longs not floats. + [RequiresAllArguments] void resizeBy(in float x, in float y); // FIXME: this should take longs not floats. + [RequiresAllArguments] void resizeTo(in float width, in float height); // FIXME: this should take longs not floats. + readonly attribute [DoNotCheckDomainSecurity] boolean closed; - attribute [Replaceable, DoNotCheckDomainSecurity] unsigned long length; + attribute [Replaceable, DoNotCheckDomainSecurityOnGet] unsigned long length; attribute DOMString name; - attribute [Replaceable] DOMString status; - attribute [Replaceable] DOMString defaultStatus; + attribute DOMString status; + attribute DOMString defaultStatus; #if defined(LANGUAGE_JAVASCRIPT) // This attribute is an alias of defaultStatus and is necessary for legacy uses. - attribute [Replaceable] DOMString defaultstatus; + attribute DOMString defaultstatus; #endif // Self referential attributes @@ -114,10 +140,17 @@ module window { in [Optional] boolean authorOnly); attribute [Replaceable] double devicePixelRatio; -#if ENABLE_DATABASE +#if defined(ENABLE_OFFLINE_WEB_APPLICATIONS) + readonly attribute DOMApplicationCache applicationCache; +#endif +#if defined(ENABLE_DATABASE) Database openDatabase(in DOMString name, in DOMString version, in DOMString displayName, in unsigned long estimatedSize) raises(DOMException); #endif +#if defined(ENABLE_DOM_STORAGE) + readonly attribute Storage sessionStorage; + readonly attribute Storage localStorage; +#endif attribute [Replaceable] Console console; @@ -125,19 +158,6 @@ module window { [DoNotCheckDomainSecurity, Custom] void postMessage(in DOMString message, in DOMString targetOrigin) raises(DOMException); -#if defined(V8_BINDING) - [Custom] DOMWindow open(in DOMString url, - in DOMString name, - in [Optional] DOMString options); - - [Custom] DOMObject showModalDialog(in DOMString url, - in [Optional] DOMObject dialogArgs, - in [Optional] DOMString featureArgs); - - void back(); - void forward(); -#endif - #if defined(LANGUAGE_JAVASCRIPT) // Global constructors attribute StyleSheetConstructor StyleSheet; @@ -155,6 +175,9 @@ module window { attribute CSSPageRuleConstructor CSSPageRule; attribute CSSStyleRuleConstructor CSSStyleRule; + attribute CSSVariablesRuleConstructor CSSVariablesRule; + attribute CSSVariablesDeclarationConstructor CSSVariablesDeclaration; + attribute CSSStyleDeclarationConstructor CSSStyleDeclaration; attribute MediaListConstructor MediaList; attribute CounterConstructor Counter; @@ -252,6 +275,11 @@ module window { attribute HTMLTitleElementConstructor HTMLTitleElement; attribute HTMLUListElementConstructor HTMLUListElement; + attribute HTMLCollectionConstructor HTMLCollection; + + attribute CanvasRenderingContext2DConstructor CanvasRenderingContext2D; + attribute TextMetricsConstructor TextMetrics; + attribute EventConstructor Event; attribute KeyboardEventConstructor KeyboardEvent; attribute MouseEventConstructor MouseEvent; @@ -261,8 +289,14 @@ module window { attribute TextEventConstructor TextEvent; attribute UIEventConstructor UIEvent; attribute WheelEventConstructor WheelEvent; + attribute MessageEventConstructor MessageEvent; attribute EventExceptionConstructor EventException; + attribute ClipboardConstructor Clipboard; + + attribute FileConstructor File; + attribute FileListConstructor FileList; + attribute NodeFilterConstructor NodeFilter; attribute RangeConstructor Range; attribute RangeExceptionConstructor RangeException; @@ -274,6 +308,7 @@ module window { attribute DOMParserConstructor DOMParser; attribute XMLSerializerConstructor XMLSerializer; + attribute XMLHttpRequestUploadConstructor XMLHttpRequestUpload; attribute XMLHttpRequestExceptionConstructor XMLHttpRequestException; #if defined(V8_BINDING) // KJS adds these to the window object in kjs_window.cpp. @@ -281,9 +316,10 @@ module window { attribute XSLTProcessorConstructor XSLTProcessor; #endif -#if defined(ENABLE_CROSS_DOCUMENT_MESSAGING) - attribute MessageEventConstructor MessageEvent; -#endif +#if defined(ENABLE_DOM_STORAGE) + attribute StorageConstructor Storage; + attribute StorageEventConstructor StorageEvent; +#endif #if defined(ENABLE_VIDEO) attribute HTMLAudioElementConstructor HTMLAudioElement; @@ -317,7 +353,7 @@ module window { // attribute SVGZoomAndPanConstructor SVGZoomAndPan; #endif -#if defined(ENABLE_SVG_EXPERIMENTAL_FEATURES) +#if defined(ENABLED_SVG_FILTERS) attribute SVGComponentTransferFunctionElementConstructor SVGComponentTransferFunctionElement; attribute SVGFEBlendElementConstructor SVGFEBlendElement; attribute SVGFEColorMatrixElementConstructor SVGFEColorMatrixElement; @@ -333,23 +369,21 @@ module window { #if defined(V8_BINDING) // These were implemented in KJS::Window and not moved to IDL yet. - attribute [Replaceable] Navigator navigator; - attribute [Replaceable, v8referenceattr=navigator] Navigator clientInformation; - // Getter returns a Location object, setter assigns a string. - attribute [DoNotCheckDomainSecurity, CustomSetter, v8OnProto] Location location; + [Custom] DOMWindow open(in DOMString url, + in DOMString name, + in [Optional] DOMString options); + + [Custom] DOMObject showModalDialog(in DOMString url, + in [Optional] DOMObject dialogArgs, + in [Optional] DOMString featureArgs); + + void back(); + void forward(); // Not supported by Safari // void home(); // void dump(); - [RequiresAllArguments] void scrollBy(in long xScrollDif, in long yScrollDif); - [RequiresAllArguments] void scrollTo(in long xScroll, in long yScroll); - [RequiresAllArguments] void scroll(in long xScroll, in long yScroll); - [RequiresAllArguments] void moveBy(in float x, in float y); // FIXME: this should take longs not floats. - [RequiresAllArguments] void moveTo(in float x, in float y); // FIXME: this should take longs not floats. - [RequiresAllArguments] void resizeBy(in float x, in float y); // FIXME: this should take longs not floats. - [RequiresAllArguments] void resizeTo(in float width, in float height); // FIXME: this should take longs not floats. - // Not supported in Safari. // void sizeToContent(); // void getAttention(); @@ -384,33 +418,33 @@ module window { // DOMString unescape(in DOMString str); // attributes that are v8 specific, type is not important. - attribute [Custom=DOMWindowEventHandler, v8OnProto] DOMString onabort; - attribute [Custom=DOMWindowEventHandler, v8OnProto] DOMString onblur; - attribute [Custom=DOMWindowEventHandler, v8OnProto] DOMString onchange; - attribute [Custom=DOMWindowEventHandler, v8OnProto] DOMString onclick; - attribute [Custom=DOMWindowEventHandler, v8OnProto] DOMString ondblclick; - attribute [Custom=DOMWindowEventHandler, v8OnProto] DOMString ondragdrop; - attribute [Custom=DOMWindowEventHandler, v8OnProto] DOMString onerror; - attribute [Custom=DOMWindowEventHandler, v8OnProto] DOMString onfocus; - attribute [Custom=DOMWindowEventHandler, v8OnProto] DOMString onkeydown; - attribute [Custom=DOMWindowEventHandler, v8OnProto] DOMString onkeypress; - attribute [Custom=DOMWindowEventHandler, v8OnProto] DOMString onkeyup; - attribute [Custom=DOMWindowEventHandler, v8OnProto] DOMString onload; - attribute [Custom=DOMWindowEventHandler, v8OnProto] DOMString onmousedown; - attribute [Custom=DOMWindowEventHandler, v8OnProto] DOMString onmousemove; - attribute [Custom=DOMWindowEventHandler, v8OnProto] DOMString onmouseout; - attribute [Custom=DOMWindowEventHandler, v8OnProto] DOMString onmouseover; - attribute [Custom=DOMWindowEventHandler, v8OnProto] DOMString onmouseup; - attribute [Custom=DOMWindowEventHandler, v8OnProto] DOMString onmousewheel; - attribute [Custom=DOMWindowEventHandler, v8OnProto] DOMString onmove; - attribute [Custom=DOMWindowEventHandler, v8OnProto] DOMString onreset; - attribute [Custom=DOMWindowEventHandler, v8OnProto] DOMString onresize; - attribute [Custom=DOMWindowEventHandler, v8OnProto] DOMString onscroll; - attribute [Custom=DOMWindowEventHandler, v8OnProto] DOMString onsearch; - attribute [Custom=DOMWindowEventHandler, v8OnProto] DOMString onselect; - attribute [Custom=DOMWindowEventHandler, v8OnProto] DOMString onsubmit; - attribute [Custom=DOMWindowEventHandler, v8OnProto] DOMString onunload; - attribute [Custom=DOMWindowEventHandler, v8OnProto] DOMString onbeforeunload; + attribute [Custom=DOMWindowEventHandler] DOMString onabort; + attribute [Custom=DOMWindowEventHandler] DOMString onblur; + attribute [Custom=DOMWindowEventHandler] DOMString onchange; + attribute [Custom=DOMWindowEventHandler] DOMString onclick; + attribute [Custom=DOMWindowEventHandler] DOMString ondblclick; + attribute [Custom=DOMWindowEventHandler] DOMString ondragdrop; + attribute [Custom=DOMWindowEventHandler] DOMString onerror; + attribute [Custom=DOMWindowEventHandler] DOMString onfocus; + attribute [Custom=DOMWindowEventHandler] DOMString onkeydown; + attribute [Custom=DOMWindowEventHandler] DOMString onkeypress; + attribute [Custom=DOMWindowEventHandler] DOMString onkeyup; + attribute [Custom=DOMWindowEventHandler] DOMString onload; + attribute [Custom=DOMWindowEventHandler] DOMString onmousedown; + attribute [Custom=DOMWindowEventHandler] DOMString onmousemove; + attribute [Custom=DOMWindowEventHandler] DOMString onmouseout; + attribute [Custom=DOMWindowEventHandler] DOMString onmouseover; + attribute [Custom=DOMWindowEventHandler] DOMString onmouseup; + attribute [Custom=DOMWindowEventHandler] DOMString onmousewheel; + attribute [Custom=DOMWindowEventHandler] DOMString onmove; + attribute [Custom=DOMWindowEventHandler] DOMString onreset; + attribute [Custom=DOMWindowEventHandler] DOMString onresize; + attribute [Custom=DOMWindowEventHandler] DOMString onscroll; + attribute [Custom=DOMWindowEventHandler] DOMString onsearch; + attribute [Custom=DOMWindowEventHandler] DOMString onselect; + attribute [Custom=DOMWindowEventHandler] DOMString onsubmit; + attribute [Custom=DOMWindowEventHandler] DOMString onunload; + attribute [Custom=DOMWindowEventHandler] DOMString onbeforeunload; #endif // defined(V8_BINDING) }; } |