Changeset 141502 in webkit


Ignore:
Timestamp:
Jan 31, 2013, 4:25:43 PM (12 years ago)
Author:
haraken@chromium.org
Message:

[V8] Simplify CodeGeneratorV8.pm by using InheritsExtendedAttribute("EventTarget")
https://bugs.webkit.org/show_bug.cgi?id=108441

Reviewed by Adam Barth.

A complicated condition in GetInternalFields() can be simplified
by using InheritsExtendedAttribute("EventTarget").

No tests. No change in behavior.

  • bindings/scripts/CodeGeneratorV8.pm:

(GetInternalFields):

  • dom/EventTarget.idl: Added [EventTarget] which should have been added.
  • svg/SVGElementInstance.idl: Ditto.
Location:
trunk/Source/WebCore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r141500 r141502  
     12013-01-31  Kentaro Hara  <haraken@chromium.org>
     2
     3        [V8] Simplify CodeGeneratorV8.pm by using InheritsExtendedAttribute("EventTarget")
     4        https://bugs.webkit.org/show_bug.cgi?id=108441
     5
     6        Reviewed by Adam Barth.
     7
     8        A complicated condition in GetInternalFields() can be simplified
     9        by using InheritsExtendedAttribute("EventTarget").
     10
     11        No tests. No change in behavior.
     12
     13        * bindings/scripts/CodeGeneratorV8.pm:
     14        (GetInternalFields):
     15        * dom/EventTarget.idl: Added [EventTarget] which should have been added.
     16        * svg/SVGElementInstance.idl: Ditto.
     17
    1182013-01-31  Youenn Fablet  <youennf@gmail.com>
    219
  • trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm

    r141360 r141502  
    617617
    618618    my @customInternalFields = ();
    619     # We can't ask whether a parent type has a given extendedAttribute,
    620     # so special-case AbstractWorker and WorkerContext to include all sub-types.
    621619    # Event listeners on DOM nodes are explicitly supported in the GC controller.
    622     # FIXME: Simplify this when all EventTargets are subtypes of EventTarget.
    623     if (!$codeGenerator->InheritsInterface($interface, "Node")
    624         && ($interface->extendedAttributes->{"EventTarget"}
    625             || $interface->extendedAttributes->{"IsWorkerContext"}
    626             || $codeGenerator->InheritsInterface($interface, "AbstractWorker")
    627             || $codeGenerator->InheritsInterface($interface, "EventTarget"))) {
     620    if (!$codeGenerator->InheritsInterface($interface, "Node") &&
     621        $codeGenerator->InheritsExtendedAttribute($interface, "EventTarget")) {
    628622        push(@customInternalFields, "eventListenerCacheIndex");
    629623    }
    630 
    631624    return @customInternalFields;
    632625}
  • trunk/Source/WebCore/dom/EventTarget.idl

    r136550 r141502  
    2626    CustomToJSObject,
    2727    JSCustomToNativeObject,
    28     V8NoWrapperCache
     28    V8NoWrapperCache,
     29    EventTarget
    2930] interface EventTarget {
    3031    [ObjCLegacyUnnamedParameters] void addEventListener(in DOMString type,
  • trunk/Source/WebCore/svg/SVGElementInstance.idl

    r131172 r141502  
    2929    JSCustomMarkFunction,
    3030    JSGenerateToNativeObject,
    31     JSGenerateToJSObject
     31    JSGenerateToJSObject,
     32    EventTarget
    3233] interface SVGElementInstance
    3334#if defined(LANGUAGE_OBJECTIVE_C) && LANGUAGE_OBJECTIVE_C
Note: See TracChangeset for help on using the changeset viewer.