Update IDL to Chrome 32 TBR=blois@google.com,efortuna@google.com Review URL: https://codereview.chromium.org//126143003 git-svn-id: http://dart.googlecode.com/svn/third_party/WebCore@31553 260f80e4-7a28-3924-810f-c04153c831b5
diff --git a/core/README b/core/README index 031dfa4..8f88f7d 100644 --- a/core/README +++ b/core/README
@@ -5,5 +5,5 @@ using the script: $DART_ROOT/sdk/lib/html/scripts/idlsync.py The current version corresponds to: -URL: http://src.chromium.org/multivm/trunk/webkit -Current revision: 1467 +URL: http://src.chromium.org/blink/branches/dart/1700 +Current revision: 164530
diff --git a/core/css/CSSFontFaceLoadEvent.idl b/core/css/CSSFontFaceLoadEvent.idl index 7ab2522..b77706c 100644 --- a/core/css/CSSFontFaceLoadEvent.idl +++ b/core/css/CSSFontFaceLoadEvent.idl
@@ -31,7 +31,7 @@ // FIXME: Make this constructable from Javascript [ NoInterfaceObject, - EnabledAtRuntime=FontLoadEvents, + RuntimeEnabled=FontLoadEvents, ] interface CSSFontFaceLoadEvent : Event { readonly attribute FontFace[] fontfaces; };
diff --git a/core/css/CSSRule.idl b/core/css/CSSRule.idl index 94ce538..2489d2d 100644 --- a/core/css/CSSRule.idl +++ b/core/css/CSSRule.idl
@@ -37,8 +37,8 @@ const unsigned short KEYFRAME_RULE = 8; const unsigned short WEBKIT_KEYFRAME_RULE = 8; const unsigned short SUPPORTS_RULE = 12; - [EnabledAtRuntime=CSSViewport] const unsigned short VIEWPORT_RULE = 15; - [EnabledAtRuntime=CSSRegions] const unsigned short WEBKIT_REGION_RULE = 16; + [RuntimeEnabled=CSSViewport] const unsigned short VIEWPORT_RULE = 15; + [RuntimeEnabled=CSSRegions] const unsigned short WEBKIT_REGION_RULE = 16; const unsigned short WEBKIT_FILTER_RULE = 17; const unsigned short HOST_RULE = 1001;
diff --git a/core/css/CSSStyleDeclaration.idl b/core/css/CSSStyleDeclaration.idl index 4f1bdf6..649a579 100644 --- a/core/css/CSSStyleDeclaration.idl +++ b/core/css/CSSStyleDeclaration.idl
@@ -37,6 +37,6 @@ [Custom, CustomEnumerateProperty] getter (DOMString or float) (DOMString name); [Custom] setter void (DOMString propertyName, [TreatNullAs=NullString] DOMString propertyValue); readonly attribute CSSRule parentRule; - [EnabledAtRuntime=CSSVariables] readonly attribute CSSVariablesMap var; + [RuntimeEnabled=CSSVariables] readonly attribute CSSVariablesMap var; };
diff --git a/core/css/CSSStyleSheet.idl b/core/css/CSSStyleSheet.idl index 986303a..06ca95b 100644 --- a/core/css/CSSStyleSheet.idl +++ b/core/css/CSSStyleSheet.idl
@@ -25,7 +25,7 @@ readonly attribute CSSRule ownerRule; readonly attribute CSSRuleList cssRules; - [RaisesException] unsigned long insertRule(DOMString rule, unsigned long index); + [RaisesException] unsigned long insertRule(DOMString rule, optional unsigned long index); [RaisesException] void deleteRule(unsigned long index); // IE Extensions
diff --git a/core/css/CSSVariablesMap.idl b/core/css/CSSVariablesMap.idl index b6ab78a..3c88025 100644 --- a/core/css/CSSVariablesMap.idl +++ b/core/css/CSSVariablesMap.idl
@@ -32,4 +32,5 @@ [RaisesException] void set(DOMString name, DOMString value); [ImplementedAs=remove] boolean delete(DOMString name); [RaisesException] void clear(); + void forEach(CSSVariablesMapForEachCallback callback, optional any thisArg); };
diff --git a/core/dom/ErrorEvent.idl b/core/css/CSSVariablesMapForEachCallback.idl similarity index 64% copy from core/dom/ErrorEvent.idl copy to core/css/CSSVariablesMapForEachCallback.idl index 33f0239..d66eb61 100644 --- a/core/dom/ErrorEvent.idl +++ b/core/css/CSSVariablesMapForEachCallback.idl
@@ -1,5 +1,5 @@ /* - * Copyright (C) 2009 Google Inc. All rights reserved. + * Copyright (C) 2013 Google Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -11,9 +11,6 @@ * copyright notice, this list of conditions and the following disclaimer * in the documentation and/or other materials provided with the * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT @@ -28,13 +25,7 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -[ - ConstructorTemplate=Event -] interface ErrorEvent : Event { - [InitializedByEventConstructor] readonly attribute DOMString message; - [InitializedByEventConstructor] readonly attribute DOMString filename; - [InitializedByEventConstructor] readonly attribute unsigned long lineno; - [InitializedByEventConstructor] readonly attribute unsigned long colno; - [InitializedByEventConstructor, Custom, Unserializable] readonly attribute any error; +callback interface CSSVariablesMapForEachCallback { + [CallWith=ThisValue] boolean handleItem(DOMString value, DOMString name, CSSVariablesMap map); + boolean handleItem(DOMString value, DOMString name, CSSVariablesMap map); }; -
diff --git a/core/dom/ErrorEvent.idl b/core/css/DocumentFontFaceSet.idl similarity index 74% copy from core/dom/ErrorEvent.idl copy to core/css/DocumentFontFaceSet.idl index 33f0239..820fdc8 100644 --- a/core/dom/ErrorEvent.idl +++ b/core/css/DocumentFontFaceSet.idl
@@ -1,5 +1,5 @@ /* - * Copyright (C) 2009 Google Inc. All rights reserved. + * Copyright (C) 2013 Google Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -28,13 +28,6 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -[ - ConstructorTemplate=Event -] interface ErrorEvent : Event { - [InitializedByEventConstructor] readonly attribute DOMString message; - [InitializedByEventConstructor] readonly attribute DOMString filename; - [InitializedByEventConstructor] readonly attribute unsigned long lineno; - [InitializedByEventConstructor] readonly attribute unsigned long colno; - [InitializedByEventConstructor, Custom, Unserializable] readonly attribute any error; +partial interface Document { + [RuntimeEnabled=FontLoadEvents] readonly attribute FontFaceSet fonts; }; -
diff --git a/core/css/FontFace.idl b/core/css/FontFace.idl index a66872b..874872f 100644 --- a/core/css/FontFace.idl +++ b/core/css/FontFace.idl
@@ -36,7 +36,7 @@ }; [ - EnabledAtRuntime=FontLoadEvents, + RuntimeEnabled=FontLoadEvents, Constructor(DOMString family, DOMString source, Dictionary descriptors), ConstructorRaisesException ] interface FontFace {
diff --git a/core/css/FontFaceSet.idl b/core/css/FontFaceSet.idl index 9fe5d56..daa2e8e 100644 --- a/core/css/FontFaceSet.idl +++ b/core/css/FontFaceSet.idl
@@ -32,7 +32,7 @@ [ NoInterfaceObject, - EnabledAtRuntime=FontLoadEvents, + RuntimeEnabled=FontLoadEvents, ActiveDOMObject, GenerateIsReachable=document ] interface FontFaceSet : EventTarget { @@ -43,8 +43,8 @@ [RaisesException] sequence<FontFace> match(DOMString font, [Default=NullString] optional DOMString text); [RaisesException] boolean check(DOMString font, [Default=NullString] optional DOMString text); - [EnabledAtRuntime=Promise, RaisesException] Promise load(DOMString font, [Default=NullString] optional DOMString text); - [EnabledAtRuntime=Promise] Promise ready(); + [RaisesException] Promise load(DOMString font, [Default=NullString] optional DOMString text); + Promise ready(); readonly attribute FontFaceSetLoadStatus status; };
diff --git a/core/css/WebKitCSSRegionRule.idl b/core/css/WebKitCSSRegionRule.idl index ad91ce0..6811344 100644 --- a/core/css/WebKitCSSRegionRule.idl +++ b/core/css/WebKitCSSRegionRule.idl
@@ -28,7 +28,7 @@ */ [ - EnabledAtRuntime=CSSRegions, + RuntimeEnabled=CSSRegions, ImplementedAs=CSSRegionRule ] interface WebKitCSSRegionRule : CSSRule { readonly attribute CSSRuleList cssRules;
diff --git a/core/dom/Attr.idl b/core/dom/Attr.idl index 0dcdb02..8494da4 100644 --- a/core/dom/Attr.idl +++ b/core/dom/Attr.idl
@@ -24,17 +24,17 @@ [TreatReturnedNullStringAs=Null] readonly attribute DOMString name; - readonly attribute boolean specified; + [MeasureAs=AttributeSpecified] readonly attribute boolean specified; - [TreatReturnedNullStringAs=Null, TreatNullAs=NullString, SetterRaisesException, CustomElementCallbacks=Enable] attribute DOMString value; + [TreatReturnedNullStringAs=Null, TreatNullAs=NullString, SetterRaisesException, CustomElementCallbacks] attribute DOMString value; // DOM Level 2 - readonly attribute Element ownerElement; + [MeasureAs=AttributeOwnerElement] readonly attribute Element ownerElement; // DOM Level 3 - readonly attribute boolean isId; + [MeasureAs=AttributeIsId] readonly attribute boolean isId; // DOM 4
diff --git a/core/dom/ChildNode.idl b/core/dom/ChildNode.idl index 8a0be4d..21441f6 100644 --- a/core/dom/ChildNode.idl +++ b/core/dom/ChildNode.idl
@@ -26,6 +26,6 @@ ] interface ChildNode { [PerWorldBindings] readonly attribute Element previousElementSibling; [PerWorldBindings] readonly attribute Element nextElementSibling; - [RaisesException, CustomElementCallbacks=Enable] void remove(); + [RaisesException, CustomElementCallbacks] void remove(); };
diff --git a/core/dom/Clipboard.idl b/core/dom/Clipboard.idl index 82453c7..695f70d 100644 --- a/core/dom/Clipboard.idl +++ b/core/dom/Clipboard.idl
@@ -30,13 +30,13 @@ ] interface Clipboard { [TreatReturnedNullStringAs=Undefined] attribute DOMString dropEffect; [TreatReturnedNullStringAs=Undefined] attribute DOMString effectAllowed; - [CustomGetter] readonly attribute Array types; + readonly attribute DOMString[] types; readonly attribute FileList files; - [Custom, RaisesException] void clearData(optional DOMString type); + void clearData(optional DOMString type); DOMString getData(DOMString type); boolean setData(DOMString type, DOMString data); - [Custom, RaisesException] void setDragImage(HTMLImageElement image, long x, long y); + [RaisesException] void setDragImage(Element image, long x, long y); readonly attribute DataTransferItemList items; };
diff --git a/core/dom/DOMTokenList.idl b/core/dom/DOMTokenList.idl index 3f16677..9aef382 100644 --- a/core/dom/DOMTokenList.idl +++ b/core/dom/DOMTokenList.idl
@@ -28,9 +28,9 @@ readonly attribute unsigned long length; [TreatReturnedNullStringAs=Null] getter DOMString item(unsigned long index); [RaisesException] boolean contains(DOMString token); - [RaisesException, CustomElementCallbacks=Enable] void add(DOMString... tokens); - [RaisesException, CustomElementCallbacks=Enable] void remove(DOMString... tokens); - [RaisesException, CustomElementCallbacks=Enable] boolean toggle(DOMString token, optional boolean force); + [RaisesException, CustomElementCallbacks] void add(DOMString... tokens); + [RaisesException, CustomElementCallbacks] void remove(DOMString... tokens); + [RaisesException, CustomElementCallbacks] boolean toggle(DOMString token, optional boolean force); [NotEnumerable] DOMString toString(); };
diff --git a/core/dom/DataTransferItem.idl b/core/dom/DataTransferItem.idl index 7a3327f..8499652 100644 --- a/core/dom/DataTransferItem.idl +++ b/core/dom/DataTransferItem.idl
@@ -34,7 +34,7 @@ readonly attribute DOMString kind; readonly attribute DOMString type; - void getAsString(StringCallback? callback); + [CallWith=ExecutionContext] void getAsString(StringCallback? callback); Blob getAsFile(); };
diff --git a/core/dom/Document.idl b/core/dom/Document.idl index a18606d..ba1e205 100644 --- a/core/dom/Document.idl +++ b/core/dom/Document.idl
@@ -21,7 +21,7 @@ callback CustomElementConstructor = Element (); [ - CustomToV8 + SpecialWrapFor=HTMLDocument|SVGDocument ] interface Document : Node { // DOM Level 1 Core @@ -29,7 +29,7 @@ readonly attribute DOMImplementation implementation; readonly attribute Element documentElement; - [CustomElementCallbacks=Enable, PerWorldBindings, ActivityLog=AccessForIsolatedWorlds, RaisesException] Element createElement([TreatNullAs=NullString,Default=Undefined] optional DOMString tagName); + [CustomElementCallbacks, PerWorldBindings, ActivityLogging=AccessForIsolatedWorlds, RaisesException] Element createElement([TreatNullAs=NullString,Default=Undefined] optional DOMString tagName); DocumentFragment createDocumentFragment(); [PerWorldBindings] Text createTextNode([Default=Undefined] optional DOMString data); Comment createComment([Default=Undefined] optional DOMString data); @@ -41,9 +41,9 @@ // Introduced in DOM Level 2: - [CustomElementCallbacks=Enable, PerWorldBindings, ActivityLog=AccessForIsolatedWorlds, RaisesException] Node importNode([Default=Undefined] optional Node importedNode, + [CustomElementCallbacks, PerWorldBindings, ActivityLogging=AccessForIsolatedWorlds, RaisesException] Node importNode([Default=Undefined] optional Node importedNode, optional boolean deep); - [CustomElementCallbacks=Enable, PerWorldBindings, ActivityLog=AccessForIsolatedWorlds, RaisesException] Element createElementNS([TreatNullAs=NullString,Default=Undefined] optional DOMString namespaceURI, + [CustomElementCallbacks, PerWorldBindings, ActivityLogging=AccessForIsolatedWorlds, RaisesException] Element createElementNS([TreatNullAs=NullString,Default=Undefined] optional DOMString namespaceURI, [TreatNullAs=NullString,Default=Undefined] optional DOMString qualifiedName); [RaisesException, MeasureAs=DocumentCreateAttributeNS] Attr createAttributeNS([TreatNullAs=NullString,Default=Undefined] optional DOMString namespaceURI, [TreatNullAs=NullString,Default=Undefined] optional DOMString qualifiedName); // Removed from DOM4. @@ -59,7 +59,7 @@ [TreatReturnedNullStringAs=Null, TreatNullAs=NullString, SetterRaisesException, MeasureAs=DocumentXMLVersion] attribute DOMString xmlVersion; // Removed from DOM4. [SetterRaisesException, MeasureAs=DocumentXMLStandalone] attribute boolean xmlStandalone; // Removed from DOM4. - [RaisesException, CustomElementCallbacks=Enable] Node adoptNode([Default=Undefined] optional Node source); + [RaisesException, CustomElementCallbacks] Node adoptNode([Default=Undefined] optional Node source); [TreatReturnedNullStringAs=Null] readonly attribute DOMString documentURI; @@ -86,7 +86,7 @@ // DOM Level 2 Abstract Views (DocumentView interface) - readonly attribute Window defaultView; + [ImplementedAs=domWindow] readonly attribute Window defaultView; // DOM Level 2 Style (DocumentStyle interface) @@ -98,7 +98,7 @@ [Default=Undefined] optional DOMString pseudoElement); // Common extensions - [CustomElementCallbacks=Enable] + [CustomElementCallbacks] boolean execCommand([Default=Undefined] optional DOMString command, [Default=Undefined] optional boolean userInterface, [TreatNullAs=NullString, TreatUndefinedAs=NullString,Default=Undefined] optional DOMString value); @@ -111,14 +111,14 @@ // Moved down from HTMLDocument - [TreatNullAs=NullString, CustomElementCallbacks=Enable] attribute DOMString title; + [TreatNullAs=NullString, CustomElementCallbacks] attribute DOMString title; readonly attribute DOMString referrer; [TreatNullAs=NullString, SetterRaisesException] attribute DOMString domain; readonly attribute DOMString URL; [TreatNullAs=NullString, GetterRaisesException, SetterRaisesException] attribute DOMString cookie; - [SetterRaisesException, CustomElementCallbacks=Enable] attribute HTMLElement body; + [SetterRaisesException, CustomElementCallbacks] attribute HTMLElement body; readonly attribute HTMLHeadElement head; readonly attribute HTMLCollection images; @@ -130,7 +130,7 @@ [PerWorldBindings] NodeList getElementsByName([Default=Undefined] optional DOMString elementName); - [Custom, Replaceable, PerWorldBindings, ActivityLog=AccessForIsolatedWorlds] readonly attribute Location location; + [PerWorldBindings, ActivityLogging=AccessForIsolatedWorlds, PutForwards=href] readonly attribute Location location; // IE extensions [MeasureAs=DocumentCharset, TreatReturnedNullStringAs=Undefined, TreatNullAs=NullString] attribute DOMString charset; @@ -165,90 +165,31 @@ void webkitExitPointerLock(); readonly attribute Element webkitPointerLockElement; - [EnabledAtRuntime=CSSRegions] WebKitNamedFlowCollection webkitGetNamedFlows(); + [RuntimeEnabled=CSSRegions] WebKitNamedFlowCollection webkitGetNamedFlows(); - [EnabledAtRuntime=FontLoadEvents] readonly attribute FontFaceSet fonts; + // Event handler attributes + attribute EventHandler onbeforecopy; + attribute EventHandler onbeforecut; + attribute EventHandler onbeforepaste; + attribute EventHandler oncopy; + attribute EventHandler oncut; + attribute EventHandler onpaste; + attribute EventHandler onreadystatechange; + attribute EventHandler onsearch; + [RuntimeEnabled=ExperimentalContentSecurityPolicyFeatures] attribute EventHandler onsecuritypolicyviolation; + attribute EventHandler onselectionchange; + attribute EventHandler onselectstart; + [RuntimeEnabled=Touch] attribute EventHandler ontouchcancel; + [RuntimeEnabled=Touch] attribute EventHandler ontouchend; + [RuntimeEnabled=Touch] attribute EventHandler ontouchmove; + [RuntimeEnabled=Touch] attribute EventHandler ontouchstart; + attribute EventHandler onwebkitfullscreenchange; + attribute EventHandler onwebkitfullscreenerror; + attribute EventHandler onwebkitpointerlockchange; + attribute EventHandler onwebkitpointerlockerror; + [ActivityLogging=SetterForAllWorlds] attribute EventHandler onwheel; - // Event handler DOM attributes - [NotEnumerable] attribute EventHandler onabort; - [NotEnumerable] attribute EventHandler onblur; - [NotEnumerable] attribute EventHandler onchange; - [NotEnumerable, PerWorldBindings, ActivityLog=SetterForIsolatedWorlds] attribute EventHandler onclick; - [NotEnumerable] attribute EventHandler oncontextmenu; - [NotEnumerable, PerWorldBindings, ActivityLog=SetterForIsolatedWorlds] attribute EventHandler ondblclick; - [NotEnumerable, PerWorldBindings, ActivityLog=SetterForIsolatedWorlds] attribute EventHandler ondrag; - [NotEnumerable, PerWorldBindings, ActivityLog=SetterForIsolatedWorlds] attribute EventHandler ondragend; - [NotEnumerable, PerWorldBindings, ActivityLog=SetterForIsolatedWorlds] attribute EventHandler ondragenter; - [NotEnumerable, PerWorldBindings, ActivityLog=SetterForIsolatedWorlds] attribute EventHandler ondragleave; - [NotEnumerable, PerWorldBindings, ActivityLog=SetterForIsolatedWorlds] attribute EventHandler ondragover; - [NotEnumerable, PerWorldBindings, ActivityLog=SetterForIsolatedWorlds] attribute EventHandler ondragstart; - [NotEnumerable, PerWorldBindings, ActivityLog=SetterForIsolatedWorlds] attribute EventHandler ondrop; - [NotEnumerable] attribute EventHandler onerror; - [NotEnumerable] attribute EventHandler onfocus; - [NotEnumerable, PerWorldBindings, ActivityLog=SetterForIsolatedWorlds] attribute EventHandler oninput; - [NotEnumerable] attribute EventHandler oninvalid; - [NotEnumerable, PerWorldBindings, ActivityLog=SetterForIsolatedWorlds] attribute EventHandler onkeydown; - [NotEnumerable, PerWorldBindings, ActivityLog=SetterForIsolatedWorlds] attribute EventHandler onkeypress; - [NotEnumerable, PerWorldBindings, ActivityLog=SetterForIsolatedWorlds] attribute EventHandler onkeyup; - [NotEnumerable] attribute EventHandler onload; - [NotEnumerable, PerWorldBindings, ActivityLog=SetterForIsolatedWorlds] attribute EventHandler onmousedown; - [NotEnumerable, PerWorldBindings, ActivityLog=SetterForIsolatedWorlds] attribute EventHandler onmouseenter; - [NotEnumerable, PerWorldBindings, ActivityLog=SetterForIsolatedWorlds] attribute EventHandler onmouseleave; - [NotEnumerable, PerWorldBindings, ActivityLog=SetterForIsolatedWorlds] attribute EventHandler onmousemove; - [NotEnumerable, PerWorldBindings, ActivityLog=SetterForIsolatedWorlds] attribute EventHandler onmouseout; - [NotEnumerable, PerWorldBindings, ActivityLog=SetterForIsolatedWorlds] attribute EventHandler onmouseover; - [NotEnumerable, PerWorldBindings, ActivityLog=SetterForIsolatedWorlds] attribute EventHandler onmouseup; - [NotEnumerable, PerWorldBindings, ActivityLog=SetterForIsolatedWorlds] attribute EventHandler onmousewheel; // Deprecated in favor of onwheel. - [NotEnumerable, PerWorldBindings, ActivityLog=SetterForIsolatedWorlds] attribute EventHandler onwheel; - [NotEnumerable] attribute EventHandler onreadystatechange; - [NotEnumerable] attribute EventHandler onscroll; - [NotEnumerable] attribute EventHandler onselect; - [NotEnumerable] attribute EventHandler onsubmit; - - // attribute [NotEnumerable] EventHandler oncanplay; - // attribute [NotEnumerable] EventHandler oncanplaythrough; - // attribute [NotEnumerable] EventHandler ondurationchange; - // attribute [NotEnumerable] EventHandler onemptied; - // attribute [NotEnumerable] EventHandler onended; - // attribute [NotEnumerable] EventHandler onloadeddata; - // attribute [NotEnumerable] EventHandler onloadedmetadata; - // attribute [NotEnumerable] EventHandler onloadstart; - // attribute [NotEnumerable] EventHandler onpause; - // attribute [NotEnumerable] EventHandler onplay; - // attribute [NotEnumerable] EventHandler onplaying; - // attribute [NotEnumerable] EventHandler onprogress; - // attribute [NotEnumerable] EventHandler onratechange; - // attribute [NotEnumerable] EventHandler onseeked; - // attribute [NotEnumerable] EventHandler onseeking; - // attribute [NotEnumerable] EventHandler onshow; - // attribute [NotEnumerable] EventHandler onstalled; - // attribute [NotEnumerable] EventHandler onsuspend; - // attribute [NotEnumerable] EventHandler ontimeupdate; - // attribute [NotEnumerable] EventHandler onvolumechange; - // attribute [NotEnumerable] EventHandler onwaiting; - - // WebKit extensions - [NotEnumerable] attribute EventHandler onbeforecut; - [NotEnumerable] attribute EventHandler oncut; - [NotEnumerable] attribute EventHandler onbeforecopy; - [NotEnumerable] attribute EventHandler oncopy; - [NotEnumerable] attribute EventHandler onbeforepaste; - [NotEnumerable] attribute EventHandler onpaste; - [NotEnumerable] attribute EventHandler onreset; - [NotEnumerable] attribute EventHandler onsearch; - [NotEnumerable] attribute EventHandler onselectstart; - [NotEnumerable] attribute EventHandler onselectionchange; - [NotEnumerable, EnabledAtRuntime=Touch] attribute EventHandler ontouchstart; - [NotEnumerable, EnabledAtRuntime=Touch] attribute EventHandler ontouchmove; - [NotEnumerable, EnabledAtRuntime=Touch] attribute EventHandler ontouchend; - [NotEnumerable, EnabledAtRuntime=Touch] attribute EventHandler ontouchcancel; - [NotEnumerable] attribute EventHandler onwebkitfullscreenchange; - [NotEnumerable] attribute EventHandler onwebkitfullscreenerror; - [NotEnumerable] attribute EventHandler onwebkitpointerlockchange; - [NotEnumerable] attribute EventHandler onwebkitpointerlockerror; - [NotEnumerable, EnabledAtRuntime=ExperimentalContentSecurityPolicyFeatures] attribute EventHandler onsecuritypolicyviolation; - - [EnabledAtRuntime=Touch] Touch createTouch([Default=Undefined] optional Window window, + [RuntimeEnabled=Touch] Touch createTouch([Default=Undefined] optional Window window, [Default=Undefined] optional EventTarget target, [Default=Undefined] optional long identifier, [Default=Undefined] optional long pageX, @@ -259,12 +200,12 @@ [Default=Undefined] optional long webkitRadiusY, [Default=Undefined] optional float webkitRotationAngle, [Default=Undefined] optional float webkitForce); - [EnabledAtRuntime=Touch] TouchList createTouchList(Touch... touches); + [RuntimeEnabled=Touch] TouchList createTouchList(Touch... touches); - [DeprecateAs=PrefixedDocumentRegister, EnabledAtRuntime=CustomElements, ImplementedAs=registerElement, CallWith=ScriptState, CustomElementCallbacks=Enable, RaisesException] CustomElementConstructor webkitRegister(DOMString name, optional Dictionary options); - [EnabledAtRuntime=CustomElements, ImplementedAs=registerElement, CallWith=ScriptState, CustomElementCallbacks=Enable, RaisesException] CustomElementConstructor register(DOMString name, optional Dictionary options); - [CustomElementCallbacks=Enable, PerWorldBindings, ActivityLog=AccessForIsolatedWorlds, RaisesException] Element createElement(DOMString localName, [TreatNullAs=NullString] DOMString typeExtension); - [CustomElementCallbacks=Enable, PerWorldBindings, ActivityLog=AccessForIsolatedWorlds, RaisesException] Element createElementNS([TreatNullAs=NullString] DOMString namespaceURI, DOMString qualifiedName, + [DeprecateAs=PrefixedDocumentRegister, RuntimeEnabled=CustomElements, ImplementedAs=registerElement, CallWith=ScriptState, CustomElementCallbacks, RaisesException] CustomElementConstructor webkitRegister(DOMString name, optional Dictionary options); + [RuntimeEnabled=CustomElements, ImplementedAs=registerElement, CallWith=ScriptState, CustomElementCallbacks, RaisesException] CustomElementConstructor register(DOMString name, optional Dictionary options); + [CustomElementCallbacks, PerWorldBindings, ActivityLogging=AccessForIsolatedWorlds, RaisesException] Element createElement(DOMString localName, [TreatNullAs=NullString] DOMString typeExtension); + [CustomElementCallbacks, PerWorldBindings, ActivityLogging=AccessForIsolatedWorlds, RaisesException] Element createElementNS([TreatNullAs=NullString] DOMString namespaceURI, DOMString qualifiedName, [TreatNullAs=NullString] DOMString typeExtension); // Page visibility API. @@ -272,10 +213,10 @@ readonly attribute boolean webkitHidden; // Security Policy API: http://dvcs.w3.org/hg/content-security-policy/raw-file/tip/csp-specification.dev.html#script-interfaces - [EnabledAtRuntime=ExperimentalContentSecurityPolicyFeatures] readonly attribute SecurityPolicy securityPolicy; + [RuntimeEnabled=ExperimentalContentSecurityPolicyFeatures] readonly attribute SecurityPolicy securityPolicy; readonly attribute HTMLScriptElement currentScript; }; +Document implements GlobalEventHandlers; Document implements ParentNode; -
diff --git a/core/dom/DocumentFullscreen.idl b/core/dom/DocumentFullscreen.idl index 3081eac..561ad80 100644 --- a/core/dom/DocumentFullscreen.idl +++ b/core/dom/DocumentFullscreen.idl
@@ -20,13 +20,13 @@ */ partial interface Document { // Mozilla version - [EnabledAtRuntime=Fullscreen] readonly attribute boolean webkitIsFullScreen; - [EnabledAtRuntime=Fullscreen] readonly attribute boolean webkitFullScreenKeyboardInputAllowed; - [EnabledAtRuntime=Fullscreen] readonly attribute Element webkitCurrentFullScreenElement; - [EnabledAtRuntime=Fullscreen] void webkitCancelFullScreen(); + [RuntimeEnabled=Fullscreen] readonly attribute boolean webkitIsFullScreen; + [RuntimeEnabled=Fullscreen] readonly attribute boolean webkitFullScreenKeyboardInputAllowed; + [RuntimeEnabled=Fullscreen] readonly attribute Element webkitCurrentFullScreenElement; + [RuntimeEnabled=Fullscreen] void webkitCancelFullScreen(); // W3C version - [EnabledAtRuntime=Fullscreen] readonly attribute boolean webkitFullscreenEnabled; - [EnabledAtRuntime=Fullscreen] readonly attribute Element webkitFullscreenElement; - [EnabledAtRuntime=Fullscreen] void webkitExitFullscreen(); + [RuntimeEnabled=Fullscreen] readonly attribute boolean webkitFullscreenEnabled; + [RuntimeEnabled=Fullscreen] readonly attribute Element webkitFullscreenElement; + [RuntimeEnabled=Fullscreen] void webkitExitFullscreen(); };
diff --git a/core/dom/Element.idl b/core/dom/Element.idl index 55df834..3a8d2ba 100644 --- a/core/dom/Element.idl +++ b/core/dom/Element.idl
@@ -19,7 +19,7 @@ */ [ - CustomToV8 + SpecialWrapFor=HTMLElement|SVGElement ] interface Element : Node { // DOM Level 1 Core @@ -27,12 +27,11 @@ [TreatReturnedNullStringAs=Null, PerWorldBindings] readonly attribute DOMString tagName; [TreatReturnedNullStringAs=Null] DOMString getAttribute([Default=Undefined] optional DOMString name); - [RaisesException, CustomElementCallbacks=Enable] void setAttribute([Default=Undefined] optional DOMString name, - [Default=Undefined] optional DOMString value); - [CustomElementCallbacks=Enable] void removeAttribute([Default=Undefined] optional DOMString name); + [RaisesException, CustomElementCallbacks] void setAttribute([Default=Undefined] optional DOMString name, [Default=Undefined] optional DOMString value); + [CustomElementCallbacks] void removeAttribute([Default=Undefined] optional DOMString name); [MeasureAs=ElementGetAttributeNode] Attr getAttributeNode([Default=Undefined] optional DOMString name); // Removed from DOM4. - [RaisesException, CustomElementCallbacks=Enable, MeasureAs=ElementSetAttributeNode] Attr setAttributeNode([Default=Undefined, StrictTypeChecking] optional Attr newAttr); // Removed from DOM4. - [RaisesException, CustomElementCallbacks=Enable, MeasureAs=ElementRemoveAttributeNode] Attr removeAttributeNode([Default=Undefined, StrictTypeChecking] optional Attr oldAttr); // Removed from DOM4. + [RaisesException, CustomElementCallbacks, MeasureAs=ElementSetAttributeNode] Attr setAttributeNode([Default=Undefined, StrictTypeChecking] optional Attr newAttr); // Removed from DOM4. + [RaisesException, CustomElementCallbacks, MeasureAs=ElementRemoveAttributeNode] Attr removeAttributeNode([Default=Undefined, StrictTypeChecking] optional Attr oldAttr); // Removed from DOM4. [PerWorldBindings] NodeList getElementsByTagName([Default=Undefined] optional DOMString name); [PerWorldBindings] readonly attribute NamedNodeMap attributes; @@ -40,28 +39,27 @@ // DOM Level 2 Core - DOMString getAttributeNS([TreatNullAs=NullString,Default=Undefined] optional DOMString namespaceURI, - [Default=Undefined] optional DOMString localName); - [RaisesException, CustomElementCallbacks=Enable] void setAttributeNS([TreatNullAs=NullString,Default=Undefined] optional DOMString namespaceURI, - [Default=Undefined] optional DOMString qualifiedName, - [Default=Undefined] optional DOMString value); - [CustomElementCallbacks=Enable] void removeAttributeNS([TreatNullAs=NullString] DOMString namespaceURI, - DOMString localName); - NodeList getElementsByTagNameNS([TreatNullAs=NullString,Default=Undefined] optional DOMString namespaceURI, - [Default=Undefined] optional DOMString localName); - [MeasureAs=ElementGetAttributeNodeNS] Attr getAttributeNodeNS([TreatNullAs=NullString,Default=Undefined] optional DOMString namespaceURI, - [Default=Undefined] optional DOMString localName); // Removed from DOM4. - [RaisesException, CustomElementCallbacks=Enable] Attr setAttributeNodeNS([Default=Undefined, StrictTypeChecking] optional Attr newAttr); + DOMString getAttributeNS([TreatNullAs=NullString,Default=Undefined] optional DOMString namespaceURI, + [Default=Undefined] optional DOMString localName); + [RaisesException, CustomElementCallbacks] void setAttributeNS([TreatNullAs=NullString,Default=Undefined] optional DOMString namespaceURI, + [Default=Undefined] optional DOMString qualifiedName, + [Default=Undefined] optional DOMString value); + [CustomElementCallbacks] void removeAttributeNS([TreatNullAs=NullString] DOMString namespaceURI, DOMString localName); + NodeList getElementsByTagNameNS([TreatNullAs=NullString,Default=Undefined] optional DOMString namespaceURI, + [Default=Undefined] optional DOMString localName); + [MeasureAs=ElementGetAttributeNodeNS] Attr getAttributeNodeNS([TreatNullAs=NullString,Default=Undefined] optional DOMString namespaceURI, + [Default=Undefined] optional DOMString localName); // Removed from DOM4. + [RaisesException, CustomElementCallbacks] Attr setAttributeNodeNS([Default=Undefined, StrictTypeChecking] optional Attr newAttr); boolean hasAttribute(DOMString name); - boolean hasAttributeNS([TreatNullAs=NullString,Default=Undefined] optional DOMString namespaceURI, - [Default=Undefined] optional DOMString localName); + boolean hasAttributeNS([TreatNullAs=NullString,Default=Undefined] optional DOMString namespaceURI, + [Default=Undefined] optional DOMString localName); [PerWorldBindings] readonly attribute CSSStyleDeclaration style; // DOM4 // iht.com relies on id returning the empty string when no id is present. // Other browsers do this as well. So we don't convert null to JS null. - [Reflect] attribute DOMString id; + [Reflect, TreatNullAs=NullString] attribute DOMString id; [TreatReturnedNullStringAs=Null, PerWorldBindings] readonly attribute DOMString namespaceURI; [TreatReturnedNullStringAs=Null, TreatNullAs=NullString, PerWorldBindings, SetterRaisesException] attribute DOMString prefix; [TreatReturnedNullStringAs=Null, PerWorldBindings] readonly attribute DOMString localName; @@ -77,8 +75,8 @@ [PerWorldBindings] readonly attribute long clientTop; [PerWorldBindings] readonly attribute long clientWidth; [PerWorldBindings] readonly attribute long clientHeight; - [PerWorldBindings] attribute long scrollLeft; - [PerWorldBindings] attribute long scrollTop; + [PerWorldBindings] attribute long scrollLeft; + [PerWorldBindings] attribute long scrollTop; [PerWorldBindings] readonly attribute long scrollWidth; [PerWorldBindings] readonly attribute long scrollHeight; @@ -94,8 +92,10 @@ // HTML 5 NodeList getElementsByClassName([Default=Undefined] optional DOMString name); + [TreatNullAs=NullString, CustomElementCallbacks, PerWorldBindings, ActivityLogging=SetterForIsolatedWorlds, SetterRaisesException] attribute DOMString innerHTML; + [TreatNullAs=NullString, CustomElementCallbacks, SetterRaisesException] attribute DOMString outerHTML; - [Reflect=class, PerWorldBindings] attribute DOMString className; + [Reflect=class, TreatNullAs=NullString, PerWorldBindings] attribute DOMString className; [PerWorldBindings] readonly attribute DOMTokenList classList; [PerWorldBindings] readonly attribute DOMStringMap dataset; @@ -108,13 +108,13 @@ [RaisesException] boolean webkitMatchesSelector([Default=Undefined] optional DOMString selectors); // Shadow DOM API - [EnabledAtRuntime=ShadowDOM, Reflect, PerWorldBindings] attribute DOMString pseudo; - [EnabledAtRuntime=ShadowDOM, RaisesException] ShadowRoot createShadowRoot(); - [EnabledAtRuntime=ShadowDOM, PerWorldBindings] readonly attribute ShadowRoot shadowRoot; - [EnabledAtRuntime=ShadowDOM, PerWorldBindings] NodeList getDestinationInsertionPoints(); + [RuntimeEnabled=ShadowDOM, Reflect, TreatNullAs=NullString, PerWorldBindings] attribute DOMString pseudo; + [RuntimeEnabled=ShadowDOM, RaisesException] ShadowRoot createShadowRoot(); + [RuntimeEnabled=ShadowDOM, PerWorldBindings] readonly attribute ShadowRoot shadowRoot; + [RuntimeEnabled=ShadowDOM, PerWorldBindings] NodeList getDestinationInsertionPoints(); // To-be-deprecated prefixed Shadow DOM API - [Reflect=pseudo, ImplementedAs=pseudo, PerWorldBindings, MeasureAs=ShadowDOMPrefixedPseudo] attribute DOMString webkitPseudo; + [Reflect=pseudo, TreatNullAs=NullString, ImplementedAs=pseudo, PerWorldBindings, MeasureAs=ShadowDOMPrefixedPseudo] attribute DOMString webkitPseudo; [ImplementedAs=createShadowRoot, RaisesException, MeasureAs=ShadowDOMPrefixedCreateShadowRoot] ShadowRoot webkitCreateShadowRoot(); [ImplementedAs=shadowRoot, PerWorldBindings, MeasureAs=ShadowDOMPrefixedShadowRoot] readonly attribute ShadowRoot webkitShadowRoot; @@ -124,91 +124,33 @@ // Mozilla version const unsigned short ALLOW_KEYBOARD_INPUT = 1; - [EnabledAtRuntime=Fullscreen, PerWorldBindings, ActivityLog=Access] void webkitRequestFullScreen([Default=Undefined] optional unsigned short flags); + [RuntimeEnabled=Fullscreen, PerWorldBindings, ActivityLogging=AccessForAllWorlds, MeasureAs=PrefixedElementRequestFullScreen] void webkitRequestFullScreen([Default=Undefined] optional unsigned short flags); // W3C version - [EnabledAtRuntime=Fullscreen, PerWorldBindings, ActivityLog=Access] void webkitRequestFullscreen(); + [RuntimeEnabled=Fullscreen, PerWorldBindings, ActivityLogging=AccessForAllWorlds, MeasureAs=PrefixedElementRequestFullscreen] void webkitRequestFullscreen(); void webkitRequestPointerLock(); // CSS Regions API - [EnabledAtRuntime=CSSRegions, PerWorldBindings] readonly attribute DOMString webkitRegionOverset; - [EnabledAtRuntime=CSSRegions] sequence<Range> webkitGetRegionFlowRanges(); + [RuntimeEnabled=CSSRegions, PerWorldBindings] readonly attribute DOMString webkitRegionOverset; + [RuntimeEnabled=CSSRegions] sequence<Range> webkitGetRegionFlowRanges(); - // Event handler DOM attributes - [NotEnumerable, PerWorldBindings] attribute EventHandler onabort; - [NotEnumerable, PerWorldBindings] attribute EventHandler onblur; - [NotEnumerable, PerWorldBindings] attribute EventHandler onchange; - [NotEnumerable, PerWorldBindings, ActivityLog=SetterForIsolatedWorlds] attribute EventHandler onclick; - [NotEnumerable, PerWorldBindings] attribute EventHandler oncontextmenu; - [NotEnumerable, PerWorldBindings, ActivityLog=SetterForIsolatedWorlds] attribute EventHandler ondblclick; - [NotEnumerable, PerWorldBindings, ActivityLog=SetterForIsolatedWorlds] attribute EventHandler ondrag; - [NotEnumerable, PerWorldBindings, ActivityLog=SetterForIsolatedWorlds] attribute EventHandler ondragend; - [NotEnumerable, PerWorldBindings, ActivityLog=SetterForIsolatedWorlds] attribute EventHandler ondragenter; - [NotEnumerable, PerWorldBindings, ActivityLog=SetterForIsolatedWorlds] attribute EventHandler ondragleave; - [NotEnumerable, PerWorldBindings, ActivityLog=SetterForIsolatedWorlds] attribute EventHandler ondragover; - [NotEnumerable, PerWorldBindings, ActivityLog=SetterForIsolatedWorlds] attribute EventHandler ondragstart; - [NotEnumerable, PerWorldBindings, ActivityLog=SetterForIsolatedWorlds] attribute EventHandler ondrop; - [NotEnumerable, PerWorldBindings] attribute EventHandler onerror; - [NotEnumerable, PerWorldBindings] attribute EventHandler onfocus; - [NotEnumerable, PerWorldBindings, ActivityLog=SetterForIsolatedWorlds] attribute EventHandler oninput; - [NotEnumerable, PerWorldBindings] attribute EventHandler oninvalid; - [NotEnumerable, PerWorldBindings, ActivityLog=SetterForIsolatedWorlds] attribute EventHandler onkeydown; - [NotEnumerable, PerWorldBindings, ActivityLog=SetterForIsolatedWorlds] attribute EventHandler onkeypress; - [NotEnumerable, PerWorldBindings, ActivityLog=SetterForIsolatedWorlds] attribute EventHandler onkeyup; - [NotEnumerable, PerWorldBindings] attribute EventHandler onload; - [NotEnumerable, PerWorldBindings, ActivityLog=SetterForIsolatedWorlds] attribute EventHandler onmousedown; - [NotEnumerable, PerWorldBindings, ActivityLog=SetterForIsolatedWorlds] attribute EventHandler onmouseenter; - [NotEnumerable, PerWorldBindings, ActivityLog=SetterForIsolatedWorlds] attribute EventHandler onmouseleave; - [NotEnumerable, PerWorldBindings, ActivityLog=SetterForIsolatedWorlds] attribute EventHandler onmousemove; - [NotEnumerable, PerWorldBindings, ActivityLog=SetterForIsolatedWorlds] attribute EventHandler onmouseout; - [NotEnumerable, PerWorldBindings, ActivityLog=SetterForIsolatedWorlds] attribute EventHandler onmouseover; - [NotEnumerable, PerWorldBindings, ActivityLog=SetterForIsolatedWorlds] attribute EventHandler onmouseup; - [NotEnumerable, PerWorldBindings, ActivityLog=SetterForIsolatedWorlds] attribute EventHandler onmousewheel; // Deprecated in favor of onwheel. - [NotEnumerable, PerWorldBindings, ActivityLog=SetterForIsolatedWorlds] attribute EventHandler onwheel; - [NotEnumerable, PerWorldBindings] attribute EventHandler onscroll; - [NotEnumerable, PerWorldBindings] attribute EventHandler onselect; - [NotEnumerable, PerWorldBindings] attribute EventHandler onsubmit; - - // attribute [NotEnumerable] EventHandler oncanplay; - // attribute [NotEnumerable] EventHandler oncanplaythrough; - // attribute [NotEnumerable] EventHandler ondurationchange; - // attribute [NotEnumerable] EventHandler onemptied; - // attribute [NotEnumerable] EventHandler onended; - // attribute [NotEnumerable] EventHandler onloadeddata; - // attribute [NotEnumerable] EventHandler onloadedmetadata; - // attribute [NotEnumerable] EventHandler onloadstart; - // attribute [NotEnumerable] EventHandler onpause; - // attribute [NotEnumerable] EventHandler onplay; - // attribute [NotEnumerable] EventHandler onplaying; - // attribute [NotEnumerable] EventHandler onprogress; - // attribute [NotEnumerable] EventHandler onratechange; - // attribute [NotEnumerable] EventHandler onreadystatechange; - // attribute [NotEnumerable] EventHandler onseeked; - // attribute [NotEnumerable] EventHandler onseeking; - // attribute [NotEnumerable] EventHandler onshow; - // attribute [NotEnumerable] EventHandler onstalled; - // attribute [NotEnumerable] EventHandler onsuspend; - // attribute [NotEnumerable] EventHandler ontimeupdate; - // attribute [NotEnumerable] EventHandler onvolumechange; - // attribute [NotEnumerable] EventHandler onwaiting; - - // WebKit extensions - [NotEnumerable, PerWorldBindings] attribute EventHandler onbeforecut; - [NotEnumerable, PerWorldBindings] attribute EventHandler oncut; - [NotEnumerable, PerWorldBindings] attribute EventHandler onbeforecopy; - [NotEnumerable, PerWorldBindings] attribute EventHandler oncopy; - [NotEnumerable, PerWorldBindings] attribute EventHandler onbeforepaste; - [NotEnumerable, PerWorldBindings] attribute EventHandler onpaste; - [NotEnumerable, PerWorldBindings] attribute EventHandler onreset; - [NotEnumerable, PerWorldBindings] attribute EventHandler onsearch; - [NotEnumerable, PerWorldBindings] attribute EventHandler onselectstart; - [NotEnumerable, EnabledAtRuntime=Touch, PerWorldBindings] attribute EventHandler ontouchstart; - [NotEnumerable, EnabledAtRuntime=Touch, PerWorldBindings] attribute EventHandler ontouchmove; - [NotEnumerable, EnabledAtRuntime=Touch, PerWorldBindings] attribute EventHandler ontouchend; - [NotEnumerable, EnabledAtRuntime=Touch, PerWorldBindings] attribute EventHandler ontouchcancel; - [NotEnumerable, PerWorldBindings] attribute EventHandler onwebkitfullscreenchange; - [NotEnumerable, PerWorldBindings] attribute EventHandler onwebkitfullscreenerror; + // Event handler attributes + attribute EventHandler onbeforecopy; + attribute EventHandler onbeforecut; + attribute EventHandler onbeforepaste; + attribute EventHandler oncopy; + attribute EventHandler oncut; + attribute EventHandler onpaste; + attribute EventHandler onsearch; + attribute EventHandler onselectstart; + [RuntimeEnabled=Touch] attribute EventHandler ontouchcancel; + [RuntimeEnabled=Touch] attribute EventHandler ontouchend; + [RuntimeEnabled=Touch] attribute EventHandler ontouchmove; + [RuntimeEnabled=Touch] attribute EventHandler ontouchstart; + attribute EventHandler onwebkitfullscreenchange; + attribute EventHandler onwebkitfullscreenerror; + [ActivityLogging=SetterForAllWorlds] attribute EventHandler onwheel; }; Element implements ParentNode;
diff --git a/core/dom/GlobalEventHandlers.idl b/core/dom/GlobalEventHandlers.idl new file mode 100644 index 0000000..6666780 --- /dev/null +++ b/core/dom/GlobalEventHandlers.idl
@@ -0,0 +1,92 @@ +/* + * Copyright (c) 2013, Opera Software ASA. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of Opera Software ASA nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +[ + NoInterfaceObject +] interface GlobalEventHandlers { + attribute EventHandler onabort; + attribute EventHandler onblur; + attribute EventHandler oncancel; + attribute EventHandler oncanplay; + attribute EventHandler oncanplaythrough; + attribute EventHandler onchange; + [ActivityLogging=SetterForAllWorlds] attribute EventHandler onclick; + attribute EventHandler onclose; + attribute EventHandler oncontextmenu; + attribute EventHandler oncuechange; + [ActivityLogging=SetterForAllWorlds] attribute EventHandler ondblclick; + [ActivityLogging=SetterForAllWorlds] attribute EventHandler ondrag; + [ActivityLogging=SetterForAllWorlds] attribute EventHandler ondragend; + [ActivityLogging=SetterForAllWorlds] attribute EventHandler ondragenter; + //[ActivityLogging=SetterForAllWorlds] attribute EventHandler ondragexit; + [ActivityLogging=SetterForAllWorlds] attribute EventHandler ondragleave; + [ActivityLogging=SetterForAllWorlds] attribute EventHandler ondragover; + [ActivityLogging=SetterForAllWorlds] attribute EventHandler ondragstart; + [ActivityLogging=SetterForAllWorlds] attribute EventHandler ondrop; + attribute EventHandler ondurationchange; + attribute EventHandler onemptied; + attribute EventHandler onended; + attribute EventHandler onerror; + attribute EventHandler onfocus; + [ActivityLogging=SetterForAllWorlds] attribute EventHandler oninput; + attribute EventHandler oninvalid; + [ActivityLogging=SetterForAllWorlds] attribute EventHandler onkeydown; + [ActivityLogging=SetterForAllWorlds] attribute EventHandler onkeypress; + [ActivityLogging=SetterForAllWorlds] attribute EventHandler onkeyup; + attribute EventHandler onload; + attribute EventHandler onloadeddata; + attribute EventHandler onloadedmetadata; + attribute EventHandler onloadstart; + [ActivityLogging=SetterForAllWorlds] attribute EventHandler onmousedown; + [ActivityLogging=SetterForAllWorlds] attribute EventHandler onmouseenter; + [ActivityLogging=SetterForAllWorlds] attribute EventHandler onmouseleave; + [ActivityLogging=SetterForAllWorlds] attribute EventHandler onmousemove; + [ActivityLogging=SetterForAllWorlds] attribute EventHandler onmouseout; + [ActivityLogging=SetterForAllWorlds] attribute EventHandler onmouseover; + [ActivityLogging=SetterForAllWorlds] attribute EventHandler onmouseup; + [ActivityLogging=SetterForAllWorlds] attribute EventHandler onmousewheel; + attribute EventHandler onpause; + attribute EventHandler onplay; + attribute EventHandler onplaying; + attribute EventHandler onprogress; + attribute EventHandler onratechange; + attribute EventHandler onreset; + attribute EventHandler onscroll; + attribute EventHandler onseeked; + attribute EventHandler onseeking; + attribute EventHandler onselect; + attribute EventHandler onshow; + //attribute EventHandler onsort; + attribute EventHandler onstalled; + attribute EventHandler onsubmit; + attribute EventHandler onsuspend; + attribute EventHandler ontimeupdate; + attribute EventHandler onvolumechange; + attribute EventHandler onwaiting; +};
diff --git a/core/dom/NamedNodeMap.idl b/core/dom/NamedNodeMap.idl index 6169b7a..9c687b7 100644 --- a/core/dom/NamedNodeMap.idl +++ b/core/dom/NamedNodeMap.idl
@@ -25,9 +25,9 @@ Node getNamedItem([Default=Undefined] optional DOMString name); [NotEnumerable, ImplementedAs=getNamedItem] getter Node ([Default=Undefined] optional DOMString name); - [RaisesException, CustomElementCallbacks=Enable] Node setNamedItem([Default=Undefined] optional Node node); + [RaisesException, CustomElementCallbacks] Node setNamedItem([Default=Undefined] optional Node node); - [RaisesException, CustomElementCallbacks=Enable] Node removeNamedItem([Default=Undefined] optional DOMString name); + [RaisesException, CustomElementCallbacks] Node removeNamedItem([Default=Undefined] optional DOMString name); getter Node item([Default=Undefined] optional unsigned long index); @@ -40,9 +40,9 @@ /*[RaisesException]*/ Node getNamedItemNS([TreatNullAs=NullString,Default=Undefined] optional DOMString namespaceURI, [Default=Undefined] optional DOMString localName); - [RaisesException, CustomElementCallbacks=Enable] Node setNamedItemNS([Default=Undefined] optional Node node); + [RaisesException, CustomElementCallbacks] Node setNamedItemNS([Default=Undefined] optional Node node); - [RaisesException, CustomElementCallbacks=Enable] Node removeNamedItemNS([TreatNullAs=NullString,Default=Undefined] optional DOMString namespaceURI, + [RaisesException, CustomElementCallbacks] Node removeNamedItemNS([TreatNullAs=NullString,Default=Undefined] optional DOMString namespaceURI, [Default=Undefined] optional DOMString localName); };
diff --git a/core/dom/Node.idl b/core/dom/Node.idl index 3d774a2..3e3ec70 100644 --- a/core/dom/Node.idl +++ b/core/dom/Node.idl
@@ -39,7 +39,7 @@ [TreatReturnedNullStringAs=Null, PerWorldBindings] readonly attribute DOMString nodeName; // FIXME: the spec says this can also raise on retrieval. - [TreatReturnedNullStringAs=Null, TreatNullAs=NullString, PerWorldBindings, CustomElementCallbacks=Enable] attribute DOMString nodeValue; + [TreatReturnedNullStringAs=Null, TreatNullAs=NullString, PerWorldBindings, CustomElementCallbacks] attribute DOMString nodeValue; [PerWorldBindings] readonly attribute unsigned short nodeType; [PerWorldBindings] readonly attribute Node parentNode; @@ -50,15 +50,15 @@ [PerWorldBindings] readonly attribute Node nextSibling; [PerWorldBindings] readonly attribute Document ownerDocument; - [Custom, PerWorldBindings, ActivityLog=AccessForIsolatedWorlds, RaisesException] Node insertBefore(Node newChild, Node refChild); - [Custom, PerWorldBindings, ActivityLog=AccessForIsolatedWorlds, RaisesException] Node replaceChild(Node newChild, Node oldChild); - [Custom, PerWorldBindings, RaisesException] Node removeChild(Node oldChild); - [Custom, PerWorldBindings, ActivityLog=AccessForIsolatedWorlds, RaisesException] Node appendChild(Node newChild); + [Custom, CustomElementCallbacks, PerWorldBindings, ActivityLogging=AccessForIsolatedWorlds, RaisesException] Node insertBefore(Node newChild, Node refChild); + [Custom, CustomElementCallbacks, PerWorldBindings, ActivityLogging=AccessForIsolatedWorlds, RaisesException] Node replaceChild(Node newChild, Node oldChild); + [Custom, CustomElementCallbacks, PerWorldBindings, RaisesException] Node removeChild(Node oldChild); + [Custom, CustomElementCallbacks, PerWorldBindings, ActivityLogging=AccessForIsolatedWorlds, RaisesException] Node appendChild(Node newChild); boolean hasChildNodes(); - [CustomElementCallbacks=Enable, PerWorldBindings] + [CustomElementCallbacks, PerWorldBindings] Node cloneNode(optional boolean deep); - [CustomElementCallbacks=Enable] void normalize(); + [CustomElementCallbacks] void normalize(); // Introduced in DOM Level 2: [MeasureAs=NodeIsSupported] boolean isSupported([Default=Undefined] optional DOMString feature, @@ -72,7 +72,7 @@ [TreatReturnedNullStringAs=Null, PerWorldBindings] readonly attribute DOMString baseURI; // FIXME: the spec says this can also raise on retrieval. - [TreatReturnedNullStringAs=Null, TreatNullAs=NullString, PerWorldBindings, SetterRaisesException, CustomElementCallbacks=Enable] attribute DOMString textContent; + [TreatReturnedNullStringAs=Null, TreatNullAs=NullString, PerWorldBindings, SetterRaisesException, CustomElementCallbacks] attribute DOMString textContent; [MeasureAs=NodeIsSameNode] boolean isSameNode([Default=Undefined] optional Node other); // Removed in DOM4. boolean isEqualNode([Default=Undefined] optional Node other);
diff --git a/core/dom/NodeFilter.idl b/core/dom/NodeFilter.idl index 989099f..58ac22e 100644 --- a/core/dom/NodeFilter.idl +++ b/core/dom/NodeFilter.idl
@@ -19,6 +19,7 @@ */ [ + DependentLifetime ] interface NodeFilter { // Constants returned by acceptNode const short FILTER_ACCEPT = 1;
diff --git a/core/dom/NodeIterator.idl b/core/dom/NodeIterator.idl index 5e52661..9c636c4 100644 --- a/core/dom/NodeIterator.idl +++ b/core/dom/NodeIterator.idl
@@ -20,7 +20,7 @@ // Introduced in DOM Level 2: [ - CustomToV8 + SetReference(NodeFilter filter) ] interface NodeIterator { readonly attribute Node root; readonly attribute unsigned long whatToShow;
diff --git a/core/dom/Promise.idl b/core/dom/Promise.idl index f7fb7ba..77b3976 100644 --- a/core/dom/Promise.idl +++ b/core/dom/Promise.idl
@@ -33,7 +33,6 @@ [ GlobalContext=Window&WorkerGlobalScope, CustomConstructor(PromiseInit init), - EnabledAtRuntime=Promise ] interface Promise { [Custom] Promise then(optional AnyCallback fulfillCallback, optional AnyCallback rejectCallback); [Custom] Promise catch(optional AnyCallback rejectCallback); @@ -41,6 +40,7 @@ [Custom] static Promise resolve(any value); [Custom] static Promise reject(any value); - [Custom] static Promise _any(any... values); - [Custom] static Promise every(any... values); + [Custom] static Promise cast(any value); + [Custom] static Promise race(any iterable); + [Custom] static Promise all(any iterable); };
diff --git a/core/dom/Range.idl b/core/dom/Range.idl index 32edd56..42ca334 100644 --- a/core/dom/Range.idl +++ b/core/dom/Range.idl
@@ -52,11 +52,11 @@ [RaisesException] short compareBoundaryPoints([Default=Undefined] optional CompareHow how, [Default=Undefined] optional Range sourceRange); - [RaisesException, CustomElementCallbacks=Enable] void deleteContents(); - [RaisesException, CustomElementCallbacks=Enable] DocumentFragment extractContents(); - [RaisesException, CustomElementCallbacks=Enable] DocumentFragment cloneContents(); - [RaisesException, CustomElementCallbacks=Enable] void insertNode([Default=Undefined] optional Node newNode); - [RaisesException, CustomElementCallbacks=Enable] void surroundContents([Default=Undefined] optional Node newParent); + [RaisesException, CustomElementCallbacks] void deleteContents(); + [RaisesException, CustomElementCallbacks] DocumentFragment extractContents(); + [RaisesException, CustomElementCallbacks] DocumentFragment cloneContents(); + [RaisesException, CustomElementCallbacks] void insertNode([Default=Undefined] optional Node newNode); + [RaisesException, CustomElementCallbacks] void surroundContents([Default=Undefined] optional Node newParent); [RaisesException] Range cloneRange(); [RaisesException] DOMString toString(); @@ -69,7 +69,7 @@ // extensions - [RaisesException, CustomElementCallbacks=Enable] DocumentFragment createContextualFragment([Default=Undefined] optional DOMString html); + [RaisesException, CustomElementCallbacks] DocumentFragment createContextualFragment([Default=Undefined] optional DOMString html); // WebKit extensions
diff --git a/core/dom/Text.idl b/core/dom/Text.idl index af7360a..0ee791b 100644 --- a/core/dom/Text.idl +++ b/core/dom/Text.idl
@@ -30,5 +30,5 @@ [MeasureAs=TextReplaceWholeText] Text replaceWholeText(DOMString content); // Removed from DOM4. // Shadow DOM API - [EnabledAtRuntime=ShadowDOM, PerWorldBindings] NodeList getDestinationInsertionPoints(); + [RuntimeEnabled=ShadowDOM, PerWorldBindings] NodeList getDestinationInsertionPoints(); };
diff --git a/core/dom/TreeWalker.idl b/core/dom/TreeWalker.idl index dd545b8..ac04ba0 100644 --- a/core/dom/TreeWalker.idl +++ b/core/dom/TreeWalker.idl
@@ -20,7 +20,7 @@ // Introduced in DOM Level 2: [ - CustomToV8 + SetReference(NodeFilter filter) ] interface TreeWalker { readonly attribute Node root; readonly attribute unsigned long whatToShow;
diff --git a/core/html/URL.idl b/core/dom/URL.idl similarity index 78% rename from core/html/URL.idl rename to core/dom/URL.idl index 265f371..37e2a90 100644 --- a/core/html/URL.idl +++ b/core/dom/URL.idl
@@ -26,9 +26,15 @@ [ GlobalContext=Window&WorkerGlobalScope, - Constructor, + ConstructorRaisesException, + Constructor(DOMString url), + Constructor(DOMString url, URL base), + Constructor(DOMString url, DOMString base), ImplementedAs=DOMURL ] interface URL { - [CallWith=ScriptExecutionContext,TreatReturnedNullStringAs=Null] static DOMString createObjectURL(Blob? blob); - [CallWith=ScriptExecutionContext] static void revokeObjectURL(DOMString url); + [CallWith=ExecutionContext,TreatReturnedNullStringAs=Null] static DOMString createObjectURL(Blob? blob); + [CallWith=ExecutionContext] static void revokeObjectURL(DOMString url); }; + +// Force rebuild: crbug.com/307023 +URL implements URLUtils;
diff --git a/core/page/History.idl b/core/dom/URLUtils.idl similarity index 62% copy from core/page/History.idl copy to core/dom/URLUtils.idl index d20cc89..b4c3e67 100644 --- a/core/page/History.idl +++ b/core/dom/URLUtils.idl
@@ -1,5 +1,5 @@ /* - * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. + * Copyright (C) 2013 Google Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -23,14 +23,29 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -interface History { - readonly attribute unsigned long length; - [Custom] readonly attribute SerializedScriptValue state; +[ + NoInterfaceObject, + ImplementedAs=DOMURLUtils +] interface URLUtils { + // Special case null for backwards compat with HTMLAnchorElement href. + // https://code.google.com/p/chromium/issues/detail?id=304959 + [TreatNullAs=NullString] attribute DOMString href; - [CallWith=ScriptExecutionContext] void back(); - [CallWith=ScriptExecutionContext] void forward(); - [CallWith=ScriptExecutionContext] void go([Default=Undefined] optional long distance); + [NotEnumerable, ImplementedAs=href] DOMString toString(); - [Custom, EnabledPerContext=pushState, RaisesException] void pushState(any data, DOMString title, optional DOMString url); - [Custom, EnabledPerContext=pushState, RaisesException] void replaceState(any data, DOMString title, optional DOMString url); + readonly attribute DOMString origin; + attribute DOMString protocol; + attribute DOMString username; + attribute DOMString password; + attribute DOMString host; + attribute DOMString hostname; + attribute DOMString port; + attribute DOMString pathname; + attribute DOMString search; + + // Not yet implemented. + // attribute URLQuery? query; + + attribute DOMString hash; }; +
diff --git a/core/html/track/TextTrackRegionList.idl b/core/dom/URLUtilsReadOnly.idl similarity index 71% copy from core/html/track/TextTrackRegionList.idl copy to core/dom/URLUtilsReadOnly.idl index 844cd9d..0d36b46 100644 --- a/core/html/track/TextTrackRegionList.idl +++ b/core/dom/URLUtilsReadOnly.idl
@@ -1,5 +1,5 @@ /* - * Copyright (C) 2013 Google Inc. All rights reserved. + * Copyright (C) 2013 Google Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -25,11 +25,17 @@ [ NoInterfaceObject, - Conditional=WEBVTT_REGIONS, - EnabledAtRuntime=VideoTrack -] interface TextTrackRegionList { - readonly attribute unsigned long length; - getter TextTrackRegion item(unsigned long index); - TextTrackRegion getRegionById(DOMString id); -}; + ImplementedAs=DOMURLUtilsReadOnly +] interface URLUtilsReadOnly { + readonly attribute DOMString href; + [NotEnumerable, ImplementedAs=href] DOMString toString(); + + readonly attribute DOMString protocol; + readonly attribute DOMString host; + readonly attribute DOMString hostname; + readonly attribute DOMString port; + readonly attribute DOMString pathname; + readonly attribute DOMString search; + readonly attribute DOMString hash; +};
diff --git a/core/dom/WebKitNamedFlow.idl b/core/dom/WebKitNamedFlow.idl index 33cff65..f1185b4 100644 --- a/core/dom/WebKitNamedFlow.idl +++ b/core/dom/WebKitNamedFlow.idl
@@ -29,7 +29,7 @@ [ NoInterfaceObject, - EnabledAtRuntime=CSSRegions, + RuntimeEnabled=CSSRegions, ImplementedAs=NamedFlow, GenerateIsReachable=ownerNode ] interface WebKitNamedFlow : EventTarget {
diff --git a/core/dom/WebKitNamedFlowCollection.idl b/core/dom/WebKitNamedFlowCollection.idl index 92aec8e..4744e06 100644 --- a/core/dom/WebKitNamedFlowCollection.idl +++ b/core/dom/WebKitNamedFlowCollection.idl
@@ -29,7 +29,7 @@ [ NoInterfaceObject, - EnabledAtRuntime=CSSRegions, + RuntimeEnabled=CSSRegions, ImplementedAs=DOMNamedFlowCollection ] interface WebKitNamedFlowCollection { readonly attribute unsigned long length;
diff --git a/core/dom/shadow/ShadowRoot.idl b/core/dom/shadow/ShadowRoot.idl index 105c008..fd06913 100644 --- a/core/dom/shadow/ShadowRoot.idl +++ b/core/dom/shadow/ShadowRoot.idl
@@ -30,9 +30,9 @@ readonly attribute Element activeElement; attribute boolean applyAuthorStyles; attribute boolean resetStyleInheritance; - [EnabledAtRuntime=ShadowDOM, ImplementedAs=bindingsOlderShadowRoot] readonly attribute ShadowRoot olderShadowRoot; + [RuntimeEnabled=ShadowDOM, ImplementedAs=bindingsOlderShadowRoot] readonly attribute ShadowRoot olderShadowRoot; - [TreatNullAs=NullString, CustomElementCallbacks=Enable, PerWorldBindings, ActivityLog=SetterForIsolatedWorlds, SetterRaisesException] attribute DOMString innerHTML; + [TreatNullAs=NullString, CustomElementCallbacks, PerWorldBindings, ActivityLogging=SetterForIsolatedWorlds, SetterRaisesException] attribute DOMString innerHTML; [RaisesException] Node cloneNode([Default=Undefined] optional boolean deep); Selection getSelection(); @@ -44,4 +44,7 @@ Element elementFromPoint([Default=Undefined] optional long x, [Default=Undefined] optional long y); + + [RuntimeEnabled=ShadowDOM] readonly attribute StyleSheetList styleSheets; + [RuntimeEnabled=ShadowDOM] readonly attribute Element host; };
diff --git a/core/dom/AutocompleteErrorEvent.idl b/core/events/AutocompleteErrorEvent.idl similarity index 100% rename from core/dom/AutocompleteErrorEvent.idl rename to core/events/AutocompleteErrorEvent.idl
diff --git a/core/dom/BeforeLoadEvent.idl b/core/events/BeforeLoadEvent.idl similarity index 100% rename from core/dom/BeforeLoadEvent.idl rename to core/events/BeforeLoadEvent.idl
diff --git a/core/dom/BeforeUnloadEvent.idl b/core/events/BeforeUnloadEvent.idl similarity index 100% rename from core/dom/BeforeUnloadEvent.idl rename to core/events/BeforeUnloadEvent.idl
diff --git a/core/dom/CompositionEvent.idl b/core/events/CompositionEvent.idl similarity index 100% rename from core/dom/CompositionEvent.idl rename to core/events/CompositionEvent.idl
diff --git a/core/dom/CustomEvent.idl b/core/events/CustomEvent.idl similarity index 95% rename from core/dom/CustomEvent.idl rename to core/events/CustomEvent.idl index 12edaa5..0afe8fe 100644 --- a/core/dom/CustomEvent.idl +++ b/core/events/CustomEvent.idl
@@ -26,7 +26,7 @@ [ ConstructorTemplate=Event ] interface CustomEvent : Event { - [InitializedByEventConstructor, Custom] readonly attribute any detail; + [CustomGetter, InitializedByEventConstructor] readonly attribute any detail; [Custom] void initCustomEvent([Default=Undefined] optional DOMString typeArg, [Default=Undefined] optional boolean canBubbleArg,
diff --git a/core/dom/ErrorEvent.idl b/core/events/ErrorEvent.idl similarity index 94% rename from core/dom/ErrorEvent.idl rename to core/events/ErrorEvent.idl index 33f0239..1a5d21a 100644 --- a/core/dom/ErrorEvent.idl +++ b/core/events/ErrorEvent.idl
@@ -35,6 +35,6 @@ [InitializedByEventConstructor] readonly attribute DOMString filename; [InitializedByEventConstructor] readonly attribute unsigned long lineno; [InitializedByEventConstructor] readonly attribute unsigned long colno; - [InitializedByEventConstructor, Custom, Unserializable] readonly attribute any error; + [CustomGetter, InitializedByEventConstructor, Unserializable] readonly attribute any error; };
diff --git a/core/dom/Event.idl b/core/events/Event.idl similarity index 88% rename from core/dom/Event.idl rename to core/events/Event.idl index 88d704f..49b4914 100644 --- a/core/dom/Event.idl +++ b/core/events/Event.idl
@@ -59,9 +59,9 @@ void stopPropagation(); void preventDefault(); - void initEvent([Default=Undefined] optional DOMString eventTypeArg, - [Default=Undefined] optional boolean canBubbleArg, - [Default=Undefined] optional boolean cancelableArg); + void initEvent([Default=Undefined] optional DOMString eventTypeArg, + [Default=Undefined] optional boolean canBubbleArg, + [Default=Undefined] optional boolean cancelableArg); // DOM Level 3 Additions. readonly attribute boolean defaultPrevented; @@ -72,8 +72,7 @@ [ImplementedAs=legacyReturnValue, DeprecateAs=EventReturnValue] attribute boolean returnValue; attribute boolean cancelBubble; - [EnabledAtRuntime=ShadowDOM] readonly attribute NodeList path; + [RuntimeEnabled=ShadowDOM] readonly attribute NodeList path; - [Custom] readonly attribute Clipboard clipboardData; + [CustomGetter] readonly attribute Clipboard clipboardData; }; -
diff --git a/core/dom/EventListener.idl b/core/events/EventListener.idl similarity index 100% rename from core/dom/EventListener.idl rename to core/events/EventListener.idl
diff --git a/core/dom/EventTarget.idl b/core/events/EventTarget.idl similarity index 100% rename from core/dom/EventTarget.idl rename to core/events/EventTarget.idl
diff --git a/core/dom/FocusEvent.idl b/core/events/FocusEvent.idl similarity index 100% rename from core/dom/FocusEvent.idl rename to core/events/FocusEvent.idl
diff --git a/core/dom/HashChangeEvent.idl b/core/events/HashChangeEvent.idl similarity index 96% rename from core/dom/HashChangeEvent.idl rename to core/events/HashChangeEvent.idl index 470a208..13c83b4 100644 --- a/core/dom/HashChangeEvent.idl +++ b/core/events/HashChangeEvent.idl
@@ -17,7 +17,7 @@ * Boston, MA 02110-1301, USA. */ -// Introduced in http://www.whatwg.org/specs/web-apps/current-work/multipage/history.html#event-hashchange +// Introduced in http://www.whatwg.org/specs/web-apps/current-work/multiframe/History.html#event-hashchange [ ConstructorTemplate=Event ] interface HashChangeEvent : Event {
diff --git a/core/dom/KeyboardEvent.idl b/core/events/KeyboardEvent.idl similarity index 96% rename from core/dom/KeyboardEvent.idl rename to core/events/KeyboardEvent.idl index 62dd799..4d980ae 100644 --- a/core/dom/KeyboardEvent.idl +++ b/core/events/KeyboardEvent.idl
@@ -33,6 +33,7 @@ [InitializedByEventConstructor] readonly attribute boolean shiftKey; [InitializedByEventConstructor] readonly attribute boolean altKey; [InitializedByEventConstructor] readonly attribute boolean metaKey; + [InitializedByEventConstructor] readonly attribute boolean repeat; readonly attribute boolean altGraphKey; boolean getModifierState(DOMString keyArgument);
diff --git a/core/dom/MessageEvent.idl b/core/events/MessageEvent.idl similarity index 100% rename from core/dom/MessageEvent.idl rename to core/events/MessageEvent.idl
diff --git a/core/dom/MouseEvent.idl b/core/events/MouseEvent.idl similarity index 100% rename from core/dom/MouseEvent.idl rename to core/events/MouseEvent.idl
diff --git a/core/dom/MutationEvent.idl b/core/events/MutationEvent.idl similarity index 100% rename from core/dom/MutationEvent.idl rename to core/events/MutationEvent.idl
diff --git a/core/dom/ErrorEvent.idl b/core/events/NavigatorEvents.idl similarity index 74% copy from core/dom/ErrorEvent.idl copy to core/events/NavigatorEvents.idl index 33f0239..fe899fc 100644 --- a/core/dom/ErrorEvent.idl +++ b/core/events/NavigatorEvents.idl
@@ -1,5 +1,5 @@ /* - * Copyright (C) 2009 Google Inc. All rights reserved. + * Copyright (C) 2013 Google Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -28,13 +28,7 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -[ - ConstructorTemplate=Event -] interface ErrorEvent : Event { - [InitializedByEventConstructor] readonly attribute DOMString message; - [InitializedByEventConstructor] readonly attribute DOMString filename; - [InitializedByEventConstructor] readonly attribute unsigned long lineno; - [InitializedByEventConstructor] readonly attribute unsigned long colno; - [InitializedByEventConstructor, Custom, Unserializable] readonly attribute any error; -}; - +partial interface Navigator { + [RuntimeEnabled=PointerEventsMaxTouchPoints] + readonly attribute long maxTouchPoints; +}; \ No newline at end of file
diff --git a/core/dom/OverflowEvent.idl b/core/events/OverflowEvent.idl similarity index 100% rename from core/dom/OverflowEvent.idl rename to core/events/OverflowEvent.idl
diff --git a/core/dom/PageTransitionEvent.idl b/core/events/PageTransitionEvent.idl similarity index 100% rename from core/dom/PageTransitionEvent.idl rename to core/events/PageTransitionEvent.idl
diff --git a/core/dom/PopStateEvent.idl b/core/events/PopStateEvent.idl similarity index 100% rename from core/dom/PopStateEvent.idl rename to core/events/PopStateEvent.idl
diff --git a/core/dom/ProgressEvent.idl b/core/events/ProgressEvent.idl similarity index 100% rename from core/dom/ProgressEvent.idl rename to core/events/ProgressEvent.idl
diff --git a/core/dom/ResourceProgressEvent.idl b/core/events/ResourceProgressEvent.idl similarity index 100% rename from core/dom/ResourceProgressEvent.idl rename to core/events/ResourceProgressEvent.idl
diff --git a/core/dom/SecurityPolicyViolationEvent.idl b/core/events/SecurityPolicyViolationEvent.idl similarity index 96% rename from core/dom/SecurityPolicyViolationEvent.idl rename to core/events/SecurityPolicyViolationEvent.idl index d067fab..a5de4dc 100644 --- a/core/dom/SecurityPolicyViolationEvent.idl +++ b/core/events/SecurityPolicyViolationEvent.idl
@@ -23,7 +23,7 @@ */ [ - EnabledAtRuntime=ExperimentalContentSecurityPolicyFeatures, + RuntimeEnabled=ExperimentalContentSecurityPolicyFeatures, ConstructorTemplate=Event ] interface SecurityPolicyViolationEvent : Event { [InitializedByEventConstructor] readonly attribute DOMString documentURI;
diff --git a/core/dom/TextEvent.idl b/core/events/TextEvent.idl similarity index 100% rename from core/dom/TextEvent.idl rename to core/events/TextEvent.idl
diff --git a/core/dom/TouchEvent.idl b/core/events/TouchEvent.idl similarity index 100% rename from core/dom/TouchEvent.idl rename to core/events/TouchEvent.idl
diff --git a/core/dom/TransitionEvent.idl b/core/events/TransitionEvent.idl similarity index 100% rename from core/dom/TransitionEvent.idl rename to core/events/TransitionEvent.idl
diff --git a/core/dom/UIEvent.idl b/core/events/UIEvent.idl similarity index 100% rename from core/dom/UIEvent.idl rename to core/events/UIEvent.idl
diff --git a/core/dom/WebKitAnimationEvent.idl b/core/events/WebKitAnimationEvent.idl similarity index 100% rename from core/dom/WebKitAnimationEvent.idl rename to core/events/WebKitAnimationEvent.idl
diff --git a/core/dom/WheelEvent.idl b/core/events/WheelEvent.idl similarity index 100% rename from core/dom/WheelEvent.idl rename to core/events/WheelEvent.idl
diff --git a/core/fileapi/Blob.idl b/core/fileapi/Blob.idl index 8dddc35..814a2fc 100644 --- a/core/fileapi/Blob.idl +++ b/core/fileapi/Blob.idl
@@ -30,7 +30,7 @@ [ GlobalContext=Window&WorkerGlobalScope, - CustomToV8, + SpecialWrapFor=File, CustomConstructor, CustomConstructor(sequence<any> blobParts, optional BlobPropertyBag options) ] interface Blob {
diff --git a/core/fileapi/File.idl b/core/fileapi/File.idl index 2d2ea18..56be7fc 100644 --- a/core/fileapi/File.idl +++ b/core/fileapi/File.idl
@@ -26,6 +26,6 @@ interface File : Blob { readonly attribute DOMString name; readonly attribute Date lastModifiedDate; - [EnabledAtRuntime=DirectoryUpload] readonly attribute DOMString webkitRelativePath; + [RuntimeEnabled=DirectoryUpload] readonly attribute DOMString webkitRelativePath; };
diff --git a/core/fileapi/FileReader.idl b/core/fileapi/FileReader.idl index d43e34e..eb26da7 100644 --- a/core/fileapi/FileReader.idl +++ b/core/fileapi/FileReader.idl
@@ -33,7 +33,7 @@ GlobalContext=Window&WorkerGlobalScope, ActiveDOMObject, Constructor, - ConstructorCallWith=ScriptExecutionContext + ConstructorCallWith=ExecutionContext ] interface FileReader : EventTarget { // ready states const unsigned short EMPTY = 0; @@ -50,7 +50,7 @@ void abort(); // file data - [Custom] readonly attribute any result; + [CustomGetter] readonly attribute any result; readonly attribute FileError error;
diff --git a/core/fileapi/FileReaderSync.idl b/core/fileapi/FileReaderSync.idl index 4930687..125e002 100644 --- a/core/fileapi/FileReaderSync.idl +++ b/core/fileapi/FileReaderSync.idl
@@ -32,8 +32,8 @@ GlobalContext=WorkerGlobalScope, Constructor ] interface FileReaderSync { - [CallWith=ScriptExecutionContext, RaisesException] ArrayBuffer readAsArrayBuffer(Blob blob); - [CallWith=ScriptExecutionContext, RaisesException] DOMString readAsBinaryString(Blob blob); - [CallWith=ScriptExecutionContext, RaisesException] DOMString readAsText(Blob blob, optional DOMString encoding); - [CallWith=ScriptExecutionContext, RaisesException] DOMString readAsDataURL(Blob blob); + [CallWith=ExecutionContext, RaisesException] ArrayBuffer readAsArrayBuffer(Blob blob); + [CallWith=ExecutionContext, RaisesException] DOMString readAsBinaryString(Blob blob); + [CallWith=ExecutionContext, RaisesException] DOMString readAsText(Blob blob, optional DOMString encoding); + [CallWith=ExecutionContext, RaisesException] DOMString readAsDataURL(Blob blob); };
diff --git a/core/fileapi/Stream.idl b/core/fileapi/Stream.idl index 6ead757..1406b7b 100644 --- a/core/fileapi/Stream.idl +++ b/core/fileapi/Stream.idl
@@ -37,7 +37,8 @@ // FIXME: Make the Blob a subclass of the Stream. [ - EnabledAtRuntime=Stream + RuntimeEnabled=Stream, + ActiveDOMObject ] interface Stream { readonly attribute DOMString type; };
diff --git a/core/page/BarProp.idl b/core/frame/BarProp.idl similarity index 100% rename from core/page/BarProp.idl rename to core/frame/BarProp.idl
diff --git a/core/page/Console.idl b/core/frame/Console.idl similarity index 100% rename from core/page/Console.idl rename to core/frame/Console.idl
diff --git a/core/page/ConsoleBase.idl b/core/frame/ConsoleBase.idl similarity index 100% rename from core/page/ConsoleBase.idl rename to core/frame/ConsoleBase.idl
diff --git a/core/page/History.idl b/core/frame/History.idl similarity index 79% rename from core/page/History.idl rename to core/frame/History.idl index d20cc89..2b8cce4 100644 --- a/core/page/History.idl +++ b/core/frame/History.idl
@@ -25,12 +25,12 @@ interface History { readonly attribute unsigned long length; - [Custom] readonly attribute SerializedScriptValue state; + [CustomGetter] readonly attribute SerializedScriptValue state; - [CallWith=ScriptExecutionContext] void back(); - [CallWith=ScriptExecutionContext] void forward(); - [CallWith=ScriptExecutionContext] void go([Default=Undefined] optional long distance); + [CallWith=ExecutionContext] void back(); + [CallWith=ExecutionContext] void forward(); + [CallWith=ExecutionContext] void go([Default=Undefined] optional long distance); - [Custom, EnabledPerContext=pushState, RaisesException] void pushState(any data, DOMString title, optional DOMString url); - [Custom, EnabledPerContext=pushState, RaisesException] void replaceState(any data, DOMString title, optional DOMString url); + [Custom, PerContextEnabled=PushState, RaisesException] void pushState(any data, DOMString title, optional DOMString url); + [Custom, PerContextEnabled=PushState, RaisesException] void replaceState(any data, DOMString title, optional DOMString url); };
diff --git a/core/page/ImageBitmap.idl b/core/frame/ImageBitmap.idl similarity index 100% rename from core/page/ImageBitmap.idl rename to core/frame/ImageBitmap.idl
diff --git a/core/page/Location.idl b/core/frame/Location.idl similarity index 90% rename from core/page/Location.idl rename to core/frame/Location.idl index 77778e1..1d1c893 100644 --- a/core/page/Location.idl +++ b/core/frame/Location.idl
@@ -31,8 +31,8 @@ ] interface Location { [SetterCallWith=ActiveWindow&FirstWindow, DoNotCheckSecurityOnSetter, Unforgeable] attribute DOMString href; - [CallWith=ActiveWindow&FirstWindow, DoNotCheckSecurity, Unforgeable, ReadOnly, PerWorldBindings, ActivityLog=AccessForIsolatedWorlds] void assign([Default=Undefined] optional DOMString url); - [CallWith=ActiveWindow&FirstWindow, DoNotCheckSecurity, Unforgeable, ReadOnly, PerWorldBindings, ActivityLog=AccessForIsolatedWorlds] void replace([Default=Undefined] optional DOMString url); + [CallWith=ActiveWindow&FirstWindow, DoNotCheckSecurity, Unforgeable, ReadOnly, PerWorldBindings, ActivityLogging=AccessForIsolatedWorlds] void assign([Default=Undefined] optional DOMString url); + [CallWith=ActiveWindow&FirstWindow, DoNotCheckSecurity, Unforgeable, ReadOnly, PerWorldBindings, ActivityLogging=AccessForIsolatedWorlds] void replace([Default=Undefined] optional DOMString url); [CallWith=ActiveWindow, Unforgeable, ReadOnly] void reload(); // URI decomposition attributes
diff --git a/core/page/Navigator.idl b/core/frame/Navigator.idl similarity index 100% rename from core/page/Navigator.idl rename to core/frame/Navigator.idl
diff --git a/core/page/NavigatorID.idl b/core/frame/NavigatorID.idl similarity index 100% rename from core/page/NavigatorID.idl rename to core/frame/NavigatorID.idl
diff --git a/core/page/NavigatorOnLine.idl b/core/frame/NavigatorOnLine.idl similarity index 100% rename from core/page/NavigatorOnLine.idl rename to core/frame/NavigatorOnLine.idl
diff --git a/core/page/Screen.idl b/core/frame/Screen.idl similarity index 100% rename from core/page/Screen.idl rename to core/frame/Screen.idl
diff --git a/core/page/SecurityPolicy.idl b/core/frame/SecurityPolicy.idl similarity index 100% rename from core/page/SecurityPolicy.idl rename to core/frame/SecurityPolicy.idl
diff --git a/core/page/WebKitPoint.idl b/core/frame/WebKitPoint.idl similarity index 100% rename from core/page/WebKitPoint.idl rename to core/frame/WebKitPoint.idl
diff --git a/core/page/Window.idl b/core/frame/Window.idl similarity index 60% rename from core/page/Window.idl rename to core/frame/Window.idl index c720658..86dd8e0 100644 --- a/core/page/Window.idl +++ b/core/frame/Window.idl
@@ -24,6 +24,8 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +// HTML 5 draft spec: +// http://www.w3.org/html/wg/drafts/html/master/browsers.html#window [ CheckSecurity, CustomToV8, @@ -39,18 +41,18 @@ [Replaceable] readonly attribute BarProp scrollbars; [Replaceable] readonly attribute BarProp statusbar; [Replaceable] readonly attribute BarProp toolbar; - [Replaceable, PerWorldBindings, ActivityLog=GetterForIsolatedWorlds] readonly attribute Navigator navigator; + [Replaceable, PerWorldBindings, ActivityLogging=GetterForIsolatedWorlds] readonly attribute Navigator navigator; [Replaceable] readonly attribute Navigator clientInformation; - [DoNotCheckSecurity, CustomSetter, Unforgeable, Replaceable, PerWorldBindings, ActivityLog=AccessForIsolatedWorlds] readonly attribute Location location; - [MeasureAs=WindowEvent, NotEnumerable, Replaceable, CustomGetter, CustomSetter] readonly attribute Event event; + [DoNotCheckSecurity, Unforgeable, Replaceable, PerWorldBindings, ActivityLogging=AccessForIsolatedWorlds, PutForwards=href] readonly attribute Location location; + [Custom, MeasureAs=WindowEvent, NotEnumerable] attribute Event event; Selection getSelection(); [CheckSecurityForNode] readonly attribute Element frameElement; - [DoNotCheckSecurity, CallWith=ScriptExecutionContext] void focus(); + [DoNotCheckSecurity, CallWith=ExecutionContext] void focus(); [DoNotCheckSecurity] void blur(); - [DoNotCheckSecurity, CallWith=ScriptExecutionContext] void close(); + [DoNotCheckSecurity, CallWith=ExecutionContext] void close(); void print(); void stop(); @@ -115,7 +117,7 @@ [DoNotCheckSecurity, Unforgeable] readonly attribute Window window; [Replaceable, DoNotCheckSecurityOnGetter] readonly attribute Window frames; - [Replaceable, DoNotCheckSecurityOnGetter, CustomSetter] readonly attribute Window opener; + [DoNotCheckSecurityOnGetter, CustomSetter] attribute Window opener; [Replaceable, DoNotCheckSecurityOnGetter] readonly attribute Window parent; [DoNotCheckSecurityOnGetter, Unforgeable] readonly attribute Window top; @@ -143,10 +145,10 @@ WebKitPoint webkitConvertPointFromNodeToPage([Default=Undefined] optional Node node, [Default=Undefined] optional WebKitPoint p); - [EnabledAtRuntime=ApplicationCache, PerWorldBindings, ActivityLog=GetterForIsolatedWorlds] readonly attribute ApplicationCache applicationCache; + [RuntimeEnabled=ApplicationCache, PerWorldBindings, ActivityLogging=GetterForIsolatedWorlds] readonly attribute ApplicationCache applicationCache; - [EnabledAtRuntime=SessionStorage, PerWorldBindings, ActivityLog=GetterForIsolatedWorlds, GetterRaisesException] readonly attribute Storage sessionStorage; - [EnabledAtRuntime=LocalStorage, PerWorldBindings, ActivityLog=GetterForIsolatedWorlds, GetterRaisesException] readonly attribute Storage localStorage; + [RuntimeEnabled=SessionStorage, PerWorldBindings, ActivityLogging=GetterForIsolatedWorlds, GetterRaisesException] readonly attribute Storage sessionStorage; + [RuntimeEnabled=LocalStorage, PerWorldBindings, ActivityLogging=GetterForIsolatedWorlds, GetterRaisesException] readonly attribute Storage localStorage; // This is the interface orientation in degrees. Some examples are: // 0 is straight up; -90 is when the device is rotated 90 clockwise; @@ -168,107 +170,31 @@ [Replaceable] readonly attribute CSS CSS; - // Events - attribute EventHandler onabort; - attribute EventHandler onbeforeunload; - attribute EventHandler onblur; - attribute EventHandler oncanplay; - attribute EventHandler oncanplaythrough; - attribute EventHandler onchange; - [PerWorldBindings, ActivityLog=SetterForIsolatedWorlds] attribute EventHandler onclick; - attribute EventHandler oncontextmenu; - [PerWorldBindings, ActivityLog=SetterForIsolatedWorlds] attribute EventHandler ondblclick; - [PerWorldBindings, ActivityLog=SetterForIsolatedWorlds] attribute EventHandler ondrag; - [PerWorldBindings, ActivityLog=SetterForIsolatedWorlds] attribute EventHandler ondragend; - [PerWorldBindings, ActivityLog=SetterForIsolatedWorlds] attribute EventHandler ondragenter; - [PerWorldBindings, ActivityLog=SetterForIsolatedWorlds] attribute EventHandler ondragleave; - [PerWorldBindings, ActivityLog=SetterForIsolatedWorlds] attribute EventHandler ondragover; - [PerWorldBindings, ActivityLog=SetterForIsolatedWorlds] attribute EventHandler ondragstart; - [PerWorldBindings, ActivityLog=SetterForIsolatedWorlds] attribute EventHandler ondrop; - attribute EventHandler ondurationchange; - attribute EventHandler onemptied; - attribute EventHandler onended; - attribute EventHandler onerror; - attribute EventHandler onfocus; - attribute EventHandler onhashchange; - [PerWorldBindings, ActivityLog=SetterForIsolatedWorlds] attribute EventHandler oninput; - attribute EventHandler oninvalid; - [PerWorldBindings, ActivityLog=SetterForIsolatedWorlds] attribute EventHandler onkeydown; - [PerWorldBindings, ActivityLog=SetterForIsolatedWorlds] attribute EventHandler onkeypress; - [PerWorldBindings, ActivityLog=SetterForIsolatedWorlds] attribute EventHandler onkeyup; - attribute EventHandler onload; - attribute EventHandler onloadeddata; - attribute EventHandler onloadedmetadata; - attribute EventHandler onloadstart; - attribute EventHandler onmessage; - [PerWorldBindings, ActivityLog=SetterForIsolatedWorlds] attribute EventHandler onmousedown; - [PerWorldBindings, ActivityLog=SetterForIsolatedWorlds] attribute EventHandler onmouseenter; - [PerWorldBindings, ActivityLog=SetterForIsolatedWorlds] attribute EventHandler onmouseleave; - [PerWorldBindings, ActivityLog=SetterForIsolatedWorlds] attribute EventHandler onmousemove; - [PerWorldBindings, ActivityLog=SetterForIsolatedWorlds] attribute EventHandler onmouseout; - [PerWorldBindings, ActivityLog=SetterForIsolatedWorlds] attribute EventHandler onmouseover; - [PerWorldBindings, ActivityLog=SetterForIsolatedWorlds] attribute EventHandler onmouseup; - [PerWorldBindings, ActivityLog=SetterForIsolatedWorlds] attribute EventHandler onmousewheel; // Deprecated in favor of onwheel. - [PerWorldBindings, ActivityLog=SetterForIsolatedWorlds] attribute EventHandler onwheel; - attribute EventHandler onoffline; - attribute EventHandler ononline; - attribute EventHandler onpagehide; - attribute EventHandler onpageshow; - attribute EventHandler onpause; - attribute EventHandler onplay; - attribute EventHandler onplaying; - attribute EventHandler onpopstate; - attribute EventHandler onprogress; - attribute EventHandler onratechange; - attribute EventHandler onresize; - attribute EventHandler onscroll; - attribute EventHandler onseeked; - attribute EventHandler onseeking; - attribute EventHandler onselect; - attribute EventHandler onstalled; - attribute EventHandler onstorage; - attribute EventHandler onsubmit; - attribute EventHandler onsuspend; - attribute EventHandler ontimeupdate; - attribute EventHandler onunload; - attribute EventHandler onvolumechange; - attribute EventHandler onwaiting; - - // Not implemented yet. - // attribute EventHandler onafterprint; - // attribute EventHandler onbeforeprint; - // attribute EventHandler onreadystatechange; - // attribute EventHandler onredo; - // attribute EventHandler onshow; - // attribute EventHandler onundo; - - // Webkit extensions - attribute EventHandler onreset; + // Event handler attributes + [RuntimeEnabled=CSSAnimationUnprefixed] attribute EventHandler onanimationend; + [RuntimeEnabled=CSSAnimationUnprefixed] attribute EventHandler onanimationiteration; + [RuntimeEnabled=CSSAnimationUnprefixed] attribute EventHandler onanimationstart; + [RuntimeEnabled=DeviceMotion] attribute EventHandler ondevicemotion; + [RuntimeEnabled=DeviceOrientation] attribute EventHandler ondeviceorientation; + [Conditional=ORIENTATION_EVENTS] attribute EventHandler onorientationchange; attribute EventHandler onsearch; - [EnabledAtRuntime=CSSAnimationUnprefixed] attribute EventHandler onanimationend; - [EnabledAtRuntime=CSSAnimationUnprefixed] attribute EventHandler onanimationiteration; - [EnabledAtRuntime=CSSAnimationUnprefixed] attribute EventHandler onanimationstart; + [RuntimeEnabled=Touch] attribute EventHandler ontouchcancel; + [RuntimeEnabled=Touch] attribute EventHandler ontouchend; + [RuntimeEnabled=Touch] attribute EventHandler ontouchmove; + [RuntimeEnabled=Touch] attribute EventHandler ontouchstart; + attribute EventHandler ontransitionend; attribute EventHandler onwebkitanimationend; attribute EventHandler onwebkitanimationiteration; attribute EventHandler onwebkitanimationstart; attribute EventHandler onwebkittransitionend; - attribute EventHandler ontransitionend; - [Conditional=ORIENTATION_EVENTS] attribute EventHandler onorientationchange; - [EnabledAtRuntime=Touch] attribute EventHandler ontouchstart; - [EnabledAtRuntime=Touch] attribute EventHandler ontouchmove; - [EnabledAtRuntime=Touch] attribute EventHandler ontouchend; - [EnabledAtRuntime=Touch] attribute EventHandler ontouchcancel; - - [EnabledAtRuntime=DeviceMotion] attribute EventHandler ondevicemotion; - [EnabledAtRuntime=DeviceOrientation] attribute EventHandler ondeviceorientation; + [ActivityLogging=SetterForAllWorlds] attribute EventHandler onwheel; [DeprecateAs=CaptureEvents] void captureEvents(); [DeprecateAs=ReleaseEvents] void releaseEvents(); // Additional constructors. attribute TransitionEventConstructor WebKitTransitionEvent; - [EnabledAtRuntime=CSSAnimationUnprefixed] attribute WebKitAnimationEventConstructor AnimationEvent; - [CustomConstructor] attribute HTMLImageElementConstructorConstructor Image; // Usable with new operator + [RuntimeEnabled=CSSAnimationUnprefixed] attribute WebKitAnimationEventConstructor AnimationEvent; // Mozilla has a separate XMLDocument object for XML documents. // We just use Document for this. attribute DocumentConstructor XMLDocument; @@ -285,22 +211,22 @@ // Constructors whose name does not match the interface name. // FIXME: Remove these once [ImplementedAs] is used and once constructor names match interface names. - [EnabledAtRuntime=MediaStream] attribute MediaStreamConstructor webkitMediaStream; - [Conditional=WEB_AUDIO, EnabledAtRuntime=WebAudio] attribute AudioContextConstructor webkitAudioContext; - [Conditional=WEB_AUDIO, EnabledAtRuntime=WebAudio] attribute OfflineAudioContextConstructor webkitOfflineAudioContext; - [EnabledAtRuntime=PeerConnection] attribute RTCPeerConnectionConstructor webkitRTCPeerConnection; - [EnabledAtRuntime=ScriptedSpeech] attribute SpeechGrammarConstructor webkitSpeechGrammar; - [EnabledAtRuntime=ScriptedSpeech] attribute SpeechGrammarListConstructor webkitSpeechGrammarList; - [EnabledAtRuntime=ScriptedSpeech] attribute SpeechRecognitionConstructor webkitSpeechRecognition; - [EnabledAtRuntime=ScriptedSpeech] attribute SpeechRecognitionErrorConstructor webkitSpeechRecognitionError; - [EnabledAtRuntime=ScriptedSpeech] attribute SpeechRecognitionEventConstructor webkitSpeechRecognitionEvent; + [RuntimeEnabled=MediaStream] attribute MediaStreamConstructor webkitMediaStream; + [Conditional=WEB_AUDIO, RuntimeEnabled=WebAudio] attribute AudioContextConstructor webkitAudioContext; + [Conditional=WEB_AUDIO, RuntimeEnabled=WebAudio] attribute OfflineAudioContextConstructor webkitOfflineAudioContext; + [RuntimeEnabled=PeerConnection] attribute RTCPeerConnectionConstructor webkitRTCPeerConnection; + [RuntimeEnabled=ScriptedSpeech] attribute SpeechGrammarConstructor webkitSpeechGrammar; + [RuntimeEnabled=ScriptedSpeech] attribute SpeechGrammarListConstructor webkitSpeechGrammarList; + [RuntimeEnabled=ScriptedSpeech] attribute SpeechRecognitionConstructor webkitSpeechRecognition; + [RuntimeEnabled=ScriptedSpeech] attribute SpeechRecognitionErrorConstructor webkitSpeechRecognitionError; + [RuntimeEnabled=ScriptedSpeech] attribute SpeechRecognitionEventConstructor webkitSpeechRecognitionEvent; [Conditional=WEB_AUDIO] attribute PannerNodeConstructor webkitAudioPannerNode; // Prefixed ShadowRoot constructor should be phased out eventually, but for the moment it must be always exposed. // Unprefixed ShadowRoot constructor should be visible when the feature flag is enabled. // FIXME: When it's ready to remove WebKitShadowRoot, get rid of both constructors from Window.idl and remove // [NoInterfaceObject] from ShadowRoot interface definition. - [EnabledAtRuntime=ShadowDOM] attribute ShadowRootConstructor ShadowRoot; + [RuntimeEnabled=ShadowDOM] attribute ShadowRootConstructor ShadowRoot; [MeasureAs=PrefixedShadowRootConstructor] attribute ShadowRootConstructor WebKitShadowRoot; // window.toString() requires special handling in V8 @@ -310,6 +236,8 @@ [Custom, NotEnumerable] getter Window (DOMString name); }; +Window implements GlobalEventHandlers; Window implements ImageBitmapFactories; -Window implements WindowTimers; Window implements WindowBase64; +Window implements WindowEventHandlers; +Window implements WindowTimers;
diff --git a/core/page/WindowBase64.idl b/core/frame/WindowBase64.idl similarity index 100% rename from core/page/WindowBase64.idl rename to core/frame/WindowBase64.idl
diff --git a/core/frame/WindowEventHandlers.idl b/core/frame/WindowEventHandlers.idl new file mode 100644 index 0000000..b7634ae --- /dev/null +++ b/core/frame/WindowEventHandlers.idl
@@ -0,0 +1,47 @@ +/* + * Copyright (c) 2013, Opera Software ASA. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of Opera Software ASA nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +[ + NoInterfaceObject, + ImplementedAs=DOMWindowEventHandlers +] interface WindowEventHandlers { + //attribute EventHandler onafterprint; + //attribute EventHandler onbeforeprint; + attribute EventHandler onbeforeunload; + attribute EventHandler onhashchange; + attribute EventHandler onmessage; + attribute EventHandler onoffline; + attribute EventHandler ononline; + attribute EventHandler onpagehide; + attribute EventHandler onpageshow; + attribute EventHandler onpopstate; + attribute EventHandler onresize; + attribute EventHandler onstorage; + attribute EventHandler onunload; +};
diff --git a/core/page/WindowTimers.idl b/core/frame/WindowTimers.idl similarity index 100% rename from core/page/WindowTimers.idl rename to core/frame/WindowTimers.idl
diff --git a/core/html/HTMLAnchorElement.idl b/core/html/HTMLAnchorElement.idl index e0c7068..88cf2d4 100644 --- a/core/html/HTMLAnchorElement.idl +++ b/core/html/HTMLAnchorElement.idl
@@ -19,31 +19,20 @@ */ interface HTMLAnchorElement : HTMLElement { - [Reflect] attribute DOMString charset; - [Reflect] attribute DOMString coords; - [Reflect] attribute DOMString download; - [Reflect, URL] attribute DOMString href; - [Reflect] attribute DOMString hreflang; - [Reflect] attribute DOMString name; - [Reflect] attribute DOMString ping; - [Reflect] attribute DOMString rel; - [Reflect] attribute DOMString rev; - [Reflect] attribute DOMString shape; - [Reflect] attribute DOMString target; - [Reflect] attribute DOMString type; - - [TreatNullAs=NullString] attribute DOMString hash; - [TreatNullAs=NullString] attribute DOMString host; - [TreatNullAs=NullString] attribute DOMString hostname; - [TreatNullAs=NullString] attribute DOMString pathname; - [TreatNullAs=NullString] attribute DOMString port; - [TreatNullAs=NullString] attribute DOMString protocol; - [TreatNullAs=NullString] attribute DOMString search; - - [TreatNullAs=NullString] readonly attribute DOMString origin; + [Reflect, TreatNullAs=NullString] attribute DOMString charset; + [Reflect, TreatNullAs=NullString] attribute DOMString coords; + [Reflect, TreatNullAs=NullString] attribute DOMString download; + [Reflect, TreatNullAs=NullString] attribute DOMString hreflang; + [Reflect, TreatNullAs=NullString] attribute DOMString name; + [Reflect, TreatNullAs=NullString] attribute DOMString ping; + [Reflect, TreatNullAs=NullString] attribute DOMString rel; + [Reflect, TreatNullAs=NullString] attribute DOMString rev; + [Reflect, TreatNullAs=NullString] attribute DOMString shape; + [Reflect, TreatNullAs=NullString] attribute DOMString target; + [Reflect, TreatNullAs=NullString] attribute DOMString type; readonly attribute DOMString text; - - [NotEnumerable] DOMString toString(); }; +// Force rebuild: crbug.com/307023 +HTMLAnchorElement implements URLUtils;
diff --git a/core/html/HTMLAppletElement.idl b/core/html/HTMLAppletElement.idl index efb2855..655cd07 100644 --- a/core/html/HTMLAppletElement.idl +++ b/core/html/HTMLAppletElement.idl
@@ -21,17 +21,17 @@ [ CustomLegacyCall ] interface HTMLAppletElement : HTMLElement { - [Reflect] attribute DOMString align; - [Reflect] attribute DOMString alt; - [Reflect] attribute DOMString archive; - [Reflect] attribute DOMString code; - [Reflect] attribute DOMString codeBase; - [Reflect] attribute DOMString height; - [Reflect] attribute DOMString hspace; - [Reflect] attribute DOMString name; - [Reflect] attribute DOMString _object; // "object" is a reserved word - [Reflect] attribute DOMString vspace; - [Reflect] attribute DOMString width; + [Reflect, TreatNullAs=NullString] attribute DOMString align; + [Reflect, TreatNullAs=NullString] attribute DOMString alt; + [Reflect, TreatNullAs=NullString] attribute DOMString archive; + [Reflect, TreatNullAs=NullString] attribute DOMString code; + [Reflect, TreatNullAs=NullString] attribute DOMString codeBase; + [Reflect, TreatNullAs=NullString] attribute DOMString height; + [Reflect, TreatNullAs=NullString] attribute DOMString hspace; + [Reflect, TreatNullAs=NullString] attribute DOMString name; + [Reflect, TreatNullAs=NullString] attribute DOMString _object; // "object" is a reserved word + [Reflect, TreatNullAs=NullString] attribute DOMString vspace; + [Reflect, TreatNullAs=NullString] attribute DOMString width; [Custom, NotEnumerable] getter boolean (unsigned long index); [Custom] setter boolean (unsigned long index, Node value); [Custom, NotEnumerable] getter Node (DOMString name);
diff --git a/core/html/HTMLAreaElement.idl b/core/html/HTMLAreaElement.idl index a9c1fa7..1175ec1 100644 --- a/core/html/HTMLAreaElement.idl +++ b/core/html/HTMLAreaElement.idl
@@ -19,21 +19,13 @@ */ interface HTMLAreaElement : HTMLElement { - [Reflect] attribute DOMString alt; - [Reflect] attribute DOMString coords; - [Reflect, URL] attribute DOMString href; + [Reflect, TreatNullAs=NullString] attribute DOMString alt; + [Reflect, TreatNullAs=NullString] attribute DOMString coords; [Reflect] attribute boolean noHref; - [Reflect] attribute DOMString ping; - [Reflect] attribute DOMString shape; - [Reflect] attribute DOMString target; - - // IE Extensions - readonly attribute DOMString hash; - readonly attribute DOMString host; - readonly attribute DOMString hostname; - readonly attribute DOMString pathname; - readonly attribute DOMString port; - readonly attribute DOMString protocol; - readonly attribute DOMString search; + [Reflect, TreatNullAs=NullString] attribute DOMString ping; + [Reflect, TreatNullAs=NullString] attribute DOMString shape; + [Reflect, TreatNullAs=NullString] attribute DOMString target; }; +// Force rebuild: crbug.com/307023 +HTMLAreaElement implements URLUtils;
diff --git a/core/html/HTMLAudioElement.idl b/core/html/HTMLAudioElement.idl index cbed9d6..ffb4769 100644 --- a/core/html/HTMLAudioElement.idl +++ b/core/html/HTMLAudioElement.idl
@@ -24,7 +24,7 @@ */ [ - EnabledAtRuntime=Media, + RuntimeEnabled=Media, NamedConstructor=Audio([Default=NullString] optional DOMString src) ] interface HTMLAudioElement : HTMLMediaElement { };
diff --git a/core/html/HTMLBRElement.idl b/core/html/HTMLBRElement.idl index c909dc1..7c31dfb 100644 --- a/core/html/HTMLBRElement.idl +++ b/core/html/HTMLBRElement.idl
@@ -18,6 +18,6 @@ */ interface HTMLBRElement : HTMLElement { - [Reflect] attribute DOMString clear; + [Reflect, TreatNullAs=NullString] attribute DOMString clear; };
diff --git a/core/html/HTMLBaseElement.idl b/core/html/HTMLBaseElement.idl index 4d9d39f..408e129 100644 --- a/core/html/HTMLBaseElement.idl +++ b/core/html/HTMLBaseElement.idl
@@ -19,5 +19,5 @@ interface HTMLBaseElement : HTMLElement { [TreatNullAs=NullString] attribute DOMString href; - [Reflect] attribute DOMString target; + [Reflect, TreatNullAs=NullString] attribute DOMString target; };
diff --git a/core/html/HTMLBaseFontElement.idl b/core/html/HTMLBaseFontElement.idl index b885a05..a4910e8 100644 --- a/core/html/HTMLBaseFontElement.idl +++ b/core/html/HTMLBaseFontElement.idl
@@ -18,7 +18,7 @@ */ interface HTMLBaseFontElement : HTMLElement { - [Reflect] attribute DOMString color; - [Reflect] attribute DOMString face; + [Reflect, TreatNullAs=NullString] attribute DOMString color; + [Reflect, TreatNullAs=NullString] attribute DOMString face; [Reflect] attribute long size; };
diff --git a/core/html/HTMLBodyElement.idl b/core/html/HTMLBodyElement.idl index dfbd907..3ce7850 100644 --- a/core/html/HTMLBodyElement.idl +++ b/core/html/HTMLBodyElement.idl
@@ -19,36 +19,21 @@ */ interface HTMLBodyElement : HTMLElement { - [Reflect] attribute DOMString aLink; - [Reflect] attribute DOMString background; - [Reflect] attribute DOMString bgColor; - [Reflect] attribute DOMString link; - [Reflect] attribute DOMString text; - [Reflect] attribute DOMString vLink; + [Reflect, TreatNullAs=NullString] attribute DOMString aLink; + [Reflect, TreatNullAs=NullString] attribute DOMString background; + [Reflect, TreatNullAs=NullString] attribute DOMString bgColor; + [Reflect, TreatNullAs=NullString] attribute DOMString link; + [Reflect, TreatNullAs=NullString] attribute DOMString text; + [Reflect, TreatNullAs=NullString] attribute DOMString vLink; - // Event handler attributes - [NotEnumerable] attribute EventHandler onbeforeunload; - [NotEnumerable] attribute EventHandler onhashchange; - [NotEnumerable] attribute EventHandler onmessage; - [NotEnumerable] attribute EventHandler onoffline; - [NotEnumerable] attribute EventHandler ononline; - [NotEnumerable] attribute EventHandler onpopstate; - [NotEnumerable] attribute EventHandler onresize; - [NotEnumerable] attribute EventHandler onstorage; - [NotEnumerable] attribute EventHandler onunload; + [Conditional=ORIENTATION_EVENTS] attribute EventHandler onorientationchange; - [Conditional=ORIENTATION_EVENTS, NotEnumerable] attribute EventHandler onorientationchange; - - // Overrides of Element attributes (with different implementation in bindings). - [NotEnumerable] attribute EventHandler onblur; - [NotEnumerable] attribute EventHandler onerror; - [NotEnumerable] attribute EventHandler onfocus; - [NotEnumerable] attribute EventHandler onload; - - // Not implemented yet. - // attribute [NotEnumerable] EventHandler onafterprint; - // attribute [NotEnumerable] EventHandler onbeforeprint; - // attribute [NotEnumerable] EventHandler onredo; - // attribute [NotEnumerable] EventHandler onundo; + // Overrides of GlobalEventHandler attributes + attribute EventHandler onblur; + attribute EventHandler onerror; + attribute EventHandler onfocus; + attribute EventHandler onload; + attribute EventHandler onscroll; }; +HTMLBodyElement implements WindowEventHandlers;
diff --git a/core/html/HTMLButtonElement.idl b/core/html/HTMLButtonElement.idl index eb3832f..0fef161 100644 --- a/core/html/HTMLButtonElement.idl +++ b/core/html/HTMLButtonElement.idl
@@ -22,14 +22,14 @@ [Reflect] attribute boolean autofocus; [Reflect] attribute boolean disabled; readonly attribute HTMLFormElement form; - [Reflect, URL] attribute DOMString formAction; + [Reflect, TreatNullAs=NullString, URL, PerWorldBindings, ActivityLogging=SetterForIsolatedWorlds] attribute DOMString formAction; [TreatNullAs=NullString] attribute DOMString formEnctype; [TreatNullAs=NullString] attribute DOMString formMethod; [Reflect] attribute boolean formNoValidate; - [Reflect] attribute DOMString formTarget; - [Reflect] attribute DOMString name; + [Reflect, TreatNullAs=NullString] attribute DOMString formTarget; + [Reflect, TreatNullAs=NullString] attribute DOMString name; [TreatNullAs=NullString] attribute DOMString type; - [Reflect] attribute DOMString value; + [Reflect, TreatNullAs=NullString] attribute DOMString value; readonly attribute boolean willValidate; readonly attribute ValidityState validity;
diff --git a/core/html/HTMLCanvasElement.idl b/core/html/HTMLCanvasElement.idl index c095796..78ada4d 100644 --- a/core/html/HTMLCanvasElement.idl +++ b/core/html/HTMLCanvasElement.idl
@@ -32,6 +32,6 @@ [Custom, RaisesException] DOMString toDataURL([TreatNullAs=NullString, TreatUndefinedAs=NullString,Default=Undefined] optional DOMString type); // The custom binding is needed to handle context creation attributes. - [Custom, PerWorldBindings, ActivityLog=AccessForIsolatedWorlds] any getContext([Default=Undefined] optional DOMString contextId); + [Custom, PerWorldBindings, ActivityLogging=AccessForIsolatedWorlds] any getContext([Default=Undefined] optional DOMString contextId); };
diff --git a/core/html/HTMLDataListElement.idl b/core/html/HTMLDataListElement.idl index f87df9a..93c8663 100644 --- a/core/html/HTMLDataListElement.idl +++ b/core/html/HTMLDataListElement.idl
@@ -29,7 +29,7 @@ */ [ - EnabledAtRuntime=DataListElement + RuntimeEnabled=DataListElement ] interface HTMLDataListElement : HTMLElement { readonly attribute HTMLCollection options; };
diff --git a/core/html/HTMLDialogElement.idl b/core/html/HTMLDialogElement.idl index 41732ab..6c2d0c8 100644 --- a/core/html/HTMLDialogElement.idl +++ b/core/html/HTMLDialogElement.idl
@@ -24,7 +24,7 @@ */ [ - EnabledAtRuntime=DialogElement + RuntimeEnabled=DialogElement ] interface HTMLDialogElement : HTMLElement { [Reflect] attribute boolean open; attribute DOMString returnValue;
diff --git a/core/html/HTMLDivElement.idl b/core/html/HTMLDivElement.idl index 5793564..b2eeb3d 100644 --- a/core/html/HTMLDivElement.idl +++ b/core/html/HTMLDivElement.idl
@@ -19,6 +19,6 @@ [ ] interface HTMLDivElement : HTMLElement { - [Reflect] attribute DOMString align; + [Reflect, TreatNullAs=NullString] attribute DOMString align; };
diff --git a/core/html/HTMLDocument.idl b/core/html/HTMLDocument.idl index e44baee..764f1af 100644 --- a/core/html/HTMLDocument.idl +++ b/core/html/HTMLDocument.idl
@@ -18,13 +18,11 @@ * Boston, MA 02110-1301, USA. */ -[ - CustomToV8 -] interface HTMLDocument : Document { - [Custom, CustomElementCallbacks=Enable] void open(); +interface HTMLDocument : Document { + [Custom, CustomElementCallbacks] void open(); void close(); - [Custom, PerWorldBindings, ActivityLog=AccessForIsolatedWorlds, CustomElementCallbacks=Enable] void write([Default=Undefined] optional DOMString text); - [Custom, PerWorldBindings, ActivityLog=AccessForIsolatedWorlds, CustomElementCallbacks=Enable] void writeln([Default=Undefined] optional DOMString text); + [Custom, PerWorldBindings, ActivityLogging=AccessForIsolatedWorlds, CustomElementCallbacks] void write([Default=Undefined] optional DOMString text); + [Custom, PerWorldBindings, ActivityLogging=AccessForIsolatedWorlds, CustomElementCallbacks] void writeln([Default=Undefined] optional DOMString text); readonly attribute HTMLCollection embeds; readonly attribute HTMLCollection plugins; @@ -39,18 +37,18 @@ [DeprecateAs=CaptureEvents] void captureEvents(); [DeprecateAs=ReleaseEvents] void releaseEvents(); - [TreatNullAs=NullString, CustomElementCallbacks=Enable] attribute DOMString dir; - [TreatNullAs=NullString, CustomElementCallbacks=Enable] attribute DOMString designMode; + [TreatNullAs=NullString, CustomElementCallbacks] attribute DOMString dir; + [TreatNullAs=NullString, CustomElementCallbacks] attribute DOMString designMode; readonly attribute DOMString compatMode; readonly attribute Element activeElement; boolean hasFocus(); // Deprecated attributes - [TreatNullAs=NullString, CustomElementCallbacks=Enable] attribute DOMString bgColor; - [TreatNullAs=NullString, CustomElementCallbacks=Enable] attribute DOMString fgColor; - [TreatNullAs=NullString, CustomElementCallbacks=Enable] attribute DOMString alinkColor; - [TreatNullAs=NullString, CustomElementCallbacks=Enable] attribute DOMString linkColor; - [TreatNullAs=NullString, CustomElementCallbacks=Enable] attribute DOMString vlinkColor; + [TreatNullAs=NullString, CustomElementCallbacks] attribute DOMString bgColor; + [TreatNullAs=NullString, CustomElementCallbacks] attribute DOMString fgColor; + [TreatNullAs=NullString, CustomElementCallbacks] attribute DOMString alinkColor; + [TreatNullAs=NullString, CustomElementCallbacks] attribute DOMString linkColor; + [TreatNullAs=NullString, CustomElementCallbacks] attribute DOMString vlinkColor; };
diff --git a/core/html/HTMLElement.idl b/core/html/HTMLElement.idl index d65a413..c5640d5 100644 --- a/core/html/HTMLElement.idl +++ b/core/html/HTMLElement.idl
@@ -21,33 +21,31 @@ [ CustomToV8 ] interface HTMLElement : Element { - [Reflect] attribute DOMString title; - [Reflect] attribute DOMString lang; - attribute boolean translate; - [Reflect] attribute DOMString dir; + [Reflect, TreatNullAs=NullString] attribute DOMString title; + [Reflect, TreatNullAs=NullString] attribute DOMString lang; + attribute boolean translate; + [Reflect, TreatNullAs=NullString] attribute DOMString dir; - [CustomElementCallbacks=Enable] attribute long tabIndex; - [CustomElementCallbacks=Enable] attribute boolean draggable; - [Reflect] attribute DOMString webkitdropzone; - [Reflect] attribute boolean hidden; - [Reflect] attribute DOMString accessKey; + [CustomElementCallbacks] attribute long tabIndex; + [CustomElementCallbacks] attribute boolean draggable; + [Reflect, TreatNullAs=NullString] attribute DOMString webkitdropzone; + [Reflect] attribute boolean hidden; + [Reflect, TreatNullAs=NullString] attribute DOMString accessKey; // Extensions - [TreatNullAs=NullString, CustomElementCallbacks=Enable, PerWorldBindings, ActivityLog=SetterForIsolatedWorlds, SetterRaisesException] attribute DOMString innerHTML; - [TreatNullAs=NullString, CustomElementCallbacks=Enable, SetterRaisesException] attribute DOMString innerText; - [TreatNullAs=NullString, CustomElementCallbacks=Enable, SetterRaisesException] attribute DOMString outerHTML; - [TreatNullAs=NullString, CustomElementCallbacks=Enable, SetterRaisesException] attribute DOMString outerText; + [TreatNullAs=NullString, CustomElementCallbacks, SetterRaisesException] attribute DOMString innerText; + [TreatNullAs=NullString, CustomElementCallbacks, SetterRaisesException] attribute DOMString outerText; - [RaisesException, CustomElementCallbacks=Enable, MeasureAs=InsertAdjacentElement] Element insertAdjacentElement([Default=Undefined] optional DOMString where, + [RaisesException, CustomElementCallbacks, MeasureAs=InsertAdjacentElement] Element insertAdjacentElement([Default=Undefined] optional DOMString where, [Default=Undefined] optional Element element); - [CustomElementCallbacks=Enable, RaisesException] void insertAdjacentHTML([Default=Undefined] optional DOMString where, + [CustomElementCallbacks, RaisesException] void insertAdjacentHTML([Default=Undefined] optional DOMString where, [Default=Undefined] optional DOMString html); [RaisesException, MeasureAs=InsertAdjacentText] void insertAdjacentText([Default=Undefined] optional DOMString where, [Default=Undefined] optional DOMString text); - [EnabledAtRuntime=IMEAPI] readonly attribute InputMethodContext inputMethodContext; + [RuntimeEnabled=IMEAPI] readonly attribute InputMethodContext inputMethodContext; - [TreatNullAs=NullString, CustomElementCallbacks=Enable, SetterRaisesException] attribute DOMString contentEditable; + [TreatNullAs=NullString, CustomElementCallbacks, SetterRaisesException] attribute DOMString contentEditable; readonly attribute boolean isContentEditable; attribute boolean spellcheck; @@ -55,3 +53,4 @@ void click(); }; +HTMLElement implements GlobalEventHandlers;
diff --git a/core/html/HTMLEmbedElement.idl b/core/html/HTMLEmbedElement.idl index 98dc854..163ce7d 100644 --- a/core/html/HTMLEmbedElement.idl +++ b/core/html/HTMLEmbedElement.idl
@@ -21,12 +21,12 @@ [ CustomLegacyCall, ] interface HTMLEmbedElement : HTMLElement { -[Reflect] attribute DOMString align; -[Reflect] attribute DOMString height; -[Reflect] attribute DOMString name; -[Reflect, URL] attribute DOMString src; -[Reflect] attribute DOMString type; -[Reflect] attribute DOMString width; +[Reflect, TreatNullAs=NullString] attribute DOMString align; +[Reflect, TreatNullAs=NullString] attribute DOMString height; +[Reflect, TreatNullAs=NullString] attribute DOMString name; +[Reflect, TreatNullAs=NullString, URL, PerWorldBindings, ActivityLogging=SetterForIsolatedWorlds] attribute DOMString src; +[Reflect, TreatNullAs=NullString] attribute DOMString type; +[Reflect, TreatNullAs=NullString] attribute DOMString width; [Custom, NotEnumerable] getter boolean (unsigned long index); [Custom] setter boolean (unsigned long index, Node value); [Custom, NotEnumerable] getter Node (DOMString name);
diff --git a/core/html/HTMLFieldSetElement.idl b/core/html/HTMLFieldSetElement.idl index 4e77da9..4fc3409 100644 --- a/core/html/HTMLFieldSetElement.idl +++ b/core/html/HTMLFieldSetElement.idl
@@ -20,7 +20,7 @@ interface HTMLFieldSetElement : HTMLElement { [Reflect] attribute boolean disabled; readonly attribute HTMLFormElement form; - [Reflect] attribute DOMString name; + [Reflect, TreatNullAs=NullString] attribute DOMString name; readonly attribute DOMString type;
diff --git a/core/html/HTMLFontElement.idl b/core/html/HTMLFontElement.idl index d2da3a9..cdfd429 100644 --- a/core/html/HTMLFontElement.idl +++ b/core/html/HTMLFontElement.idl
@@ -18,8 +18,8 @@ */ interface HTMLFontElement : HTMLElement { - [Reflect] attribute DOMString color; - [Reflect] attribute DOMString face; - [Reflect] attribute DOMString size; + [Reflect, TreatNullAs=NullString] attribute DOMString color; + [Reflect, TreatNullAs=NullString] attribute DOMString face; + [Reflect, TreatNullAs=NullString] attribute DOMString size; };
diff --git a/core/html/HTMLFormElement.idl b/core/html/HTMLFormElement.idl index f1bcb0e..29a319e 100644 --- a/core/html/HTMLFormElement.idl +++ b/core/html/HTMLFormElement.idl
@@ -19,26 +19,26 @@ */ interface HTMLFormElement : HTMLElement { - [Reflect=accept_charset] attribute DOMString acceptCharset; - [Reflect, URL] attribute DOMString action; - [Reflect] attribute DOMString autocomplete; - [TreatNullAs=NullString, CustomElementCallbacks=Enable] attribute DOMString enctype; - [TreatNullAs=NullString, CustomElementCallbacks=Enable] attribute DOMString encoding; - [TreatNullAs=NullString, CustomElementCallbacks=Enable] attribute DOMString method; - [Reflect] attribute DOMString name; + [Reflect=accept_charset, TreatNullAs=NullString] attribute DOMString acceptCharset; + [Reflect, TreatNullAs=NullString, URL, PerWorldBindings, ActivityLogging=SetterForIsolatedWorlds] attribute DOMString action; + [Reflect, TreatNullAs=NullString] attribute DOMString autocomplete; + [TreatNullAs=NullString, CustomElementCallbacks] attribute DOMString enctype; + [TreatNullAs=NullString, CustomElementCallbacks] attribute DOMString encoding; + [TreatNullAs=NullString, CustomElementCallbacks] attribute DOMString method; + [Reflect, TreatNullAs=NullString] attribute DOMString name; [Reflect] attribute boolean noValidate; - [Reflect] attribute DOMString target; + [Reflect, TreatNullAs=NullString] attribute DOMString target; readonly attribute HTMLCollection elements; readonly attribute long length; [ImplementedAs=item] getter Node(unsigned long index); [ImplementedAs=anonymousNamedGetter, OverrideBuiltins, NotEnumerable] getter (NodeList or Node)(DOMString name); - [ImplementedAs=submitFromJavaScript] void submit(); - [CustomElementCallbacks=Enable] void reset(); + [ImplementedAs=submitFromJavaScript, PerWorldBindings, ActivityLogging=SetterForIsolatedWorlds] void submit(); + [CustomElementCallbacks] void reset(); boolean checkValidity(); - [EnabledAtRuntime=RequestAutocomplete] void requestAutocomplete(); - [EnabledAtRuntime=RequestAutocomplete, NotEnumerable] attribute EventHandler onautocomplete; - [EnabledAtRuntime=RequestAutocomplete, NotEnumerable] attribute EventHandler onautocompleteerror; + [RuntimeEnabled=RequestAutocomplete] void requestAutocomplete(); + [RuntimeEnabled=RequestAutocomplete] attribute EventHandler onautocomplete; + [RuntimeEnabled=RequestAutocomplete] attribute EventHandler onautocompleteerror; };
diff --git a/core/html/HTMLFrameElement.idl b/core/html/HTMLFrameElement.idl index c702fd6..ff93b07 100644 --- a/core/html/HTMLFrameElement.idl +++ b/core/html/HTMLFrameElement.idl
@@ -20,14 +20,14 @@ interface HTMLFrameElement : HTMLElement { - [Reflect] attribute DOMString frameBorder; - [Reflect] attribute DOMString longDesc; - [Reflect] attribute DOMString marginHeight; - [Reflect] attribute DOMString marginWidth; - [Reflect] attribute DOMString name; + [Reflect, TreatNullAs=NullString] attribute DOMString frameBorder; + [Reflect, TreatNullAs=NullString] attribute DOMString longDesc; + [Reflect, TreatNullAs=NullString] attribute DOMString marginHeight; + [Reflect, TreatNullAs=NullString] attribute DOMString marginWidth; + [Reflect, TreatNullAs=NullString] attribute DOMString name; [Reflect] attribute boolean noResize; - [Reflect] attribute DOMString scrolling; - [Reflect, URL] attribute DOMString src; + [Reflect, TreatNullAs=NullString] attribute DOMString scrolling; + [Reflect, TreatNullAs=NullString, URL, PerWorldBindings, ActivityLogging=SetterForIsolatedWorlds] attribute DOMString src; // Introduced in DOM Level 2: [CheckSecurityForNode] readonly attribute Document contentDocument;
diff --git a/core/html/HTMLFrameSetElement.idl b/core/html/HTMLFrameSetElement.idl index 0a35684..b1ec56f 100644 --- a/core/html/HTMLFrameSetElement.idl +++ b/core/html/HTMLFrameSetElement.idl
@@ -20,32 +20,17 @@ interface HTMLFrameSetElement : HTMLElement { [ImplementedAs=anonymousNamedGetter, OverrideBuiltins, NotEnumerable] getter Window (DOMString name); - [Reflect] attribute DOMString cols; - [Reflect] attribute DOMString rows; + [Reflect, TreatNullAs=NullString] attribute DOMString cols; + [Reflect, TreatNullAs=NullString] attribute DOMString rows; - // Event handler attributes - [NotEnumerable] attribute EventHandler onbeforeunload; - [NotEnumerable] attribute EventHandler onhashchange; - [NotEnumerable] attribute EventHandler onmessage; - [NotEnumerable] attribute EventHandler onoffline; - [NotEnumerable] attribute EventHandler ononline; - [NotEnumerable] attribute EventHandler onpopstate; - [NotEnumerable] attribute EventHandler onresize; - [NotEnumerable] attribute EventHandler onstorage; - [NotEnumerable] attribute EventHandler onunload; + [Conditional=ORIENTATION_EVENTS] attribute EventHandler onorientationchange; - [Conditional=ORIENTATION_EVENTS, NotEnumerable] attribute EventHandler onorientationchange; - - // Overrides of Element attributes (with different implementation in bindings). - [NotEnumerable] attribute EventHandler onblur; - [NotEnumerable] attribute EventHandler onerror; - [NotEnumerable] attribute EventHandler onfocus; - [NotEnumerable] attribute EventHandler onload; - - // Not implemented yet. - // attribute [NotEnumerable] EventHandler onafterprint; - // attribute [NotEnumerable] EventHandler onbeforeprint; - // attribute [NotEnumerable] EventHandler onredo; - // attribute [NotEnumerable] EventHandler onundo; + // Overrides of GlobalEventHandler attributes + attribute EventHandler onblur; + attribute EventHandler onerror; + attribute EventHandler onfocus; + attribute EventHandler onload; + attribute EventHandler onscroll; }; +HTMLFrameSetElement implements WindowEventHandlers;
diff --git a/core/html/HTMLHRElement.idl b/core/html/HTMLHRElement.idl index babe467..302f7e9 100644 --- a/core/html/HTMLHRElement.idl +++ b/core/html/HTMLHRElement.idl
@@ -18,9 +18,9 @@ */ interface HTMLHRElement : HTMLElement { - [Reflect] attribute DOMString align; + [Reflect, TreatNullAs=NullString] attribute DOMString align; [Reflect] attribute boolean noShade; - [Reflect] attribute DOMString size; - [Reflect] attribute DOMString width; + [Reflect, TreatNullAs=NullString] attribute DOMString size; + [Reflect, TreatNullAs=NullString] attribute DOMString width; };
diff --git a/core/html/HTMLHeadElement.idl b/core/html/HTMLHeadElement.idl index 6a784bd..5d17741 100644 --- a/core/html/HTMLHeadElement.idl +++ b/core/html/HTMLHeadElement.idl
@@ -18,6 +18,6 @@ */ interface HTMLHeadElement : HTMLElement { - [Reflect] attribute DOMString profile; + [Reflect, TreatNullAs=NullString] attribute DOMString profile; };
diff --git a/core/html/HTMLHeadingElement.idl b/core/html/HTMLHeadingElement.idl index 288f439..e339d6e 100644 --- a/core/html/HTMLHeadingElement.idl +++ b/core/html/HTMLHeadingElement.idl
@@ -18,6 +18,6 @@ */ interface HTMLHeadingElement : HTMLElement { - [Reflect] attribute DOMString align; + [Reflect, TreatNullAs=NullString] attribute DOMString align; };
diff --git a/core/html/HTMLHtmlElement.idl b/core/html/HTMLHtmlElement.idl index 430cdc6..294ad79 100644 --- a/core/html/HTMLHtmlElement.idl +++ b/core/html/HTMLHtmlElement.idl
@@ -18,7 +18,7 @@ */ interface HTMLHtmlElement : HTMLElement { - [Reflect] attribute DOMString version; - [Reflect, URL] attribute DOMString manifest; + [Reflect, TreatNullAs=NullString] attribute DOMString version; + [Reflect, TreatNullAs=NullString, URL, PerWorldBindings, ActivityLogging=SetterForIsolatedWorlds] attribute DOMString manifest; };
diff --git a/core/html/HTMLIFrameElement.idl b/core/html/HTMLIFrameElement.idl index d47b1b7..9fcf3a9 100644 --- a/core/html/HTMLIFrameElement.idl +++ b/core/html/HTMLIFrameElement.idl
@@ -19,19 +19,19 @@ */ interface HTMLIFrameElement : HTMLElement { - [Reflect] attribute DOMString align; - [Reflect] attribute DOMString frameBorder; - [Reflect] attribute DOMString height; - [Reflect] attribute DOMString longDesc; - [Reflect] attribute DOMString marginHeight; - [Reflect] attribute DOMString marginWidth; - [Reflect] attribute DOMString name; - [Reflect] attribute DOMString sandbox; - [Reflect, EnabledAtRuntime=SeamlessIFrames] attribute boolean seamless; - [Reflect] attribute DOMString scrolling; - [Reflect, URL] attribute DOMString src; - [Reflect] attribute DOMString srcdoc; - [Reflect] attribute DOMString width; + [Reflect, TreatNullAs=NullString] attribute DOMString align; + [Reflect, TreatNullAs=NullString] attribute DOMString frameBorder; + [Reflect, TreatNullAs=NullString] attribute DOMString height; + [Reflect, TreatNullAs=NullString] attribute DOMString longDesc; + [Reflect, TreatNullAs=NullString] attribute DOMString marginHeight; + [Reflect, TreatNullAs=NullString] attribute DOMString marginWidth; + [Reflect, TreatNullAs=NullString] attribute DOMString name; + [Reflect, TreatNullAs=NullString] attribute DOMString sandbox; + [Reflect, RuntimeEnabled=SeamlessIFrames] attribute boolean seamless; + [Reflect, TreatNullAs=NullString] attribute DOMString scrolling; + [Reflect, TreatNullAs=NullString, URL, PerWorldBindings, ActivityLogging=SetterForIsolatedWorlds] attribute DOMString src; + [Reflect, TreatNullAs=NullString] attribute DOMString srcdoc; + [Reflect, TreatNullAs=NullString] attribute DOMString width; // Introduced in DOM Level 2: [CheckSecurityForNode] readonly attribute Document contentDocument;
diff --git a/core/html/HTMLImageElement.idl b/core/html/HTMLImageElement.idl index efd1c6a..1ef0e50 100644 --- a/core/html/HTMLImageElement.idl +++ b/core/html/HTMLImageElement.idl
@@ -18,29 +18,32 @@ * Boston, MA 02110-1301, USA. */ +// FIXME: NamedConstructor does not support optional without Default. Fortunately using Undefined makes +// us use 0 which happens to be the default width and height anyway. [ + // FIXME(MERGE_DARTIUM): Breaks Dart code gen for Chrome 32 / 1700 roll. + // NamedConstructor=Image([Default=Undefined] optional long width, [Default=Undefined] optional long height) ] interface HTMLImageElement : HTMLElement { - [Reflect] attribute DOMString name; - [Reflect] attribute DOMString align; - [Reflect] attribute DOMString alt; - [Reflect] attribute DOMString border; - [Reflect] attribute DOMString crossOrigin; + [Reflect, TreatNullAs=NullString] attribute DOMString name; + [Reflect, TreatNullAs=NullString] attribute DOMString align; + [Reflect, TreatNullAs=NullString] attribute DOMString alt; + [Reflect, TreatNullAs=NullString] attribute DOMString border; + [Reflect, TreatNullAs=NullString] attribute DOMString crossOrigin; attribute long height; [Reflect] attribute long hspace; [Reflect] attribute boolean isMap; - [Reflect, URL] attribute DOMString longDesc; - [Reflect, URL] attribute DOMString src; - [Reflect, EnabledAtRuntime=Srcset] attribute DOMString srcset; - [Reflect] attribute DOMString useMap; + [Reflect, TreatNullAs=NullString, URL, PerWorldBindings, ActivityLogging=SetterForIsolatedWorlds] attribute DOMString longDesc; + [Reflect, TreatNullAs=NullString, URL, PerWorldBindings, ActivityLogging=SetterForIsolatedWorlds] attribute DOMString src; + [Reflect, TreatNullAs=NullString, RuntimeEnabled=Srcset] attribute DOMString srcset; + [Reflect, TreatNullAs=NullString] attribute DOMString useMap; [Reflect] attribute long vspace; attribute long width; // Extensions readonly attribute boolean complete; - [Reflect,URL] attribute DOMString lowsrc; + [Reflect, TreatNullAs=NullString, URL, PerWorldBindings, ActivityLogging=SetterForIsolatedWorlds] attribute DOMString lowsrc; readonly attribute long naturalHeight; readonly attribute long naturalWidth; readonly attribute long x; readonly attribute long y; }; -
diff --git a/core/html/HTMLInputElement.idl b/core/html/HTMLInputElement.idl index fd6151d..9782e01 100644 --- a/core/html/HTMLInputElement.idl +++ b/core/html/HTMLInputElement.idl
@@ -21,50 +21,50 @@ [ ] interface HTMLInputElement : HTMLElement { - [Reflect] attribute DOMString accept; - [Reflect] attribute DOMString alt; - [Reflect] attribute DOMString autocomplete; + [Reflect, TreatNullAs=NullString] attribute DOMString accept; + [Reflect, TreatNullAs=NullString] attribute DOMString alt; + [Reflect, TreatNullAs=NullString] attribute DOMString autocomplete; [Reflect] attribute boolean autofocus; [Reflect=checked] attribute boolean defaultChecked; attribute boolean checked; - [Reflect] attribute DOMString dirName; + [Reflect, TreatNullAs=NullString] attribute DOMString dirName; [Reflect] attribute boolean disabled; readonly attribute HTMLFormElement form; // The 'files' attribute is intentionally not readonly. // https://www.w3.org/Bugs/Public/show_bug.cgi?id=22682 attribute FileList files; - [Reflect, URL] attribute DOMString formAction; - [TreatNullAs=NullString, CustomElementCallbacks=Enable] attribute DOMString formEnctype; - [TreatNullAs=NullString, CustomElementCallbacks=Enable] attribute DOMString formMethod; + [Reflect, TreatNullAs=NullString, URL, PerWorldBindings, ActivityLogging=SetterForIsolatedWorlds] attribute DOMString formAction; + [TreatNullAs=NullString, CustomElementCallbacks] attribute DOMString formEnctype; + [TreatNullAs=NullString, CustomElementCallbacks] attribute DOMString formMethod; [Reflect] attribute boolean formNoValidate; - [Reflect] attribute DOMString formTarget; - [CustomElementCallbacks=Enable] attribute unsigned long height; + [Reflect, TreatNullAs=NullString] attribute DOMString formTarget; + [CustomElementCallbacks] attribute unsigned long height; attribute boolean indeterminate; - [EnabledAtRuntime=DataListElement] readonly attribute HTMLElement list; - [Reflect] attribute DOMString max; - [SetterRaisesException, CustomElementCallbacks=Enable] attribute long maxLength; - [Reflect] attribute DOMString min; + [RuntimeEnabled=DataListElement] readonly attribute HTMLElement list; + [Reflect, TreatNullAs=NullString] attribute DOMString max; + [SetterRaisesException, CustomElementCallbacks] attribute long maxLength; + [Reflect, TreatNullAs=NullString] attribute DOMString min; [Reflect] attribute boolean multiple; - [Reflect] attribute DOMString name; - [Reflect] attribute DOMString pattern; - [Reflect] attribute DOMString placeholder; + [Reflect, TreatNullAs=NullString] attribute DOMString name; + [Reflect, TreatNullAs=NullString] attribute DOMString pattern; + [Reflect, TreatNullAs=NullString] attribute DOMString placeholder; [Reflect] attribute boolean readOnly; [Reflect] attribute boolean required; - [SetterRaisesException, CustomElementCallbacks=Enable] attribute unsigned long size; // Changed string -> long -> unsigned long - [Reflect, URL] attribute DOMString src; - [Reflect] attribute DOMString step; - [TreatNullAs=NullString, CustomElementCallbacks=Enable] attribute DOMString type; // readonly dropped as part of DOM level 2 - [TreatNullAs=NullString, CustomElementCallbacks=Enable] attribute DOMString defaultValue; + [SetterRaisesException, CustomElementCallbacks] attribute unsigned long size; // Changed string -> long -> unsigned long + [Reflect, TreatNullAs=NullString, URL, PerWorldBindings, ActivityLogging=SetterForIsolatedWorlds] attribute DOMString src; + [Reflect, TreatNullAs=NullString] attribute DOMString step; + [TreatNullAs=NullString, CustomElementCallbacks] attribute DOMString type; // readonly dropped as part of DOM level 2 + [TreatNullAs=NullString, CustomElementCallbacks] attribute DOMString defaultValue; // See the discussion in https://bugs.webkit.org/show_bug.cgi?id=100085 - [TreatNullAs=NullString, SetterRaisesException, CustomElementCallbacks=Enable] attribute DOMString value; - [SetterRaisesException, CustomElementCallbacks=Enable] attribute Date valueAsDate; - [SetterRaisesException, CustomElementCallbacks=Enable] attribute double valueAsNumber; - [EnabledAtRuntime=InputModeAttribute, Reflect] attribute DOMString inputMode; + [TreatNullAs=NullString, SetterRaisesException, CustomElementCallbacks] attribute DOMString value; + [SetterRaisesException, CustomElementCallbacks] attribute Date valueAsDate; + [SetterRaisesException, CustomElementCallbacks] attribute double valueAsNumber; + [RuntimeEnabled=InputModeAttribute, Reflect, TreatNullAs=NullString] attribute DOMString inputMode; - [RaisesException, CustomElementCallbacks=Enable] void stepUp(optional long n); - [RaisesException, CustomElementCallbacks=Enable] void stepDown(optional long n); + [RaisesException, CustomElementCallbacks] void stepUp(optional long n); + [RaisesException, CustomElementCallbacks] void stepDown(optional long n); - [CustomElementCallbacks=Enable] attribute unsigned long width; + [CustomElementCallbacks] attribute unsigned long width; readonly attribute boolean willValidate; readonly attribute ValidityState validity; readonly attribute DOMString validationMessage; @@ -90,13 +90,13 @@ optional DOMString direction); // Non-standard attributes - [Reflect] attribute DOMString align; - [Reflect, EnabledAtRuntime=DirectoryUpload] attribute boolean webkitdirectory; - [Reflect] attribute DOMString useMap; + [Reflect, TreatNullAs=NullString] attribute DOMString align; + [Reflect, RuntimeEnabled=DirectoryUpload] attribute boolean webkitdirectory; + [Reflect, TreatNullAs=NullString] attribute DOMString useMap; [Reflect] attribute boolean incremental; - [Conditional=INPUT_SPEECH, Reflect, EnabledAtRuntime=SpeechInput] attribute boolean webkitSpeech; - [Conditional=INPUT_SPEECH, Reflect, EnabledAtRuntime=SpeechInput] attribute boolean webkitGrammar; - [Conditional=INPUT_SPEECH, NotEnumerable] attribute EventHandler onwebkitspeechchange; + [Conditional=INPUT_SPEECH, Reflect, RuntimeEnabled=SpeechInput] attribute boolean webkitSpeech; + [Conditional=INPUT_SPEECH, Reflect, RuntimeEnabled=SpeechInput] attribute boolean webkitGrammar; + [Conditional=INPUT_SPEECH] attribute EventHandler onwebkitspeechchange; // See http://www.w3.org/TR/html-media-capture/ [Conditional=MEDIA_CAPTURE, Reflect] attribute boolean capture;
diff --git a/core/html/HTMLKeygenElement.idl b/core/html/HTMLKeygenElement.idl index c8361d8..b4d67df 100644 --- a/core/html/HTMLKeygenElement.idl +++ b/core/html/HTMLKeygenElement.idl
@@ -30,11 +30,11 @@ interface HTMLKeygenElement : HTMLElement { [Reflect] attribute boolean autofocus; - [Reflect] attribute DOMString challenge; + [Reflect, TreatNullAs=NullString] attribute DOMString challenge; [Reflect] attribute boolean disabled; readonly attribute HTMLFormElement form; - [Reflect] attribute DOMString keytype; - [Reflect] attribute DOMString name; + [Reflect, TreatNullAs=NullString] attribute DOMString keytype; + [Reflect, TreatNullAs=NullString] attribute DOMString name; readonly attribute DOMString type;
diff --git a/core/html/HTMLLIElement.idl b/core/html/HTMLLIElement.idl index f79f1cb..9d03749 100644 --- a/core/html/HTMLLIElement.idl +++ b/core/html/HTMLLIElement.idl
@@ -18,7 +18,7 @@ */ interface HTMLLIElement : HTMLElement { - [Reflect] attribute DOMString type; + [Reflect, TreatNullAs=NullString] attribute DOMString type; [Reflect] attribute long value; };
diff --git a/core/html/HTMLLabelElement.idl b/core/html/HTMLLabelElement.idl index fa37360..d249897 100644 --- a/core/html/HTMLLabelElement.idl +++ b/core/html/HTMLLabelElement.idl
@@ -20,7 +20,7 @@ interface HTMLLabelElement : HTMLElement { readonly attribute HTMLFormElement form; - [Reflect=for] attribute DOMString htmlFor; + [Reflect=for, TreatNullAs=NullString] attribute DOMString htmlFor; readonly attribute HTMLElement control; };
diff --git a/core/html/HTMLLegendElement.idl b/core/html/HTMLLegendElement.idl index e8e8871..0e89ec0 100644 --- a/core/html/HTMLLegendElement.idl +++ b/core/html/HTMLLegendElement.idl
@@ -20,6 +20,6 @@ interface HTMLLegendElement : HTMLElement { readonly attribute HTMLFormElement form; - [Reflect] attribute DOMString align; + [Reflect, TreatNullAs=NullString] attribute DOMString align; };
diff --git a/core/html/HTMLLinkElement.idl b/core/html/HTMLLinkElement.idl index 25e900a..6bcce34 100644 --- a/core/html/HTMLLinkElement.idl +++ b/core/html/HTMLLinkElement.idl
@@ -21,19 +21,19 @@ interface HTMLLinkElement : HTMLElement { [Reflect] attribute boolean disabled; - [Reflect] attribute DOMString charset; - [Reflect, URL] attribute DOMString href; - [Reflect] attribute DOMString hreflang; - [Reflect] attribute DOMString media; - [Reflect] attribute DOMString rel; - [Reflect] attribute DOMString rev; - [CustomSetter] attribute DOMSettableTokenList sizes; - [Reflect] attribute DOMString target; - [Reflect] attribute DOMString type; + [Reflect, TreatNullAs=NullString] attribute DOMString charset; + [Reflect, TreatNullAs=NullString, URL, PerWorldBindings, ActivityLogging=SetterForIsolatedWorlds] attribute DOMString href; + [Reflect, TreatNullAs=NullString] attribute DOMString hreflang; + [Reflect, TreatNullAs=NullString] attribute DOMString media; + [Reflect, TreatNullAs=NullString] attribute DOMString rel; + [Reflect, TreatNullAs=NullString] attribute DOMString rev; + [PutForwards=value] readonly attribute DOMSettableTokenList sizes; + [Reflect, TreatNullAs=NullString] attribute DOMString target; + [Reflect, TreatNullAs=NullString] attribute DOMString type; // DOM Level 2 Style readonly attribute StyleSheet sheet; - [EnabledAtRuntime=HTMLImports] readonly attribute Document import; + [RuntimeEnabled=HTMLImports] readonly attribute Document import; };
diff --git a/core/html/HTMLMapElement.idl b/core/html/HTMLMapElement.idl index 01dcae0..2eb6f29 100644 --- a/core/html/HTMLMapElement.idl +++ b/core/html/HTMLMapElement.idl
@@ -20,6 +20,6 @@ interface HTMLMapElement : HTMLElement { readonly attribute HTMLCollection areas; - [Reflect] attribute DOMString name; + [Reflect, TreatNullAs=NullString] attribute DOMString name; };
diff --git a/core/html/HTMLMarqueeElement.idl b/core/html/HTMLMarqueeElement.idl index b5bda0c..827da3e 100644 --- a/core/html/HTMLMarqueeElement.idl +++ b/core/html/HTMLMarqueeElement.idl
@@ -21,17 +21,17 @@ void start(); void stop(); - [Reflect] attribute DOMString behavior; - [Reflect] attribute DOMString bgColor; - [Reflect] attribute DOMString direction; - [Reflect] attribute DOMString height; + [Reflect, TreatNullAs=NullString] attribute DOMString behavior; + [Reflect, TreatNullAs=NullString] attribute DOMString bgColor; + [Reflect, TreatNullAs=NullString] attribute DOMString direction; + [Reflect, TreatNullAs=NullString] attribute DOMString height; [Reflect] attribute unsigned long hspace; [SetterRaisesException] attribute long loop; [SetterRaisesException] attribute long scrollAmount; [SetterRaisesException] attribute long scrollDelay; [Reflect] attribute boolean trueSpeed; [Reflect] attribute unsigned long vspace; - [Reflect] attribute DOMString width; + [Reflect, TreatNullAs=NullString] attribute DOMString width; // FIXME: Implement the following event handler attributes // https://bugs.webkit.org/show_bug.cgi?id=49788
diff --git a/core/html/HTMLMediaElement.idl b/core/html/HTMLMediaElement.idl index 873aeeb..a30598b 100644 --- a/core/html/HTMLMediaElement.idl +++ b/core/html/HTMLMediaElement.idl
@@ -24,84 +24,80 @@ */ [ - EnabledAtRuntime=Media, + RuntimeEnabled=Media, ActiveDOMObject ] interface HTMLMediaElement : HTMLElement { -// error state -readonly attribute MediaError error; + // error state + readonly attribute MediaError error; -// network state -[Reflect, URL] attribute DOMString src; -[URL] readonly attribute DOMString currentSrc; + // network state + [Reflect, URL, PerWorldBindings, ActivityLogging=SetterForIsolatedWorlds] attribute DOMString src; + [URL, PerWorldBindings, ActivityLogging=SetterForIsolatedWorlds] readonly attribute DOMString currentSrc; -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; -readonly attribute unsigned short networkState; -attribute DOMString preload; + 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; + readonly attribute unsigned short networkState; + attribute DOMString preload; -readonly attribute TimeRanges buffered; -void load(); + readonly attribute TimeRanges buffered; + void load(); DOMString canPlayType([Default=Undefined] optional DOMString type, [Default=Undefined, TreatNullAs=NullString, TreatUndefinedAs=NullString] optional DOMString keySystem); -// 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; + // 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 -[SetterRaisesException] attribute double currentTime; -readonly attribute double initialTime; -readonly attribute double startTime; -readonly attribute double duration; -readonly attribute boolean paused; -attribute double defaultPlaybackRate; -attribute double playbackRate; -readonly attribute TimeRanges played; -readonly attribute TimeRanges seekable; -readonly attribute boolean ended; -[Reflect] attribute boolean autoplay; -[Reflect] attribute boolean loop; -void play(); -void pause(); + // playback state + [SetterRaisesException] attribute double currentTime; + readonly attribute double duration; + readonly attribute boolean paused; + attribute double defaultPlaybackRate; + attribute double playbackRate; + readonly attribute TimeRanges played; + readonly attribute TimeRanges seekable; + readonly attribute boolean ended; + [Reflect] attribute boolean autoplay; + [Reflect] attribute boolean loop; + void play(); + void pause(); -// controls -attribute boolean controls; -[SetterRaisesException] attribute double volume; -attribute boolean muted; -[Reflect=muted] attribute boolean defaultMuted; + // media controller + [Reflect] attribute DOMString mediaGroup; + [CustomSetter] attribute MediaController controller; -// WebKit extensions -attribute boolean webkitPreservesPitch; + // controls + attribute boolean controls; + [SetterRaisesException] attribute double volume; + attribute boolean muted; + [Reflect=muted] attribute boolean defaultMuted; -readonly attribute boolean webkitHasClosedCaptions; -attribute boolean webkitClosedCaptionsVisible; + // tracks + [RuntimeEnabled=VideoTrack] readonly attribute TextTrackList textTracks; + [RuntimeEnabled=VideoTrack, RaisesException] TextTrack addTextTrack(DOMString kind, optional DOMString label, optional DOMString language); -// The number of bytes consumed by the media decoder. -readonly attribute unsigned long webkitAudioDecodedByteCount; -readonly attribute unsigned long webkitVideoDecodedByteCount; + // WebKit extensions -// FIXME: add DeprecateAs=PrefixedMediaGenerateKeyRequest when MediaKeys is ready. -[EnabledAtRuntime=LegacyEncryptedMedia, RaisesException] void webkitGenerateKeyRequest([TreatNullAs=NullString, TreatUndefinedAs=NullString] DOMString keySystem, optional Uint8Array initData); -[EnabledAtRuntime=LegacyEncryptedMedia, RaisesException] void webkitAddKey([TreatNullAs=NullString, TreatUndefinedAs=NullString] DOMString keySystem, Uint8Array key, optional Uint8Array initData, [Default=NullString] optional DOMString sessionId); -[EnabledAtRuntime=LegacyEncryptedMedia, RaisesException] void webkitCancelKeyRequest([TreatNullAs=NullString, TreatUndefinedAs=NullString] DOMString keySystem, [Default=NullString] optional DOMString sessionId); + // The number of bytes consumed by the media decoder. + [MeasureAs=PrefixedAudioDecodedByteCount] readonly attribute unsigned long webkitAudioDecodedByteCount; + [MeasureAs=PrefixedVideoDecodedByteCount] readonly attribute unsigned long webkitVideoDecodedByteCount; -[EnabledAtRuntime=LegacyEncryptedMedia] attribute EventHandler onwebkitkeyadded; -[EnabledAtRuntime=LegacyEncryptedMedia] attribute EventHandler onwebkitkeyerror; -[EnabledAtRuntime=LegacyEncryptedMedia] attribute EventHandler onwebkitkeymessage; -[EnabledAtRuntime=LegacyEncryptedMedia] attribute EventHandler onwebkitneedkey; + // FIXME: add DeprecateAs=PrefixedMediaGenerateKeyRequest when MediaKeys is ready. + [RuntimeEnabled=PrefixedEncryptedMedia, RaisesException] void webkitGenerateKeyRequest([TreatNullAs=NullString, TreatUndefinedAs=NullString] DOMString keySystem, optional Uint8Array initData); + [RuntimeEnabled=PrefixedEncryptedMedia, RaisesException] void webkitAddKey([TreatNullAs=NullString, TreatUndefinedAs=NullString] DOMString keySystem, Uint8Array key, optional Uint8Array initData, [Default=NullString] optional DOMString sessionId); + [RuntimeEnabled=PrefixedEncryptedMedia, RaisesException] void webkitCancelKeyRequest([TreatNullAs=NullString, TreatUndefinedAs=NullString] DOMString keySystem, [Default=NullString] optional DOMString sessionId); -[EnabledAtRuntime=EncryptedMedia, Conditional=ENCRYPTED_MEDIA_V2] attribute MediaKeys mediaKeys; + [RuntimeEnabled=PrefixedEncryptedMedia] attribute EventHandler onwebkitkeyadded; + [RuntimeEnabled=PrefixedEncryptedMedia] attribute EventHandler onwebkitkeyerror; + [RuntimeEnabled=PrefixedEncryptedMedia] attribute EventHandler onwebkitkeymessage; + [RuntimeEnabled=PrefixedEncryptedMedia] attribute EventHandler onwebkitneedkey; -[EnabledAtRuntime=VideoTrack, RaisesException] TextTrack addTextTrack(DOMString kind, optional DOMString label, optional DOMString language); -[EnabledAtRuntime=VideoTrack] readonly attribute TextTrackList textTracks; - -[Reflect, TreatNullAs=NullString] attribute DOMString mediaGroup; -[CustomSetter] attribute MediaController controller; + [RuntimeEnabled=EncryptedMedia, Conditional=ENCRYPTED_MEDIA_V2] attribute MediaKeys mediaKeys; };
diff --git a/core/html/HTMLMetaElement.idl b/core/html/HTMLMetaElement.idl index 4f7e9cd..8149993 100644 --- a/core/html/HTMLMetaElement.idl +++ b/core/html/HTMLMetaElement.idl
@@ -18,9 +18,9 @@ */ interface HTMLMetaElement : HTMLElement { - [Reflect] attribute DOMString content; - [Reflect=http_equiv] attribute DOMString httpEquiv; - [Reflect] attribute DOMString name; - [Reflect] attribute DOMString scheme; + [Reflect, TreatNullAs=NullString] attribute DOMString content; + [Reflect=http_equiv, TreatNullAs=NullString] attribute DOMString httpEquiv; + [Reflect, TreatNullAs=NullString] attribute DOMString name; + [Reflect, TreatNullAs=NullString] attribute DOMString scheme; };
diff --git a/core/html/HTMLModElement.idl b/core/html/HTMLModElement.idl index ccb8da4..e5866d3 100644 --- a/core/html/HTMLModElement.idl +++ b/core/html/HTMLModElement.idl
@@ -18,7 +18,7 @@ */ interface HTMLModElement : HTMLElement { - [Reflect, URL] attribute DOMString cite; - [Reflect] attribute DOMString dateTime; + [Reflect, TreatNullAs=NullString, URL, PerWorldBindings, ActivityLogging=SetterForIsolatedWorlds] attribute DOMString cite; + [Reflect, TreatNullAs=NullString] attribute DOMString dateTime; };
diff --git a/core/html/HTMLOListElement.idl b/core/html/HTMLOListElement.idl index 1e51615..0168f6d 100644 --- a/core/html/HTMLOListElement.idl +++ b/core/html/HTMLOListElement.idl
@@ -21,6 +21,6 @@ [Reflect] attribute boolean compact; attribute long start; [Reflect] attribute boolean reversed; - [Reflect] attribute DOMString type; + [Reflect, TreatNullAs=NullString] attribute DOMString type; };
diff --git a/core/html/HTMLObjectElement.idl b/core/html/HTMLObjectElement.idl index 8c33b24..02b1a80 100644 --- a/core/html/HTMLObjectElement.idl +++ b/core/html/HTMLObjectElement.idl
@@ -22,22 +22,22 @@ CustomLegacyCall ] interface HTMLObjectElement : HTMLElement { readonly attribute HTMLFormElement form; - [Reflect] attribute DOMString code; - [Reflect] attribute DOMString align; - [Reflect] attribute DOMString archive; - [Reflect] attribute DOMString border; - [Reflect] attribute DOMString codeBase; - [Reflect] attribute DOMString codeType; - [Reflect, URL] attribute DOMString data; + [Reflect, TreatNullAs=NullString] attribute DOMString code; + [Reflect, TreatNullAs=NullString] attribute DOMString align; + [Reflect, TreatNullAs=NullString] attribute DOMString archive; + [Reflect, TreatNullAs=NullString] attribute DOMString border; + [Reflect, TreatNullAs=NullString] attribute DOMString codeBase; + [Reflect, TreatNullAs=NullString] attribute DOMString codeType; + [Reflect, TreatNullAs=NullString, URL, PerWorldBindings, ActivityLogging=SetterForIsolatedWorlds] attribute DOMString data; [Reflect] attribute boolean declare; - [Reflect] attribute DOMString height; + [Reflect, TreatNullAs=NullString] attribute DOMString height; [Reflect] attribute long hspace; - [Reflect] attribute DOMString name; - [Reflect] attribute DOMString standby; - [Reflect] attribute DOMString type; - [Reflect] attribute DOMString useMap; + [Reflect, TreatNullAs=NullString] attribute DOMString name; + [Reflect, TreatNullAs=NullString] attribute DOMString standby; + [Reflect, TreatNullAs=NullString] attribute DOMString type; + [Reflect, TreatNullAs=NullString] attribute DOMString useMap; [Reflect] attribute long vspace; - [Reflect] attribute DOMString width; + [Reflect, TreatNullAs=NullString] attribute DOMString width; readonly attribute boolean willValidate; readonly attribute ValidityState validity; readonly attribute DOMString validationMessage;
diff --git a/core/html/HTMLOptGroupElement.idl b/core/html/HTMLOptGroupElement.idl index 26a782f..d95f738 100644 --- a/core/html/HTMLOptGroupElement.idl +++ b/core/html/HTMLOptGroupElement.idl
@@ -19,6 +19,6 @@ interface HTMLOptGroupElement : HTMLElement { [Reflect] attribute boolean disabled; - [Reflect] attribute DOMString label; + [Reflect, TreatNullAs=NullString] attribute DOMString label; };
diff --git a/core/html/HTMLOutputElement.idl b/core/html/HTMLOutputElement.idl index 7edaca2..caebd48 100644 --- a/core/html/HTMLOutputElement.idl +++ b/core/html/HTMLOutputElement.idl
@@ -23,9 +23,9 @@ */ interface HTMLOutputElement : HTMLElement { - readonly attribute DOMSettableTokenList htmlFor; + [PutForwards=value] readonly attribute DOMSettableTokenList htmlFor; readonly attribute HTMLFormElement form; - [Reflect] attribute DOMString name; + [Reflect, TreatNullAs=NullString] attribute DOMString name; readonly attribute DOMString type; [TreatNullAs=NullString] attribute DOMString defaultValue;
diff --git a/core/html/HTMLParagraphElement.idl b/core/html/HTMLParagraphElement.idl index e6bd9e8..55787c3 100644 --- a/core/html/HTMLParagraphElement.idl +++ b/core/html/HTMLParagraphElement.idl
@@ -18,6 +18,6 @@ */ interface HTMLParagraphElement : HTMLElement { - [Reflect] attribute DOMString align; + [Reflect, TreatNullAs=NullString] attribute DOMString align; };
diff --git a/core/html/HTMLParamElement.idl b/core/html/HTMLParamElement.idl index fea2594..2de4b20 100644 --- a/core/html/HTMLParamElement.idl +++ b/core/html/HTMLParamElement.idl
@@ -18,9 +18,9 @@ */ interface HTMLParamElement : HTMLElement { - [Reflect] attribute DOMString name; - [Reflect] attribute DOMString type; - [Reflect] attribute DOMString value; - [Reflect] attribute DOMString valueType; + [Reflect, TreatNullAs=NullString] attribute DOMString name; + [Reflect, TreatNullAs=NullString] attribute DOMString type; + [Reflect, TreatNullAs=NullString] attribute DOMString value; + [Reflect, TreatNullAs=NullString] attribute DOMString valueType; };
diff --git a/core/html/HTMLQuoteElement.idl b/core/html/HTMLQuoteElement.idl index c53a1a2..464fd0a 100644 --- a/core/html/HTMLQuoteElement.idl +++ b/core/html/HTMLQuoteElement.idl
@@ -18,5 +18,5 @@ */ interface HTMLQuoteElement : HTMLElement { - [Reflect, URL] attribute DOMString cite; + [Reflect, TreatNullAs=NullString, URL, PerWorldBindings, ActivityLogging=SetterForIsolatedWorlds] attribute DOMString cite; };
diff --git a/core/html/HTMLScriptElement.idl b/core/html/HTMLScriptElement.idl index ef68a4d..ea4275d 100644 --- a/core/html/HTMLScriptElement.idl +++ b/core/html/HTMLScriptElement.idl
@@ -19,13 +19,13 @@ interface HTMLScriptElement : HTMLElement { [TreatNullAs=NullString] attribute DOMString text; - [Reflect=for] attribute DOMString htmlFor; - [Reflect] attribute DOMString event; - [Reflect] attribute DOMString charset; + [Reflect=for, TreatNullAs=NullString] attribute DOMString htmlFor; + [Reflect, TreatNullAs=NullString] attribute DOMString event; + [Reflect, TreatNullAs=NullString] attribute DOMString charset; attribute boolean async; [Reflect] attribute boolean defer; - [Reflect, URL] attribute DOMString src; - [Reflect] attribute DOMString type; - [Reflect] attribute DOMString crossOrigin; - [Reflect, EnabledAtRuntime=ExperimentalContentSecurityPolicyFeatures] attribute DOMString nonce; + [Reflect, TreatNullAs=NullString, URL, PerWorldBindings, ActivityLogging=SetterForIsolatedWorlds] attribute DOMString src; + [Reflect, TreatNullAs=NullString] attribute DOMString type; + [Reflect, TreatNullAs=NullString] attribute DOMString crossOrigin; + [Reflect, TreatNullAs=NullString, RuntimeEnabled=ExperimentalContentSecurityPolicyFeatures] attribute DOMString nonce; };
diff --git a/core/html/HTMLSelectElement.idl b/core/html/HTMLSelectElement.idl index 8c92af5..477af63 100644 --- a/core/html/HTMLSelectElement.idl +++ b/core/html/HTMLSelectElement.idl
@@ -24,7 +24,7 @@ [Reflect] attribute boolean disabled; readonly attribute HTMLFormElement form; attribute boolean multiple; - [Reflect] attribute DOMString name; + [Reflect, TreatNullAs=NullString] attribute DOMString name; [Reflect] attribute boolean required; attribute long size;
diff --git a/core/html/HTMLSourceElement.idl b/core/html/HTMLSourceElement.idl index 5adb052..4e10349 100644 --- a/core/html/HTMLSourceElement.idl +++ b/core/html/HTMLSourceElement.idl
@@ -24,9 +24,9 @@ */ [ - EnabledAtRuntime=Media + RuntimeEnabled=Media ] interface HTMLSourceElement : HTMLElement { -[Reflect, URL] attribute DOMString src; + [Reflect, URL, PerWorldBindings, ActivityLogging=SetterForIsolatedWorlds] attribute DOMString src; attribute DOMString type; attribute DOMString media; };
diff --git a/core/html/HTMLStyleElement.idl b/core/html/HTMLStyleElement.idl index a5fd4f3..55d12f2 100644 --- a/core/html/HTMLStyleElement.idl +++ b/core/html/HTMLStyleElement.idl
@@ -20,9 +20,9 @@ interface HTMLStyleElement : HTMLElement { attribute boolean disabled; - [EnabledAtRuntime=StyleScoped] attribute boolean scoped; - [Reflect] attribute DOMString media; - [Reflect] attribute DOMString type; + [RuntimeEnabled=StyleScoped] attribute boolean scoped; + [Reflect, TreatNullAs=NullString] attribute DOMString media; + [Reflect, TreatNullAs=NullString] attribute DOMString type; // DOM Level 2 Style readonly attribute StyleSheet sheet;
diff --git a/core/html/HTMLTableCaptionElement.idl b/core/html/HTMLTableCaptionElement.idl index e29f097..b7b55d7 100644 --- a/core/html/HTMLTableCaptionElement.idl +++ b/core/html/HTMLTableCaptionElement.idl
@@ -19,6 +19,6 @@ */ interface HTMLTableCaptionElement : HTMLElement { - [Reflect] attribute DOMString align; + [Reflect, TreatNullAs=NullString] attribute DOMString align; };
diff --git a/core/html/HTMLTableCellElement.idl b/core/html/HTMLTableCellElement.idl index 3b949f3..a52f05c 100644 --- a/core/html/HTMLTableCellElement.idl +++ b/core/html/HTMLTableCellElement.idl
@@ -20,19 +20,19 @@ interface HTMLTableCellElement : HTMLElement { readonly attribute long cellIndex; - [Reflect] attribute DOMString abbr; - [Reflect] attribute DOMString align; - [Reflect] attribute DOMString axis; - [Reflect] attribute DOMString bgColor; - [Reflect=char] attribute DOMString ch; - [Reflect=charoff] attribute DOMString chOff; + [Reflect, TreatNullAs=NullString] attribute DOMString abbr; + [Reflect, TreatNullAs=NullString] attribute DOMString align; + [Reflect, TreatNullAs=NullString] attribute DOMString axis; + [Reflect, TreatNullAs=NullString] attribute DOMString bgColor; + [Reflect=char, TreatNullAs=NullString] attribute DOMString ch; + [Reflect=charoff, TreatNullAs=NullString] attribute DOMString chOff; attribute long colSpan; - [Reflect] attribute DOMString headers; - [Reflect] attribute DOMString height; + [Reflect, TreatNullAs=NullString] attribute DOMString headers; + [Reflect, TreatNullAs=NullString] attribute DOMString height; [Reflect] attribute boolean noWrap; attribute long rowSpan; - [Reflect] attribute DOMString scope; - [Reflect] attribute DOMString vAlign; - [Reflect] attribute DOMString width; + [Reflect, TreatNullAs=NullString] attribute DOMString scope; + [Reflect, TreatNullAs=NullString] attribute DOMString vAlign; + [Reflect, TreatNullAs=NullString] attribute DOMString width; };
diff --git a/core/html/HTMLTableColElement.idl b/core/html/HTMLTableColElement.idl index 725e05d..748711f 100644 --- a/core/html/HTMLTableColElement.idl +++ b/core/html/HTMLTableColElement.idl
@@ -19,11 +19,11 @@ */ interface HTMLTableColElement : HTMLElement { - [Reflect] attribute DOMString align; - [Reflect=char] attribute DOMString ch; - [Reflect=charoff] attribute DOMString chOff; + [Reflect, TreatNullAs=NullString] attribute DOMString align; + [Reflect=char, TreatNullAs=NullString] attribute DOMString ch; + [Reflect=charoff, TreatNullAs=NullString] attribute DOMString chOff; attribute long span; - [Reflect] attribute DOMString vAlign; - [Reflect] attribute DOMString width; + [Reflect, TreatNullAs=NullString] attribute DOMString vAlign; + [Reflect, TreatNullAs=NullString] attribute DOMString width; };
diff --git a/core/html/HTMLTableElement.idl b/core/html/HTMLTableElement.idl index 1881de3..cd247d6 100644 --- a/core/html/HTMLTableElement.idl +++ b/core/html/HTMLTableElement.idl
@@ -25,17 +25,17 @@ readonly attribute HTMLCollection rows; readonly attribute HTMLCollection tBodies; - [Reflect] attribute DOMString align; - [Reflect] attribute DOMString bgColor; - [Reflect] attribute DOMString border; - [Reflect] attribute DOMString cellPadding; - [Reflect] attribute DOMString cellSpacing; + [Reflect, TreatNullAs=NullString] attribute DOMString align; + [Reflect, TreatNullAs=NullString] attribute DOMString bgColor; + [Reflect, TreatNullAs=NullString] attribute DOMString border; + [Reflect, TreatNullAs=NullString] attribute DOMString cellPadding; + [Reflect, TreatNullAs=NullString] attribute DOMString cellSpacing; - [Reflect] attribute DOMString frame; + [Reflect, TreatNullAs=NullString] attribute DOMString frame; - [Reflect] attribute DOMString rules; - [Reflect] attribute DOMString summary; - [Reflect] attribute DOMString width; + [Reflect, TreatNullAs=NullString] attribute DOMString rules; + [Reflect, TreatNullAs=NullString] attribute DOMString summary; + [Reflect, TreatNullAs=NullString] attribute DOMString width; HTMLElement createTHead(); void deleteTHead();
diff --git a/core/html/HTMLTableRowElement.idl b/core/html/HTMLTableRowElement.idl index a56f70a..1b2d27d 100644 --- a/core/html/HTMLTableRowElement.idl +++ b/core/html/HTMLTableRowElement.idl
@@ -22,11 +22,11 @@ readonly attribute long rowIndex; readonly attribute long sectionRowIndex; readonly attribute HTMLCollection cells; - [Reflect] attribute DOMString align; - [Reflect] attribute DOMString bgColor; - [Reflect=char] attribute DOMString ch; - [Reflect=charoff] attribute DOMString chOff; - [Reflect] attribute DOMString vAlign; + [Reflect, TreatNullAs=NullString] attribute DOMString align; + [Reflect, TreatNullAs=NullString] attribute DOMString bgColor; + [Reflect=char, TreatNullAs=NullString] attribute DOMString ch; + [Reflect=charoff, TreatNullAs=NullString] attribute DOMString chOff; + [Reflect, TreatNullAs=NullString] attribute DOMString vAlign; [RaisesException] HTMLElement insertCell([Default=Undefined] optional long index); [RaisesException] void deleteCell([Default=Undefined] optional long index); };
diff --git a/core/html/HTMLTableSectionElement.idl b/core/html/HTMLTableSectionElement.idl index 3126d77..c46e724 100644 --- a/core/html/HTMLTableSectionElement.idl +++ b/core/html/HTMLTableSectionElement.idl
@@ -19,10 +19,10 @@ */ interface HTMLTableSectionElement : HTMLElement { - [Reflect] attribute DOMString align; - [Reflect=char] attribute DOMString ch; - [Reflect=charoff] attribute DOMString chOff; - [Reflect] attribute DOMString vAlign; + [Reflect, TreatNullAs=NullString] attribute DOMString align; + [Reflect=char, TreatNullAs=NullString] attribute DOMString ch; + [Reflect=charoff, TreatNullAs=NullString] attribute DOMString chOff; + [Reflect, TreatNullAs=NullString] attribute DOMString vAlign; readonly attribute HTMLCollection rows; [RaisesException] HTMLElement insertRow([Default=Undefined] optional long index); [RaisesException] void deleteRow([Default=Undefined] optional long index);
diff --git a/core/html/HTMLTextAreaElement.idl b/core/html/HTMLTextAreaElement.idl index 51c8419..fc3b1ff 100644 --- a/core/html/HTMLTextAreaElement.idl +++ b/core/html/HTMLTextAreaElement.idl
@@ -22,17 +22,17 @@ interface HTMLTextAreaElement : HTMLElement { [Reflect] attribute boolean autofocus; attribute long cols; - [Reflect] attribute DOMString dirName; + [Reflect, TreatNullAs=NullString] attribute DOMString dirName; [Reflect] attribute boolean disabled; readonly attribute HTMLFormElement form; [SetterRaisesException] attribute long maxLength; - [Reflect] attribute DOMString name; - [Reflect] attribute DOMString placeholder; + [Reflect, TreatNullAs=NullString] attribute DOMString name; + [Reflect, TreatNullAs=NullString] attribute DOMString placeholder; [Reflect] attribute boolean readOnly; [Reflect] attribute boolean required; attribute long rows; - [Reflect] attribute DOMString wrap; - [EnabledAtRuntime=InputModeAttribute, Reflect] attribute DOMString inputMode; + [Reflect, TreatNullAs=NullString] attribute DOMString wrap; + [RuntimeEnabled=InputModeAttribute, Reflect, TreatNullAs=NullString] attribute DOMString inputMode; readonly attribute DOMString type; [TreatNullAs=NullString] attribute DOMString defaultValue;
diff --git a/core/html/HTMLTrackElement.idl b/core/html/HTMLTrackElement.idl index 9c4e1bf..4127db6 100644 --- a/core/html/HTMLTrackElement.idl +++ b/core/html/HTMLTrackElement.idl
@@ -24,10 +24,10 @@ */ [ - EnabledAtRuntime=VideoTrack + RuntimeEnabled=VideoTrack ] interface HTMLTrackElement : HTMLElement { attribute DOMString kind; - [Reflect, URL] attribute DOMString src; + [Reflect, URL, PerWorldBindings, ActivityLogging=SetterForIsolatedWorlds] attribute DOMString src; attribute DOMString srclang; attribute DOMString label; [Reflect] attribute boolean default;
diff --git a/core/html/HTMLUListElement.idl b/core/html/HTMLUListElement.idl index e40350d..1dc6b6d 100644 --- a/core/html/HTMLUListElement.idl +++ b/core/html/HTMLUListElement.idl
@@ -19,6 +19,6 @@ interface HTMLUListElement : HTMLElement { [Reflect] attribute boolean compact; - [Reflect] attribute DOMString type; + [Reflect, TreatNullAs=NullString] attribute DOMString type; };
diff --git a/core/html/HTMLVideoElement.idl b/core/html/HTMLVideoElement.idl index 2b2ab0d..96fc5bf 100644 --- a/core/html/HTMLVideoElement.idl +++ b/core/html/HTMLVideoElement.idl
@@ -24,29 +24,29 @@ */ [ - EnabledAtRuntime=Media + RuntimeEnabled=Media ] interface HTMLVideoElement : HTMLMediaElement { [Reflect] attribute unsigned long width; [Reflect] attribute unsigned long height; readonly attribute unsigned long videoWidth; readonly attribute unsigned long videoHeight; - [Reflect, URL] attribute DOMString poster; + [Reflect, URL, PerWorldBindings, ActivityLogging=SetterForIsolatedWorlds] attribute DOMString poster; - readonly attribute boolean webkitSupportsFullscreen; - readonly attribute boolean webkitDisplayingFullscreen; + [MeasureAs=PrefixedVideoSupportsFullscreen] readonly attribute boolean webkitSupportsFullscreen; + [MeasureAs=PrefixedVideoDisplayingFullscreen] readonly attribute boolean webkitDisplayingFullscreen; - [RaisesException, PerWorldBindings, ActivityLog=Access] void webkitEnterFullscreen(); - void webkitExitFullscreen(); + [MeasureAs=PrefixedVideoEnterFullscreen, RaisesException, PerWorldBindings, ActivityLogging=AccessForAllWorlds] void webkitEnterFullscreen(); + [MeasureAs=PrefixedVideoExitFullscreen] void webkitExitFullscreen(); // Note the different capitalization of the "S" in FullScreen. - [RaisesException, PerWorldBindings, ActivityLog=Access] void webkitEnterFullScreen(); - void webkitExitFullScreen(); + [MeasureAs=PrefixedVideoEnterFullScreen, ImplementedAs=webkitEnterFullscreen, RaisesException, PerWorldBindings, ActivityLogging=AccessForAllWorlds] void webkitEnterFullScreen(); + [MeasureAs=PrefixedVideoExitFullScreen, ImplementedAs=webkitExitFullscreen] void webkitExitFullScreen(); // The number of frames that have been decoded and made available for // playback. - readonly attribute unsigned long webkitDecodedFrameCount; + [MeasureAs=PrefixedVideoDecodedFrameCount] readonly attribute unsigned long webkitDecodedFrameCount; // The number of decoded frames that have been dropped by the player // for performance reasons during playback. - readonly attribute unsigned long webkitDroppedFrameCount; + [MeasureAs=PrefixedVideoDroppedFrameCount] readonly attribute unsigned long webkitDroppedFrameCount; };
diff --git a/core/html/MediaController.idl b/core/html/MediaController.idl index 81171ec..254bbc2 100644 --- a/core/html/MediaController.idl +++ b/core/html/MediaController.idl
@@ -24,9 +24,9 @@ */ [ - EnabledAtRuntime=Media, + RuntimeEnabled=Media, Constructor, - ConstructorCallWith=ScriptExecutionContext + ConstructorCallWith=ExecutionContext ] interface MediaController : EventTarget { readonly attribute TimeRanges buffered; readonly attribute TimeRanges seekable;
diff --git a/core/html/MediaError.idl b/core/html/MediaError.idl index 376159d..4cf13ed 100644 --- a/core/html/MediaError.idl +++ b/core/html/MediaError.idl
@@ -24,12 +24,12 @@ */ [ - EnabledAtRuntime=Media + RuntimeEnabled=Media ] interface MediaError { - const unsigned short MEDIA_ERR_ABORTED = 1; - const unsigned short MEDIA_ERR_NETWORK = 2; - const unsigned short MEDIA_ERR_DECODE = 3; - const unsigned short MEDIA_ERR_SRC_NOT_SUPPORTED = 4; - const unsigned short MEDIA_ERR_ENCRYPTED = 5; - readonly attribute unsigned short code; + const unsigned short MEDIA_ERR_ABORTED = 1; + const unsigned short MEDIA_ERR_NETWORK = 2; + const unsigned short MEDIA_ERR_DECODE = 3; + const unsigned short MEDIA_ERR_SRC_NOT_SUPPORTED = 4; + [RuntimeEnabled=EncryptedMediaAnyVersion] const unsigned short MEDIA_ERR_ENCRYPTED = 5; + readonly attribute unsigned short code; };
diff --git a/core/html/MediaKeyError.idl b/core/html/MediaKeyError.idl index ea442f8..58fddc8 100644 --- a/core/html/MediaKeyError.idl +++ b/core/html/MediaKeyError.idl
@@ -24,7 +24,7 @@ */ [ - EnabledAtRuntime=EncryptedMediaAnyVersion + RuntimeEnabled=EncryptedMediaAnyVersion ] interface MediaKeyError { const unsigned short MEDIA_KEYERR_UNKNOWN = 1; const unsigned short MEDIA_KEYERR_CLIENT = 2; @@ -33,5 +33,5 @@ const unsigned short MEDIA_KEYERR_HARDWARECHANGE = 5; const unsigned short MEDIA_KEYERR_DOMAIN = 6; readonly attribute unsigned short code; - [Conditional=ENCRYPTED_MEDIA_V2, EnabledAtRuntime=EncryptedMedia] readonly attribute unsigned long systemCode; + [Conditional=ENCRYPTED_MEDIA_V2, RuntimeEnabled=EncryptedMedia] readonly attribute unsigned long systemCode; };
diff --git a/core/html/MediaKeyEvent.idl b/core/html/MediaKeyEvent.idl index 297eabe..c1e08c2 100644 --- a/core/html/MediaKeyEvent.idl +++ b/core/html/MediaKeyEvent.idl
@@ -24,7 +24,7 @@ */ [ - EnabledAtRuntime=LegacyEncryptedMedia, + RuntimeEnabled=PrefixedEncryptedMedia, ConstructorTemplate=Event ] interface MediaKeyEvent : Event { [InitializedByEventConstructor] readonly attribute DOMString keySystem;
diff --git a/core/html/TimeRanges.idl b/core/html/TimeRanges.idl index 3aa6b88..e6e6e95 100644 --- a/core/html/TimeRanges.idl +++ b/core/html/TimeRanges.idl
@@ -24,7 +24,7 @@ */ [ - EnabledAtRuntime=Media + RuntimeEnabled=Media ] interface TimeRanges { readonly attribute unsigned long length; [RaisesException] double start(unsigned long index);
diff --git a/core/html/canvas/Canvas2DContextAttributes.idl b/core/html/canvas/Canvas2DContextAttributes.idl index f756bda..72e0191 100644 --- a/core/html/canvas/Canvas2DContextAttributes.idl +++ b/core/html/canvas/Canvas2DContextAttributes.idl
@@ -25,8 +25,7 @@ */ [ - NoInterfaceObject, - EnabledAtRuntime=ExperimentalCanvasFeatures + NoInterfaceObject ] interface Canvas2DContextAttributes { attribute boolean alpha; };
diff --git a/core/html/canvas/CanvasRenderingContext2D.idl b/core/html/canvas/CanvasRenderingContext2D.idl index 69a3ffa..52b20e2 100644 --- a/core/html/canvas/CanvasRenderingContext2D.idl +++ b/core/html/canvas/CanvasRenderingContext2D.idl
@@ -30,6 +30,7 @@ void save(); void restore(); + [RuntimeEnabled=ExperimentalCanvasFeatures, Immutable] attribute SVGMatrix currentTransform; void scale(float sx, float sy); void rotate(float angle); void translate(float tx, float ty); @@ -128,9 +129,9 @@ [RaisesException] void drawImage(HTMLVideoElement? video, float x, float y); [RaisesException] void drawImage(HTMLVideoElement? video, float x, float y, float width, float height); [RaisesException] void drawImage(HTMLVideoElement? video, float sx, float sy, float sw, float sh, float dx, float dy, float dw, float dh); - [EnabledAtRuntime=ExperimentalCanvasFeatures, RaisesException] void drawImage(ImageBitmap? imageBitmap, float x, float y); - [EnabledAtRuntime=ExperimentalCanvasFeatures, RaisesException] void drawImage(ImageBitmap? imageBitmap, float x, float y, float width, float height); - [EnabledAtRuntime=ExperimentalCanvasFeatures, RaisesException] void drawImage(ImageBitmap? imageBitmap, float sx, float sy, float sw, float sh, float dx, float dy, float dw, float dh); + [RuntimeEnabled=ExperimentalCanvasFeatures, RaisesException] void drawImage(ImageBitmap? imageBitmap, float x, float y); + [RuntimeEnabled=ExperimentalCanvasFeatures, RaisesException] void drawImage(ImageBitmap? imageBitmap, float x, float y, float width, float height); + [RuntimeEnabled=ExperimentalCanvasFeatures, RaisesException] void drawImage(ImageBitmap? imageBitmap, float sx, float sy, float sw, float sh, float dx, float dy, float dw, float dh); void drawImageFromRect(HTMLImageElement image, optional float sx, optional float sy, optional float sw, optional float sh, @@ -162,14 +163,14 @@ [RaisesException] ImageData webkitGetImageDataHD(float sx, float sy, float sw, float sh); // Focus rings - [EnabledAtRuntime=ExperimentalCanvasFeatures] void drawSystemFocusRing(Element element); - [EnabledAtRuntime=ExperimentalCanvasFeatures] boolean drawCustomFocusRing(Element element); + [RuntimeEnabled=ExperimentalCanvasFeatures] void drawSystemFocusRing(Element element); + [RuntimeEnabled=ExperimentalCanvasFeatures] boolean drawCustomFocusRing(Element element); readonly attribute float webkitBackingStorePixelRatio; [ImplementedAs=imageSmoothingEnabled] attribute boolean webkitImageSmoothingEnabled; attribute boolean imageSmoothingEnabled; - [EnabledAtRuntime=ExperimentalCanvasFeatures] Canvas2DContextAttributes getContextAttributes(); + Canvas2DContextAttributes getContextAttributes(); };
diff --git a/core/html/canvas/Path.idl b/core/html/canvas/Path.idl index ce19874..66435a5 100644 --- a/core/html/canvas/Path.idl +++ b/core/html/canvas/Path.idl
@@ -27,7 +27,7 @@ */ [ - EnabledAtRuntime=ExperimentalCanvasFeatures, + RuntimeEnabled=ExperimentalCanvasFeatures, Constructor, Constructor(Path path), Constructor(DOMString text),
diff --git a/core/html/ime/InputMethodContext.idl b/core/html/ime/InputMethodContext.idl index 2ad97b9..1c70178 100644 --- a/core/html/ime/InputMethodContext.idl +++ b/core/html/ime/InputMethodContext.idl
@@ -29,12 +29,14 @@ */ // http://www.w3.org/TR/ime-api/ -[ -] interface InputMethodContext { +interface InputMethodContext : EventTarget { readonly attribute Composition composition; readonly attribute DOMString locale; readonly attribute HTMLElement target; void confirmComposition(); void setCaretRectangle(Node anchor, long x, long y, long w, long h); - void setExclusionRectangle(Node anchor, long x, long y, long w, long h); + + attribute EventHandler oncandidatewindowshow; + attribute EventHandler oncandidatewindowupdate; + attribute EventHandler oncandidatewindowhide; };
diff --git a/core/html/shadow/HTMLContentElement.idl b/core/html/shadow/HTMLContentElement.idl index 77095c2..ab59342 100644 --- a/core/html/shadow/HTMLContentElement.idl +++ b/core/html/shadow/HTMLContentElement.idl
@@ -26,7 +26,7 @@ [ ] interface HTMLContentElement : HTMLElement { - [Reflect] attribute DOMString select; + [Reflect, TreatNullAs=NullString] attribute DOMString select; attribute boolean resetStyleInheritance; NodeList getDistributedNodes(); };
diff --git a/core/html/shadow/HTMLShadowElement.idl b/core/html/shadow/HTMLShadowElement.idl index 3b6351b..faceace 100644 --- a/core/html/shadow/HTMLShadowElement.idl +++ b/core/html/shadow/HTMLShadowElement.idl
@@ -31,4 +31,5 @@ interface HTMLShadowElement : HTMLElement { attribute boolean resetStyleInheritance; [DeprecateAs=HTMLShadowElementOlderShadowRoot] readonly attribute ShadowRoot olderShadowRoot; + [RuntimeEnabled=ShadowDOM] NodeList getDistributedNodes(); };
diff --git a/core/html/track/TextTrack.idl b/core/html/track/TextTrack.idl index 1067901..1b9eadd 100644 --- a/core/html/track/TextTrack.idl +++ b/core/html/track/TextTrack.idl
@@ -23,23 +23,27 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +enum TextTrackMode { "disabled", "hidden", "showing" }; +enum TextTrackKind { "subtitles", "captions", "descriptions", "chapters", "metadata" }; + [ - EnabledAtRuntime=VideoTrack + RuntimeEnabled=VideoTrack ] interface TextTrack : EventTarget { - readonly attribute DOMString kind; + readonly attribute TextTrackKind kind; readonly attribute DOMString label; readonly attribute DOMString language; - attribute DOMString mode; + attribute TextTrackMode mode; readonly attribute TextTrackCueList cues; readonly attribute TextTrackCueList activeCues; - attribute EventHandler oncuechange; void addCue(TextTrackCue cue); [RaisesException] void removeCue(TextTrackCue cue); - [Conditional=WEBVTT_REGIONS] readonly attribute TextTrackRegionList regions; - [Conditional=WEBVTT_REGIONS] void addRegion(TextTrackRegion region); - [RaisesException, Conditional=WEBVTT_REGIONS] void removeRegion(TextTrackRegion region); + attribute EventHandler oncuechange; + + [RuntimeEnabled=WebVTTRegions] readonly attribute VTTRegionList regions; + [RuntimeEnabled=WebVTTRegions] void addRegion(VTTRegion region); + [RaisesException, RuntimeEnabled=WebVTTRegions] void removeRegion(VTTRegion region); };
diff --git a/core/html/track/TextTrackCue.idl b/core/html/track/TextTrackCue.idl index e64d8a3..db7112a 100644 --- a/core/html/track/TextTrackCue.idl +++ b/core/html/track/TextTrackCue.idl
@@ -24,9 +24,9 @@ */ [ - EnabledAtRuntime=VideoTrack, + RuntimeEnabled=VideoTrack, Constructor(double startTime, double endTime, DOMString text), - ConstructorCallWith=ScriptExecutionContext + ConstructorCallWith=Document ] interface TextTrackCue : EventTarget { readonly attribute TextTrack track; @@ -48,6 +48,6 @@ attribute EventHandler onenter; attribute EventHandler onexit; - [Conditional=WEBVTT_REGIONS] attribute DOMString regionId; + [RuntimeEnabled=WebVTTRegions] attribute DOMString regionId; };
diff --git a/core/html/track/TextTrackCueList.idl b/core/html/track/TextTrackCueList.idl index 4f28935..a71d687 100644 --- a/core/html/track/TextTrackCueList.idl +++ b/core/html/track/TextTrackCueList.idl
@@ -24,7 +24,7 @@ */ [ - EnabledAtRuntime=VideoTrack + RuntimeEnabled=VideoTrack ] interface TextTrackCueList { readonly attribute unsigned long length; getter TextTrackCue item(unsigned long index);
diff --git a/core/html/track/TextTrackList.idl b/core/html/track/TextTrackList.idl index bdfcc74..236029e 100644 --- a/core/html/track/TextTrackList.idl +++ b/core/html/track/TextTrackList.idl
@@ -24,7 +24,7 @@ */ [ - EnabledAtRuntime=VideoTrack, + RuntimeEnabled=VideoTrack, GenerateIsReachable=owner ] interface TextTrackList : EventTarget { readonly attribute unsigned long length;
diff --git a/core/html/track/TrackEvent.idl b/core/html/track/TrackEvent.idl index c1dc03e..3a164cd 100644 --- a/core/html/track/TrackEvent.idl +++ b/core/html/track/TrackEvent.idl
@@ -24,7 +24,7 @@ */ [ - EnabledAtRuntime=VideoTrack, + RuntimeEnabled=VideoTrack, ConstructorTemplate=Event ] interface TrackEvent : Event { [InitializedByEventConstructor, CustomGetter] readonly attribute object track;
diff --git a/core/html/track/TextTrackRegion.idl b/core/html/track/VTTRegion.idl similarity index 92% rename from core/html/track/TextTrackRegion.idl rename to core/html/track/VTTRegion.idl index 62ca08e..d3793af 100644 --- a/core/html/track/TextTrackRegion.idl +++ b/core/html/track/VTTRegion.idl
@@ -24,11 +24,9 @@ */ [ - Conditional=WEBVTT_REGIONS, Constructor(), - EnabledAtRuntime=VideoTrack, - ConstructorCallWith=ScriptExecutionContext -] interface TextTrackRegion { + RuntimeEnabled=WebVTTRegions +] interface VTTRegion { readonly attribute TextTrack track; attribute DOMString id;
diff --git a/core/html/track/TextTrackRegionList.idl b/core/html/track/VTTRegionList.idl similarity index 86% rename from core/html/track/TextTrackRegionList.idl rename to core/html/track/VTTRegionList.idl index 844cd9d..4a06653 100644 --- a/core/html/track/TextTrackRegionList.idl +++ b/core/html/track/VTTRegionList.idl
@@ -24,12 +24,10 @@ */ [ - NoInterfaceObject, - Conditional=WEBVTT_REGIONS, - EnabledAtRuntime=VideoTrack -] interface TextTrackRegionList { + RuntimeEnabled=WebVTTRegions +] interface VTTRegionList { readonly attribute unsigned long length; - getter TextTrackRegion item(unsigned long index); - TextTrackRegion getRegionById(DOMString id); + getter VTTRegion item(unsigned long index); + VTTRegion getRegionById(DOMString id); };
diff --git a/core/inspector/CodeGeneratorInspector.py b/core/inspector/CodeGeneratorInspector.py index 20122e6..163ce99 100755 --- a/core/inspector/CodeGeneratorInspector.py +++ b/core/inspector/CodeGeneratorInspector.py
@@ -1281,8 +1281,8 @@ for prop_data in resolve_data.main_properties + resolve_data.optional_properties: prop_name = prop_data.p["name"] prop_field_name = Capitalizer.lower_camel_case_to_upper(prop_name) - writer.newline(" static const char* %s;\n" % (prop_field_name)) - cpp_writer.newline("const char* %s%s::%s = \"%s\";\n" % (helper.full_name_prefix_for_impl, class_name, prop_field_name, prop_name)) + writer.newline(" static const char %s[];\n" % (prop_field_name)) + cpp_writer.newline("const char %s%s::%s[] = \"%s\";\n" % (helper.full_name_prefix_for_impl, class_name, prop_field_name, prop_name)) writer.newline("};\n\n") @@ -1773,6 +1773,8 @@ backend_method_declaration_list = [] backend_method_implementation_list = [] backend_method_name_declaration_list = [] + backend_method_name_declaration_index_list = [] + backend_method_name_declaration_current_index = 0 method_handler_list = [] frontend_method_list = [] @@ -1796,6 +1798,7 @@ Generator.backend_method_declaration_list, Generator.backend_method_implementation_list, Generator.backend_method_name_declaration_list, + Generator.backend_method_name_declaration_index_list, Generator.backend_agent_interface_list, Generator.frontend_class_field_lines, Generator.frontend_constructor_init_list, @@ -1921,9 +1924,11 @@ if "parameters" in json_command: json_params = json_command["parameters"] - method_in_code += Templates.param_container_access_code request_message_param = " requestMessageObject" + if json_params: + method_in_code += Templates.param_container_access_code + for json_parameter in json_params: json_param_name = json_parameter["name"] param_raw_type = resolve_param_raw_type(json_parameter, domain_name) @@ -2063,7 +2068,10 @@ responseCook=normal_response_cook_text, errorCook=error_response_cook_text, commandNameIndex=cmd_enum_name)) - Generator.backend_method_name_declaration_list.append(" \"%s.%s\"," % (domain_name, json_command_name)) + declaration_command_name = "%s.%s\\0" % (domain_name, json_command_name) + Generator.backend_method_name_declaration_list.append(" \"%s\"" % declaration_command_name) + Generator.backend_method_name_declaration_index_list.append(" %d," % Generator.backend_method_name_declaration_current_index) + Generator.backend_method_name_declaration_current_index += len(declaration_command_name) - 1 Generator.backend_agent_interface_list.append(") = 0;\n") @@ -2307,6 +2315,7 @@ setters="\n".join(Generator.backend_setters_list), fieldDeclarations="\n".join(Generator.backend_field_list), methodNameDeclarations="\n".join(Generator.backend_method_name_declaration_list), + methodNameDeclarationsIndex="\n".join(Generator.backend_method_name_declaration_index_list), methods="\n".join(Generator.backend_method_implementation_list), methodDeclarations="\n".join(Generator.backend_method_declaration_list), messageHandlers="\n".join(Generator.method_handler_list)))
diff --git a/core/inspector/CodeGeneratorInspectorStrings.py b/core/inspector/CodeGeneratorInspectorStrings.py index b7e7422..bc3bb73 100644 --- a/core/inspector/CodeGeneratorInspectorStrings.py +++ b/core/inspector/CodeGeneratorInspectorStrings.py
@@ -60,7 +60,7 @@ $errorCook${responseCook} } - sendResponse(callId, result, commandNames[$commandNameIndex], protocolErrors, error, resultErrorData); + sendResponse(callId, result, commandName($commandNameIndex), protocolErrors, error, resultErrorData); } """) @@ -101,7 +101,7 @@ #define InspectorFrontend_h #include "InspectorTypeBuilder.h" -#include "core/platform/JSONValues.h" +#include "platform/JSONValues.h" #include "wtf/PassRefPtr.h" #include "wtf/text/WTFString.h" @@ -196,7 +196,11 @@ kMethodNamesEnumSize }; - static const char* commandNames[]; + static const char* commandName(MethodNames); + +private: + static const char commandNames[]; + static const size_t commandNamesIndex[]; }; } // namespace WebCore @@ -214,16 +218,24 @@ #include "core/inspector/InspectorAgent.h" #include "core/inspector/InspectorFrontendChannel.h" #include "core/inspector/JSONParser.h" -#include "core/platform/JSONValues.h" +#include "platform/JSONValues.h" #include "wtf/text/CString.h" #include "wtf/text/WTFString.h" namespace WebCore { -const char* InspectorBackendDispatcher::commandNames[] = { +const char InspectorBackendDispatcher::commandNames[] = { $methodNameDeclarations }; +const size_t InspectorBackendDispatcher::commandNamesIndex[] = { +$methodNameDeclarationsIndex +}; + +const char* InspectorBackendDispatcher::commandName(MethodNames index) { + COMPILE_ASSERT(static_cast<int>(kMethodNamesEnumSize) == WTF_ARRAY_LENGTH(commandNamesIndex), command_name_array_problem); + return commandNames + commandNamesIndex[index]; +} class InspectorBackendDispatcherImpl : public InspectorBackendDispatcher { public: @@ -281,9 +293,8 @@ static CallHandler handlers[] = { $messageHandlers }; - size_t length = WTF_ARRAY_LENGTH(commandNames); - for (size_t i = 0; i < length; ++i) - dispatchMap.add(commandNames[i], handlers[i]); + for (size_t i = 0; i < kMethodNamesEnumSize; ++i) + dispatchMap.add(commandName(static_cast<MethodNames>(i)), handlers[i]); } RefPtr<JSONValue> parsedMessage = parseJSON(message); @@ -503,8 +514,6 @@ m_alreadySent = true; } -COMPILE_ASSERT(static_cast<int>(InspectorBackendDispatcher::kMethodNamesEnumSize) == WTF_ARRAY_LENGTH(InspectorBackendDispatcher::commandNames), command_name_array_problem); - } // namespace WebCore """) @@ -516,7 +525,7 @@ #include "InspectorFrontend.h" #include "core/inspector/InspectorFrontendChannel.h" -#include "core/platform/JSONValues.h" +#include "platform/JSONValues.h" #include "wtf/text/CString.h" #include "wtf/text/WTFString.h" @@ -537,7 +546,7 @@ #ifndef InspectorTypeBuilder_h #define InspectorTypeBuilder_h -#include "core/platform/JSONValues.h" +#include "platform/JSONValues.h" #include "wtf/Assertions.h" #include "wtf/PassRefPtr.h"
diff --git a/core/inspector/InspectorFrontendHost.idl b/core/inspector/InspectorFrontendHost.idl index 678a36c..d753646 100644 --- a/core/inspector/InspectorFrontendHost.idl +++ b/core/inspector/InspectorFrontendHost.idl
@@ -37,11 +37,9 @@ void setZoomFactor(float zoom); void inspectedURLChanged(DOMString newURL); - void setAttachedWindowHeight(unsigned long height); void setInjectedScriptForOrigin(DOMString origin, DOMString script); void copyText(DOMString text); - void close(DOMString url); [Custom] DOMString platform(); [Custom] DOMString port(); @@ -53,20 +51,10 @@ [Custom] void recordPanelShown(unsigned long panelCode); [Custom] void recordSettingChanged(unsigned long settingChanged); - DOMString loadResourceSynchronously(DOMString url); DOMString getSelectionBackgroundColor(); DOMString getSelectionForegroundColor(); DOMFileSystem isolatedFileSystem(DOMString fileSystemId, DOMString registeredName); boolean isUnderTest(); - - // Deprecated - boolean canInspectWorkers(); - boolean canSaveAs(); - boolean canSave(); - boolean supportsFileSystems(); - void loaded(); - DOMString hiddenPanels(); - DOMString localizedStringsURL(); };
diff --git a/core/inspector/InspectorInstrumentation.idl b/core/inspector/InspectorInstrumentation.idl index 578c857..b333401 100644 --- a/core/inspector/InspectorInstrumentation.idl +++ b/core/inspector/InspectorInstrumentation.idl
@@ -68,28 +68,28 @@ void didClearWindowObjectInWorld([Keep] Frame*, DOMWrapperWorld*); [DOMDebugger, Inline=FastReturn] - void willInsertDOMNode(Document*, Node* parent); + void willInsertDOMNode([Keep] Node* parent); [DOM, DOMDebugger, Inline=FastReturn] - void didInsertDOMNode(Document*, Node*); + void didInsertDOMNode([Keep] Node*); [DOMDebugger, DOM, Inline=FastReturn] - void willRemoveDOMNode(Document* document, Node*); + void willRemoveDOMNode([Keep] Node*); [DOMDebugger, DOM, Inline=FastReturn] - void willModifyDOMAttr(Document*, Element*, const AtomicString& oldValue, const AtomicString& newValue); + void willModifyDOMAttr([Keep] Element*, const AtomicString& oldValue, const AtomicString& newValue); [DOM, Inline=FastReturn] - void didModifyDOMAttr(Document*, Element*, const AtomicString& name, const AtomicString& value); + void didModifyDOMAttr([Keep] Element*, const AtomicString& name, const AtomicString& value); [DOM, Inline=FastReturn] - void didRemoveDOMAttr(Document*, Element*, const AtomicString& name); + void didRemoveDOMAttr([Keep] Element*, const AtomicString& name); [DOM, Inline=FastReturn] - void characterDataModified(Document*, CharacterData*); + void characterDataModified([Keep] CharacterData*); [DOM, DOMDebugger, Inline=FastReturn] - void didInvalidateStyleAttr(Document*, Node*); + void didInvalidateStyleAttr([Keep] Node*); [CSS, Inline=FastReturn] void activeStyleSheetsUpdated([Keep] Document*, const Vector<RefPtr<StyleSheet> >& newSheets); @@ -119,7 +119,7 @@ void didChangeRegionOverset([Keep] Document*, NamedFlow*); [DOMDebugger, Inline=FastReturn] - void willSendXMLHttpRequest(ScriptExecutionContext*, const String& url); + void willSendXMLHttpRequest(ExecutionContext*, const String& url); [DOMDebugger, Inline=FastReturn] void didFireWebGLError(Element*, const String& errorName); @@ -134,19 +134,19 @@ void didScheduleResourceRequest([Keep] Document*, const String& url); [DOMDebugger, Timeline, Inline=FastReturn] - void didInstallTimer([Keep] ScriptExecutionContext*, int timerId, int timeout, bool singleShot); + void didInstallTimer([Keep] ExecutionContext*, int timerId, int timeout, bool singleShot); [DOMDebugger, Timeline, Inline=FastReturn] - void didRemoveTimer([Keep] ScriptExecutionContext*, int timerId); + void didRemoveTimer([Keep] ExecutionContext*, int timerId); [Timeline, Inline=FastReturn] - InspectorInstrumentationCookie willCallFunction([Keep] ScriptExecutionContext*, const String& scriptName, int scriptLine); + InspectorInstrumentationCookie willCallFunction([Keep] ExecutionContext*, const String& scriptName, int scriptLine); [Timeline, Inline=FastReturn] void didCallFunction(const InspectorInstrumentationCookie&); [Timeline, Inline=FastReturn] - InspectorInstrumentationCookie willDispatchXHRReadyStateChangeEvent([Keep] ScriptExecutionContext*, XMLHttpRequest*); + InspectorInstrumentationCookie willDispatchXHRReadyStateChangeEvent([Keep] ExecutionContext*, XMLHttpRequest*); [Timeline, Inline=FastReturn] void didDispatchXHRReadyStateChangeEvent(const InspectorInstrumentationCookie&); @@ -158,7 +158,7 @@ void didDispatchEvent(const InspectorInstrumentationCookie&); [DOMDebugger, Inline=FastReturn] - InspectorInstrumentationCookie willHandleEvent(ScriptExecutionContext*, Event*); + InspectorInstrumentationCookie willHandleEvent(ExecutionContext*, Event*); [Debugger, Inline=FastReturn] void didHandleEvent(const InspectorInstrumentationCookie&); @@ -182,7 +182,7 @@ void didCreateIsolatedContext([Keep] Frame*, ScriptState*, SecurityOrigin*); [DOMDebugger, Timeline, Inline=FastReturn] - InspectorInstrumentationCookie willFireTimer([Keep] ScriptExecutionContext*, int timerId); + InspectorInstrumentationCookie willFireTimer([Keep] ExecutionContext*, int timerId); [Debugger, Timeline, Inline=FastReturn] void didFireTimer(const InspectorInstrumentationCookie&); @@ -196,6 +196,12 @@ [Timeline, Page, Inline=FastReturn] void didLayout(const InspectorInstrumentationCookie&, RenderObject* root); + [Timeline, Inline=FastReturn] + void willAutosizeText([Keep] RenderObject* root); + + [Timeline, Inline=FastReturn] + void didAutosizeText([Keep] RenderObject* root); + [Page, Inline=FastReturn] void didScroll(Page*); @@ -203,7 +209,7 @@ void didResizeMainFrame(Page*); [Timeline, Inline=FastReturn] - InspectorInstrumentationCookie willDispatchXHRLoadEvent([Keep] ScriptExecutionContext*, XMLHttpRequest*); + InspectorInstrumentationCookie willDispatchXHRLoadEvent([Keep] ExecutionContext*, XMLHttpRequest*); [Timeline, Inline=FastReturn] void didDispatchXHRLoadEvent(const InspectorInstrumentationCookie&); @@ -217,7 +223,7 @@ [Timeline, Inline=FastReturn] void willPaint([Keep] RenderObject*); - [Timeline, Page, Inline=FastReturn] + [Timeline, Page, LayerTree, Inline=FastReturn] void didPaint([Keep] RenderObject*, GraphicsContext*, const LayoutRect&); [Timeline, Inline=FastReturn] @@ -242,12 +248,6 @@ void applyUserAgentOverride(Frame*, String* userAgent); [Page, Inline=FastReturn] - void applyScreenWidthOverride(Frame*, long* width); - - [Page, Inline=FastReturn] - void applyScreenHeightOverride(Frame*, long* height); - - [Page, Inline=FastReturn] void applyEmulatedMedia(Frame*, String* media); [Timeline, Resource] @@ -292,33 +292,33 @@ void didFailLoading(Frame* frame, unsigned long identifier, DocumentLoader*, const ResourceError&); [Resource] - void documentThreadableLoaderStartedLoadingForClient(ScriptExecutionContext*, unsigned long identifier, ThreadableLoaderClient* client); + void documentThreadableLoaderStartedLoadingForClient(ExecutionContext*, unsigned long identifier, ThreadableLoaderClient* client); [Resource] - void willLoadXHR(ScriptExecutionContext*, ThreadableLoaderClient* client, const String& method, const KURL& url, bool async, PassRefPtr<FormData>, const HTTPHeaderMap& headers, bool includeCredentials); + void willLoadXHR(ExecutionContext*, ThreadableLoaderClient* client, const String& method, const KURL& url, bool async, PassRefPtr<FormData>, const HTTPHeaderMap& headers, bool includeCredentials); [Resource] - void didFailXHRLoading(ScriptExecutionContext*, ThreadableLoaderClient* client); + void didFailXHRLoading(ExecutionContext*, ThreadableLoaderClient* client); [Console, Resource] - void didFinishXHRLoading(ScriptExecutionContext*, ThreadableLoaderClient* client, unsigned long identifier, ScriptString sourceString, const String& url, const String& sendURL, unsigned sendLineNumber); + void didFinishXHRLoading(ExecutionContext*, ThreadableLoaderClient* client, unsigned long identifier, ScriptString sourceString, const String& url, const String& sendURL, unsigned sendLineNumber); [Resource] - void didReceiveXHRResponse(ScriptExecutionContext*, unsigned long identifier); + void didReceiveXHRResponse(ExecutionContext*, unsigned long identifier); [Resource] - void scriptImported(ScriptExecutionContext*, unsigned long identifier, const String& sourceString); + void scriptImported(ExecutionContext*, unsigned long identifier, const String& sourceString); [Debugger] - void scriptExecutionBlockedByCSP(ScriptExecutionContext*, const String& directiveText); + void scriptExecutionBlockedByCSP(ExecutionContext*, const String& directiveText); [Resource] - void didReceiveScriptResponse(ScriptExecutionContext*, unsigned long identifier); + void didReceiveScriptResponse(ExecutionContext*, unsigned long identifier); [Timeline, Inspector, DOM, Page] void domContentLoadedEventFired([Keep] Frame*); - [DOM, Timeline, Page] + [Timeline, Page] void loadEventFired([Keep] Frame*); [Page] @@ -382,13 +382,13 @@ void didDispatchDOMStorageEvent(Page* page, const String& key, const String& oldValue, const String& newValue, StorageType storageType, SecurityOrigin* securityOrigin); [Worker] - void didStartWorkerGlobalScope(ScriptExecutionContext*, WorkerGlobalScopeProxy* proxy, const KURL& url); + void didStartWorkerGlobalScope(ExecutionContext*, WorkerGlobalScopeProxy* proxy, const KURL& url); [WorkerRuntime] void willEvaluateWorkerScript([Keep] WorkerGlobalScope* context, int workerThreadStartMode); [Worker] - void workerGlobalScopeTerminated(ScriptExecutionContext*, WorkerGlobalScopeProxy* proxy); + void workerGlobalScopeTerminated(ExecutionContext*, WorkerGlobalScopeProxy* proxy); [Profiler, Timeline] void willProcessTask(WorkerGlobalScope* context); @@ -424,7 +424,7 @@ void didReceiveWebSocketFrameError(Document*, unsigned long identifier, const String& errorMessage); [ApplicationCache, Inline=FastReturn] - void networkStateChanged(Page*); + void networkStateChanged(Page*, bool online); [ApplicationCache, Inline=FastReturn] void updateApplicationCacheStatus([Keep] Frame*); @@ -448,35 +448,35 @@ // FIXME: Convert to ScriptArguments to match non-worker context. // Use the same implementation as above as a similar method dispatched on Page. [Console] - void addMessageToConsole(ScriptExecutionContext* context, MessageSource source, MessageType type, MessageLevel level, const String& message, PassRefPtr<ScriptCallStack> callStack, unsigned long requestIdentifier = 0); + void addMessageToConsole(ExecutionContext* context, MessageSource source, MessageType type, MessageLevel level, const String& message, PassRefPtr<ScriptCallStack> callStack, unsigned long requestIdentifier = 0); // Use the same implementation as above as a similar method dispatched on Page. [Console] - void addMessageToConsole(ScriptExecutionContext* context, MessageSource source, MessageType type, MessageLevel level, const String& message, const String& scriptId, unsigned lineNumber, unsigned columnNumber, ScriptState* state, unsigned long requestIdentifier = 0); + void addMessageToConsole(ExecutionContext* context, MessageSource source, MessageType type, MessageLevel level, const String& message, const String& scriptId, unsigned lineNumber, unsigned columnNumber, ScriptState* state, unsigned long requestIdentifier = 0); [Console, Debugger] - void addMessageToConsole(ScriptExecutionContext* context, MessageSource source, MessageType type, MessageLevel level, const String& message, ScriptState* state, PassRefPtr<ScriptArguments> arguments, unsigned long requestIdentifier = 0); + void addMessageToConsole(ExecutionContext* context, MessageSource source, MessageType type, MessageLevel level, const String& message, ScriptState* state, PassRefPtr<ScriptArguments> arguments, unsigned long requestIdentifier = 0); [Console] - void consoleCount(ScriptExecutionContext* context, ScriptState* state, PassRefPtr<ScriptArguments> arguments); + void consoleCount(ExecutionContext* context, ScriptState* state, PassRefPtr<ScriptArguments> arguments); [Timeline, Console] - void consoleTime([Keep] ScriptExecutionContext* context, const String& title); + void consoleTime([Keep] ExecutionContext* context, const String& title); [Console, Timeline] - void consoleTimeEnd([Keep] ScriptExecutionContext* context, const String& title, ScriptState* state); + void consoleTimeEnd([Keep] ExecutionContext* context, const String& title, ScriptState* state); [Timeline, Inline=FastReturn] - void consoleTimeStamp([Keep] ScriptExecutionContext* context, const String& title); + void consoleTimeStamp([Keep] ExecutionContext* context, const String& title); [Console, Inline=FastReturn] - void consoleTimeline([Keep] ScriptExecutionContext* context, const String& title, ScriptState* state); + void consoleTimeline([Keep] ExecutionContext* context, const String& title, ScriptState* state); [Console, Inline=FastReturn] - void consoleTimelineEnd([Keep] ScriptExecutionContext* context, const String& title, ScriptState* state); + void consoleTimelineEnd([Keep] ExecutionContext* context, const String& title, ScriptState* state); [Profiler] - void addProfile(ScriptExecutionContext* context, PassRefPtr<ScriptProfile> profile, PassRefPtr<ScriptCallStack> callStack); + void addProfile(ExecutionContext* context, PassRefPtr<ScriptProfile> profile, PassRefPtr<ScriptCallStack> callStack); } interface InspectorDatabaseInstrumentation { @@ -484,30 +484,27 @@ #include "modules/webdatabase/Database.h" [Database] - void didOpenDatabase(ScriptExecutionContext* context, PassRefPtr<Database> database, const String& domain, const String& name, const String& version); + void didOpenDatabase(ExecutionContext* context, PassRefPtr<Database> database, const String& domain, const String& name, const String& version); } interface InspectorOverrides { [CSS, Inline=FastReturn] bool forcePseudoState([Keep] Element* element, CSSSelector::PseudoType pseudoState); - [Page, Inline=FastReturn] - bool shouldApplyScreenWidthOverride(Frame* frame); - - [Page, Inline=FastReturn] - bool shouldApplyScreenHeightOverride(Frame* frame); - [Worker, Inline=FastReturn] - bool shouldPauseDedicatedWorkerOnStart(ScriptExecutionContext* context); + bool shouldPauseDedicatedWorkerOnStart(ExecutionContext* context); [Page, Inline=FastReturn] GeolocationPosition* overrideGeolocationPosition(Page* page, [DefaultReturn] GeolocationPosition* position); [Page, Inline=FastReturn] - DeviceOrientationData* overrideDeviceOrientation(Page* page, [DefaultReturn] DeviceOrientationData* deviceOrientation); + float overrideTextAutosizingFontScaleFactor(Page* page, [DefaultReturn] float fontScaleFactor); + + [Page, Inline=FastReturn] + bool overrideTextAutosizing(Page* page, [DefaultReturn] bool textAutosizing); [Profiler] - String getCurrentUserInitiatedProfileName(ScriptExecutionContext* context, bool incrementProfileNumber); + String getCurrentUserInitiatedProfileName(ExecutionContext* context, bool incrementProfileNumber); }
diff --git a/core/page/AbstractView.idl b/core/page/AbstractView.idl deleted file mode 100644 index 60c537f..0000000 --- a/core/page/AbstractView.idl +++ /dev/null
@@ -1,34 +0,0 @@ -/* - * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. - * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com> - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -// Introduced in DOM Level 2: -[ - -] interface AbstractView { - readonly attribute Document document; - readonly attribute StyleMedia styleMedia; -}; -
diff --git a/core/page/EventSource.idl b/core/page/EventSource.idl index 6aeade1..b43938d 100644 --- a/core/page/EventSource.idl +++ b/core/page/EventSource.idl
@@ -33,7 +33,7 @@ GlobalContext=Window&WorkerGlobalScope, ActiveDOMObject, Constructor(DOMString url, optional Dictionary eventSourceInit), - ConstructorCallWith=ScriptExecutionContext, + ConstructorCallWith=ExecutionContext, ConstructorRaisesException ] interface EventSource : EventTarget {
diff --git a/core/page/PagePopupController.idl b/core/page/PagePopupController.idl index 453850d..069098c 100644 --- a/core/page/PagePopupController.idl +++ b/core/page/PagePopupController.idl
@@ -30,7 +30,7 @@ [ NoInterfaceObject, - EnabledAtRuntime=PagePopup + RuntimeEnabled=PagePopup ] interface PagePopupController { void setValueAndClosePopup(long numberValue, DOMString stringValue); void setValue(DOMString value);
diff --git a/core/page/Selection.idl b/core/page/Selection.idl index e5d7a9e..8f03f8e 100644 --- a/core/page/Selection.idl +++ b/core/page/Selection.idl
@@ -45,7 +45,7 @@ [RaisesException] void collapseToEnd(); [RaisesException] void collapseToStart(); - [CustomElementCallbacks=Enable] void deleteFromDocument(); + [CustomElementCallbacks] void deleteFromDocument(); boolean containsNode([Default=Undefined] optional Node node, [Default=Undefined] optional boolean allowPartial); [RaisesException] void selectAllChildren([Default=Undefined] optional Node node);
diff --git a/core/page/WindowPagePopup.idl b/core/page/WindowPagePopup.idl index 0ae9bbe..e4b5839 100644 --- a/core/page/WindowPagePopup.idl +++ b/core/page/WindowPagePopup.idl
@@ -29,8 +29,8 @@ */ [ - EnabledAtRuntime=PagePopup, + RuntimeEnabled=PagePopup, ImplementedAs=DOMWindowPagePopup ] partial interface Window { - [EnabledPerContext=pagePopup] readonly attribute PagePopupController pagePopupController; + [PerContextEnabled=PagePopup] readonly attribute PagePopupController pagePopupController; };
diff --git a/core/scripts/action_derivedsourcesallinone.py b/core/scripts/action_derivedsourcesallinone.py deleted file mode 100644 index fec5088..0000000 --- a/core/scripts/action_derivedsourcesallinone.py +++ /dev/null
@@ -1,225 +0,0 @@ -#!/usr/bin/python -# -# Copyright (C) 2009 Google Inc. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# -# Copyright (c) 2009 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -# action_derivedsourcesallinone.py generates a single cpp file that includes -# all v8 bindings cpp files generated from idls. Files can be assigned into -# multiple output files, to reduce maximum compilation unit size and allow -# parallel compilation. -# -# usage: action_derivedsourcesallinone.py IDL_FILES_LIST -- OUTPUT_FILE1 OUTPUT_FILE2 ... -# -# Note that IDL_FILES_LIST is a text file containing the IDL file paths. - -import errno -import os -import os.path -import re -import subprocess -import sys - -# A regexp for finding Conditional attributes in interface definitions. -conditionalPattern = re.compile('interface[\s]*\[[^\]]*Conditional=([\_0-9a-zA-Z&|]*)') - -copyrightTemplate = """/* - * THIS FILE WAS AUTOMATICALLY GENERATED, DO NOT EDIT. - * - * This file was generated by the action_derivedsourcesallinone.py script. - * - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -""" - - -# Wraps conditional with ENABLE() and replace '&','|' with '&&','||' if more than one conditional is specified. -def formatConditional(conditional): - def wrapWithEnable(s): - if re.match('[|&]$', s): - return s * 2 - return 'ENABLE(' + s + ')' - return ' '.join(map(wrapWithEnable, conditional)) - - -# Find the conditional interface attribute. -def extractConditional(idlFilePath): - conditional = None - - # Read file and look for "interface [ Conditional=XXX ]". - idlFile = open(idlFilePath) - idlContents = idlFile.read().replace('\n', '') - idlFile.close() - - match = conditionalPattern.search(idlContents) - if match: - conditional = match.group(1) - conditional = re.split('([|&])', conditional) - - return conditional - -# Extracts conditional and interface name from each IDL file. -def extractMetaData(filePaths): - metaDataList = [] - - for f in filePaths: - metaData = {} - if len(f) == 0: - continue - if not os.path.exists(f): - print 'WARNING: file not found: "%s"' % f - continue - - # Extract type name from file name - (parentPath, fileName) = os.path.split(f) - (interfaceName, ext) = os.path.splitext(fileName) - - if not ext == '.idl': - continue - - metaData = { - 'conditional': extractConditional(f), - 'name': interfaceName, - } - - metaDataList.append(metaData) - - return metaDataList - - -def generateContent(filesMetaData, partition, totalPartitions): - # Sort files by conditionals. - filesMetaData.sort() - - output = [] - - # Add fixed content. - output.append(copyrightTemplate) - output.append('#define NO_IMPLICIT_ATOMICSTRING\n\n') - - # List all includes segmented by if and endif. - prevConditional = None - for metaData in filesMetaData: - name = metaData['name'] - if (hash(name) % totalPartitions) != partition: - continue - conditional = metaData['conditional'] - - if prevConditional and prevConditional != conditional: - output.append('#endif\n') - if conditional and prevConditional != conditional: - output.append('\n#if %s\n' % formatConditional(conditional)) - - output.append('#include "bindings/V8%s.cpp"\n' % name) - - prevConditional = conditional - - if prevConditional: - output.append('#endif\n') - - return ''.join(output) - - -def writeContent(content, outputFileName): - (parentPath, fileName) = os.path.split(outputFileName) - if not os.path.exists(parentPath): - print parentPath - os.mkdir(parentPath) - f = open(outputFileName, 'w') - f.write(content) - f.close() - - -def resolveCygpath(cygdriveNames): - cmd = ['cygpath', '-f', '-', '-wa'] - process = subprocess.Popen(cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) - idlFileNames = [] - for fileName in cygdriveNames: - process.stdin.write("%s\n" % fileName) - process.stdin.flush() - idlFileNames.append(process.stdout.readline().rstrip()) - process.stdin.close() - process.wait() - return idlFileNames - - -def main(args): - assert(len(args) > 3) - inOutBreakIndex = args.index('--') - inputFileName = args[1] - outputFileNames = args[inOutBreakIndex+1:] - - inputFile = open(inputFileName, 'r') - idlFileNames = [] - cygdriveNames = [] - for line in inputFile: - idlFileName = line.rstrip().split(' ')[0] - if idlFileName.startswith("/cygdrive"): - cygdriveNames.append(idlFileName) - else: - idlFileNames.append(idlFileName) - - if cygdriveNames: - idlFileNames.extend(resolveCygpath(cygdriveNames)) - inputFile.close() - - filesMetaData = extractMetaData(idlFileNames) - for fileName in outputFileNames: - partition = outputFileNames.index(fileName) - fileContents = generateContent(filesMetaData, partition, len(outputFileNames)) - writeContent(fileContents, fileName) - - return 0 - - -if __name__ == '__main__': - sys.exit(main(sys.argv))
diff --git a/core/scripts/action_makenames.py b/core/scripts/action_makenames.py deleted file mode 100644 index 224abd6..0000000 --- a/core/scripts/action_makenames.py +++ /dev/null
@@ -1,182 +0,0 @@ -#!/usr/bin/python -# -# Copyright (C) 2009 Google Inc. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# -# Copyright (c) 2009 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -# action_makenames.py is a harness script to connect actions sections of -# gyp-based builds to make_names.pl. -# -# usage: action_makenames.py OUTPUTS -- INPUTS [-- OPTIONS] -# -# Multiple OUTPUTS, INPUTS, and OPTIONS may be listed. The sections are -# separated by -- arguments. -# -# The directory name of the first output is chosen as the directory in which -# make_names will run. If the directory name for any subsequent output is -# different, those files will be moved to the desired directory. -# -# Multiple INPUTS may be listed. An input with a basename matching -# "make_names.pl" is taken as the path to that script. Inputs with names -# ending in TagNames.in or tags.in are taken as tag inputs. Inputs with names -# ending in AttributeNames.in or attrs.in are taken as attribute inputs. There -# may be at most one tag input and one attribute input. A make_names.pl input -# is required and at least one tag or attribute input must be present. -# -# OPTIONS is a list of additional options to pass to make_names.pl. This -# section need not be present. - - -import os -import posixpath -import shutil -import subprocess -import sys - - -def SplitArgsIntoSections(args): - sections = [] - while len(args) > 0: - if not '--' in args: - # If there is no '--' left, everything remaining is an entire section. - dashes = len(args) - else: - dashes = args.index('--') - - sections.append(args[:dashes]) - - # Next time through the loop, look at everything after this '--'. - if dashes + 1 == len(args): - # If the '--' is at the end of the list, we won't come back through the - # loop again. Add an empty section now corresponding to the nothingness - # following the final '--'. - args = [] - sections.append(args) - else: - args = args[dashes + 1:] - - return sections - - -def main(args): - sections = SplitArgsIntoSections(args[1:]) - assert len(sections) == 2 or len(sections) == 3 - (outputs, inputs) = sections[:2] - if len(sections) == 3: - options = sections[2] - else: - options = [] - - # Make all output pathnames absolute so that they can be accessed after - # changing directory. - for index in xrange(0, len(outputs)): - outputs[index] = os.path.abspath(outputs[index]) - - outputDir = os.path.dirname(outputs[0]) - - # Look at the inputs and figure out which ones are make_names.pl, tags, and - # attributes. There can be at most one of each, and those are the only - # input types supported. make_names.pl is required and at least one of tags - # and attributes is required. - makeNamesInput = None - tagInput = None - attrInput = None - eventsInput = None - for input in inputs: - # Make input pathnames absolute so they can be accessed after changing - # directory. On Windows, convert \ to / for inputs to the perl script to - # work around the intermix of activepython + cygwin perl. - inputAbs = os.path.abspath(input) - inputAbsPosix = inputAbs.replace(os.path.sep, posixpath.sep) - inputBasename = os.path.basename(input) - if inputBasename in ('make_names.pl', 'make_event_factory.pl', 'make_dom_exceptions.pl', 'make_settings.pl'): - assert makeNamesInput == None - makeNamesInput = inputAbs - elif inputBasename.endswith('TagNames.in') or inputBasename.endswith('tags.in'): - assert tagInput == None - tagInput = inputAbsPosix - elif inputBasename.endswith('AttributeNames.in') or inputBasename.endswith('attrs.in'): - assert attrInput == None - attrInput = inputAbsPosix - elif (inputBasename.endswith('EventTargetFactory.in') or inputBasename.endswith('EventNames.in') - or inputBasename.endswith('DOMExceptions.in') or inputBasename.endswith('Settings.in')): - eventsInput = inputAbsPosix - elif inputBasename.endswith('Names.in'): - options.append(inputAbsPosix) - elif inputBasename.endswith('.pm'): - continue - else: - assert False - - assert makeNamesInput != None - assert tagInput != None or attrInput != None or eventsInput != None or ('--fonts' in options) or ('--resourceTypes' in options) - - # scriptsPath is a Perl include directory, located relative to - # makeNamesInput. - scriptsPath = os.path.normpath( - os.path.join(os.path.dirname(makeNamesInput), os.pardir, 'scripts')) - - # Change to the output directory because make_names.pl puts output in its - # working directory. - os.chdir(outputDir) - - # Build up the command. - command = ['perl', '-I', scriptsPath, makeNamesInput] - if tagInput != None: - command.extend(['--tags', tagInput]) - if attrInput != None: - command.extend(['--attrs', attrInput]) - if eventsInput != None: - command.extend(['--input', eventsInput]) - command.extend(options) - - # Do it. check_call is new in 2.5, so simulate its behavior with call and - # assert. - returnCode = subprocess.call(command) - assert returnCode == 0 - - # Go through the outputs. Any output that belongs in a different directory - # is moved. Do a copy and delete instead of rename for maximum portability. - # Note that all paths used in this section are still absolute. - for output in outputs: - thisOutputDir = os.path.dirname(output) - if thisOutputDir != outputDir: - outputBasename = os.path.basename(output) - src = os.path.join(outputDir, outputBasename) - dst = os.path.join(thisOutputDir, outputBasename) - shutil.copyfile(src, dst) - os.unlink(src) - - return returnCode - - -if __name__ == '__main__': - sys.exit(main(sys.argv))
diff --git a/core/scripts/action_useragentstylesheets.py b/core/scripts/action_useragentstylesheets.py deleted file mode 100644 index c0712b3..0000000 --- a/core/scripts/action_useragentstylesheets.py +++ /dev/null
@@ -1,124 +0,0 @@ -#!/usr/bin/python -# -# Copyright (C) 2009 Google Inc. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# -# Copyright (c) 2009 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -# usage: -# action_useragentstylesheets.py OUTPUTS INPUTS -- MAINSCRIPT MODULES -- OPTIONS -# -# OUTPUTS must contain two items, in order: a path to UserAgentStyleSheets.h -# and a path to UserAgentStyleSheetsData.cpp. -# INPUTS contains one or more CSS files. -# -# MAINSCRIPT is the path to make-css-file-arrays.pl. MODULES may contain -# multiple paths to additional perl modules. -# -# OPTIONS are passed as-is to MAINSCRIPT as additional arguments. - - -import os -import shlex -import subprocess -import sys - - -def SplitArgsIntoSections(args): - sections = [] - while len(args) > 0: - if not '--' in args: - # If there is no '--' left, everything remaining is an entire section. - dashes = len(args) - else: - dashes = args.index('--') - - sections.append(args[:dashes]) - - # Next time through the loop, look at everything after this '--'. - if dashes + 1 == len(args): - # If the '--' is at the end of the list, we won't come back through the - # loop again. Add an empty section now corresponding to the nothingness - # following the final '--'. - args = [] - sections.append(args) - else: - args = args[dashes + 1:] - - return sections - - -def main(args): - sections = SplitArgsIntoSections(args[1:]) - assert len(sections) == 3 - (outputsInputs, scripts, options) = sections - - assert len(outputsInputs) >= 3 - outputH = outputsInputs[0] - outputCpp = outputsInputs[1] - styleSheets = outputsInputs[2:] - - assert len(scripts) >= 1 - makeCssFileArrays = scripts[0] - perlModules = scripts[1:] - - includeDirs = [] - for perlModule in perlModules: - includeDir = os.path.dirname(perlModule) - if not includeDir in includeDirs: - includeDirs.append(includeDir) - - # The defines come in as one flat string. Split it up into distinct arguments. - if '--defines' in options: - definesIndex = options.index('--defines') - if definesIndex + 1 < len(options): - splitOptions = shlex.split(options[definesIndex + 1]) - if splitOptions: - options[definesIndex + 1] = ' '.join(splitOptions) - - # Build up the command. - command = ['perl'] - for includeDir in includeDirs: - command.extend(['-I', includeDir]) - command.append(makeCssFileArrays) - command.extend(options) - command.extend([outputH, outputCpp]) - command.extend(styleSheets) - - # Do it. check_call is new in 2.5, so simulate its behavior with call and - # assert. - returnCode = subprocess.call(command) - assert returnCode == 0 - - return returnCode - - -if __name__ == '__main__': - sys.exit(main(sys.argv))
diff --git a/core/scripts/in_file.py b/core/scripts/in_file.py deleted file mode 100644 index d8d8235..0000000 --- a/core/scripts/in_file.py +++ /dev/null
@@ -1,160 +0,0 @@ -# Copyright (C) 2013 Google Inc. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -import copy -import os - -# NOTE: This has only been used to parse -# core/page/RuntimeEnabledFeatures.in and may not be capable -# of parsing other .in files correctly. - -# .in file format is: -# // comment -# name1 arg=value, arg2=value2, arg2=value3 -# -# InFile must be passed a dictionary of default values -# with which to validate arguments against known names. -# Sequence types as default values will produce sequences -# as parse results. -# Bare arguments (no '=') are treated as names with value True. -# The first field will always be labeled 'name'. -# -# InFile.load_from_files(['file.in'], {'arg': None, 'arg2': []}) -# -# Parsing produces an array of dictionaries: -# [ { 'name' : 'name1', 'arg' :' value', arg2=['value2', 'value3'] } - -def _is_comment(line): - return line.startswith("//") or line.startswith("#") - -class InFile(object): - def __init__(self, lines, defaults, valid_values=None, default_parameters=None): - self.name_dictionaries = [] - self.parameters = copy.deepcopy(default_parameters if default_parameters else {}) - self._defaults = defaults - self._valid_values = copy.deepcopy(valid_values if valid_values else {}) - self._parse(map(str.strip, lines)) - - @classmethod - def load_from_files(self, file_paths, defaults, valid_values, default_parameters): - lines = [] - for path in file_paths: - with open(os.path.abspath(path)) as in_file: - lines += in_file.readlines() - return InFile(lines, defaults, valid_values, default_parameters) - - def _is_sequence(self, arg): - return (not hasattr(arg, "strip") - and hasattr(arg, "__getitem__") - or hasattr(arg, "__iter__")) - - def _parse(self, lines): - parsing_parameters = True - indices = {} - for line in lines: - if _is_comment(line): - continue - if not line: - parsing_parameters = False - continue - if parsing_parameters: - self._parse_parameter(line) - else: - entry = self._parse_line(line) - name = entry['name'] - if name in indices: - entry = self._merge_entries(entry, self.name_dictionaries[indices[name]]) - entry['name'] = name - self.name_dictionaries[indices[name]] = entry - else: - indices[name] = len(self.name_dictionaries) - self.name_dictionaries.append(entry) - - - def _merge_entries(self, one, two): - merged = {} - for key in one: - if key not in two: - self._fatal("Expected key '%s' not found in entry: %s" % (key, two)) - if one[key] and two[key]: - val_one = one[key] - val_two = two[key] - if isinstance(val_one, list) and isinstance(val_two, list): - val = val_one + val_two - elif isinstance(val_one, list): - val = val_one + [val_two] - elif isinstance(val_two, list): - val = [val_one] + val_two - else: - val = [val_one, val_two] - merged[key] = val - elif one[key]: - merged[key] = one[key] - else: - merged[key] = two[key] - return merged - - - def _parse_parameter(self, line): - if '=' in line: - name, value = line.split('=') - else: - name, value = line, True - if not name in self.parameters: - self._fatal("Unknown parameter: '%s' in line:\n%s\nKnown parameters: %s" % (name, line, self.parameters.keys())) - self.parameters[name] = value - - def _parse_line(self, line): - args = copy.deepcopy(self._defaults) - parts = line.split(' ') - args['name'] = parts[0] - # re-join the rest of the line and split on ',' - args_list = ' '.join(parts[1:]).strip().split(',') - for arg_string in args_list: - arg_string = arg_string.strip() - if not arg_string: # Ignore empty args - continue - if '=' in arg_string: - arg_name, arg_value = arg_string.split('=') - else: - arg_name, arg_value = arg_string, True - if arg_name not in self._defaults: - self._fatal("Unknown argument: '%s' in line:\n%s\nKnown arguments: %s" % (arg_name, line, self._defaults.keys())) - valid_values = self._valid_values.get(arg_name) - if valid_values and arg_value not in valid_values: - self._fatal("Unknown value: '%s' in line:\n%s\nKnown values: %s" % (arg_value, line, valid_values)) - if self._is_sequence(args[arg_name]): - args[arg_name].append(arg_value) - else: - args[arg_name] = arg_value - return args - - def _fatal(self, message): - # FIXME: This should probably raise instead of exit(1) - print message - exit(1)
diff --git a/core/scripts/in_file_unittest.py b/core/scripts/in_file_unittest.py deleted file mode 100644 index e065d44..0000000 --- a/core/scripts/in_file_unittest.py +++ /dev/null
@@ -1,77 +0,0 @@ -#!/usr/bin/env python -# Copyright (C) 2013 Google Inc. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -import unittest - -from in_file import InFile - -class InFileTest(unittest.TestCase): - def test_basic_parse(self): - contents = """ -name1 arg=value, arg2=value2, arg2=value3 -name2 -""" - lines = contents.split("\n") - defaults = { - 'arg': None, - 'arg2': [], - } - in_file = InFile(lines, defaults, None) - expected_values = [ - {'name': 'name1', 'arg': 'value', 'arg2': ['value2', 'value3']}, - {'name': 'name2', 'arg': None, 'arg2': []}, - ] - self.assertEquals(in_file.name_dictionaries, expected_values) - - def test_with_parameters(self): - contents = """namespace=TestNamespace -fruit - -name1 arg=value, arg2=value2, arg2=value3 -name2 -""" - lines = contents.split("\n") - defaults = { - 'arg': None, - 'arg2': [], - } - default_parameters = { - 'namespace': '', - 'fruit': False, - } - in_file = InFile(lines, defaults, default_parameters) - expected_parameters = { - 'namespace': 'TestNamespace', - 'fruit': True, - } - self.assertEquals(in_file.parameters, expected_parameters) - - -if __name__ == "__main__": - unittest.main()
diff --git a/core/scripts/in_generator.py b/core/scripts/in_generator.py deleted file mode 100644 index b02d6e6..0000000 --- a/core/scripts/in_generator.py +++ /dev/null
@@ -1,119 +0,0 @@ -# Copyright (C) 2013 Google Inc. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -import os.path -import shlex -import shutil -import optparse - -from in_file import InFile - - -class Writer(object): - # Subclasses should override. - class_name = None - defaults = None - valid_values = None - default_parameters = None - - def __init__(self, in_files, enabled_conditions): - if isinstance(in_files, basestring): - in_files = [in_files] - self.in_file = InFile.load_from_files(in_files, self.defaults, self.valid_values, self.default_parameters) - self._enabled_conditions = enabled_conditions - self._outputs = {} # file_name -> generator - - def wrap_with_condition(self, string, condition): - if not condition: - return string - return "#if ENABLE(%(condition)s)\n%(string)s\n#endif" % { 'condition' : condition, 'string' : string } - - def _forcibly_create_text_file_at_path_with_contents(self, file_path, contents): - # FIXME: This method can be made less force-full anytime after 6/1/2013. - # A gyp error was briefly checked into the tree, causing - # a directory to have been generated in place of one of - # our output files. Clean up after that error so that - # all users don't need to clobber their output directories. - shutil.rmtree(file_path, ignore_errors=True) - # The build system should ensure our output directory exists, but just in case. - directory = os.path.dirname(file_path) - if not os.path.exists(directory): - os.makedirs(directory) - - with open(file_path, "w") as file_to_write: - file_to_write.write(contents) - - def _write_file(self, output_dir, contents, file_name): - path = os.path.join(output_dir, file_name) - self._forcibly_create_text_file_at_path_with_contents(path, contents) - - def write_files(self, output_dir): - for file_name, generator in self._outputs.items(): - self._write_file(output_dir, generator(), file_name) - - -class Maker(object): - def __init__(self, writer_class): - self._writer_class = writer_class - - def _enabled_conditions_from_defines(self, defines_arg_string): - if not defines_arg_string: - return [] - - defines_strings = shlex.split(defines_arg_string) - - # We only care about feature defines. - enable_prefix = 'ENABLE_' - - enabled_conditions = [] - for define_string in defines_strings: - split_define = define_string.split('=') - if split_define[1] != '1': - continue - define = split_define[0] - if not define.startswith(enable_prefix): - continue - enabled_conditions.append(define[len(enable_prefix):]) - return enabled_conditions - - def main(self, argv): - script_name = os.path.basename(argv[0]) - args = argv[1:] - if len(args) < 1: - print "USAGE: %i INPUT_FILES" % script_name - exit(1) - - parser = optparse.OptionParser() - parser.add_option("--defines") - parser.add_option("--output_dir", default=os.getcwd()) - (options, args) = parser.parse_args() - - enabled_conditions = self._enabled_conditions_from_defines(options.defines) - - writer = self._writer_class(args, enabled_conditions) - writer.write_files(options.output_dir)
diff --git a/core/scripts/license.py b/core/scripts/license.py deleted file mode 100644 index 32da980..0000000 --- a/core/scripts/license.py +++ /dev/null
@@ -1,62 +0,0 @@ -# Copyright (C) 2013 Google Inc. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -# FIXME: We should either not use license blocks in generated files -# or we should read this from some central license file. - -def license_for_generated_cpp(): - return """/* - * Copyright (C) 2013 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -"""
diff --git a/core/scripts/list_idl_files_with_partial_interface.py b/core/scripts/list_idl_files_with_partial_interface.py deleted file mode 100644 index edebc51..0000000 --- a/core/scripts/list_idl_files_with_partial_interface.py +++ /dev/null
@@ -1,44 +0,0 @@ -# Copyright (C) 2013 Google Inc. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""This file returns a list of all the IDL files that contain a partial interface.""" - -import re -import sys - -partial_interface_regex = re.compile(r'partial\s+interface\s+(\w+).+\]', re.M | re.S) - - -def DoMain(filenames): - partial_files = set() - for filename in filenames: - with open(filename) as f: - match = re.search(partial_interface_regex, f.read()) - if match: - partial_files.add(filename) - return '\n'.join(partial_files)
diff --git a/core/scripts/make-file-arrays.py b/core/scripts/make-file-arrays.py deleted file mode 100755 index 68af2ae..0000000 --- a/core/scripts/make-file-arrays.py +++ /dev/null
@@ -1,136 +0,0 @@ -#!/usr/bin/env python -# Copyright (C) 2012 Google Inc. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -# Usage: make-file-arrays.py [--condition=condition-string] --out-h=<header-file-name> --out-cpp=<cpp-file-name> <input-file>... - -import os.path -import re -import sys -from optparse import OptionParser - - -def make_variable_name_and_read(file_name): - result = re.match(r"([\w\d_]+)\.([\w\d_]+)", os.path.basename(file_name)) - if not result: - print "Invalid input file name:", os.path.basename(file_name) - sys.exit(1) - variable_name = result.group(1)[0].lower() + result.group(1)[1:] + result.group(2).capitalize() - file = open(file_name, "rb") - content = file.read() - file.close() - return (variable_name, content) - - -def strip_whitespace_and_comments(file_name, content): - result = re.match(r".*\.([^.]+)", file_name) - if not result: - print "The file name has no extension:", file_name - sys.exit(1) - extension = result.group(1).lower() - multi_line_comment = re.compile(r"/\*.*?\*/", re.MULTILINE | re.DOTALL) - single_line_comment = re.compile(r"//.*$", re.MULTILINE) - repeating_space = re.compile(r"[ \t]+", re.MULTILINE) - leading_space = re.compile(r"^[ \t]+", re.MULTILINE) - trailing_space = re.compile(r"[ \t]+$", re.MULTILINE) - empty_line = re.compile(r"\n+") - if extension == "js": - content = multi_line_comment.sub("", content) - content = single_line_comment.sub("", content) - content = repeating_space.sub(" ", content) - content = leading_space.sub("", content) - content = trailing_space.sub("", content) - content = empty_line.sub("\n", content) - elif extension == "css": - content = multi_line_comment.sub("", content) - content = repeating_space.sub(" ", content) - content = leading_space.sub("", content) - content = trailing_space.sub("", content) - content = empty_line.sub("\n", content) - return content - - -def main(): - parser = OptionParser() - parser.add_option("--out-h", dest="out_header") - parser.add_option("--out-cpp", dest="out_cpp") - parser.add_option("--condition", dest="flag") - (options, args) = parser.parse_args() - if len(args) < 1: - parser.error("Need one or more input files") - if not options.out_header: - parser.error("Need to specify --out-h=filename") - if not options.out_cpp: - parser.error("Need to specify --out-cpp=filename") - - if options.flag: - options.flag = options.flag.replace(" AND ", " && ") - options.flag = options.flag.replace(" OR ", " || ") - - header_file = open(options.out_header, "w") - if options.flag: - header_file.write("#if " + options.flag + "\n") - header_file.write("namespace WebCore {\n") - - cpp_file = open(options.out_cpp, "w") - cpp_file.write("#include \"config.h\"\n") - cpp_file.write("#include \"" + os.path.basename(options.out_header) + "\"\n") - if options.flag: - cpp_file.write("#if " + options.flag + "\n") - cpp_file.write("namespace WebCore {\n") - - for file_name in args: - (variable_name, content) = make_variable_name_and_read(file_name) - content = strip_whitespace_and_comments(file_name, content) - size = len(content) - header_file.write("extern const char %s[%d];\n" % (variable_name, size)) - cpp_file.write("const char %s[%d] = {\n" % (variable_name, size)) - for index in range(size): - char_code = ord(content[index]) - if char_code < 128: - cpp_file.write("%d" % char_code) - else: - cpp_file.write("'\\x%02x'" % char_code) - cpp_file.write("," if index != len(content) - 1 else "};\n") - if index % 20 == 19: - cpp_file.write("\n") - cpp_file.write("\n") - - header_file.write("}\n") - if options.flag: - header_file.write("#endif\n") - header_file.close() - - cpp_file.write("}\n") - if options.flag: - cpp_file.write("#endif\n") - cpp_file.close() - - -if __name__ == "__main__": - main()
diff --git a/core/scripts/make_css_property_names.py b/core/scripts/make_css_property_names.py deleted file mode 100755 index ab137e9..0000000 --- a/core/scripts/make_css_property_names.py +++ /dev/null
@@ -1,257 +0,0 @@ -#!/usr/bin/env python - -import os.path -import re -import subprocess -import sys - -from in_file import InFile -import in_generator -import license - - -HEADER_TEMPLATE = """ -%(license)s - -#ifndef %(class_name)s_h -#define %(class_name)s_h - -#include "core/css/CSSParserMode.h" -#include "wtf/HashFunctions.h" -#include "wtf/HashTraits.h" -#include <string.h> - -namespace WTF { -class AtomicString; -class String; -} - -namespace WebCore { - -enum CSSPropertyID { - CSSPropertyInvalid = 0, - CSSPropertyVariable = 1, -%(property_enums)s -}; - -const int firstCSSProperty = %(first_property_id)s; -const int numCSSProperties = %(properties_count)s; -const int lastCSSProperty = %(last_property_id)d; -const size_t maxCSSPropertyNameLength = %(max_name_length)d; - -const char* getPropertyName(CSSPropertyID); -const WTF::AtomicString& getPropertyNameAtomicString(CSSPropertyID); -WTF::String getPropertyNameString(CSSPropertyID); -WTF::String getJSPropertyName(CSSPropertyID); -bool isInternalProperty(CSSPropertyID id); - -inline CSSPropertyID convertToCSSPropertyID(int value) -{ - ASSERT((value >= firstCSSProperty && value <= lastCSSProperty) || value == CSSPropertyInvalid); - return static_cast<CSSPropertyID>(value); -} - -} // namespace WebCore - -namespace WTF { -template<> struct DefaultHash<WebCore::CSSPropertyID> { typedef IntHash<unsigned> Hash; }; -template<> struct HashTraits<WebCore::CSSPropertyID> : GenericHashTraits<WebCore::CSSPropertyID> { - static const bool emptyValueIsZero = true; - static const bool needsDestruction = false; - static void constructDeletedValue(WebCore::CSSPropertyID& slot) { slot = static_cast<WebCore::CSSPropertyID>(WebCore::lastCSSProperty + 1); } - static bool isDeletedValue(WebCore::CSSPropertyID value) { return value == (WebCore::lastCSSProperty + 1); } -}; -} - -#endif // %(class_name)s_h -""" - -GPERF_TEMPLATE = """ -%%{ -%(license)s - -#include "config.h" -#include "%(class_name)s.h" -#include "core/platform/HashTools.h" -#include <string.h> - -#include "wtf/ASCIICType.h" -#include "wtf/text/AtomicString.h" -#include "wtf/text/WTFString.h" - -namespace WebCore { -static const char propertyNameStringsPool[] = { -%(property_name_strings)s -}; - -static const unsigned short propertyNameStringsOffsets[] = { -%(property_name_offsets)s -}; - -%%} -%%struct-type -struct Property; -%%omit-struct-type -%%language=C++ -%%readonly-tables -%%global-table -%%compare-strncmp -%%define class-name %(class_name)sHash -%%define lookup-function-name findPropertyImpl -%%define hash-function-name propery_hash_function -%%define slot-name nameOffset -%%define word-array-name property_wordlist -%%enum -%%%% -%(property_to_enum_map)s -%%%% -const Property* findProperty(register const char* str, register unsigned int len) -{ - return %(class_name)sHash::findPropertyImpl(str, len); -} - -const char* getPropertyName(CSSPropertyID id) -{ - if (id < firstCSSProperty) - return 0; - int index = id - firstCSSProperty; - if (index >= numCSSProperties) - return 0; - return propertyNameStringsPool + propertyNameStringsOffsets[index]; -} - -const AtomicString& getPropertyNameAtomicString(CSSPropertyID id) -{ - if (id < firstCSSProperty) - return nullAtom; - int index = id - firstCSSProperty; - if (index >= numCSSProperties) - return nullAtom; - - static AtomicString* propertyStrings = new AtomicString[numCSSProperties]; // Intentionally never destroyed. - AtomicString& propertyString = propertyStrings[index]; - if (propertyString.isNull()) { - const char* propertyName = propertyNameStringsPool + propertyNameStringsOffsets[index]; - propertyString = AtomicString(propertyName, strlen(propertyName), AtomicString::ConstructFromLiteral); - } - return propertyString; -} - -String getPropertyNameString(CSSPropertyID id) -{ - // We share the StringImpl with the AtomicStrings. - return getPropertyNameAtomicString(id).string(); -} - -String getJSPropertyName(CSSPropertyID id) -{ - char result[maxCSSPropertyNameLength + 1]; - const char* cssPropertyName = getPropertyName(id); - const char* propertyNamePointer = cssPropertyName; - if (!propertyNamePointer) - return emptyString(); - - char* resultPointer = result; - while (char character = *propertyNamePointer++) { - if (character == '-') { - char nextCharacter = *propertyNamePointer++; - if (!nextCharacter) - break; - character = (propertyNamePointer - 2 != cssPropertyName) ? toASCIIUpper(nextCharacter) : nextCharacter; - } - *resultPointer++ = character; - } - *resultPointer = '\\0'; - return String(result); -} - -bool isInternalProperty(CSSPropertyID id) -{ - switch (id) { - %(internal_properties)s - return true; - default: - return false; - } -} - -} // namespace WebCore -""" - - -class CSSPropertiesWriter(in_generator.Writer): - class_name = "CSSPropertyNames" - defaults = { - 'alias_for': None, - 'condition': None, - 'is_internal': False, - } - - def __init__(self, file_paths, enabled_conditions): - in_generator.Writer.__init__(self, file_paths, enabled_conditions) - self._outputs = {(self.class_name + ".h"): self.generate_header, - (self.class_name + ".cpp"): self.generate_implementation, - } - - all_properties = self.in_file.name_dictionaries - self._aliases = filter(lambda property: property['alias_for'], all_properties) - for offset, property in enumerate(self._aliases): - # Aliases use the enum_name that they are an alias for. - property['enum_name'] = self._enum_name_from_property_name(property['alias_for']) - # Aliases do not get an enum_value. - - self._properties = filter(lambda property: not property['alias_for'] and not property['condition'] or property['condition'] in self._enabled_conditions, all_properties) - if len(self._properties) > 1024: - print "ERROR : There is more than 1024 CSS Properties, you need to update CSSProperty.h/StylePropertyMetadata m_propertyID accordingly." - exit(1) - self._first_property_id = 2 # We start after CSSPropertyInvalid and CSSPropertyVariable. - property_id = self._first_property_id - for offset, property in enumerate(self._properties): - property['enum_name'] = self._enum_name_from_property_name(property['name']) - property['enum_value'] = self._first_property_id + offset - if property['name'].startswith('-internal-'): - property['is_internal'] = True - - def _enum_name_from_property_name(self, property_name): - return "CSSProperty" + re.sub(r'(^[^-])|-(.)', lambda match: (match.group(1) or match.group(2)).upper(), property_name) - - def _enum_declaration(self, property): - return " %(enum_name)s = %(enum_value)s," % property - - def generate_header(self): - return HEADER_TEMPLATE % { - 'license': license.license_for_generated_cpp(), - 'class_name': self.class_name, - 'property_enums': "\n".join(map(self._enum_declaration, self._properties)), - 'first_property_id': self._first_property_id, - 'properties_count': len(self._properties), - 'last_property_id': self._first_property_id + len(self._properties) - 1, - 'max_name_length': reduce(max, map(len, map(lambda property: property['name'], self._properties))), - } - - def _case_properties(self, property): - return "case %(enum_name)s:" % property - - def generate_implementation(self): - property_offsets = [] - current_offset = 0 - for property in self._properties: - property_offsets.append(current_offset) - current_offset += len(property["name"]) + 1 - - gperf_input = GPERF_TEMPLATE % { - 'license': license.license_for_generated_cpp(), - 'class_name': self.class_name, - 'property_name_strings': '\n'.join(map(lambda property: ' "%(name)s\\0"' % property, self._properties)), - 'property_name_offsets': '\n'.join(map(lambda offset: ' %d,' % offset, property_offsets)), - 'property_to_enum_map': '\n'.join(map(lambda property: '%(name)s, %(enum_name)s' % property, self._properties + self._aliases)), - 'internal_properties': '\n'.join(map(self._case_properties, filter(lambda property: property['is_internal'], self._properties))), - } - # FIXME: If we could depend on Python 2.7, we would use subprocess.check_output - gperf_args = ['gperf', '--key-positions=*', '-P', '-D', '-n', '-s', '2'] - gperf = subprocess.Popen(gperf_args, stdin=subprocess.PIPE, stdout=subprocess.PIPE) - return gperf.communicate(gperf_input)[0] - - -if __name__ == "__main__": - in_generator.Maker(CSSPropertiesWriter).main(sys.argv)
diff --git a/core/scripts/make_css_value_keywords.py b/core/scripts/make_css_value_keywords.py deleted file mode 100755 index 0b5a3d6..0000000 --- a/core/scripts/make_css_value_keywords.py +++ /dev/null
@@ -1,177 +0,0 @@ -#!/usr/bin/env python - -import os.path -import re -import subprocess -import sys - -from in_file import InFile -import in_generator -import license - - -HEADER_TEMPLATE = """ -%(license)s - -#ifndef %(class_name)s_h -#define %(class_name)s_h - -#include "core/css/CSSParserMode.h" -#include <string.h> - -namespace WebCore { - -enum CSSValueID { -%(value_keyword_enums)s -}; - -const int numCSSValueKeywords = %(value_keywords_count)d; -const size_t maxCSSValueKeywordLength = %(max_value_keyword_length)d; - -const char* getValueName(unsigned short id); -bool isValueAllowedInMode(unsigned short id, CSSParserMode mode); - -} // namespace WebCore - -#endif // %(class_name)s_h -""" - -GPERF_TEMPLATE = """ -%%{ -%(license)s - -#include "config.h" -#include "%(class_name)s.h" -#include "core/platform/HashTools.h" -#include <string.h> - -namespace WebCore { -static const char valueListStringPool[] = { -"\\0" -%(value_keyword_strings)s -}; - -static const unsigned short valueListStringOffsets[] = { -%(value_keyword_offsets)s -}; - -%%} -%%struct-type -struct Value; -%%omit-struct-type -%%language=C++ -%%readonly-tables -%%compare-strncmp -%%define class-name %(class_name)sHash -%%define lookup-function-name findValueImpl -%%define hash-function-name value_hash_function -%%define slot-name nameOffset -%%define word-array-name value_word_list -%%pic -%%enum -%%%% -%(value_keyword_to_enum_map)s -%%%% -const Value* findValue(register const char* str, register unsigned int len) -{ - return CSSValueKeywordsHash::findValueImpl(str, len); -} - -const char* getValueName(unsigned short id) -{ - if (id >= numCSSValueKeywords || id <= 0) - return 0; - return valueListStringPool + valueListStringOffsets[id]; -} - -bool isValueAllowedInMode(unsigned short id, CSSParserMode mode) -{ - switch (id) { - %(ua_sheet_mode_values_keywords)s - return mode == UASheetMode; - %(quirks_mode_values_keywords)s - return mode == CSSQuirksMode; - %(quirks_mode_or_ua_sheet_mode_values_keywords)s - return mode == UASheetMode || mode == CSSQuirksMode; - default: - return true; - } -} - -} // namespace WebCore -""" - - -class CSSValueKeywordsWriter(in_generator.Writer): - class_name = "CSSValueKeywords" - defaults = { - 'condition': None, - 'mode': None, - } - - def __init__(self, file_paths, enabled_conditions): - in_generator.Writer.__init__(self, file_paths, enabled_conditions) - self._outputs = {(self.class_name + ".h"): self.generate_header, - (self.class_name + ".cpp"): self.generate_implementation, - } - - all_properties = self.in_file.name_dictionaries - self._value_keywords = filter(lambda property: not property['condition'] or property['condition'] in self._enabled_conditions, all_properties) - first_property_id = 1 - for offset, property in enumerate(self._value_keywords): - property['name'] = property['name'].lower() - property['enum_name'] = self._enum_name_from_value_keyword(property['name']) - property['enum_value'] = first_property_id + offset - if property['name'].startswith('-internal-'): - assert property['mode'] is None, 'Can\'t specify mode for value keywords with the prefix "-internal-".' - property['mode'] = 'UASheet' - else: - assert property['mode'] != 'UASheet', 'UASheet mode only value keywords should have the prefix "-internal-".' - - def _enum_name_from_value_keyword(self, value_keyword): - return "CSSValue" + "".join(w.capitalize() for w in value_keyword.split("-")) - - def _enum_declaration(self, property): - return " %(enum_name)s = %(enum_value)s," % property - - def _case_value_keyword(self, property): - return "case %(enum_name)s:" % property - - def generate_header(self): - enum_enties = map(self._enum_declaration, [{'enum_name': 'CSSValueInvalid', 'enum_value': 0}] + self._value_keywords) - return HEADER_TEMPLATE % { - 'license': license.license_for_generated_cpp(), - 'class_name': self.class_name, - 'value_keyword_enums': "\n".join(enum_enties), - 'value_keywords_count': len(enum_enties), - 'max_value_keyword_length': reduce(max, map(len, map(lambda property: property['name'], self._value_keywords))), - } - - def _value_keywords_with_mode(self, mode): - return filter(lambda property: property['mode'] == mode, self._value_keywords) - - def generate_implementation(self): - keyword_offsets = [0] - current_offset = 1 - for keyword in self._value_keywords: - keyword_offsets.append(current_offset) - current_offset += len(keyword["name"]) + 1 - - gperf_input = GPERF_TEMPLATE % { - 'license': license.license_for_generated_cpp(), - 'class_name': self.class_name, - 'value_keyword_strings': '\n'.join(map(lambda property: ' "%(name)s\\0"' % property, self._value_keywords)), - 'value_keyword_offsets': '\n'.join(map(lambda offset: ' %d,' % offset, keyword_offsets)), - 'value_keyword_to_enum_map': '\n'.join(map(lambda property: '%(name)s, %(enum_name)s' % property, self._value_keywords)), - 'ua_sheet_mode_values_keywords': '\n '.join(map(self._case_value_keyword, self._value_keywords_with_mode('UASheet'))), - 'quirks_mode_values_keywords': '\n '.join(map(self._case_value_keyword, self._value_keywords_with_mode('Quirks'))), - 'quirks_mode_or_ua_sheet_mode_values_keywords': '\n '.join(map(self._case_value_keyword, self._value_keywords_with_mode('QuirksOrUASheet'))), - } - # FIXME: If we could depend on Python 2.7, we would use subprocess.check_output - gperf_args = ['gperf', '--key-positions=*', '-D', '-n', '-s', '2'] - gperf = subprocess.Popen(gperf_args, stdin=subprocess.PIPE, stdout=subprocess.PIPE) - return gperf.communicate(gperf_input)[0] - - -if __name__ == "__main__": - in_generator.Maker(CSSValueKeywordsWriter).main(sys.argv)
diff --git a/core/scripts/make_event_factory.py b/core/scripts/make_event_factory.py deleted file mode 100644 index ace45ab..0000000 --- a/core/scripts/make_event_factory.py +++ /dev/null
@@ -1,100 +0,0 @@ -#!/usr/bin/env python -# Copyright (C) 2013 Google Inc. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -import os.path -import sys -import shutil - -from in_file import InFile -import name_macros -from name_utilities import lower_first -import license - - -IMPLEMENTATION_TEMPLATE = """%(license)s -#include "config.h" -#include "%(class_name)sFactory.h" - -#include "%(class_name)sHeaders.h" -#include "RuntimeEnabledFeatures.h" - -namespace WebCore { - -PassRefPtr<%(class_name)s> %(class_name)sFactory::create(const String& type) -{ -%(factory_implementation)s - return 0; -} - -} // namespace WebCore -""" - - -class EventFactoryWriter(name_macros.Writer): - defaults = { - 'ImplementedAs': None, - 'Conditional': None, - 'EnabledAtRuntime': None, - } - default_parameters = { - 'namespace': '', - } - - def __init__(self, in_file_path, enabled_conditions): - super(EventFactoryWriter, self).__init__(in_file_path, enabled_conditions) - self._outputs[(self.class_name + ".cpp")] = self.generate_implementation - - def _events(self): - return self.in_file.name_dictionaries - - def _factory_implementation(self, event): - if event['EnabledAtRuntime']: - runtime_condition = ' && RuntimeEnabledFeatures::%s()' % lower_first(event['EnabledAtRuntime']) - else: - runtime_condition = '' - name = os.path.basename(event['name']) - class_name = self._class_name_for_entry(event) - implementation = """ if (type == "%(name)s"%(runtime_condition)s) - return %(class_name)s::create();""" % { - 'name': name, - 'runtime_condition': runtime_condition, - 'class_name': class_name, - } - return self.wrap_with_condition(implementation, event['Conditional']) - - def generate_implementation(self): - return IMPLEMENTATION_TEMPLATE % { - 'class_name': self.class_name, - 'license': license.license_for_generated_cpp(), - 'factory_implementation': "\n".join(map(self._factory_implementation, self._events())), - } - - -if __name__ == "__main__": - name_macros.Maker(EventFactoryWriter).main(sys.argv)
diff --git a/core/scripts/make_internal_runtime_flags.py b/core/scripts/make_internal_runtime_flags.py deleted file mode 100755 index 522e00f..0000000 --- a/core/scripts/make_internal_runtime_flags.py +++ /dev/null
@@ -1,64 +0,0 @@ -#!/usr/bin/env python -# Copyright (C) 2013 Google Inc. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -import os.path -import sys - -import in_generator -import make_runtime_features -import template_expander - - -# We want exactly the same parsing as RuntimeFeatureWriter -# but generate different files. -class InternalRuntimeFlagsWriter(make_runtime_features.RuntimeFeatureWriter): - class_name = "InternalRuntimeFlags" - - def __init__(self, in_file_path, enabled_conditions): - super(InternalRuntimeFlagsWriter, self).__init__(in_file_path, enabled_conditions) - self._outputs = {(self.class_name + ".idl"): self.generate_idl, - (self.class_name + ".h"): self.generate_header, - } - - @template_expander.use_jinja(class_name + ".idl.tmpl") - def generate_idl(self): - return { - 'features': self._features, - } - - @template_expander.use_jinja(class_name + ".h.tmpl") - def generate_header(self): - return { - 'features': self._features, - 'feature_sets': self._feature_sets(), - } - - -if __name__ == "__main__": - in_generator.Maker(InternalRuntimeFlagsWriter).main(sys.argv)
diff --git a/core/scripts/make_runtime_features.py b/core/scripts/make_runtime_features.py deleted file mode 100755 index ad84a25..0000000 --- a/core/scripts/make_runtime_features.py +++ /dev/null
@@ -1,92 +0,0 @@ -#!/usr/bin/env python -# Copyright (C) 2013 Google Inc. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -import os.path -import sys - -from in_file import InFile -import in_generator -from name_utilities import lower_first -import template_expander - - -class RuntimeFeatureWriter(in_generator.Writer): - class_name = 'RuntimeEnabledFeatures' - - # FIXME: valid_values and defaults should probably roll into one object. - valid_values = { - 'status': ['stable', 'experimental', 'test'], - } - defaults = { - 'condition' : None, - 'depends_on' : [], - 'custom': False, - 'status': None, - } - - def __init__(self, in_file_path, enabled_conditions): - super(RuntimeFeatureWriter, self).__init__(in_file_path, enabled_conditions) - self._outputs = {(self.class_name + ".h"): self.generate_header, - (self.class_name + ".cpp"): self.generate_implementation, - } - - self._features = self.in_file.name_dictionaries - # Make sure the resulting dictionaries have all the keys we expect. - for feature in self._features: - feature['first_lowered_name'] = lower_first(feature['name']) - # Most features just check their isFooEnabled bool - # but some depend on more than one bool. - enabled_condition = "is%sEnabled" % feature['name'] - for dependant_name in feature['depends_on']: - enabled_condition += " && is%sEnabled" % dependant_name - feature['enabled_condition'] = enabled_condition - self._non_custom_features = filter(lambda feature: not feature['custom'], self._features) - - def _feature_sets(self): - # Another way to think of the status levels is as "sets of features" - # which is how we're referring to them in this generator. - return self.valid_values['status'] - - @template_expander.use_jinja(class_name + ".h.tmpl") - def generate_header(self): - return { - 'features': self._features, - 'feature_sets': self._feature_sets(), - } - - @template_expander.use_jinja(class_name + ".cpp.tmpl") - def generate_implementation(self): - return { - 'features': self._features, - 'feature_sets': self._feature_sets(), - } - - -if __name__ == "__main__": - in_generator.Maker(RuntimeFeatureWriter).main(sys.argv)
diff --git a/core/scripts/make_style_builder.py b/core/scripts/make_style_builder.py deleted file mode 100755 index b408c94..0000000 --- a/core/scripts/make_style_builder.py +++ /dev/null
@@ -1,128 +0,0 @@ -#!/usr/bin/env python -# Copyright (C) 2013 Google Inc. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -import re -import sys - -import in_generator -import template_expander - - -class StyleBuilderWriter(in_generator.Writer): - class_name = 'StyleBuilder' - - valid_values = { - 'svg': [True, False], - 'custom_all': [True, False], - 'custom_initial': [True, False], - 'custom_inherit': [True, False], - 'custom_value': [True, False], - } - defaults = { - 'condition': None, - 'name_for_methods': None, - 'use_handlers_for': None, - 'svg': False, - 'converter': None, -# These depend on property name by default - 'type_name': None, - 'getter': None, - 'setter': None, - 'initial': None, -# Setting these stops default handlers being generated -# Setting custom_all is the same as setting the other three - 'custom_all': False, - 'custom_initial': False, - 'custom_inherit': False, - 'custom_value': False, - } - - def __init__(self, in_files, enabled_conditions): - super(StyleBuilderWriter, self).__init__(in_files, enabled_conditions) - self._outputs = {("StyleBuilderFunctions.h"): self.generate_style_builder_functions_h, - ("StyleBuilderFunctions.cpp"): self.generate_style_builder_functions_cpp, - ("StyleBuilder.cpp"): self.generate_style_builder, - } - - self._properties = self.in_file.name_dictionaries - - def set_if_none(property, key, value): - if property[key] is None: - property[key] = value - - for property in self._properties: - cc = self._camelcase_property_name(property["name"]) - property["property_id"] = "CSSProperty" + cc - cc = property["name_for_methods"] or cc.replace("Webkit", "") - property["camel_case_name"] = cc - set_if_none(property, "type_name", "E" + cc) - set_if_none(property, "getter", self._lower_first(cc)) - set_if_none(property, "setter", "set" + cc) - set_if_none(property, "initial", "initial" + cc) - if property["custom_all"]: - property["custom_initial"] = True - property["custom_inherit"] = True - property["custom_value"] = True - - self._properties = dict((property["property_id"], property) for property in self._properties) - -# FIXME: some of these might be better in a utils file - @staticmethod - def _camelcase_property_name(property_name): - return re.sub(r'(^[^-])|-(.)', lambda match: (match.group(1) or match.group(2)).upper(), property_name) - - @staticmethod - def _lower_first(s): - return s[0].lower() + s[1:] - - @staticmethod - def _upper_first(s): - return s[0].upper() + s[1:] - - @template_expander.use_jinja("StyleBuilderFunctions.h.tmpl") - def generate_style_builder_functions_h(self): - return { - "properties": self._properties, - } - - @template_expander.use_jinja("StyleBuilderFunctions.cpp.tmpl") - def generate_style_builder_functions_cpp(self): - return { - "properties": self._properties, - } - - @template_expander.use_jinja("StyleBuilder.cpp.tmpl") - def generate_style_builder(self): - return { - "properties": self._properties, - } - - -if __name__ == "__main__": - in_generator.Maker(StyleBuilderWriter).main(sys.argv)
diff --git a/core/scripts/make_style_shorthands.py b/core/scripts/make_style_shorthands.py deleted file mode 100644 index c73de2f..0000000 --- a/core/scripts/make_style_shorthands.py +++ /dev/null
@@ -1,96 +0,0 @@ -#!/usr/bin/env python -# Copyright (C) 2013 Intel Corporation. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -import re -import sys -from collections import defaultdict - -import in_generator -import template_expander - - -class StylePropertyShorthandWriter(in_generator.Writer): - class_name = 'StylePropertyShorthand' - - defaults = { - 'longhands': "", - 'runtimeEnabledShorthand': None, - } - - def __init__(self, in_files, enabled_conditions): - super(StylePropertyShorthandWriter, self).__init__(in_files, enabled_conditions) - self._outputs = {("StylePropertyShorthand.cpp"): self.generate_style_property_shorthand_cpp, ("StylePropertyShorthand.h"): self.generate_style_property_shorthand_h} - - self._properties = self.in_file.name_dictionaries - self._longhand_dictionary = defaultdict(list) - - for property in self._properties: - cc = self._camelcase_property_name(property["name"]) - property["property_id"] = self._create_css_property_name_enum_value(cc) - cc = cc[0].lower() + cc[1:] - property["camel_case_name"] = cc - longhands = property["longhands"].split(';') - property["camel_case_longhands"] = list() - for longhand in longhands: - longhand = self._camelcase_property_name(longhand) - longhand = self._create_css_property_name_enum_value(longhand) - property["camel_case_longhands"].append(longhand) - self._longhand_dictionary[longhand].append(property) - if property["runtimeEnabledShorthand"] is not None: - lowerFirstConditional = self._lower_first(property["runtimeEnabledShorthand"]) - property["runtime_conditional_getter"] = "%sEnabled" % lowerFirstConditional - self._properties = dict((property["property_id"], property) for property in self._properties) - -# FIXME: some of these might be better in a utils file - def _camelcase_property_name(self, property_name): - return re.sub(r'(^[^-])|-(.)', lambda match: (match.group(1) or match.group(2)).upper(), property_name) - - def _create_css_property_name_enum_value(self, property_name): - return "CSSProperty" + property_name - - def _lower_first(self, string): - lowered = string[0].lower() + string[1:] - lowered = lowered.replace("cSS", "css") - return lowered - - @template_expander.use_jinja("StylePropertyShorthand.cpp.tmpl") - def generate_style_property_shorthand_cpp(self): - return { - "properties": self._properties, - "longhands_dictionary": self._longhand_dictionary, - } - - @template_expander.use_jinja("StylePropertyShorthand.h.tmpl") - def generate_style_property_shorthand_h(self): - return { - "properties": self._properties, - } - -if __name__ == "__main__": - in_generator.Maker(StylePropertyShorthandWriter).main(sys.argv)
diff --git a/core/scripts/make_token_matcher.py b/core/scripts/make_token_matcher.py deleted file mode 100755 index 10fae62..0000000 --- a/core/scripts/make_token_matcher.py +++ /dev/null
@@ -1,231 +0,0 @@ -#!/usr/bin/env python -# Copyright (C) 2013 Google Inc. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -import io -import itertools -import re -import sys - - -class BadInput(Exception): - """Unsupported input has been found.""" - - -class SwitchCase(object): - """Represents a CASE block.""" - def __init__(self, identifier, block): - self.identifier = identifier - self.block = block - - -class Optimizer(object): - """Generates optimized identifier matching code.""" - def __init__(self, output_file, array_variable, length_variable): - self.output_file = output_file - self.array_variable = array_variable - self.length_variable = length_variable - - def inspect(self, cases): - lengths = list(set([len(c.identifier) for c in cases])) - lengths.sort() - - def response(length): - self.inspect_array([c for c in cases if len(c.identifier) == length], range(length)) - self.write_selection(self.length_variable, lengths, str, response) - - def score(self, alternatives): - return -sum([len(list(count)) ** 2 for _, count in itertools.groupby(sorted(alternatives))]) - - def choose_selection_pos(self, cases, pending): - candidates = [pos for pos in pending if all(alternative.isalpha() for alternative in [c.identifier[pos] for c in cases])] - if not candidates: - raise BadInput('Case-insensitive switching on non-alphabetic characters not yet implemented') - return sorted(candidates, key=lambda pos: self.score([c.identifier[pos] for c in cases]))[0] - - def inspect_array(self, cases, pending): - assert len(cases) >= 1 - if pending: - common = [pos for pos in pending - if len(set([c.identifier[pos] for c in cases])) == 1] - if common: - identifier = cases[0].identifier - for index in xrange(len(common)): - if index == 0: - self.output_file.write(u'if (LIKELY(') - else: - self.output_file.write(u' && ') - pos = common[index] - if identifier[pos].isalpha(): - self.output_file.write("(%s[%d] | 0x20) == '%s'" % - (self.array_variable, pos, identifier[pos])) - else: - self.output_file.write("%s[%d] == '%s'" % - (self.array_variable, pos, identifier[pos])) - self.output_file.write(u')) {\n') - next_pending = list(set(pending) - set(common)) - next_pending.sort() - self.inspect_array(cases, next_pending) - self.output_file.write(u'}\n') - else: - pos = self.choose_selection_pos(cases, pending) - next_pending = filter(lambda p: p != pos, pending) - - alternatives = list(set([c.identifier[pos] for c in cases])) - alternatives.sort() - - def literal(alternative): - if isinstance(alternative, int): - return str(alternative) - else: - return "'%s'" % alternative - - def response(alternative): - self.inspect_array([c for c in cases if c.identifier[pos] == alternative], - next_pending) - - expression = '(%s[%d] | 0x20)' % (self.array_variable, pos) - self.write_selection(expression, alternatives, literal, response) - else: - assert len(cases) == 1 - for block_line in cases[0].block: - self.output_file.write(block_line) - - def write_selection(self, expression, alternatives, literal, response): - if len(alternatives) == 1: - self.output_file.write(u'if (LIKELY(%s == %s)) {\n' % (expression, literal(alternatives[0]))) - response(alternatives[0]) - self.output_file.write(u'}\n') - elif len(alternatives) == 2: - self.output_file.write(u'if (%s == %s) {\n' % (expression, literal(alternatives[0]))) - response(alternatives[0]) - self.output_file.write(u'} else if (LIKELY(%s == %s)) {\n' % (expression, literal(alternatives[1]))) - response(alternatives[1]) - self.output_file.write(u'}\n') - else: - self.output_file.write('switch (%s) {\n' % expression) - for alternative in alternatives: - self.output_file.write(u'case %s: {\n' % literal(alternative)) - response(alternative) - self.output_file.write(u'} break;\n') - self.output_file.write(u'}\n') - - -class LineProcessor(object): - def process_line(self, line): - pass - - -class MainLineProcessor(LineProcessor): - """Processes the contents of an input file.""" - SWITCH_PATTERN = re.compile(r'\s*SWITCH\s*\((\w*),\s*(\w*)\) \{$') - - def __init__(self, output_file): - self.output_file = output_file - - def process_line(self, line): - match_switch = MainLineProcessor.SWITCH_PATTERN.match(line) - if match_switch: - array_variable = match_switch.group(1) - length_variable = match_switch.group(2) - return SwitchLineProcessor(self, self.output_file, array_variable, length_variable) - else: - self.output_file.write(line) - return self - - -class SwitchLineProcessor(LineProcessor): - """Processes the contents of a SWITCH block.""" - CASE_PATTERN = re.compile(r'\s*CASE\s*\(\"([a-z0-9_\-\(]*)\"\) \{$') - CLOSE_BRACE_PATTERN = re.compile(r'\s*\}$') - EMPTY_PATTERN = re.compile(r'\s*$') - - def __init__(self, parent, output_file, array_variable, length_variable): - self.parent = parent - self.output_file = output_file - self.array_variable = array_variable - self.length_variable = length_variable - self.cases = [] - - def process_line(self, line): - match_case = SwitchLineProcessor.CASE_PATTERN.match(line) - match_close_brace = SwitchLineProcessor.CLOSE_BRACE_PATTERN.match(line) - match_empty = SwitchLineProcessor.EMPTY_PATTERN.match(line) - if match_case: - identifier = match_case.group(1) - return CaseLineProcessor(self, self.output_file, identifier) - elif match_close_brace: - Optimizer(self.output_file, self.array_variable, self.length_variable).inspect(self.cases) - return self.parent - elif match_empty: - return self - else: - raise BadInput('Invalid line within SWITCH: %s' % line) - - def add_case(self, latest_case): - if latest_case.identifier in [c.identifier for c in self.cases]: - raise BadInput('Repeated case: %s' % latest_case.identifier) - self.cases.append(latest_case) - - -class CaseLineProcessor(LineProcessor): - """Processes the contents of a CASE block.""" - CLOSE_BRACE_PATTERN = re.compile(r'\s*\}$') - BREAK_PATTERN = re.compile(r'break;') - - def __init__(self, parent, output_file, identifier): - self.parent = parent - self.output_file = output_file - self.identifier = identifier - self.block = [] - - def process_line(self, line): - match_close_brace = CaseLineProcessor.CLOSE_BRACE_PATTERN.match(line) - match_break = CaseLineProcessor.BREAK_PATTERN.search(line) - if match_close_brace: - self.parent.add_case(SwitchCase(self.identifier, self.block)) - return self.parent - elif match_break: - raise BadInput('break within CASE not supported: %s' % line) - else: - self.block.append(line) - return self - - -def process_file(input_name, output_name): - """Transforms input file into legal C++ source code.""" - with io.open(input_name, 'r', -1, 'utf-8') as input_file: - with io.open(output_name, 'w', -1, 'utf-8') as output_file: - processor = MainLineProcessor(output_file) - input_lines = input_file.readlines() - for line in input_lines: - processor = processor.process_line(line) - - -if __name__ == '__main__': - process_file(sys.argv[1], sys.argv[2])
diff --git a/core/scripts/make_token_matcher_unittest.py b/core/scripts/make_token_matcher_unittest.py deleted file mode 100755 index c0c8286..0000000 --- a/core/scripts/make_token_matcher_unittest.py +++ /dev/null
@@ -1,243 +0,0 @@ -#!/usr/bin/env python -# Copyright (C) 2013 Google Inc. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -import tempfile -import unittest - -from make_token_matcher import BadInput, CaseLineProcessor, MainLineProcessor, Optimizer, process_file, SwitchCase, SwitchLineProcessor - - -class OptimizerTest(unittest.TestCase): - def test_nonalphabetic(self): - optimizer = Optimizer(None, None, None) - self.assertRaises( - BadInput, - optimizer.inspect_array, - [SwitchCase('-', None), SwitchCase('x', None)], - [0]) - - -class MainLineProcessorTest(unittest.TestCase): - def test_switch(self): - processor = MainLineProcessor(None) - switchLineProcessor = processor.process_line('SWITCH(array, length) {') - self.assertIsInstance(switchLineProcessor, SwitchLineProcessor) - self.assertEquals('array', switchLineProcessor.array_variable) - self.assertEquals('length', switchLineProcessor.length_variable) - - -class SwitchLineProcessorTest(unittest.TestCase): - def test_case(self): - processor = SwitchLineProcessor(None, None, None, None) - caseLineProcessor = processor.process_line('CASE("identifier") {') - self.assertIsInstance(caseLineProcessor, CaseLineProcessor) - self.assertEquals('identifier', caseLineProcessor.identifier) - - def test_unexpected(self): - processor = SwitchLineProcessor(None, None, None, None) - self.assertRaises( - BadInput, - processor.process_line, - 'unexpected') - - def test_repeated(self): - processor = SwitchLineProcessor(None, None, None, None) - processor.process_line('CASE("x") {').process_line('}') - caseLineProcessor = processor.process_line('CASE("x") {') - self.assertRaises( - BadInput, - caseLineProcessor.process_line, - '}') - - -class CaseLineProcessorTest(unittest.TestCase): - def test_break(self): - processor = CaseLineProcessor(None, None, None) - self.assertRaises( - BadInput, - processor.process_line, - 'break;') - - -class ProcessFileTest(unittest.TestCase): - SOURCE_SMALL = """ - SWITCH(p, q) { - CASE("a(") { - X; - } - CASE("b(") { - Y; - } - } - """ - - EXPECTED_SMALL = """ - if (LIKELY(q == 2)) { - if (LIKELY(p[1] == '(')) { - if ((p[0] | 0x20) == 'a') { - X; - } else if (LIKELY((p[0] | 0x20) == 'b')) { - Y; - } - } - } - """ - - SOURCE_MEDIUM = """ - SWITCH (p, q) { - CASE ("ab") { - X; - } - CASE ("cd") { - Y; - } - CASE ("ed") { - Z; - } - } - """ - - EXPECTED_MEDIUM = """ - if (LIKELY(q == 2)) { - if ((p[1] | 0x20) == 'b') { - if (LIKELY((p[0] | 0x20) == 'a')) { - X; - } - } else if (LIKELY((p[1] | 0x20) == 'd')) { - if ((p[0] | 0x20) == 'c') { - Y; - } else if (LIKELY((p[0] | 0x20) == 'e')) { - Z; - } - } - } - """ - - SOURCE_LARGE = """ - prefix; - SWITCH(p, q) { - CASE("hij") { - R; - } - CASE("efg") { - S; - } - CASE("c-") { - T; - } - CASE("klm") { - U; - } - - CASE("d-") { - V; - } - CASE("a") { - W; - X; - } - CASE("b-") { - Y; - Z; - } - } - suffix; - """ - - EXPECTED_LARGE = """ - prefix; - switch (q) { - case 1: { - if (LIKELY((p[0] | 0x20) == 'a')) { - W; - X; - } - } break; - case 2: { - if (LIKELY(p[1] == '-')) { - switch ((p[0] | 0x20)) { - case 'b': { - Y; - Z; - } break; - case 'c': { - T; - } break; - case 'd': { - V; - } break; - } - } - } break; - case 3: { - switch ((p[0] | 0x20)) { - case 'e': { - if (LIKELY((p[1] | 0x20) == 'f' && (p[2] | 0x20) == 'g')) { - S; - } - } break; - case 'h': { - if (LIKELY((p[1] | 0x20) == 'i' && (p[2] | 0x20) == 'j')) { - R; - } - } break; - case 'k': { - if (LIKELY((p[1] | 0x20) == 'l' && (p[2] | 0x20) == 'm')) { - U; - } - } break; - } - } break; - } - suffix; - """ - - def validate(self, source, expected): - with tempfile.NamedTemporaryFile() as input_file: - with tempfile.NamedTemporaryFile() as generated_file: - input_file.write(source) - input_file.flush() - process_file(input_file.name, generated_file.name) - # Our code generation does not yet implement pretty indentation. - actual = generated_file.read().replace(' ', '') - expected = expected.replace(' ', '') - self.assertEquals(actual, expected) - - def test_small(self): - self.validate(ProcessFileTest.SOURCE_SMALL, ProcessFileTest.EXPECTED_SMALL) - - def test_medium(self): - self.validate(ProcessFileTest.SOURCE_MEDIUM, ProcessFileTest.EXPECTED_MEDIUM) - - def test_large(self): - self.validate(ProcessFileTest.SOURCE_LARGE, ProcessFileTest.EXPECTED_LARGE) - - -if __name__ == "__main__": - unittest.main()
diff --git a/core/scripts/name_macros.py b/core/scripts/name_macros.py deleted file mode 100644 index 01d3644..0000000 --- a/core/scripts/name_macros.py +++ /dev/null
@@ -1,175 +0,0 @@ -# Copyright (C) 2013 Google Inc. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -import os.path -import re - -import in_generator -from in_generator import Maker -import license - - -HEADER_TEMPLATE = """%(license)s - -#ifndef %(class_name)sHeaders_h -#define %(class_name)sHeaders_h - -%(includes)s - -#endif // %(class_name)sHeaders_h -""" - - -INTERFACES_HEADER_TEMPLATE = """%(license)s - -#ifndef %(class_name)sInterfaces_h -#define %(class_name)sInterfaces_h - -%(declare_conditional_macros)s - -#define %(macro_style_name)s_INTERFACES_FOR_EACH(macro) \\ - \\ -%(unconditional_macros)s - \\ -%(conditional_macros)s - -#endif // %(class_name)sInterfaces_h -""" - - -def _to_macro_style(name): - s1 = re.sub('(.)([A-Z][a-z]+)', r'\1_\2', name) - return re.sub('([a-z0-9])([A-Z])', r'\1_\2', s1).upper() - - -class Writer(in_generator.Writer): - def __init__(self, in_file_path, enabled_conditions): - super(Writer, self).__init__(in_file_path, enabled_conditions) - self.class_name = self.in_file.parameters['namespace'].strip('"') - self._entries_by_conditional = {} - self._unconditional_entries = [] - self._sort_entries_by_conditional() - self._outputs = {(self.class_name + "Headers.h"): self.generate_headers_header, - (self.class_name + "Interfaces.h"): self.generate_interfaces_header, - } - - def _sort_entries_by_conditional(self): - unconditional_names = set() - for entry in self.in_file.name_dictionaries: - conditional = entry['Conditional'] - if not conditional: - name = self._class_name_for_entry(entry) - if name in unconditional_names: - continue - unconditional_names.add(name) - self._unconditional_entries.append(entry) - continue - for entry in self.in_file.name_dictionaries: - name = self._class_name_for_entry(entry) - if name in unconditional_names: - continue - conditional = entry['Conditional'] - if not conditional in self._entries_by_conditional: - self._entries_by_conditional[conditional] = [] - self._entries_by_conditional[conditional].append(entry) - - def _class_name_for_entry(self, entry): - if entry['ImplementedAs']: - return entry['ImplementedAs'] - return os.path.basename(entry['name']) - - def _headers_header_include_path(self, entry): - if entry['ImplementedAs']: - path = os.path.dirname(entry['name']) - if len(path): - path += '/' - path += entry['ImplementedAs'] - else: - path = entry['name'] - return path + '.h' - - def _headers_header_includes(self, entries): - includes = dict() - for entry in entries: - class_name = self._class_name_for_entry(entry) - # Avoid duplicate includes. - if class_name in includes: - continue - include = '#include "%(path)s"\n#include "V8%(js_name)s.h"' % { - 'path': self._headers_header_include_path(entry), - 'js_name': os.path.basename(entry['name']), - } - includes[class_name] = self.wrap_with_condition(include, entry['Conditional']) - return includes.values() - - def generate_headers_header(self): - return HEADER_TEMPLATE % { - 'license': license.license_for_generated_cpp(), - 'class_name': self.class_name, - 'includes': '\n'.join(self._headers_header_includes(self.in_file.name_dictionaries)), - } - - def _declare_one_conditional_macro(self, conditional, entries): - macro_name = '%(macro_style_name)s_INTERFACES_FOR_EACH_%(conditional)s' % { - 'macro_style_name': _to_macro_style(self.class_name), - 'conditional': conditional, - } - return self.wrap_with_condition("""#define %(macro_name)s(macro) \\ -%(declarations)s - -#else -#define %(macro_name)s(macro)""" % { - 'macro_name': macro_name, - 'declarations': '\n'.join(sorted(set([ - ' macro(%(name)s) \\' % {'name': self._class_name_for_entry(entry)} - for entry in entries]))), - }, conditional) - - def _declare_conditional_macros(self): - return '\n'.join([ - self._declare_one_conditional_macro(conditional, entries) - for conditional, entries in self._entries_by_conditional.items()]) - - def _unconditional_macro(self, entry): - return ' macro(%(name)s) \\' % {'name': self._class_name_for_entry(entry)} - - def _conditional_macros(self, conditional): - return ' %(macro_style_name)s_INTERFACES_FOR_EACH_%(conditional)s(macro) \\' % { - 'macro_style_name': _to_macro_style(self.class_name), - 'conditional': conditional, - } - - def generate_interfaces_header(self): - return INTERFACES_HEADER_TEMPLATE % { - 'license': license.license_for_generated_cpp(), - 'class_name': self.class_name, - 'macro_style_name': _to_macro_style(self.class_name), - 'declare_conditional_macros': self._declare_conditional_macros(), - 'unconditional_macros': '\n'.join(sorted(set(map(self._unconditional_macro, self._unconditional_entries)))), - 'conditional_macros': '\n'.join(map(self._conditional_macros, self._entries_by_conditional.keys())), - }
diff --git a/core/scripts/name_utilities.py b/core/scripts/name_utilities.py deleted file mode 100644 index c4993b0..0000000 --- a/core/scripts/name_utilities.py +++ /dev/null
@@ -1,40 +0,0 @@ -# Copyright (C) 2013 Google Inc. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -ACRONYMS = ['CSS', 'HTML', 'IME', 'JS', 'SVG', 'URL', 'WOFF', 'XML', 'XSLT'] - - -def lower_first(name): - """Return name with first letter or initial acronym lowercased. - - E.g., 'SetURL' becomes 'setURL', but 'URLFoo' becomes 'urlFoo'. - """ - for acronym in ACRONYMS: - if name.startswith(acronym): - return name.replace(acronym, acronym.lower()) - return name[0].lower() + name[1:]
diff --git a/core/scripts/rule_bison.py b/core/scripts/rule_bison.py deleted file mode 100644 index 97a0541..0000000 --- a/core/scripts/rule_bison.py +++ /dev/null
@@ -1,105 +0,0 @@ -#!/usr/bin/python -# -# Copyright (C) 2009 Google Inc. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# -# Copyright (c) 2009 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -# usage: rule_bison.py INPUT_FILE OUTPUT_DIR [BISON_EXE] -# INPUT_FILE is a path to either CSSGrammar.y or XPathGrammar.y. -# OUTPUT_DIR is where the bison-generated .cpp and .h files should be placed. - -import errno -import os -import os.path -import subprocess -import sys - -assert len(sys.argv) == 3 or len(sys.argv) == 4 - -inputFile = sys.argv[1] -outputDir = sys.argv[2] -bisonExe = 'bison' -if len(sys.argv) > 3: - bisonExe = sys.argv[3] - -inputName = os.path.basename(inputFile) -assert inputName == 'CSSGrammar.y' or inputName == 'XPathGrammar.y' -prefix = {'CSSGrammar.y': 'cssyy', 'XPathGrammar.y': 'xpathyy'}[inputName] - -(inputRoot, inputExt) = os.path.splitext(inputName) - -# The generated .h will be in a different location depending on the bison -# version. -outputHTries = [ - os.path.join(outputDir, inputRoot + '.cpp.h'), - os.path.join(outputDir, inputRoot + '.hpp'), -] - -for outputHTry in outputHTries: - try: - os.unlink(outputHTry) - except OSError, e: - if e.errno != errno.ENOENT: - raise - -outputCpp = os.path.join(outputDir, inputRoot + '.cpp') - -returnCode = subprocess.call([bisonExe, '-d', '-p', prefix, inputFile, '-o', outputCpp]) -assert returnCode == 0 - -# Find the name that bison used for the generated header file. -outputHTmp = None -for outputHTry in outputHTries: - try: - os.stat(outputHTry) - outputHTmp = outputHTry - break - except OSError, e: - if e.errno != errno.ENOENT: - raise - -assert outputHTmp != None - -# Read the header file in under the generated name and remove it. -outputHFile = open(outputHTmp) -outputHContents = outputHFile.read() -outputHFile.close() -os.unlink(outputHTmp) - -# Rewrite the generated header with #include guards. -outputH = os.path.join(outputDir, inputRoot + '.h') - -outputHFile = open(outputH, 'w') -print >>outputHFile, '#ifndef %sH' % inputRoot -print >>outputHFile, '#define %sH' % inputRoot -print >>outputHFile, outputHContents -print >>outputHFile, '#endif' -outputHFile.close()
diff --git a/core/scripts/template_expander.py b/core/scripts/template_expander.py deleted file mode 100644 index b1e99b6..0000000 --- a/core/scripts/template_expander.py +++ /dev/null
@@ -1,54 +0,0 @@ -# Copyright (C) 2013 Google Inc. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -import os -import sys - -_current_dir = os.path.dirname(os.path.realpath(__file__)) -# jinja2 is in chromium's third_party directory -# Insert at front to override system libraries, and after path[0] == script dir -sys.path.insert(1, os.path.join(_current_dir, *([os.pardir] * 4))) -import jinja2 - - -def apply_template(path_to_template, params): - dirname, basename = os.path.split(path_to_template) - path_to_templates = os.path.join(_current_dir, "templates") - jinja_env = jinja2.Environment(loader=jinja2.FileSystemLoader([dirname, path_to_templates]), keep_trailing_newline=True) - template = jinja_env.get_template(basename) - return template.render(params) - - -def use_jinja(template_file_name): - def real_decorator(generator): - def generator_internal(*args, **kwargs): - parameters = generator(*args, **kwargs) - return apply_template(template_file_name, parameters) - generator_internal.func_name = generator.func_name - return generator_internal - return real_decorator
diff --git a/core/scripts/templates/InternalRuntimeFlags.idl.tmpl b/core/scripts/templates/InternalRuntimeFlags.idl.tmpl deleted file mode 100644 index 92838f2..0000000 --- a/core/scripts/templates/InternalRuntimeFlags.idl.tmpl +++ /dev/null
@@ -1,14 +0,0 @@ -{% from "macros.tmpl" import license -%} -{{ license() }} - -[ -] interface InternalRuntimeFlags { -{%- for feature in features if not feature.custom %} -{#- - Currently assuming that runtime flags cannot be changed after startup - it's possible that some can be and should be conditionally readonly. -#} - {% if feature.condition -%} [Conditional={{feature.condition}}] {% endif -%} - readonly attribute boolean {{feature.first_lowered_name}}Enabled; -{%- endfor %} -};
diff --git a/core/page/SpeechInputEvent.idl b/core/speech/SpeechInputEvent.idl similarity index 100% rename from core/page/SpeechInputEvent.idl rename to core/speech/SpeechInputEvent.idl
diff --git a/core/page/SpeechInputResult.idl b/core/speech/SpeechInputResult.idl similarity index 100% rename from core/page/SpeechInputResult.idl rename to core/speech/SpeechInputResult.idl
diff --git a/core/page/SpeechInputResultList.idl b/core/speech/SpeechInputResultList.idl similarity index 100% rename from core/page/SpeechInputResultList.idl rename to core/speech/SpeechInputResultList.idl
diff --git a/core/storage/Storage.idl b/core/storage/Storage.idl index e3b5c70..15cdf26 100644 --- a/core/storage/Storage.idl +++ b/core/storage/Storage.idl
@@ -32,9 +32,9 @@ [ImplementedAs=anonymousNamedDeleter, RaisesException] deleter boolean (DOMString name); [NotEnumerable, GetterRaisesException] readonly attribute unsigned long length; [NotEnumerable, TreatReturnedNullStringAs=Null, RaisesException] DOMString key(unsigned long index); - [NotEnumerable, TreatReturnedNullStringAs=Null, PerWorldBindings, ActivityLog=AccessForIsolatedWorlds, RaisesException] DOMString getItem(DOMString key); - [NotEnumerable, RaisesException, PerWorldBindings, ActivityLog=AccessForIsolatedWorlds] void setItem(DOMString key, DOMString data); - [NotEnumerable, RaisesException, PerWorldBindings, ActivityLog=AccessForIsolatedWorlds] void removeItem(DOMString key); - [NotEnumerable, RaisesException, PerWorldBindings, ActivityLog=AccessForIsolatedWorlds] void clear(); + [NotEnumerable, TreatReturnedNullStringAs=Null, PerWorldBindings, ActivityLogging=AccessForIsolatedWorlds, RaisesException] DOMString getItem(DOMString key); + [NotEnumerable, RaisesException, PerWorldBindings, ActivityLogging=AccessForIsolatedWorlds] void setItem(DOMString key, DOMString data); + [NotEnumerable, RaisesException, PerWorldBindings, ActivityLogging=AccessForIsolatedWorlds] void removeItem(DOMString key); + [NotEnumerable, RaisesException, PerWorldBindings, ActivityLogging=AccessForIsolatedWorlds] void clear(); };
diff --git a/core/svg/SVGDocument.idl b/core/svg/SVGDocument.idl index 64ec90c..dced411 100644 --- a/core/svg/SVGDocument.idl +++ b/core/svg/SVGDocument.idl
@@ -19,9 +19,7 @@ * Boston, MA 02110-1301, USA. */ -[ - CustomToV8 -] interface SVGDocument : Document { +interface SVGDocument : Document { readonly attribute SVGSVGElement rootElement; // Overwrite the one in events::DocumentEvent
diff --git a/core/svg/SVGElement.idl b/core/svg/SVGElement.idl index 26d6c95..74d4db4 100644 --- a/core/svg/SVGElement.idl +++ b/core/svg/SVGElement.idl
@@ -36,3 +36,4 @@ CSSValue getPresentationAttribute([Default=Undefined] optional DOMString name); }; +SVGElement implements GlobalEventHandlers;
diff --git a/core/svg/SVGGlyphRefElement.idl b/core/svg/SVGGlyphRefElement.idl index e10bf7b..76a4e4a 100644 --- a/core/svg/SVGGlyphRefElement.idl +++ b/core/svg/SVGGlyphRefElement.idl
@@ -22,7 +22,7 @@ ] interface SVGGlyphRefElement : SVGElement { // FIXME: Use [Reflect] after https://bugs.webkit.org/show_bug.cgi?id=64843 is fixed. attribute DOMString glyphRef; - [Reflect] attribute DOMString format; + [Reflect, TreatNullAs=NullString] attribute DOMString format; attribute float x; attribute float y; attribute float dx;
diff --git a/core/svg/SVGGraphicsElement.idl b/core/svg/SVGGraphicsElement.idl index 0af2440..8732215 100644 --- a/core/svg/SVGGraphicsElement.idl +++ b/core/svg/SVGGraphicsElement.idl
@@ -35,6 +35,7 @@ readonly attribute SVGElement farthestViewportElement; SVGRect getBBox(); + SVGRect getStrokeBBox(); SVGMatrix getCTM(); SVGMatrix getScreenCTM(); [RaisesException] SVGMatrix getTransformToElement([Default=Undefined] optional SVGElement element);
diff --git a/core/svg/SVGMatrix.idl b/core/svg/SVGMatrix.idl index dc871be..af56029 100644 --- a/core/svg/SVGMatrix.idl +++ b/core/svg/SVGMatrix.idl
@@ -20,7 +20,9 @@ * Boston, MA 02110-1301, USA. */ -interface SVGMatrix { +[ + SetReference(SVGTransform parent) +] interface SVGMatrix { // FIXME: these attributes should all be floats but since we implement // AffineTransform with doubles setting these as doubles makes more sense. [StrictTypeChecking] attribute double a;
diff --git a/core/svg/SVGPathElement.idl b/core/svg/SVGPathElement.idl index 083663b..5d75b70 100644 --- a/core/svg/SVGPathElement.idl +++ b/core/svg/SVGPathElement.idl
@@ -28,77 +28,43 @@ readonly attribute SVGAnimatedNumber pathLength; float getTotalLength(); - SVGPoint getPointAtLength([Default=Undefined] optional float distance); - unsigned long getPathSegAtLength([Default=Undefined] optional float distance); + [StrictTypeChecking] SVGPoint getPointAtLength(float distance); + [StrictTypeChecking] unsigned long getPathSegAtLength(float distance); SVGPathSegClosePath createSVGPathSegClosePath(); - SVGPathSegMovetoAbs createSVGPathSegMovetoAbs([Default=Undefined] optional float x, - [Default=Undefined] optional float y); - SVGPathSegMovetoRel createSVGPathSegMovetoRel([Default=Undefined] optional float x, - [Default=Undefined] optional float y); + [StrictTypeChecking] SVGPathSegMovetoAbs createSVGPathSegMovetoAbs(float x, float y); + [StrictTypeChecking] SVGPathSegMovetoRel createSVGPathSegMovetoRel(float x, float y); - SVGPathSegLinetoAbs createSVGPathSegLinetoAbs([Default=Undefined] optional float x, - [Default=Undefined] optional float y); - SVGPathSegLinetoRel createSVGPathSegLinetoRel([Default=Undefined] optional float x, - [Default=Undefined] optional float y); + [StrictTypeChecking] SVGPathSegLinetoAbs createSVGPathSegLinetoAbs(float x, float y); + [StrictTypeChecking] SVGPathSegLinetoRel createSVGPathSegLinetoRel(float x, float y); - SVGPathSegCurvetoCubicAbs createSVGPathSegCurvetoCubicAbs([Default=Undefined] optional float x, - [Default=Undefined] optional float y, - [Default=Undefined] optional float x1, - [Default=Undefined] optional float y1, - [Default=Undefined] optional float x2, - [Default=Undefined] optional float y2); - SVGPathSegCurvetoCubicRel createSVGPathSegCurvetoCubicRel([Default=Undefined] optional float x, - [Default=Undefined] optional float y, - [Default=Undefined] optional float x1, - [Default=Undefined] optional float y1, - [Default=Undefined] optional float x2, - [Default=Undefined] optional float y2); + [StrictTypeChecking] SVGPathSegCurvetoCubicAbs + createSVGPathSegCurvetoCubicAbs(float x, float y, float x1, float y1, float x2, float y2); + [StrictTypeChecking] SVGPathSegCurvetoCubicRel + createSVGPathSegCurvetoCubicRel(float x, float y, float x1, float y1, float x2, float y2); - SVGPathSegCurvetoQuadraticAbs createSVGPathSegCurvetoQuadraticAbs([Default=Undefined] optional float x, - [Default=Undefined] optional float y, - [Default=Undefined] optional float x1, - [Default=Undefined] optional float y1); - SVGPathSegCurvetoQuadraticRel createSVGPathSegCurvetoQuadraticRel([Default=Undefined] optional float x, - [Default=Undefined] optional float y, - [Default=Undefined] optional float x1, - [Default=Undefined] optional float y1); + [StrictTypeChecking] SVGPathSegCurvetoQuadraticAbs + createSVGPathSegCurvetoQuadraticAbs(float x, float y, float x1, float y1); + [StrictTypeChecking] SVGPathSegCurvetoQuadraticRel + createSVGPathSegCurvetoQuadraticRel(float x, float y, float x1, float y1); - SVGPathSegArcAbs createSVGPathSegArcAbs([Default=Undefined] optional float x, - [Default=Undefined] optional float y, - [Default=Undefined] optional float r1, - [Default=Undefined] optional float r2, - [Default=Undefined] optional float angle, - [Default=Undefined] optional boolean largeArcFlag, - [Default=Undefined] optional boolean sweepFlag); - SVGPathSegArcRel createSVGPathSegArcRel([Default=Undefined] optional float x, - [Default=Undefined] optional float y, - [Default=Undefined] optional float r1, - [Default=Undefined] optional float r2, - [Default=Undefined] optional float angle, - [Default=Undefined] optional boolean largeArcFlag, - [Default=Undefined] optional boolean sweepFlag); + [StrictTypeChecking] SVGPathSegArcAbs + createSVGPathSegArcAbs(float x, float y, float r1, float r2, float angle, boolean largeArcFlag, boolean sweepFlag); + [StrictTypeChecking] SVGPathSegArcRel + createSVGPathSegArcRel(float x, float y, float r1, float r2, float angle, boolean largeArcFlag, boolean sweepFlag); - SVGPathSegLinetoHorizontalAbs createSVGPathSegLinetoHorizontalAbs([Default=Undefined] optional float x); - SVGPathSegLinetoHorizontalRel createSVGPathSegLinetoHorizontalRel([Default=Undefined] optional float x); + [StrictTypeChecking] SVGPathSegLinetoHorizontalAbs createSVGPathSegLinetoHorizontalAbs(float x); + [StrictTypeChecking] SVGPathSegLinetoHorizontalRel createSVGPathSegLinetoHorizontalRel(float x); - SVGPathSegLinetoVerticalAbs createSVGPathSegLinetoVerticalAbs([Default=Undefined] optional float y); - SVGPathSegLinetoVerticalRel createSVGPathSegLinetoVerticalRel([Default=Undefined] optional float y); + [StrictTypeChecking] SVGPathSegLinetoVerticalAbs createSVGPathSegLinetoVerticalAbs(float y); + [StrictTypeChecking] SVGPathSegLinetoVerticalRel createSVGPathSegLinetoVerticalRel(float y); - SVGPathSegCurvetoCubicSmoothAbs createSVGPathSegCurvetoCubicSmoothAbs([Default=Undefined] optional float x, - [Default=Undefined] optional float y, - [Default=Undefined] optional float x2, - [Default=Undefined] optional float y2); - SVGPathSegCurvetoCubicSmoothRel createSVGPathSegCurvetoCubicSmoothRel([Default=Undefined] optional float x, - [Default=Undefined] optional float y, - [Default=Undefined] optional float x2, - [Default=Undefined] optional float y2); + [StrictTypeChecking] SVGPathSegCurvetoCubicSmoothAbs createSVGPathSegCurvetoCubicSmoothAbs(float x, float y, float x2, float y2); + [StrictTypeChecking] SVGPathSegCurvetoCubicSmoothRel createSVGPathSegCurvetoCubicSmoothRel(float x, float y, float x2, float y2); - SVGPathSegCurvetoQuadraticSmoothAbs createSVGPathSegCurvetoQuadraticSmoothAbs([Default=Undefined] optional float x, - [Default=Undefined] optional float y); - SVGPathSegCurvetoQuadraticSmoothRel createSVGPathSegCurvetoQuadraticSmoothRel([Default=Undefined] optional float x, - [Default=Undefined] optional float y); + [StrictTypeChecking] SVGPathSegCurvetoQuadraticSmoothAbs createSVGPathSegCurvetoQuadraticSmoothAbs(float x, float y); + [StrictTypeChecking] SVGPathSegCurvetoQuadraticSmoothRel createSVGPathSegCurvetoQuadraticSmoothRel(float x, float y); readonly attribute SVGPathSegList pathSegList; readonly attribute SVGPathSegList normalizedPathSegList;
diff --git a/core/svg/SVGUseElement.idl b/core/svg/SVGUseElement.idl index 752daa9..eb5d82c 100644 --- a/core/svg/SVGUseElement.idl +++ b/core/svg/SVGUseElement.idl
@@ -29,7 +29,7 @@ readonly attribute SVGAnimatedLength width; readonly attribute SVGAnimatedLength height; - readonly attribute SVGElementInstance instanceRoot; + [MeasureAs=SVGInstanceRoot] readonly attribute SVGElementInstance instanceRoot; readonly attribute SVGElementInstance animatedInstanceRoot; };
diff --git a/core/testing/InternalSettings.idl b/core/testing/InternalSettings.idl index 9e03edc..5ac9133 100644 --- a/core/testing/InternalSettings.idl +++ b/core/testing/InternalSettings.idl
@@ -41,7 +41,7 @@ [RaisesException] void setTextAutosizingFontScaleFactor(float fontScaleFactor); [RaisesException] void setMediaTypeOverride(DOMString mediaTypeOverride); [RaisesException] void setEditingBehavior(DOMString behavior); - + [RaisesException] void setPasswordGenerationDecorationEnabled(boolean enabled); [RaisesException] void setImagesEnabled(boolean enabled); [RaisesException] void setDefaultVideoPosterURL(DOMString poster); [RaisesException] void setViewportEnabled(boolean enabled);
diff --git a/core/testing/Internals.idl b/core/testing/Internals.idl index 0d21489..c0c80d9 100644 --- a/core/testing/Internals.idl +++ b/core/testing/Internals.idl
@@ -51,7 +51,6 @@ [RaisesException] boolean hasShadowInsertionPoint(Node root); [RaisesException] boolean hasContentElement(Node root); [RaisesException] unsigned long countElementShadow(Node Root); - [RaisesException] Element includerFor(Node node); [RaisesException] DOMString shadowPseudoId(Element element); [RaisesException] void setShadowPseudoId(Element element, DOMString id); [RaisesException] Element createContentElement(); @@ -66,8 +65,6 @@ // CSS Animation and Transition testing. unsigned long numberOfActiveAnimations(); - [RaisesException] void suspendAnimations(Document document); - [RaisesException] void resumeAnimations(Document document); [RaisesException] void pauseAnimations(double pauseTime); [RaisesException] Node nextSiblingByWalker(Node node); @@ -76,8 +73,6 @@ [RaisesException] Node nextNodeByWalker(Node node); [RaisesException] Node previousNodeByWalker(Node node); - [RaisesException] boolean attached(Node node); - DOMString visiblePlaceholder(Element element); void selectColorInColorChooser(Element element, DOMString colorValue); @@ -148,7 +143,7 @@ unsigned long topPadding, unsigned long rightPadding, unsigned long bottomPadding, unsigned long leftPadding, boolean ignoreClipping, boolean allowShadowContent, boolean allowChildFrameContent); - void emitInspectorDidBeginFrame(); + void emitInspectorDidBeginFrame(optional long frameId); void emitInspectorDidCancelFrame(); [RaisesException] boolean hasSpellingMarker(Document document, long from, long length); @@ -172,6 +167,7 @@ const unsigned short LAYER_TREE_INCLUDES_REPAINT_RECTS = 2; const unsigned short LAYER_TREE_INCLUDES_PAINTING_PHASES = 4; const unsigned short LAYER_TREE_INCLUDES_ROOT_LAYER = 8; + const unsigned short LAYER_TREE_INCLUDES_CLIP_AND_SCROLL_PARENTS = 16; [RaisesException] DOMString layerTreeAsText(Document document, optional unsigned short flags); [RaisesException] DOMString elementLayerTreeAsText(Element element, optional unsigned short flags); @@ -180,6 +176,7 @@ [RaisesException] boolean scrollsWithRespectTo(Element element1, Element element2); [RaisesException] boolean isUnclippedDescendant(Element element); + [RaisesException] boolean needsCompositedScrolling(Element element); // The values of these constants must be kept in sync with those in RenderLayer. const unsigned short DO_NOT_FORCE_COMPOSITED_SCROLLING = 0; @@ -239,6 +236,10 @@ [RaisesException] void startTrackingRepaints(Document document); [RaisesException] void stopTrackingRepaints(Document document); + // Returns a list of draggable/non-draggable regions in the document. + [RaisesException] ClientRectList draggableRegions(Document document); + [RaisesException] ClientRectList nonDraggableRegions(Document document); + // Returns a string with information about the mouse cursor used at the specified client location. [RaisesException] DOMString getCurrentCursorInfo(Document document); @@ -251,8 +252,6 @@ void forceReload(boolean endToEnd); - void enableMockSpeechSynthesizer(); - [RaisesException] DOMString getImageSourceURL(Element element); boolean isSelectPopupVisible(Node node); @@ -260,4 +259,6 @@ [RaisesException] ClientRect selectionBounds(); boolean loseSharedGraphicsContext3D(); + + [RaisesException] void forceCompositingUpdate(Document document); };
diff --git a/core/testing/TypeConversions.idl b/core/testing/TypeConversions.idl index 1f3df0c..7a70cc5 100644 --- a/core/testing/TypeConversions.idl +++ b/core/testing/TypeConversions.idl
@@ -26,17 +26,22 @@ [ ] interface TypeConversions { attribute long testLong; - [EnforceRange] attribute long testEnforceRangeLong; + [EnforceRange, ImplementedAs=testLong] attribute long testEnforceRangeLong; attribute unsigned long testUnsignedLong; - [EnforceRange] attribute unsigned long testEnforceRangeUnsignedLong; + [EnforceRange, ImplementedAs=testUnsignedLong] attribute unsigned long testEnforceRangeUnsignedLong; attribute long long testLongLong; - [EnforceRange] attribute long long testEnforceRangeLongLong; + [EnforceRange, ImplementedAs=testLongLong] attribute long long testEnforceRangeLongLong; attribute unsigned long long testUnsignedLongLong; - [EnforceRange] attribute unsigned long long testEnforceRangeUnsignedLongLong; + [EnforceRange, ImplementedAs=testUnsignedLongLong] attribute unsigned long long testEnforceRangeUnsignedLongLong; attribute byte testByte; - [EnforceRange] attribute byte testEnforceRangeByte; + [EnforceRange, ImplementedAs=testByte] attribute byte testEnforceRangeByte; attribute octet testOctet; - [EnforceRange] attribute octet testEnforceRangeOctet; + [EnforceRange, ImplementedAs=testOctet] attribute octet testEnforceRangeOctet; + + attribute short testShort; + [EnforceRange, ImplementedAs=testShort] attribute short testEnforceRangeShort; + attribute unsigned short testUnsignedShort; + [EnforceRange, ImplementedAs=testUnsignedShort] attribute unsigned short testEnforceRangeUnsignedShort; };
diff --git a/core/page/MemoryInfo.idl b/core/timing/MemoryInfo.idl similarity index 100% rename from core/page/MemoryInfo.idl rename to core/timing/MemoryInfo.idl
diff --git a/core/page/Performance.idl b/core/timing/Performance.idl similarity index 98% rename from core/page/Performance.idl rename to core/timing/Performance.idl index 8dd3ea8..b29b83e 100644 --- a/core/page/Performance.idl +++ b/core/timing/Performance.idl
@@ -29,7 +29,7 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -// See: http://dev.w3.org/2006/webapi/WebTiming/ +// See: http://www.w3.org/TR/navigation-timing/ interface Performance : EventTarget { readonly attribute PerformanceNavigation navigation; readonly attribute PerformanceTiming timing;
diff --git a/core/page/PerformanceEntry.idl b/core/timing/PerformanceEntry.idl similarity index 100% rename from core/page/PerformanceEntry.idl rename to core/timing/PerformanceEntry.idl
diff --git a/core/page/PerformanceMark.idl b/core/timing/PerformanceMark.idl similarity index 100% rename from core/page/PerformanceMark.idl rename to core/timing/PerformanceMark.idl
diff --git a/core/page/PerformanceMeasure.idl b/core/timing/PerformanceMeasure.idl similarity index 100% rename from core/page/PerformanceMeasure.idl rename to core/timing/PerformanceMeasure.idl
diff --git a/core/page/PerformanceNavigation.idl b/core/timing/PerformanceNavigation.idl similarity index 100% rename from core/page/PerformanceNavigation.idl rename to core/timing/PerformanceNavigation.idl
diff --git a/core/page/PerformanceResourceTiming.idl b/core/timing/PerformanceResourceTiming.idl similarity index 100% rename from core/page/PerformanceResourceTiming.idl rename to core/timing/PerformanceResourceTiming.idl
diff --git a/core/page/PerformanceTiming.idl b/core/timing/PerformanceTiming.idl similarity index 100% rename from core/page/PerformanceTiming.idl rename to core/timing/PerformanceTiming.idl
diff --git a/core/workers/SharedWorker.idl b/core/workers/SharedWorker.idl index 6bba130..a6e4d02 100644 --- a/core/workers/SharedWorker.idl +++ b/core/workers/SharedWorker.idl
@@ -30,9 +30,9 @@ */ [ - EnabledAtRuntime=SharedWorker, + RuntimeEnabled=SharedWorker, Constructor(DOMString scriptURL, [Default=NullString] optional DOMString name), - ConstructorCallWith=ScriptExecutionContext, + ConstructorCallWith=ExecutionContext, ConstructorRaisesException, ActiveDOMObject ] interface SharedWorker : EventTarget {
diff --git a/core/workers/Worker.idl b/core/workers/Worker.idl index 40567a7..dc8b019 100644 --- a/core/workers/Worker.idl +++ b/core/workers/Worker.idl
@@ -27,7 +27,7 @@ [ Constructor(DOMString scriptUrl), - ConstructorCallWith=ScriptExecutionContext, + ConstructorCallWith=ExecutionContext, ConstructorRaisesException, ActiveDOMObject ] interface Worker : EventTarget {
diff --git a/core/workers/WorkerLocation.idl b/core/workers/WorkerLocation.idl index 0d8399b..7afd84b 100644 --- a/core/workers/WorkerLocation.idl +++ b/core/workers/WorkerLocation.idl
@@ -29,15 +29,7 @@ [ GlobalContext=WorkerGlobalScope ] interface WorkerLocation { - readonly attribute DOMString href; - readonly attribute DOMString protocol; - readonly attribute DOMString host; - readonly attribute DOMString hostname; - readonly attribute DOMString port; - readonly attribute DOMString pathname; - readonly attribute DOMString search; - readonly attribute DOMString hash; - - [NotEnumerable] DOMString toString(); }; +// Force rebuild: crbug.com/307023 +WorkerLocation implements URLUtilsReadOnly;
diff --git a/core/page/WorkerNavigator.idl b/core/workers/WorkerNavigator.idl similarity index 100% rename from core/page/WorkerNavigator.idl rename to core/workers/WorkerNavigator.idl
diff --git a/core/xml/DOMParser.idl b/core/xml/DOMParser.idl index 5cbe49e..ff6af34 100644 --- a/core/xml/DOMParser.idl +++ b/core/xml/DOMParser.idl
@@ -20,6 +20,6 @@ [ Constructor ] interface DOMParser { - Document parseFromString([Default=Undefined] optional DOMString str, + [RaisesException] Document parseFromString([Default=Undefined] optional DOMString str, [Default=Undefined] optional DOMString contentType); };
diff --git a/core/xml/XMLHttpRequest.idl b/core/xml/XMLHttpRequest.idl index 069129d..305ac87 100644 --- a/core/xml/XMLHttpRequest.idl +++ b/core/xml/XMLHttpRequest.idl
@@ -40,7 +40,7 @@ GlobalContext=Window&WorkerGlobalScope, ActiveDOMObject, Constructor, - ConstructorCallWith=ScriptExecutionContext, + ConstructorCallWith=ExecutionContext, CustomConstructor(optional XMLHttpRequestOptions options) ] interface XMLHttpRequest : XMLHttpRequestEventTarget { // event handler attributes @@ -58,9 +58,9 @@ [SetterRaisesException] attribute boolean withCredentials; - [Custom, ActivityLog=Access, RaisesException] void open(DOMString method, DOMString url, optional boolean async, optional DOMString user, optional DOMString password); + [Custom, ActivityLogging=AccessForAllWorlds, RaisesException] void open(DOMString method, DOMString url, optional boolean async, optional DOMString user, optional DOMString password); - [ActivityLog=Access, RaisesException] void setRequestHeader(DOMString header, DOMString value); + [ActivityLogging=AccessForAllWorlds, RaisesException] void setRequestHeader(DOMString header, DOMString value); [Custom, RaisesException] void send();
diff --git a/core/xml/XSLTProcessor.idl b/core/xml/XSLTProcessor.idl index f552ed1..7c99868 100644 --- a/core/xml/XSLTProcessor.idl +++ b/core/xml/XSLTProcessor.idl
@@ -32,12 +32,13 @@ [ Constructor, + RuntimeEnabled=XSLT, MeasureAs=XSLTProcessor ] interface XSLTProcessor { void importStylesheet([Default=Undefined] optional Node stylesheet); - [CustomElementCallbacks=Enable] DocumentFragment transformToFragment([Default=Undefined] optional Node source, [Default=Undefined] optional Document docVal); - [CustomElementCallbacks=Enable] Document transformToDocument([Default=Undefined] optional Node source); + [CustomElementCallbacks] DocumentFragment transformToFragment([Default=Undefined] optional Node source, [Default=Undefined] optional Document docVal); + [CustomElementCallbacks] Document transformToDocument([Default=Undefined] optional Node source); [Custom] void setParameter(DOMString namespaceURI, DOMString localName, DOMString value); [Custom, TreatReturnedNullStringAs=Undefined] DOMString getParameter(DOMString namespaceURI, DOMString localName);
diff --git a/modules/README b/modules/README index 031dfa4..8f88f7d 100644 --- a/modules/README +++ b/modules/README
@@ -5,5 +5,5 @@ using the script: $DART_ROOT/sdk/lib/html/scripts/idlsync.py The current version corresponds to: -URL: http://src.chromium.org/multivm/trunk/webkit -Current revision: 1467 +URL: http://src.chromium.org/blink/branches/dart/1700 +Current revision: 164530
diff --git a/modules/crypto/Crypto.idl b/modules/crypto/Crypto.idl index 7a24113..52044ab 100644 --- a/modules/crypto/Crypto.idl +++ b/modules/crypto/Crypto.idl
@@ -36,6 +36,6 @@ // Web Crypto API spec. [Custom, RaisesException] ArrayBufferView getRandomValues(ArrayBufferView array); - [EnabledAtRuntime=Crypto] readonly attribute SubtleCrypto subtle; + [RuntimeEnabled=Crypto] readonly attribute SubtleCrypto subtle; };
diff --git a/modules/crypto/SubtleCrypto.idl b/modules/crypto/SubtleCrypto.idl index e4bc3a8..8631403 100644 --- a/modules/crypto/SubtleCrypto.idl +++ b/modules/crypto/SubtleCrypto.idl
@@ -38,7 +38,7 @@ [RaisesException] Promise digest(Dictionary algorithm, ArrayBufferView data); [RaisesException] Promise generateKey(Dictionary algorithm, boolean extractable, DOMString[] keyUsages); - [RaisesException] Promise importKey(DOMString format, ArrayBufferView keyData, Dictionary algorithm, boolean extractable, DOMString[] keyUsages); + [RaisesException] Promise importKey(DOMString format, ArrayBufferView keyData, Dictionary? algorithm, boolean extractable, DOMString[] keyUsages); [RaisesException] Promise exportKey(DOMString format, Key key); };
diff --git a/modules/crypto/WorkerGlobalScopeCrypto.idl b/modules/crypto/WorkerGlobalScopeCrypto.idl index 12eea8c..3044d42 100644 --- a/modules/crypto/WorkerGlobalScopeCrypto.idl +++ b/modules/crypto/WorkerGlobalScopeCrypto.idl
@@ -29,5 +29,5 @@ */ partial interface WorkerGlobalScope { - [EnabledAtRuntime=Crypto] readonly attribute WorkerCrypto crypto; + [RuntimeEnabled=Crypto] readonly attribute WorkerCrypto crypto; };
diff --git a/modules/device_orientation/DeviceMotionEvent.idl b/modules/device_orientation/DeviceMotionEvent.idl index 809848d..8643b55 100644 --- a/modules/device_orientation/DeviceMotionEvent.idl +++ b/modules/device_orientation/DeviceMotionEvent.idl
@@ -24,7 +24,7 @@ */ [ - EnabledAtRuntime=DeviceMotion + RuntimeEnabled=DeviceMotion ] interface DeviceMotionEvent : Event { readonly attribute DeviceAcceleration acceleration; readonly attribute DeviceAcceleration accelerationIncludingGravity;
diff --git a/modules/encoding/TextDecoder.idl b/modules/encoding/TextDecoder.idl index 576d298..8450225 100644 --- a/modules/encoding/TextDecoder.idl +++ b/modules/encoding/TextDecoder.idl
@@ -29,7 +29,7 @@ */ [ - EnabledAtRuntime=EncodingAPI, + RuntimeEnabled=EncodingAPI, GlobalContext=Window&WorkerGlobalScope, Constructor([Default=NullString] optional DOMString label, optional Dictionary options), ConstructorRaisesException
diff --git a/modules/encoding/TextEncoder.idl b/modules/encoding/TextEncoder.idl index ed63e27..b3daede 100644 --- a/modules/encoding/TextEncoder.idl +++ b/modules/encoding/TextEncoder.idl
@@ -29,7 +29,7 @@ */ [ - EnabledAtRuntime=EncodingAPI, + RuntimeEnabled=EncodingAPI, GlobalContext=Window&WorkerGlobalScope, Constructor([Default=NullString] optional DOMString utfLabel), ConstructorRaisesException
diff --git a/modules/encryptedmedia/MediaKeyMessageEvent.idl b/modules/encryptedmedia/MediaKeyMessageEvent.idl index 1f1aab7..7d9c6d0 100644 --- a/modules/encryptedmedia/MediaKeyMessageEvent.idl +++ b/modules/encryptedmedia/MediaKeyMessageEvent.idl
@@ -25,7 +25,7 @@ [ Conditional=ENCRYPTED_MEDIA_V2, - EnabledAtRuntime=EncryptedMedia, + RuntimeEnabled=EncryptedMedia, ConstructorTemplate=Event ] interface MediaKeyMessageEvent : Event { readonly attribute Uint8Array message;
diff --git a/modules/encryptedmedia/MediaKeyNeededEvent.idl b/modules/encryptedmedia/MediaKeyNeededEvent.idl index f593cc3..5dfec5f 100644 --- a/modules/encryptedmedia/MediaKeyNeededEvent.idl +++ b/modules/encryptedmedia/MediaKeyNeededEvent.idl
@@ -25,7 +25,7 @@ [ Conditional=ENCRYPTED_MEDIA_V2, - EnabledAtRuntime=EncryptedMedia, + RuntimeEnabled=EncryptedMedia, ConstructorTemplate=Event ] interface MediaKeyNeededEvent : Event { readonly attribute Uint8Array initData;
diff --git a/modules/encryptedmedia/MediaKeySession.idl b/modules/encryptedmedia/MediaKeySession.idl index 46cda2d..ebebc9f 100644 --- a/modules/encryptedmedia/MediaKeySession.idl +++ b/modules/encryptedmedia/MediaKeySession.idl
@@ -25,7 +25,7 @@ [ Conditional=ENCRYPTED_MEDIA_V2, - EnabledAtRuntime=EncryptedMedia + RuntimeEnabled=EncryptedMedia ] interface MediaKeySession : EventTarget { // error state readonly attribute MediaKeyError error; @@ -39,7 +39,7 @@ void close(); // EventHandlers - [EnabledAtRuntime=EncryptedMedia] attribute EventHandler onwebkitkeyadded; - [EnabledAtRuntime=EncryptedMedia] attribute EventHandler onwebkitkeyerror; - [EnabledAtRuntime=EncryptedMedia] attribute EventHandler onwebkitkeymessage; + [RuntimeEnabled=EncryptedMedia] attribute EventHandler onwebkitkeyadded; + [RuntimeEnabled=EncryptedMedia] attribute EventHandler onwebkitkeyerror; + [RuntimeEnabled=EncryptedMedia] attribute EventHandler onwebkitkeymessage; };
diff --git a/modules/encryptedmedia/MediaKeys.idl b/modules/encryptedmedia/MediaKeys.idl index 2d03169..9d57659 100644 --- a/modules/encryptedmedia/MediaKeys.idl +++ b/modules/encryptedmedia/MediaKeys.idl
@@ -25,11 +25,11 @@ [ Conditional=ENCRYPTED_MEDIA_V2, - EnabledAtRuntime=EncryptedMedia, + RuntimeEnabled=EncryptedMedia, Constructor(DOMString keySystem), ConstructorRaisesException ] interface MediaKeys { - [CallWith=ScriptExecutionContext, RaisesException] MediaKeySession createSession([Default=Undefined] optional DOMString type, [Default=Undefined] optional Uint8Array initData); + [CallWith=ExecutionContext, RaisesException] MediaKeySession createSession([Default=Undefined] optional DOMString type, [Default=Undefined] optional Uint8Array initData); readonly attribute DOMString keySystem; };
diff --git a/modules/filesystem/DataTransferItemFileSystem.idl b/modules/filesystem/DataTransferItemFileSystem.idl index f41429f..19dd9f9 100644 --- a/modules/filesystem/DataTransferItemFileSystem.idl +++ b/modules/filesystem/DataTransferItemFileSystem.idl
@@ -29,6 +29,6 @@ */ partial interface DataTransferItem { - [CallWith=ScriptExecutionContext] Entry webkitGetAsEntry(); + [CallWith=ExecutionContext] Entry webkitGetAsEntry(); };
diff --git a/modules/filesystem/HTMLInputElementFileSystem.idl b/modules/filesystem/HTMLInputElementFileSystem.idl index 758d6fc..836e25d 100644 --- a/modules/filesystem/HTMLInputElementFileSystem.idl +++ b/modules/filesystem/HTMLInputElementFileSystem.idl
@@ -29,6 +29,6 @@ */ partial interface HTMLInputElement { -[EnabledAtRuntime=FileSystem,CallWith=ScriptExecutionContext] readonly attribute Entry[] webkitEntries; +[RuntimeEnabled=FileSystem,CallWith=ExecutionContext] readonly attribute Entry[] webkitEntries; };
diff --git a/modules/filesystem/WindowFileSystem.idl b/modules/filesystem/WindowFileSystem.idl index 4fed55e..dcbe807 100644 --- a/modules/filesystem/WindowFileSystem.idl +++ b/modules/filesystem/WindowFileSystem.idl
@@ -30,9 +30,9 @@ const unsigned short TEMPORARY = 0; const unsigned short PERSISTENT = 1; - [EnabledAtRuntime=FileSystem] void webkitRequestFileSystem(unsigned short type, long long size, + [RuntimeEnabled=FileSystem] void webkitRequestFileSystem(unsigned short type, long long size, FileSystemCallback successCallback, optional ErrorCallback errorCallback); - [EnabledAtRuntime=FileSystem] void webkitResolveLocalFileSystemURL(DOMString url, + [RuntimeEnabled=FileSystem] void webkitResolveLocalFileSystemURL(DOMString url, EntryCallback successCallback, optional ErrorCallback errorCallback); };
diff --git a/modules/filesystem/WorkerGlobalScopeFileSystem.idl b/modules/filesystem/WorkerGlobalScopeFileSystem.idl index f4a25bc..3762bc5 100644 --- a/modules/filesystem/WorkerGlobalScopeFileSystem.idl +++ b/modules/filesystem/WorkerGlobalScopeFileSystem.idl
@@ -28,11 +28,11 @@ const unsigned short TEMPORARY = 0; const unsigned short PERSISTENT = 1; - [EnabledAtRuntime=FileSystem] void webkitRequestFileSystem(unsigned short type, long long size, optional FileSystemCallback successCallback, optional ErrorCallback errorCallback); - [EnabledAtRuntime=FileSystem, RaisesException] DOMFileSystemSync webkitRequestFileSystemSync(unsigned short type, long long size); - [EnabledAtRuntime=FileSystem] void webkitResolveLocalFileSystemURL(DOMString url, EntryCallback successCallback, optional ErrorCallback errorCallback); - [EnabledAtRuntime=FileSystem, RaisesException] EntrySync webkitResolveLocalFileSystemSyncURL(DOMString url); + [RuntimeEnabled=FileSystem] void webkitRequestFileSystem(unsigned short type, long long size, optional FileSystemCallback successCallback, optional ErrorCallback errorCallback); + [RuntimeEnabled=FileSystem, RaisesException] DOMFileSystemSync webkitRequestFileSystemSync(unsigned short type, long long size); + [RuntimeEnabled=FileSystem] void webkitResolveLocalFileSystemURL(DOMString url, EntryCallback successCallback, optional ErrorCallback errorCallback); + [RuntimeEnabled=FileSystem, RaisesException] EntrySync webkitResolveLocalFileSystemSyncURL(DOMString url); - [EnabledAtRuntime=FileSystem] attribute FileErrorConstructor FileError; + [RuntimeEnabled=FileSystem] attribute FileErrorConstructor FileError; };
diff --git a/modules/gamepad/NavigatorGamepad.idl b/modules/gamepad/NavigatorGamepad.idl index e1686f3..0fbceee 100644 --- a/modules/gamepad/NavigatorGamepad.idl +++ b/modules/gamepad/NavigatorGamepad.idl
@@ -18,6 +18,6 @@ */ partial interface Navigator { - [EnabledAtRuntime=Gamepad] GamepadList webkitGetGamepads(); + [RuntimeEnabled=Gamepad] GamepadList webkitGetGamepads(); };
diff --git a/modules/geolocation/Geolocation.idl b/modules/geolocation/Geolocation.idl index 9c2ead1..de8466a 100644 --- a/modules/geolocation/Geolocation.idl +++ b/modules/geolocation/Geolocation.idl
@@ -27,11 +27,11 @@ [ NoInterfaceObject ] interface Geolocation { - [Custom, PerWorldBindings, ActivityLog=AccessForIsolatedWorlds] void getCurrentPosition(PositionCallback successCallback, + [Custom, PerWorldBindings, ActivityLogging=AccessForIsolatedWorlds] void getCurrentPosition(PositionCallback successCallback, optional PositionErrorCallback errorCallback, optional PositionOptions options); - [Custom, PerWorldBindings, ActivityLog=AccessForIsolatedWorlds] long watchPosition(PositionCallback successCallback, + [Custom, PerWorldBindings, ActivityLogging=AccessForIsolatedWorlds] long watchPosition(PositionCallback successCallback, optional PositionErrorCallback errorCallback, optional PositionOptions options);
diff --git a/modules/geolocation/NavigatorGeolocation.idl b/modules/geolocation/NavigatorGeolocation.idl index 460d293..4de885c 100644 --- a/modules/geolocation/NavigatorGeolocation.idl +++ b/modules/geolocation/NavigatorGeolocation.idl
@@ -18,6 +18,6 @@ */ partial interface Navigator { - [EnabledAtRuntime=Geolocation] readonly attribute Geolocation geolocation; + [RuntimeEnabled=Geolocation] readonly attribute Geolocation geolocation; };
diff --git a/modules/imagebitmap/ImageBitmapFactories.idl b/modules/imagebitmap/ImageBitmapFactories.idl index 90cacf0..7f244e1 100644 --- a/modules/imagebitmap/ImageBitmapFactories.idl +++ b/modules/imagebitmap/ImageBitmapFactories.idl
@@ -30,7 +30,7 @@ [ NoInterfaceObject, - EnabledAtRuntime=ExperimentalCanvasFeatures + RuntimeEnabled=ExperimentalCanvasFeatures ] interface ImageBitmapFactories { [RaisesException] Promise createImageBitmap(Blob blob); [RaisesException] Promise createImageBitmap(Blob blob, long sx, long sy, long sw, long sh);
diff --git a/modules/imagebitmap/WindowImageBitmapFactories.idl b/modules/imagebitmap/WindowImageBitmapFactories.idl index c91ab89..ced1ff8 100644 --- a/modules/imagebitmap/WindowImageBitmapFactories.idl +++ b/modules/imagebitmap/WindowImageBitmapFactories.idl
@@ -30,7 +30,7 @@ [ ImplementedAs=ImageBitmapFactories, - EnabledAtRuntime=ExperimentalCanvasFeatures + RuntimeEnabled=ExperimentalCanvasFeatures ] partial interface Window { [RaisesException] Promise createImageBitmap(HTMLImageElement image); [RaisesException] Promise createImageBitmap(HTMLImageElement image, long sx, long sy, long sw, long sh);
diff --git a/modules/indexeddb/IDBCursor.idl b/modules/indexeddb/IDBCursor.idl index 18d53a1..1da7855 100644 --- a/modules/indexeddb/IDBCursor.idl +++ b/modules/indexeddb/IDBCursor.idl
@@ -26,12 +26,12 @@ interface IDBCursor { readonly attribute DOMString direction; - [CallWith=ScriptExecutionContext, CachedAttribute=isKeyDirty] readonly attribute any key; - [CallWith=ScriptExecutionContext, CachedAttribute=isPrimaryKeyDirty] readonly attribute any primaryKey; + [CallWith=ExecutionContext, CachedAttribute=isKeyDirty] readonly attribute any key; + [CallWith=ExecutionContext, CachedAttribute=isPrimaryKeyDirty] readonly attribute any primaryKey; readonly attribute IDBAny source; [CallWith=ScriptState, RaisesException] IDBRequest update(any value); [RaisesException] void advance([EnforceRange] unsigned long count); - [CallWith=ScriptExecutionContext, ImplementedAs=continueFunction, RaisesException] void continue([Default=Undefined] optional any key); - [CallWith=ScriptExecutionContext, ImplementedAs=deleteFunction, RaisesException] IDBRequest delete(); + [CallWith=ExecutionContext, ImplementedAs=continueFunction, RaisesException] void continue([Default=Undefined] optional any key); + [CallWith=ExecutionContext, ImplementedAs=deleteFunction, RaisesException] IDBRequest delete(); };
diff --git a/modules/indexeddb/IDBCursorWithValue.idl b/modules/indexeddb/IDBCursorWithValue.idl index 4f8a780..cad30a6 100644 --- a/modules/indexeddb/IDBCursorWithValue.idl +++ b/modules/indexeddb/IDBCursorWithValue.idl
@@ -24,5 +24,5 @@ */ interface IDBCursorWithValue : IDBCursor { - [CallWith=ScriptExecutionContext,CachedAttribute=isValueDirty] readonly attribute any value; + [CallWith=ExecutionContext,CachedAttribute=isValueDirty] readonly attribute any value; };
diff --git a/modules/indexeddb/IDBDatabase.idl b/modules/indexeddb/IDBDatabase.idl index 3d81ed2..3c2db17 100644 --- a/modules/indexeddb/IDBDatabase.idl +++ b/modules/indexeddb/IDBDatabase.idl
@@ -38,9 +38,9 @@ [RaisesException] IDBObjectStore createObjectStore(DOMString name, optional Dictionary options); [RaisesException] void deleteObjectStore(DOMString name); - [CallWith=ScriptExecutionContext, RaisesException] IDBTransaction transaction(DOMStringList storeNames, [Default=NullString] optional DOMString mode); - [CallWith=ScriptExecutionContext, RaisesException] IDBTransaction transaction(sequence<DOMString> storeNames, [Default=NullString] optional DOMString mode); - [CallWith=ScriptExecutionContext, RaisesException] IDBTransaction transaction(DOMString storeName, [Default=NullString] optional DOMString mode); + [CallWith=ExecutionContext, RaisesException] IDBTransaction transaction(DOMStringList storeNames, [Default=NullString] optional DOMString mode); + [CallWith=ExecutionContext, RaisesException] IDBTransaction transaction(sequence<DOMString> storeNames, [Default=NullString] optional DOMString mode); + [CallWith=ExecutionContext, RaisesException] IDBTransaction transaction(DOMString storeName, [Default=NullString] optional DOMString mode); void close(); };
diff --git a/modules/indexeddb/IDBFactory.idl b/modules/indexeddb/IDBFactory.idl index dc69602..7e0013c 100644 --- a/modules/indexeddb/IDBFactory.idl +++ b/modules/indexeddb/IDBFactory.idl
@@ -25,10 +25,10 @@ [ ] interface IDBFactory { - [CallWith=ScriptExecutionContext, ImplementedAs=getDatabaseNames, RaisesException] IDBRequest webkitGetDatabaseNames(); + [CallWith=ExecutionContext, ImplementedAs=getDatabaseNames, RaisesException] IDBRequest webkitGetDatabaseNames(); - [CallWith=ScriptExecutionContext, RaisesException] IDBOpenDBRequest open(DOMString name, [EnforceRange] optional unsigned long long version); - [CallWith=ScriptExecutionContext, RaisesException] IDBOpenDBRequest deleteDatabase(DOMString name); + [CallWith=ExecutionContext, RaisesException] IDBOpenDBRequest open(DOMString name, [EnforceRange] optional unsigned long long version); + [CallWith=ExecutionContext, RaisesException] IDBOpenDBRequest deleteDatabase(DOMString name); - [CallWith=ScriptExecutionContext, RaisesException] short cmp(any first, any second); + [CallWith=ExecutionContext, RaisesException] short cmp(any first, any second); };
diff --git a/modules/indexeddb/IDBIndex.idl b/modules/indexeddb/IDBIndex.idl index 4819a1a..eca9a6f 100644 --- a/modules/indexeddb/IDBIndex.idl +++ b/modules/indexeddb/IDBIndex.idl
@@ -31,10 +31,10 @@ readonly attribute boolean unique; readonly attribute boolean multiEntry; - [CallWith=ScriptExecutionContext, RaisesException] IDBRequest openCursor([Default=Undefined] optional any key, [Default=NullString] optional DOMString direction); - [CallWith=ScriptExecutionContext, RaisesException] IDBRequest openKeyCursor([Default=Undefined] optional any key, [Default=NullString] optional DOMString direction); + [CallWith=ExecutionContext, RaisesException] IDBRequest openCursor([Default=Undefined] optional any range, [Default=NullString] optional DOMString direction); + [CallWith=ExecutionContext, RaisesException] IDBRequest openKeyCursor([Default=Undefined] optional any range, [Default=NullString] optional DOMString direction); - [CallWith=ScriptExecutionContext, RaisesException] IDBRequest get(any key); - [CallWith=ScriptExecutionContext, RaisesException] IDBRequest getKey(any key); - [CallWith=ScriptExecutionContext, RaisesException] IDBRequest count([Default=Undefined] optional any key); + [CallWith=ExecutionContext, RaisesException] IDBRequest get(any key); + [CallWith=ExecutionContext, RaisesException] IDBRequest getKey(any key); + [CallWith=ExecutionContext, RaisesException] IDBRequest count([Default=Undefined] optional any key); };
diff --git a/modules/indexeddb/IDBKeyRange.idl b/modules/indexeddb/IDBKeyRange.idl index 235e09e..031bfca 100644 --- a/modules/indexeddb/IDBKeyRange.idl +++ b/modules/indexeddb/IDBKeyRange.idl
@@ -25,13 +25,13 @@ [ ] interface IDBKeyRange { - [ImplementedAs=lowerValue,CallWith=ScriptExecutionContext] readonly attribute any lower; - [ImplementedAs=upperValue,CallWith=ScriptExecutionContext] readonly attribute any upper; + [ImplementedAs=lowerValue,CallWith=ExecutionContext] readonly attribute any lower; + [ImplementedAs=upperValue,CallWith=ExecutionContext] readonly attribute any upper; readonly attribute boolean lowerOpen; readonly attribute boolean upperOpen; - [CallWith=ScriptExecutionContext, RaisesException] static IDBKeyRange only(any value); - [CallWith=ScriptExecutionContext, RaisesException] static IDBKeyRange lowerBound(any bound, [Default=Undefined] optional boolean open); - [CallWith=ScriptExecutionContext, RaisesException] static IDBKeyRange upperBound(any bound, [Default=Undefined] optional boolean open); - [CallWith=ScriptExecutionContext, RaisesException] static IDBKeyRange bound(any lower, any upper, [Default=Undefined] optional boolean lowerOpen, [Default=Undefined] optional boolean upperOpen); + [CallWith=ExecutionContext, RaisesException] static IDBKeyRange only(any value); + [CallWith=ExecutionContext, RaisesException] static IDBKeyRange lowerBound(any bound, [Default=Undefined] optional boolean open); + [CallWith=ExecutionContext, RaisesException] static IDBKeyRange upperBound(any bound, [Default=Undefined] optional boolean open); + [CallWith=ExecutionContext, RaisesException] static IDBKeyRange bound(any lower, any upper, [Default=Undefined] optional boolean lowerOpen, [Default=Undefined] optional boolean upperOpen); };
diff --git a/modules/indexeddb/IDBObjectStore.idl b/modules/indexeddb/IDBObjectStore.idl index a3ca01d..9f7a6b6 100644 --- a/modules/indexeddb/IDBObjectStore.idl +++ b/modules/indexeddb/IDBObjectStore.idl
@@ -33,14 +33,15 @@ [CallWith=ScriptState, RaisesException] IDBRequest put(any value, [Default=Undefined] optional any key); [CallWith=ScriptState, RaisesException] IDBRequest add(any value, [Default=Undefined] optional any key); - [CallWith=ScriptExecutionContext, ImplementedAs=deleteFunction, RaisesException] IDBRequest delete(any key); - [CallWith=ScriptExecutionContext, RaisesException] IDBRequest clear(); - [CallWith=ScriptExecutionContext, RaisesException] IDBRequest get(any key); - [CallWith=ScriptExecutionContext, RaisesException] IDBRequest openCursor([Default=Undefined] optional any key, [Default=NullString] optional DOMString direction); + [CallWith=ExecutionContext, ImplementedAs=deleteFunction, RaisesException] IDBRequest delete(any key); + [CallWith=ExecutionContext, RaisesException] IDBRequest clear(); + [CallWith=ExecutionContext, RaisesException] IDBRequest get(any key); + [CallWith=ExecutionContext, RaisesException] IDBRequest openCursor([Default=Undefined] optional any range, [Default=NullString] optional DOMString direction); + [CallWith=ExecutionContext, RaisesException, RuntimeEnabled=IndexedDBExperimental] IDBRequest openKeyCursor([Default=Undefined] optional any range, [Default=NullString] optional DOMString direction); - [CallWith=ScriptExecutionContext, RaisesException] IDBIndex createIndex(DOMString name, sequence<DOMString> keyPath, optional Dictionary options); - [CallWith=ScriptExecutionContext, RaisesException] IDBIndex createIndex(DOMString name, DOMString keyPath, optional Dictionary options); + [CallWith=ExecutionContext, RaisesException] IDBIndex createIndex(DOMString name, sequence<DOMString> keyPath, optional Dictionary options); + [CallWith=ExecutionContext, RaisesException] IDBIndex createIndex(DOMString name, DOMString keyPath, optional Dictionary options); [RaisesException] IDBIndex index(DOMString name); [RaisesException] void deleteIndex(DOMString name); - [CallWith=ScriptExecutionContext, RaisesException] IDBRequest count([Default=Undefined] optional any key); + [CallWith=ExecutionContext, RaisesException] IDBRequest count([Default=Undefined] optional any key); };
diff --git a/modules/indexeddb/IDBVersionChangeEvent.idl b/modules/indexeddb/IDBVersionChangeEvent.idl index ce66636..90fb68f 100644 --- a/modules/indexeddb/IDBVersionChangeEvent.idl +++ b/modules/indexeddb/IDBVersionChangeEvent.idl
@@ -27,7 +27,8 @@ readonly attribute IDBAny oldVersion; readonly attribute IDBAny newVersion; - // FIXME: This is non-standard, see + // FIXME: These are non-standard, see // https://www.w3.org/Bugs/Public/show_bug.cgi?id=22370 readonly attribute DOMString dataLoss; + readonly attribute DOMString dataLossMessage; };
diff --git a/modules/indexeddb/WorkerGlobalScopeIndexedDatabase.idl b/modules/indexeddb/WorkerGlobalScopeIndexedDatabase.idl index e957d79..9b2c208 100644 --- a/modules/indexeddb/WorkerGlobalScopeIndexedDatabase.idl +++ b/modules/indexeddb/WorkerGlobalScopeIndexedDatabase.idl
@@ -25,7 +25,7 @@ */ partial interface WorkerGlobalScope { - [ImplementedAs=indexedDB, EnabledAtRuntime=IndexedDB] readonly attribute IDBFactory webkitIndexedDB; + [ImplementedAs=indexedDB, RuntimeEnabled=IndexedDB] readonly attribute IDBFactory webkitIndexedDB; attribute IDBCursorConstructor webkitIDBCursor; attribute IDBDatabaseConstructor webkitIDBDatabase; @@ -36,7 +36,7 @@ attribute IDBRequestConstructor webkitIDBRequest; attribute IDBTransactionConstructor webkitIDBTransaction; - [EnabledAtRuntime=IndexedDB] readonly attribute IDBFactory indexedDB; + [RuntimeEnabled=IndexedDB] readonly attribute IDBFactory indexedDB; attribute IDBCursorConstructor IDBCursor; attribute IDBCursorWithValueConstructor IDBCursorWithValue;
diff --git a/core/dom/ErrorEvent.idl b/modules/mediasource/HTMLVideoElementMediaSource.idl similarity index 73% copy from core/dom/ErrorEvent.idl copy to modules/mediasource/HTMLVideoElementMediaSource.idl index 33f0239..79a51ab 100644 --- a/core/dom/ErrorEvent.idl +++ b/modules/mediasource/HTMLVideoElementMediaSource.idl
@@ -1,5 +1,5 @@ /* - * Copyright (C) 2009 Google Inc. All rights reserved. + * Copyright (C) 2013 Google Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -27,14 +27,6 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -[ - ConstructorTemplate=Event -] interface ErrorEvent : Event { - [InitializedByEventConstructor] readonly attribute DOMString message; - [InitializedByEventConstructor] readonly attribute DOMString filename; - [InitializedByEventConstructor] readonly attribute unsigned long lineno; - [InitializedByEventConstructor] readonly attribute unsigned long colno; - [InitializedByEventConstructor, Custom, Unserializable] readonly attribute any error; +partial interface HTMLVideoElement { + [RuntimeEnabled=MediaSourceExperimental] VideoPlaybackQuality getVideoPlaybackQuality(); }; -
diff --git a/modules/mediasource/MediaSource.idl b/modules/mediasource/MediaSource.idl index 6f2b0af..24a08d2 100644 --- a/modules/mediasource/MediaSource.idl +++ b/modules/mediasource/MediaSource.idl
@@ -29,10 +29,10 @@ */ [ - EnabledAtRuntime=MediaSource, + RuntimeEnabled=MediaSource, ActiveDOMObject, Constructor, - ConstructorCallWith=ScriptExecutionContext + ConstructorCallWith=ExecutionContext ] interface MediaSource : EventTarget { // All the source buffers created by this object. readonly attribute SourceBufferList sourceBuffers;
diff --git a/modules/mediasource/SourceBuffer.idl b/modules/mediasource/SourceBuffer.idl index c6160bd..9498095 100644 --- a/modules/mediasource/SourceBuffer.idl +++ b/modules/mediasource/SourceBuffer.idl
@@ -31,7 +31,7 @@ [ NoInterfaceObject, ActiveDOMObject, - EnabledAtRuntime=MediaSource + RuntimeEnabled=MediaSource ] interface SourceBuffer : EventTarget { readonly attribute boolean updating; @@ -52,7 +52,7 @@ [RaisesException] void appendBuffer(ArrayBuffer data); [RaisesException] void appendBuffer(ArrayBufferView data); - [RaisesException, EnabledAtRuntime=stream] void appendStream(Stream stream, optional unsigned long long maxSize); + [RaisesException, RuntimeEnabled=stream] void appendStream(Stream stream, optional unsigned long long maxSize); // Abort the current segment append sequence. [RaisesException] void abort();
diff --git a/modules/mediasource/SourceBufferList.idl b/modules/mediasource/SourceBufferList.idl index ecf3508..b5bf134 100644 --- a/modules/mediasource/SourceBufferList.idl +++ b/modules/mediasource/SourceBufferList.idl
@@ -30,8 +30,8 @@ [ NoInterfaceObject, - EnabledAtRuntime=MediaSource, - CallWith=ScriptExecutionContext + RuntimeEnabled=MediaSource, + CallWith=ExecutionContext ] interface SourceBufferList : EventTarget { readonly attribute unsigned long length; getter SourceBuffer item(unsigned long index);
diff --git a/modules/mediasource/URLMediaSource.idl b/modules/mediasource/URLMediaSource.idl index 6adb9f1..e259be0 100644 --- a/modules/mediasource/URLMediaSource.idl +++ b/modules/mediasource/URLMediaSource.idl
@@ -28,6 +28,6 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ partial interface URL { - [CallWith=ScriptExecutionContext,TreatReturnedNullStringAs=Null] static DOMString createObjectURL(MediaSource? source); - [CallWith=ScriptExecutionContext,TreatReturnedNullStringAs=Null] static DOMString createObjectURL(WebKitMediaSource? source); + [CallWith=ExecutionContext,TreatReturnedNullStringAs=Null] static DOMString createObjectURL(MediaSource? source); + [CallWith=ExecutionContext,TreatReturnedNullStringAs=Null] static DOMString createObjectURL(WebKitMediaSource? source); };
diff --git a/core/dom/ErrorEvent.idl b/modules/mediasource/VideoPlaybackQuality.idl similarity index 73% copy from core/dom/ErrorEvent.idl copy to modules/mediasource/VideoPlaybackQuality.idl index 33f0239..7be130b 100644 --- a/core/dom/ErrorEvent.idl +++ b/modules/mediasource/VideoPlaybackQuality.idl
@@ -1,5 +1,5 @@ /* - * Copyright (C) 2009 Google Inc. All rights reserved. + * Copyright (C) 2013 Google Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -27,14 +27,10 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -[ - ConstructorTemplate=Event -] interface ErrorEvent : Event { - [InitializedByEventConstructor] readonly attribute DOMString message; - [InitializedByEventConstructor] readonly attribute DOMString filename; - [InitializedByEventConstructor] readonly attribute unsigned long lineno; - [InitializedByEventConstructor] readonly attribute unsigned long colno; - [InitializedByEventConstructor, Custom, Unserializable] readonly attribute any error; +[RuntimeEnabled=MediaSourceExperimental] +interface VideoPlaybackQuality { + readonly attribute double creationTime; + readonly attribute unsigned long totalVideoFrames; + readonly attribute unsigned long droppedVideoFrames; + readonly attribute unsigned long corruptedVideoFrames; }; -
diff --git a/modules/mediasource/WebKitMediaSource.idl b/modules/mediasource/WebKitMediaSource.idl index 6039201..5d127ae 100644 --- a/modules/mediasource/WebKitMediaSource.idl +++ b/modules/mediasource/WebKitMediaSource.idl
@@ -30,10 +30,10 @@ [ NoInterfaceObject, - EnabledAtRuntime=WebKitMediaSource, + RuntimeEnabled=WebKitMediaSource, ActiveDOMObject, Constructor, - ConstructorCallWith=ScriptExecutionContext + ConstructorCallWith=ExecutionContext ] interface WebKitMediaSource : EventTarget { // All the source buffers created by this object. readonly attribute WebKitSourceBufferList sourceBuffers;
diff --git a/modules/mediasource/WebKitSourceBuffer.idl b/modules/mediasource/WebKitSourceBuffer.idl index b7582b0..da4c157 100644 --- a/modules/mediasource/WebKitSourceBuffer.idl +++ b/modules/mediasource/WebKitSourceBuffer.idl
@@ -30,7 +30,7 @@ [ NoInterfaceObject, - EnabledAtRuntime=WebKitMediaSource + RuntimeEnabled=WebKitMediaSource ] interface WebKitSourceBuffer { // Returns the time ranges buffered.
diff --git a/modules/mediasource/WebKitSourceBufferList.idl b/modules/mediasource/WebKitSourceBufferList.idl index 4c5e359..b3d2ec4 100644 --- a/modules/mediasource/WebKitSourceBufferList.idl +++ b/modules/mediasource/WebKitSourceBufferList.idl
@@ -30,7 +30,7 @@ [ NoInterfaceObject, - EnabledAtRuntime=WebKitMediaSource + RuntimeEnabled=WebKitMediaSource ] interface WebKitSourceBufferList : EventTarget { readonly attribute unsigned long length; getter WebKitSourceBuffer item(unsigned long index);
diff --git a/modules/mediasource/WindowMediaSource.idl b/modules/mediasource/WindowMediaSource.idl index bf5bbef..6221f9e 100644 --- a/modules/mediasource/WindowMediaSource.idl +++ b/modules/mediasource/WindowMediaSource.idl
@@ -28,7 +28,7 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ partial interface Window { - [EnabledAtRuntime=WebKitMediaSource] attribute WebKitMediaSourceConstructor WebKitMediaSource; - [EnabledAtRuntime=WebKitMediaSource] attribute WebKitSourceBufferConstructor WebKitSourceBuffer; - [EnabledAtRuntime=WebKitMediaSource] attribute WebKitSourceBufferListConstructor WebKitSourceBufferList; + [RuntimeEnabled=WebKitMediaSource] attribute WebKitMediaSourceConstructor WebKitMediaSource; + [RuntimeEnabled=WebKitMediaSource] attribute WebKitSourceBufferConstructor WebKitSourceBuffer; + [RuntimeEnabled=WebKitMediaSource] attribute WebKitSourceBufferListConstructor WebKitSourceBufferList; };
diff --git a/modules/mediastream/MediaStream.idl b/modules/mediastream/MediaStream.idl index 62d387f..2b65e3f 100644 --- a/modules/mediastream/MediaStream.idl +++ b/modules/mediastream/MediaStream.idl
@@ -27,7 +27,7 @@ Constructor, Constructor(MediaStream stream), Constructor(MediaStreamTrack[] tracks), - ConstructorCallWith=ScriptExecutionContext + ConstructorCallWith=ExecutionContext ] interface MediaStream : EventTarget { // DEPRECATED readonly attribute DOMString label; @@ -42,6 +42,8 @@ MediaStreamTrack getTrackById(DOMString trackId); readonly attribute boolean ended; + + // DEPRECATED void stop(); attribute EventHandler onended;
diff --git a/modules/mediastream/MediaStreamTrack.idl b/modules/mediastream/MediaStreamTrack.idl index f5d9ea9..409d17b 100644 --- a/modules/mediastream/MediaStreamTrack.idl +++ b/modules/mediastream/MediaStreamTrack.idl
@@ -28,14 +28,14 @@ readonly attribute DOMString kind; readonly attribute DOMString id; readonly attribute DOMString label; - attribute boolean enabled; - + attribute boolean enabled; readonly attribute DOMString readyState; + [CallWith=ExecutionContext, RaisesException] static void getSources(MediaStreamTrackSourcesCallback callback); + [ImplementedAs=stopTrack, RaisesException] void stop(); + attribute EventHandler onmute; attribute EventHandler onunmute; attribute EventHandler onended; - - [CallWith=ScriptExecutionContext, RaisesException] static void getSources(MediaStreamTrackSourcesCallback callback); };
diff --git a/modules/mediastream/NavigatorMediaStream.idl b/modules/mediastream/NavigatorMediaStream.idl index 960c32e..2f72684 100644 --- a/modules/mediastream/NavigatorMediaStream.idl +++ b/modules/mediastream/NavigatorMediaStream.idl
@@ -18,7 +18,7 @@ */ partial interface Navigator { - [EnabledAtRuntime=MediaStream, RaisesException] void webkitGetUserMedia(Dictionary options, + [RuntimeEnabled=MediaStream, RaisesException] void webkitGetUserMedia(Dictionary options, NavigatorUserMediaSuccessCallback successCallback, optional NavigatorUserMediaErrorCallback errorCallback); };
diff --git a/modules/mediastream/RTCPeerConnection.idl b/modules/mediastream/RTCPeerConnection.idl index f0c847c..4455522 100644 --- a/modules/mediastream/RTCPeerConnection.idl +++ b/modules/mediastream/RTCPeerConnection.idl
@@ -33,7 +33,7 @@ ActiveDOMObject, Constructor(Dictionary rtcIceServers, optional Dictionary mediaConstraints), ConstructorRaisesException, - ConstructorCallWith=ScriptExecutionContext + ConstructorCallWith=ExecutionContext ] interface RTCPeerConnection : EventTarget { [RaisesException] void createOffer(RTCSessionDescriptionCallback successCallback, [Default=Undefined] optional RTCErrorCallback failureCallback, optional Dictionary mediaConstraints);
diff --git a/modules/mediastream/RTCSessionDescription.idl b/modules/mediastream/RTCSessionDescription.idl index 0e3d464..70077ef 100644 --- a/modules/mediastream/RTCSessionDescription.idl +++ b/modules/mediastream/RTCSessionDescription.idl
@@ -29,10 +29,10 @@ */ [ - Constructor(Dictionary dictionary), + Constructor(optional Dictionary descriptionInitDict), ConstructorRaisesException ] interface RTCSessionDescription { - [SetterRaisesException] attribute DOMString type; - [SetterRaisesException] attribute DOMString sdp; + [SetterRaisesException, TreatReturnedNullStringAs=Null, TreatNullAs=NullString] attribute DOMString type; + [TreatReturnedNullStringAs=Null, TreatNullAs=NullString] attribute DOMString sdp; };
diff --git a/modules/mediastream/URLMediaStream.idl b/modules/mediastream/URLMediaStream.idl index 3b8edb5..d6d36cf 100644 --- a/modules/mediastream/URLMediaStream.idl +++ b/modules/mediastream/URLMediaStream.idl
@@ -28,5 +28,5 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ partial interface URL { - [CallWith=ScriptExecutionContext,TreatReturnedNullStringAs=Null] static DOMString createObjectURL(MediaStream? stream); + [CallWith=ExecutionContext,TreatReturnedNullStringAs=Null] static DOMString createObjectURL(MediaStream? stream); };
diff --git a/modules/notifications/Notification.idl b/modules/notifications/Notification.idl index 75a4779..cbce5d6 100644 --- a/modules/notifications/Notification.idl +++ b/modules/notifications/Notification.idl
@@ -32,16 +32,16 @@ [ ActiveDOMObject, Constructor(DOMString title, [Default=Undefined] optional Dictionary options), - ConstructorCallWith=ScriptExecutionContext, - EnabledAtRuntime=notifications + ConstructorCallWith=ExecutionContext, + RuntimeEnabled=notifications ] interface Notification : EventTarget { void show(); [Conditional=LEGACY_NOTIFICATIONS] void cancel(); void close(); - [CallWith=ScriptExecutionContext] static readonly attribute DOMString permission; - [CallWith=ScriptExecutionContext] static void requestPermission(optional NotificationPermissionCallback callback); + [CallWith=ExecutionContext] static readonly attribute DOMString permission; + [CallWith=ExecutionContext] static void requestPermission(optional NotificationPermissionCallback callback); attribute EventHandler onshow; [Conditional=LEGACY_NOTIFICATIONS] attribute EventHandler ondisplay;
diff --git a/modules/notifications/NotificationCenter.idl b/modules/notifications/NotificationCenter.idl index 9c27269..fb23a66 100644 --- a/modules/notifications/NotificationCenter.idl +++ b/modules/notifications/NotificationCenter.idl
@@ -34,7 +34,7 @@ Conditional=LEGACY_NOTIFICATIONS, ActiveDOMObject ] interface NotificationCenter { - [MeasureAs=LegacyTextNotifications, ActivityLog=Access, RaisesException] Notification createNotification(DOMString iconUrl, DOMString title, DOMString body); + [MeasureAs=LegacyTextNotifications, ActivityLogging=AccessForAllWorlds, RaisesException] Notification createNotification(DOMString iconUrl, DOMString title, DOMString body); long checkPermission(); void requestPermission(optional VoidCallback callback);
diff --git a/modules/notifications/WindowNotifications.idl b/modules/notifications/WindowNotifications.idl index 78a69d2..9f74cf0 100644 --- a/modules/notifications/WindowNotifications.idl +++ b/modules/notifications/WindowNotifications.idl
@@ -28,5 +28,5 @@ Conditional=LEGACY_NOTIFICATIONS, ImplementedAs=DOMWindowNotifications ] partial interface Window { - [EnabledAtRuntime=Notifications, MeasureAs=LegacyNotifications, PerWorldBindings, ActivityLog=GetterForIsolatedWorlds] readonly attribute NotificationCenter webkitNotifications; + [RuntimeEnabled=Notifications, MeasureAs=LegacyNotifications, PerWorldBindings, ActivityLogging=GetterForIsolatedWorlds] readonly attribute NotificationCenter webkitNotifications; };
diff --git a/modules/notifications/WorkerGlobalScopeNotifications.idl b/modules/notifications/WorkerGlobalScopeNotifications.idl index 70a33dd..f6468a7 100644 --- a/modules/notifications/WorkerGlobalScopeNotifications.idl +++ b/modules/notifications/WorkerGlobalScopeNotifications.idl
@@ -27,5 +27,5 @@ [ Conditional=LEGACY_NOTIFICATIONS ] partial interface WorkerGlobalScope { - [EnabledAtRuntime=Notifications] readonly attribute NotificationCenter webkitNotifications; + [RuntimeEnabled=Notifications] readonly attribute NotificationCenter webkitNotifications; };
diff --git a/modules/performance/WorkerGlobalScopePerformance.idl b/modules/performance/WorkerGlobalScopePerformance.idl index a737930..1522a1d 100644 --- a/modules/performance/WorkerGlobalScopePerformance.idl +++ b/modules/performance/WorkerGlobalScopePerformance.idl
@@ -29,7 +29,7 @@ */ [ - EnabledAtRuntime=HighResolutionTimeInWorkers + RuntimeEnabled=HighResolutionTimeInWorkers ] partial interface WorkerGlobalScope { readonly attribute WorkerPerformance performance; };
diff --git a/modules/quota/StorageInfo.idl b/modules/quota/StorageInfo.idl index f21070e..7988ac3 100644 --- a/modules/quota/StorageInfo.idl +++ b/modules/quota/StorageInfo.idl
@@ -29,6 +29,6 @@ const unsigned short TEMPORARY = 0; const unsigned short PERSISTENT = 1; - [CallWith=ScriptExecutionContext] void queryUsageAndQuota(unsigned short storageType, optional StorageUsageCallback usageCallback, optional StorageErrorCallback errorCallback); - [CallWith=ScriptExecutionContext] void requestQuota(unsigned short storageType, unsigned long long newQuotaInBytes, optional StorageQuotaCallback quotaCallback, optional StorageErrorCallback errorCallback); + [CallWith=ExecutionContext] void queryUsageAndQuota(unsigned short storageType, optional StorageUsageCallback usageCallback, optional StorageErrorCallback errorCallback); + [CallWith=ExecutionContext] void requestQuota(unsigned short storageType, unsigned long long newQuotaInBytes, optional StorageQuotaCallback quotaCallback, optional StorageErrorCallback errorCallback); };
diff --git a/modules/quota/StorageQuota.idl b/modules/quota/StorageQuota.idl index 1c8243e..a8f2c9c 100644 --- a/modules/quota/StorageQuota.idl +++ b/modules/quota/StorageQuota.idl
@@ -26,6 +26,6 @@ [ NoInterfaceObject ] interface StorageQuota { - [CallWith=ScriptExecutionContext] void queryUsageAndQuota(StorageUsageCallback usageCallback, optional StorageErrorCallback errorCallback); - [CallWith=ScriptExecutionContext] void requestQuota(unsigned long long newQuotaInBytes, optional StorageQuotaCallback quotaCallback, optional StorageErrorCallback errorCallback); + [CallWith=ExecutionContext] void queryUsageAndQuota(StorageUsageCallback usageCallback, optional StorageErrorCallback errorCallback); + [CallWith=ExecutionContext] void requestQuota(unsigned long long newQuotaInBytes, optional StorageQuotaCallback quotaCallback, optional StorageErrorCallback errorCallback); };
diff --git a/modules/serviceworkers/NavigatorServiceWorker.idl b/modules/serviceworkers/NavigatorServiceWorker.idl index 2747667..a2dcebf 100644 --- a/modules/serviceworkers/NavigatorServiceWorker.idl +++ b/modules/serviceworkers/NavigatorServiceWorker.idl
@@ -28,8 +28,8 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ [ - EnabledAtRuntime=ServiceWorker + RuntimeEnabled=ServiceWorker ] partial interface Navigator { - [CallWith=ScriptExecutionContext, RaisesException] Promise registerServiceWorker(DOMString pattern, DOMString src); - [CallWith=ScriptExecutionContext, RaisesException] Promise unregisterServiceWorker(DOMString pattern); + [CallWith=ExecutionContext, RaisesException] Promise registerServiceWorker(DOMString pattern, DOMString src); + [CallWith=ExecutionContext, RaisesException] Promise unregisterServiceWorker(DOMString pattern); };
diff --git a/modules/serviceworkers/ServiceWorker.idl b/modules/serviceworkers/ServiceWorker.idl index 866d0ea..b58eb90 100644 --- a/modules/serviceworkers/ServiceWorker.idl +++ b/modules/serviceworkers/ServiceWorker.idl
@@ -28,7 +28,7 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ [ - EnabledAtRuntime=ServiceWorker, + RuntimeEnabled=ServiceWorker, NoInterfaceObject ] interface ServiceWorker { };
diff --git a/modules/speech/SpeechGrammar.idl b/modules/speech/SpeechGrammar.idl index 0116770..1b629a4 100644 --- a/modules/speech/SpeechGrammar.idl +++ b/modules/speech/SpeechGrammar.idl
@@ -27,6 +27,6 @@ NoInterfaceObject, Constructor ] interface SpeechGrammar { - [URL,CallWith=ScriptExecutionContext] attribute DOMString src; + [URL,CallWith=ExecutionContext] attribute DOMString src; attribute float weight; };
diff --git a/modules/speech/SpeechGrammarList.idl b/modules/speech/SpeechGrammarList.idl index fa7c5e8..9239d9e 100644 --- a/modules/speech/SpeechGrammarList.idl +++ b/modules/speech/SpeechGrammarList.idl
@@ -29,6 +29,6 @@ ] interface SpeechGrammarList { readonly attribute unsigned long length; getter SpeechGrammar item(unsigned long index); - [CallWith=ScriptExecutionContext] void addFromUri(DOMString src, optional float weight); + [CallWith=ExecutionContext] void addFromUri(DOMString src, optional float weight); void addFromString(DOMString string, optional float weight); };
diff --git a/modules/speech/SpeechRecognition.idl b/modules/speech/SpeechRecognition.idl index 95eb5d5..b637e3a 100644 --- a/modules/speech/SpeechRecognition.idl +++ b/modules/speech/SpeechRecognition.idl
@@ -27,7 +27,7 @@ NoInterfaceObject, ActiveDOMObject, Constructor, - ConstructorCallWith=ScriptExecutionContext + ConstructorCallWith=ExecutionContext ] interface SpeechRecognition : EventTarget { attribute SpeechGrammarList grammars; attribute DOMString lang;
diff --git a/modules/speech/SpeechSynthesis.idl b/modules/speech/SpeechSynthesis.idl index 4fa847a..a88e496 100644 --- a/modules/speech/SpeechSynthesis.idl +++ b/modules/speech/SpeechSynthesis.idl
@@ -25,15 +25,17 @@ [ NoInterfaceObject, - EnabledAtRuntime=SpeechSynthesis -] interface SpeechSynthesis { + RuntimeEnabled=SpeechSynthesis +] interface SpeechSynthesis : EventTarget { readonly attribute boolean pending; readonly attribute boolean speaking; readonly attribute boolean paused; - void speak(SpeechSynthesisUtterance utterance); + [RaisesException] void speak(SpeechSynthesisUtterance utterance); void cancel(); void pause(); void resume(); sequence<SpeechSynthesisVoice> getVoices(); + + attribute EventHandler onvoiceschanged; };
diff --git a/modules/speech/SpeechSynthesisEvent.idl b/modules/speech/SpeechSynthesisEvent.idl index 39bb723..e438411 100644 --- a/modules/speech/SpeechSynthesisEvent.idl +++ b/modules/speech/SpeechSynthesisEvent.idl
@@ -24,7 +24,7 @@ */ [ - EnabledAtRuntime=SpeechSynthesis + RuntimeEnabled=SpeechSynthesis ] interface SpeechSynthesisEvent : Event { readonly attribute unsigned long charIndex; readonly attribute float elapsedTime;
diff --git a/modules/speech/SpeechSynthesisUtterance.idl b/modules/speech/SpeechSynthesisUtterance.idl index d32d7a8..fbedcdc 100644 --- a/modules/speech/SpeechSynthesisUtterance.idl +++ b/modules/speech/SpeechSynthesisUtterance.idl
@@ -24,8 +24,8 @@ */ [ - EnabledAtRuntime=SpeechSynthesis, - ConstructorCallWith=ScriptExecutionContext, + RuntimeEnabled=SpeechSynthesis, + ConstructorCallWith=ExecutionContext, Constructor([Default=NullString] optional DOMString text) ] interface SpeechSynthesisUtterance : EventTarget { attribute DOMString text;
diff --git a/modules/speech/SpeechSynthesisVoice.idl b/modules/speech/SpeechSynthesisVoice.idl index 9ca4754..a326a8c 100644 --- a/modules/speech/SpeechSynthesisVoice.idl +++ b/modules/speech/SpeechSynthesisVoice.idl
@@ -25,7 +25,7 @@ [ NoInterfaceObject, - EnabledAtRuntime=SpeechSynthesis + RuntimeEnabled=SpeechSynthesis ] interface SpeechSynthesisVoice { readonly attribute DOMString voiceURI; readonly attribute DOMString name;
diff --git a/modules/speech/WindowSpeechSynthesis.idl b/modules/speech/WindowSpeechSynthesis.idl index 7dd441e..833797b 100644 --- a/modules/speech/WindowSpeechSynthesis.idl +++ b/modules/speech/WindowSpeechSynthesis.idl
@@ -24,7 +24,7 @@ */ [ - EnabledAtRuntime=SpeechSynthesis, + RuntimeEnabled=SpeechSynthesis, ImplementedAs=DOMWindowSpeechSynthesis ] partial interface Window { readonly attribute SpeechSynthesis speechSynthesis;
diff --git a/core/dom/ErrorEvent.idl b/modules/speech/testing/InternalsSpeechSynthesis.idl similarity index 73% copy from core/dom/ErrorEvent.idl copy to modules/speech/testing/InternalsSpeechSynthesis.idl index 33f0239..34f2bc8 100644 --- a/core/dom/ErrorEvent.idl +++ b/modules/speech/testing/InternalsSpeechSynthesis.idl
@@ -1,5 +1,5 @@ /* - * Copyright (C) 2009 Google Inc. All rights reserved. + * Copyright (C) 2013 Samsung Electronics. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -28,13 +28,6 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -[ - ConstructorTemplate=Event -] interface ErrorEvent : Event { - [InitializedByEventConstructor] readonly attribute DOMString message; - [InitializedByEventConstructor] readonly attribute DOMString filename; - [InitializedByEventConstructor] readonly attribute unsigned long lineno; - [InitializedByEventConstructor] readonly attribute unsigned long colno; - [InitializedByEventConstructor, Custom, Unserializable] readonly attribute any error; +partial interface Internals { + void enableMockSpeechSynthesizer(Document document); }; -
diff --git a/modules/vibration/NavigatorVibration.idl b/modules/vibration/NavigatorVibration.idl index 8519266..3307c6a 100644 --- a/modules/vibration/NavigatorVibration.idl +++ b/modules/vibration/NavigatorVibration.idl
@@ -18,9 +18,11 @@ */ [ - EnabledAtRuntime=Vibration + RuntimeEnabled=Vibration ] partial interface Navigator { + // FIXME: The contents of the pattern argument should be clamped. + // See https://code.google.com/p/chromium/issues/detail?id=310138 boolean vibrate(sequence<unsigned long> pattern); - boolean vibrate(unsigned long time); + boolean vibrate([Clamp] unsigned long time); };
diff --git a/core/dom/ErrorEvent.idl b/modules/vibration/testing/InternalsVibration.idl similarity index 74% copy from core/dom/ErrorEvent.idl copy to modules/vibration/testing/InternalsVibration.idl index 33f0239..5da4484 100644 --- a/core/dom/ErrorEvent.idl +++ b/modules/vibration/testing/InternalsVibration.idl
@@ -1,5 +1,5 @@ /* - * Copyright (C) 2009 Google Inc. All rights reserved. + * Copyright (C) 2013 Samsung Electronics. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -28,13 +28,7 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -[ - ConstructorTemplate=Event -] interface ErrorEvent : Event { - [InitializedByEventConstructor] readonly attribute DOMString message; - [InitializedByEventConstructor] readonly attribute DOMString filename; - [InitializedByEventConstructor] readonly attribute unsigned long lineno; - [InitializedByEventConstructor] readonly attribute unsigned long colno; - [InitializedByEventConstructor, Custom, Unserializable] readonly attribute any error; +partial interface Internals { + boolean isVibrating(Document document); + sequence<unsigned long> pendingVibrationPattern(Document document); }; -
diff --git a/modules/webaudio/AnalyserNode.idl b/modules/webaudio/AnalyserNode.idl index 27117e1..f179f5e 100644 --- a/modules/webaudio/AnalyserNode.idl +++ b/modules/webaudio/AnalyserNode.idl
@@ -29,11 +29,11 @@ readonly attribute unsigned long frequencyBinCount; // minDecibels / maxDecibels represent the range to scale the FFT analysis data for conversion to unsigned byte values. - attribute float minDecibels; - attribute float maxDecibels; + [SetterRaisesException] attribute float minDecibels; + [SetterRaisesException] attribute float maxDecibels; // A value from 0.0 -> 1.0 where 0.0 represents no time averaging with the last analysis frame. - attribute float smoothingTimeConstant; + [SetterRaisesException] attribute float smoothingTimeConstant; // Copies the current frequency data into the passed array. // If the array has fewer elements than the frequencyBinCount, the excess elements will be dropped.
diff --git a/modules/webaudio/AudioBufferSourceNode.idl b/modules/webaudio/AudioBufferSourceNode.idl index 24c95eb..946b28b 100644 --- a/modules/webaudio/AudioBufferSourceNode.idl +++ b/modules/webaudio/AudioBufferSourceNode.idl
@@ -26,7 +26,7 @@ [ Conditional=WEB_AUDIO ] interface AudioBufferSourceNode : AudioSourceNode { - [CustomSetter, SetterRaisesException] attribute AudioBuffer buffer; + [StrictTypeChecking, SetterRaisesException] attribute AudioBuffer buffer; const unsigned short UNSCHEDULED_STATE = 0; const unsigned short SCHEDULED_STATE = 1; @@ -43,16 +43,14 @@ attribute double loopStart; attribute double loopEnd; - [MeasureAs=WebAudioStart] void start(double when); - [MeasureAs=WebAudioStart, ImplementedAs=startGrain] void start(double when, double grainOffset); - [MeasureAs=WebAudioStart, ImplementedAs=startGrain] void start(double when, double grainOffset, double grainDuration); - void stop(double when); + [RaisesException, MeasureAs=WebAudioStart] void start(optional double when, optional double grainOffset, optional double grainDuration); + [RaisesException] void stop(optional double when); [DeprecateAs=WebAudioLooping, ImplementedAs=loop] attribute boolean looping; // This is an alias for the .loop attribute for backwards compatibility. - [MeasureAs=LegacyWebAudio] void noteOn(double when); - [MeasureAs=LegacyWebAudio] void noteGrainOn(double when, double grainOffset, double grainDuration); - void noteOff(double when); + [RaisesException, ImplementedAs=start, MeasureAs=LegacyWebAudio] void noteOn(double when); + [RaisesException, MeasureAs=LegacyWebAudio] void noteGrainOn(double when, double grainOffset, double grainDuration); + [RaisesException, ImplementedAs=stop] void noteOff(double when); attribute EventHandler onended; };
diff --git a/modules/webaudio/AudioContext.idl b/modules/webaudio/AudioContext.idl index d1100f5..f14e8b6 100644 --- a/modules/webaudio/AudioContext.idl +++ b/modules/webaudio/AudioContext.idl
@@ -27,7 +27,10 @@ NoInterfaceObject, Conditional=WEB_AUDIO, ActiveDOMObject, - CustomConstructor + Constructor, + Constructor(unsigned long numberOfChannels, unsigned long numberOfFrames, float sampleRate), + ConstructorCallWith=Document, + ConstructorRaisesException ] interface AudioContext : EventTarget { // All rendered audio ultimately connects to destination, which represents the audio hardware. readonly attribute AudioDestinationNode destination; @@ -67,7 +70,7 @@ ConvolverNode createConvolver(); DynamicsCompressorNode createDynamicsCompressor(); AnalyserNode createAnalyser(); - [RaisesException] ScriptProcessorNode createScriptProcessor(unsigned long bufferSize, optional unsigned long numberOfInputChannels, optional unsigned long numberOfOutputChannels); + [RaisesException] ScriptProcessorNode createScriptProcessor(optional unsigned long bufferSize, optional unsigned long numberOfInputChannels, optional unsigned long numberOfOutputChannels); OscillatorNode createOscillator(); [RaisesException] PeriodicWave createPeriodicWave(Float32Array real, Float32Array imag);
diff --git a/modules/webaudio/OfflineAudioContext.idl b/modules/webaudio/OfflineAudioContext.idl index 81c104e..84c50e3 100644 --- a/modules/webaudio/OfflineAudioContext.idl +++ b/modules/webaudio/OfflineAudioContext.idl
@@ -27,7 +27,7 @@ Conditional=WEB_AUDIO, Constructor(unsigned long numberOfChannels, unsigned long numberOfFrames, float sampleRate), ConstructorRaisesException, - ConstructorCallWith=ScriptExecutionContext + ConstructorCallWith=ExecutionContext ] interface OfflineAudioContext : AudioContext { };
diff --git a/modules/webaudio/OscillatorNode.idl b/modules/webaudio/OscillatorNode.idl index 949eac6..0b5962a 100644 --- a/modules/webaudio/OscillatorNode.idl +++ b/modules/webaudio/OscillatorNode.idl
@@ -47,11 +47,11 @@ readonly attribute AudioParam frequency; // in Hertz readonly attribute AudioParam detune; // in Cents - void start(double when); - void stop(double when); + [RaisesException] void start(optional double when); + [RaisesException] void stop(optional double when); - void noteOn(double when); - void noteOff(double when); + [RaisesException, ImplementedAs=start] void noteOn(double when); + [RaisesException, ImplementedAs=stop] void noteOff(double when); void setPeriodicWave(PeriodicWave periodicWave);
diff --git a/modules/webaudio/WaveShaperNode.idl b/modules/webaudio/WaveShaperNode.idl index c4f4c81..a789722 100644 --- a/modules/webaudio/WaveShaperNode.idl +++ b/modules/webaudio/WaveShaperNode.idl
@@ -22,15 +22,9 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -enum OverSampleType { - "none", - "2x", - "4x" -}; - [ Conditional=WEB_AUDIO ] interface WaveShaperNode : AudioNode { attribute Float32Array curve; - [SetterRaisesException] attribute OverSampleType oversample; + [SetterRaisesException] attribute DOMString oversample; };
diff --git a/modules/webdatabase/WindowWebDatabase.idl b/modules/webdatabase/WindowWebDatabase.idl index 1459918..8502e37 100644 --- a/modules/webdatabase/WindowWebDatabase.idl +++ b/modules/webdatabase/WindowWebDatabase.idl
@@ -27,6 +27,6 @@ [ ImplementedAs=DOMWindowWebDatabase ] partial interface Window { - [EnabledAtRuntime=Database, MeasureAs=OpenWebDatabase, PerWorldBindings, ActivityLog=AccessForIsolatedWorlds, RaisesException] Database openDatabase(DOMString name, DOMString version, DOMString displayName, unsigned long estimatedSize, optional DatabaseCallback creationCallback); + [RuntimeEnabled=Database, MeasureAs=OpenWebDatabase, PerWorldBindings, ActivityLogging=AccessForIsolatedWorlds, RaisesException] Database openDatabase(DOMString name, DOMString version, DOMString displayName, unsigned long estimatedSize, optional DatabaseCallback creationCallback); };
diff --git a/modules/webdatabase/WorkerGlobalScopeWebDatabase.idl b/modules/webdatabase/WorkerGlobalScopeWebDatabase.idl index 9631dd7..095c320 100644 --- a/modules/webdatabase/WorkerGlobalScopeWebDatabase.idl +++ b/modules/webdatabase/WorkerGlobalScopeWebDatabase.idl
@@ -25,8 +25,8 @@ */ partial interface WorkerGlobalScope { - [EnabledAtRuntime=Database, RaisesException] Database openDatabase(DOMString name, DOMString version, DOMString displayName, unsigned long estimatedSize, optional DatabaseCallback creationCallback); + [RuntimeEnabled=Database, RaisesException] Database openDatabase(DOMString name, DOMString version, DOMString displayName, unsigned long estimatedSize, optional DatabaseCallback creationCallback); - [EnabledAtRuntime=Database, RaisesException] DatabaseSync openDatabaseSync(DOMString name, DOMString version, DOMString displayName, unsigned long estimatedSize, optional DatabaseCallback creationCallback); + [RuntimeEnabled=Database, RaisesException] DatabaseSync openDatabaseSync(DOMString name, DOMString version, DOMString displayName, unsigned long estimatedSize, optional DatabaseCallback creationCallback); };
diff --git a/modules/webmidi/MIDIConnectionEvent.idl b/modules/webmidi/MIDIConnectionEvent.idl index 8731966..7ec690b 100644 --- a/modules/webmidi/MIDIConnectionEvent.idl +++ b/modules/webmidi/MIDIConnectionEvent.idl
@@ -29,7 +29,7 @@ */ [ - EnabledAtRuntime=WebMIDI, + RuntimeEnabled=WebMIDI, ConstructorTemplate=Event ] interface MIDIConnectionEvent : Event { [InitializedByEventConstructor] readonly attribute MIDIPort port;
diff --git a/modules/webmidi/MIDIMessageEvent.idl b/modules/webmidi/MIDIMessageEvent.idl index 1734b42..087079e 100644 --- a/modules/webmidi/MIDIMessageEvent.idl +++ b/modules/webmidi/MIDIMessageEvent.idl
@@ -31,7 +31,7 @@ // FIXME: The spec doesn't provide details about constructor, yet. // See also, https://github.com/WebAudio/web-midi-api/issues/1 . [ - EnabledAtRuntime=WebMIDI, + RuntimeEnabled=WebMIDI, ConstructorTemplate=Event ] interface MIDIMessageEvent : Event { [InitializedByEventConstructor] readonly attribute double receivedTime;
diff --git a/modules/webmidi/MIDIOutput.idl b/modules/webmidi/MIDIOutput.idl index 78dff22..06a75ce 100644 --- a/modules/webmidi/MIDIOutput.idl +++ b/modules/webmidi/MIDIOutput.idl
@@ -30,7 +30,8 @@ [ CustomToV8, - NoInterfaceObject + NoInterfaceObject, + ActiveDOMObject ] interface MIDIOutput : MIDIPort { [RaisesException] void send(Uint8Array data, optional double timestamp); [RaisesException] void send(sequence<unsigned long> data, optional double timestamp);
diff --git a/modules/webmidi/NavigatorWebMIDI.idl b/modules/webmidi/NavigatorWebMIDI.idl index a1e4ed0..e8ad27d 100644 --- a/modules/webmidi/NavigatorWebMIDI.idl +++ b/modules/webmidi/NavigatorWebMIDI.idl
@@ -29,5 +29,5 @@ */ partial interface Navigator { - [EnabledAtRuntime=WebMIDI] MIDIAccessPromise requestMIDIAccess(optional Dictionary options); + [RuntimeEnabled=WebMIDI] MIDIAccessPromise requestMIDIAccess(optional Dictionary options); };
diff --git a/modules/websockets/WebSocket.idl b/modules/websockets/WebSocket.idl index 9748b64..9430204 100644 --- a/modules/websockets/WebSocket.idl +++ b/modules/websockets/WebSocket.idl
@@ -36,7 +36,7 @@ Constructor(DOMString url, sequence<DOMString> protocols), Constructor(DOMString url, DOMString protocol), ConstructorRaisesException, - ConstructorCallWith=ScriptExecutionContext + ConstructorCallWith=ExecutionContext ] interface WebSocket : EventTarget { readonly attribute DOMString URL; // Lowercased .url is the one in the spec, but leaving .URL for compatibility reasons. readonly attribute DOMString url;