- Revision
- 102558
- Author
- hara...@chromium.org
- Date
- 2011-12-11 23:01:29 -0800 (Sun, 11 Dec 2011)
Log Message
Use [Supplemental] IDL in WebSocket
https://bugs.webkit.org/show_bug.cgi?id=74160
Reviewed by Adam Barth.
By using the [Supplemental] IDL, this patch moves declarations of WebSocket
attributes from DOMWindow.idl to websocket/DOMWindowWebSocket.idl,
which helps make WebSocket a self-contained module.
No new tests, no change in behavior.
Confirm that http/tests/websocket/* pass.
* WebCore.gypi: Added DOMWindowWebSocket.idl.
* page/DOMWindow.idl: Added the [Supplemented] IDL to WebSocket-related attributes. This [Supplemented] IDL will be removed after all platforms support the [Supplemental] IDL (See bug 73394 for more details).
* websockets/DOMWindowWebSocket.idl: Added. Used the [Supplemental=DOMWindow] IDL. The attributes in this IDL file are treated as if they are described in DOMWindow.idl.
Modified Paths
Added Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (102557 => 102558)
--- trunk/Source/WebCore/ChangeLog 2011-12-12 04:06:57 UTC (rev 102557)
+++ trunk/Source/WebCore/ChangeLog 2011-12-12 07:01:29 UTC (rev 102558)
@@ -1,3 +1,21 @@
+2011-12-11 Kentaro Hara <hara...@chromium.org>
+
+ Use [Supplemental] IDL in WebSocket
+ https://bugs.webkit.org/show_bug.cgi?id=74160
+
+ Reviewed by Adam Barth.
+
+ By using the [Supplemental] IDL, this patch moves declarations of WebSocket
+ attributes from DOMWindow.idl to websocket/DOMWindowWebSocket.idl,
+ which helps make WebSocket a self-contained module.
+
+ No new tests, no change in behavior.
+ Confirm that http/tests/websocket/* pass.
+
+ * WebCore.gypi: Added DOMWindowWebSocket.idl.
+ * page/DOMWindow.idl: Added the [Supplemented] IDL to WebSocket-related attributes. This [Supplemented] IDL will be removed after all platforms support the [Supplemental] IDL (See bug 73394 for more details).
+ * websockets/DOMWindowWebSocket.idl: Added. Used the [Supplemental=DOMWindow] IDL. The attributes in this IDL file are treated as if they are described in DOMWindow.idl.
+
2011-12-11 Luke Macpherson <macpher...@chromium.org>
Implement webkit-line-grid and webkit-line-grid-snap CSS properties in CSSStyleApplyProperty.
Modified: trunk/Source/WebCore/WebCore.gypi (102557 => 102558)
--- trunk/Source/WebCore/WebCore.gypi 2011-12-12 04:06:57 UTC (rev 102557)
+++ trunk/Source/WebCore/WebCore.gypi 2011-12-12 07:01:29 UTC (rev 102558)
@@ -1506,6 +1506,7 @@
'webaudio/RealtimeAnalyserNode.idl',
'webaudio/WaveShaperNode.idl',
'websockets/CloseEvent.idl',
+ 'websockets/DOMWindowWebSocket.idl',
'websockets/WebSocket.idl',
'workers/AbstractWorker.idl',
'workers/DedicatedWorkerContext.idl',
Modified: trunk/Source/WebCore/page/DOMWindow.idl (102557 => 102558)
--- trunk/Source/WebCore/page/DOMWindow.idl 2011-12-12 04:06:57 UTC (rev 102557)
+++ trunk/Source/WebCore/page/DOMWindow.idl 2011-12-12 07:01:29 UTC (rev 102558)
@@ -550,7 +550,7 @@
attribute [Conditional=DEVICE_ORIENTATION, EnabledAtRuntime] DeviceMotionEventConstructor DeviceMotionEvent;
attribute [Conditional=DEVICE_ORIENTATION, EnabledAtRuntime] DeviceOrientationEventConstructor DeviceOrientationEvent;
attribute [Conditional=TOUCH_EVENTS] TouchEventConstructor TouchEvent;
- attribute [Conditional=WEB_SOCKETS] CloseEventConstructor CloseEvent;
+ attribute [Supplemented, Conditional=WEB_SOCKETS] CloseEventConstructor CloseEvent;
attribute StorageEventConstructor StorageEvent;
attribute [Supplemented, Conditional=WEB_AUDIO] AudioProcessingEventConstructor AudioProcessingEvent;
attribute [Supplemented, Conditional=WEB_AUDIO] OfflineAudioCompletionEventConstructor OfflineAudioCompletionEvent;
@@ -606,7 +606,7 @@
#endif
#if defined(ENABLE_WEB_SOCKETS) && ENABLE_WEB_SOCKETS
- attribute [JSCCustomGetter,EnabledAtRuntime] WebSocketConstructor WebSocket; // Usable with the new operator
+ attribute [Supplemented, JSCCustomGetter, EnabledAtRuntime] WebSocketConstructor WebSocket; // Usable with the new operator
#endif
#if defined(ENABLE_VIDEO_TRACK) && ENABLE_VIDEO_TRACK
Added: trunk/Source/WebCore/websockets/DOMWindowWebSocket.idl (0 => 102558)
--- trunk/Source/WebCore/websockets/DOMWindowWebSocket.idl (rev 0)
+++ trunk/Source/WebCore/websockets/DOMWindowWebSocket.idl 2011-12-12 07:01:29 UTC (rev 102558)
@@ -0,0 +1,41 @@
+/*
+ * Copyright (C) 2011 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+module window {
+
+ interface [
+ Conditional=WEB_SOCKETS,
+ Supplemental=DOMWindow
+ ] DOMWindowWebSocket {
+ attribute CloseEventConstructor CloseEvent;
+ attribute [JSCCustomGetter, EnabledAtRuntime] WebSocketConstructor WebSocket; // Usable with the new operator
+ };
+
+}