Changes between Initial Version and Version 1 of IdlAttributes


Ignore:
Timestamp:
Jul 17, 2009 1:17:34 PM (15 years ago)
Author:
atwilson@chromium.org
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • IdlAttributes

    v1 v1  
     1WebCore contains a set of [http://www.w3.org/TR/WebIDL/ IDL files] which define the public interface that WebCore classes expose to Javascript and ObjectiveC. These IDL files are parsed and code is automatically generated which maintains a "binding" between an external interface (e.g. a Javascript object) and the internal WebCore implementations.
     2
     3The format of these files are fairly well documented and (mostly) adhere to the syntax described in the [http://www.w3.org/TR/WebIDL/ w3c specification], but there are several differences which are noted below.
     4
     5The ''interface'' declaration takes an optional set of attributes:
     6
     7 Conditional=''CONDITIONALNAME''::
     8  Wraps the generated binding code in "#if ENABLE(''CONDITIONALNAME'')". Typically used to allow turning off features on certain platforms (or to disable new features while they are under development).
     9
     10  CustomMarkFunction::
     11  Adds a "virtual void mark()" declaration to the generated header file for the binding class. This allows a custom binding implementation to provide their own mark() function in WebCore/bindings/js/JS''ClassName''Custom.cpp for doing custom handling of garbage collection.
     12
     13  DelegatingGetOwnPropertySlot::
     14  Used when a given instance wants to customize the lookup of properties. Examples are the HTML History object, which needs to enforce restrictions on which attributes are visible cross-domain, or WorkerContext, which wants to delegate lookup to the global object before looking up properties in its own prototype.
     15
     16  ExtendsDOMGlobalObject::
     17  Does not expose the object prototype externally, as the class cannot be derived from externally. Also uses this object internally whenever it needs to access the JSDOMGlobalObject.
     18
     19  LegacyParent=''ParentClass''::
     20  Allows setting the base class for the generated binding. Otherwise, the base class would be set to DOMObject or the explicitly specified parent class in the interface definition.