* SUMMARY Add more DOM Native Function parameter strings. I autogenerated a set from our IDL to fill in the rest of our interfaces. I did handle: - optional parameters - static vs non-static I didn't handle: - Native DOM functions that are constructors - For overloaded IDL functions (WebGL Context has a few for example) I only generated a parameter list for the first function - Default values, because they seemed almost always to be Undefined / NullString / TreatUndefinedAsNullString
<rdar://problem/20184149>
Created attachment 248776 [details] [SCRIPT] IDL CodeGenerator used to autogenerate the JSON objects Note to future self: To use this, I made DerivedSources.make run the JS codegenerator and this codegenerator for all IDL files. Then I just processed the stdout output: (striped empty objects, sorted, pretty printed, and hand edited).
Created attachment 248778 [details] [PATCH] Proposed Fix
Comment on attachment 248778 [details] [PATCH] Proposed Fix View in context: https://bugs.webkit.org/attachment.cgi?id=248778&action=review > Source/WebInspectorUI/UserInterface/Models/NativeFunctionParameters.js:1495 > + SecurityPolicy: { I am not sure if this is real, or just for tests? Tests use "document.securityPolicy", but I don't see that in general browsing.
Comment on attachment 248778 [details] [PATCH] Proposed Fix View in context: https://bugs.webkit.org/attachment.cgi?id=248778&action=review > Source/WebInspectorUI/UserInterface/Models/NativeFunctionParameters.js:984 > + /* EventTarget */ So these are empty but inherit from EventTarget. >> Source/WebInspectorUI/UserInterface/Models/NativeFunctionParameters.js:1495 >> + SecurityPolicy: { > > I am not sure if this is real, or just for tests? Tests use "document.securityPolicy", but I don't see that in general browsing. Likely not exposed. > Source/WebInspectorUI/UserInterface/Models/NativeFunctionParameters.js:2076 > + var eventTargetTypes = [ Oh I see now. > Source/WebInspectorUI/UserInterface/Models/NativeFunctionParameters.js:2084 > + for (var type of eventTargetTypes) Newline before this?
Comment on attachment 248778 [details] [PATCH] Proposed Fix View in context: https://bugs.webkit.org/attachment.cgi?id=248778&action=review >>> Source/WebInspectorUI/UserInterface/Models/NativeFunctionParameters.js:1495 >>> + SecurityPolicy: { >> >> I am not sure if this is real, or just for tests? Tests use "document.securityPolicy", but I don't see that in general browsing. > > Likely not exposed. It is behind ENABLE_CSP_NEXT, which Mac doesn't have enabled yet. I'll keep it, this is intended to be a public API I guess.
Comment on attachment 248778 [details] [PATCH] Proposed Fix View in context: https://bugs.webkit.org/attachment.cgi?id=248778&action=review > Source/WebCore/dom/Document.idl:214 > - NodeList getElementsByClassName([Default=Undefined] optional DOMString tagname); > + NodeList getElementsByClassName([Default=Undefined] optional DOMString classNames); So this is causing our ObjC API checker to complain: > Public API change. There are missing public properties and/or methods from the "DOMDocument" class. > - (DOMNodeList *)getElementsByClassName:(NSString *)tagname; This should be fine, but I'm going to avoid making this change in this patch. As it really doesn't matter.
You can make the change in a follow up. Just update the big header that is cross references to make it stick.
(In reply to comment #8) > You can make the change in a follow up. Just update the big header that is > cross references to make it stick. Yep, I realized that now. I also have a few CodeGenerator cleanup patches after reading through some of the code.
http://trac.webkit.org/changeset/181614