Title: [144669] trunk/Source/WebCore
Revision
144669
Author
[email protected]
Date
2013-03-04 13:54:41 -0800 (Mon, 04 Mar 2013)

Log Message

Web Inspector: Introduce WebInspector.EventTarget interface for interfaces that dispatch events.
https://bugs.webkit.org/show_bug.cgi?id=111320

Reviewed by Pavel Feldman.

* inspector/front-end/Object.js:
(WebInspector.EventTarget):
(WebInspector.EventTarget.prototype.addEventListener):
(WebInspector.EventTarget.prototype.removeEventListener):
(WebInspector.EventTarget.prototype.removeAllListeners):
(WebInspector.EventTarget.prototype.hasEventListeners):
(WebInspector.EventTarget.prototype.dispatchEventToListeners):
* inspector/front-end/ResourceScriptMapping.js:
* inspector/front-end/UISourceCode.js:
* inspector/front-end/Workspace.js:
(WebInspector.ProjectDelegate.prototype.searchInFileContent):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (144668 => 144669)


--- trunk/Source/WebCore/ChangeLog	2013-03-04 21:47:29 UTC (rev 144668)
+++ trunk/Source/WebCore/ChangeLog	2013-03-04 21:54:41 UTC (rev 144669)
@@ -1,3 +1,22 @@
+2013-03-04  Vsevolod Vlasov  <[email protected]>
+
+        Web Inspector: Introduce WebInspector.EventTarget interface for interfaces that dispatch events.
+        https://bugs.webkit.org/show_bug.cgi?id=111320
+
+        Reviewed by Pavel Feldman.
+
+        * inspector/front-end/Object.js:
+        (WebInspector.EventTarget):
+        (WebInspector.EventTarget.prototype.addEventListener):
+        (WebInspector.EventTarget.prototype.removeEventListener):
+        (WebInspector.EventTarget.prototype.removeAllListeners):
+        (WebInspector.EventTarget.prototype.hasEventListeners):
+        (WebInspector.EventTarget.prototype.dispatchEventToListeners):
+        * inspector/front-end/ResourceScriptMapping.js:
+        * inspector/front-end/UISourceCode.js:
+        * inspector/front-end/Workspace.js:
+        (WebInspector.ProjectDelegate.prototype.searchInFileContent):
+
 2013-03-04  Tom Sepez  <[email protected]>
 
         XSSAuditor bypass with --> comment syntax.

Modified: trunk/Source/WebCore/inspector/front-end/Object.js (144668 => 144669)


--- trunk/Source/WebCore/inspector/front-end/Object.js	2013-03-04 21:47:29 UTC (rev 144668)
+++ trunk/Source/WebCore/inspector/front-end/Object.js	2013-03-04 21:54:41 UTC (rev 144669)
@@ -25,6 +25,7 @@
 
 /**
  * @constructor
+ * @implements {WebInspector.EventTarget}
  */
 WebInspector.Object = function() {
 }
@@ -109,7 +110,7 @@
 
 /**
  * @constructor
- * @param {WebInspector.Object} target
+ * @param {WebInspector.EventTarget} target
  * @param {string} type
  * @param {*=} data
  */
@@ -144,4 +145,42 @@
     }
 }
 
+/**
+ * @interface
+ */
+WebInspector.EventTarget = function()
+{
+}
+
+WebInspector.EventTarget.prototype = {
+    /**
+     * @param {string} eventType
+     * @param {function(WebInspector.Event)} listener
+     * @param {Object=} thisObject
+     */
+    addEventListener: function(eventType, listener, thisObject) { },
+
+    /**
+     * @param {string} eventType
+     * @param {function(WebInspector.Event)} listener
+     * @param {Object=} thisObject
+     */
+    removeEventListener: function(eventType, listener, thisObject) { },
+
+    removeAllListeners: function() { },
+
+    /**
+     * @param {string} eventType
+     * @return {boolean}
+     */
+    hasEventListeners: function(eventType) { },
+
+    /**
+     * @param {string} eventType
+     * @param {*=} eventData
+     * @return {boolean}
+     */
+    dispatchEventToListeners: function(eventType, eventData) { },
+}
+
 WebInspector.notifications = new WebInspector.Object();

Modified: trunk/Source/WebCore/inspector/front-end/ResourceScriptMapping.js (144668 => 144669)


--- trunk/Source/WebCore/inspector/front-end/ResourceScriptMapping.js	2013-03-04 21:47:29 UTC (rev 144668)
+++ trunk/Source/WebCore/inspector/front-end/ResourceScriptMapping.js	2013-03-04 21:54:41 UTC (rev 144669)
@@ -225,6 +225,7 @@
 
 /**
  * @interface
+ * @extends {WebInspector.EventTarget}
  */
 WebInspector.ScriptFile = function()
 {
@@ -247,20 +248,6 @@
      * @return {boolean}
      */
     isDivergingFromVM: function() { return false; },
-
-    /**
-     * @param {string} eventType
-     * @param {function(WebInspector.Event)} listener
-     * @param {Object=} thisObject
-     */
-    addEventListener: function(eventType, listener, thisObject) { },
-
-    /**
-     * @param {string} eventType
-     * @param {function(WebInspector.Event)} listener
-     * @param {Object=} thisObject
-     */
-    removeEventListener: function(eventType, listener, thisObject) { }
 }
 
 /**

Modified: trunk/Source/WebCore/inspector/front-end/UISourceCode.js (144668 => 144669)


--- trunk/Source/WebCore/inspector/front-end/UISourceCode.js	2013-03-04 21:47:29 UTC (rev 144668)
+++ trunk/Source/WebCore/inspector/front-end/UISourceCode.js	2013-03-04 21:54:41 UTC (rev 144669)
@@ -655,6 +655,7 @@
 
 /**
  * @interface
+ * @extends {WebInspector.EventTarget}
  */
 WebInspector.UISourceCodeProvider = function()
 {
@@ -670,20 +671,6 @@
      * @return {Array.<WebInspector.UISourceCode>}
      */
     uiSourceCodes: function() {},
-
-    /**
-     * @param {string} eventType
-     * @param {function(WebInspector.Event)} listener
-     * @param {Object=} thisObject
-     */
-    addEventListener: function(eventType, listener, thisObject) { },
-
-    /**
-     * @param {string} eventType
-     * @param {function(WebInspector.Event)} listener
-     * @param {Object=} thisObject
-     */
-    removeEventListener: function(eventType, listener, thisObject) { }
 }
 
 /**

Modified: trunk/Source/WebCore/inspector/front-end/Workspace.js (144668 => 144669)


--- trunk/Source/WebCore/inspector/front-end/Workspace.js	2013-03-04 21:47:29 UTC (rev 144668)
+++ trunk/Source/WebCore/inspector/front-end/Workspace.js	2013-03-04 21:54:41 UTC (rev 144669)
@@ -68,6 +68,7 @@
 
 /**
  * @interface
+ * @extends {WebInspector.EventTarget}
  */
 WebInspector.ProjectDelegate = function() { }
 
@@ -120,21 +121,7 @@
      * @param {boolean} isRegex
      * @param {function(Array.<WebInspector.ContentProvider.SearchMatch>)} callback
      */
-    searchInFileContent: function(path, query, caseSensitive, isRegex, callback) { },
-
-    /**
-     * @param {string} eventType
-     * @param {function(WebInspector.Event)} listener
-     * @param {Object=} thisObject
-     */
-    addEventListener: function(eventType, listener, thisObject) { },
-
-    /**
-     * @param {string} eventType
-     * @param {function(WebInspector.Event)} listener
-     * @param {Object=} thisObject
-     */
-    removeEventListener: function(eventType, listener, thisObject) { }
+    searchInFileContent: function(path, query, caseSensitive, isRegex, callback) { }
 }
 
 /**
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to