Changeset 29041 in webkit


Ignore:
Timestamp:
Dec 30, 2007 2:24:47 PM (16 years ago)
Author:
weinig@apple.com
Message:

WebCore:

Reviewed by Oliver Hunt.

Patch for http://bugs.webkit.org/show_bug.cgi?id=10686
event instanceof MouseEvent throws exception

Add JS constructors for all the Event types.

Test: fast/events/event-instanceof.html

  • WebCore.xcodeproj/project.pbxproj:
  • dom/KeyboardEvent.idl:
  • dom/MouseEvent.idl:
  • dom/MutationEvent.idl:
  • dom/OverflowEvent.idl:
  • dom/ProgressEvent.idl:
  • dom/TextEvent.idl:
  • dom/UIEvent.idl:
  • dom/WheelEvent.idl:
  • page/DOMWindow.idl:

LayoutTests:

Reviewed by Oliver Hunt.

Test for http://bugs.webkit.org/show_bug.cgi?id=10686
event instanceof MouseEvent throws exception

  • fast/dom/Window/window-properties-expected.txt:
  • fast/events/event-instanceof.html: Added.
  • fast/events/resources/event-instanceof.js: Added.
Location:
trunk
Files:
2 added
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r29039 r29041  
     12007-12-30  Sam Weinig  <sam@webkit.org>
     2
     3        Reviewed by Oliver Hunt.
     4
     5        Test for http://bugs.webkit.org/show_bug.cgi?id=10686
     6        event instanceof MouseEvent throws exception
     7
     8        * fast/dom/Window/window-properties-expected.txt:
     9        * fast/events/event-instanceof.html: Added.
     10        * fast/events/resources/event-instanceof.js: Added.
     11
    1122007-12-30  David Kilzer  <ddkilzer@webkit.org>
    213
  • trunk/LayoutTests/fast/dom/Window/window-properties-expected.txt

    r28981 r29041  
    690690window.HTMLVideoElement.prototype [printed above as window.Element.prototype]
    691691window.Image [object Object]
     692window.KeyboardEvent [object KeyboardEventConstructor]
     693window.KeyboardEvent.prototype [printed above as window.Event.prototype]
    692694window.MediaError [object MediaErrorConstructor]
    693695window.MediaError.MEDIA_ERR_ABORTED [number]
     
    703705window.MediaList.prototype.deleteMedium [function]
    704706window.MediaList.prototype.item [function]
     707window.MouseEvent [object MouseEventConstructor]
     708window.MouseEvent.prototype [printed above as window.Event.prototype]
    705709window.MutationEvent [object MutationEventConstructor]
    706710window.MutationEvent.ADDITION [number]
     
    798802window.Notation.prototype [printed above as window.Node.prototype]
    799803window.Option [object Object]
     804window.OverflowEvent [object OverflowEventConstructor]
     805window.OverflowEvent.BOTH [number]
     806window.OverflowEvent.HORIZONTAL [number]
     807window.OverflowEvent.VERTICAL [number]
     808window.OverflowEvent.prototype [printed above as window.Event.prototype]
    800809window.ProcessingInstruction [object ProcessingInstructionConstructor]
    801810window.ProcessingInstruction.prototype [printed above as window.Node.prototype]
     811window.ProgressEvent [object ProgressEventConstructor]
     812window.ProgressEvent.prototype [printed above as window.Event.prototype]
    802813window.Range [object RangeConstructor]
    803814window.Range.END_TO_END [number]
     
    10671078window.Text [object TextConstructor]
    10681079window.Text.prototype [printed above as window.CharacterData.prototype]
     1080window.TextEvent [object TextEventConstructor]
     1081window.TextEvent.prototype [printed above as window.Event.prototype]
    10691082window.TypeError [function]
     1083window.UIEvent [object UIEventConstructor]
     1084window.UIEvent.prototype [printed above as window.Event.prototype]
    10701085window.URIError [function]
     1086window.WheelEvent [object WheelEventConstructor]
     1087window.WheelEvent.prototype [printed above as window.Event.prototype]
    10711088window.XMLDocument [printed above as window.Document]
    10721089window.XMLHttpRequest [object Object]
  • trunk/WebCore/ChangeLog

    r29039 r29041  
     12007-12-30  Sam Weinig  <sam@webkit.org>
     2
     3        Reviewed by Oliver Hunt.
     4
     5        Patch for http://bugs.webkit.org/show_bug.cgi?id=10686
     6        event instanceof MouseEvent throws exception
     7
     8        Add JS constructors for all the Event types.
     9
     10        Test: fast/events/event-instanceof.html
     11
     12        * WebCore.xcodeproj/project.pbxproj:
     13        * dom/KeyboardEvent.idl:
     14        * dom/MouseEvent.idl:
     15        * dom/MutationEvent.idl:
     16        * dom/OverflowEvent.idl:
     17        * dom/ProgressEvent.idl:
     18        * dom/TextEvent.idl:
     19        * dom/UIEvent.idl:
     20        * dom/WheelEvent.idl:
     21        * page/DOMWindow.idl:
     22
    1232007-12-30  David Kilzer  <ddkilzer@webkit.org>
    224
  • trunk/WebCore/WebCore.xcodeproj/project.pbxproj

    r29012 r29041  
    1428814288                        isa = PBXProject;
    1428914289                        buildConfigurationList = 149C284308902B11008A9EFC /* Build configuration list for PBXProject "WebCore" */;
     14290                        compatibilityVersion = "Xcode 2.4";
    1429014291                        hasScannedForEncodings = 1;
    1429114292                        knownRegions = (
  • trunk/WebCore/dom/KeyboardEvent.idl

    r25754 r29041  
    2222
    2323    // Introduced in DOM Level 3:
    24     interface KeyboardEvent : UIEvent {
     24    interface [
     25        GenerateConstructor
     26    ] KeyboardEvent : UIEvent {
    2527
    2628#if !defined(LANGUAGE_JAVASCRIPT)
  • trunk/WebCore/dom/MouseEvent.idl

    r25754 r29041  
    2121
    2222    // Introduced in DOM Level 2:
    23     interface MouseEvent : UIEvent {
     23    interface [
     24        GenerateConstructor
     25    ] MouseEvent : UIEvent {
    2426        readonly attribute long             screenX;
    2527        readonly attribute long             screenY;
  • trunk/WebCore/dom/MutationEvent.idl

    r25754 r29041  
    2121
    2222    // Introduced in DOM Level 2:
    23     interface [GenerateConstructor] MutationEvent : Event {
     23    interface [
     24        GenerateConstructor
     25    ] MutationEvent : Event {
    2426
    2527        // attrChangeType
  • trunk/WebCore/dom/OverflowEvent.idl

    r20130 r29041  
    2525module events {
    2626
    27     interface OverflowEvent : Event {
     27    interface [
     28        GenerateConstructor
     29    ] OverflowEvent : Event {
    2830        const unsigned short HORIZONTAL = 0;
    2931        const unsigned short VERTICAL   = 1;
  • trunk/WebCore/dom/ProgressEvent.idl

    r27277 r29041  
    2323 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    2424 */
     25
    2526module events {
    2627
    27 interface ProgressEvent : Event {
    28      readonly attribute boolean         lengthComputable;
    29      readonly attribute unsigned long   loaded;
    30      readonly attribute unsigned long   total;
    31      void               initProgressEvent(in DOMString typeArg,
    32                                           in boolean       canBubbleArg,
    33                                           in boolean       cancelableArg,
    34                                           in boolean       lengthComputableArg,
    35                                           in unsigned long loadedArg,
    36                                           in unsigned long totalArg);
    37      void               initProgressEventNS(in DOMString namespaceURI,
    38                                             in DOMString typeArg,
    39                                             in boolean       canBubbleArg,
    40                                             in boolean       cancelableArg,
    41                                             in boolean       lengthComputableArg,
    42                                             in unsigned long loadedArg,
    43                                             in unsigned long totalArg);
    44 };
     28    interface [
     29        GenerateConstructor
     30    ] ProgressEvent : Event {
     31         readonly attribute boolean         lengthComputable;
     32         readonly attribute unsigned long   loaded;
     33         readonly attribute unsigned long   total;
     34         void               initProgressEvent(in DOMString typeArg,
     35                                              in boolean       canBubbleArg,
     36                                              in boolean       cancelableArg,
     37                                              in boolean       lengthComputableArg,
     38                                              in unsigned long loadedArg,
     39                                              in unsigned long totalArg);
     40         void               initProgressEventNS(in DOMString namespaceURI,
     41                                                in DOMString typeArg,
     42                                                in boolean       canBubbleArg,
     43                                                in boolean       cancelableArg,
     44                                                in boolean       lengthComputableArg,
     45                                                in unsigned long loadedArg,
     46                                                in unsigned long totalArg);
     47    };
    4548
    4649}
  • trunk/WebCore/dom/TextEvent.idl

    r19538 r29041  
    2727
    2828    // Introduced in DOM Level 3:
    29     interface TextEvent : UIEvent {
     29    interface [
     30        GenerateConstructor
     31    ] TextEvent : UIEvent {
    3032
    3133        readonly attribute DOMString data;
  • trunk/WebCore/dom/UIEvent.idl

    r25754 r29041  
    2121
    2222    // Introduced in DOM Level 2:
    23     interface UIEvent : Event {
     23    interface [
     24        GenerateConstructor
     25    ] UIEvent : Event {
    2426        readonly attribute DOMWindow            view;
    2527        readonly attribute long                 detail;
  • trunk/WebCore/dom/WheelEvent.idl

    r25754 r29041  
    11/*
    2  * Copyright (C) 2006 Apple Computer, Inc.
     2 * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.
    33 * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
    44 *
     
    2222
    2323    // Based off of proposed IDL interface for WheelEvent:
    24     interface WheelEvent : UIEvent {
     24    interface [
     25        GenerateConstructor
     26    ] WheelEvent : UIEvent {
    2527        readonly attribute long    screenX;
    2628        readonly attribute long    screenY;
  • trunk/WebCore/page/DOMWindow.idl

    r28570 r29041  
    241241
    242242        attribute EventConstructor Event;
     243        attribute KeyboardEventConstructor KeyboardEvent;
     244        attribute MouseEventConstructor MouseEvent;
    243245        attribute MutationEventConstructor MutationEvent;
     246        attribute OverflowEventConstructor OverflowEvent;
     247        attribute ProgressEventConstructor ProgressEvent;
     248        attribute TextEventConstructor TextEvent;
     249        attribute UIEventConstructor UIEvent;
     250        attribute WheelEventConstructor WheelEvent;
    244251
    245252        attribute NodeFilterConstructor NodeFilter;
Note: See TracChangeset for help on using the changeset viewer.