Changes between Version 42 and Version 43 of WebKitIDL
- Timestamp:
- Feb 19, 2012 10:14:44 PM (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
WebKitIDL
v42 v43 1 1 = THIS DOCUMENT IS STILL DRAFT = 2 2 3 #naming-rules 4 5 = Overview = 3 = Table of Contents = 4 5 [#Overview Overview] 6 [#Basics Basics of IDL] 7 [#BindingsCode Where is the bindings code?] 8 [#NamingRules Basic naming rules of IDL attribute] 9 [#IDLAttributes IDL attributes] 10 - [#TreatNullAs TreatNullAs] 11 12 = Overview = #Overview 6 13 7 14 The [http://www.w3.org/TR/WebIDL/ Web IDL] is a language that defines how WebCore interfaces are bound to external languages such as JavaScriptCore, V8, ObjC, GObject and CPP. We need to write IDL files (e.g. XMLHttpRequest.idl, Element.idl, etc) to expose WebCore interfaces to those external languages. When WebKit is built, the IDL files are parsed, and the code to bind WebCore implementations and JavaScriptCore/V8/ObjC/GObject/CPP interfaces is automatically generated. … … 9 16 This page describes practical information about how the IDL binding works and how we can write IDL files in WebKit. The syntax of IDL files is fairly well documented in the [http://www.w3.org/TR/WebIDL/ Web IDL spec], but it is too formal to read:-) and there are several differences between the Web IDL spec and the WebKit IDL due to implementation issues. 10 17 11 = Basics of IDL = 18 = Basics of IDL = #Basics 12 19 13 20 Here is an example of IDL files: … … 75 82 }}} 76 83 77 = Where is the bindings code? = 84 = Where is the bindings code? = #BindingsCode 78 85 79 86 By reading this document you can learn how IDL attributes work. … … 92 99 * CPP: WebKitBuild/Release/DerivedSources/WebCore/WebDOMXXX.h, WebKitBuild/Release/DerivedSources/WebCore/WebDOMXXX.cpp 93 100 94 = Basic naming rules of IDL attribute = # naming-rules101 = Basic naming rules of IDL attribute = #NamingRules 95 102 96 103 There are a few rules of IDL attribute naming: … … 106 113 For example, [JSNoStaticTables], [CustomGetter], [V8CustomGetter], etc. 107 114 108 = IDL attributes = 115 = IDL attributes = #IDLAttributes 109 116 110 117 In the following explanations, (i), (m), (a) and (p) means that the IDL attribute can be specified on interfaces, methods, attributes and parameters, respectively. For example, (a,p) means that the IDL attribute can be specified on attributes and parameters. 111 118 112 == [TreatNullAs](a,p), [TreatUndefinedAs](a,p) == 119 == [TreatNullAs](a,p), [TreatUndefinedAs](a,p) == #TreatNullAs 113 120 114 121 * [http://dev.w3.org/2006/webapi/WebIDL/#TreatNullAs The spec of TreatNullAs] (Note: The WebKit IDL explained below behaves differently from the spec)