Changes between Version 42 and Version 43 of WebKitIDL


Ignore:
Timestamp:
Feb 19, 2012 10:14:44 PM (10 years ago)
Author:
haraken@chromium.org
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • WebKitIDL

    v42 v43  
    11= THIS DOCUMENT IS STILL DRAFT =
    22
    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
    613
    714The [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.
     
    916This 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.
    1017
    11 = Basics of IDL =
     18= Basics of IDL = #Basics
    1219
    1320Here is an example of IDL files:
     
    7582}}}
    7683
    77 = Where is the bindings code? =
     84= Where is the bindings code? = #BindingsCode
    7885
    7986By reading this document you can learn how IDL attributes work.
     
    9299 * CPP: WebKitBuild/Release/DerivedSources/WebCore/WebDOMXXX.h, WebKitBuild/Release/DerivedSources/WebCore/WebDOMXXX.cpp
    93100
    94 = Basic naming rules of IDL attribute = #naming-rules
     101= Basic naming rules of IDL attribute = #NamingRules
    95102
    96103There are a few rules of IDL attribute naming:
     
    106113For example, [JSNoStaticTables], [CustomGetter], [V8CustomGetter], etc.
    107114
    108 = IDL attributes =
     115= IDL attributes = #IDLAttributes
    109116
    110117In 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.
    111118
    112 ==  [TreatNullAs](a,p), [TreatUndefinedAs](a,p) ==
     119==  [TreatNullAs](a,p), [TreatUndefinedAs](a,p) == #TreatNullAs
    113120
    114121 * [http://dev.w3.org/2006/webapi/WebIDL/#TreatNullAs The spec of TreatNullAs] (Note: The WebKit IDL explained below behaves differently from the spec)