Changeset 99438 in webkit


Ignore:
Timestamp:
Nov 7, 2011 10:04:51 AM (12 years ago)
Author:
dominicc@chromium.org
Message:

Remove initCloseEvent method
https://bugs.webkit.org/show_bug.cgi?id=71374

Reviewed by Ojan Vafai.

Source/WebCore:

Test: fast/dom/Window/window-properties.html

  • websockets/CloseEvent.h:

(WebCore::CloseEvent::initCloseEvent):

  • websockets/CloseEvent.idl:

LayoutTests:

  • fast/dom/Window/window-properties-expected.txt:
  • platform/gtk/fast/dom/Window/window-properties-expected.txt:
  • platform/mac/fast/dom/Window/window-properties-expected.txt:
  • platform/qt-wk2/fast/dom/Window/window-properties-expected.txt:
  • platform/qt/fast/dom/Window/window-properties-expected.txt:
  • platform/win/fast/dom/Window/window-properties-expected.txt:
Location:
trunk
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r99435 r99438  
     12011-11-07  Dominic Cooney  <dominicc@chromium.org>
     2
     3        Remove initCloseEvent method
     4        https://bugs.webkit.org/show_bug.cgi?id=71374
     5
     6        Reviewed by Ojan Vafai.
     7
     8        * fast/dom/Window/window-properties-expected.txt:
     9        * platform/gtk/fast/dom/Window/window-properties-expected.txt:
     10        * platform/mac/fast/dom/Window/window-properties-expected.txt:
     11        * platform/qt-wk2/fast/dom/Window/window-properties-expected.txt:
     12        * platform/qt/fast/dom/Window/window-properties-expected.txt:
     13        * platform/win/fast/dom/Window/window-properties-expected.txt:
     14
    1152011-11-07  Dominic Cooney  <dominicc@chromium.org>
    216
  • trunk/LayoutTests/fast/dom/Window/window-properties-expected.txt

    r99389 r99438  
    510510window.CloseEvent.prototype.MOUSEUP [number]
    511511window.CloseEvent.prototype.SELECT [number]
    512 window.CloseEvent.prototype.initCloseEvent [function]
    513512window.CloseEvent.prototype.initEvent [function]
    514513window.CloseEvent.prototype.preventDefault [function]
  • trunk/LayoutTests/platform/gtk/fast/dom/Window/window-properties-expected.txt

    r99389 r99438  
    510510window.CloseEvent.prototype.MOUSEUP [number]
    511511window.CloseEvent.prototype.SELECT [number]
    512 window.CloseEvent.prototype.initCloseEvent [function]
    513512window.CloseEvent.prototype.initEvent [function]
    514513window.CloseEvent.prototype.preventDefault [function]
  • trunk/LayoutTests/platform/mac/fast/dom/Window/window-properties-expected.txt

    r99389 r99438  
    535535window.CloseEvent.prototype.MOUSEUP [number]
    536536window.CloseEvent.prototype.SELECT [number]
    537 window.CloseEvent.prototype.initCloseEvent [function]
    538537window.CloseEvent.prototype.initEvent [function]
    539538window.CloseEvent.prototype.preventDefault [function]
  • trunk/LayoutTests/platform/qt-wk2/fast/dom/Window/window-properties-expected.txt

    r99389 r99438  
    507507window.CloseEvent.prototype.MOUSEUP [number]
    508508window.CloseEvent.prototype.SELECT [number]
    509 window.CloseEvent.prototype.initCloseEvent [function]
    510509window.CloseEvent.prototype.initEvent [function]
    511510window.CloseEvent.prototype.preventDefault [function]
  • trunk/LayoutTests/platform/qt/fast/dom/Window/window-properties-expected.txt

    r99389 r99438  
    508508window.CloseEvent.prototype.MOUSEUP [number]
    509509window.CloseEvent.prototype.SELECT [number]
    510 window.CloseEvent.prototype.initCloseEvent [function]
    511510window.CloseEvent.prototype.initEvent [function]
    512511window.CloseEvent.prototype.preventDefault [function]
  • trunk/LayoutTests/platform/win/fast/dom/Window/window-properties-expected.txt

    r99389 r99438  
    509509window.CloseEvent.prototype.MOUSEUP [number]
    510510window.CloseEvent.prototype.SELECT [number]
    511 window.CloseEvent.prototype.initCloseEvent [function]
    512511window.CloseEvent.prototype.initEvent [function]
    513512window.CloseEvent.prototype.preventDefault [function]
  • trunk/Source/WebCore/ChangeLog

    r99437 r99438  
     12011-11-07  Dominic Cooney  <dominicc@chromium.org>
     2
     3        Remove initCloseEvent method
     4        https://bugs.webkit.org/show_bug.cgi?id=71374
     5
     6        Reviewed by Ojan Vafai.
     7
     8        Test: fast/dom/Window/window-properties.html
     9
     10        * websockets/CloseEvent.h:
     11        (WebCore::CloseEvent::initCloseEvent):
     12        * websockets/CloseEvent.idl:
     13
    1142011-11-07  Anders Carlsson  <andersca@apple.com>
    215
  • trunk/Source/WebCore/websockets/CloseEvent.h

    r98044 r99438  
    5656    }
    5757
     58    static PassRefPtr<CloseEvent> create(bool wasClean, unsigned short code, const String& reason)
     59    {
     60        return adoptRef(new CloseEvent(wasClean, code, reason));
     61    }
     62
    5863    static PassRefPtr<CloseEvent> create(const AtomicString& type, const CloseEventInit& initializer)
    5964    {
    6065        return adoptRef(new CloseEvent(type, initializer));
    61     }
    62 
    63     void initCloseEvent(const AtomicString& type, bool canBubble, bool cancelable, bool wasClean, unsigned short code, const String& reason)
    64     {
    65         if (dispatched())
    66             return;
    67 
    68         initEvent(type, canBubble, cancelable);
    69 
    70         m_wasClean = wasClean;
    71         m_code = code;
    72         m_reason = reason;
    7366    }
    7467
     
    8679    {
    8780    }
     81
     82    CloseEvent(bool wasClean, int code, const String& reason)
     83        : Event(eventNames().closeEvent, false, false)
     84        , m_wasClean(wasClean)
     85        , m_code(code)
     86        , m_reason(reason)
     87    {
     88    }
     89
    8890    CloseEvent(const AtomicString& type, const CloseEventInit& initializer)
    8991        : Event(type, initializer)
  • trunk/Source/WebCore/websockets/CloseEvent.idl

    r96788 r99438  
    3939        readonly attribute unsigned short code;
    4040        readonly attribute [ConvertingNullStringTo=Undefined] DOMString reason;
    41         void initCloseEvent(in [Optional=CallWithDefaultValue] DOMString typeArg,
    42                             in [Optional=CallWithDefaultValue] boolean canBubbleArg,
    43                             in [Optional=CallWithDefaultValue] boolean cancelableArg,
    44                             in [Optional=CallWithDefaultValue] boolean wasCleanArg,
    45                             in [Optional=CallWithDefaultValue] unsigned short codeArg,
    46                             in [Optional=CallWithDefaultValue] DOMString reasonArg);
    4741    };
    4842
  • trunk/Source/WebCore/websockets/WebSocket.cpp

    r98388 r99438  
    521521    m_bufferedAmountAfterClose += unhandledBufferedAmount;
    522522    ASSERT(scriptExecutionContext());
    523     RefPtr<CloseEvent> event = CloseEvent::create();
    524     event->initCloseEvent(eventNames().closeEvent, false, false, wasClean, code, reason);
     523    RefPtr<CloseEvent> event = CloseEvent::create(wasClean, code, reason);
    525524    dispatchEvent(event);
    526525    if (m_channel) {
Note: See TracChangeset for help on using the changeset viewer.