Title: [99438] trunk
Revision
99438
Author
domin...@chromium.org
Date
2011-11-07 10:04:51 -0800 (Mon, 07 Nov 2011)

Log 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:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (99437 => 99438)


--- trunk/LayoutTests/ChangeLog	2011-11-07 18:00:24 UTC (rev 99437)
+++ trunk/LayoutTests/ChangeLog	2011-11-07 18:04:51 UTC (rev 99438)
@@ -1,5 +1,19 @@
 2011-11-07  Dominic Cooney  <domin...@chromium.org>
 
+        Remove initCloseEvent method
+        https://bugs.webkit.org/show_bug.cgi?id=71374
+
+        Reviewed by Ojan Vafai.
+
+        * 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:
+
+2011-11-07  Dominic Cooney  <domin...@chromium.org>
+
         Remove initOverflowEvent from _javascript_ bindings
         https://bugs.webkit.org/show_bug.cgi?id=71687
 

Modified: trunk/LayoutTests/fast/dom/Window/window-properties-expected.txt (99437 => 99438)


--- trunk/LayoutTests/fast/dom/Window/window-properties-expected.txt	2011-11-07 18:00:24 UTC (rev 99437)
+++ trunk/LayoutTests/fast/dom/Window/window-properties-expected.txt	2011-11-07 18:04:51 UTC (rev 99438)
@@ -509,7 +509,6 @@
 window.CloseEvent.prototype.MOUSEOVER [number]
 window.CloseEvent.prototype.MOUSEUP [number]
 window.CloseEvent.prototype.SELECT [number]
-window.CloseEvent.prototype.initCloseEvent [function]
 window.CloseEvent.prototype.initEvent [function]
 window.CloseEvent.prototype.preventDefault [function]
 window.CloseEvent.prototype.stopImmediatePropagation [function]

Modified: trunk/LayoutTests/platform/gtk/fast/dom/Window/window-properties-expected.txt (99437 => 99438)


--- trunk/LayoutTests/platform/gtk/fast/dom/Window/window-properties-expected.txt	2011-11-07 18:00:24 UTC (rev 99437)
+++ trunk/LayoutTests/platform/gtk/fast/dom/Window/window-properties-expected.txt	2011-11-07 18:04:51 UTC (rev 99438)
@@ -509,7 +509,6 @@
 window.CloseEvent.prototype.MOUSEOVER [number]
 window.CloseEvent.prototype.MOUSEUP [number]
 window.CloseEvent.prototype.SELECT [number]
-window.CloseEvent.prototype.initCloseEvent [function]
 window.CloseEvent.prototype.initEvent [function]
 window.CloseEvent.prototype.preventDefault [function]
 window.CloseEvent.prototype.stopImmediatePropagation [function]

Modified: trunk/LayoutTests/platform/mac/fast/dom/Window/window-properties-expected.txt (99437 => 99438)


--- trunk/LayoutTests/platform/mac/fast/dom/Window/window-properties-expected.txt	2011-11-07 18:00:24 UTC (rev 99437)
+++ trunk/LayoutTests/platform/mac/fast/dom/Window/window-properties-expected.txt	2011-11-07 18:04:51 UTC (rev 99438)
@@ -534,7 +534,6 @@
 window.CloseEvent.prototype.MOUSEOVER [number]
 window.CloseEvent.prototype.MOUSEUP [number]
 window.CloseEvent.prototype.SELECT [number]
-window.CloseEvent.prototype.initCloseEvent [function]
 window.CloseEvent.prototype.initEvent [function]
 window.CloseEvent.prototype.preventDefault [function]
 window.CloseEvent.prototype.stopImmediatePropagation [function]

Modified: trunk/LayoutTests/platform/qt/fast/dom/Window/window-properties-expected.txt (99437 => 99438)


--- trunk/LayoutTests/platform/qt/fast/dom/Window/window-properties-expected.txt	2011-11-07 18:00:24 UTC (rev 99437)
+++ trunk/LayoutTests/platform/qt/fast/dom/Window/window-properties-expected.txt	2011-11-07 18:04:51 UTC (rev 99438)
@@ -507,7 +507,6 @@
 window.CloseEvent.prototype.MOUSEOVER [number]
 window.CloseEvent.prototype.MOUSEUP [number]
 window.CloseEvent.prototype.SELECT [number]
-window.CloseEvent.prototype.initCloseEvent [function]
 window.CloseEvent.prototype.initEvent [function]
 window.CloseEvent.prototype.preventDefault [function]
 window.CloseEvent.prototype.stopImmediatePropagation [function]

Modified: trunk/LayoutTests/platform/qt-wk2/fast/dom/Window/window-properties-expected.txt (99437 => 99438)


--- trunk/LayoutTests/platform/qt-wk2/fast/dom/Window/window-properties-expected.txt	2011-11-07 18:00:24 UTC (rev 99437)
+++ trunk/LayoutTests/platform/qt-wk2/fast/dom/Window/window-properties-expected.txt	2011-11-07 18:04:51 UTC (rev 99438)
@@ -506,7 +506,6 @@
 window.CloseEvent.prototype.MOUSEOVER [number]
 window.CloseEvent.prototype.MOUSEUP [number]
 window.CloseEvent.prototype.SELECT [number]
-window.CloseEvent.prototype.initCloseEvent [function]
 window.CloseEvent.prototype.initEvent [function]
 window.CloseEvent.prototype.preventDefault [function]
 window.CloseEvent.prototype.stopImmediatePropagation [function]

Modified: trunk/LayoutTests/platform/win/fast/dom/Window/window-properties-expected.txt (99437 => 99438)


--- trunk/LayoutTests/platform/win/fast/dom/Window/window-properties-expected.txt	2011-11-07 18:00:24 UTC (rev 99437)
+++ trunk/LayoutTests/platform/win/fast/dom/Window/window-properties-expected.txt	2011-11-07 18:04:51 UTC (rev 99438)
@@ -508,7 +508,6 @@
 window.CloseEvent.prototype.MOUSEOVER [number]
 window.CloseEvent.prototype.MOUSEUP [number]
 window.CloseEvent.prototype.SELECT [number]
-window.CloseEvent.prototype.initCloseEvent [function]
 window.CloseEvent.prototype.initEvent [function]
 window.CloseEvent.prototype.preventDefault [function]
 window.CloseEvent.prototype.stopImmediatePropagation [function]

Modified: trunk/Source/WebCore/ChangeLog (99437 => 99438)


--- trunk/Source/WebCore/ChangeLog	2011-11-07 18:00:24 UTC (rev 99437)
+++ trunk/Source/WebCore/ChangeLog	2011-11-07 18:04:51 UTC (rev 99438)
@@ -1,3 +1,16 @@
+2011-11-07  Dominic Cooney  <domin...@chromium.org>
+
+        Remove initCloseEvent method
+        https://bugs.webkit.org/show_bug.cgi?id=71374
+
+        Reviewed by Ojan Vafai.
+
+        Test: fast/dom/Window/window-properties.html
+
+        * websockets/CloseEvent.h:
+        (WebCore::CloseEvent::initCloseEvent):
+        * websockets/CloseEvent.idl:
+
 2011-11-07  Anders Carlsson  <ander...@apple.com>
 
         Simplify NetscapePlugin::convertPoint and make it work (in theory) with transformed plug-ins

Modified: trunk/Source/WebCore/websockets/CloseEvent.h (99437 => 99438)


--- trunk/Source/WebCore/websockets/CloseEvent.h	2011-11-07 18:00:24 UTC (rev 99437)
+++ trunk/Source/WebCore/websockets/CloseEvent.h	2011-11-07 18:04:51 UTC (rev 99438)
@@ -55,21 +55,14 @@
         return adoptRef(new CloseEvent());
     }
 
-    static PassRefPtr<CloseEvent> create(const AtomicString& type, const CloseEventInit& initializer)
+    static PassRefPtr<CloseEvent> create(bool wasClean, unsigned short code, const String& reason)
     {
-        return adoptRef(new CloseEvent(type, initializer));
+        return adoptRef(new CloseEvent(wasClean, code, reason));
     }
 
-    void initCloseEvent(const AtomicString& type, bool canBubble, bool cancelable, bool wasClean, unsigned short code, const String& reason)
+    static PassRefPtr<CloseEvent> create(const AtomicString& type, const CloseEventInit& initializer)
     {
-        if (dispatched())
-            return;
-
-        initEvent(type, canBubble, cancelable);
-
-        m_wasClean = wasClean;
-        m_code = code;
-        m_reason = reason;
+        return adoptRef(new CloseEvent(type, initializer));
     }
 
     bool wasClean() const { return m_wasClean; }
@@ -85,6 +78,15 @@
         , m_code(0)
     {
     }
+
+    CloseEvent(bool wasClean, int code, const String& reason)
+        : Event(eventNames().closeEvent, false, false)
+        , m_wasClean(wasClean)
+        , m_code(code)
+        , m_reason(reason)
+    {
+    }
+
     CloseEvent(const AtomicString& type, const CloseEventInit& initializer)
         : Event(type, initializer)
         , m_wasClean(initializer.wasClean)

Modified: trunk/Source/WebCore/websockets/CloseEvent.idl (99437 => 99438)


--- trunk/Source/WebCore/websockets/CloseEvent.idl	2011-11-07 18:00:24 UTC (rev 99437)
+++ trunk/Source/WebCore/websockets/CloseEvent.idl	2011-11-07 18:04:51 UTC (rev 99438)
@@ -38,12 +38,6 @@
         readonly attribute boolean wasClean;
         readonly attribute unsigned short code;
         readonly attribute [ConvertingNullStringTo=Undefined] DOMString reason;
-        void initCloseEvent(in [Optional=CallWithDefaultValue] DOMString typeArg,
-                            in [Optional=CallWithDefaultValue] boolean canBubbleArg,
-                            in [Optional=CallWithDefaultValue] boolean cancelableArg,
-                            in [Optional=CallWithDefaultValue] boolean wasCleanArg,
-                            in [Optional=CallWithDefaultValue] unsigned short codeArg,
-                            in [Optional=CallWithDefaultValue] DOMString reasonArg);
     };
 
 }

Modified: trunk/Source/WebCore/websockets/WebSocket.cpp (99437 => 99438)


--- trunk/Source/WebCore/websockets/WebSocket.cpp	2011-11-07 18:00:24 UTC (rev 99437)
+++ trunk/Source/WebCore/websockets/WebSocket.cpp	2011-11-07 18:04:51 UTC (rev 99438)
@@ -520,8 +520,7 @@
     m_state = CLOSED;
     m_bufferedAmountAfterClose += unhandledBufferedAmount;
     ASSERT(scriptExecutionContext());
-    RefPtr<CloseEvent> event = CloseEvent::create();
-    event->initCloseEvent(eventNames().closeEvent, false, false, wasClean, code, reason);
+    RefPtr<CloseEvent> event = CloseEvent::create(wasClean, code, reason);
     dispatchEvent(event);
     if (m_channel) {
         m_channel->disconnect();
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to