Title: [151908] trunk/Source/WebCore
Revision
151908
Author
ch.du...@sisa.samsung.com
Date
2013-06-24 07:07:53 -0700 (Mon, 24 Jun 2013)

Log Message

Introduce WindowTimers IDL interface
https://bugs.webkit.org/show_bug.cgi?id=117929

Reviewed by Kentaro Hara.

Introduce WindowTimers IDL interface and have both DOMWindow and WorkerContext
implement it to match the latest specification and avoid IDL duplication:
- http://www.whatwg.org/specs/web-apps/current-work/multipage/timers.html#windowtimers
- http://dev.w3.org/html5/workers/#apis-available-to-workers

No new tests, no behavior change.

* CMakeLists.txt:
* DerivedSources.make:
* DerivedSources.pri:
* GNUmakefile.list.am:
* page/DOMWindow.idl:
* page/WindowTimers.idl:
* workers/WorkerContext.idl:

Modified Paths

Added Paths

Diff

Modified: trunk/Source/WebCore/CMakeLists.txt (151907 => 151908)


--- trunk/Source/WebCore/CMakeLists.txt	2013-06-24 13:58:22 UTC (rev 151907)
+++ trunk/Source/WebCore/CMakeLists.txt	2013-06-24 14:07:53 UTC (rev 151908)
@@ -577,6 +577,7 @@
     page/SpeechInputResult.idl
     page/SpeechInputResultList.idl
     page/WebKitPoint.idl
+    page/WindowTimers.idl
     page/WorkerNavigator.idl
 
     plugins/DOMMimeType.idl

Modified: trunk/Source/WebCore/ChangeLog (151907 => 151908)


--- trunk/Source/WebCore/ChangeLog	2013-06-24 13:58:22 UTC (rev 151907)
+++ trunk/Source/WebCore/ChangeLog	2013-06-24 14:07:53 UTC (rev 151908)
@@ -1,3 +1,25 @@
+2013-06-24  Christophe Dumez  <ch.du...@sisa.samsung.com>
+
+        Introduce WindowTimers IDL interface
+        https://bugs.webkit.org/show_bug.cgi?id=117929
+
+        Reviewed by Kentaro Hara.
+
+        Introduce WindowTimers IDL interface and have both DOMWindow and WorkerContext
+        implement it to match the latest specification and avoid IDL duplication:
+        - http://www.whatwg.org/specs/web-apps/current-work/multipage/timers.html#windowtimers
+        - http://dev.w3.org/html5/workers/#apis-available-to-workers
+
+        No new tests, no behavior change.
+
+        * CMakeLists.txt:
+        * DerivedSources.make:
+        * DerivedSources.pri:
+        * GNUmakefile.list.am:
+        * page/DOMWindow.idl:
+        * page/WindowTimers.idl:
+        * workers/WorkerContext.idl:
+
 2013-06-24  Patrick Gansterer  <par...@webkit.org>
 
         Build fix for WinCE after r151563.

Modified: trunk/Source/WebCore/DerivedSources.make (151907 => 151908)


--- trunk/Source/WebCore/DerivedSources.make	2013-06-24 13:58:22 UTC (rev 151907)
+++ trunk/Source/WebCore/DerivedSources.make	2013-06-24 14:07:53 UTC (rev 151908)
@@ -464,6 +464,7 @@
     $(WebCore)/page/SpeechInputResult.idl \
     $(WebCore)/page/SpeechInputResultList.idl \
     $(WebCore)/page/WebKitPoint.idl \
+    $(WebCore)/page/WindowTimers.idl \
     $(WebCore)/page/WorkerNavigator.idl \
     $(WebCore)/plugins/DOMMimeType.idl \
     $(WebCore)/plugins/DOMMimeTypeArray.idl \

Modified: trunk/Source/WebCore/DerivedSources.pri (151907 => 151908)


--- trunk/Source/WebCore/DerivedSources.pri	2013-06-24 13:58:22 UTC (rev 151907)
+++ trunk/Source/WebCore/DerivedSources.pri	2013-06-24 14:07:53 UTC (rev 151908)
@@ -462,6 +462,7 @@
     $$PWD/page/SpeechInputResult.idl \
     $$PWD/page/SpeechInputResultList.idl \
     $$PWD/page/WebKitPoint.idl \
+    $$PWD/page/WindowTimers.idl \
     $$PWD/page/WorkerNavigator.idl \
     $$PWD/plugins/DOMPlugin.idl \
     $$PWD/plugins/DOMMimeType.idl \

Modified: trunk/Source/WebCore/GNUmakefile.list.am (151907 => 151908)


--- trunk/Source/WebCore/GNUmakefile.list.am	2013-06-24 13:58:22 UTC (rev 151907)
+++ trunk/Source/WebCore/GNUmakefile.list.am	2013-06-24 14:07:53 UTC (rev 151908)
@@ -1635,6 +1635,7 @@
 	$(WebCore)/page/SpeechInputResult.idl \
 	$(WebCore)/page/SpeechInputResultList.idl \
 	$(WebCore)/page/WebKitPoint.idl \
+	$(WebCore)/page/WindowTimers.idl \
 	$(WebCore)/page/WorkerNavigator.idl \
 	$(WebCore)/plugins/DOMMimeType.idl \
 	$(WebCore)/plugins/DOMMimeTypeArray.idl \

Modified: trunk/Source/WebCore/page/DOMWindow.idl (151907 => 151908)


--- trunk/Source/WebCore/page/DOMWindow.idl	2013-06-24 13:58:22 UTC (rev 151907)
+++ trunk/Source/WebCore/page/DOMWindow.idl	2013-06-24 14:07:53 UTC (rev 151908)
@@ -186,12 +186,6 @@
     [Replaceable] readonly attribute Performance performance;
 #endif
 
-    // Timers
-    [Custom] long setTimeout(any handler, [Default=Undefined] optional long timeout);
-    void clearTimeout([Default=Undefined] optional long handle);
-    [Custom] long setInterval(any handler, [Default=Undefined] optional long timeout);
-    void clearInterval([Default=Undefined] optional long handle);
-
 #if defined(ENABLE_REQUEST_ANIMATION_FRAME) && ENABLE_REQUEST_ANIMATION_FRAME
     long requestAnimationFrame(RequestAnimationFrameCallback callback);
     void cancelAnimationFrame(long id);
@@ -330,3 +324,5 @@
     [Conditional=INDEXED_DATABASE] attribute IDBTransactionConstructor webkitIDBTransaction;
 #endif // defined(LANGUAGE_JAVASCRIPT)
 };
+
+DOMWindow implements WindowTimers;

Copied: trunk/Source/WebCore/page/WindowTimers.idl (from rev 151907, trunk/Source/WebCore/workers/WorkerContext.idl) (0 => 151908)


--- trunk/Source/WebCore/page/WindowTimers.idl	                        (rev 0)
+++ trunk/Source/WebCore/page/WindowTimers.idl	2013-06-24 14:07:53 UTC (rev 151908)
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2006, 2007, 2008, 2009, 2013 Apple Inc. All rights reserved.
+ * Copyright (C) 2011 Google Inc. All rights reserved.
+ * Copyright (C) 2013 Samsung Electronics. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``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 APPLE COMPUTER, INC. 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.
+ */
+
+[
+    NoInterfaceObject
+] interface WindowTimers {
+    [Custom] long setTimeout(any handler, [Default=Undefined] optional long timeout);
+    void clearTimeout([Default=Undefined] optional long handle);
+    [Custom] long setInterval(any handler, [Default=Undefined] optional long timeout);
+    void clearInterval([Default=Undefined] optional long handle);
+};
+

Modified: trunk/Source/WebCore/workers/WorkerContext.idl (151907 => 151908)


--- trunk/Source/WebCore/workers/WorkerContext.idl	2013-06-24 13:58:22 UTC (rev 151907)
+++ trunk/Source/WebCore/workers/WorkerContext.idl	2013-06-24 14:07:53 UTC (rev 151908)
@@ -48,13 +48,6 @@
     [Custom] void importScripts(/*[Variadic] DOMString urls */);
              [Replaceable] readonly attribute WorkerNavigator navigator;
 
-    // Timers
-    [Custom] long setTimeout(any handler, [Default=Undefined] optional long timeout);
-    void clearTimeout([Default=Undefined] optional long handle);
-    [Custom] long setInterval(any handler, [Default=Undefined] optional long timeout);
-    void clearInterval([Default=Undefined] optional long handle);
-
-
     // EventTarget interface
     void addEventListener(DOMString type, 
                           EventListener listener, 
@@ -68,3 +61,4 @@
     [Conditional=BLOB] attribute DOMURLConstructor webkitURL; // FIXME: deprecate this.
 };
 
+WorkerContext implements WindowTimers;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to